/* Ma rue, mon respect — styles communs aux trois versions */
:root {
  --bg: #fffdf8;
  --bg-2: #f3eee2;
  --ink: #1b1a17;
  --ink-2: #4a4740;
  --muted: #7a766c;
  --accent: #e4572e;
  --accent-ink: #ffffff;
  --accent-2: #17a398;
  --warn: #f4b942;
  --card: #ffffff;
  --line: #e2dccb;
  --shadow: 0 8px 24px rgba(27, 26, 23, 0.08);
  --radius: 18px;
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Fredoka", "Nunito", "Segoe UI", system-ui, sans-serif;
  --max: 1080px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15161a; --bg-2: #1e2026; --ink: #f1efe8; --ink-2: #c9c5b9; --muted: #8f8b80;
    --card: #22242b; --line: #33363f; --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  --bg: #15161a; --bg-2: #1e2026; --ink: #f1efe8; --ink-2: #c9c5b9; --muted: #8f8b80;
  --card: #22242b; --line: #33363f; --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 17px; line-height: 1.55; overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
section { padding: 64px 0; }
.section-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.section-title .tag {
  font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--accent); color: var(--accent-ink); padding: 4px 10px; border-radius: 999px;
}
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.nav .brand { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav .brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; justify-content: flex-end; }
.nav li a { text-decoration: none; color: var(--ink-2); font-weight: 700; font-size: 0.9rem; padding: 6px 10px; border-radius: 999px; }
.nav li a:hover { background: var(--bg-2); color: var(--ink); }
@media (max-width: 640px) { .nav li a { padding: 6px 8px; font-size: 0.8rem; } }

/* Boutons et cartes */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none;
  border: 0; cursor: pointer; font-family: inherit; font-size: 1rem; box-shadow: var(--shadow);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Gros chiffres */
.stat-big { display: flex; flex-direction: column; gap: 4px; }
.stat-big .num {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums;
}
.stat-big .label { color: var(--ink-2); max-width: 32ch; }
.source { font-size: 0.78rem; color: var(--muted); }
.source a { color: inherit; }

/* Graphiques en barres (tout le texte est en HTML, pas dans un SVG) */
.chart { display: flex; flex-direction: column; gap: 10px; }
.chart .chart-title { font-weight: 800; margin-bottom: 4px; }
.chart .row { display: grid; grid-template-columns: minmax(110px, 36%) 1fr auto; align-items: center; gap: 10px; }
.chart .row .lbl { font-size: 0.92rem; color: var(--ink-2); }
.chart .row .track { height: 18px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.chart .row .bar { height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 1.1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.chart .row.alt .bar { background: var(--accent-2); }
.chart .row .val { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 3.5ch; text-align: right; }
@media (max-width: 480px) {
  .chart .row { grid-template-columns: 1fr auto; }
  .chart .row .lbl { grid-column: 1 / -1; }
}

/* Lois */
.law { display: grid; gap: 8px; }
.law .law-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.law .law-nature { font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 6px; background: var(--bg-2); color: var(--ink-2); }
.law .law-nature.crime { background: var(--accent); color: var(--accent-ink); }
.law .law-nature.delit { background: var(--warn); color: #1b1a17; }
.law .law-article { font-size: 0.85rem; color: var(--muted); }
.law .law-peine { display: grid; gap: 6px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.law .law-peine div { background: var(--bg-2); border-radius: 10px; padding: 10px 12px; font-size: 0.92rem; }
.law .law-peine strong { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 2px; }
.law ul { margin: 0; padding-left: 18px; }

/* Actions */
.action { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.action .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--bg-2); display: grid; place-items: center; font-size: 1.5rem; }
.action h3 { margin-bottom: 4px; }
.contacts { display: flex; flex-wrap: wrap; gap: 10px; }
.contacts .contact { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 160px; }
.contacts .contact .n { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.contacts .contact .t { font-size: 0.85rem; color: var(--ink-2); }

/* Pied de page */
footer { padding: 40px 0 60px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.92rem; }
footer .insta { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; text-decoration: none; color: var(--ink); }
footer ol { padding-left: 20px; }
footer li { margin-bottom: 4px; }

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .chart .row .bar { transition: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
