/* ============================================================
   PDM — design system repris de sensityliferp.io :
   noir pur + motif discret, nav capsule flottante, Inter / JetBrains Mono,
   cartes arrondies 16px à liseré interne, filet blanc lumineux sur l'onglet actif.
   ============================================================ */
:root {
  --lum: 255, 255, 255;
  --base: #0a0a0a;
  --ink: #fff;
  --ink-hi: #ffffffe0;
  --ink-strong: #ffffffd6;
  --ink-body: #ffffffa8;
  --ink-mid: #ffffff80;
  --ink-meta: #ffffff75;
  --ink-nav: #fff9;
  --ink-decor: #ffffff4d;
  --ink-ghost: #ffffff29;
  --line-0: #ffffff0f;
  --line-1: #ffffff1f;
  --line-2: #fff3;
  --line-3: #ffffff57;
  --line-edge: #ffffff38;
  --line-edge-hi: #ffffff8c;
  --surface-1: #ffffff08;
  --surface-2: #0006;
  --surface-3: #00000085;
  --hover: #ffffff12;
  --invert: #fff;
  --invert-hover: #e8e8e8;
  --invert-down: #d4d4d4;
  --on-invert: #0a0a0a;
  --fil: #ff3b45;
  --fil-bloom: 0 0 10px rgba(227,18,31,.6), 0 0 22px rgba(227,18,31,.3);
  --focus-ring: rgba(var(--lum), .75);
  /* accent rouge PDM */
  --accent: #8f0b13;
  --accent-2: #e3121f;
  --accent-ink: #ff4a55;
  --accent-dim: rgba(227,18,31,.14);
  --danger: #ef4444;
  --danger-ink: #f87171;
  --warn: #fbbf24;
  --star: #f5c542;
  --neon: #fff;
  --neon-glow: 0 0 6px rgba(255,255,255,.75), 0 0 18px rgba(255,255,255,.35), 0 0 40px rgba(255,255,255,.15);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --pattern-url: url(/assets/pdm-pattern.svg);
  --r-sm: .5rem; --r: .75rem; --r-lg: 1rem;
  --max: 1280px;
  --pad: clamp(16px, 4vw, 32px);
  --fast: .15s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body { margin: 0; background: var(--base); color: var(--ink-body); font-family: var(--sans); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--accent-2); color: #fff; }
kbd { font: 500 10.5px/1 var(--mono); padding: 3px 6px; border-radius: 4px; background: var(--surface-1); border: 1px solid var(--line-1); color: var(--ink-meta); }
code { font-family: var(--mono); font-size: .9em; color: var(--ink-hi); background: var(--surface-1); padding: 1px 6px; border-radius: 4px; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-meta); font-size: 13px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ---------- Fonds motif ---------- */
.pattern-section { background: var(--pattern-url) repeat, var(--base); background-size: 80px 80px, 100%; }
.pattern-bg { background: linear-gradient(to bottom, #0a0a0a 0%, transparent 150px), var(--pattern-url) repeat, var(--base); background-size: 100% 100%, 80px 80px, 100%; }

/* ---------- Structure ---------- */
.page { position: relative; z-index: 1; flex: 1; min-width: 0; max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); width: 100%; }
.section { padding: clamp(56px, 7vw, 96px) 0; }

/* En-tête de section : barre verticale + libellé, titre Inter bold, sous-titre */
.sec-head { max-width: 48rem; margin-bottom: 3rem; }
.sec-label { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .18em; color: var(--ink-meta); }
.section-bar { flex: none; width: 3px; height: 1.25rem; border-radius: 9999px; background: linear-gradient(180deg, var(--accent-2) 0%, rgba(227,18,31,.2) 100%); }
.sec-title { margin: 0 0 8px; font-size: clamp(34px, 4vw, 48px); font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--ink-hi); }
.sec-sub { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-mid); }
.sec-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.sec-head-row .sec-head { margin-bottom: 0; }
.sec-meta { font: 500 12px var(--mono); color: var(--ink-decor); letter-spacing: .04em; }

/* ---------- Nav capsule flottante ---------- */
.topbar { position: fixed; left: 50%; top: 24px; transform: translateX(-50%); z-index: 50; width: 95%; max-width: var(--max); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 20px; border-radius: 1rem; border: 1px solid var(--line-0); background: rgba(0,0,0,.4); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); transition: background .3s, border-color .3s; }
.topbar.scrolled .topbar-in, .topbar.open .topbar-in { background: rgba(0,0,0,.8); border-color: var(--line-1); }
.topbar-left { display: flex; align-items: center; gap: 24px; min-width: 0; }
.topbar-logo img { height: 28px; width: auto; object-fit: contain; }
.topbar-nav { display: flex; align-items: center; gap: 2px; }
.tnav { position: relative; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 6px 12px; letter-spacing: .01em; border-radius: var(--r-sm); border: 1px solid transparent; font-size: 14px; font-weight: 500; color: var(--ink-nav); background: none; cursor: pointer; transition: all var(--fast); }
.tnav svg { display: none; }
.tnav::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: transparent; transition: background var(--fast), box-shadow var(--fast); }
.tnav:hover { border-color: var(--line-2); background: var(--hover); color: var(--ink-hi); }
.tnav[aria-current="page"] { color: var(--ink); }
.tnav[aria-current="page"]::before { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
.tnav .count { border-radius: 4px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-hi); padding: 2px 6px; font: 600 10px var(--mono); line-height: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex: none; }
.icon-btn.burger { display: none; }
.topbar-mobile { display: none; }
@media (max-width: 1040px) {
  .topbar-nav, .topbar-right .btn, .topbar-right .icon-btn:not(.burger) { display: none; }
  .icon-btn.burger { display: grid; border-color: transparent; background: none; }
  .topbar.open .topbar-mobile { display: grid; gap: 2px; margin-top: 8px; padding: 12px; border-radius: 1rem; border: 1px solid var(--line-1); background: rgba(0,0,0,.95); backdrop-filter: blur(24px); max-height: calc(100dvh - 110px); overflow: auto; }
  .topbar-mobile a, .topbar-mobile button { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-left: 2px solid transparent; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 14px; color: var(--ink-nav); background: none; border-top: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; }
  .topbar-mobile a[aria-current="page"] { border-left-color: var(--fil); background: var(--surface-1); color: var(--ink); font-weight: 600; }
  .topbar-mobile .btn { display: inline-flex; margin-top: 12px; width: 100%; border: 1px solid var(--line-3); border-radius: var(--r-sm); justify-content: center; }
}
.nav-offset { height: 104px; }

/* ---------- Boutons (s-button) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: .55rem 1.1rem; border-radius: var(--r-sm); border: 1px solid transparent; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; user-select: none; transition: all var(--fast); background: none; color: var(--ink-strong); }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: translateY(1px); }
.btn-secondary, .btn:not([class*="btn-"]) { border-color: var(--line-3); color: var(--ink-strong); }
.btn-secondary:hover, .btn:not([class*="btn-"]):hover { background: var(--hover); border-color: var(--line-edge-hi); color: var(--ink); }
.btn-primary { background: var(--invert); color: var(--on-invert); font-weight: 600; box-shadow: 0 10px 24px -8px #000000e6; }
.btn-primary:hover { background: var(--invert-hover); box-shadow: 0 5px 14px -8px #000000f2; }
.btn-primary:active { background: var(--invert-down); }
.btn-ghost { color: var(--ink-meta); }
.btn-ghost:hover { background: var(--surface-1); color: var(--ink); }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #10b981e6; }
.btn-danger { background: #ef4444e6; color: #fff; }
.btn-danger:hover { background: #ef4444; }
.btn-lg { padding: .8rem 1.4rem; font-size: 15px; }
.btn-sm { padding: .4rem .8rem; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn kbd { background: rgba(0,0,0,.15); border-color: transparent; color: inherit; opacity: .8; }
.btn-primary kbd { background: rgba(0,0,0,.08); }
.icon-btn { width: 36px; height: 36px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line-1); background: var(--surface-1); color: var(--ink-mid); cursor: pointer; display: grid; place-items: center; transition: all var(--fast); }
.icon-btn:hover { color: var(--ink); background: var(--hover); border-color: var(--line-2); }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#sound[aria-pressed="false"] .on { display: none; }
#sound[aria-pressed="true"] .off { display: none; }

/* ---------- Tags / pastilles ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 9999px; font-size: 11px; font-weight: 600; letter-spacing: .02em; background: rgba(0,0,0,.6); border: 1px solid var(--line-1); color: var(--ink-hi); backdrop-filter: blur(6px); }
.tag-white { background: var(--invert); border-color: var(--invert); color: var(--on-invert); font-weight: 700; }
.tag-accent { background: var(--accent-2); border-color: var(--accent-2); color: #fff; font-weight: 700; }
.tag-danger { background: #e11d48; border-color: #e11d48; color: #fff; font-weight: 700; text-transform: uppercase; font-size: 10px; }
.tag-warn { background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.35); color: #fbbf24; }
.tag-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fbbf24; }
.token { font: 500 11.5px var(--mono); padding: 2px 6px; border-radius: 4px; }
.token-add { color: var(--accent-ink); }
.token-mod { color: #fbbf24; }
.token-fix { color: #f87171; }
.pill-mono { font: 500 11px var(--mono); padding: 3px 7px; border-radius: 4px; border: 1px solid var(--line-1); background: var(--surface-1); color: var(--ink-strong); }

/* ---------- Onglets capsule (boutique) ---------- */
.tabs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-1); background: var(--surface-1); color: var(--ink-mid); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: all var(--fast); }
.tab svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab:hover { border-color: var(--line-2); color: var(--ink-hi); background: var(--hover); }
.tab[aria-current="page"], .tab[aria-selected="true"] { background: var(--invert); border-color: var(--invert); color: var(--on-invert); font-weight: 600; }
.tab .count { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 9999px; background: var(--surface-1); border: 1px solid var(--line-1); color: var(--ink-meta); }
.tab[aria-current="page"] .count, .tab[aria-selected="true"] .count { background: rgba(10,10,10,.1); border-color: rgba(10,10,10,.15); color: var(--on-invert); }

/* ---------- Champs ---------- */
.input { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: var(--r-sm); background: var(--surface-1); border: 1px solid var(--line-1); transition: border-color var(--fast), box-shadow var(--fast), background var(--fast); }
.input:focus-within { border-color: var(--line-edge-hi); background: var(--hover); }
.input svg { width: 16px; height: 16px; fill: none; stroke: var(--ink-meta); stroke-width: 2; stroke-linecap: round; flex: none; }
.input input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; height: 100%; color: var(--ink); }
.input input::placeholder { color: var(--ink-decor); }
.input-grow { flex: 1; min-width: 240px; }
.select { height: 44px; padding: 0 36px 0 12px; border-radius: var(--r-sm); background: var(--surface-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff80' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; border: 1px solid var(--line-1); color: var(--ink-hi); outline: 0; cursor: pointer; appearance: none; -webkit-appearance: none; font-size: 13.5px; font-weight: 500; }
.select:hover { border-color: var(--line-2); }
.select:focus { border-color: var(--line-edge-hi); }
.select option { background: #141414; }
.toggle { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-1); background: var(--surface-1); font-size: 13.5px; color: var(--ink-strong); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--accent-2); width: 15px; height: 15px; margin: 0; }

/* ---------- Cartes & panneaux (s-card / s-panel) ---------- */
.s-card { position: relative; overflow: hidden; border-radius: 1rem; border: 1px solid var(--line-1); background: var(--surface-2); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 1px #ffffff0f, 0 16px 44px #00000052; transition: border-color .25s, box-shadow .25s; }
.s-card:hover { border-color: var(--line-2); box-shadow: inset 0 1px rgba(var(--lum), .1), 0 22px 60px #00000075; }
.panel { position: relative; overflow: hidden; border-radius: 1rem; border: 1px solid var(--line-1); background: var(--surface-3); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 1px #ffffff0f, 0 20px 60px #0006; }
.panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; z-index: 2; pointer-events: none; opacity: .4; background: linear-gradient(90deg, transparent 4%, var(--line-edge-hi) 50%, transparent 96%); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-0); }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink-hi); }
.panel-foot { padding: 12px 20px; border-top: 1px solid var(--line-0); font-size: 12.5px; color: var(--ink-meta); }

/* Bandeau de chiffres */
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.strip > div { padding: 20px 22px; border-radius: 1rem; border: 1px solid var(--line-1); background: var(--surface-2); box-shadow: inset 0 1px #ffffff0f; display: grid; gap: 4px; }
.strip .k { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-meta); }
.strip .v { font-size: 32px; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; color: var(--neon); text-shadow: var(--neon-glow); font-variant-numeric: tabular-nums; }
.strip .s { font-size: 12.5px; color: var(--ink-mid); }
@media (max-width: 860px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .strip .v { font-size: 26px; } }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { position: sticky; top: 0; z-index: 1; background: #101010; text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-meta); border-bottom: 1px solid var(--line-1); }
.table td { padding: 10px 16px; border-bottom: 1px solid var(--line-0); white-space: nowrap; vertical-align: middle; color: var(--ink-body); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-1); }
.table-wrap { overflow: auto; }
.c-num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.c-num { color: var(--neon); text-shadow: 0 0 6px rgba(255,255,255,.45), 0 0 14px rgba(255,255,255,.18); font-weight: 500; }
.stars { color: var(--star); letter-spacing: 1px; font-size: 12px; }
.stars .off { color: rgba(255,255,255,0.14); }

/* ---------- Bandeau CTA (panneau large) ---------- */
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 32px 36px; }
.cta h3 { margin: 0 0 6px; font-size: 20px; font-weight: 600; color: var(--ink-hi); }
.cta p { margin: 0; color: var(--ink-mid); max-width: 640px; font-size: 14.5px; }
.cta p code { color: var(--ink-hi); }

/* ---------- Footer 4 colonnes ---------- */
.footer { border-top: 1px solid var(--line-1); background: var(--base); position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px; padding: 64px 0; }
.footer-brand img { height: 36px; width: auto; margin-bottom: 20px; }
.footer-brand p { margin: 0 0 24px; max-width: 20rem; font-size: 14px; line-height: 1.6; color: var(--ink-mid); }
.footer-social { display: flex; gap: 10px; }
.footer h4 { margin: 0 0 16px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-strong); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { font-size: 14px; color: var(--ink-body); transition: color var(--fast); }
.footer ul a:hover { color: var(--ink-hi); }
.footer-server { display: grid; gap: 8px; }
.footer-server a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-1); background: var(--surface-1); font-size: 13.5px; font-weight: 500; color: var(--ink-hi); transition: all var(--fast); }
.footer-server a:hover { background: var(--hover); border-color: var(--line-2); }
.footer-server a span { display: inline-flex; align-items: center; gap: 8px; }
.footer-server svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.footer-bottom { border-top: 1px solid var(--line-0); padding: 28px 0 32px; text-align: center; font-size: 12px; color: var(--ink-meta); display: grid; gap: 10px; }
.footer-bottom small { display: block; max-width: 620px; margin: 0 auto; font-size: 11.5px; line-height: 1.6; color: var(--ink-decor); }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; padding: 11px 18px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 500; background: #141414; border: 1px solid var(--line-1); color: var(--ink-hi); box-shadow: 0 20px 40px -20px #000; max-width: min(92vw, 560px); display: flex; align-items: center; gap: 10px; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-meta); flex: none; }
.toast.ok::before { background: #34d399; box-shadow: 0 0 8px #34d399; }
.toast.err::before { background: #f87171; box-shadow: 0 0 8px #f87171; }

/* ---------- Apparition ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
/* prefers-reduced-motion volontairement ignoré : l'utilisateur veut les animations même avec le réglage Windows actif */

/* ---------- Barre de navigation latérale escamotable (desktop) ---------- */
.nav-toggle { display: none; }
@media (min-width: 1041px) {
  .topbar { left: 24px; top: 24px; bottom: 24px; transform: translateX(calc(-100% - 40px)); width: 248px; max-width: none; transition: transform .7s cubic-bezier(.34,1.25,.5,1); will-change: transform; }
  .topbar.open { transform: none; }
  .topbar .topbar-in { opacity: 0; transform: scale(.96) translateX(-10px); filter: blur(6px); transition: opacity .45s ease, transform .7s cubic-bezier(.34,1.25,.5,1), filter .5s ease, background .3s, border-color .3s; }
  .topbar.open .topbar-in { opacity: 1; transform: none; filter: blur(0); }
  .topbar .topbar-logo { opacity: 0; transform: translateY(-8px); transition: opacity .4s ease .05s, transform .5s cubic-bezier(.22,1,.36,1) .05s; }
  .topbar.open .topbar-logo { opacity: 1; transform: none; }
  .topbar .topbar-right { opacity: 0; transform: translateY(10px); transition: opacity .4s ease, transform .5s cubic-bezier(.22,1,.36,1); }
  .topbar.open .topbar-right { opacity: 1; transform: none; transition-delay: .4s; }
  .topbar-in { flex-direction: column; align-items: stretch; height: 100%; padding: 22px 14px 16px; gap: 22px; background: rgba(8,8,8,.86); border-color: var(--line-1); box-shadow: 0 30px 80px -20px #000; }
  .topbar-left { flex-direction: column; align-items: stretch; gap: 26px; flex: 1; min-width: 0; }
  .topbar-logo { padding: 0 8px; }
  .topbar-logo img { height: 34px; }
  .topbar-nav { flex-direction: column; align-items: stretch; gap: 3px; }
  .tnav { justify-content: flex-start; padding: 10px 12px; font-size: 14px; border-radius: var(--r-sm); opacity: 0; transform: translateX(-14px); transition: opacity .4s ease, transform .5s cubic-bezier(.22,1,.36,1), background var(--fast), border-color var(--fast), color var(--fast); }
  .topbar.open .tnav { opacity: 1; transform: none; }
  .topbar.open .tnav:nth-child(1) { transition-delay: .12s; } .topbar.open .tnav:nth-child(2) { transition-delay: .17s; } .topbar.open .tnav:nth-child(3) { transition-delay: .22s; } .topbar.open .tnav:nth-child(4) { transition-delay: .27s; } .topbar.open .tnav:nth-child(5) { transition-delay: .32s; } .topbar.open .tnav:nth-child(6) { transition-delay: .37s; }
  .tnav[aria-current="page"] { background: var(--surface-1); border-color: var(--line-1); }
  .tnav .count { margin-left: auto; }
  .topbar-right { flex-direction: column; align-items: stretch; gap: 8px; }
  .topbar-right .icon-btn { width: 100%; }
  .topbar-right .btn { width: 100%; justify-content: center; }
  .topbar-mobile { display: none !important; }
  .icon-btn.burger { display: none !important; }
  /* bouton d'ouverture : trois chevrons */
  .nav-toggle { position: fixed; left: 24px; top: 24px; z-index: 60; display: inline-flex; align-items: center; justify-content: center; gap: 0; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-1); background: rgba(8,8,8,.7); backdrop-filter: blur(16px); color: var(--ink-hi); cursor: pointer; transition: transform .55s cubic-bezier(.22,1,.36,1), background var(--fast), border-color var(--fast); }
  .nav-toggle:hover { background: rgba(255,255,255,.08); border-color: var(--line-2); }
  .nav-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .nav-toggle svg path { animation: chev 1.6s ease-in-out infinite; }
  .nav-toggle svg path:nth-child(2) { animation-delay: .15s; }
  .nav-toggle svg path:nth-child(3) { animation-delay: .3s; }
  @keyframes chev { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
  .nav-toggle[aria-expanded="true"] { transform: translateX(268px) rotate(180deg); background: var(--invert); color: var(--on-invert); border-color: var(--invert); box-shadow: 0 10px 30px -10px #000; }
  .nav-toggle { transition: transform .7s cubic-bezier(.34,1.25,.5,1), background .3s, border-color .3s, color .3s, box-shadow .3s; }
  .nav-toggle[aria-expanded="true"] svg path { animation: none; opacity: 1; }
  /* voile de fermeture */
  .nav-scrim { position: fixed; inset: 0; z-index: 49; background: radial-gradient(900px 600px at 0% 50%, rgba(227,18,31,.10), transparent 60%), rgba(0,0,0,.45); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .5s ease; }
  .nav-scrim.show { opacity: 1; pointer-events: auto; }
  /* le contenu n'est plus décalé : la barre passe par-dessus */
  .admin, .map-page { padding-top: 96px !important; }
  .login { padding-top: 60px !important; }
  .section { scroll-margin-top: 24px; }
}

/* ---------- Transition entre pages ---------- */
.page, .footer { animation: page-in .7s cubic-bezier(.22,1,.36,1) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } 70% { filter: blur(0); } to { opacity: 1; transform: none; filter: blur(0); } }
body.leaving .page, body.leaving .footer { animation: page-out .32s cubic-bezier(.4,0,.8,.4) forwards; }
@keyframes page-out { to { opacity: 0; transform: translateY(-14px) scale(.985); filter: blur(6px); } }
.page-bar { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 100; background: linear-gradient(90deg, transparent, var(--accent-2) 30%, #fff 50%, var(--accent-2) 70%, transparent); box-shadow: 0 0 12px var(--accent-2); transform: scaleX(0); transform-origin: left; opacity: 0; pointer-events: none; }
body.leaving .page-bar { animation: bar-sweep .36s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes bar-sweep { 0% { transform: scaleX(0); opacity: 1; } 100% { transform: scaleX(1); opacity: 1; } }
body.arrived .page-bar { animation: bar-out .5s ease forwards; }
@keyframes bar-out { 0% { transform: scaleX(1); opacity: 1; transform-origin: right; } 100% { transform: scaleX(0); opacity: 0; transform-origin: right; } }

/* ---------- Écran d'accueil « site bénévole » ---------- */
.intro { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; background: var(--pattern-url) repeat, #0a0a0a; background-size: 80px 80px, 100%; animation: fade-in .5s ease both; }
.intro::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 600px at 50% 40%, rgba(227,18,31,.12), transparent 60%), linear-gradient(to bottom, transparent, #0a0a0a 120%); pointer-events: none; }
.intro-box { position: relative; width: min(680px, 100%); text-align: center; display: grid; justify-items: center; gap: 18px; }
.intro-box > * { animation: view-item .8s cubic-bezier(.22,1,.36,1) both; }
.intro-box > :nth-child(1) { animation-delay: .1s; } .intro-box > :nth-child(2) { animation-delay: .3s; } .intro-box > :nth-child(3) { animation-delay: .45s; } .intro-box > :nth-child(4) { animation-delay: .6s; } .intro-box > :nth-child(5) { animation-delay: .75s; } .intro-box > :nth-child(6) { animation-delay: .9s; } .intro-box > :nth-child(7) { animation-delay: 1.1s; }
@keyframes view-item { from { opacity: 0; transform: translateY(16px) scale(.985); filter: blur(4px); } 60% { filter: blur(0); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes fade-in { from { opacity: 0; } }
.intro-logo { width: min(260px, 60vw); filter: drop-shadow(0 12px 40px #000); }
.intro-label { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 8px; border-radius: 9999px; border: 1px solid var(--line-1); background: rgba(0,0,0,.45); font: 500 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-meta); }
.intro-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 3px rgba(227,18,31,.25), 0 0 12px var(--accent-2); }
.intro-title { margin: 0; font-size: clamp(34px, 5vw, 60px); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.intro-title span { display: block; color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,.85); }
.intro-text { margin: 0; max-width: 34rem; font-size: 15.5px; line-height: 1.7; color: var(--ink-body); }
.intro-text b { color: var(--neon); font-weight: 600; text-shadow: var(--neon-glow); }
.intro-sign { margin: 0; font: 500 12.5px var(--mono); letter-spacing: .08em; color: var(--ink-meta); }
.intro-sign b { color: var(--ink-hi); font-weight: 600; }
.intro-actions { display: grid; justify-items: center; gap: 10px; }
.intro-timer { width: 200px; height: 2px; border-radius: 2px; background: var(--line-1); overflow: hidden; }
.intro-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent-2), #fff); transform-origin: left; animation: intro-timer 9s linear forwards; }
@keyframes intro-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.intro-hint { font-size: 11.5px; color: var(--ink-decor); }
.intro.leaving { animation: intro-out .55s cubic-bezier(.4,0,.2,1) forwards; }
.intro.leaving .intro-box { animation: intro-box-out .5s cubic-bezier(.4,0,.8,.4) forwards; }
@keyframes intro-out { to { opacity: 0; } }
@keyframes intro-box-out { to { opacity: 0; transform: translateY(-24px) scale(1.04); filter: blur(8px); } }
body.intro-open { overflow: hidden; }
