/* ═══════════════════════════════════════════════════════════════════════
   Ticket Store — design tokens · direction B « Lumière » · v0.2 (14/11/2026)

   Statut : validé en maquette (docs/design-system/maquette/), chargé par
   layouts/front_lab_shell.html depuis le lot 0 de la refonte. Implémentation en Tailwind 3.4 :
   tailwind.config.js expose ces variables (couleurs, polices, échelle,
   rayons) ; l'échelle d'espacement par défaut de Tailwind = grille 4 px.

   Modes :
   - SOMBRE PAR DÉFAUT (décision d'Harold, 14/11/2026), quel que soit le
     réglage du téléphone ;
   - clair uniquement sur choix explicite de l'acheteur :
     <html data-theme="light">, mémorisé par cookie lu côté serveur.

   Teinte d'affiche : fond de TOUTES les cartes événement, des cartes
   « À la une » et du haut de la fiche (choix d'Harold, 14/11). Algorithme
   (maquette/apres.html, fonction hue + tints) : couleur la plus présente et
   saturée (cases RGB pondérées par la saturation) → sa teinte → HSL
   saturation 0,42 / luminosité ajustée jusqu'à 10:1 avec #F3F6F4 (sombre),
   saturation 0,55 jusqu'à 12:1 avec #0C1711 (clair). Calculée une fois à
   l'envoi de l'affiche, stockée sur l'événement (tint_dark, tint_light),
   posée en style inline : style="--tint-dark:#503221;--tint-light:#F1DCD0".
   Sur la teinte, le prix prend la couleur du texte (le vert reste au bouton).

   Attention (écart volontaire avec docs/design-system/tokens.css) : une
   variable CSS se résout là où elle est déclarée. Le --tint posé sur :root ne
   verrait jamais le --tint-dark d'une carte : la classe .ts-tinted redéclare
   donc --tint sur l'élément teinté lui-même (carte, haut de fiche).

   Logos officiels (ne jamais modifier) :
   fond sombre https://imagedelivery.net/P5aXoT2coYOqaWXTof6Rjw/36032e55-5e94-42dc-4828-c7ca31bb8800/public
   fond clair  https://imagedelivery.net/P5aXoT2coYOqaWXTof6Rjw/a6ba973d-5f96-40d4-b445-8de66a3fdd00/public
   ═══════════════════════════════════════════════════════════════════════ */

/* Polices auto-hébergées, woff2 sous-ensemble latin, uniquement les graisses utilisées. */
@font-face{font-family:"Unbounded";src:url("/static/font/Unbounded/Unbounded-latin-600.woff2") format("woff2");font-weight:600;font-display:swap}
@font-face{font-family:"Unbounded";src:url("/static/font/Unbounded/Unbounded-latin-700.woff2") format("woff2");font-weight:700;font-display:swap}
@font-face{font-family:"Poppins";src:url("/static/font/Poppins/Poppins-latin-400.woff2") format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"Poppins";src:url("/static/font/Poppins/Poppins-latin-500.woff2") format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"Poppins";src:url("/static/font/Poppins/Poppins-latin-600.woff2") format("woff2");font-weight:600;font-display:swap}

:root{
  /* ── Marque (identique dans les deux modes) ── */
  --color-brand:#1CB251;          /* fond du bouton principal uniquement */
  --color-brand-hover:#17A048;
  --color-on-brand:#0C1711;       /* 6,6:1 — le blanc sur ce vert ne fait que 2,8:1 */

  /* ── Mode sombre (DÉFAUT) ── */
  --color-page:#0C1711;
  --color-surface:#142019;        /* cartes, champs, filtres */
  --color-surface-2:#1C2A22;      /* survol, boutons − / + */
  --color-line:#24352B;           /* séparateurs décoratifs */
  --color-field-border:#5E6E64;   /* 3,4:1 (WCAG 1.4.11) */
  --color-text:#F3F6F4;           /* 16,8:1 */
  --color-text-2:#A7B5AC;         /* 8,6:1 · 7,9:1 sur surface */
  --color-price:#3DDC7E;          /* 10,2:1 · 9,4:1 sur surface */
  --color-chip-on-bg:#F3F6F4; --color-chip-on-fg:#0C1711;
  --color-focus:#F3F6F4;
  --tint:var(--tint-dark,var(--color-surface));   /* ≥ 10:1 avec le texte */
  --color-on-tint:#F3F6F4; --color-on-tint-2:rgba(243,246,244,.78);
  --color-success:#3DDC7E; --color-warning:#F5B85A; --color-error:#FF8A80;
  --color-qr-bg:#FFFFFF;           /* fond fixe des QR codes, blanc dans les deux modes (lecture caméra) */
  color-scheme:dark;

  /* ── Typographie : 12 niveaux, les mêmes partout ── */
  --font-display:"Unbounded",system-ui,sans-serif;
  --font-text:"Poppins",system-ui,-apple-system,"Segoe UI",sans-serif;
  --text-hero:32px;     --leading-hero:1.12;     /* Unbounded 700 · 1 par page */
  --text-h1:24px;       --leading-h1:1.18;       /* Unbounded 600 · titre de fiche */
  --text-h2:24px;       --leading-h2:1.18;       /* Unbounded 600 · titres de section */
  --text-h3:20px;       --leading-h3:1.2;        /* Unbounded 600 · blocs éditoriaux */
  --text-title-lg:20px; --leading-title-lg:1.3;  /* Poppins 600 · carte « À la une » */
  --text-title:17px;    --leading-title:1.3;     /* Poppins 600 · titre de carte, 2 lignes max */
  --text-price:17px;    --leading-price:1.2;     /* Poppins 600 */
  --text-body:15px;     --leading-body:1.55;     /* Poppins 400 */
  --text-small:14px;    --leading-small:1.45;    /* Poppins 400 · lieu, méta */
  --text-date:13px;     --leading-date:1.35;     /* Poppins 500 · chiffres tabulaires */
  --text-button:15px;                            /* Poppins 600 (14 px en petit) */
  --text-label:12px;    --tracking-label:.08em;  /* Poppins 600 capitales */
  --measure:65ch;

  /* ── Espacement : grille 4 px ── */
  --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-20:80px; --space-24:96px;
  --section-y:48px;               /* 80 px desktop */

  /* ── Layout ── */
  --container:1280px; --gutter:16px; --grid-gap:12px;

  /* ── Rayons : 3 valeurs, aucune pilule ── */
  --radius-md:10px;               /* boutons, filtres, champs, boutons icône */
  --radius-lg:14px;               /* cartes, affiches, tuiles, lignes de billet */
  --radius-xl:20px;               /* cartes « À la une », blocs éditoriaux */
  --notch:9px;                    /* encoches de la perforation (signature) */

  /* ── Interaction ── */
  --tap:44px; --dur-1:120ms; --dur-2:200ms; --dur-3:320ms; --ease:cubic-bezier(.2,0,0,1);
}

/* Élément teinté par son affiche : voir l'en-tête. */
.ts-tinted{--tint:var(--tint-dark,var(--color-surface))}

/* ── Mode clair : choix explicite seulement ── */
:root[data-theme="light"]{
  --color-page:#FFFFFF; --color-surface:#F2F5F3; --color-surface-2:#E7ECE9; --color-line:#DFE5E1;
  --color-field-border:#8A938D;   /* 3,2:1 */
  --color-text:#0C1711;           /* 18,3:1 */
  --color-text-2:#4F5A53;         /* 7,2:1 · 6,6:1 sur surface */
  --color-price:#0B7A39;          /* 5,4:1 · 5,0:1 sur surface */
  --color-chip-on-bg:#0C1711; --color-chip-on-fg:#FFFFFF; --color-focus:#0C1711;
  --tint:var(--tint-light,var(--color-surface));  /* ≥ 12:1 avec le texte */
  --color-on-tint:#0C1711; --color-on-tint-2:#3F4A43;
  --color-success:#0B7A39; --color-warning:#9A5B00; --color-error:#B42318;
  color-scheme:light;
}
:root[data-theme="light"] .ts-tinted{--tint:var(--tint-light,var(--color-surface))}

@media (max-width:359px){:root{--text-hero:28px;--text-h1:22px;--text-h2:22px}}
@media (min-width:768px){:root{--gutter:24px;--grid-gap:16px}}
@media (min-width:1024px){:root{
  --gutter:32px; --grid-gap:24px; --section-y:80px;
  --text-hero:56px; --text-h1:40px; --text-h2:36px; --text-h3:28px;
  --text-title-lg:24px; --text-title:18px; --text-price:18px; --text-body:16px; --text-date:14px;
}}
@media (prefers-reduced-motion:reduce){:root{--dur-1:0ms;--dur-2:0ms;--dur-3:0ms}}
