/* Ride Club V4 : direction artistique tranchée par Victor le 17/10/2026 (docs/refonte-v4/DA-V4.md).
   Pages publiques claires et chaleureuses (piste C), code ENTREPRISE et QR en billet d'or (piste A),
   espace parrain sombre, arrondi, montants lisibles comme un panneau (piste B).
   Règles : aucun dégradé, aucune couleur posée sur une autre couleur, l'or en aplat avec du texte noir dessus. */

@font-face { font-family: "Nunito"; font-style: normal; font-weight: 600 900; font-display: swap; src: url("/assets/fonts/nunito-latin-ext.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: "Nunito"; font-style: normal; font-weight: 600 900; font-display: swap; src: url("/assets/fonts/nunito-latin.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; }
/* Barlow Condensed 800 (licence OFL, fonts/BARLOW-LICENCE.txt) : montants et statuts de l'espace parrain, rien d'autre. */
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/barlow-condensed-800.ttf") format("truetype"); }

/* ---------- Tokens ---------- */
:root {
  --v4-gold: #C9A227;
  --v4-ink: #0D0E0C;
  /* Pages publiques */
  --v4-paper: #FFFDF8;
  --v4-cream: #F6EFD8;
  --v4-soft: #5C584E;
  --v4-rule: #D9D2BE;
  --v4-white: #FFFFFF;
  /* Espace parrain */
  --v4-night: #0D0E0C;
  --v4-surface: #1A1B18;
  --v4-text: #F4F1E8;
  --v4-text-soft: #A39F93;
  --v4-silver: #C3C6CB;
  --v4-night-rule: #2A2B27;
  /* Typographie */
  --v4-font: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --v4-figures: "Barlow Condensed", "Arial Narrow", "Nunito", sans-serif;
  --v4-track-title: -0.035em;
  /* Formes et rythme */
  --v4-pill: 999px;
  --v4-radius: 24px;
  --v4-radius-small: 16px;
  --v4-button: 62px;
  --v4-target: 44px;
  --v4-gutter: 20px;
  --v4-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- Univers clair (pages publiques) ---------- */
.v4-light { margin: 0; min-height: 100vh; color: var(--v4-ink); background: var(--v4-paper); font-family: var(--v4-font); font-weight: 600; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.v4-light *, .v4-dark * { box-sizing: border-box; }
.v4-light a { color: inherit; }
.v4-wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 var(--v4-gutter); }
.v4-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.v4-skip { position: absolute; left: 12px; top: -60px; padding: 12px 18px; border-radius: var(--v4-pill); background: var(--v4-ink); color: var(--v4-paper); font-weight: 800; z-index: 10; }
.v4-skip:focus { top: 12px; }
:where(.v4-light, .v4-dark) :focus-visible { outline: 3px solid var(--v4-ink); outline-offset: 3px; }
.v4-dark :focus-visible { outline-color: var(--v4-gold); }

.v4-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.v4-top img { display: block; height: 30px; width: auto; }
.v4-top-link { display: inline-flex; align-items: center; white-space: nowrap; min-height: var(--v4-target); padding: 0 18px; border: 1.5px solid var(--v4-rule); border-radius: var(--v4-pill); font-size: .9375rem; font-weight: 800; text-decoration: none; }
.v4-top-link:hover { border-color: var(--v4-ink); }

.v4-h1 { margin: 28px 0 0; font-size: clamp(2.125rem, 9vw, 3.25rem); font-weight: 900; line-height: 1.02; letter-spacing: var(--v4-track-title); text-wrap: balance; }
.v4-h1 em { font-style: normal; display: inline-block; padding: 0 .16em; border-radius: 12px; background: var(--v4-gold); color: var(--v4-ink); }
.v4-lead { margin: 18px 0 0; color: var(--v4-soft); font-size: 1.125rem; font-weight: 700; line-height: 1.45; text-wrap: pretty; }
.v4-h2 { margin: 0; font-size: 1.375rem; font-weight: 900; line-height: 1.15; letter-spacing: -0.02em; }
.v4-small { color: var(--v4-soft); font-size: .8125rem; font-weight: 700; line-height: 1.45; }

/* ---------- Boutons (62 px, en pilule) ---------- */
.v4-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: var(--v4-button); padding: 0 26px; border: 0; border-radius: var(--v4-pill); font: 900 1.0625rem/1.15 var(--v4-font); letter-spacing: -0.01em; text-align: center; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform 100ms ease-out, background-color 160ms ease; }
.v4-btn:active { transform: scale(.97); }
.v4-btn svg { flex: none; width: 22px; height: 22px; }
.v4-btn--primary { background: var(--v4-gold); color: var(--v4-ink); }
.v4-btn--secondary { background: var(--v4-cream); color: var(--v4-ink); }
.v4-btn--ink { background: var(--v4-ink); color: var(--v4-gold); }
.v4-btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px var(--v4-rule); }
.v4-dark .v4-btn--ghost { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28); }
.v4-btn--small { width: auto; min-height: var(--v4-target); padding: 0 18px; font-size: .9375rem; }
.v4-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Champs (pilule blanche, focus encre 2,5 px) ---------- */
.v4-label { display: block; margin: 0 0 8px; font-size: .9375rem; font-weight: 800; }
.v4-input { width: 100%; min-height: 58px; padding: 0 22px; border: 1.5px solid var(--v4-rule); border-radius: var(--v4-pill); background: var(--v4-white); color: var(--v4-ink); font: 800 1.0625rem var(--v4-font); outline: none; transition: border-color 140ms ease, box-shadow 140ms ease; }
.v4-input::placeholder { color: #9A9586; font-weight: 700; }
.v4-input:focus { border-color: var(--v4-ink); box-shadow: 0 0 0 1px var(--v4-ink); }
.v4-input--code { text-transform: uppercase; letter-spacing: .14em; font-weight: 900; }
.v4-field-row { display: flex; gap: 10px; }
.v4-field-row .v4-input { flex: 1; min-width: 0; }
.v4-field-row .v4-btn { width: auto; flex: none; }
.v4-error { margin: 8px 0 0; color: #8A1C12; font-size: .875rem; font-weight: 800; }

/* ---------- Encadrés crème ---------- */
.v4-box { padding: 22px; border-radius: var(--v4-radius); background: var(--v4-cream); }

/* ---------- Billet d'or : code ENTREPRISE (horizontal) et QR (vertical) ---------- */
.v4-ticket { --notch: 22px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; max-width: 100%; align-items: center; gap: 0; border-radius: var(--v4-radius); background: var(--v4-gold); color: var(--v4-ink); isolation: isolate; }
/* Découpes rondes de chaque côté de la perforation, de la couleur du fond de la page. */
.v4-ticket::before, .v4-ticket::after { content: ""; position: absolute; top: calc(50% - var(--notch) / 2); width: var(--notch); height: var(--notch); border-radius: 50%; background: var(--v4-ticket-hole, var(--v4-paper)); }
.v4-ticket::before { left: calc(var(--notch) / -2); }
.v4-ticket::after { right: calc(var(--notch) / -2); }
.v4-ticket-main { min-width: 0; padding: 20px 14px 20px 24px; }
.v4-ticket-kicker { margin: 0; font-size: .75rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.v4-ticket-code { margin: 4px 0 0; overflow-wrap: anywhere; font-size: clamp(1.5rem, 7.4vw, 2.5rem); font-weight: 900; line-height: 1; letter-spacing: .01em; }
.v4-ticket-serial { margin: 8px 0 0; font-size: .75rem; font-weight: 800; letter-spacing: .08em; opacity: .78; }
.v4-ticket-stub { display: flex; align-items: center; height: 100%; padding: 16px calc(var(--notch) / 2 + 12px) 16px 14px; border-left: 2px dashed rgba(13, 14, 12, .42); }
.v4-copy { min-height: var(--v4-target); padding: 0 16px; white-space: nowrap; border: 0; border-radius: var(--v4-pill); background: var(--v4-ink); color: var(--v4-gold); font: 900 .9375rem var(--v4-font); cursor: pointer; }
.v4-copy:active { transform: scale(.96); }
/* QR : même billet en vertical, perforation horizontale, plaque claire sous le QR pour que le scan marche. */
.v4-ticket--qr { --notch: 26px; grid-template-columns: 1fr; justify-items: center; width: min(100%, 340px); margin: 0 auto; padding: 24px 22px 0; text-align: center; }
.v4-ticket--qr::before, .v4-ticket--qr::after { top: auto; bottom: 94px; }
.v4-qr-plate { padding: 14px; border-radius: 18px; background: var(--v4-white); }
.v4-qr-plate img, .v4-qr-plate svg { display: block; width: 100%; max-width: 236px; height: auto; }
.v4-ticket--qr .v4-ticket-stub { flex-direction: column; justify-content: center; width: 100%; height: 108px; margin-top: 20px; padding: 0 16px; border-left: 0; border-top: 2px dashed rgba(13, 14, 12, .42); }
.v4-qr-claim { margin: 0; font-size: 1.375rem; font-weight: 900; letter-spacing: -0.02em; }
.v4-qr-name { margin: 2px 0 0; font-size: .9375rem; font-weight: 800; }

/* ---------- Pastilles de statut client ---------- */
.v4-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: var(--v4-pill); font: 800 .8125rem/1 var(--v4-figures); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.v4-pill--validated { border: 1.5px solid currentColor; }
.v4-pill--paid { background: var(--v4-text); color: var(--v4-ink); }
.v4-pill--sent { background: var(--v4-gold); color: var(--v4-ink); }
.v4-pill--signed { border: 1.5px dashed currentColor; }
.v4-light .v4-pill--paid { background: var(--v4-cream); }

/* ---------- Jeton (médaille du rang) ---------- */
.v4-token { --metal: var(--v4-gold); position: relative; display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%; background: var(--metal); color: var(--v4-ink); }
.v4-token::before { content: ""; position: absolute; inset: 5px; border: 2px dashed rgba(13, 14, 12, .45); border-radius: 50%; }
.v4-token-count { position: relative; font: 800 1.625rem/1 var(--v4-figures); letter-spacing: .01em; }
.v4-token-stripes { position: absolute; bottom: -6px; display: flex; gap: 3px; }
.v4-token-stripes i { width: 7px; height: 14px; border-radius: 2px; background: var(--metal); box-shadow: 0 0 0 2px var(--v4-surface); }
.v4-token--argent { --metal: var(--v4-silver); }
.v4-token--bronze { --metal: #B07A4A; }
.v4-token--recrue, .v4-token--lance { --metal: #6E6A60; }

/* ---------- Univers sombre (espace parrain) ---------- */
.v4-dark { color: var(--v4-text); background: var(--v4-night); font-family: var(--v4-font); font-weight: 700; --v4-ticket-hole: var(--v4-night); }
.v4-space { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 560px; margin: 0 auto; padding: 18px var(--v4-gutter) 128px; }
.v4-hello { margin: 0; font-size: 1.75rem; font-weight: 900; letter-spacing: var(--v4-track-title); }
.v4-hero-label { margin: 0; color: var(--v4-text-soft); font-size: .9375rem; font-weight: 800; }
.v4-hero { margin: 2px 0 0; color: var(--v4-gold); font: 800 clamp(4rem, 21vw, 5.25rem)/.92 var(--v4-figures); letter-spacing: -0.005em; font-variant-numeric: tabular-nums; }
.v4-hero-note { margin: 8px 0 0; color: var(--v4-text-soft); font-size: .875rem; font-weight: 700; }
.v4-lines { margin: 0; padding: 0; list-style: none; }
.v4-lines li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 0; border-top: 1px solid var(--v4-night-rule); }
.v4-lines li:last-child { border-bottom: 1px solid var(--v4-night-rule); }
.v4-lines span { color: var(--v4-text-soft); font-size: 1rem; font-weight: 800; }
.v4-lines strong { font: 800 1.75rem/1 var(--v4-figures); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.v4-card { padding: 20px; border-radius: var(--v4-radius); background: var(--v4-surface); }
.v4-card-title { margin: 0; font-size: 1.0625rem; font-weight: 900; letter-spacing: -0.01em; }
.v4-rank { display: flex; align-items: center; gap: 16px; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.v4-rank-body { flex: 1; min-width: 0; }
.v4-rank-name { margin: 0; font-size: 1.25rem; font-weight: 900; }
.v4-progress { display: block; width: 100%; height: 10px; margin: 10px 0 8px; }
.v4-progress-track { fill: var(--v4-night); }
.v4-progress-fill { fill: var(--v4-gold); }
.v4-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.v4-rank-next { margin: 0; color: var(--v4-text-soft); font-size: .875rem; font-weight: 800; }
.v4-clients { margin: 8px 0 0; padding: 0; list-style: none; }
.v4-clients li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; border-top: 1px solid var(--v4-night-rule); }
.v4-client-who { min-width: 0; }
.v4-client-who strong { display: block; font-size: 1rem; font-weight: 900; }
.v4-client-who small { color: var(--v4-text-soft); font-size: .8125rem; font-weight: 700; }
.v4-empty { margin: 8px 0 0; color: var(--v4-text-soft); font-size: .9375rem; font-weight: 700; }
.v4-text-link { display: inline-flex; align-items: center; min-height: var(--v4-target); padding: 0; border: 0; background: none; color: var(--v4-gold); font: 900 .9375rem var(--v4-font); cursor: pointer; text-decoration: none; }

/* Barre d'onglets flottante, en pilule ; l'onglet actif est une pilule or. */
.v4-tabbar { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 40; display: flex; gap: 2px; width: min(calc(100% - 24px), 520px); padding: 6px; border-radius: var(--v4-pill); background: var(--v4-surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 1px var(--v4-night-rule); transform: translateX(-50%); }
.v4-tab { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; padding: 0 2px; border: 0; border-radius: var(--v4-pill); background: none; color: var(--v4-text-soft); font: 800 .6875rem var(--v4-font); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.v4-tab svg { width: 22px; height: 22px; }
.v4-tab[aria-current="page"] { background: var(--v4-gold); color: var(--v4-ink); }

@media (prefers-reduced-motion: reduce) {
  .v4-btn, .v4-copy, .v4-input { transition: none; }
  .v4-btn:active, .v4-copy:active { transform: none; }
}
@media (prefers-contrast: more) {
  .v4-input { border-color: var(--v4-ink); }
  .v4-lines li, .v4-clients li { border-color: var(--v4-text-soft); }
}
.v4-light .sr-only, .v4-dark .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.v4-nowrap { white-space: nowrap; }
/* Un élément marqué hidden reste caché, quel que soit son affichage (grilles des formulaires, étapes du code). */
.v4-light [hidden], .v4-dark [hidden] { display: none !important; }
/* Jetons : tailles (liste, écran des rangs, fête) et métaux à plat. L'argent #C3C6CB est réservé au rang Argent. */
.v4-token--s { width: 56px; height: 56px; }
.v4-token--s .v4-token-count { font-size: 1.375rem; }
.v4-token--m { width: 76px; height: 76px; }
.v4-token--m .v4-token-count { font-size: 1.875rem; }
.v4-token--l { width: 110px; height: 110px; }
.v4-token--l .v4-token-count { font-size: 2.75rem; }
.v4-token--l::before { inset: 8px; border-width: 3px; }
.v4-token--xl { width: 150px; height: 150px; }
.v4-token--xl .v4-token-count { font-size: 3.75rem; }
.v4-token--xl::before { inset: 10px; border-width: 3px; }
.v4-token--l .v4-token-stripes i, .v4-token--xl .v4-token-stripes i { width: 10px; height: 20px; }
.v4-token--or, .v4-token--platine, .v4-token--saphir, .v4-token--diamant, .v4-token--elite, .v4-token--legende { --metal: var(--v4-gold); }
.v4-token--long .v4-token-count { font-size: .78em; letter-spacing: -0.02em; }
.v4-token--s.v4-token--long .v4-token-count { font-size: 1.0625rem; }
.v4-token--m.v4-token--long .v4-token-count { font-size: 1.375rem; }

/* « Tes résultats » : le parcours chiffré du parrain (ParrainStats, 18/10/2026). */
.v4-stats { display: grid; gap: 14px; }
.v4-stats-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.v4-stats-period { min-height: var(--v4-target); padding: 0 6px; white-space: nowrap; border: 1px solid var(--v4-night-rule); border-radius: var(--v4-pill); background: none; color: var(--v4-text-soft); font: 800 .875rem var(--v4-font); cursor: pointer; }
.v4-stats-period[aria-pressed="true"] { border-color: var(--v4-gold); background: var(--v4-gold); color: var(--v4-ink); }
.v4-stats-scans { margin: 0; color: var(--v4-text-soft); font-size: .9375rem; font-weight: 800; }
.v4-stats-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.v4-stats-steps li { display: grid; gap: 6px; }
.v4-stats-label { display: flex; justify-content: space-between; gap: 12px; font-size: .9375rem; font-weight: 700; }
.v4-stats-label strong { font-weight: 900; font-variant-numeric: tabular-nums; }
.v4-stats-steps small, .v4-stats-overall small, .v4-stats-days figcaption { color: var(--v4-text-soft); font-size: .8125rem; font-weight: 700; }
.v4-stats-bar { display: block; width: 100%; height: 8px; }
.v4-stats-track { fill: var(--v4-night-rule); }
.v4-stats-fill { fill: var(--v4-gold); }
.v4-stats-overall { display: grid; gap: 2px; margin: 0; padding-top: 12px; border-top: 1px solid var(--v4-night-rule); }
.v4-stats-overall span { color: var(--v4-text-soft); font-size: .9375rem; font-weight: 800; }
.v4-stats-overall strong { color: var(--v4-gold); font-size: 2rem; font-weight: 900; line-height: 1.1; }
.v4-stats-note { margin: 0; color: var(--v4-text-soft); font-size: .9375rem; font-weight: 700; }
.v4-stats-days { margin: 0; display: grid; gap: 4px; }
.v4-stats-days svg { display: block; width: 100%; height: 56px; }
.v4-stats-tips { display: grid; gap: 8px; margin: 0; padding: 12px 14px; border-radius: var(--v4-radius-small); background: var(--v4-night-rule); list-style: none; font-size: .9375rem; font-weight: 700; }
