/* ==========================================================================
   UNFAKE : direction artistique « labo de forensique numérique ».
   Angles droits, filets de 1 px, aucune ombre.
   Bleu = authentique / validé. Orange = généré / action principale.
   Ces deux couleurs ont un sens : jamais de décoration.
   Polices auto-hébergées (voir fonts/LICENCES.md) : aucune requête vers un tiers.
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  /* Neutres */
  --ink: #0B0D12;        /* fond */
  --graphite: #161A22;   /* surfaces */
  --graphite-2: #1B2029; /* trame des surfaces */
  --scan: #11141A;       /* trame de la zone de dépôt */
  --trace: #2A303C;      /* filets */
  --cendre: #9AA0AB;     /* texte secondaire */
  --mist: #C9CCD2;       /* texte courant atténué */
  --bone: #EDEAE3;       /* texte */
  /* Les deux couleurs qui ont un sens */
  --real: #5CC8FF;       /* signal bleu : authentique, validé, accepté, liens */
  --fake: #FF6B2C;       /* infrarouge : généré, détecté, action principale */

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  --max: 1280px;
  --pad-x: clamp(20px, 4.5vw, 64px);
}

/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
}
main { flex: 1; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }
a { color: var(--real); text-underline-offset: 3px; }
a:hover { color: var(--bone); }
::selection { background: var(--fake); color: var(--ink); }
:focus-visible { outline: 2px solid var(--real); outline-offset: 3px; }
code, pre { font-family: var(--mono); }
code { font-size: 0.86em; background: var(--graphite); padding: 0.1em 0.4em; }
hr { border: 0; border-top: 1px solid var(--trace); margin: 28px 0; }
ul, ol { padding-left: 1.2em; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--fake); color: var(--ink); padding: 10px 14px; font-weight: 700; }
.skip-link:focus { left: 8px; }

/* --- Typographie --------------------------------------------------------- */
.display {
  font-size: clamp(44px, 5.3vw, 76px);
  font-weight: 900; font-stretch: 125%; line-height: 0.92; letter-spacing: -0.025em;
}
.h1 {
  font-size: clamp(40px, 5.2vw, 76px);
  font-weight: 900; font-stretch: 125%; line-height: 0.92; letter-spacing: -0.025em;
}
.h2 {
  font-size: clamp(36px, 4.4vw, 64px);
  font-weight: 900; font-stretch: 125%; line-height: 0.95; letter-spacing: -0.02em;
}
.h3 { font-size: 24px; font-weight: 800; font-stretch: 112%; line-height: 1.15; }
.lead { max-width: 560px; margin: 0; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--mist); text-wrap: pretty; }
.mist { color: var(--mist); }
.muted { color: var(--cendre); }
.small { font-size: 15px; line-height: 1.5; }

/* Annotations : toujours en mono capitales */
.mono { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.label { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cendre); }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fake); }
.mono-inline { font-family: var(--mono); font-weight: 500; font-stretch: 100%; }

/* --- Motif A : cadre de détection (un seul par écran) -------------------- */
.frame {
  --cl: 0.24em;   /* longueur d'un coin */
  --ct: 0.05em;   /* épaisseur */
  position: relative;
  display: inline-block;
  padding: 0.02em 0.14em;
  background:
    linear-gradient(var(--fake), var(--fake)) top left / var(--cl) var(--ct),
    linear-gradient(var(--fake), var(--fake)) top left / var(--ct) var(--cl),
    linear-gradient(var(--fake), var(--fake)) top right / var(--cl) var(--ct),
    linear-gradient(var(--fake), var(--fake)) top right / var(--ct) var(--cl),
    linear-gradient(var(--fake), var(--fake)) bottom left / var(--cl) var(--ct),
    linear-gradient(var(--fake), var(--fake)) bottom left / var(--ct) var(--cl),
    linear-gradient(var(--fake), var(--fake)) bottom right / var(--cl) var(--ct),
    linear-gradient(var(--fake), var(--fake)) bottom right / var(--ct) var(--cl);
  background-repeat: no-repeat;
}
.frame-fake { color: var(--fake); }

/* Logotype : UN + FAKE dans son cadre */
.logo {
  display: inline-flex; align-items: center;
  font-weight: 900; font-stretch: 125%; font-size: 26px; line-height: 1; letter-spacing: -0.02em;
  color: var(--bone); text-decoration: none;
}
.logo:hover { color: var(--bone); }
.logo .frame { --cl: 6px; --ct: 2px; padding: 0.06em 0.16em; margin-left: 0.08em; }

/* --- Boutons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 0;
  font-family: var(--sans); font-size: 16px; font-weight: 700; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--fake); color: var(--ink); font-weight: 800; font-stretch: 112%; letter-spacing: 0.01em; }
.btn-primary:hover:not(:disabled) { background: var(--bone); color: var(--ink); }
.btn-outline { background: transparent; color: var(--bone); border-color: var(--bone); }
.btn-outline:hover:not(:disabled) { background: var(--bone); color: var(--ink); }
.btn-quiet { background: transparent; color: var(--mist); border-color: var(--trace); }
.btn-quiet:hover:not(:disabled) { color: var(--bone); border-color: var(--bone); }
.btn-danger { background: transparent; color: var(--fake); border-color: var(--fake); }
.btn-danger:hover:not(:disabled) { background: var(--fake); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--bone); font-weight: 800; font-stretch: 112%; }
.btn-ink:hover { background: var(--bone); color: var(--ink); }
.btn-sm { height: 40px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 17px; }
.btn-xl { height: 60px; padding: 0 32px; font-size: 18px; }
/* Lien d'action en mono (« Voir le dataset ↗ ») */
.link-mono {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--real); background: none; border: 0; padding: 0; cursor: pointer;
}
.link-mono:hover { color: var(--bone); }
.actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }

/* --- États et tags (couleur ET texte) ------------------------------------ */
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px; border: 1px solid currentColor;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; line-height: 1.2;
  text-transform: uppercase; white-space: nowrap;
}
.tag-real { background: var(--real); border-color: var(--real); color: var(--ink); }
.tag-fake { background: var(--fake); border-color: var(--fake); color: var(--ink); }
.tag-ok { color: var(--real); }
.tag-ok::before { content: ""; width: 6px; height: 6px; background: currentColor; }
.tag-wait { color: var(--mist); border-color: var(--cendre); }
.tag-wait::before { content: ""; width: 6px; height: 6px; border: 1px solid currentColor; }
.tag-error { color: var(--fake); }
.tag-neutral { color: var(--mist); border-color: var(--trace); }
.tag-xs { padding: 2px 6px; font-size: 11px; }

/* Marqueur « ton équipe » : carré bleu */
.you { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mist); }
.you::before { content: ""; width: 8px; height: 8px; background: var(--real); }

/* --- En-tête ------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--trace); background: var(--ink); position: sticky; top: 0; z-index: 20; }
.nav {
  max-width: var(--max); margin: 0 auto; padding: 20px var(--pad-x);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
}
.nav-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
}
.nav-links > a:not(.btn) { color: var(--mist); text-decoration: none; padding: 12px 0; border-bottom: 2px solid transparent; }
.nav-links > a:not(.btn):hover { color: var(--bone); }
.nav-links > a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--fake); }
.nav-links .btn { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; height: 44px; padding: 0 18px; }
.nav-links form { margin: 0; }
.team-chip { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border: 1px solid var(--trace); color: var(--mist); }
.team-chip::before { content: ""; width: 8px; height: 8px; background: var(--real); }
.team-chip.is-admin::before { background: transparent; border: 1px solid var(--bone); }
.nav-logout { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--cendre); background: none; border: 0; padding: 12px 0; cursor: pointer; }
.nav-logout:hover { color: var(--bone); }

/* --- Pied de page -------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--trace); }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--pad-x);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cendre);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.footer-links a { color: var(--mist); text-decoration: none; padding: 12px 0; }
.footer-links a:hover { color: var(--bone); }
.footer-note { flex-basis: 100%; margin: 8px 0 0; text-transform: none; letter-spacing: 0.02em; line-height: 1.6; }

/* --- Mise en page --------------------------------------------------------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad-x); width: 100%; }
.page {
  max-width: var(--max); width: 100%; margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--pad-x) 96px;
  display: flex; flex-direction: column; gap: 56px;
}
.page-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px 64px;
  border-bottom: 1px solid var(--trace); padding-bottom: 40px;
}
.page-head .titles { display: flex; flex-direction: column; gap: 20px; }
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.split-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.split-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.breadcrumb { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cendre); margin: 0; }
.breadcrumb a { color: var(--mist); text-decoration: none; }
.breadcrumb a:hover { color: var(--bone); }

/* Grille de cellules séparées par des filets de 2 px */
.cells {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 2px; background: var(--trace); border: 1px solid var(--trace);
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
}
.cells > * { background: var(--ink); padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; margin: 0; }
.cells dd { margin: 0; }
.cell-value { font-size: 18px; font-weight: 700; }
.cell-value-mono { font-family: var(--mono); font-size: 26px; font-weight: 700; letter-spacing: 0.04em; line-height: 1.2; }
.cell-value-mono.is-fake { color: var(--fake); }
.cell-note { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--cendre); }
.cells-wide { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.cells-wide > li { padding: 32px; gap: 20px; min-height: 240px; }
.cells-wide h3 { font-size: 32px; font-weight: 900; font-stretch: 125%; letter-spacing: -0.01em; }
.cells-wide p { margin: 0; font-size: 17px; color: var(--mist); }

/* Panneaux (encadrés latéraux) */
.panel { border: 1px solid var(--trace); }
.panel-filled { background: var(--graphite); }
.panel-head { margin: 0; padding: 16px 20px; border-bottom: 1px solid var(--trace); font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cendre); display: flex; justify-content: space-between; gap: 12px; }
.panel-body { padding: 20px; }
.panel-body > :last-child { margin-bottom: 0; }
.panel-danger { border-color: var(--fake); }

/* --- Motif D : métadonnées avec filet pointillé --------------------------- */
.meta { margin: 0; display: flex; flex-direction: column; gap: 14px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.meta > div { display: flex; gap: 12px; align-items: baseline; }
.meta dt { flex: 1 0 auto; display: flex; gap: 12px; align-items: baseline; color: var(--cendre); }
.meta dt::after { content: ""; flex: 1; min-width: 16px; border-bottom: 1px dotted var(--trace); }
.meta dd { margin: 0; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.meta .as-is { text-transform: none; letter-spacing: 0.02em; }
.meta .is-fake { color: var(--fake); }
.meta .is-real { color: var(--real); }

/* --- Motif C : barre de verdict ------------------------------------------ */
.verdict { display: flex; height: 8px; gap: 3px; }
.verdict .r { background: var(--real); }
.verdict .f { background: var(--fake); }
.verdict-hero .r { flex: 6; }
.verdict-hero .f { flex: 94; }
.quota-bar { display: flex; gap: 4px; height: 12px; margin-top: 8px; }
.quota-bar span { flex: 1; border: 1px solid var(--trace); }
.quota-bar span.used { background: var(--real); border-color: var(--real); }
.scorebar { display: block; width: 100%; max-width: 200px; height: 4px; margin-top: 8px; }
.scorebar .track { fill: var(--trace); }
.scorebar .fill { fill: var(--bone); }

/* --- Accueil -------------------------------------------------------------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(48px, 6vw, 88px) var(--pad-x) clamp(56px, 6vw, 96px);
  display: flex; flex-wrap: wrap; gap: 64px; align-items: stretch;
}
.hero-main { flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.hero-main .stack { gap: 32px; }
.hero-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cendre); }
.live { color: var(--real); }
.live::before { content: "● "; }
.hero .display .frame { margin-top: 0.12em; }

/* Visuel : spécimen analysé (motif B, carte de chaleur) */
.specimen { flex: 0 1 400px; align-self: flex-start; min-width: 0; margin: 0; display: flex; flex-direction: column; border: 1px solid var(--trace); background: var(--graphite); }
.specimen-img { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: repeating-linear-gradient(0deg, var(--graphite) 0 3px, var(--graphite-2) 3px 4px); }
.specimen-note { position: absolute; top: 16px; left: 16px; z-index: 2; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--cendre); }
.heatmap { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 2px; padding: 2px; }
.hm-0 { background: rgba(92, 200, 255, 0.05); }
.hm-2 { background: rgba(255, 107, 44, 0.28); }
.hm-3 { background: rgba(255, 107, 44, 0.43); }
.hm-4 { background: rgba(255, 107, 44, 0.57); }
.hm-5 { background: rgba(255, 107, 44, 0.71); }
.hm-6 { background: rgba(255, 107, 44, 0.85); }
.specimen-box { position: absolute; left: 42%; top: 17%; width: 40%; height: 28%; --cl: 24px; --ct: 4px; padding: 0; }
.specimen-box .tag { position: absolute; bottom: 100%; left: 0; }
.specimen figcaption { padding: 16px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--trace); }
.specimen-caption { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; }

/* Bandeau défilant (statique) */
.band { border-top: 1px solid var(--trace); border-bottom: 1px solid var(--trace); overflow: hidden; white-space: nowrap; padding: 18px 0; font-family: var(--mono); font-size: 14px; letter-spacing: 0.12em; color: var(--cendre); }
.band span { padding-left: 24px; }
.band b { color: var(--fake); font-weight: 400; }

/* Sections numérotées */
.section { border-top: 1px solid var(--trace); scroll-margin-top: 80px; }
.section-flush { border-top: 0; }
.section-inner { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 7vw, 104px) var(--pad-x); display: flex; flex-direction: column; gap: 48px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 64px; }
.section-head .titles { display: flex; flex-direction: column; gap: 16px; }
.section-head > p { margin: 0; max-width: 480px; font-size: 18px; color: var(--mist); }
.section-body { max-width: 820px; color: var(--mist); }
.section-body strong { color: var(--bone); }

/* Calendrier */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 32px 24px; }
.timeline li { display: flex; flex-direction: column; gap: 14px; border-top: 2px solid var(--trace); padding-top: 20px; }
.timeline li.is-current { border-top-color: var(--fake); }
.timeline .when { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.timeline h3 { font-size: 22px; font-weight: 800; font-stretch: 112%; }
.timeline p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--cendre); }

/* Règles */
.rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--trace); counter-reset: rule; }
.rules li { counter-increment: rule; display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--trace); color: var(--mist); }
.rules li::before { content: counter(rule, decimal-leading-zero); font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--fake); padding-top: 0.25em; }
.rules strong { color: var(--bone); }

/* Évaluation : blocs numérotés pleine largeur */
.eval-block { display: flex; flex-direction: column; gap: 20px; }
.subhead { margin: 0; display: flex; align-items: baseline; gap: 16px; }
.subhead .n { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--fake); }
.subhead .t { font-size: 24px; font-weight: 800; font-stretch: 112%; line-height: 1.15; }
.eval-intro { margin: 0; max-width: 720px; color: var(--mist); }

/* Barre de pondération : même langage que la barre de verdict */
.weights { display: flex; gap: 3px; height: 8px; }
.weights .w-a { flex: 40; background: var(--real); }
.weights .w-b { flex: 40; background: var(--fake); }
.weights .w-c { flex: 20; background: var(--bone); }
.swatch { display: inline-block; width: 8px; height: 8px; margin-right: 10px; }
.swatch-a { background: var(--real); }
.swatch-b { background: var(--fake); }
.swatch-c { background: var(--bone); }

.criteria-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.criteria-weight { font-family: var(--mono); font-size: 26px; font-weight: 700; letter-spacing: 0.04em; line-height: 1; }
.criteria-title { margin: 0; font-size: 28px; font-weight: 900; font-stretch: 125%; letter-spacing: -0.01em; line-height: 1.1; }
.cells-wide p.criteria-how { padding-top: 16px; border-top: 1px dotted var(--trace); font-size: 15px; color: var(--cendre); }
.groups > li { min-height: 0; gap: 14px; }
.groups .criteria-title { font-size: 24px; }
.eval-block[id] { scroll-margin-top: 96px; }

/* Données : taxonomie des erreurs fake0…fake7 */
.taxonomy { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.taxonomy > li { padding: 24px; gap: 10px; }
.taxonomy .code-tag { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--fake); }
.taxonomy h4 { margin: 0; font-size: 22px; font-weight: 800; font-stretch: 112%; line-height: 1.15; }
.taxonomy p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--mist); }

/* Format : description des colonnes */
.fields { margin: 0; border-top: 1px solid var(--trace); }
.fields > div { display: grid; grid-template-columns: minmax(130px, 180px) 1fr; gap: 8px 20px; padding: 16px 0; border-bottom: 1px solid var(--trace); }
.fields dt { display: flex; flex-wrap: wrap; align-items: baseline; align-content: flex-start; gap: 8px 6px; }
.grid-2 > .panel-filled { align-self: start; }
.tag.as-is { text-transform: none; }
.fields dt .label { flex-basis: 100%; }
.fields dd { margin: 0; color: var(--mist); }
@media (max-width: 520px) { .fields > div { grid-template-columns: 1fr; } }
.groups .tag { align-self: flex-start; }

.formula { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 20px 24px; background: var(--graphite); border: 1px solid var(--trace); }
.formula code { background: none; padding: 0; font-size: clamp(15px, 1.7vw, 20px); color: var(--bone); letter-spacing: 0.02em; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); column-gap: 48px; border-top: 1px solid var(--trace); }
.checklist li { position: relative; padding: 16px 0 16px 22px; border-bottom: 1px solid var(--trace); color: var(--mist); }
.checklist li::before { content: ""; position: absolute; left: 0; top: calc(16px + 0.55em); width: 8px; height: 8px; background: var(--real); }
.checklist li.is-warn::before { background: transparent; border: 1px solid var(--fake); }
.checklist li.is-warn { color: var(--bone); }

/* FAQ */
.faq { border-top: 1px solid var(--trace); }
.faq:last-of-type { border-bottom: 1px solid var(--trace); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 22px 0; font-size: 20px; font-weight: 800; font-stretch: 112%; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-weight: 500; color: var(--fake); }
.faq[open] summary::after { content: "−"; }
.faq p { margin: 0 0 22px; max-width: 720px; color: var(--mist); }

/* Bloc de code (format attendu) */
.codeblock { margin: 0; padding: 20px; font-family: var(--mono); font-size: 14px; line-height: 1.7; color: var(--bone); white-space: pre-wrap; overflow-wrap: anywhere; }
.codeblock-sm { font-size: 12px; }
.codeblock .c-h { color: var(--cendre); }
.codeblock .c-f { color: var(--fake); }
.codeblock .c-r { color: var(--real); }
.panel-list { margin: 0; padding: 0 20px 20px 38px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.5; color: var(--mist); }

/* Appel final */
.cta-band { background: var(--fake); color: var(--ink); }
.cta-inner { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 8vw, 120px) var(--pad-x); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 40px; }
.cta-kicker { font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.cta-big { margin: 0; font-size: clamp(64px, 10vw, 152px); font-weight: 900; font-stretch: 125%; line-height: 0.85; letter-spacing: -0.03em; }
.cta-band :focus-visible { outline-color: var(--ink); }

/* --- Tableaux -------------------------------------------------------------- */
.table-wrap { position: relative; border: 1px solid var(--trace); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th, .table td { padding: 18px 20px; border-bottom: 1px solid var(--trace); text-align: left; vertical-align: middle; }
.table thead th { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cendre); white-space: nowrap; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover { background: var(--graphite); }
.table tbody th { font-weight: 700; }
.table tbody th a { color: var(--bone); text-decoration: none; }
.table tbody th a:hover { color: var(--real); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .mono-cell { font-family: var(--mono); font-size: 14px; letter-spacing: 0.04em; white-space: nowrap; }
.table .score { font-family: var(--mono); font-size: 16px; font-weight: 700; }
.table .filename { font-family: var(--mono); font-size: 14px; min-width: 150px; max-width: 280px; overflow-wrap: anywhere; color: var(--mist); }
.table .details { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--cendre); min-width: 170px; }
.table .rank { font-family: var(--mono); font-weight: 700; color: var(--cendre); width: 64px; }
.table tr.is-me > :first-child { box-shadow: inset 3px 0 0 var(--real); }
.table tr.unranked { color: var(--cendre); }
.leader .frame { --cl: 8px; --ct: 2px; padding: 4px 8px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.row-actions form { margin: 0; }

/* Classement vide : squelette + message */
.skeleton { height: 10px; background: var(--graphite-2); }
.sk-20 { width: 20px; } .sk-40 { width: 40px; } .sk-80 { width: 80px; } .sk-110 { width: 110px; }
.sk-140 { width: 140px; } .sk-160 { width: 160px; } .sk-180 { width: 180px; } .sk-200 { width: 200px; }
.board-overlay { position: absolute; inset: 49px 0 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(11, 13, 18, 0.72); text-align: center; padding: 24px; }
.board-overlay p { margin: 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 900; font-stretch: 125%; }

/* Bascule tableau / évolution */
.toggle { display: inline-flex; border: 1px solid var(--trace); }
.toggle button { height: 44px; padding: 0 18px; border: 0; background: transparent; color: var(--mist); font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.toggle button + button { border-left: 1px solid var(--trace); }
.toggle button:hover { color: var(--bone); }
.toggle button[aria-selected="true"] { background: var(--bone); color: var(--ink); }

/* --- Graphique d'évolution (monochrome : la couleur garde son sens) ------- */
.chart-box { border: 1px solid var(--trace); padding: 24px 20px 20px; }
.chart { position: relative; min-height: 340px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart svg:focus { outline: none; }
.chart svg:focus-visible { outline: 2px solid var(--real); outline-offset: 4px; }
.chart text { font-family: var(--mono); }
.chart .tick { font-size: 11px; letter-spacing: 0.06em; fill: var(--cendre); }
.chart .end-label { font-size: 12px; letter-spacing: 0.06em; fill: var(--bone); }
.chart .leader-tag { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; fill: var(--ink); }
.chart-empty { padding-top: 120px; text-align: center; color: var(--cendre); }
.chart-tooltip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 220px; max-width: 320px;
  background: var(--graphite); border: 1px solid var(--trace); padding: 12px 14px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
}
.chart-tooltip[hidden] { display: none; }
.tt-day { margin-bottom: 8px; color: var(--cendre); text-transform: uppercase; letter-spacing: 0.1em; }
.tt-row { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 2px 0; color: var(--cendre); }
.tt-row.is-on { color: var(--bone); }
.tt-value { font-weight: 700; text-align: right; color: var(--bone); font-variant-numeric: tabular-nums; }
.tt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-new { color: var(--real); }
.tt-more { margin-top: 6px; color: var(--cendre); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.legend-item {
  display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px;
  border: 1px solid var(--trace); background: transparent; color: var(--cendre); cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.legend-item::before { content: ""; width: 14px; height: 2px; background: var(--cendre); opacity: 0.5; }
.legend-item:hover { color: var(--bone); }
.legend-item[aria-pressed="true"] { color: var(--bone); border-color: var(--bone); }
.legend-item[aria-pressed="true"]::before { background: var(--bone); opacity: 1; }
.legend-rank { color: var(--cendre); }

/* --- Formulaires ----------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mist); }
input[type="text"], input[type="password"], textarea, select {
  width: 100%; height: 52px; padding: 0 16px;
  background: var(--graphite); color: var(--bone);
  border: 1px solid var(--trace); border-bottom: 2px solid var(--bone); border-radius: 0;
  font-family: var(--sans); font-size: 16px;
}
textarea { height: auto; padding: 16px; line-height: 1.5; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--real); outline-offset: 0; border-bottom-color: var(--real); }
::placeholder { color: var(--cendre); opacity: 1; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.filters .field { min-width: 220px; }

fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.step-legend { padding: 0; margin-bottom: 20px; display: flex; align-items: baseline; gap: 16px; }
.step-legend .n { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--fake); }
.step-legend .t { font-size: 24px; font-weight: 800; font-stretch: 112%; }
.step-help { margin: -8px 0 16px; font-size: 16px; color: var(--cendre); }

/* Zone de dépôt : cadre de détection + trame de balayage */
.dropzone {
  --cl: 22px; --ct: 3px;
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  min-height: 240px; padding: 32px; text-align: center; cursor: pointer;
  border: 1px dashed var(--cendre);
  background:
    linear-gradient(var(--fake), var(--fake)) top left / var(--cl) var(--ct) no-repeat,
    linear-gradient(var(--fake), var(--fake)) top left / var(--ct) var(--cl) no-repeat,
    linear-gradient(var(--fake), var(--fake)) top right / var(--cl) var(--ct) no-repeat,
    linear-gradient(var(--fake), var(--fake)) top right / var(--ct) var(--cl) no-repeat,
    linear-gradient(var(--fake), var(--fake)) bottom left / var(--cl) var(--ct) no-repeat,
    linear-gradient(var(--fake), var(--fake)) bottom left / var(--ct) var(--cl) no-repeat,
    linear-gradient(var(--fake), var(--fake)) bottom right / var(--cl) var(--ct) no-repeat,
    linear-gradient(var(--fake), var(--fake)) bottom right / var(--ct) var(--cl) no-repeat,
    repeating-linear-gradient(0deg, var(--ink) 0 3px, var(--scan) 3px 4px);
  background-origin: border-box;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--bone); }
.dropzone:focus-within { outline: 2px solid var(--real); outline-offset: 3px; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone svg { stroke: var(--bone); }
.dropzone-title { font-size: 22px; font-weight: 800; font-stretch: 112%; }
.dropzone-hint { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cendre); }
.dropzone-hint u { color: var(--real); }
.dropzone-file { font-family: var(--mono); font-size: 14px; letter-spacing: 0.04em; color: var(--bone); }
.dropzone-file:empty { display: none; }

.check-result { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.check-result:empty { display: none; }
.check-result ul { margin: 0; padding-left: 20px; color: var(--mist); font-size: 16px; }
.check-result p { margin: 0; font-size: 16px; color: var(--mist); }
.submit-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; border-top: 1px solid var(--trace); padding-top: 32px; }

/* Historique (colonne latérale) */
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 20px; border-bottom: 1px solid var(--trace); }
.history li:last-child { border-bottom: 0; }
.history .h-day { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cendre); }
.history .h-score { font-family: var(--mono); font-size: 18px; font-weight: 700; text-align: right; }
.history .h-file { font-family: var(--mono); font-size: 12px; color: var(--cendre); overflow-wrap: anywhere; }
.history .h-tags { display: flex; gap: 6px; justify-content: flex-end; }

/* --- Messages --------------------------------------------------------------- */
.flashes { display: flex; flex-direction: column; gap: 8px; max-width: var(--max); width: 100%; margin: 24px auto 0; padding: 0 var(--pad-x); }
.alert { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border: 1px solid var(--trace); background: var(--graphite); font-size: 16px; }
.alert::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 0.5em; background: var(--cendre); }
.alert-success { border-color: var(--real); }
.alert-success::before { background: var(--real); }
.alert-error { border-color: var(--fake); }
.alert-error::before { background: var(--fake); }
.alert-warning { border-color: var(--fake); }
.alert-warning::before { background: transparent; border: 1px solid var(--fake); }
.alert p { margin: 0; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.alert-body { display: flex; flex-direction: column; gap: 4px; }

/* --- Authentification ------------------------------------------------------- */
.auth { width: 100%; max-width: 520px; margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--pad-x); display: flex; flex-direction: column; gap: 28px; }
.auth .h1 { font-size: clamp(40px, 5vw, 64px); }

/* --- Pages légales ------------------------------------------------------------ */
.prose { max-width: 820px; }
.prose h2 { margin: 2em 0 0.6em; font-size: 24px; font-weight: 800; font-stretch: 112%; }
.prose p, .prose li { color: var(--mist); font-size: 17px; }
.prose strong { color: var(--bone); }
.prose .table-wrap { margin: 0 0 1em; }

/* Contenus à compléter (à retirer avant la mise en ligne) */
.todo {
  outline: 1px dashed var(--cendre); outline-offset: 3px;
  background: repeating-linear-gradient(135deg, rgba(154, 160, 171, 0.1) 0 8px, transparent 8px 16px);
}
div.todo, p.todo { padding: 14px 18px; }
div.todo > :last-child { margin-bottom: 0; }

/* --- Responsive, impression, préférences ----------------------------------- */
@media (max-width: 1100px) {
  .specimen { flex: 1 1 100%; max-width: 560px; }
}
@media (max-width: 760px) {
  .site-header { position: static; }
  .nav { padding: 14px var(--pad-x); gap: 8px 20px; }
  .nav-links { gap: 0 20px; }
  .table th, .table td { padding: 14px 12px; }
  .hero { gap: 40px; }
  .inline-form { grid-template-columns: 1fr; }
  .rules li { grid-template-columns: 40px 1fr; }
}

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .table-wrap, .table th, .table td { border-color: #999; }
  .table thead th { color: #333; }
  code { background: none; color: #000; }
}

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

/* Couleurs de sens, hors listes de métadonnées */
.is-real { color: var(--real); }
.is-fake { color: var(--fake); }
.chart-box .section-head { margin-bottom: 28px; }
.check-result { align-items: flex-start; }
.form[data-submit-form] { gap: 48px; }
