/* ============================================================
   VOLT & VOIE — Design Tokens
   Tendances Web Design 2026 : couleurs light + dark natif,
   typographie fluide clamp(), spacing 4px, variable fonts.
   ============================================================ */

:root {
  /* ---------- Typographie fluide (clamp) — accessibilité rem ---------- */
  --text-xs:   clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);  /* 12 → 14 */
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);     /* 14 → 16 */
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);    /* 16 → 18 */
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw, 1.5rem);     /* 18 → 24 */
  --text-xl:   clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);    /* 24 → 36 */
  --text-2xl:  clamp(2rem, 1.2rem + 2.5vw, 3.5rem);        /* 32 → 56 */
  --text-3xl:  clamp(2.5rem, 1rem + 4vw, 5rem);            /* 40 → 80 */
  --text-hero: clamp(3rem, 0.5rem + 7vw, 8rem);            /* 48 → 128 */

  /* ---------- Espacement 4px ---------- */
  --space-1: 0.25rem;  --space-2: 0.5rem;   --space-3: 0.75rem;
  --space-4: 1rem;     --space-5: 1.25rem;  --space-6: 1.5rem;
  --space-8: 2rem;     --space-10: 2.5rem;  --space-12: 3rem;
  --space-16: 4rem;    --space-20: 5rem;    --space-24: 6rem;
  --space-32: 8rem;

  /* ---------- Rayons ---------- */
  --radius-sm: 0.5rem;  --radius-md: 0.75rem; --radius-lg: 1rem;
  --radius-xl: 1.5rem;  --radius-2xl: 2rem;   --radius-full: 9999px;

  /* ---------- Transitions / easing ---------- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* ---------- Largeurs de contenu ---------- */
  --content-narrow: 680px;
  --content-default: 1024px;
  --content-wide: 1280px;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  /* ---------- Familles de polices (variable fonts) ---------- */
  --font-display: 'Satoshi', 'General Sans', system-ui, sans-serif;
  --font-body: 'General Sans', 'Inter', system-ui, sans-serif;

  /* ---------- color-scheme natif ---------- */
  color-scheme: light dark;
}

/* ============================================================
   PALETTE — MODE CLAIR (light)
   Vert-émeraude électrique = énergie & éco-mobilité.
   ============================================================ */
:root,
[data-theme='light'] {
  --color-bg: #F5F7F9;
  --color-surface: #ffffff;
  --color-surface-2: #EEF2F5;
  --color-surface-offset: #E6EBEF;
  --color-divider: #DBE1E6;
  --color-border: #CBD3DA;

  --color-text: #14202A;
  --color-text-muted: #54616B;
  --color-text-faint: #8B97A1;
  --color-text-inverse: #F4F8FA;

  /* Accent primaire — Émeraude Volt */
  --color-primary: #1668B3;
  --color-primary-hover: #12568F;
  --color-primary-active: #0E456F;
  --color-primary-soft: #DBE9F8;

  /* Accent signal — Rouge INSQ (CTA / surbrillance) */
  --color-signal: #E01820;
  --color-signal-strong: #B81219;
  --color-signal-text: #ffffff;

  /* Verre liquide (light) */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: 0 8px 32px rgba(15, 30, 45, 0.10);

  /* Ombres ton-adaptées */
  --shadow-sm: 0 1px 2px rgba(15, 30, 45, 0.06);
  --shadow-md: 0 6px 18px rgba(15, 30, 45, 0.09);
  --shadow-lg: 0 18px 48px rgba(15, 30, 45, 0.14);

  /* Dégradé héros */
  --grad-hero: linear-gradient(135deg in oklab, #1668B3, #2E8BD8 60%, #5FB0E8);
}

/* ============================================================
   PALETTE — DARK MODE NATIF
   Gris foncés (pas de noir pur), accents légèrement désaturés.
   ============================================================ */
[data-theme='dark'] {
  --color-bg: #0C1418;
  --color-surface: #131C21;
  --color-surface-2: #18232A;
  --color-surface-offset: #1E2A31;
  --color-divider: #243139;
  --color-border: #314049;

  --color-text: #E3EAEE;
  --color-text-muted: #93A2AC;
  --color-text-faint: #647079;
  --color-text-inverse: #0C1418;

  --color-primary: #4AA3E8;
  --color-primary-hover: #6BB6EE;
  --color-primary-active: #3690D8;
  --color-primary-soft: #0E2E4A;

  --color-signal: #FF4438;
  --color-signal-strong: #E0291F;
  --color-signal-text: #ffffff;

  --glass-bg: rgba(22, 32, 42, 0.55);
  --glass-border: rgba(120, 150, 178, 0.18);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);

  --grad-hero: linear-gradient(135deg in oklab, #0E456F, #2E8BD8 55%, #5FB0E8);
}

/* Préférence système si l'utilisateur n'a pas basculé manuellement */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0C1418;
    --color-surface: #131C21;
    --color-surface-2: #18232A;
    --color-surface-offset: #1E2A31;
    --color-divider: #243139;
    --color-border: #314049;
    --color-text: #E3EAEE;
    --color-text-muted: #93A2AC;
    --color-text-faint: #647079;
    --color-text-inverse: #0C1418;
    --color-primary: #4AA3E8;
    --color-primary-hover: #6BB6EE;
    --color-primary-active: #3690D8;
    --color-primary-soft: #0E2E4A;
    --color-signal: #FF4438;
    --color-signal-strong: #E0291F;
    --color-signal-text: #ffffff;
    --glass-bg: rgba(22, 32, 42, 0.55);
    --glass-border: rgba(120, 150, 178, 0.18);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5);
    --grad-hero: linear-gradient(135deg in oklab, #0E456F, #2E8BD8 55%, #5FB0E8);
  }
}
