/* ==========================================================================
   tokens.css — Système de jetons de design
   Identité : console d'analyse / centre de commandement / instrumentation RF
   ========================================================================== */

:root {
  /* --- Typographie ------------------------------------------------------ */
  --font-display: "Barlow Condensed", "Roboto Condensed", "Archivo Narrow",
    "Arial Narrow", "Helvetica Neue", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, "SF Mono",
    Consolas, "Liberation Mono", monospace;

  --fs-2xs: 0.6875rem;
  --fs-xs: 0.775rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;
  --fs-4xl: clamp(2.6rem, 6.5vw, 5.25rem);

  --lh-tight: 1.08;
  --lh-snug: 1.3;
  --lh-body: 1.66;

  --tracking-display: -0.015em;
  --tracking-wide: 0.08em;

  /* --- Espacement (échelle 4px) ----------------------------------------- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* --- Géométrie -------------------------------------------------------- */
  --radius-sm: 2px;
  --radius: 4px;
  --radius-lg: 8px;
  --border: 1px;
  --container: 1280px;
  --container-narrow: 78ch;
  --header-h: 62px;

  /* --- Mouvement -------------------------------------------------------- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 110ms;
  --dur: 200ms;

  --z-header: 100;
  --z-drawer: 200;
  --z-modal: 300;
}

/* ==========================================================================
   Thème sombre — console (thème par défaut)
   ========================================================================== */
:root,
[data-theme="dark"] {
  --bg: #0a1420;
  --bg-deep: #060d16;
  --surface: #0f1d2e;
  --surface-2: #16293d;
  --surface-3: #1d344b;
  --line: #23394f;
  --line-strong: #35536f;

  --text: #dce7f2;
  --text-strong: #f4f9ff;
  --muted: #8aa3bc;
  --faint: #5d7590;

  --accent: #38a3ff;
  --accent-soft: rgba(56, 163, 255, 0.14);
  --accent-line: rgba(56, 163, 255, 0.42);
  --accent-text: #7cc3ff;

  --signal: #ff9f1c;
  --signal-soft: rgba(255, 159, 28, 0.14);

  --ok: #3dd68c;
  --ok-soft: rgba(61, 214, 140, 0.14);
  --warn: #ffcc4d;
  --danger: #ff6b68;
  --danger-soft: rgba(255, 107, 104, 0.14);

  --graticule: rgba(56, 163, 255, 0.07);
  --shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
  --scrim: rgba(4, 10, 18, 0.82);

  color-scheme: dark;
}

/* ==========================================================================
   Thème clair — laboratoire
   ========================================================================== */
[data-theme="light"] {
  --bg: #eef2f6;
  --bg-deep: #e3eaf1;
  --surface: #ffffff;
  --surface-2: #f4f7fa;
  --surface-3: #e8eef4;
  --line: #ccd8e4;
  --line-strong: #9fb3c6;

  --text: #16283a;
  --text-strong: #08131f;
  --muted: #4d6377;
  --faint: #728ba1;

  --accent: #0a63c4;
  --accent-soft: rgba(10, 99, 196, 0.09);
  --accent-line: rgba(10, 99, 196, 0.35);
  --accent-text: #0a4f9e;

  --signal: #b35c00;
  --signal-soft: rgba(179, 92, 0, 0.1);

  --ok: #157a4f;
  --ok-soft: rgba(21, 122, 79, 0.1);
  --warn: #8a6100;
  --danger: #b3241f;
  --danger-soft: rgba(179, 36, 31, 0.1);

  --graticule: rgba(10, 99, 196, 0.07);
  --shadow: 0 8px 24px -20px rgba(8, 19, 31, 0.55);
  --scrim: rgba(238, 242, 246, 0.86);

  color-scheme: light;
}
