/* =====================================================================
   CONFIGURATION VISUELLE DE MARQUE — seul fichier à modifier
   Chaque thème = un jeu complet de tokens. Les écrans n'utilisent
   QUE ces variables (var(--…)) : aucune couleur ni police en dur.
   Pour une nouvelle marque : dupliquer un bloc [data-theme="…"].
   ===================================================================== */

:root, [data-theme="neutre"] {
  color-scheme: light;
  /* Couleurs de marque */
  --c-primary: oklch(0.28 0.02 260);
  --c-primary-hover: oklch(0.38 0.02 260);
  --c-on-primary: oklch(0.985 0.003 260);
  --c-secondary: oklch(0.93 0.01 260);
  --c-secondary-hover: oklch(0.89 0.012 260);
  --c-on-secondary: oklch(0.25 0.02 260);
  --c-accent: oklch(0.80 0.13 70);
  --c-on-accent: oklch(0.25 0.04 60);
  /* Fonds & texte */
  --c-bg: oklch(0.985 0.003 80);
  --c-bg-alt: oklch(0.955 0.005 80);
  --c-surface: oklch(1 0 0);
  --c-text: oklch(0.22 0.01 260);
  --c-text-muted: oklch(0.46 0.01 260);
  --c-border: oklch(0.88 0.006 260);
  --c-border-strong: oklch(0.62 0.01 260);
  /* États */
  --c-success: oklch(0.45 0.11 150);   --c-success-bg: oklch(0.95 0.04 150);
  --c-error: oklch(0.50 0.17 25);      --c-error-bg: oklch(0.96 0.03 25);
  --c-warning: oklch(0.48 0.11 70);    --c-warning-bg: oklch(0.96 0.05 85);
  --c-info: oklch(0.47 0.10 250);      --c-info-bg: oklch(0.96 0.025 250);
  --c-focus: oklch(0.60 0.15 250);
  /* Images d'exemple (rayures) */
  --c-ph-1: oklch(0.94 0.005 80);
  --c-ph-2: oklch(0.91 0.006 80);
  /* Typographie */
  --font-heading: "Archivo", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;
  --fw-heading: 700;
  --heading-tracking: -0.02em;
  --heading-case: none;
  /* Arrondis */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-btn: 10px; --r-pill: 999px;
  /* Ombres */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 260 / 0.08);
  --shadow-md: 0 4px 14px oklch(0.2 0.01 260 / 0.10);
  --shadow-lg: 0 18px 40px oklch(0.2 0.01 260 / 0.16);
}

[data-theme="nature"] {
  color-scheme: light;
  --c-primary: oklch(0.42 0.08 150);
  --c-primary-hover: oklch(0.35 0.08 150);
  --c-on-primary: oklch(0.985 0.008 95);
  --c-secondary: oklch(0.92 0.035 115);
  --c-secondary-hover: oklch(0.88 0.045 115);
  --c-on-secondary: oklch(0.30 0.06 150);
  --c-accent: oklch(0.78 0.13 75);
  --c-on-accent: oklch(0.25 0.05 70);
  --c-bg: oklch(0.975 0.01 95);
  --c-bg-alt: oklch(0.945 0.02 100);
  --c-surface: oklch(0.99 0.006 95);
  --c-text: oklch(0.25 0.03 150);
  --c-text-muted: oklch(0.45 0.03 140);
  --c-border: oklch(0.87 0.02 110);
  --c-border-strong: oklch(0.62 0.03 130);
  --c-success: oklch(0.45 0.11 150);   --c-success-bg: oklch(0.94 0.05 145);
  --c-error: oklch(0.50 0.16 30);      --c-error-bg: oklch(0.95 0.03 35);
  --c-warning: oklch(0.48 0.10 70);    --c-warning-bg: oklch(0.95 0.05 85);
  --c-info: oklch(0.45 0.08 230);      --c-info-bg: oklch(0.95 0.025 230);
  --c-focus: oklch(0.55 0.14 240);
  --c-ph-1: oklch(0.935 0.022 105);
  --c-ph-2: oklch(0.905 0.028 110);
  --font-heading: "Young Serif", Georgia, serif;
  --font-body: "Work Sans", system-ui, sans-serif;
  --fw-heading: 400;
  --heading-tracking: -0.01em;
  --heading-case: none;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-btn: 999px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px oklch(0.3 0.04 140 / 0.08);
  --shadow-md: 0 6px 18px oklch(0.3 0.04 140 / 0.10);
  --shadow-lg: 0 22px 48px oklch(0.3 0.04 140 / 0.16);
}

[data-theme="nocturne"] {
  color-scheme: dark;   /* contrôles natifs (cases, listes, dates) en version sombre */
  --c-primary: oklch(0.86 0.18 128);
  --c-primary-hover: oklch(0.92 0.16 128);
  --c-on-primary: oklch(0.20 0.04 265);
  --c-secondary: oklch(0.30 0.04 265);
  --c-secondary-hover: oklch(0.36 0.045 265);
  --c-on-secondary: oklch(0.96 0.008 265);
  --c-accent: oklch(0.84 0.15 85);
  --c-on-accent: oklch(0.22 0.04 265);
  --c-bg: oklch(0.17 0.025 265);
  --c-bg-alt: oklch(0.205 0.03 265);
  --c-surface: oklch(0.235 0.035 265);
  --c-text: oklch(0.96 0.008 265);
  --c-text-muted: oklch(0.78 0.025 265);
  --c-border: oklch(0.34 0.035 265);
  --c-border-strong: oklch(0.55 0.035 265);
  --c-success: oklch(0.82 0.14 150);   --c-success-bg: oklch(0.28 0.05 150);
  --c-error: oklch(0.78 0.13 25);      --c-error-bg: oklch(0.28 0.06 25);
  --c-warning: oklch(0.85 0.13 85);    --c-warning-bg: oklch(0.29 0.05 85);
  --c-info: oklch(0.80 0.10 250);      --c-info-bg: oklch(0.28 0.05 250);
  --c-focus: oklch(0.80 0.14 250);
  --c-ph-1: oklch(0.22 0.03 265);
  --c-ph-2: oklch(0.255 0.035 265);
  --font-heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;
  --fw-heading: 700;
  --heading-tracking: 0.01em;
  --heading-case: uppercase;
  --r-sm: 3px; --r-md: 6px; --r-lg: 10px; --r-btn: 4px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.4);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.45);
  --shadow-lg: 0 0 0 1px oklch(0.86 0.18 128 / 0.15), 0 24px 60px oklch(0 0 0 / 0.6);
}

/* Échelles communes (peuvent aussi être surchargées par thème).
   cqi = % de la largeur du conteneur de page → s'adapte mobile / ordinateur */
:root {
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.125rem, 1rem + 0.5cqi, 1.25rem);
  --fs-xl: clamp(1.25rem, 1.05rem + 1cqi, 1.5rem);
  --fs-2xl: clamp(1.5rem, 1.2rem + 1.6cqi, 2rem);
  --fs-3xl: clamp(1.875rem, 1.3rem + 2.8cqi, 2.75rem);
  --fs-4xl: clamp(2.25rem, 1.4rem + 4.4cqi, 4rem);
  --lh-tight: 1.1; --lh-body: 1.6;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --gutter: clamp(16px, 4cqi, 40px);
  --section-y: clamp(48px, 30px + 5cqi, 104px);
  --container: 1200px;
  --tap: 48px; /* taille de clic minimale */
}

/* Option de relecture : entoure les textes d'exemple à remplacer */
[data-show-samples="true"] [data-sample] { outline: 2px dashed var(--c-warning); outline-offset: 3px; }

/* Couleurs d'impression (filaments) — utilisées par l'aperçu 3D et le choix « nombre de couleurs » */
:root, [data-theme="neutre"] { --c-print-base: oklch(0.32 0.02 260); --c-print-terrain: oklch(0.93 0.005 80); --c-print-high: oklch(0.74 0.012 260); --c-print-track: oklch(0.70 0.17 45); }
[data-theme="nature"] { --c-print-base: oklch(0.38 0.05 150); --c-print-terrain: oklch(0.91 0.03 105); --c-print-high: oklch(0.68 0.07 140); --c-print-track: oklch(0.62 0.17 35); }
[data-theme="nocturne"] { --c-print-base: oklch(0.26 0.03 265); --c-print-terrain: oklch(0.86 0.01 265); --c-print-high: oklch(0.60 0.03 265); --c-print-track: oklch(0.86 0.18 128); }
