/* ==========================================================================
   MonReleveCarriere — source commune du système visuel (thème sombre)
   Couches : primitives → rôles sémantiques → composants (styles.css)
   Le rapport vit sur une surface claire : .paper redéfinit les rôles.
   ========================================================================== */
:root {
  color-scheme: dark;

  /* --- Primitives --- */
  --night-950: #10121A;
  --night-900: #181B27;
  --night-800: #202435;
  --night-700: #2A2F45;
  --night-600: #343A55;
  --night-400: #6A7299;
  --mist-100: #F2F3F8;
  --mist-300: #B4B9CF;
  --mist-500: #8F95B2;
  --peri-300: #B9BEFF;
  --peri-400: #8E97FF;
  --peri-500: #7780F5;
  --peri-900: #252A4A;
  --ink-on-accent: #0E1020;
  --paper-50: #FAF7F1;
  --paper-100: #F2EDE3;
  --paper-300: #DDD5C5;
  --paper-ink: #1F2230;
  --paper-ink-2: #585C6E;

  /* --- Rôles --- */
  --bg: var(--night-950);
  --bg-2: var(--night-900);            /* bandes alternées */
  --surface: var(--night-900);
  --surface-2: var(--night-800);
  --surface-hover: var(--night-700);
  --text: var(--mist-100);
  --text-2: var(--mist-300);
  --text-3: var(--mist-500);           /* légendes, métadonnées (≥ 4,5:1 sur les surfaces) */
  --accent: var(--peri-400);
  --accent-hover: var(--peri-300);
  --accent-active: var(--peri-500);
  --accent-soft: var(--peri-900);
  --on-accent: var(--ink-on-accent);
  --link: var(--peri-300);
  --line: #2B3046;                     /* séparateur */
  --line-control: var(--night-400);    /* bordure de champ ou de réponse, ≥ 3:1 */
  --focus: #D4D7FF;
  --halo: rgba(104, 110, 255, 0.30);

  --st-check: #F2C879;   --st-check-bg: #3A2F18;     /* À vérifier */
  --st-doc: #9DC4FF;     --st-doc-bg: #1B2B47;       /* À documenter */
  --st-miss: #C9B8FF;    --st-miss-bg: #2D2748;      /* Information manquante */
  --st-ok: #86DBAE;      --st-ok-bg: #16352A;        /* Concordant */
  --st-neutral: var(--mist-300); --st-neutral-bg: var(--night-700);
  --st-error: #FFA39C;   --st-error-bg: #3D1F22;     /* erreurs de formulaire */

  /* --- Typographie --- */
  --font: "Instrument Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --fs-body: 1.0625rem;        /* 17 px */
  --fs-small: 0.875rem;        /* 14 px */
  --fs-control: 1rem;
  --fs-lead: 1.1875rem;        /* 19 px */
  --fs-h3: 1.1875rem;
  --fs-h2: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem);    /* 26–38 */
  --fs-h1: clamp(2.125rem, 1rem + 4.4vw, 4.375rem);       /* 34–70 */
  --fs-h1-page: clamp(1.875rem, 1.3rem + 2.2vw, 3rem);    /* 30–48 */
  --fs-question: clamp(1.375rem, 1.15rem + 1vw, 1.75rem); /* 22–28 */
  --lh-body: 1.6;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600;

  /* --- Espacements --- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-12: 48px; --s-16: 64px; --s-24: 96px;

  /* --- Formes --- */
  --r-control: 10px;
  --r-surface: 14px;
  --r-large: 20px;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px rgba(0, 0, 0, 0.28);
  --shadow-paper: 0 24px 60px rgba(0, 0, 0, 0.45);

  /* --- Largeurs --- */
  --w-marketing: 1160px;
  --w-prose: 66ch;
  --w-quiz: 600px;
  --w-app: 1180px;
  --gutter: 20px;

  /* --- Mouvement --- */
  --t-fast: 150ms; --t-base: 200ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  /* --- Contrôles --- */
  --control-h: 48px;
  --answer-h: 58px;
  --target-min: 44px;
}
@media (min-width: 480px) { :root { --gutter: 24px; } }
@media (min-width: 1024px) { :root { --fs-body: 1.125rem; --gutter: 32px; } }
@media (prefers-reduced-motion: reduce) { :root { --t-fast: 0ms; --t-base: 0ms; } }

/* Surface « document » : le rapport, clair et chaud, dans un produit sombre */
.paper {
  color-scheme: light;
  --surface: var(--paper-50);
  --surface-2: var(--paper-100);
  --surface-hover: var(--paper-100);
  --bg-2: var(--paper-100);
  --text: var(--paper-ink);
  --text-2: var(--paper-ink-2);
  --text-3: #6B6F80;
  --line: var(--paper-300);
  --line-control: #8B8778;
  --accent: #3D46C2;
  --link: #3D46C2;
  --focus: #3D46C2;
  --st-check: #7A5208;   --st-check-bg: #F6E7C4;
  --st-doc: #1F4F8F;     --st-doc-bg: #DCE8F7;
  --st-miss: #51409A;    --st-miss-bg: #E6E0F6;
  --st-ok: #1F6B48;      --st-ok-bg: #DCEFE3;
  --st-neutral: var(--paper-ink-2); --st-neutral-bg: #E9E3D6;
  background: var(--surface);
  color: var(--text);
}
