/* ==========================================================================
   Infiniti : jetons de design
   Tout composant utilise ces variables, jamais de valeur écrite en dur.
   Le thème d'un club ne change que --club-primary / --club-accent / --club-on-accent.
   ========================================================================== */

:root {
  color-scheme: light;

  /* ---- Marque du club (valeurs de l'ACSH, relevées sur le site actuel) ---- */
  --club-primary: #0b2d5a; /* bleu marine de la charte */
  --club-accent: #f4761a; /* orange de la charte */
  --club-on-accent: #1f1400; /* texte sur fond accent : le blanc serait illisible sur l'orange */

  /* ---- Palette des valeurs du club (charte : respect, solidarité, plaisir, progrès, fair-play) ---- */
  --v-orange: var(--club-accent);
  --v-green: #4a9741;
  --v-purple: #7b3c96;
  --v-yellow: #f6b005;

  /* ---- Couleurs dérivées ---- */
  --primary: var(--club-primary);
  --primary-hover: color-mix(in oklab, var(--primary) 86%, black);
  --primary-deep: color-mix(in oklab, var(--primary) 58%, black);
  --primary-soft: color-mix(in oklab, var(--primary) 9%, var(--surface));
  --primary-line: color-mix(in oklab, var(--primary) 24%, var(--surface));
  --on-primary: #ffffff;
  --btn-bg: var(--primary);
  --btn-bg-hover: var(--primary-hover);
  --link: var(--primary);

  --accent: var(--club-accent);
  --accent-hover: color-mix(in oklab, var(--accent) 88%, black);
  --accent-soft: color-mix(in oklab, var(--accent) 18%, var(--surface));
  --on-accent: var(--club-on-accent);

  /* ---- Neutres (clair) ---- */
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --surface-3: #e3e9f1;
  --border: #dde4ee;
  --border-strong: #c3cedd;
  --text: #0e1a2b;
  --text-2: #3d4c61;
  --text-3: #596a80;

  /* ---- États ---- */
  --success: #12703c;
  --success-soft: #dcf4e6;
  --danger: #b42318;
  --danger-soft: #fde6e3;
  --warning: #8f5300;
  --warning-soft: #fcefd0;

  /* ---- Forme ---- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgb(14 26 43 / 0.06), 0 1px 1px rgb(14 26 43 / 0.04);
  --shadow-2: 0 8px 24px -8px rgb(14 26 43 / 0.2), 0 2px 6px rgb(14 26 43 / 0.06);
  --shadow-3: 0 28px 56px -18px rgb(14 26 43 / 0.45);

  /* ---- Espacement ---- */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: 6.5rem;

  /* ---- Typographie ----
     Maquette : polices système (Segoe UI Variable sous Windows 11).
     En production : une police variable auto-hébergée (pas de Google Fonts). */
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-2xl: clamp(1.65rem, 1.3rem + 1.3vw, 2.2rem);
  --fs-3xl: clamp(2rem, 1.5rem + 2.4vw, 3.1rem);
  --fs-hero: clamp(2.7rem, 1.5rem + 5.6vw, 5.4rem);

  /* ---- Mouvement ---- */
  --dur: 160ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* ---- Gabarits ---- */
  --container: 1180px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --tap: 44px; /* taille minimale d'une cible tactile */
}

/* ---- Mode sombre (admin et OTM ; le site public reste clair par défaut) ---- */
:root[data-scheme="dark"] {
  color-scheme: dark;

  --bg: #0a121e;
  --surface: #111c2b;
  --surface-2: #172538;
  --surface-3: #20324a;
  --border: #243650;
  --border-strong: #35496b;
  --text: #eaf0f8;
  --text-2: #b6c3d6;
  --text-3: #8fa1ba;

  --btn-bg: color-mix(in oklab, var(--primary) 82%, white);
  --btn-bg-hover: color-mix(in oklab, var(--primary) 70%, white);
  --link: color-mix(in oklab, var(--primary) 42%, white);
  --primary-soft: color-mix(in oklab, var(--primary) 26%, var(--surface));
  --primary-line: color-mix(in oklab, var(--primary) 40%, var(--surface));
  --accent-soft: color-mix(in oklab, var(--accent) 20%, var(--surface));

  --success: #62d493;
  --success-soft: color-mix(in oklab, #22c55e 18%, var(--surface));
  --danger: #ff8a7d;
  --danger-soft: color-mix(in oklab, #ef4444 20%, var(--surface));
  --warning: #f5bd5a;
  --warning-soft: color-mix(in oklab, #f59e0b 20%, var(--surface));

  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-2: 0 10px 28px -10px rgb(0 0 0 / 0.65);
  --shadow-3: 0 30px 60px -18px rgb(0 0 0 / 0.8);
}
