/* ============================================================
   Insécurité & délinquance 2025 — feuille de style
   Design tokens (clair/sombre) alignés sur la palette dataviz.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --surface-1: #fcfcfb;   /* cartes */
  --plane:     #f4f3ef;   /* fond de page */
  --plane-2:   #ffffff;   /* sections alternées */
  --ink:       #14140f;
  --ink-2:     #52514e;
  --muted:     #86847d;
  --hair:      #e4e2da;
  --hair-2:    #d3d1c7;
  --accent:    #1f6fd0;
  --accent-ink:#155bb0;
  --accent-soft:#e8f0fb;

  /* catégories (categorical slots) */
  --c-personnes: #1f6fd0;  /* blue  */
  --c-biensviol: #eb6834;  /* orange */
  --c-biens:     #1baf7a;  /* aqua  */
  --c-stup:      #4a3aa7;  /* violet */
  --c-eco:       #eda100;  /* yellow */

  /* diverging hausse / baisse (neutre : rouge = + , bleu = -) */
  --up:   #d84a49;
  --up-soft:#fbe7e6;
  --down: #1f6fd0;
  --down-soft:#e5eefb;

  --pop:  #b6b3a8;         /* trait de référence population */

  --shadow: 0 1px 2px rgba(20,20,15,.04), 0 8px 28px rgba(20,20,15,.06);
  --radius: 14px;
  --maxw: 1140px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

:root[data-theme="dark"] {
  --surface-1: #1a1a18;
  --plane:     #0e0e0c;
  --plane-2:   #131311;
  --ink:       #f4f3ee;
  --ink-2:     #c3c2b7;
  --muted:     #8f8d84;
  --hair:      #2b2b28;
  --hair-2:    #37372f;
  --accent:    #4f97ec;
  --accent-ink:#7fb2f0;
  --accent-soft:#182838;

  --c-personnes: #4f97ec;
  --c-biensviol: #f0824f;
  --c-biens:     #22c48c;
  --c-stup:      #9085e9;
  --c-eco:       #e2b23a;

  --up:   #ec6b6a;
  --up-soft:#3a1f1f;
  --down: #4f97ec;
  --down-soft:#182838;
  --pop:  #6b6a61;

  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface-1: #1a1a18; --plane: #0e0e0c; --plane-2: #131311;
    --ink: #f4f3ee; --ink-2: #c3c2b7; --muted: #8f8d84;
    --hair: #2b2b28; --hair-2: #37372f;
    --accent: #4f97ec; --accent-ink: #7fb2f0; --accent-soft: #182838;
    --c-personnes:#4f97ec; --c-biensviol:#f0824f; --c-biens:#22c48c; --c-stup:#9085e9; --c-eco:#e2b23a;
    --up:#ec6b6a; --up-soft:#3a1f1f; --down:#4f97ec; --down-soft:#182838; --pop:#6b6a61;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.4);
  }
}

html { scroll-behavior: smooth; scroll-padding-top: 74px; }
body {
  margin: 0; background: var(--plane); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
b { font-weight: 650; }
i { font-style: italic; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 10px clamp(14px, 4vw, 32px);
  background: color-mix(in srgb, var(--plane) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hair);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-size: 15px; }
.brand-mark { width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--c-stup)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.brand-text b { font-weight: 750; }
.mainnav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.mainnav a {
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 550;
  padding: 7px 11px; border-radius: 8px; transition: background .15s, color .15s;
}
.mainnav a:hover { background: var(--accent-soft); color: var(--accent-ink); }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--hair-2); background: var(--surface-1); color: var(--ink-2);
  border-radius: 10px; cursor: pointer; transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 780px) { .mainnav { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(52px, 9vw, 104px) 0 clamp(30px,5vw,48px);
  background:
    radial-gradient(1100px 460px at 78% -8%, var(--accent-soft), transparent 60%),
    radial-gradient(760px 420px at 8% 8%, color-mix(in srgb, var(--c-stup) 14%, transparent), transparent 62%);
  border-bottom: 1px solid var(--hair);
}
.kicker { display: inline-block; font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--surface-1); border: 1px solid var(--hair-2);
  padding: 6px 12px; border-radius: 999px; margin: 0 0 22px; }
.hero h1 { font-size: clamp(34px, 6.4vw, 64px); line-height: 1.02; letter-spacing: -0.025em;
  font-weight: 800; margin: 0 0 22px; max-width: 15ch; }
.hero h1 .hl { color: var(--accent); position: relative; white-space: nowrap; }
.lede { font-size: clamp(18px, 2.3vw, 22px); line-height: 1.5; color: var(--ink-2); max-width: 62ch; margin: 0 0 18px; }
.hero-note { font-size: 14.5px; color: var(--muted); max-width: 66ch; margin: 0 0 40px; }

.hero-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px) { .hero-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .hero-kpis { grid-template-columns: 1fr; } }
.kpi { background: var(--surface-1); border: 1px solid var(--hair); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); }
.kpi .kpi-fig { font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.kpi .kpi-fig small { font-size: .5em; font-weight: 700; color: var(--muted); margin-left: 2px; }
.kpi .kpi-lbl { font-size: 14px; color: var(--ink-2); margin-top: 10px; line-height: 1.35; }
.kpi .kpi-lbl b { color: var(--ink); }
.kpi.up .kpi-fig { color: var(--up); } .kpi.down .kpi-fig { color: var(--down); }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section.alt { background: var(--plane-2); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.sec-head { max-width: 74ch; margin-bottom: 30px; }
.sec-kicker { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.sec-head h2 { font-size: clamp(26px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 780; margin: 0 0 14px; }
.sec-intro { font-size: 17.5px; color: var(--ink-2); margin: 0; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar-sub { margin-bottom: 20px; justify-content: space-between; }
.chip {
  border: 1px solid var(--hair-2); background: var(--surface-1); color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sw, var(--accent)); }
.chip.is-active { background: var(--ink); color: var(--surface-1); border-color: var(--ink); }
.chip.is-active .dot { box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface-1) 60%, transparent); }

.segmented { display: inline-flex; flex-wrap: wrap; max-width: 100%; background: var(--surface-1);
  border: 1px solid var(--hair-2); border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button { border: 0; background: transparent; color: var(--ink-2); font-weight: 600;
  font-size: 14px; padding: 7px 14px; border-radius: 7px; cursor: pointer; transition: all .15s; font-family: inherit; }
.segmented button:hover { color: var(--ink); }
.segmented button.is-active { background: var(--accent); color: #fff; }
.segmented.big button { padding: 9px 18px; font-size: 15px; }
:root[data-theme="dark"] .segmented button.is-active { color: #061018; }

/* ---------- Tabs (onglets) ---------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--hair); margin-bottom: 28px; }
.tabs [role="tab"] { border: 0; background: none; font-family: inherit; font-size: clamp(15px, 2.2vw, 17px);
  font-weight: 650; color: var(--ink-2); padding: 12px 20px; cursor: pointer; letter-spacing: -0.01em;
  border-bottom: 2.5px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabpanel[hidden] { display: none; }
.tab-intro { font-size: 16.5px; color: var(--ink-2); max-width: 78ch; margin: 0 0 22px; }
.focus-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
@media (max-width: 640px) { .focus-strip { grid-template-columns: 1fr; } }
.focus-stat { background: var(--surface-1); border: 1px solid var(--hair); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); }
.focus-stat .fs-fig { font-size: clamp(24px, 3.4vw, 28px); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.focus-stat .fs-lbl { font-size: 13px; color: var(--ink-2); margin-top: 7px; line-height: 1.35; }
.focus-stat.up .fs-fig { color: var(--up); }
.focus-stat.ref .fs-fig { color: var(--muted); }

/* ---------- Notice variante avertissement ---------- */
.notice.warn { background: color-mix(in srgb, var(--c-eco) 13%, var(--surface-1));
  border-color: color-mix(in srgb, var(--c-eco) 45%, transparent); border-left-color: var(--c-eco); }
.notice.warn .ni { color: color-mix(in srgb, var(--c-eco) 72%, var(--ink)); }

/* ---------- Pictogramme (100 personnes) ---------- */
.picto-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 250px); gap: 26px 34px; align-items: center; }
@media (max-width: 820px) { .picto-wrap { grid-template-columns: 1fr; } }
.picto-main { display: flex; flex-direction: column; gap: 20px; }
.picto-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 9px; }
.picto-label { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.picto-count { font-size: 13px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.picto-grid { display: grid; grid-template-columns: repeat(25, 1fr); gap: 3px; }
@media (max-width: 520px) { .picto-grid { grid-template-columns: repeat(20, 1fr); } }
.picto-grid .pic { color: color-mix(in srgb, var(--muted) 40%, transparent); line-height: 0; }
.picto-grid .pic.on { color: var(--hl, var(--accent)); }
.picto-grid .pic svg { width: 100%; height: auto; display: block; }
.picto-index { text-align: center; }
@media (max-width: 820px) { .picto-index { text-align: left; border-top: 1px solid var(--hair); padding-top: 18px; } }
.picto-index .pi-fig { font-size: clamp(42px, 8vw, 62px); font-weight: 850; letter-spacing: -0.03em; line-height: 1; color: var(--hl, var(--accent)); }
.picto-index .pi-sentence { font-size: 14px; line-height: 1.5; color: var(--ink-2); margin-top: 12px; }
.picto-index .pi-sentence b { color: var(--ink); }

.brow.row-on { background: color-mix(in srgb, var(--accent) 11%, transparent); }
.ref-swatch.ref-solid { border-top: 2px solid var(--pop); }

.link-btn { border: 0; background: none; color: var(--accent-ink); font-weight: 650; font-size: 14px;
  cursor: pointer; font-family: inherit; padding: 6px 4px; border-bottom: 1.5px dashed color-mix(in srgb, var(--accent) 50%, transparent); }
.link-btn:hover { color: var(--accent); }
.select-label { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.select { font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink);
  background: var(--surface-1); border: 1px solid var(--hair-2); border-radius: 10px; padding: 10px 14px;
  min-width: min(420px, 100%); cursor: pointer; }
.select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---------- Card + chart ---------- */
.card { background: var(--surface-1); border: 1px solid var(--hair); border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.chart-head { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.chart-head h3 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--ink-2); }
.legend span.item { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 11px; height: 11px; border-radius: 3px; background: var(--c); }
.ref-tag { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.ref-swatch { width: 14px; height: 0; border-top: 2px dashed var(--pop); display: inline-block; }

/* ---------- Bar chart (HTML rows) ---------- */
.barchart { display: flex; flex-direction: column; gap: 3px; }
.brow { display: grid; grid-template-columns: minmax(120px, 230px) 1fr auto; gap: 14px; align-items: center;
  padding: 5px 6px; border-radius: 8px; transition: background .12s; }
.brow:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.brow .blab { font-size: 13.5px; color: var(--ink-2); font-weight: 550; line-height: 1.25; }
.brow .blab .bsub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.btrack { position: relative; height: 26px; background: color-mix(in srgb, var(--muted) 12%, transparent);
  border-radius: 6px; overflow: visible; }
.bfill { position: absolute; top: 0; left: 0; height: 100%; border-radius: 6px 4px 4px 6px;
  background: var(--bc, var(--accent)); min-width: 3px; transition: width .5s cubic-bezier(.22,1,.36,1); }
.bfill.neg { border-radius: 4px 6px 6px 4px; }
.bref { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed var(--pop); z-index: 3; }
.bzero { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1.5px solid var(--hair-2); z-index: 2; }
.bval { font-size: 14px; font-weight: 700; text-align: right; min-width: 58px; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; }
.bval .bdelta { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; margin-left: 6px; }
.bdelta.pos { color: var(--up); background: var(--up-soft); }
.bdelta.neg { color: var(--down); background: var(--down-soft); }
.bdelta.flat { color: var(--muted); background: color-mix(in srgb, var(--muted) 15%, transparent); }
.bpill { position: absolute; top: 50%; transform: translateY(-50%); width: 11px; height: 11px; border-radius: 50%;
  border: 2px solid var(--surface-1); z-index: 4; }
@media (max-width: 620px) {
  .brow { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .brow .blab { grid-column: 1 / -1; }
}

/* ---------- Insight cards (profil) ---------- */
.insight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 26px; }
@media (max-width: 880px) { .insight-grid { grid-template-columns: 1fr; } }
.insight { background: var(--surface-1); border: 1px solid var(--hair); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); }
.insight .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 16px;
  background: color-mix(in srgb, var(--ic, var(--accent)) 15%, transparent); color: var(--ic, var(--accent)); }
.insight .ico svg { width: 22px; height: 22px; }
.insight h3 { font-size: 18px; margin: 0 0 8px; letter-spacing: -0.01em; }
.insight p { font-size: 14.5px; color: var(--ink-2); margin: 0 0 16px; }
.insight .stat-line { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.insight .stat-line .big { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: var(--ic, var(--accent)); }
.insight .stat-line .cap { font-size: 13px; color: var(--muted); }
.insight .vs { font-size: 12.5px; color: var(--muted); border-top: 1px dashed var(--hair-2); padding-top: 10px; }

.notice { display: flex; gap: 13px; align-items: flex-start; background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 16px 18px; margin: 0 0 24px; }
.notice .ni { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: 1px; }
.notice p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.notice p b { color: var(--ink); }
.notice .nt { display: block; font-weight: 700; color: var(--ink); margin-bottom: 3px; }

.callout { margin-top: 6px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--radius); padding: 20px 24px; }
.callout h4 { margin: 0 0 6px; font-size: 15px; color: var(--accent-ink); }
.callout p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* ---------- Crime card (explorateur) ---------- */
.crime-card { background: var(--surface-1); border: 1px solid var(--hair); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; }
.cc-top { display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: flex-start; justify-content: space-between;
  padding: 26px clamp(20px,3vw,30px); border-bottom: 1px solid var(--hair);
  background: linear-gradient(180deg, color-mix(in srgb, var(--ccc, var(--accent)) 8%, transparent), transparent); }
.cc-top .cc-title { margin: 0; font-size: clamp(20px,3vw,26px); letter-spacing: -0.02em; max-width: 22ch; }
.cc-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; color: var(--ccc, var(--accent));
  background: color-mix(in srgb, var(--ccc, var(--accent)) 13%, transparent); padding: 4px 11px; border-radius: 999px; margin-bottom: 12px; }
.cc-metrics { display: flex; gap: 26px; flex-wrap: wrap; }
.cc-metric .m-fig { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.cc-metric .m-lbl { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.cc-metric .m-fig.up { color: var(--up); } .cc-metric .m-fig.down { color: var(--down); }
.cc-body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; }
@media (max-width: 800px) { .cc-body { grid-template-columns: 1fr; } }
.cc-col { padding: 24px clamp(20px,3vw,30px); }
.cc-col + .cc-col { border-left: 1px solid var(--hair); }
@media (max-width: 800px) { .cc-col + .cc-col { border-left: 0; border-top: 1px solid var(--hair); } }
.cc-col h4 { margin: 0 0 18px; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cmp-row { margin-bottom: 16px; }
.cmp-row .cmp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 14px; }
.cmp-row .cmp-head .cn { font-weight: 600; }
.cmp-row .cmp-head .cv { font-weight: 800; font-variant-numeric: tabular-nums; }
.cmp-row .cmp-head .cv .over { font-size: 11.5px; font-weight: 700; margin-left: 6px; padding: 1px 6px; border-radius: 999px; }
.over.hi { color: var(--up); background: var(--up-soft); } .over.lo { color: var(--down); background: var(--down-soft); }
.age-bars { display: flex; flex-direction: column; gap: 10px; }
.age-bar .abh { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 5px; }
.age-bar .abh .an { color: var(--ink-2); font-weight: 550; }
.age-bar .abh .av { font-weight: 750; font-variant-numeric: tabular-nums; }
.age-bar .abt { height: 9px; border-radius: 5px; background: color-mix(in srgb, var(--muted) 12%, transparent); overflow: hidden; }
.age-bar .abf { height: 100%; border-radius: 5px; background: var(--ccc, var(--accent)); }
.age-note { font-size: 12px; color: var(--muted); margin-top: 14px; }

/* ---------- Table ---------- */
.table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--hair); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; background: var(--surface-1); }
table.data th, table.data td { padding: 11px 14px; text-align: right; border-bottom: 1px solid var(--hair); white-space: nowrap; }
table.data th:first-child, table.data td:first-child { text-align: left; white-space: normal; }
table.data thead th { position: sticky; top: 0; background: var(--surface-1); font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--muted); font-weight: 700; }
table.data tbody tr:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
table.data td.num { font-variant-numeric: tabular-nums; }
td .up { color: var(--up); font-weight: 700; } td .down { color: var(--down); font-weight: 700; }

.source { font-size: 12.5px; color: var(--muted); margin: 18px 0 0; line-height: 1.5; }

/* ---------- Metho ---------- */
.metho-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 720px) { .metho-grid { grid-template-columns: 1fr; } }
.metho-item { background: var(--surface-1); border: 1px solid var(--hair); border-radius: var(--radius); padding: 22px; }
.metho-item h4 { margin: 0 0 8px; font-size: 16px; }
.metho-item p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

/* ---------- Footer ---------- */
.foot { background: var(--plane-2); border-top: 1px solid var(--hair); padding: 40px 0; }
.foot p { margin: 0 0 6px; font-size: 14px; color: var(--ink-2); }
.foot .foot-sub { font-size: 12.5px; color: var(--muted); max-width: 80ch; }

/* ---------- Tooltip ---------- */
.tooltip { position: fixed; z-index: 100; pointer-events: none; max-width: 280px;
  background: var(--ink); color: var(--surface-1); font-size: 13px; line-height: 1.45;
  padding: 10px 12px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transform: translate(-50%, -112%); }
.tooltip b { color: #fff; } :root[data-theme="dark"] .tooltip b { color: var(--ink); }
.tooltip .tt-t { font-weight: 700; margin-bottom: 3px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .bfill { transition: none; }
}

/* ============================================================
   Page Justice — composants additionnels
   ============================================================ */
:root { --c-red2: #b5241f; }
:root[data-theme="dark"] { --c-red2: #d1544c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-red2: #d1544c; } }

.page-switch { flex: none; display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: 13.5px; font-weight: 650; color: var(--ink-2); border: 1px solid var(--hair-2);
  background: var(--surface-1); padding: 7px 13px; border-radius: 999px; transition: all .15s; white-space: nowrap; }
.page-switch:hover { color: var(--accent-ink); border-color: var(--accent); }
.inline-link { color: var(--accent-ink); text-decoration: none; font-weight: 600;
  border-bottom: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.inline-link:hover { color: var(--accent); }
@media (max-width: 900px) { .page-switch { display: none; } }

.hero-justice { background:
  radial-gradient(1100px 460px at 80% -8%, color-mix(in srgb, var(--up) 16%, transparent), transparent 60%),
  radial-gradient(760px 420px at 6% 6%, color-mix(in srgb, var(--c-stup) 13%, transparent), transparent 62%); }
.hero-justice h1 .hl { color: var(--up); white-space: normal; }
.kpi.accent .kpi-fig { color: var(--accent); }

/* Funnel — barre au-dessus, description dessous (robuste quelle que soit la largeur) */
.funnel { display: flex; flex-direction: column; gap: 22px; }
.funnel-step { display: flex; flex-direction: column; gap: 9px; }
.funnel-step .fs-bar { min-width: 150px; height: 56px; border-radius: 10px; display: flex;
  align-items: center; padding: 0 18px; background: linear-gradient(90deg, var(--fc), color-mix(in srgb, var(--fc) 75%, transparent)); }
.funnel-step .fs-n { font-size: clamp(20px, 3vw, 27px); font-weight: 800; color: #fff; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.funnel-step .fs-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.funnel-step .fs-meta b { font-size: 16px; }
.funnel-step .fs-drop { font-size: 13px; font-weight: 700; color: var(--up); background: var(--up-soft); padding: 2px 9px; border-radius: 999px; }
.funnel-step .fs-sub { font-size: 13px; color: var(--muted); flex-basis: 100%; }

/* Stacked bar */
.sbar { display: flex; width: 100%; height: 28px; border-radius: 7px; overflow: hidden;
  background: color-mix(in srgb, var(--muted) 12%, transparent); }
.sbar .seg { height: 100%; background: var(--sc); transition: width .5s cubic-bezier(.22,1,.36,1); }
.sbar .seg + .seg { box-shadow: inset 2px 0 0 var(--surface-1); }

/* Multi-colonnes */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 820px) { .two-col, .three-col { grid-template-columns: 1fr; } }

/* Figure card (crimes) */
.figure-card h3 { font-size: 18px; margin: 0 0 14px; }
.big-fact { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.big-fact .bf-fig { font-size: clamp(34px, 5vw, 46px); font-weight: 850; letter-spacing: -0.03em; color: var(--up); line-height: 1; }
.big-fact .bf-lbl { font-size: 14px; color: var(--ink-2); max-width: 26ch; }
.fact-list { margin: 0 0 8px; padding-left: 18px; }
.fact-list li { font-size: 14.5px; color: var(--ink-2); margin-bottom: 6px; }

/* Définitions récidive */
.defs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 820px) { .defs-grid { grid-template-columns: 1fr; } }
.def-card { background: var(--surface-1); border: 1px solid var(--hair); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 18px 20px; }
.def-card h4 { margin: 0 0 6px; font-size: 15.5px; color: var(--accent-ink); }
.def-card p { margin: 0; font-size: 14px; color: var(--ink-2); }
.def-card:nth-child(1) { border-left-color: var(--up); } .def-card:nth-child(1) h4 { color: var(--up); }
.def-card:nth-child(2) { border-left-color: var(--c-biensviol); } .def-card:nth-child(2) h4 { color: var(--c-biensviol); }
.def-card:nth-child(3) { border-left-color: var(--c-biens); } .def-card:nth-child(3) h4 { color: color-mix(in srgb, var(--c-biens) 82%, var(--ink)); }
