/* ENDURIA — Design tokens (MASTER BRIEF v5 §3). Source de vérité. */

:root {
  /* ---- Couleurs (§3.1) ---- */
  --ink: #08090c;    /* fond principal, noir bleuté profond */
  --ink-2: #0f1116;  /* surfaces / cards */
  --ink-3: #161922;  /* surfaces élevées, hover */
  --paper: #f2f1ec;  /* texte principal, blanc cassé chaud */
  --fog: #9498a3;    /* texte secondaire */
  --faint: #565a66;  /* labels, légendes mono */
  --line: rgba(242, 241, 236, 0.08);
  --line-2: rgba(242, 241, 236, 0.15);

  /* Accent : VIOLET — choix client final (override du bleu du master brief §3.1) */
  --accent: #7c4fc9;
  --accent-2: #a78bfa;  /* violet clair, fin de dégradé / hovers */
  --halo: rgba(124, 79, 201, 0.18);
  --halo-2: rgba(167, 139, 250, 0.12);

  /* Sections "inversées" (respiration) — flippent avec le thème */
  --inv-bg: #f2f1ec;
  --inv-text: #0c0d10;
  --inv-fog: #55585f;
  --inv-line: rgba(12, 13, 16, 0.12);

  /* ---- Typographie (§3.2) ---- */
  /* DÉCISION (Figma "Enduria NEW") : Geist SemiBold est le display réel, déjà self-hosté.
     PP Neue Montreal reste en fallback historique au cas où on l'embarque plus tard. */
  --font-display: "Geist", "PP Neue Montreal", system-ui, sans-serif;
  /* Système typo unifié : Geist partout (display + body). Inter retiré pour homogénéité. */
  --font-body: "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
  --font-serif: "Instrument Serif", "EB Garamond", Georgia, serif;

  --t-hero: clamp(2.2rem, 4vw, 3.7rem); /* reduit (retour Theo : trop gros) */
  --t-h2: clamp(1.7rem, 3.1vw, 2.7rem);  /* titres de section reduits (retour Theo : trop gros) */
  --t-h3: clamp(1.2rem, 1.7vw, 1.5rem);
  --t-lead: 1.1rem;
  --t-body: 1.0625rem;
  --t-label: 0.78rem;
  --t-num: clamp(3.5rem, 8vw, 8rem);

  /* ---- Grille & espacements (§3.3) ---- */
  --ctn: min(92vw, 1360px);
  --s-section: clamp(7rem, 14vh, 11rem);
  --space-block: clamp(3rem, 6vh, 5rem);
  --gutter: 24px;
  --radius: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --radius-btn: 9px;       /* Primaire (Figma "Enduria NEW") */
  --radius-btn-sec: 6px;   /* Secondaire (Figma "Enduria NEW") */
  --radius-chip: 5px;      /* Chip chevron à l'intérieur du bouton primaire */

  /* ---- Boutons (Figma node 243:2 + CORRECTIONS_BOUTON §1-6) ----
     Dark = violet plein --accent + rim subtil + glow violet au hover.
     Light = noir #1b1b1b + rim discret + glow neutre au hover (override plus bas). */
  --btn-primary-bg: var(--accent);
  --btn-primary-fg: #ffffff;
  --btn-primary-border: rgba(255, 255, 255, 0.25);
  --btn-primary-bg-hover: #562c9e;             /* violet foncé Figma (BRIEF §2) */
  --btn-primary-glow: 0 0 32px -6px rgba(124, 79, 201, 0.55);
  --btn-primary-text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  --btn-chip-bg: #ffffff;
  --btn-chip-fg: var(--accent);

  /* Secondaire = transparent + bordure fine, radius 6 (tâche 2 inchangée) */
  --btn-secondary-fg: var(--paper);
  --btn-secondary-border: var(--line-2);
  --btn-secondary-fill-hover: rgba(242, 241, 236, 0.06);

  /* ---- Motion (§4.2) ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-reflect: cubic-bezier(0.6, 0.6, 0, 1); /* signature Reflect (spec Theo) */
  --dur-reflect: 0.45s;                          /* timing premium Reflect */
  --dur-micro: 0.3s;
  --dur-reveal: 0.9s;
  --dur-hero: 1.4s;
  --dur-count: 1.4s;

  /* ---- Alias de compatibilité (le code existant utilise ces noms) ---- */
  --bg-primary: var(--ink);
  --bg-elevated: var(--ink-2);
  --bg-inverted: var(--paper);
  --text-primary: var(--paper);
  --text-secondary: var(--fog);
  --text-tertiary: var(--faint);
  --text-on-light: var(--ink);
  --border-subtle: var(--line);
  --border-strong: var(--line-2);
  --accent-soft: var(--accent-2);
  --halo-indigo: var(--halo);
  --halo-violet: var(--halo-2);
  --container: var(--ctn);
  --space-section: var(--s-section);
  --radius-card: var(--radius-lg);
  --type-hero: var(--t-hero);
  --type-h2: var(--t-h2);
  --type-h3: var(--t-h3);
  --type-body: var(--t-body);
  --type-body-lg: var(--t-lead);
  --type-label: var(--t-label);
  --type-display-num: var(--t-num);
}

/* ---- Thème clair (toggle nav, Hero v2 §1) ---- */
[data-theme="light"] {
  --ink: #f4f2ec;
  --ink-2: #ffffff;
  --ink-3: #eceae3;
  --paper: #0c0d10;
  --fog: #55585f;
  --faint: #8a8d95;
  --line: rgba(12, 13, 16, 0.10);
  --line-2: rgba(12, 13, 16, 0.18);
  --halo: rgba(124, 79, 201, 0.10);
  --halo-2: rgba(167, 139, 250, 0.08);
  /* les sections de respiration deviennent sombres */
  --inv-bg: #0f1116;
  --inv-text: #f2f1ec;
  --inv-fog: #9498a3;
  --inv-line: rgba(244, 241, 236, 0.10);

  /* Boutons en light (Théo corrections §3) :
     primaire = NOIR #1b1b1b avec texte blanc, chip translucide, glow neutre sombre. */
  --btn-primary-bg: #1b1b1b;
  --btn-primary-fg: #ffffff;
  --btn-primary-border: rgba(255, 255, 255, 0.15);
  --btn-primary-bg-hover: #000000;
  --btn-primary-glow: 0 10px 28px -8px rgba(0, 0, 0, 0.45);
  --btn-primary-text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
  --btn-chip-bg: rgba(255, 255, 255, 0.18);
  --btn-chip-fg: #ffffff;

  --btn-secondary-fg: #1b1b1b;
  --btn-secondary-border: rgba(12, 13, 16, 0.16);
  --btn-secondary-fill-hover: rgba(12, 13, 16, 0.05);
}

/* ---- Anti-voile violet GLOBAL (BRIEF_FINITIONS_HERO §1) ----
   Initialement neutralisé en light seulement. Théo veut désormais le même rendu clean
   en DARK : zéro halo violet diffus en fond, le violet reste uniquement sur les éléments
   volontaires (USP du H1, boutons). Sources : body::before light-beam, .halo blobs,
   .bg-stars dots, text-shadow hero H1, halo .flow__node central. */
body::before { opacity: 0 !important; }
.halo { opacity: 0 !important; }
.bg-stars::after { opacity: 0 !important; }
.flow__node::before { opacity: 0; }
