/* Fichier généré par sync-design-system.sh le 2026-10-26T13:24Z. Ne pas modifier : éditer /design-system puis relancer. */
/* ==========================================================================
   Meilleur Code Parrainage · polices auto-hébergées (aucun appel externe)
   Archivo variable : graisse 100–900 ET largeur 62–125 % (axe wdth)
   JetBrains Mono variable : graisse 100–800
   Sous-ensemble latin (français complet : é è ê à ç œ « » € …) chargé d'office,
   latin-ext chargé seulement si un caractère de cette plage apparaît.
   Source : paquets npm @fontsource-variable/archivo et /jetbrains-mono (licence OFL).
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"),
       url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2-variations"),
       url("fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations"),
       url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations"),
       url("fonts/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* ==========================================================================
   Meilleur Code Parrainage · jetons de design « Le Ticket v2 »
   Réglage 1 « clair » par défaut, réglage « graphite » en mode sombre.
   Le mode sombre s'active :
     - automatiquement si le système est en sombre (sauf data-theme="light") ;
     - de force avec data-theme="dark" sur <html> ou sur n'importe quel bloc
       (utile pour les démonstrations côte à côte).
   Ne jamais écrire une couleur en dur dans components.css : passer par ces jetons.
   Ces jetons sont ceux du thème « Matrix ». Le thème « Soleil » (base du site) les
   surcharge dans skins.css, chargé APRÈS components.css.
   ========================================================================== */

:root,
[data-theme="light"] {
  color-scheme: light;

  /* -- Fond de page : gris très clair UNI (style sobre du 21/10 : plus de grille) -- */
  --bg: #f4f5f3;
  --bg-grid: transparent;
  --bg-glow: transparent;

  /* -- Surfaces -- */
  --surface: #ffffff;          /* panneaux, champs, tickets */
  --surface-2: #f4f6f3;        /* zones secondaires dans une surface */
  --surface-3: #e5e9e4;        /* survol discret, pistes de jauge */
  --surface-inverse: #121512;  /* blocs encre (pied de page, toast) */

  /* -- Texte -- */
  --ink: #121512;              /* encre principale */
  --ink-2: #343a34;            /* texte courant secondaire */
  --muted: #565e56;            /* légendes (6,2:1 sur --bg, 6,7:1 sur blanc) */
  --ink-inverse: #f4f5f7;
  --muted-inverse: #b4b9c5;

  /* -- Traits -- */
  --line: #d9ddd8;
  --line-2: #c5cbc4;
  --line-strong: #121512;

  /* -- Accent unique : vert acide. Toujours en FOND, jamais en texte sur clair -- */
  --accent: #d7ff3a;
  --accent-hover: #c8f21f;
  --on-accent: #11131a;
  --accent-text: #11131a;      /* « texte accentué » lisible sur --bg */
  --highlight: #d7ff3a;        /* surlignage des correspondances de recherche */

  /* -- Vert « vérifié » (réservé à la vérification) -- */
  --ok: #08683f;
  --ok-bg: #dff3e7;
  --ok-line: #9fd7b6;

  /* -- États -- */
  --warn: #6b4a00;
  --warn-bg: #fff3cc;
  --warn-line: #e7c35a;
  --danger: #b3261e;
  --on-danger: #ffffff; /* texte posé sur --danger (bouton « Supprimer », « Bloquer ») : 6,5:1 */
  --danger-bg: #fde8e6;
  --info-bg: #e8ecf5;

  /* -- Ticket -- */
  --tk-bg: #ffffff;
  --tk-ink: #11131a;
  --tk-muted: #5a6070;
  --tk-line: #e3e6ec;
  --tk-stub-bg: #11131a;
  --tk-stub-ink: #ffffff;
  --tk-stub-muted: #b4b9c5;
  --tk-perf: #f4f5f3;          /* pointillé de détachement */
  --tk-copy-bg: #d7ff3a;
  --tk-copy-ink: #11131a;
  --tk-copied-bg: #ffffff;
  --tk-copied-ink: #11131a;
  --tk-ok-bg: #11131a;
  --tk-ok-ink: #d7ff3a;
  --tk-logo-bg: #f1f3f6;
  --tk-tampon: #08683f;               /* tampon « Copié ✓ » des récompenses (496) sur un ticket : corps toujours clair, 6,4:1 */
  --tk-shadow: drop-shadow(0 1px 0 rgba(17, 19, 26, .10)) drop-shadow(0 12px 18px rgba(17, 19, 26, .10));
  --tk-shadow-hover: drop-shadow(0 1px 0 rgba(17, 19, 26, .12)) drop-shadow(0 18px 24px rgba(17, 19, 26, .16));
  --tk-focus: #d7ff3a;         /* anneau de focus DANS le talon (fond encre) */
  --tk-focus-halo: rgba(215, 255, 58, .55); /* halo du lien étiré (corps du ticket) */
  --ribbon-bg: var(--accent); --ribbon-ink: var(--on-accent); /* ruban de la vedette */
  --line-input: #7c8291;       /* bordure de champ, puce, pagination : >= 3:1 (WCAG 1.4.11) */
  --off-bg: #f5f6f9; --off-bg-2: #e4e7ed; --off-ink: #4a4f5c; --off-hatch: #c3c8d2; --danger-ink: #b3261e;
  --tk-check: #08683f;         /* coche du cartouche « Vérifié » */
  --tk-slot: rgba(255, 255, 255, .08);
  --tk-bars-o: .7;
  --tk-shadow-sm: drop-shadow(0 8px 14px rgba(17, 19, 26, .13));

  /* -- Focus général -- */
  --focus: #11131a;
  --focus-halo: rgba(215, 255, 58, .9);

  /* -- Ombres -- */
  --shadow-1: 0 1px 0 rgba(17, 19, 26, .06), 0 2px 6px -2px rgba(17, 19, 26, .10);
  --shadow-2: 0 1px 0 rgba(17, 19, 26, .06), 0 14px 30px -18px rgba(17, 19, 26, .38);
  --shadow-3: 0 24px 60px -24px rgba(17, 19, 26, .45);
  --shadow-search: 0 18px 40px -18px rgba(17, 19, 26, .38);

  /* -- Rôles dérivés (évite toute règle de thème dans components.css) -- */
  --sel-bg: #11131a;  --sel-ink: #d7ff3a;  --sel-muted: #b4b9c5;   /* élément sélectionné, bouton primaire */
  --sel-hover: #262a35;
  --logo-fond: #11131a;  --logo-ticket: #d7ff3a; --logo-coche: #11131a;
  --copied-bg: #11131a; --copied-ink: #d7ff3a;
  --bar-copy-bg: #d7ff3a; --bar-copy-ink: #11131a;
  --meter-bg: #11131a; --meter-stripe: rgba(215, 255, 58, .9);
  --stripe-a: #11131a; --stripe-b: #d7ff3a;
  --ftr-bg: #11131a; --ftr-ink: #f4f5f7; --ftr-muted: #b4b9c5; --ftr-line: rgba(255, 255, 255, .14); --ftr-border: transparent;
  --show-moon: block; --show-sun: none;
}

/* ---------- Réglage « graphite » (mode sombre) ---------- */
[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0f1115;
  --bg-grid: transparent; /* fond uni (21/10) : plus de trame */
  --bg-glow: transparent; /* ni de halo */

  --surface: #171a20;
  --surface-2: #1d2128;
  --surface-3: #272b34;
  --surface-inverse: #f4f5f7;

  --ink: #eef0f4;
  --ink-2: #c9cdd6;
  --muted: #a1a7b3;            /* 7,8:1 sur --bg */
  --ink-inverse: #0f1115;
  --muted-inverse: #4f5563;

  --line: #2a2e37;
  --line-2: #3a3f4a;
  --line-strong: #eef0f4;

  --accent: #d7ff3a;
  --accent-hover: #e3ff70;
  --on-accent: #0f1115;
  --accent-text: #d7ff3a;      /* sur graphite, l'accent devient lisible en texte */
  --highlight: #d7ff3a;

  --ok: #7ee2a8;
  --ok-bg: #11291d;
  --ok-line: #23573a;

  --warn: #ffd877;
  --warn-bg: #2a2209;
  --warn-line: #6b5513;
  --danger: #ff8a80;
  --on-danger: #1a0b0a; /* rouge clair en sombre : texte foncé (8,2:1), le blanc ne faisait que 2,3:1 */
  --danger-bg: #3a1513;
  --info-bg: #1a1f29;

  /* Tickets clairs, talon vert acide */
  --tk-bg: #f4f5f7;
  --tk-ink: #0f1115;
  --tk-muted: #555b69;
  --tk-line: #dfe2e8;
  --tk-stub-bg: #d7ff3a;
  --tk-stub-ink: #0f1115;
  --tk-stub-muted: #434b12;
  --tk-perf: #0f1115;
  --tk-copy-bg: #0f1115;
  --tk-copy-ink: #d7ff3a;
  --tk-copied-bg: #ffffff;
  --tk-copied-ink: #0f1115;
  --tk-ok-bg: #0f1115;
  --tk-ok-ink: #d7ff3a;
  --tk-logo-bg: #e6e8ec;
  --tk-shadow: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)) drop-shadow(0 14px 22px rgba(0, 0, 0, .45));
  --tk-shadow-hover: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)) drop-shadow(0 20px 28px rgba(0, 0, 0, .6));
  --tk-focus: #0f1115;
  --tk-focus-halo: rgba(215, 255, 58, .55);
  --ribbon-bg: #0f1115; --ribbon-ink: #d7ff3a;   /* vedette sombre : ruban encre, séparé du talon acide */
  --line-input: #6b7180;
  --off-bg: #1d2128; --off-bg-2: #272b34; --off-ink: #b4b9c5; --off-hatch: #3a3f4a; --danger-ink: #ff8a80;
  --tk-slot: rgba(15, 17, 21, .08);
  --tk-bars-o: .7;
  --tk-shadow-sm: drop-shadow(0 10px 16px rgba(0, 0, 0, .5));

  --focus: #d7ff3a;
  --focus-halo: rgba(215, 255, 58, .35);

  --shadow-1: 0 1px 0 rgba(0, 0, 0, .4), 0 2px 6px -2px rgba(0, 0, 0, .5);
  --shadow-2: 0 1px 0 rgba(0, 0, 0, .4), 0 16px 32px -18px rgba(0, 0, 0, .8);
  --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --shadow-search: 0 18px 50px -16px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);

  --sel-bg: #d7ff3a;  --sel-ink: #0f1115;  --sel-muted: #434b12;
  --sel-hover: #e3ff70;
  --logo-fond: #d7ff3a;  --logo-ticket: #0f1115; --logo-coche: #d7ff3a;
  --copied-bg: #ffffff; --copied-ink: #0f1115;
  --bar-copy-bg: #0f1115; --bar-copy-ink: #d7ff3a;
  --meter-bg: #d7ff3a; --meter-stripe: rgba(15, 17, 21, .35);
  --stripe-a: #d7ff3a; --stripe-b: #0f1115;
  --ftr-bg: #0a0c0f; --ftr-ink: #eef0f4; --ftr-muted: #a1a7b3; --ftr-line: #2a2e37; --ftr-border: #2a2e37;
  --show-moon: none; --show-sun: block;
}

/* Système en sombre et aucun choix explicite : on recopie le réglage graphite.
   (Duplication imposée par CSS ; garder ce bloc identique au précédent.) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1115; --bg-grid: transparent; --bg-glow: transparent;
    --surface: #171a20; --surface-2: #1d2128; --surface-3: #272b34; --surface-inverse: #f4f5f7;
    --ink: #eef0f4; --ink-2: #c9cdd6; --muted: #a1a7b3; --ink-inverse: #0f1115; --muted-inverse: #4f5563;
    --line: #2a2e37; --line-2: #3a3f4a; --line-strong: #eef0f4;
    --accent: #d7ff3a; --accent-hover: #e3ff70; --on-accent: #0f1115; --accent-text: #d7ff3a; --highlight: #d7ff3a;
    --ok: #7ee2a8; --ok-bg: #11291d; --ok-line: #23573a;
    --warn: #ffd877; --warn-bg: #2a2209; --warn-line: #6b5513;
    --danger: #ff8a80; --on-danger: #1a0b0a; --danger-bg: #3a1513; --info-bg: #1a1f29;
    --tk-bg: #f4f5f7; --tk-ink: #0f1115; --tk-muted: #555b69; --tk-line: #dfe2e8;
    --tk-stub-bg: #d7ff3a; --tk-stub-ink: #0f1115; --tk-stub-muted: #434b12; --tk-perf: #0f1115;
    --tk-copy-bg: #0f1115; --tk-copy-ink: #d7ff3a; --tk-copied-bg: #ffffff; --tk-copied-ink: #0f1115;
    --tk-ok-bg: #0f1115; --tk-ok-ink: #d7ff3a; --tk-logo-bg: #e6e8ec;
    --tk-shadow: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)) drop-shadow(0 14px 22px rgba(0, 0, 0, .45));
    --tk-shadow-hover: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)) drop-shadow(0 20px 28px rgba(0, 0, 0, .6));
    --tk-focus: #0f1115; --tk-focus-halo: rgba(215, 255, 58, .55); --ribbon-bg: #0f1115; --ribbon-ink: #d7ff3a;
    --line-input: #6b7180;
    --off-bg: #1d2128; --off-bg-2: #272b34; --off-ink: #b4b9c5; --off-hatch: #3a3f4a; --danger-ink: #ff8a80;
    --tk-slot: rgba(15, 17, 21, .08);
    --tk-bars-o: .7;
    --tk-shadow-sm: drop-shadow(0 10px 16px rgba(0, 0, 0, .5));
    --focus: #d7ff3a; --focus-halo: rgba(215, 255, 58, .35);
    --shadow-1: 0 1px 0 rgba(0, 0, 0, .4), 0 2px 6px -2px rgba(0, 0, 0, .5);
    --shadow-2: 0 1px 0 rgba(0, 0, 0, .4), 0 16px 32px -18px rgba(0, 0, 0, .8);
    --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, .8);
    --shadow-search: 0 18px 50px -16px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
    --sel-bg: #d7ff3a;  --sel-ink: #0f1115;  --sel-muted: #434b12; --sel-hover: #e3ff70; --logo-fond: #d7ff3a;  --logo-ticket: #0f1115; --logo-coche: #d7ff3a; --copied-bg: #ffffff; --copied-ink: #0f1115; --bar-copy-bg: #0f1115; --bar-copy-ink: #d7ff3a; --meter-bg: #d7ff3a; --meter-stripe: rgba(15, 17, 21, .35); --stripe-a: #d7ff3a; --stripe-b: #0f1115; --ftr-bg: #0a0c0f; --ftr-ink: #eef0f4; --ftr-muted: #a1a7b3; --ftr-line: #2a2e37; --ftr-border: #2a2e37; --show-moon: none; --show-sun: block;
  }
}

/* ---------- Jetons indépendants du thème ---------- */
:root {
  /* Familles */
  --font-sans: "Archivo", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Largeurs (axe wdth d'Archivo) : plus aucune lettre étirée (style sobre, décision de Kevinoo du 21/10) */
  --wd-text: 100%;
  --wd-ui: 100%;
  --wd-title: 100%;
  --wd-display: 100%;

  /* Graisses : titres semi-gras, texte fort modéré ; seuls les montants des bonus des tickets restent très gras */
  --fw-title: 650;
  --fw-strong: 600;
  --fw-prime: 900;

  /* Échelle typographique (mobile d'abord, fluide jusqu'à 1280 px) */
  --fs-2xs: .6875rem;  /* 11 px : étiquettes mono */
  --fs-xs: .75rem;     /* 12 px */
  --fs-sm: .875rem;    /* 14 px */
  --fs-base: 1rem;     /* 16 px : jamais moins pour un texte courant */
  --fs-md: 1.125rem;   /* 18 px */
  --fs-lg: 1.25rem;    /* 20 px */
  --fs-xl: clamp(1.25rem, 1.1rem + .7vw, 1.625rem);      /* 20 → 26 px : titres de section */
  --fs-2xl: clamp(1.5rem, 1.2rem + 1.3vw, 2.25rem);      /* 24 → 36 px : titres de page */
  --fs-display: clamp(1.75rem, 1.15rem + 2.6vw, 3rem);  /* 28 → 48 px : grand titre (H1 de l'accueil) */
  --fs-prime: clamp(1.75rem, 1.55rem + .6vw, 2.125rem);  /* montant d'un ticket */
  --fs-prime-xl: clamp(2.5rem, 1.9rem + 2.4vw, 3.75rem); /* montant d'un ticket vedette */

  --lh-tight: 1;
  --lh-title: 1.15;
  --lh-text: 1.55;

  --tr-display: -.02em;
  --tr-title: -.01em;
  --tr-label: 0;        /* étiquettes en casse normale : pas d'espacement */

  /* Espacements (base 4 px) */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;  --sp-4: 1rem;
  --sp-5: 1.25rem; --sp-6: 1.5rem;  --sp-8: 2rem;    --sp-10: 2.5rem;
  --sp-12: 3rem;   --sp-16: 4rem;   --sp-20: 5rem;
  --gutter: 1rem;                       /* marge latérale mobile : 16 px */
  --container: 1200px;
  --container-narrow: 760px;

  /* Rayons */
  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;

  /* Ticket */
  --tk-radius: 16px;
  --tk-notch: 9px;      /* rayon des encoches */
  --tk-stub-w: 124px;

  /* Cibles tactiles */
  --tap: 44px;

  /* Animations */
  --dur-1: 120ms;   /* retour immédiat (survol, appui) */
  --dur-2: 200ms;   /* changement d'état (copié, onglet) */
  --dur-3: 320ms;   /* panneaux, toast */
  --dur-4: 560ms;   /* animation d'ouverture des tickets */
  --stagger: 60ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  /* Plans */
  --z-header: 50; --z-menu: 60; --z-toast: 90;
}

@media (min-width: 768px) {
  :root { --gutter: 1.5rem; --tk-stub-w: 132px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 2rem; }
}
/* ==========================================================================
   Meilleur Code Parrainage · composants « Le Ticket v2 »
   Mobile d'abord. Dépend de tokens.css (et fonts.css).
   Points de rupture : 520 px (grand mobile), 768 px (tablette), 1024 px, 1280 px.
   ========================================================================== */

/* ---------- 0. Socle ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-text);
  font-stretch: var(--wd-text);
  color: var(--ink);
  background: var(--bg);   /* fond uni dans les 4 variantes (style sobre du 21/10) */
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "kern", "liga";
  overflow-x: clip;
}
[data-theme] { color: var(--ink); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: var(--lh-title); font-stretch: var(--wd-title); letter-spacing: var(--tr-title); font-weight: var(--fw-title); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
::selection { background: var(--accent); color: var(--on-accent); }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--focus-halo);
  border-radius: var(--r-xs);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--accent-fill, var(--accent)); color: var(--on-accent); font-weight: var(--fw-strong);
  padding: 12px 16px; border-radius: var(--r-sm); text-decoration: none;
}
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }
.stack > * + * { margin-top: var(--sp-4); }

/* Petites capitales mono : étiquettes, dates, compteurs */
.label {
  font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 600;
 letter-spacing: var(--tr-label); color: var(--muted);
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.display {
  font-size: var(--fs-display); font-weight: var(--fw-title); font-stretch: var(--wd-display);
  letter-spacing: var(--tr-display); line-height: .98; 
}
.mark {
  background: var(--accent-fill, var(--accent)); color: var(--on-accent);
  padding: 0 .12em; border-radius: .14em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.section-title { font-size: var(--fs-xl); font-weight: var(--fw-title); font-stretch: var(--wd-title); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.section-head .label { display: block; margin-bottom: var(--sp-2); }
.lede { font-size: var(--fs-md); color: var(--ink-2); max-width: 60ch; }

/* Icônes en ligne */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic--sm { width: 16px; height: 16px; }

/* ---------- 1. Logo « ticket validé » ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: var(--tap); }
.logo:hover { text-decoration: none; }
.logo__mark { width: 40px; height: 40px; flex: none; box-sizing: border-box; padding: 10px 5px; border-radius: 11px; background: var(--logo-fond, var(--accent)); } /* 26/10/2026, demande de Tom : l'ancien favicon devient le logo (pastille + ticket blanc + coche), adapté à chaque thème */
.logo__mark .t { fill: var(--logo-ticket, #fff); }
.logo__mark .c { stroke: var(--logo-coche, var(--accent)); }
.logo__mark .p { stroke: var(--logo-coche, var(--accent)); } /* pointillés du ticket (26/10/2026) */
.logo__word { font-weight: var(--fw-strong); font-stretch: var(--wd-title); letter-spacing: -.015em; line-height: 1; font-size: 15px; }
.logo__word span { display: block; white-space: nowrap; }
.logo__word span + span { margin-top: 2px; }
@media (min-width: 600px) and (max-width: 1023px) {
  .logo__word { font-size: 17px; }
  .logo__word span { display: inline; }
  .logo__word span + span { margin: 0 0 0 .25em; }
}

/* ---------- 2. Bandeau d'annonce ---------- */
.announce {
  background: var(--ftr-bg); color: var(--ftr-ink); border-bottom: 1px solid var(--ftr-border);
  font-size: var(--fs-sm); text-align: center; padding: 8px var(--gutter);
}
.announce { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 6px; min-height: var(--tap); text-decoration: none; }
.announce__cta { font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .2em; }
.announce:hover .announce__cta { text-decoration-thickness: 3px; }

/* ---------- 3. En-tête ---------- */
.hdr {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr__bar { display: flex; align-items: center; gap: var(--sp-2); min-height: 64px; }
.hdr__nav { display: none; }
.hdr__tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.hdr__search { display: none; }
.hdr .hdr__member { display: none; }

.nav__link {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px;
  font-size: var(--fs-sm); font-weight: 600; font-stretch: var(--wd-ui);
  color: var(--ink-2); text-decoration: none; border-radius: var(--r-sm); white-space: nowrap;
}
.nav__link:hover { color: var(--ink); background: var(--surface-3); }
.nav__link[aria-current="page"] { color: var(--ink); background: var(--accent-fill, linear-gradient(var(--accent), var(--accent))) 12px calc(100% - 9px) / calc(100% - 24px) 3px no-repeat; }

/* Bouton icône (44 × 44) */
.icon-btn {
  display: inline-grid; place-items: center; width: var(--tap); height: var(--tap);
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink);
  transition: background var(--dur-1);
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn .ic { width: 22px; height: 22px; }

/* Bascule de thème : l'icône change selon le thème courant */
.theme-toggle .ic-moon { display: var(--show-moon); }
.theme-toggle .ic-sun { display: var(--show-sun); }

/* Burger -> croix */
.menu-btn .bars-ic { width: 22px; height: 14px; position: relative; }
.menu-btn .bars-ic i { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1); }
.menu-btn .bars-ic i:nth-child(1) { top: 0; }
.menu-btn .bars-ic i:nth-child(2) { top: 6px; }
.menu-btn .bars-ic i:nth-child(3) { top: 12px; }
.menu-btn[aria-expanded="true"] .bars-ic i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars-ic i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .bars-ic i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Panneau de recherche mobile (sous la barre) */
.hdr__msearch { padding: 0 0 var(--sp-3); }
.hdr__msearch[hidden] { display: none; }

/* Menu mobile */
.mmenu {
  border-top: 1px solid var(--line); padding: var(--sp-3) 0 var(--sp-6);
  max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain;
}
.mmenu[hidden] { display: none; }
.mmenu__list { list-style: none; margin: 0; padding: 0; }
.mmenu__list a {
  display: flex; align-items: center; justify-content: space-between; min-height: 52px;
  font-size: var(--fs-md); font-weight: 700; font-stretch: var(--wd-ui);
  text-decoration: none; border-bottom: 1px dashed var(--line-2);
}
.mmenu__list a::after { content: "→"; font-family: var(--font-mono); color: var(--muted); }
.mmenu__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); margin-top: var(--sp-5); }
.mmenu__actions .btn { padding: 0 10px; white-space: normal; text-align: center; }
.mmenu__actions .mmenu__publier { grid-column: 1 / -1; min-height: 52px; font-size: var(--fs-sm); }
.mmenu__actions .btn--ghost { grid-column: 1 / -1; }

@media (min-width: 1024px) {
  .hdr__bar { min-height: 72px; gap: var(--sp-4); }
  .hdr__nav { display: flex; gap: 2px; }
  .hdr .hdr__member { display: inline-flex; }
  .hdr .menu-btn { display: none; }
  .mmenu { display: none; }
  .hdr__nav .nav__link--extra { display: none; }
}
@media (min-width: 1280px) {
  .hdr__search { display: block; width: 232px; }
  .hdr .msearch-btn { display: none; }
}

/* En-tête, passe 3 (19/10/2026) : bouton « Publier mon code de parrainage » visible en permanence
   (ordinateur et mobile), bascule clair / sombre à droite. Largeurs vérifiées de 320 à 1920 px
   par tools/rendu-theme (aucun débordement, cibles de 44 px).
   Ordre : ordinateur [recherche | loupe] [Publier] [Mon espace] [thème] ;
           téléphone et tablette [Publier] [loupe] [thème] [menu]. */
.hdr > .container { max-width: 1600px; }
.hdr .logo { min-width: 0; flex: 0 1 auto; }
.hdr__tools { flex: none; }
.tk-publier { gap: 6px; }
.tk-publier .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.tk-publier__t { white-space: nowrap; }
.tk-publier__m, .tk-publier__l { display: none; }
.tk-publier--complet .tk-publier__t { white-space: normal; }
.tk-publier--complet .tk-publier__m, .tk-publier--complet .tk-publier__l { display: inline; }
.hdr .hdr__publier { padding: 0 12px; } /* .hdr : passe devant .btn--sm, défini plus loin */
/* Recherche mobile : [champ][Fermer] sur une ligne ; les suggestions ne recouvrent jamais « Fermer ». */
.hdr__msearch { display: flex; align-items: center; gap: 4px; position: relative; }
@media (min-width: 1280px) { .hdr__msearch { display: none; } } /* ouvert sur téléphone puis fenêtre élargie : refermé */
.hdr__msearch .search { flex: 1; min-width: 0; position: static; } /* suggestions sur toute la largeur de la ligne */
.hdr__msearch-close { flex: none; margin-right: -8px; padding-inline: 10px; }
@media (max-width: 1023px) { .hdr__publier { order: -1; margin-right: 4px; } }
/* Téléphones : logo plus compact (le nom passe sur trois lignes plutôt que de déborder)
   et bouton « Publier » resserré ; sous 375 px, il perd son « + » (le texte reste). */
@media (max-width: 440px) {
  .hdr .logo { gap: 8px; }
  .hdr .logo__mark { width: 36px; height: 36px; padding: 9px 4px; border-radius: 10px; }
  .hdr .logo__word { min-width: 0; font-size: 13px; }
  .hdr .logo__word span:first-child { white-space: normal; }
  .hdr .hdr__publier { padding: 0 10px; gap: 4px; font-stretch: 100%; letter-spacing: 0; }
}
@media (max-width: 374px) { .hdr__publier .ic { display: none; } }
/* Très petits écrans (≤ 340 px) : la pastille seule ; le lien garde son nom complet (aria-label). */
@media (max-width: 340px) { .hdr .logo__word { display: none; } }
/* Libellé du bouton selon la place (mesuré) : « Publier » sur téléphone et entre 1024 et 1439 px
   (les quatre liens de navigation y prennent la place), « Publier mon code » sur tablette et à partir
   de 1440 px, le nom complet à partir de 1600 px. */
@media (min-width: 640px) and (max-width: 1023px), (min-width: 1440px) { .hdr__publier .tk-publier__m { display: inline; } }
@media (min-width: 1600px) { .hdr__publier .tk-publier__l { display: inline; } }
@media (min-width: 1024px) and (max-width: 1279px) { .hdr .nav__link { padding: 0 9px; font-size: .8125rem; } }
/* 1024 à 1099 px (tablette en paysage) : le nom du logo peut passer sur trois lignes. */
@media (min-width: 1024px) and (max-width: 1099px) { .hdr .logo__word { min-width: 0; font-size: 14px; } .hdr .logo__word span:first-child { white-space: normal; } }
@media (min-width: 1280px) and (max-width: 1439px) { .hdr__search { width: 200px; } .hdr__search .kbd { display: none; } } /* l'exemple « Rechercher une marque » tient en entier */

/* ---------- 4. Recherche ---------- */
.search { position: relative; }
.search__box {
  display: flex; align-items: center; gap: var(--sp-2);
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--r-lg);
  padding: 6px 6px 6px 16px; box-shadow: var(--shadow-search);
  transition: box-shadow var(--dur-2);
}
.search__box:focus-within { box-shadow: var(--shadow-search), 0 0 0 4px var(--focus-halo); }
/* L'anneau encre porte le contraste ; le halo vert n'est qu'un complément */
.search__box:has(.search__input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.search__box .ic { color: var(--muted); }
.search__input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: var(--fs-md); font-weight: 500; padding: 12px 0; min-height: 48px;
}
.search__input::placeholder { color: var(--muted); opacity: 1; }
.search__input::-webkit-search-cancel-button { display: none; }
.search__input:focus-visible { box-shadow: none; outline: none; }
.search__clear { width: 40px; height: 40px; }
.search__clear[hidden] { display: none; }
.search__submit {
  border: 0; background: var(--go-bg, var(--sel-bg)); color: var(--go-ink, var(--sel-ink));
  font-weight: var(--fw-strong); font-stretch: var(--wd-title); letter-spacing: 0;
  min-height: 48px; padding: 0 18px; border-radius: 11px; font-size: var(--fs-sm);
  transition: transform var(--dur-1);
}
.search__submit:active { transform: scale(.97); }
.search__submit { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none; }
.search__submit .ic { width: 20px; height: 20px; stroke-width: 2.4; }
/* Mobile : le bouton se réduit à une flèche carrée pour laisser la place à la saisie */
@media (max-width: 519px) {
  .search__submit { width: 48px; padding: 0; }
  .search__submit-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (min-width: 520px) { .search__submit { padding: 0 24px; font-size: var(--fs-base); } .search__submit .ic { display: none; } }

/* Recherche compacte (en-tête) */
.search--compact .search__box { border-width: 1px; border-color: var(--line-input); box-shadow: none; padding: 0 4px 0 12px; border-radius: var(--r-md); }
.search--compact .search__box:focus-within { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--focus-halo); }
.search--compact .search__input { font-size: var(--fs-sm); min-height: 42px; padding: 0; }
.search--compact .kbd { margin-right: 6px; }
.kbd {
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; color: var(--muted);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px;
}
.search--compact .search__panel { min-width: min(420px, calc(100vw - 2 * var(--gutter))); right: 0; left: auto; }

/* Panneau de suggestions */
.search__panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-3); overflow: hidden; text-align: left;
}
.search__panel[hidden] { display: none; }
.search__meta {
  display: flex; justify-content: space-between; gap: var(--sp-2); padding: 10px 16px;
  border-bottom: 1px dashed var(--line-2); background: var(--surface-2);
}
.sugg { list-style: none; margin: 0; padding: 6px; max-height: min(60vh, 440px); overflow-y: auto; }
.sugg__item { display: flex; align-items: center; gap: var(--sp-2); border-radius: var(--r-md); padding: 4px 4px 4px 8px; }
.sugg__item.is-active, .sugg__item:hover { background: var(--surface-2); }
.sugg__item.is-active { box-shadow: inset 3px 0 0 var(--accent); }
.sugg__link {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-3);
  text-decoration: none; min-height: 52px; padding: 4px 0; border-radius: var(--r-sm);
}
.sugg__link:hover { text-decoration: none; }
.sugg__txt { min-width: 0; display: grid; }
.sugg__name { font-weight: 700; font-stretch: var(--wd-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg__name mark { background: var(--highlight); color: var(--on-accent); border-radius: 3px; padding: 0 1px; }
.sugg__sub { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg__sub b { color: var(--ink); font-weight: 700; }
.sugg__copy { flex: none; }
.sugg__empty { padding: var(--sp-6) var(--sp-4); text-align: center; }
.sugg__empty p + p { margin-top: var(--sp-2); }
.sugg__empty-txt { font-size: .9375rem; color: var(--muted); }
.search__hint { display: none; padding: 8px 16px; border-top: 1px solid var(--line); gap: var(--sp-4); }
@media (min-width: 768px) { .search__hint { display: flex; } }

/* Monogramme / logo de marque */
.mono-logo {
  width: 40px; height: 40px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: var(--tk-logo-bg); color: var(--tk-ink); border: 1.5px solid currentColor;
  font-weight: var(--fw-title); font-stretch: 100%; font-size: 19px; line-height: 1; letter-spacing: 0;
  overflow: hidden;
}
.mono-logo img { width: 100%; height: 100%; object-fit: contain; }
.sugg .mono-logo { width: 36px; height: 36px; font-size: 17px; background: var(--surface-2); color: var(--ink); }
/* Vrai logo (fond blanc, comme les logos des tickets), dans les suggestions et l'assistant */
.mono-logo.mono-logo--img, .sugg .mono-logo.mono-logo--img { padding: 3px; background: #fff; border: 1px solid rgba(17, 19, 26, .14); }

/* ---------- 5. Accueil : bloc héros de recherche ---------- */
.hero { padding: var(--sp-10) 0 var(--sp-8); text-align: center; }
.hero__kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: var(--sp-4); }
.hero__kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }
.hero h1 { margin: 0 auto var(--sp-4); max-width: 15ch; }
.hero__lede { margin: 0 auto var(--sp-6); max-width: 34ch; font-size: var(--fs-md); color: var(--ink-2); }
.hero .search { max-width: 640px; margin-inline: auto; text-align: left; }
.hero .chips { margin-top: var(--sp-5); }
@media (min-width: 768px) { .hero { padding: var(--sp-16) 0 var(--sp-12); } }

/* ---------- 6. Pastilles de catégories ---------- */
.chips {
  display: flex; gap: var(--sp-2); overflow-x: auto; scroll-snap-type: x proximity;
  padding: 4px var(--gutter) 8px; margin-inline: calc(-1 * var(--gutter));
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - 28px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chips--wrap { flex-wrap: wrap; justify-content: center; overflow: visible; margin-inline: 0; padding-inline: 0; -webkit-mask-image: none; mask-image: none; }
@media (min-width: 768px) {
  .chips { flex-wrap: wrap; justify-content: center; overflow: visible; margin-inline: 0; padding-inline: 0; -webkit-mask-image: none; mask-image: none; }
  .chips--start { justify-content: flex-start; }
}
.chip {
  flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px;
  min-height: var(--tap); padding: 0 14px; border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-input);
  font-size: var(--fs-sm); font-weight: 600; font-stretch: var(--wd-ui); text-decoration: none; white-space: nowrap;
  transition: border-color var(--dur-1), background var(--dur-1), transform var(--dur-1);
}
.chip:hover { text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--line-strong); } }
.chip:active { transform: scale(.97); }
.chip__count { font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.chip[aria-current="page"], .chip[aria-pressed="true"] { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-bg); }
.chip[aria-current="page"] .chip__count, .chip[aria-pressed="true"] .chip__count { color: var(--sel-muted); }

/* ---------- 7. Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 700;
 letter-spacing: 0; line-height: 1;
  padding: 5px 8px; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--ink);
}
.badge .ic { width: 12px; height: 12px; stroke-width: 3; }
/* « Composté » : cartouche en pointillés, coche verte, date lisible (« le 16 oct. ») */
.badge--verified { background: transparent; color: var(--tk-ink); border: 1.5px dashed currentColor; border-radius: 6px; padding: 4px 7px; letter-spacing: 0; }
.badge--verified .ic { color: var(--tk-check); stroke-width: 3.4; }
.badge--ok { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.badge--accent { background: var(--accent-fill, var(--accent)); color: var(--on-accent); }
.badge--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.badge--warn { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); }
.badge--muted { background: var(--surface-3); color: var(--muted); }
.badge--member { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ---------- 8. Boutons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-ink: var(--ink); --btn-line: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--r-md);
  background: var(--btn-bg); color: var(--btn-ink); border: 1.5px solid var(--btn-line);
  background-origin: border-box; /* un dégradé passe sous la bordure transparente, sans liseré au bord */
  font-size: var(--fs-sm); font-weight: var(--fw-strong); font-stretch: var(--wd-title);
 letter-spacing: 0; text-decoration: none; white-space: nowrap;
  transition: background var(--dur-1), color var(--dur-1), transform var(--dur-1), box-shadow var(--dur-1);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(.985); }
.btn--primary { --btn-bg: var(--sel-bg); --btn-ink: var(--sel-ink); --btn-line: var(--sel-bg); }
.btn--accent { --btn-bg: var(--accent-fill, var(--accent)); --btn-ink: var(--on-accent); --btn-line: var(--accent-line, var(--accent)); }
.btn--ghost { --btn-bg: transparent; --btn-line: transparent; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }
.btn--ghost:hover { text-decoration: underline; }
/* Survol réservé aux pointeurs fins : rien ne reste « collé » après un toucher */
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { --btn-bg: var(--sel-hover); --btn-line: var(--sel-hover); }
  .btn--accent:hover { --btn-bg: var(--accent-fill-hover, var(--accent-hover)); }
  .btn--secondary:hover { --btn-bg: var(--surface-2); }
  .btn--ghost:hover { --btn-bg: var(--surface-3); }
  .copy:hover { background: var(--accent-fill-hover, var(--accent-hover)); }
  }
/* Fantôme empilé seul (mobile) : texte aligné sur le bord des autres boutons */
@media (max-width: 519px) { .btn-row--stack .btn--ghost, .empty .btn--ghost { padding-inline: 4px; } }
.btn--sm { min-height: var(--tap); padding: 0 14px; font-size: var(--fs-xs); border-radius: var(--r-sm); }
.btn--lg { min-height: 56px; padding: 10px 28px; font-size: var(--fs-base); white-space: normal; text-align: center; text-wrap: balance; }
.btn { max-width: 100%; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn .ic { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* Bouton Copier (dans un talon, une suggestion ou seul) */
.copy {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--tap); padding: 0 14px; border: 0; border-radius: 10px;
  background: var(--accent-fill, var(--accent)); color: var(--on-accent);
  font-size: var(--fs-xs); font-weight: var(--fw-strong); font-stretch: var(--wd-title); letter-spacing: 0;
  transition: background var(--dur-2), color var(--dur-2), transform var(--dur-1);
}
.copy:active { transform: scale(.96); }
.copy .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.copy .mono { text-transform: none; letter-spacing: 0; font-weight: 700; } /* un code n'est jamais mis en majuscules */
.copy .copy__ok { display: none; }
.copy.is-copied { background: var(--copied-bg); color: var(--copied-ink); }
.copy.is-copied .copy__ok { display: inline-flex; }
.copy.is-copied .copy__idle { display: none; }
.copy.is-copied .ic-check { animation: pop var(--dur-3) var(--ease-spring); }
.copy__idle, .copy__ok { align-items: center; gap: 6px; display: inline-flex; }
.copy--ink { background: var(--sel-bg); color: var(--sel-ink); }
.copy--ink:hover { background: var(--sel-hover); }

/* ---------- 9. Ticket d'offre ---------- */
.tk-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }
@media (min-width: 768px) { .tk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); } }
@media (min-width: 1100px) { .tk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.tk {
  --cut: calc(100% - var(--tk-stub-w));
  position: relative; display: block; filter: var(--tk-shadow-sm);
  transition: filter var(--dur-2), transform var(--dur-2) var(--ease-out);
  color: var(--tk-ink);
  min-width: 0;
}
/* Double ombre seulement sur grand écran (un seul filtre sur mobile : défilement fluide) */
@media (min-width: 1024px) { .tk { filter: var(--tk-shadow); } }
@media (hover: hover) and (pointer: fine) { .tk:hover { filter: var(--tk-shadow-hover); transform: translateY(-2px); } }
.tk__body {
  display: flex; min-height: 100%; border-radius: var(--tk-radius); background: var(--tk-bg); color: var(--tk-ink);
  /* Encoches réelles (le fond de page apparaît au travers, quel qu'il soit) */
  -webkit-mask:
    radial-gradient(circle at var(--cut) 0, #0000 var(--tk-notch), #000 calc(var(--tk-notch) + .5px)) top / 100% 51% no-repeat,
    radial-gradient(circle at var(--cut) 100%, #0000 var(--tk-notch), #000 calc(var(--tk-notch) + .5px)) bottom / 100% 51% no-repeat;
          mask:
    radial-gradient(circle at var(--cut) 0, #0000 var(--tk-notch), #000 calc(var(--tk-notch) + .5px)) top / 100% 51% no-repeat,
    radial-gradient(circle at var(--cut) 100%, #0000 var(--tk-notch), #000 calc(var(--tk-notch) + .5px)) bottom / 100% 51% no-repeat;
}
/* Grille rigide de carte d'embarquement : en-tête / champs / (espace) / pied.
   Le montant est toujours juste sous l'en-tête, à la même hauteur dans toute la rangée. */
.tk__main { position: relative; flex: 1; min-width: 0; padding: 16px; display: grid; grid-template-rows: auto auto 1fr auto; row-gap: 14px; }
.tk__main > .tk__foot { grid-row: 4; }
.tk__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tk__id { min-width: 0; flex: 1; }
.tk__name {
  display: block; font-size: var(--fs-base); font-weight: var(--fw-strong); font-stretch: var(--wd-ui); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; color: inherit; border-radius: 4px;
}
/* Lien étiré : tout le corps du ticket ouvre la fiche, le talon reste indépendant */
.tk__name::after { content: ""; position: absolute; inset: 0; border-radius: var(--tk-radius) 0 0 var(--tk-radius); }
@media (hover: hover) and (pointer: fine) { .tk__name:hover { text-decoration: underline; } }
.tk__name:focus-visible { outline: none; box-shadow: none; }
.tk__name:focus-visible::after { outline: 3px solid var(--tk-ink); outline-offset: -5px; box-shadow: inset 0 0 0 8px var(--tk-focus-halo); }
.tk__cat { display: block; margin-top: 3px; font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0; color: var(--tk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk__cat .cat--short { display: none; }
.tk .mono-logo { background: var(--tk-logo-bg); color: var(--tk-ink); }
.tk .badge--verified { position: relative; z-index: 1; flex: none; }
.tk__fields { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 20px; }
.tk__f { display: grid; gap: 5px; min-width: 0; }
.tk__f--sec { flex: 1 1 120px; padding-bottom: 1px; }
/* Paire filleul / parrain : les deux montants côte à côte */
.tk__f--pair { flex: 0 1 auto; padding-left: 16px; border-left: 1px dashed var(--tk-line); }
.tk__f--pair .tk__sec { font-size: var(--fs-lg); font-weight: var(--fw-strong); font-stretch: var(--wd-title); letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.tk__lab { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: var(--tr-label); color: var(--tk-muted); }
.tk__prime { font-size: var(--fs-prime); font-weight: var(--fw-prime); font-stretch: var(--wd-display); line-height: .95; letter-spacing: var(--tr-display); white-space: nowrap; font-variant-numeric: lining-nums; }
/* « jusqu'à » en ligne, devant le chiffre, en encre et lisible (pas une note grise au-dessus) */
.tk__upto { font-size: max(12px, .4em); font-weight: 700; font-stretch: var(--wd-ui); letter-spacing: 0; margin-right: .3em; vertical-align: .3em; color: var(--tk-ink); }
.tk__unit { font-family: var(--font-mono); font-size: max(11px, .36em); font-weight: 700; letter-spacing: 0; margin-left: .3em; vertical-align: .1em; }
.tk__prime--text { font-size: var(--fs-md); font-stretch: var(--wd-title); letter-spacing: -.01em; white-space: normal; line-height: 1.15; }
.tk__sec {
  font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; color: var(--tk-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tk__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; white-space: nowrap; font-family: var(--font-mono); font-size: var(--fs-2xs); color: var(--tk-muted); letter-spacing: 0; }
.tk__foot .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

.tk__stub {
  position: relative; width: var(--tk-stub-w); flex: none;
  display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 8px;
  padding: 14px 12px; text-align: center;
  background: var(--tk-stub-bg); color: var(--tk-stub-ink);
  border-radius: 0 var(--tk-radius) var(--tk-radius) 0;
  --focus: var(--tk-focus); --focus-halo: transparent;
  transition: transform var(--dur-3) var(--ease-spring);
  transform-origin: 0 50%;
}
/* Pointillé de détachement */
.tk__stub::before {
  content: ""; position: absolute; left: -1px; top: calc(var(--tk-notch) + 4px); bottom: calc(var(--tk-notch) + 4px); width: 2px;
  background: repeating-linear-gradient(180deg, var(--tk-perf) 0 5px, transparent 5px 10px);
}
.tk__codelab { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0; color: var(--tk-stub-muted); }
/* Un code n'est jamais coupé au hasard : une ligne, ou deux moitiés égales (<wbr> au milieu) */
.tk__code {
  font-family: var(--font-mono); font-size: 15px; font-weight: 700; letter-spacing: 0; line-height: 1.25;
  white-space: nowrap; font-feature-settings: "zero" 1; user-select: all; -webkit-user-select: all;
}
.tk__code--md { font-size: 12.5px; letter-spacing: 0; }
.tk__code--2l { font-size: 14px; letter-spacing: 0; white-space: normal; word-break: normal; overflow-wrap: normal; }
.tk__code--sm { font-size: 12px; }
.tk__code--link { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 700; font-stretch: var(--wd-ui); letter-spacing: 0; user-select: auto; -webkit-user-select: auto; }
.tk__stub .copy { width: 100%; padding: 0 6px; background: var(--tk-copy-bg); color: var(--tk-copy-ink); }
@media (hover: hover) and (pointer: fine) { .tk__stub .copy:hover { background: var(--tk-copy-bg); filter: brightness(1.06); } }
.tk__stub .copy.is-copied { background: var(--tk-copied-bg); color: var(--tk-copied-ink); }
.tk__stub .copy--link { text-decoration: none; }
/* Code-barres généré par code (SVG propre à chaque offre), décoratif */
.bars { display: block; width: 100%; height: 22px; fill: currentColor; color: var(--tk-stub-ink); opacity: var(--tk-bars-o); shape-rendering: crispEdges; }
.bars--mini { height: 6px; }
.tk__serial { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: 0; color: var(--tk-stub-muted); margin-top: -4px; }

/* Geste « détacher » à la copie (coupé si mouvement réduit) */
@media (prefers-reduced-motion: no-preference) {
  .tk.is-tearing .tk__stub { transform: translateX(4px) rotate(1deg); transition-duration: 160ms; }
}

/* Ticket : état épuisé — pas d'opacité, des jetons dédiés (AA) et un talon hachuré */
.tk--off { filter: none; }
.tk--off:hover { transform: none; filter: none; }
.tk--off .tk__body { background: var(--off-bg); color: var(--off-ink); }
.tk--off .tk__stub { background: var(--off-bg-2) repeating-linear-gradient(-45deg, var(--off-hatch) 0 1px, transparent 1px 8px); color: var(--off-ink); }
.tk--off .tk__stub::before { background: repeating-linear-gradient(180deg, var(--off-ink) 0 5px, transparent 5px 10px); opacity: .5; }
.tk--off .tk__prime, .tk--off .tk__code--void { text-decoration: line-through; text-decoration-thickness: 3px; }
.tk--off .tk__code--void { text-decoration-thickness: 2px; user-select: none; -webkit-user-select: none; }
.tk--off .tk__name, .tk--off .tk__sec, .tk--off .tk__upto { color: var(--off-ink); }
.tk--off .tk__lab, .tk--off .tk__cat, .tk--off .tk__codelab, .tk--off .tk__foot { color: var(--off-ink); }
.tk--off .tk__void { font-weight: 700; }
.tk--off .mono-logo { background: transparent; color: var(--off-ink); }
.tk__stamp {
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-2xs); letter-spacing: 0; 
  border: 1.5px solid var(--danger); border-radius: 6px; padding: 3px 7px; color: var(--danger-ink);
}

/* Variante compacte (listes, résultats, fiches similaires) */
.tk--compact { --tk-stub-w: 124px; --tk-notch: 6px; --tk-radius: 12px; }
.tk--compact .tk__main { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; }
.tk--compact .mono-logo { width: 36px; height: 36px; font-size: 17px; border-radius: 7px; }
.tk--compact .tk__id { flex: 1; }
/* Le nom de marque n'est jamais tronqué : deux lignes au plus, sans ellipse */
.tk--compact .tk__name { font-size: var(--fs-sm); white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.15; overflow-wrap: break-word; }
.tk--compact .tk__cat { display: block; font-size: var(--fs-2xs); }
.tk--compact .tk__f--c { flex: none; justify-items: end; text-align: right; gap: 3px; }
/* En compact, la restriction rejoint l'étiquette, en encre : « FILLEUL · JUSQU'À » */
.tk--compact .tk__lab--upto { display: grid; justify-items: end; color: var(--tk-ink); font-weight: 700; line-height: 1.25; }
.tk--compact .tk__sep { display: none; }
.tk--compact .tk__prime { font-size: 1.3125rem; }
.tk--compact .tk__prime--text { font-size: var(--fs-sm); font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 11ch; }
/* Seul le parrain est récompensé : montant moins mis en avant qu'un gain filleul */
.tk--compact .tk__f--parrain .tk__prime { font-size: 1.0625rem; color: var(--tk-muted); }
.tk--compact .tk__stub { padding: 10px 10px 12px; gap: 6px; }
.tk--compact .tk__code { font-size: 14px; display: grid; place-items: center; min-height: 24px; padding: 2px 0; border-radius: 6px; background: var(--tk-slot); }
.tk--compact .tk__code--md { font-size: 12.5px; }
.tk--compact .tk__code--2l { font-size: 13px; line-height: 1.2; }
.tk--compact .tk__code--link { background: none; }
.tk--compact .copy { min-height: var(--tap); font-size: var(--fs-2xs); }
.tk-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 768px) { .tk-list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; } }
@media (min-width: 1280px) { .tk-list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tk-list--2.tk-list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 419px) {
  .tk--compact .mono-logo { display: none; }
  .tk--compact .tk__cat .cat--long { display: none; }
  .tk--compact .tk__cat .cat--short { display: inline; }
}

/* Variante vedette (sélection du mois, n° 1 d'une catégorie) */
.tk--featured { --tk-stub-w: 132px; --tk-notch: 12px; --tk-radius: 20px; }
.tk--featured .tk__main { padding: 0 0 18px; gap: 16px; grid-template-rows: auto auto auto auto 1fr auto; }
.tk--featured .tk__main > .tk__foot { grid-row: 6; }
.tk--featured .tk__ribbon {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; background: var(--ribbon-bg, var(--accent-fill, var(--accent))); color: var(--ribbon-ink, var(--on-accent));
  border-radius: var(--tk-radius) 0 0 0;
  font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 700; letter-spacing: 0;
}
.tk--featured .tk__head, .tk--featured .tk__fields, .tk--featured .tk__extra, .tk--featured .tk__foot { padding-inline: 16px; }
.tk--featured .mono-logo { width: 48px; height: 48px; font-size: 18px; border-radius: 12px; }
.tk--featured .tk__name { font-size: var(--fs-lg); font-weight: var(--fw-title); font-stretch: var(--wd-title); white-space: normal; }
.tk--featured .tk__prime { font-size: var(--fs-prime-xl); }
.tk--featured .tk__extra { display: grid; gap: 8px; }
.tk--featured .tk__cond { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; font-size: var(--fs-sm); }
.tk--featured .tk__cond dt { font-family: var(--font-mono); font-size: var(--fs-2xs); font-weight: 600; letter-spacing: var(--tr-label); color: var(--tk-muted); padding-top: 3px; }
.tk--featured .tk__cond dd { margin: 0; font-weight: 600; }
.tk--featured .tk__code { font-size: 17px; }
.tk--featured .tk__code--md, .tk--featured .tk__code--2l { font-size: 15px; }
.tk--featured .tk__stub { gap: 10px; padding: 16px 12px; }
.tk--featured .bars { height: 34px; }
/* Vedette sombre : ruban encre + texte d'accent (jetons --ribbon-bg / --ribbon-ink du réglage sombre), séparé du talon */
@media (min-width: 768px) {
  .tk--featured { --tk-stub-w: 200px; }
  .tk--featured .tk__main { padding-bottom: 22px; }
  .tk--featured .tk__head, .tk--featured .tk__fields, .tk--featured .tk__extra, .tk--featured .tk__foot { padding-inline: 24px; }
  .tk--featured .tk__ribbon { padding-inline: 24px; }
  .tk--featured .tk__fields { column-gap: 32px; }
  .tk--featured .tk__code { font-size: 22px; }
  .tk--featured .tk__code--md, .tk--featured .tk__code--2l { font-size: 17px; }
  .tk--featured .tk__stub { padding: 20px 18px; }
  .tk--featured .copy { min-height: 52px; font-size: var(--fs-sm); }
}

/* Vedette sur mobile : le talon passe en bas, perforation horizontale */
@media (max-width: 767px) {
  .tk--featured { --stub-h: 128px; --cuty: calc(100% - var(--stub-h)); }
  .tk--featured .tk__body {
    flex-direction: column;
    -webkit-mask:
      radial-gradient(circle at 0 var(--cuty), #0000 var(--tk-notch), #000 calc(var(--tk-notch) + .5px)) left / 51% 100% no-repeat,
      radial-gradient(circle at 100% var(--cuty), #0000 var(--tk-notch), #000 calc(var(--tk-notch) + .5px)) right / 51% 100% no-repeat;
            mask:
      radial-gradient(circle at 0 var(--cuty), #0000 var(--tk-notch), #000 calc(var(--tk-notch) + .5px)) left / 51% 100% no-repeat,
      radial-gradient(circle at 100% var(--cuty), #0000 var(--tk-notch), #000 calc(var(--tk-notch) + .5px)) right / 51% 100% no-repeat;
  }
  .tk--featured .tk__ribbon { border-radius: var(--tk-radius) var(--tk-radius) 0 0; }
  .tk--featured .tk__stub {
    width: auto; height: var(--stub-h); border-radius: 0 0 var(--tk-radius) var(--tk-radius);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto auto auto; align-content: center;
    column-gap: 16px; row-gap: 4px; padding: 18px 20px; text-align: left;
  }
  .tk--featured .tk__stub::before {
    left: calc(var(--tk-notch) + 4px); right: calc(var(--tk-notch) + 4px); top: -1px; bottom: auto; width: auto; height: 2px;
    background: repeating-linear-gradient(90deg, var(--tk-perf) 0 6px, transparent 6px 12px);
  }
  .tk--featured .tk__codelab { grid-column: 1; grid-row: 1; }
  .tk--featured .tk__code { grid-column: 1; grid-row: 2; font-size: 20px; }
  .tk--featured .copy { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-height: 52px; padding: 0 20px; font-size: var(--fs-sm); }
  .tk--featured .bars { grid-column: 1 / -1; grid-row: 3; height: 18px; margin-top: 8px; }
  .tk--featured .tk__serial { grid-column: 1 / -1; grid-row: 4; margin-top: 2px; }
  .tk--featured { --stub-h: 148px; }
}

/* Animation d'ouverture : une seule, sur les premiers tickets */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] > .tk:nth-child(-n+9), .js [data-reveal] > li:nth-child(-n+9) > .tk {
    animation: tk-in var(--dur-4) var(--ease-out) both;
    animation-delay: calc(var(--i, 0) * var(--stagger));
  }
}
@keyframes tk-in { from { opacity: 0; transform: translateY(14px) rotate(-.4deg); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }

/* ---------- 10. Barre de code collante (fiche, mobile) ---------- */
.codebar {
  position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: var(--surface-inverse); color: var(--ink-inverse);
  border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, .35);
}
.codebar__txt { min-width: 0; flex: 1; }
.codebar__lab { display: block; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: 0; color: var(--muted-inverse); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.codebar__code { display: block; font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.codebar .copy { min-height: 48px; padding: 0 20px; background: var(--bar-copy-bg); color: var(--bar-copy-ink); }

/* ---------- 11. Champs de formulaire ---------- */
.form-grid { display: grid; gap: var(--sp-5); align-items: start; }
@media (min-width: 768px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field__label { font-weight: 700; font-size: var(--fs-sm); font-stretch: var(--wd-ui); }
.field__label .opt { font-weight: 500; color: var(--muted); }
.field__hint { font-size: var(--fs-xs); color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 48px; padding: 0 14px; line-height: 1.4;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line-input); border-radius: var(--r-md);
  font-size: var(--fs-base); /* 16 px : évite le zoom automatique sur iOS */
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
@media (hover: hover) and (pointer: fine) { .input:hover, .select:hover, .textarea:hover { border-color: var(--ink-2); } }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--line-strong); box-shadow: 0 0 0 6px var(--focus-halo); border-radius: var(--r-md); }
.input--mono { font-family: var(--font-mono); letter-spacing: 0; }
.textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat;
}
.field--error .input, .field--error .textarea, .field--error .select { border-color: var(--danger); }
.field__error { display: flex; gap: 6px; align-items: center; font-size: var(--fs-xs); font-weight: 600; color: var(--danger); }
.check { display: flex; gap: 12px; align-items: flex-start; min-height: var(--tap); padding-top: 10px; cursor: pointer; font-size: var(--fs-sm); }
.check input {
  appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0;
  border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--surface);
  display: grid; place-items: center; transition: background var(--dur-1);
}
.check input[type="radio"] { border-radius: 50%; }
.check input::after { content: ""; width: 10px; height: 6px; border: solid var(--on-accent); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform var(--dur-2) var(--ease-spring); }
.check input[type="radio"]::after { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--on-accent); transform: scale(0); }
.check input:checked { background: var(--accent-fill, var(--accent)); border-color: var(--line-strong); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input[type="radio"]:checked::after { transform: scale(1); }
.check input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.input-group { display: flex; gap: var(--sp-2); }
.input-group .input { flex: 1; }

/* ---------- 12. Onglets ---------- */
.tabs__list {
  display: flex; gap: 4px; padding: 4px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
}
.tabs__list::-webkit-scrollbar { display: none; }
@media (max-width: 767px) {
  .tabs__list { scroll-padding-inline: 8px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
  .tabs__list.is-end { -webkit-mask-image: none; mask-image: none; }
}
.tabs__tab {
  flex: 1 0 auto; min-height: var(--tap); padding: 0 16px; border: 0; border-radius: 9px; background: transparent;
  font-size: var(--fs-sm); font-weight: 700; font-stretch: var(--wd-ui); color: var(--muted); white-space: nowrap;
  transition: background var(--dur-2), color var(--dur-2);
}
@media (hover: hover) and (pointer: fine) { .tabs__tab:hover { color: var(--ink); background: var(--surface-2); } }
.tabs__tab[aria-selected="true"] { background: var(--sel-bg); color: var(--sel-ink); }
.tabs__panel { padding-top: var(--sp-5); }
.tabs__panel[hidden] { display: none; }
@media (min-width: 768px) { .tabs__list { display: inline-flex; } .tabs__tab { flex: 0 0 auto; } }

/* ---------- 13. Tableau ---------- */
.tbl-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.tbl caption { text-align: left; padding: 14px 16px; font-weight: var(--fw-strong); font-stretch: var(--wd-title); border-bottom: 1px solid var(--line); }
.tbl th { font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tr-label); color: var(--muted); text-align: left; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px dashed var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .num { text-align: right; font-family: var(--font-mono); }
.tbl .rank { font-family: var(--font-mono); font-weight: 700; width: 3.5em; color: var(--muted); }
.tbl tr:nth-child(-n+3) .rank { color: var(--ink); }
.tbl tr:first-child .rank span { background: var(--accent-fill, var(--accent)); color: var(--on-accent); padding: 2px 6px; border-radius: 4px; }
.tbl .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.tbl .brand a { text-decoration: none; }
.tbl__mclics { display: none; }
.tbl .brand a:hover { text-decoration: underline; }
.tbl .mono-logo { width: 30px; height: 30px; font-size: 15px; border-radius: 6px; background: var(--surface-2); color: var(--ink); }
.tbl .prime { font-weight: var(--fw-title); font-stretch: var(--wd-title); font-size: var(--fs-base); white-space: nowrap; }
/* Mobile : chaque ligne devient une carte */
@media (max-width: 767px) {
  .tbl--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl--stack tr { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px dashed var(--line); align-items: center; }
  .tbl--stack tbody tr:last-child { border-bottom: 0; }
  .tbl--stack td { padding: 0; border: 0; }
  .tbl--stack td.rank { grid-row: 1; align-self: center; width: auto; }
  .tbl--stack td.brand { grid-column: 2; grid-row: 1; min-height: 30px; }
  /* Toute la ligne ouvre la fiche (cible tactile pleine largeur) */
  .tbl--stack .brand a::after { content: ""; position: absolute; inset: 0; }
  .tbl--stack td.c-clics { display: none; }
  .tbl--stack .tbl__mclics { display: inline; }
  .tbl--stack td.c-prime { grid-column: 3; grid-row: 1; text-align: right; }
  .tbl--stack td.c-cat { grid-column: 2 / -1; font-size: var(--fs-xs); color: var(--muted); }
  .tbl--stack .mono-logo { display: none; }
  .tbl--stack .num { text-align: left; }
}

/* ---------- 14. Avatar et niveau de membre ---------- */
.member { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.avatar {
  --size: 44px; width: var(--size); height: var(--size); flex: none; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--sel-bg); color: var(--sel-ink);
  font-weight: var(--fw-title); font-stretch: var(--wd-display); font-size: calc(var(--size) * .38); letter-spacing: -.02em;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--line-2);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { --size: 32px; }
.avatar--lg { --size: 72px; }
.avatar--lvl { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4.5px var(--accent); }
.member__name { font-weight: var(--fw-strong); font-stretch: var(--wd-ui); line-height: 1.2; }
.member__meta { font-size: var(--fs-xs); color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.level { display: grid; gap: 6px; min-width: 0; }
.level__top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.level__name { font-weight: var(--fw-strong); font-stretch: var(--wd-title); }
.level__bar { height: 10px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; position: relative; }
.level__bar span {
  position: absolute; inset: 0 auto 0 0; width: var(--p, 50%); border-radius: inherit; background: var(--meter-bg);
  background-image: repeating-linear-gradient(90deg, transparent 0 6px, var(--meter-stripe) 6px 8px);
}
.level__steps { display: flex; justify-content: space-between; }

/* Carte générique */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-5); box-shadow: var(--shadow-1); min-width: 0; }

/* ---------- 15. Notification (toast) ---------- */
.toaster {
  position: fixed; z-index: var(--z-toast); left: var(--gutter); right: var(--gutter);
  bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 8px; justify-items: center; pointer-events: none;
}
@media (min-width: 768px) { .toaster { left: auto; right: 24px; bottom: 24px; justify-items: end; } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 420px; width: 100%;
  background: var(--surface-inverse); color: var(--ink-inverse);
  padding: 12px 12px 12px 14px; border-radius: var(--r-md); box-shadow: var(--shadow-3);
  font-size: var(--fs-sm); font-weight: 600;
  animation: toast-in var(--dur-3) var(--ease-out) both;
}
.toast.is-leaving { animation: toast-out var(--dur-2) ease-in both; }
.toast__ic { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--accent-fill, var(--accent)); color: var(--on-accent); }
.toast__ic .ic { width: 16px; height: 16px; stroke-width: 3; }
.toast__txt { flex: 1; min-width: 0; }
.toast__txt .mono { font-weight: 700; }
.toast .icon-btn { color: inherit; width: var(--tap); height: var(--tap); flex: none; }
.toast__txt a { color: inherit; font-weight: var(--fw-strong); white-space: nowrap; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.toast--error .toast__ic { background: var(--danger); color: #fff; }
/* Sur une fiche, la notification se pose au-dessus de la barre de code collante */
body:has(.codebar) .toaster { bottom: calc(88px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { body:has(.codebar) .toaster { bottom: 24px; } }
.toast .icon-btn:hover { background: rgba(127, 127, 127, .2); }
.toast--static { animation: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- 16. Fil d'Ariane ---------- */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; font-family: var(--font-sans); font-size: var(--fs-xs); letter-spacing: 0; }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li + li::before { content: "/"; color: var(--line-2); margin: 0 8px; }
.crumbs a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--tap); min-width: var(--tap); justify-content: center; padding-inline: 4px; }
.crumbs li:first-child a { justify-content: flex-start; padding-left: 0; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }

/* ---------- 17. Pagination et « voir plus » ---------- */
.more { display: grid; justify-items: center; gap: var(--sp-3); margin-top: var(--sp-8); text-align: center; }
.more__count { font-family: var(--font-sans); font-size: var(--fs-xs); color: var(--muted); }
.more__track { width: min(240px, 100%); height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.more__track span { display: block; height: 100%; width: var(--p, 0%); background: var(--sel-bg); transition: width var(--dur-3) var(--ease-out); }
.more[hidden], .more .btn[hidden] { display: none; }
.more__sentinel { height: 1px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; }
/* Enfants directs seulement : les libellés internes des liens ne deviennent pas des cases */
.pager > a, .pager > span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: var(--tap); height: var(--tap); padding: 0 10px; border-radius: var(--r-sm);
  font-family: var(--font-mono); font-weight: 700; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line-input); background: var(--surface);
}
@media (hover: hover) and (pointer: fine) { .pager > a:hover { border-color: var(--line-strong); } }
.pager > [aria-current="page"] { background: var(--sel-bg); color: var(--sel-ink); border-color: var(--sel-bg); }
.pager > .gap { border: 0; background: none; min-width: 20px; color: var(--muted); }
.pager > .pager__dir { font-family: var(--font-sans); font-stretch: var(--wd-ui); padding: 0 14px; }
/* Mobile : flèche seule, libellé gardé pour les lecteurs d'écran ; 5 numéros au plus */
@media (max-width: 519px) {
  .pager { flex-wrap: nowrap; }
  .pager .pager__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pager > .pager__dir { padding: 0; }
}

/* ---------- 18. FAQ ---------- */
.faq { border-top: 1.5px solid var(--line-strong); }
.faq__item { border-bottom: 1px dashed var(--line-2); }
.faq__q {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  min-height: 60px; padding: 14px 0; cursor: pointer;
  font-weight: var(--fw-strong); font-stretch: var(--wd-ui); font-size: var(--fs-base); line-height: 1.3;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.faq__sign { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--line-strong); background-origin: border-box; position: relative; transition: background var(--dur-2), transform var(--dur-2) var(--ease-out); }
.faq__sign::before, .faq__sign::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: currentColor; border-radius: 2px; transition: transform var(--dur-2) var(--ease-out); }
.faq__sign::after { transform: rotate(90deg); }
.faq__item[open] .faq__sign { background: var(--accent-fill, var(--accent)); border-color: var(--accent-line, var(--accent)); color: var(--on-accent); }
.faq__item[open] .faq__sign::after { transform: rotate(0); }
.faq__a { padding: 0 0 var(--sp-5); color: var(--ink-2); max-width: 70ch; }
.faq__a p + p { margin-top: var(--sp-3); }

/* ---------- 19. Encadrés (avertissement, information) ---------- */
.notice {
  --n-bg: var(--info-bg); --n-ink: var(--ink); --n-edge: var(--ink);
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: 12px;
  padding: 16px 16px 16px 22px; border-radius: var(--r-md); background: var(--n-bg); color: var(--n-ink);
  font-size: var(--fs-sm); overflow: hidden;
}
.notice::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--n-edge); }
.notice__ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--n-edge); color: var(--n-bg); font-family: var(--font-mono); font-weight: var(--fw-strong); font-size: 15px; }
.notice__title { font-weight: var(--fw-strong); font-stretch: var(--wd-ui); font-size: var(--fs-base); margin-bottom: 2px; }
.notice p + p { margin-top: 6px; }
.notice a { font-weight: 700; }
.notice--warn { --n-bg: var(--warn-bg); --n-ink: var(--ink); --n-edge: var(--ink); }
.notice--warn::before { width: 8px; background: repeating-linear-gradient(-45deg, var(--stripe-a) 0 6px, var(--stripe-b) 6px 12px); }
.notice--warn .notice__ic { background: var(--sel-bg); color: var(--sel-ink); }
.notice--ok { --n-bg: var(--ok-bg); --n-edge: var(--ok); }
.notice--danger { --n-bg: var(--danger-bg); --n-edge: var(--danger); }

/* ---------- 20. État vide ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: var(--sp-3); padding: var(--sp-10) var(--sp-4); border: 2px dashed var(--line-2); border-radius: var(--r-xl); background: var(--surface-2); }
.empty__ticket {
  width: 132px; height: 72px; border: 2px dashed var(--muted); border-radius: 12px; position: relative; margin-bottom: var(--sp-2);
  display: grid; place-items: center; font-family: var(--font-mono); font-weight: var(--fw-strong); font-size: 20px; color: var(--muted); transform: rotate(-4deg);
}
.empty__ticket::before, .empty__ticket::after { content: ""; position: absolute; left: 88px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface-2); border: 2px dashed var(--muted); }
.empty__ticket::before { top: -9px; clip-path: inset(50% 0 0 0); }
.empty__ticket::after { bottom: -9px; clip-path: inset(0 0 50% 0); }
.empty__title { font-size: var(--fs-lg); font-weight: var(--fw-title); font-stretch: var(--wd-title); }
.empty p { color: var(--ink-2); max-width: 44ch; }
.empty .btn-row { justify-content: center; margin-top: var(--sp-2); }

/* ---------- 21. Pied de page ---------- */
.ftr { margin-top: var(--sp-16); background: var(--ftr-bg); color: var(--ftr-ink); border-top: 1px solid var(--ftr-border); position: relative; --f-muted: var(--ftr-muted); --f-line: var(--ftr-line); --focus: var(--accent); }
/* Plus de bord perforé (21/10, fond uni demandé par Kevinoo) : un simple filet (border-top ci-dessus). */
.ftr .logo { color: inherit; }
.ftr__top { display: grid; gap: var(--sp-8); padding: var(--sp-12) 0 var(--sp-8); }
.ftr__brand p { color: var(--f-muted); margin-top: var(--sp-3); max-width: 34ch; font-size: var(--fs-sm); }
.ftr__publier { margin-top: var(--sp-5); max-width: 100%; text-align: left; }
.ftr__social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--sp-5); }
.ftr__social a {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); min-width: var(--tap); padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--f-line); font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 600; text-decoration: none;
}
.ftr__social a:hover { border-color: var(--accent); color: var(--accent); }
.ftr__cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-8) var(--sp-5); }
.ftr__col h2 { font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tr-label); color: var(--f-muted); margin-bottom: var(--sp-3); font-stretch: 100%; }
.ftr__col h3 { font-size: var(--fs-xs); font-weight: var(--fw-strong); margin: var(--sp-4) 0 2px; color: var(--accent); font-stretch: var(--wd-ui); letter-spacing: 0; }
.ftr__col h3:first-of-type { margin-top: 0; }
.ftr__col ul { list-style: none; margin: 0; padding: 0; display: grid; }
.ftr__col a { display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: var(--tap); font-size: var(--fs-sm); text-decoration: none; color: inherit; opacity: .92; }
.ftr__col a:hover { opacity: 1; text-decoration: underline; }
.ftr__col a .n { font-family: var(--font-sans); font-size: var(--fs-xs); color: var(--f-muted); }
.ftr__col--cats ul { grid-template-columns: 1fr 1fr; column-gap: var(--sp-5); }
.ftr__legal-box { border-top: 1px dashed var(--f-line); padding: var(--sp-6) 0; display: grid; gap: var(--sp-3); font-size: var(--fs-xs); color: var(--f-muted); }
.ftr__legal-box strong { color: inherit; filter: brightness(1.4); }
.ftr__legal-box .tel { font-family: var(--font-mono); font-weight: 700; white-space: nowrap; color: var(--accent); }
.ftr__age { display: inline-grid; place-items: center; min-width: 36px; height: 24px; border: 1.5px solid currentColor; border-radius: 6px; font-family: var(--font-mono); font-weight: var(--fw-strong); font-size: 11px; margin-right: 6px; vertical-align: middle; }
.ftr__bottom { border-top: 1px solid var(--f-line); padding: var(--sp-4) 0 var(--sp-8); display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); align-items: center; justify-content: space-between; font-size: var(--fs-xs); color: var(--f-muted); }
.ftr__bottom ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--sp-4); }
.ftr__bottom a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); color: inherit; }
@media (min-width: 768px) {
  .ftr__cols { grid-template-columns: 1.2fr 1fr 1fr; }
  .ftr__col--cats ul { grid-template-columns: 1fr; }
  .ftr__legal-box { grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
}
@media (min-width: 1100px) {
  .ftr__top { grid-template-columns: minmax(240px, 1fr) 3fr; gap: var(--sp-12); padding-top: var(--sp-16); }
  .ftr__cols { grid-template-columns: 1.6fr 1.3fr 1fr; gap: var(--sp-8) var(--sp-8); }
  .ftr__col--cats ul { grid-template-columns: 1fr 1fr; column-gap: var(--sp-6); }
  .ftr__col--cats a { white-space: nowrap; font-size: var(--fs-xs); }
}

/* ---------- 22. Mouvement réduit ----------
   !important fonctionnel (aucun ancien style visé) : quand le visiteur demande moins d'animations, aucune animation
   du thème ne doit passer outre, quelle que soit sa règle. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .tk:hover { transform: none; }
  .tk.is-tearing .tk__stub { transform: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- 23. Impression ----------
   !important fonctionnel : en-tête, pied et barres disparaissent du papier, quelles que soient leurs règles d'affichage. */
@media print {
  .hdr, .ftr, .codebar, .toaster, .copy { display: none !important; }
  body { background: #fff; }
  .tk { filter: none; }
}
/* ==========================================================================
   Meilleur Code Parrainage · deux thèmes de couleur (décision Kevinoo du 17/10/2026)

   - « Soleil » : BASE du site (visiteurs, et membres par défaut). Dégradé ORANGE → JAUNE
     (#FF5A1F → #FF8A00 → #FFC21A, jamais l'inverse), blanc chaud en clair, brun nuit en sombre.
   - « Matrix » : choix possible dans les paramètres de l'espace membre. Vert acide #d7ff3a.
     Clair = jetons de tokens.css (gris neutre) ; sombre = #070a07.
   Style sobre (décision de Kevinoo du 21/10/2026) : fonds UNIS dans les 4 variantes (plus de rayons, de trame de
   points, de grille ni de lignes de balayage), typographie en casse normale, même police de titre dans les deux thèmes.

   Activation : <html data-skin="soleil|matrix" data-theme="light|dark">.
   Sans data-skin = Soleil. Sans data-theme = réglage du système.
   Le sélecteur Soleil / Matrix n'apparaît PAS dans l'en-tête (seul le bouton clair / sombre y est).

   Ordre de chargement : fonts.css, tokens.css, components.css, PUIS skins.css.

   Règle anti-fuite : un jeton redéfini en Soleil clair est TOUJOURS redéfini en Soleil sombre
   (et inversement). Sinon une couleur du clair « fuit » dans le sombre (cas réel corrigé le
   18/10 : bouton Copier jaune sur jaune en Soleil sombre).
   Contrastes AA vérifiés le 18/10 (texte ≥ 4,5:1, étiquettes des tickets ≥ 6,2:1, bordures
   de champs ≥ 3:1), y compris sur le point le plus foncé de la trame Soleil.
   ========================================================================== */

/* ---------- Soleil · clair (base) ---------- */
:root:not([data-skin="matrix"]):not([data-theme="dark"]),
:root:not([data-skin="matrix"]) [data-theme="light"] {
  --bg: #fbf9f6;
  --bg-glow: transparent;

  --surface: #ffffff; --surface-2: #f7f2eb; --surface-3: #efe7dc; --surface-inverse: #1c140c;
  --ink: #1c140c; --ink-2: #45372a; --muted: #6d5c49; --ink-inverse: #fbf9f6; --muted-inverse: #c9b8a2;
  --line: #ebe3d8; --line-2: #dccfbe; --line-strong: #1c140c; --line-input: #8c7760;
  --info-bg: #f7f1e9;

  --accent: #FF8A00;
  --accent-hover: #FF7A00;
  --accent-fill: linear-gradient(120deg, #FF5A1F 0%, #FF8A00 45%, #FFC21A 100%);
  --accent-fill-hover: linear-gradient(120deg, #FF6A33 0%, #FF9A1F 45%, #FFCD3D 100%);
  --accent-line: transparent;   /* bordure des boutons dégradés : le dégradé passe dessous */
  --on-accent: #1c140c;
  --accent-text: #B23C00;       /* texte orange lisible sur fond clair (5,6:1) */
  --highlight: #FFD66B;

  --tk-bg: #ffffff; --tk-ink: #1c140c; --tk-muted: #66553f; --tk-line: #efe3d3;
  --tk-stub-bg: #1c140c; --tk-stub-ink: #fbf9f6; --tk-stub-muted: #c9b8a2; --tk-perf: #fbf9f6;
  --tk-copy-bg: #FFC21A; --tk-copy-ink: #1c140c; --tk-copied-bg: #ffffff; --tk-copied-ink: #1c140c;
  --tk-ok-bg: #1c140c; --tk-ok-ink: #FFC21A; --tk-logo-bg: #f7f0e6; --tk-tampon: #B23C00;
  --tk-focus: #FFC21A; --tk-focus-halo: rgba(255, 194, 26, .6);
  --off-bg: #faf4ec; --off-bg-2: #efe4d5; --off-ink: #57483a; --off-hatch: #d8c6ae;

  --focus: #1c140c; --focus-halo: rgba(255, 170, 30, .55);
  --shadow-1: 0 1px 0 rgba(28, 20, 12, .06), 0 2px 6px -2px rgba(28, 20, 12, .10);
  --shadow-2: 0 1px 0 rgba(28, 20, 12, .06), 0 14px 30px -18px rgba(28, 20, 12, .38);
  --shadow-3: 0 24px 60px -24px rgba(28, 20, 12, .45);
  --shadow-search: 0 18px 40px -18px rgba(120, 60, 0, .32);
  --tk-shadow: drop-shadow(0 1px 0 rgba(28, 20, 12, .10)) drop-shadow(0 12px 18px rgba(120, 60, 0, .12));
  --tk-shadow-hover: drop-shadow(0 1px 0 rgba(28, 20, 12, .12)) drop-shadow(0 18px 24px rgba(120, 60, 0, .18));
  --tk-shadow-sm: drop-shadow(0 8px 14px rgba(120, 60, 0, .14));

  --sel-bg: #1c140c; --sel-ink: #FFC21A; --sel-muted: #c9b8a2; --sel-hover: #35271a;
  --go-bg: var(--accent-fill); --go-ink: #1c140c;   /* bouton « Trouver » de la grande recherche */
  --logo-fond: linear-gradient(135deg, #FF5A1F, #FF8A00 55%, #FFC21A); --logo-ticket: #ffffff; --logo-coche: #FF8A00;   /* pastille ✓ en dégradé (repli : orange uni) */
  --copied-bg: #1c140c; --copied-ink: #FFC21A;
  --bar-copy-bg: var(--accent-fill); --bar-copy-ink: #1c140c;
  --meter-bg: #1c140c; --meter-stripe: rgba(255, 194, 26, .9);
  --stripe-a: #1c140c; --stripe-b: #FF8A00;
  --ribbon-bg: var(--accent-fill); --ribbon-ink: #1c140c;
  --ftr-bg: #1c140c; --ftr-ink: #fbf9f6; --ftr-muted: #c9b8a2; --ftr-line: rgba(251, 249, 246, .14); --ftr-border: transparent;
}

/* ---------- Soleil · sombre ---------- */
:root:not([data-skin="matrix"])[data-theme="dark"],
:root:not([data-skin="matrix"]) [data-theme="dark"] {
  --bg: #16110c;
  --bg-glow: transparent;

  --surface: #211a13; --surface-2: #2a2119; --surface-3: #362a1f; --surface-inverse: #f7efe4;
  --ink: #f7efe4; --ink-2: #dccfbf; --muted: #b3a28d; --ink-inverse: #16110c; --muted-inverse: #5e4f3f;
  --line: #3a2e22; --line-2: #4b3c2d; --line-strong: #f7efe4; --line-input: #8a7660;
  --info-bg: #241c14;

  --accent: #FFA41F;
  --accent-hover: #FFB547;
  --accent-fill: linear-gradient(120deg, #FF5A1F 0%, #FF8A00 45%, #FFC21A 100%);
  --accent-fill-hover: linear-gradient(120deg, #FF6A33 0%, #FF9A1F 45%, #FFCD3D 100%);
  --accent-line: transparent;
  --on-accent: #1c140c;
  --accent-text: #FFB547;
  --highlight: #FFA41F;

  --tk-bg: #f4ede3; --tk-ink: #1c140c; --tk-muted: #62523f; --tk-line: #e3d6c4;
  --tk-stub-bg: #FFA41F; --tk-stub-ink: #1c140c; --tk-stub-muted: #553a12; --tk-perf: #16110c;
  --tk-copy-bg: #1c140c; --tk-copy-ink: #FFC21A; --tk-copied-bg: #ffffff; --tk-copied-ink: #1c140c;
  --tk-ok-bg: #1c140c; --tk-ok-ink: #FFC21A; --tk-logo-bg: #ebe1d3; --tk-tampon: #B23C00;
  --tk-focus: #1c140c; --tk-focus-halo: rgba(255, 164, 31, .55);
  --off-bg: #2a2119; --off-bg-2: #362a1f; --off-ink: #cdbfae; --off-hatch: #4b3c2d;

  --focus: #FFC21A; --focus-halo: rgba(255, 194, 26, .35);
  --shadow-1: 0 1px 0 rgba(0, 0, 0, .4), 0 2px 6px -2px rgba(0, 0, 0, .5);
  --shadow-2: 0 1px 0 rgba(0, 0, 0, .4), 0 16px 32px -18px rgba(0, 0, 0, .8);
  --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, .8);
  --shadow-search: 0 18px 50px -16px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
  --tk-shadow: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)) drop-shadow(0 14px 22px rgba(0, 0, 0, .45));
  --tk-shadow-hover: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)) drop-shadow(0 20px 28px rgba(0, 0, 0, .6));
  --tk-shadow-sm: drop-shadow(0 10px 16px rgba(0, 0, 0, .5));

  --sel-bg: #FFA41F; --sel-ink: #16110c; --sel-muted: #553a12; --sel-hover: #FFB547;
  --go-bg: var(--accent-fill); --go-ink: #1c140c;
  --logo-fond: linear-gradient(135deg, #FF5A1F, #FF8A00 55%, #FFC21A); --logo-ticket: #ffffff; --logo-coche: #FF8A00;
  --copied-bg: #ffffff; --copied-ink: #1c140c;
  --bar-copy-bg: #16110c; --bar-copy-ink: #FFC21A;
  --meter-bg: #FFA41F; --meter-stripe: rgba(22, 17, 12, .35);
  --stripe-a: #FFA41F; --stripe-b: #16110c;
  --ribbon-bg: #1c140c; --ribbon-ink: #FFC21A;
  --ftr-bg: #0e0a06; --ftr-ink: #f7efe4; --ftr-muted: #b3a28d; --ftr-line: #3a2e22; --ftr-border: #3a2e22;
}

/* Système en sombre, aucun choix enregistré : copie EXACTE du bloc précédent (contrainte CSS). */
@media (prefers-color-scheme: dark) {
  :root:not([data-skin="matrix"]):not([data-theme]) {
    --bg: #16110c; --bg-glow: transparent;
    --surface: #211a13; --surface-2: #2a2119; --surface-3: #362a1f; --surface-inverse: #f7efe4;
    --ink: #f7efe4; --ink-2: #dccfbf; --muted: #b3a28d; --ink-inverse: #16110c; --muted-inverse: #5e4f3f;
    --line: #3a2e22; --line-2: #4b3c2d; --line-strong: #f7efe4; --line-input: #8a7660; --info-bg: #241c14;
    --accent: #FFA41F; --accent-hover: #FFB547;
    --accent-fill: linear-gradient(120deg, #FF5A1F 0%, #FF8A00 45%, #FFC21A 100%);
    --accent-fill-hover: linear-gradient(120deg, #FF6A33 0%, #FF9A1F 45%, #FFCD3D 100%);
    --accent-line: transparent; --on-accent: #1c140c; --accent-text: #FFB547; --highlight: #FFA41F;
    --tk-bg: #f4ede3; --tk-ink: #1c140c; --tk-muted: #62523f; --tk-line: #e3d6c4;
    --tk-stub-bg: #FFA41F; --tk-stub-ink: #1c140c; --tk-stub-muted: #553a12; --tk-perf: #16110c;
    --tk-copy-bg: #1c140c; --tk-copy-ink: #FFC21A; --tk-copied-bg: #ffffff; --tk-copied-ink: #1c140c;
    --tk-ok-bg: #1c140c; --tk-ok-ink: #FFC21A; --tk-logo-bg: #ebe1d3; --tk-tampon: #B23C00;
    --tk-focus: #1c140c; --tk-focus-halo: rgba(255, 164, 31, .55);
    --off-bg: #2a2119; --off-bg-2: #362a1f; --off-ink: #cdbfae; --off-hatch: #4b3c2d;
    --focus: #FFC21A; --focus-halo: rgba(255, 194, 26, .35);
    --shadow-1: 0 1px 0 rgba(0, 0, 0, .4), 0 2px 6px -2px rgba(0, 0, 0, .5);
    --shadow-2: 0 1px 0 rgba(0, 0, 0, .4), 0 16px 32px -18px rgba(0, 0, 0, .8);
    --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, .8);
    --shadow-search: 0 18px 50px -16px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
    --tk-shadow: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)) drop-shadow(0 14px 22px rgba(0, 0, 0, .45));
    --tk-shadow-hover: drop-shadow(0 1px 0 rgba(0, 0, 0, .5)) drop-shadow(0 20px 28px rgba(0, 0, 0, .6));
    --tk-shadow-sm: drop-shadow(0 10px 16px rgba(0, 0, 0, .5));
    --sel-bg: #FFA41F; --sel-ink: #16110c; --sel-muted: #553a12; --sel-hover: #FFB547;
    --go-bg: var(--accent-fill); --go-ink: #1c140c;
    --logo-fond: linear-gradient(135deg, #FF5A1F, #FF8A00 55%, #FFC21A); --logo-ticket: #ffffff; --logo-coche: #FF8A00;
    --copied-bg: #ffffff; --copied-ink: #1c140c; --bar-copy-bg: #16110c; --bar-copy-ink: #FFC21A;
    --meter-bg: #FFA41F; --meter-stripe: rgba(22, 17, 12, .35); --stripe-a: #FFA41F; --stripe-b: #16110c;
    --ribbon-bg: #1c140c; --ribbon-ink: #FFC21A;
    --ftr-bg: #0e0a06; --ftr-ink: #f7efe4; --ftr-muted: #b3a28d; --ftr-line: #3a2e22; --ftr-border: #3a2e22;
  }
}

/* ---------- Matrix · sombre (#070a07, uni) ----------
   Matrix clair = jetons de tokens.css : rien à surcharger. */
:root[data-skin="matrix"][data-theme="dark"],
:root[data-skin="matrix"] [data-theme="dark"] {
  --bg: #070a07; --bg-glow: transparent;
  --surface: #0f1410; --surface-2: #141b15; --surface-3: #1d271e; --surface-inverse: #e3f7d4;
  --ink: #e3f7d4; --ink-2: #c2d9b4; --muted: #8fab86; --ink-inverse: #070a07; --muted-inverse: #4a5d45;
  --line: #1f2b1f; --line-2: #2e3f2e; --line-strong: #e3f7d4; --line-input: #5d7a56; --info-bg: #111a12;
  --tk-bg: #eef3ea; --tk-ink: #0c120c; --tk-muted: #4c5c48; --tk-line: #d6e0cf;
  --tk-stub-bg: #d7ff3a; --tk-stub-ink: #0c120c; --tk-stub-muted: #3d4a12; --tk-perf: #070a07;
  --tk-copy-bg: #0c120c; --tk-copy-ink: #d7ff3a; --tk-logo-bg: #e1e9da; --tk-focus: #0c120c;
  --off-bg: #141b15; --off-bg-2: #1d271e; --off-ink: #b9cdb0; --off-hatch: #2e3f2e;
  --ribbon-bg: #0c120c; --ribbon-ink: #d7ff3a;
  --ftr-bg: #040604; --ftr-ink: #e3f7d4; --ftr-muted: #8fab86; --ftr-line: #1f2b1f; --ftr-border: #1f2b1f;
}
@media (prefers-color-scheme: dark) {
  :root[data-skin="matrix"]:not([data-theme]) {
    --bg: #070a07; --bg-glow: transparent;
    --surface: #0f1410; --surface-2: #141b15; --surface-3: #1d271e; --surface-inverse: #e3f7d4;
    --ink: #e3f7d4; --ink-2: #c2d9b4; --muted: #8fab86; --ink-inverse: #070a07; --muted-inverse: #4a5d45;
    --line: #1f2b1f; --line-2: #2e3f2e; --line-strong: #e3f7d4; --line-input: #5d7a56; --info-bg: #111a12;
    --tk-bg: #eef3ea; --tk-ink: #0c120c; --tk-muted: #4c5c48; --tk-line: #d6e0cf;
    --tk-stub-bg: #d7ff3a; --tk-stub-ink: #0c120c; --tk-stub-muted: #3d4a12; --tk-perf: #070a07;
    --tk-copy-bg: #0c120c; --tk-copy-ink: #d7ff3a; --tk-logo-bg: #e1e9da; --tk-focus: #0c120c;
    --off-bg: #141b15; --off-bg-2: #1d271e; --off-ink: #b9cdb0; --off-hatch: #2e3f2e;
    --ribbon-bg: #0c120c; --ribbon-ink: #d7ff3a;
    --ftr-bg: #040604; --ftr-ink: #e3f7d4; --ftr-muted: #8fab86; --ftr-line: #1f2b1f; --ftr-border: #1f2b1f;
  }
}

/* Matrix : le mot du logo en JetBrains Mono (signature du thème) ; les titres prennent la même police que Soleil
   (style sobre du 21/10 : une seule direction, lisibilité des titres longs sur téléphone). */
[data-skin="matrix"] .logo__word { font-family: var(--font-mono); font-stretch: 100%; letter-spacing: -.02em; }

/* ---------- Fonds de page ----------
   Unis dans les 4 variantes (style sobre du 21/10/2026) : la couleur vient de --bg (components.css, body). */

/* ---------- Talon à la couleur de la marque (décision du 17/10) ----------
   Le gabarit pose la classe tk--brand et deux variables sur le ticket :
   style="--brand:#083E87;--brand-ink:#fff" (--brand-ink = encre lisible sur la couleur,
   choisie côté serveur : #fff ou #000 PURS, celle qui contraste le plus, ce qui garantit
   au moins 4,58:1 quelle que soit la couleur). Une marque trop claire (luminance > 0,75) garde
   le talon par défaut du thème. Le bouton Copier devient blanc, lisible sur toute couleur. */
.tk--brand {
  --tk-stub-bg: var(--brand);
  --tk-stub-ink: var(--brand-ink, #fff);
  --tk-stub-muted: var(--brand-ink, #fff);   /* étiquette « CODE » : même encre que le code (≥ 4,5:1 garanti) */
  --tk-copy-bg: #ffffff; --tk-copy-ink: #14110d;
  --tk-copied-bg: #14110d; --tk-copied-ink: #ffffff;
  --tk-focus: var(--brand-ink, #fff);
  --tk-slot: rgba(255, 255, 255, .14);
}

/* Dégradé du logo Soleil : un seul <svg class="tk-defs"> par page (en-tête du thème).
   Il doit rester « rendu » (pas de display:none), sinon certains navigateurs ignorent le dégradé. */
.tk-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
