/* ═══════════════════════════════════════════════════════════════════════════
   brief-forge — charte graphique de l'outil (lot W-8, 2026-09-14)

   Dérivée du site Netlinea 2026 (netlinea-front @ c397f95, Tailwind v4).
   CHAQUE hex ci-dessous vient de charte/mesure-netlinea.json, avec sa source
   — le témoin T1 refuse tout hex orphelin. Sombre seul (A15). Aucun
   framework, aucune importation, aucune url() hors ../fonts/ (T2). Pas
   d'animation, pas de vidéo : les questions priment sur le décor.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── A14 — Geist auto-hébergée (copiée du site, latin, 100-900) ─────────── */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/Geist[wght].woff2") format("woff2");
}

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  /* couleurs — mesure-netlinea.json § couleurs */
  --fond: #020618;             /* slate-950 */
  --fond-carte: #0f172b;       /* slate-900 */
  --bord: #1d293d;             /* slate-800 */
  --texte: #f8fafc;            /* slate-50 */
  --etiquette: #e2e8f0;        /* slate-200 */
  --texte-clair: #cad5e2;      /* slate-300 */
  --texte-secondaire: #90a1b9; /* slate-400 */
  --accent: #00bb7f;           /* emerald-500 — repli hex de Tailwind v4, pas la valeur « connue » de v3 */
  --accent-vif: #00d294;       /* emerald-400 */
  --erreur: #fb2c36;           /* red-500 */
  --blanc: #ffffff;            /* white */
  --texte-sur-accent: #020618; /* slate-950 sur emerald-500 : ≈ 8:1 ; jamais blanc (≈ 2,5:1) */
  /* dérivés — aucune nouvelle couleur : blanc à 8 % (ContactForm.tsx:116 border-white/8) */
  --bord-champ: color-mix(in srgb, var(--blanc) 8%, transparent);

  /* rayons — mesure-netlinea.json § rayons */
  --rayon-carte: 0.75rem;   /* rounded-xl */
  --rayon-champ: 0.5rem;    /* rounded-lg */
  --rayon-bouton: 9999px;   /* rounded-full */

  /* fonte — A14 : Geist, repli system-ui */
  --fonte: "Geist", system-ui, sans-serif;

  /* typographie — mesure-netlinea.json § typographie */
  --espace-titre: -0.025em;      /* tracking-tight */
  --espace-etiquette: 0.1em;     /* tracking-widest */

  /* rythme */
  --marge: 1rem;
  --largeur-lecture: 44rem;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; background: var(--fond); }
body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--fonte);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 700; letter-spacing: var(--espace-titre); line-height: 1.2; margin: 0; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
p { margin: 0; }
a { color: var(--accent-vif); text-decoration: underline; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Structure ──────────────────────────────────────────────────────────── */
.page {
  max-width: var(--largeur-lecture);
  margin: 0 auto;
  padding: calc(var(--marge) * 2) var(--marge) calc(var(--marge) * 4);
  display: flex;
  flex-direction: column;
  gap: calc(var(--marge) * 1.5);
}
.formulaire { display: flex; flex-direction: column; gap: calc(var(--marge) * 1.5); }
.page--centre {
  min-height: 100vh;
  justify-content: center;
  max-width: 28rem;
}

/* A16 — le mot-symbole est du texte : Header.tsx:32 text-xl font-semibold text-white tracking-tight */
.mot-symbole {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: var(--espace-titre);
  color: var(--blanc);
  text-transform: lowercase;
}

.en-tete { display: flex; flex-direction: column; gap: 0.5rem; }
.en-tete__salve { color: var(--texte-secondaire); }
.etiquette-majuscule {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--espace-etiquette);
  color: var(--accent);
}
.phrase { color: var(--texte-secondaire); }

/* ── Carte ──────────────────────────────────────────────────────────────── */
.carte {
  background: var(--fond-carte);
  border: 1px solid var(--bord);
  border-radius: var(--rayon-carte);
  padding: calc(var(--marge) * 1.5);
  display: flex;
  flex-direction: column;
  gap: var(--marge);
}

/* ── Question — numéro + texte, puis options, champ libre, origine ──────── */
.question { }
.question__titre { display: flex; gap: 0.75rem; align-items: baseline; }
.question-numero {
  flex: none;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: var(--espace-etiquette);
  font-size: 0.875rem;
}
.question__texte { font-size: 1.125rem; font-weight: 600; color: var(--texte); }
.question__aide { color: var(--texte-secondaire); font-size: 0.875rem; }

/* ── Champs — ContactForm.tsx:116 ───────────────────────────────────────── */
.etiquette {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--etiquette);
  margin-bottom: 0.5rem;
}
.etiquette .requis { color: var(--accent); margin-left: 0.25rem; }
.champ, .champ-libre {
  display: block;
  width: 100%;
  background: var(--fond-carte);
  color: var(--texte);
  border: 1px solid var(--bord-champ);
  border-radius: var(--rayon-champ);
  padding: 1rem;
  font: inherit;
  line-height: 1.5;
}
.champ::placeholder, .champ-libre::placeholder { color: var(--texte-secondaire); }
.champ:focus, .champ-libre:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.champ-libre { min-height: 7rem; resize: vertical; }

/* A10 — le champ du code : monospace, capitales, espacé */
.code {
  font-family: ui-monospace, "Geist Mono", monospace;
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
}

/* ── Choix — radios et cases ────────────────────────────────────────────── */
.choix { display: flex; flex-direction: column; gap: 0.5rem; }
.choix__ligne { display: flex; align-items: center; gap: 0.75rem; color: var(--texte-clair); cursor: pointer; }
.choix__ligne input { accent-color: var(--accent); width: 1.125rem; height: 1.125rem; margin: 0; flex: none; }
.choix__precision { margin-top: 0.5rem; }

/* E8 / A23 — une case « c'est un conseil qu'on m'a donné », jamais « une mesure » */
.origine {
  border-top: 1px solid var(--bord);
  padding-top: var(--marge);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
/* A23 — « De qui ? » ne se révèle que si la case est cochée : CSS pur, zéro script */
.origine .choix__precision { display: none; }
.origine:has(input:checked) .choix__precision { display: block; }

/* E10 — « Ce que nous avons mesuré : … » + « ce n'est pas ce que je constate » */
.mesure-contredite {
  border-left: 3px solid var(--accent);
  padding-left: var(--marge);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.mesure-contredite__titre { font-size: 0.875rem; font-weight: 600; color: var(--etiquette); }
.mesure-valeur { color: var(--texte-clair); }
.mesure-valeur small { display: block; color: var(--texte-secondaire); font-size: 0.8125rem; }

/* E14 — une question en images : deux figures, une radio par option */
.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--marge);
}
.option {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--bord);
  border-radius: var(--rayon-champ);
  padding: 0.75rem;
  cursor: pointer;
}
.option:has(input:checked) { border-color: var(--accent); }
.option figure { margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.option img { display: block; width: 100%; height: auto; border-radius: calc(var(--rayon-champ) - 2px); background: var(--fond); }
.option figcaption { color: var(--texte-clair); font-size: 0.875rem; }
.option__choix { display: flex; align-items: center; gap: 0.5rem; color: var(--texte); font-weight: 600; }
.option__choix input { accent-color: var(--accent); margin: 0; }

/* E13 bis — ce qui se répond après la maquette : on lit, on ne saisit pas */
.apres-maquette { border-style: dashed; gap: 0.75rem; }
.apres-maquette ol { margin: 0; padding-left: 1.25rem; color: var(--texte-clair); }
.question-differee { padding-left: 0.25rem; }

/* A6 — l'encart brouillon */
.encart { color: var(--texte-clair); font-size: 0.875rem; border: 1px dashed var(--bord); border-radius: var(--rayon-champ); padding: 0.75rem 1rem; }

/* ── Boutons — « rounded-full bg-emerald-500 text-slate-950 font-bold uppercase tracking-widest » ── */
.bouton-primaire {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--texte-sur-accent);
  border: 0;
  border-radius: var(--rayon-bouton);
  padding: 0.875rem 1.75rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--espace-etiquette);
  cursor: pointer;
}
.bouton-primaire:hover { background: var(--accent-vif); }
.bouton-primaire--large { width: 100%; }
.actions { display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; }

/* ── Messages ───────────────────────────────────────────────────────────── */
.erreur { color: var(--erreur); font-weight: 600; }
.accepte, .refuse { }
.refuse .erreur { font-weight: 400; }
.recu__chiffres { font-size: 1.25rem; font-weight: 700; letter-spacing: var(--espace-titre); }

/* Lecture seule aux yeux, présent pour les lecteurs d'écran */
.visuellement-cache {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

@media (min-width: 40rem) {
  h1 { font-size: 2.25rem; }
  .page { padding-top: calc(var(--marge) * 3); }
}
