/* ============================================================
   Design tokens — variables CSS de la charte graphique.
   Mode clair par défaut, mode sombre via data-theme / préférence OS.
   ============================================================ */

:root {
  color-scheme: light;

  /* Neutres */
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e9edf2;
  --text: #151b24;
  --text-muted: #5b6574;
  --text-faint: #8b95a3;
  --border: #e3e7ed;
  --border-strong: #cdd4dd;

  /* Accents */
  --accent: #e11d48;
  --accent-hover: #be123c;
  --accent-soft: #ffe4ea;
  --on-accent: #ffffff;
  --holiday: #15803d;

  /* États */
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --success: #15803d;
  --success-soft: #dcfce7;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --info: #0369a1;
  --info-soft: #e0f2fe;

  /* Forme */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgb(15 20 30 / 0.06);
  --shadow: 0 18px 45px -18px rgb(15 20 30 / 0.25);
  --ring: 0 0 0 3px rgb(225 29 72 / 0.28);

  /* Typographie */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter",
    "Helvetica Neue", Arial, sans-serif;

  /* Divers */
  --track: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --maxw: 980px;
}

/* Palette sombre — partagée entre le toggle manuel et la préférence OS. */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1117;
  --surface: #171a22;
  --surface-2: #1d212b;
  --surface-3: #252b37;
  --text: #e7eaf0;
  --text-muted: #9aa5b4;
  --text-faint: #6b7686;
  --border: #2a3140;
  --border-strong: #3a4252;
  --accent: #fb5478;
  --accent-hover: #ff6b8c;
  --accent-soft: #3a1626;
  --on-accent: #ffffff;
  --holiday: #4ade80;
  --danger: #f87171;
  --danger-soft: #3f1d1d;
  --success: #4ade80;
  --success-soft: #14301f;
  --warning: #fbbf24;
  --warning-soft: #332712;
  --info: #7dd3fc;
  --info-soft: #12283a;
  --shadow: 0 18px 45px -18px rgb(0 0 0 / 0.6);
  --ring: 0 0 0 3px rgb(251 84 120 / 0.35);
}

/* Défaut : thème clair. Le sombre n'est appliqué que via le toggle manuel
   (attribut data-theme="dark"), persistant dans localStorage. */