/* ==========================================================================
   tokens.css - Variables universelles & Thèmes (projetWebPhoto)
   ========================================================================== */

:root {
  /* Typographie système ultra-légère (zéro appel réseau) */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Monaco, "Cascadia Code", "Courier New", monospace;

  /* Échelle modulaire */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 2rem;      /* 32px */

  /* Espacements normalisés (base 4px) */
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */

  /* Cotes ergonomiques tactiles (Terrain & Gants) */
  --touch-min-size: 48px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);

  /* États fonctionnels partagés (conformes WCAG AA sur fond sombre) */
  --state-ok: #4ade80;        /* Vert émeraude clair (ratio > 7:1) */
  --state-warning: #fcd34d;   /* Ambre clair lumineux (ratio > 8:1) */
  --state-danger: #f87171;    /* Rouge corail clair (ratio > 6:1) */
}

/* --------------------------------------------------------------------------
   Thème 1 : Neutre Studio (Par défaut)
   Contraste vérifié WCAG AA / AAA :
   - Texte principal (#f3f4f6 sur #1a1c20) : ratio 12.8:1 (AAA)
   - Texte secondaire (#cbd5e1 sur #1a1c20) : ratio 9.2:1 (AAA)
   - Accent ambre technique (#fbbf24 sur #1a1c20) : ratio 9.8:1 (AAA)
   -------------------------------------------------------------------------- */
:root,
[data-theme="studio"] {
  --bg-app: #111215;
  --bg-surface: #1a1c20;
  --bg-surface-elevated: #262930;
  --bg-input: #0d0e10;
  
  --border-subtle: #3e4451;
  --border-focus: #fbbf24;

  --text-main: #f3f4f6;       /* Blanc cassé éclatant */
  --text-muted: #cbd5e1;      /* Gris ardoise très clair (WCAG AAA) */
  --text-dim: #94a3b8;        /* Gris de soutien lisible */

  /* Accentuation jaune/ambre technique façon index de mesure optique */
  --accent-primary: #fbbf24;
  --accent-hover: #fcd34d;
  --accent-active: #f59e0b;
  --accent-text: #000000;

  --canvas-bg: #090a0c;
  --canvas-grid: #282c34;
}

/* --------------------------------------------------------------------------
   Thème 2 : Inactinique / Nuit (Chambre Noire & Astrophoto)
   100 % monochrome rouge profond sur noir absolu
   -------------------------------------------------------------------------- */
[data-theme="inactinique"] {
  --bg-app: #000000;
  --bg-surface: #0a0101;
  --bg-surface-elevated: #1a0303;
  --bg-input: #050000;

  --border-subtle: #7f1d1d;
  --border-focus: #f87171;

  --text-main: #fee2e2;       /* Rouge très pâle éclatant (ratio > 11:1) */
  --text-muted: #fca5a5;      /* Rouge clair (ratio > 7:1) */
  --text-dim: #ef4444;

  --accent-primary: #ef4444;
  --accent-hover: #f87171;
  --accent-active: #dc2626;
  --accent-text: #000000;

  --canvas-bg: #000000;
  --canvas-grid: #450a0a;

  /* Neutralisation des voyants d'état vers le rouge */
  --state-ok: #f87171;
  --state-warning: #ef4444;
  --state-danger: #dc2626;
}