/* =============================================================================
   Inaia Design System — Colors & Type
   La technologie au service du vivant.
   Noir dominant, accents ponctuels, hiérarchie par opacité.
   ============================================================================= */

/* Fonts — brand variable fonts (self-hosted) */
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/CormorantGaramond-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/CormorantGaramond-Italic-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-VariableFont_opsz_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Italic-VariableFont_opsz_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- Backgrounds ---------- */
  --bg-primary: #000000;              /* Fond dominant */
  --bg-surface: rgba(255,255,255,0.08);     /* Cartes, inputs */
  --bg-surface-hover: rgba(255,255,255,0.12);
  --bg-glass: rgba(255,255,255,0.18);       /* Nav, dropdowns */
  --bg-light: #FFFFFF;                /* Sections de rupture */
  --bg-light-alt: #F9F9F9;
  --bg-surface-light: #FAFAFA;        /* Gris léger sur fond blanc : cartes, blocs */

  /* ---------- Text on dark ---------- */
  --fg-on-dark-1: #FFFFFF;            /* Titres, primaire */
  --fg-on-dark-2: rgba(255, 255, 255, 0.6); /* Corps, descriptions */
  --fg-on-dark-3: rgba(255, 255, 255, 0.4); /* Métadonnées, labels */

  /* ---------- Text on light ---------- */
  --fg-on-light-1: #000000;
  --fg-on-light-2: rgba(0, 0, 0, 0.6);
  --fg-on-light-3: rgba(0, 0, 0, 0.3);

  /* ---------- Hairlines (filet fin via inset box-shadow, jamais CSS border) ----
     Valeur identique au --bg-glass : par design, un panneau flottant et son
     contour partagent la même opacité pour se fondre visuellement. */
  --hairline-dark: rgba(255,255,255,0.18);
  --hairline-light: rgba(0, 0, 0, 0.14);
  --shadow-border-dark: inset 0 0 0 1px var(--hairline-dark);
  --shadow-border-light: inset 0 0 0 1px var(--hairline-light);
  --shadow-dropdown: inset 0 0 0 1px var(--hairline-dark), 0 12px 32px rgba(0, 0, 0, 0.4);

  /* ---------- Accents (touches ponctuelles uniquement) ---------- */
  --accent-green: #14F500;            /* Vert — accent par défaut, sélection, validation */
  --accent-blue: #3B82F6;             /* Bleu — précision scientifique */
  --accent-rose: #FF2D87;             /* Rose — emphase */
  --accent-orange: #FF6B00;           /* Orange — accent secondaire */

  /* Tints des badges (15-20% opacité du fond accent, texte plus clair) */
  --accent-blue-tint-bg: rgba(59, 130, 246, 0.2);
  --accent-blue-tint-fg: #4D7FFF;
  --accent-green-tint-bg: rgba(20, 245, 0, 0.15);
  --accent-green-tint-fg: #14F500;
  --accent-rose-tint-bg: rgba(255, 45, 135, 0.2);
  --accent-rose-tint-fg: #FF5FA3;
  --accent-orange-tint-bg: rgba(255, 107, 0, 0.2);
  --accent-orange-tint-fg: #FF8A33;

  /* ---------- Typography ---------- */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* ---------- Spacing scale (base unit 4px) ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* ---------- Radii ---------- */
  --radius-sm: 4px;    /* Inputs, petits éléments */
  --radius-md: 8px;    /* Nav, dropdowns, images */
  --radius-lg: 16px;   /* Cartes */
  --radius-pill: 9999px; /* Boutons, badges */

  /* ---------- Transitions ---------- */
  --transition-fast: 150ms ease-out;
  --transition-normal: 250ms ease-out;
  --transition-color: 300ms cubic-bezier(0.44, 0, 0.56, 1);

  /* ---------- Blur ---------- */
  --blur-glass: blur(20px);
}

/* =============================================================================
   Base reset + body
   ============================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-primary);
  color: var(--fg-on-dark-1);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

::selection {
  background: var(--accent-green);
  color: #000;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

img { display: block; max-width: 100%; }

/* Data-theme light switch */
[data-theme="light"] {
  background: var(--bg-light);
  color: var(--fg-on-light-1);
}

/* =============================================================================
   Semantic typography
   Cormorant Garamond (display) / Inter (body) / JetBrains Mono (labels)
   ============================================================================= */

.h1, h1 {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.1;
  letter-spacing: -2px;
}

.h2, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -1px;
}

.h3, h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.4;
}

.body-lg, .lead {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
}

.body, p {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
}

.body-sm, .small {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
}

.label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.label-micro {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 9px;
  line-height: 1;
}

.stat {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -1.3px;
}

/* Opacity text hierarchy helpers */
.fg-1 { color: var(--fg-on-dark-1); }
.fg-2 { color: var(--fg-on-dark-2); }
.fg-3 { color: var(--fg-on-dark-3); }

[data-theme="light"] .fg-1 { color: var(--fg-on-light-1); }
[data-theme="light"] .fg-2 { color: var(--fg-on-light-2); }
[data-theme="light"] .fg-3 { color: var(--fg-on-light-3); }

/* =============================================================================
   Deck tokens (1920×1080 canvas)
   Utilisés par les présentations HTML dans decks/. Échelle typographique
   déliée de la scale web : une slide vue à 1.5m n'a pas les mêmes contraintes
   qu'un viewport web.
   ============================================================================= */

:root {
  /* Hiérarchie texte sur fond sombre (légèrement plus contrastée que la web) */
  --deck-fg-1: #FFFFFF;
  --deck-fg-2: rgba(255,255,255,0.72);
  --deck-fg-3: rgba(255,255,255,0.55);

  /* Filets propres au deck (plus discrets que le --shadow-border-dark web) */
  --deck-hair: rgba(255,255,255,0.12);
  --deck-hair-strong: rgba(255,255,255,0.20);

  /* Échelle display serif (Cormorant Garamond) */
  --deck-display-xl: 128px;   /* Hero de slide */
  --deck-display-lg: 112px;   /* Titres de section */
  --deck-display-md: 96px;    /* Titres standards */
  --deck-display-sm: 64px;    /* Titres secondaires */

  /* Corps et labels */
  --deck-lead:       30px;    /* Accroches sous titre */
  --deck-body:       22px;    /* Corps de texte */
  --deck-body-strong:24px;    /* Corps emphase */
  --deck-label:      15px;    /* Mono UPPERCASE */
  --deck-micro:      13px;    /* Mono footer, métadonnées */

  /* Chiffres (Inter light, variante tabular) */
  --deck-stat-xl:    280px;
  --deck-stat-lg:    184px;
  --deck-stat-md:    120px;

  /* Chrome de slide */
  --deck-chrome:     12px;    /* Mono brand / page number */
}

/* Inversion pour slides claires */
section.slide[data-theme="light"],
[data-theme="light"] .deck-scope {
  --deck-fg-1: #000;
  --deck-fg-2: rgba(0,0,0,0.70);
  --deck-fg-3: rgba(0,0,0,0.50);
  --deck-hair: rgba(0,0,0,0.10);
  --deck-hair-strong: rgba(0,0,0,0.18);
}
