/* Wedgy — styles partagés, design system v4 (filets fins, ombres douces, cartes blanches).
   Maquettes de référence : https://claude.ai/artifact/CVWKXF1QDVc4hHV3LnUQtB
   Règle : un composant = une classe ici, pas de styles en ligne dans les pages pour ce qui se
   répète (un doublon de sélecteur en fin de fichier a déjà écrasé silencieusement un
   position:fixed — vérifier qu'une règle n'existe pas déjà avant d'en ajouter une). */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  /* clip et non hidden : « hidden » sur html ET body fait de body une zone de défilement figée
     (molette et doigt ne font plus défiler une page longue, et position: sticky ne colle plus).
     « hidden » reste en repli pour les navigateurs qui ne connaissent pas « clip ». */
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--primary);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  /* Empêche le double-tap de Safari iOS de zoomer (garde le pincer-zoomer d'accessibilité). */
  touch-action: manipulation;
  /* Pas de "rebond" Safari iOS quand le contenu tient déjà dans l'écran. */
  overscroll-behavior-y: none;
}

body {
  /* 100dvh plutôt que 100vh : sur Safari iOS, 100vh compte la barre d'adresse rétractée. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.theme-orange { background: var(--accent-orange); }
body.theme-ink { background: var(--ink); }
body.theme-cream { background: var(--surface-cream); }

button, input, select { font-family: inherit; }
h1, h2, p { margin: 0; }
a { color: inherit; }

.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Typographie ---------- */
.h1 { font-size: 22px; line-height: 27px; font-weight: 800; letter-spacing: -0.2px; }
.h1--lg { font-size: 24px; line-height: 29px; }
.h2 { font-size: 17px; line-height: 22px; font-weight: 800; }
.body-text { font-size: 14.5px; line-height: 20px; font-weight: 500; }
.meta { font-size: 12.5px; line-height: 17px; font-weight: 500; color: var(--ink-muted); }
.label {
  display: block;
  font-size: 13px;
  line-height: 17px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-2);
}
.eyebrow {
  font-size: 11px;
  line-height: 14px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.month-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: var(--space-3);
}
.help-text { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-muted); margin-top: var(--space-2); }
.score { font-size: 28px; line-height: 32px; font-weight: 800; font-variant-numeric: tabular-nums; }
.link { font-size: 13px; font-weight: 700; color: var(--moss-dark); text-decoration: none; }
.link:hover { color: var(--ink); }

/* ---------- En-tête (bandeau de couleur + barre fixe logo/avatar) ---------- */
.hero {
  padding: var(--space-5) var(--space-5) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
/* La barre .hero__brand est fixe : on réserve sa hauteur dans le flux. */
.hero--with-brand { padding-top: calc(var(--header-h) + var(--space-3)); }
.hero__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  /* fixed plutôt que sticky : sticky "tremble" pendant le scroll tactile sur Safari iOS. */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 30;
  background: var(--primary);
  padding: 0 var(--space-5);
}
.theme-orange .hero__brand { background: var(--accent-orange); }
.theme-ink .hero__brand { background: var(--ink); }
.hero__logo { width: 36px; height: 36px; border-radius: var(--radius-xs); display: block; }
/* Wordmark centré dans la barre : .hero__brand (fixed) sert déjà de repère au absolute. */
.hero__wordmark-img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 26px;
  width: auto;
  pointer-events: none;
}
.hero__title-bar { flex: 1; min-width: 0; font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--on-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
}
.hero__avatar--lg { width: 60px; height: 60px; font-size: 24px; }
.hero__subtitle { font-size: 13.5px; line-height: 19px; font-weight: 500; color: var(--on-primary-muted); }
.theme-orange .hero__subtitle { color: var(--ink); }

.back-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--on-ink);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}
.back-btn .icon { width: 20px; height: 20px; }
.theme-ink .back-btn { background: var(--primary); color: var(--ink); }
.ghost-icon-btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(26, 43, 31, 0.18);
  background: rgba(255, 253, 247, 0.55);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
}
.ghost-icon-btn .icon { width: 18px; height: 18px; }

/* Onglets segmentés posés sur le bandeau de couleur (Stats, carte de score, propositions) */
.seg {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-md);
  background: rgba(255, 253, 247, 0.55);
}
.seg__btn {
  height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Pastille « nouveau » sur un onglet (ex. Badges du Palmarès), comme celle du menu du bas */
.seg__dot {
  display: inline-block;
  vertical-align: top;
  margin: 2px 0 0 4px;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-orange);
  border: 2px solid #fff;
}
.seg__btn[aria-selected="true"], .seg__btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); font-weight: 800; }
/* Variante posée sur une carte blanche (popups) */
.seg--light { background: var(--surface-subtle); }

/* Aperçu de l'image de récap (popup « Partager la feuille ») */
.share-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  max-height: 46vh;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}
.share-preview img {
  display: block;
  max-width: 100%;
  max-height: calc(46vh - 2 * var(--space-3));
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-raised);
}

/* Barre de progression en étapes (création de partie) */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.stepper__line { display: none; }
.stepper__step {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.stepper__circle { display: block; height: 5px; border-radius: var(--radius-pill); background: rgba(26, 43, 31, 0.18); font-size: 0; color: transparent; }
.stepper__circle * { display: none; }
.stepper__label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--ink); opacity: 0.75; }
.stepper__step--done .stepper__circle,
.stepper__step--active .stepper__circle { background: var(--ink); }
.stepper__step--active .stepper__label { opacity: 1; font-weight: 800; }

/* ---------- Panneau de contenu ---------- */
.panel {
  flex: 1;
  background: var(--surface-cream);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  /* Filet de sécurité sous la barre d'accueil iOS pour les pages sans .footer. */
  padding: var(--space-5) var(--space-5) max(var(--space-5), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.panel--tight { gap: var(--space-2); }
/* Réserve la place du menu flottant en bas du contenu. */
.panel--with-tabbar { padding-bottom: 110px; }
.panel--with-footer { padding-bottom: 110px; }

.section { display: flex; flex-direction: column; gap: var(--space-3); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.stack { display: flex; flex-direction: column; gap: var(--space-2); }
.stack--xs { gap: var(--space-1); }   /* 4 px : titre + sous-titre */
.stack--sm { gap: 6px; }
.stack--lg { gap: 16px; }           /* champs d'un formulaire */
.label-hint { font-weight: 500; color: var(--ink-muted); } /* « (facultatif) » dans un libellé */

/* ---------- Cartes ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
}
.card--raised { box-shadow: var(--shadow-raised); }
.card--dashed { background: transparent; border: 1px dashed var(--border-strong); }
.icon-chip {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  background: var(--surface-subtle);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-chip .icon { width: 18px; height: 18px; }
.icon-chip--primary { background: var(--primary); color: var(--ink); }
.icon-chip--ink { background: var(--ink); color: var(--on-ink); }
.icon-chip--warm { background: var(--surface-warm); color: var(--ink); }
.icon-chip--round { border-radius: var(--radius-pill); }

/* Ligne cliquable générique (lien vers une page, réglage, proposition) */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  color: var(--ink);
  text-decoration: none;
  text-align: left;
  font-family: inherit;
  width: 100%;
}
.list-row--ink { background: var(--ink); border-color: var(--ink); color: var(--surface-cream); }
.list-row--add { border-style: dashed; border-color: var(--border-strong); background: var(--surface-warm); } /* ajouter un élément manquant */
.list-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row__title { font-size: 15px; font-weight: 700; }
.list-row--ink .list-row__title { font-weight: 800; }
.list-row__chevron { width: 18px; height: 18px; color: var(--ink-muted); flex-shrink: 0; }
.list-row--ink .list-row__chevron { color: var(--primary); }

/* Pastilles de statut */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.pill--live { background: var(--moss-surface); color: var(--moss-dark); }
.pill--neutral { background: var(--disabled-surface); color: var(--neutral-text); }
.pill--danger { background: var(--danger-surface); color: var(--danger-text); }
.pill--primary { background: var(--primary); color: var(--ink); }
.pill--ink { background: var(--ink); color: var(--on-ink); }
.pill--new { background: var(--accent-orange); color: #fff; }

/* Point "en cours" qui pulse (coupé si l'utilisateur demande moins d'animations) */
.live-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: currentColor;
  animation: wg-pulse 1.8s ease-out infinite;
}
@keyframes wg-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 222, 89, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(255, 222, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 222, 89, 0); }
}
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---------- Accueil / Stats : compteurs, actions, carte "en cours", lignes de partie ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.stat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 253, 247, 0.62);
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.stat-tile__icon { position: absolute; top: 12px; right: 12px; width: 16px; height: 16px; color: var(--on-primary-muted); }
.stat-tile__value { font-size: 24px; line-height: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-tile__label { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--on-primary-muted); }
.stat-tile__detail { font-size: 11px; line-height: 14px; font-weight: 700; color: var(--on-primary-muted); }
.stat-tile__detail--up { color: var(--moss-dark); }
.stat-tile--dark { background: var(--ink); color: var(--primary); }
.stat-tile--dark .stat-tile__icon { color: var(--primary); }
.stat-tile--dark .stat-tile__label,
.stat-tile--dark .stat-tile__detail { color: rgba(255, 253, 247, 0.8); }
/* Variante posée sur le panneau crème (page Stats) */
.stat-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-tile--surface { background: var(--surface); border: 1px solid var(--border-hairline); }
.stat-tile--surface .stat-tile__label,
.stat-tile--surface .stat-tile__detail { color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Répartition des scores (page Stats) : une barre par niveau, couleurs de la carte de score */
.dist-list { gap: 10px; }
.dist-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 72px; align-items: center; gap: 10px; }
.dist-row__label { font-size: 13px; font-weight: 700; }
.dist-row__track { height: 10px; border-radius: var(--radius-pill); background: var(--surface-subtle); overflow: hidden; }
.dist-row__bar { display: block; height: 100%; min-width: 4px; border-radius: var(--radius-pill); }
.dist-row__value { text-align: right; font-size: 12.5px; font-weight: 700; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.action-tile {
  min-height: 64px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-control);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 14.5px;
  line-height: 17px;
  font-weight: 800;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.action-tile--primary { background: var(--ink); border-color: var(--ink); color: var(--surface-cream); }
/* Rejoindre une partie (QR code) : orange Wedgy, texte encre pour le contraste (5:1). */
.action-tile--orange { background: var(--accent-orange); border-color: var(--accent-orange); color: var(--ink); }
.action-tile__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.action-tile__sub { font-size: 11.5px; font-weight: 700; line-height: 14px; opacity: 0.85; }

.live-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--surface-cream);
  box-shadow: var(--shadow-raised);
}
.live-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.live-card__status { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--primary); }
.live-card__format { font-size: 12px; font-weight: 600; color: rgba(255, 253, 247, 0.7); }
.live-card__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.live-card__title { font-size: 17px; font-weight: 800; }
.live-card__meta { font-size: 12.5px; font-weight: 500; color: rgba(255, 253, 247, 0.72); }
.live-card__rank { display: flex; flex-direction: column; align-items: flex-end; padding-left: 12px; border-left: 1px solid rgba(255, 253, 247, 0.16); flex-shrink: 0; }
.live-card__rank-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: rgba(255, 253, 247, 0.7); }
.live-card__rank-value { font-size: 22px; line-height: 24px; font-weight: 900; color: var(--primary); }
.live-card__rank-value small { font-size: 12px; font-weight: 700; color: rgba(255, 253, 247, 0.7); }
.live-card__cta {
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

/* Ligne de partie (historique) — .history-row conservé : généré par home.js/stats.js */
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
  color: var(--ink);
  text-decoration: none;
}
.history-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.history-row__name { font-size: 15px; font-weight: 700; }
.history-row__meta { font-size: 12.5px; font-weight: 500; color: var(--ink-muted); }
.history-row__rank { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; }
.history-row__rank b { font-size: 15px; font-weight: 800; }
.history-row__rank span { font-size: 11px; font-weight: 600; color: var(--ink-muted); }
.history-row__chevron { width: 18px; height: 18px; color: var(--ink-muted); flex-shrink: 0; }

/* ---------- Badges (Stats) ---------- */
.badge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.badge-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
}
.badge-card--locked { background: var(--disabled-surface); border: 1px dashed rgba(26, 43, 31, 0.18); }
.badge-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.badge-card__icon .icon { width: 20px; height: 20px; }
.badge-card--locked .badge-card__icon { background: var(--surface-cream); color: var(--disabled-text); }
.badge-card__label { font-size: 14.5px; font-weight: 800; }
.badge-card__count { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.badge-card--locked .badge-card__label,
.badge-card--locked .badge-card__count { color: var(--neutral-text); }
/* Badges Wedgy à paliers (Palmarès) */
.wbadge__tier { font-size: 11.5px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink-muted); }
.wbadge__phrase { font-size: 13px; font-style: italic; color: var(--ink-muted); }
.wbadge__rule { font-size: 13.5px; line-height: 19px; font-weight: 600; }
.wbadge__bar { height: 8px; border-radius: var(--radius-pill); background: var(--surface-subtle); overflow: hidden; }
.wbadge__fill { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--accent-moss); }
.wbadge__meta { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wbadge__note { font-size: 11.5px; color: var(--ink-muted); }
.wbadge__tiers { font-size: 12px; font-weight: 700; color: var(--ink-muted); }
.wbadge__bar, .wbadge__meta, .wbadge__rule, .wbadge__phrase, .wbadge__note, .wbadge__tiers { display: block; width: 100%; }

/* Tuiles qui se retournent (badges et trophées du Palmarès) : recto = l'essentiel, verso = détail */
.flip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.flip { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; perspective: 900px; -webkit-tap-highlight-color: transparent; }
.flip:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: var(--radius-md); }
.flip__inner { display: grid; height: 196px; /* toutes les tuiles à la même taille */ transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.flip[aria-pressed="true"] .flip__inner { transform: rotateY(180deg); }
.flip__face { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 4px; padding: 12px 10px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border-hairline); overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip__front { align-items: center; justify-content: center; text-align: center; }
.flip__back { transform: rotateY(180deg); background: var(--surface-warm); justify-content: center; }
.flip__back .wbadge__rule { font-size: 12.5px; line-height: 17px; }
.flip__back .wbadge__phrase, .flip__back .wbadge__tiers { font-size: 11.5px; line-height: 15px; }
.flip__icon { width: 40px; height: 40px; }
.flip__icon .icon { width: 20px; height: 20px; }
.flip__new { position: absolute; top: 10px; right: 10px; }
.flip .badge-card__times { top: 10px; right: 12px; }
/* Palier en balles de golf (balle du logo) et couleurs Wedgy sur toute la tuile :
   1 balle crème, 2 balles jaune, 3 balles vert encre. */
.wbadge__balls { display: flex; gap: 4px; justify-content: center; }
.ball { width: 18px; height: 18px; display: block; }
.ball--empty { opacity: 0.25; }
.wbadge--t1 .flip__face { background: var(--surface-cream); border: 1.5px solid var(--ink); }
.wbadge--t2 .flip__face { background: var(--primary); border-color: var(--ink); }
.wbadge--t3 .flip__face { background: var(--ink); border-color: var(--ink); color: var(--surface-cream); }
.wbadge--t2 .wbadge__phrase, .wbadge--t2 .wbadge__tiers { color: var(--on-primary-muted); }
.wbadge--t2 .wbadge__bar { background: rgba(255, 253, 247, 0.6); }
.wbadge--t1 .wbadge__fill, .wbadge--t2 .wbadge__fill { background: var(--ink); }
.wbadge--t2 .badge-card__icon { background: var(--surface-cream); }
.wbadge--t3 .wbadge__phrase, .wbadge--t3 .wbadge__tiers { color: rgba(255, 253, 247, 0.75); }
.wbadge--t3 .wbadge__meta, .wbadge--t3 .wbadge__rule { color: var(--primary); }
.wbadge--t3 .wbadge__bar { background: rgba(255, 253, 247, 0.2); }
.wbadge--t3 .wbadge__fill { background: var(--primary); }
.wbadge--t3 .ball ellipse:first-child { fill: var(--primary); } /* contour jaune sur fond encre */
/* Taille fixe : textes bornés (nom et phrase sur 2 lignes, règle sur 7) */
.flip .badge-card__label, .flip .wbadge__phrase { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.flip .badge-card__label { font-size: 14px; line-height: 17px; }
.flip__front .wbadge__phrase { font-size: 11.5px; line-height: 14px; }
.flip__back .wbadge__rule { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden; }
.wbadge--locked .flip__front { background: var(--disabled-surface); border-style: dashed; }
.wbadge--locked .flip__front .badge-card__icon { background: var(--surface-cream); color: var(--disabled-text); }
@media (prefers-reduced-motion: reduce) { .flip__inner { transition: none; } }
.badge-card__times { position: absolute; top: 14px; right: 14px; font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---------- Menu du bas flottant (accueil / stats / compte) ---------- */
.bottom-tabbar {
  position: fixed;
  left: var(--space-4);
  right: var(--space-4);
  bottom: max(var(--space-5), calc(var(--space-3) + env(safe-area-inset-bottom)));
  z-index: 25;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-float);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
}
.bottom-tabbar__item {
  position: relative;
  flex: 1;
  height: 52px;
  margin: 0 2px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.bottom-tabbar__item .icon { width: 20px; height: 20px; }
.bottom-tabbar__label { font-size: 10px; line-height: 12px; letter-spacing: 0.1px; }
.bottom-tabbar__item--active { background: var(--primary); color: var(--ink); font-weight: 800; }
.bottom-tabbar__dot {
  position: absolute;
  top: 8px;
  left: 50%;
  margin-left: 6px;
  width: 9px;
  height: 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-orange);
  border: 2px solid #fff;
}
.bottom-tabbar__fab-wrap { flex: 1; display: flex; justify-content: center; }
.bottom-tabbar__fab {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--on-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.bottom-tabbar__fab .icon { width: 24px; height: 24px; }

/* ---------- Champs ---------- */
.field { display: flex; flex-direction: column; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field .select,
.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-control);
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}
.field .select { display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.field input:focus-visible,
.field .select:focus-visible,
.input:focus-visible,
.input-wrap:focus-within {
  outline: 3px solid rgba(255, 222, 89, 0.9);
  outline-offset: 1px;
}
::placeholder { color: #7A8471; }

/* Champ avec icône à gauche (et bouton à droite éventuel) */
.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 6px 0 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border-control);
}
.input-wrap > .icon { width: 18px; height: 18px; color: var(--ink-muted); }
/* .field .input-wrap : même spécificité que « .field input[type=…] », déclaré après → gagne */
.input-wrap input,
.field .input-wrap input {
  flex: 1;
  width: auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: none;
  border-radius: 0;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}
.input-wrap__btn {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.input-wrap__btn .icon { width: 18px; height: 18px; }

/* Règles de mot de passe en pastilles qui passent au vert */
.rules { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rules li {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  background: var(--disabled-surface);
  color: var(--neutral-text);
  font-size: 11.5px;
  font-weight: 700;
}
.rules li .icon { width: 12px; height: 12px; }
.rules li.is-ok { background: var(--moss-surface); color: var(--moss-dark); }

/* Champ "Parcours" façon recherche (ouvre #course-search-modal) */
.course-search-field {
  width: 100%;
  height: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-control);
  background: var(--surface);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.course-search-field .icon { width: 18px; height: 18px; color: var(--ink-muted); flex-shrink: 0; }

/* Choix exclusifs (trous, niveau, type…) */
.toggle-row { display: flex; gap: var(--space-2); }
.toggle-btn {
  flex: 1;
  min-height: 44px;
  padding: 6px 8px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-control);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 16px;
  cursor: pointer;
}
.toggle-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); font-weight: 800; }

.chip-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.chip {
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-control);
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.chip[disabled] { border-color: transparent; background: var(--disabled-surface); color: var(--disabled-text); cursor: not-allowed; }

.switch {
  position: relative;
  flex-shrink: 0;
  width: 50px;
  height: 30px;
  padding: 0;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--disabled-surface);
  box-shadow: inset 0 0 0 1px var(--border-control);
  cursor: pointer;
  transition: background 0.18s ease;
}
.switch[aria-checked="true"] { background: var(--accent-moss); box-shadow: none; }
.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: 0 1px 3px rgba(26, 43, 31, 0.3);
  transition: transform 0.18s ease;
}
.switch[aria-checked="true"] .switch__thumb { transform: translateX(20px); }

/* Sélecteur de handicap façon molette iOS */
.wheel-picker {
  position: relative;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--radius-sm);
  background: var(--surface-cream);
}
.wheel-highlight {
  position: absolute;
  top: 50%;
  left: 8px;
  right: 8px;
  transform: translateY(-50%);
  height: 40px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-control);
  background: var(--surface-warm);
  pointer-events: none;
}
.wheel-col {
  position: relative;
  height: 200px;
  width: 68px;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.wheel-col::-webkit-scrollbar { display: none; }
.wheel-item {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 700;
  color: var(--disabled-text);
  font-variant-numeric: tabular-nums;
  scroll-snap-align: center;
}
.wheel-item--active { color: var(--ink); font-size: 24px; font-weight: 800; }
.wheel-spacer { height: 80px; }
.wheel-sep { position: relative; font-size: 24px; font-weight: 800; color: var(--ink); }

/* Sections du formulaire de création : cartes blanches */
.form-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
}
.form-section__title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; }
.form-section__title .icon { width: 18px; height: 18px; }

/* ---------- Joueurs (création / rejoindre) ---------- */
.player-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
}
/* Création : le pseudo prend toute la 1re ligne, réglages + badge passent dessous */
.player-row--edit { flex-wrap: wrap; row-gap: 8px; }
.player-row--edit .player-row__input { flex: 1 1 calc(100% - 42px); }
.player-row--edit .settings-pill { margin-left: 42px; max-width: none; flex-shrink: 1; min-width: 0; }
.player-row--edit .badge,
.player-row--edit .player-remove { margin-left: auto; }
.player-row__avatar { width: 30px; height: 30px; border-radius: var(--radius-pill); flex-shrink: 0; }
.player-row__name { font-size: 15px; font-weight: 700; flex: 1; min-width: 0; }
.player-row__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.player-row__input:focus-visible { outline: 2px solid var(--primary); border-radius: 6px; }
.player-chip-list { display: flex; flex-direction: column; gap: var(--space-2); }
/* Ligne joueur cliquable (choisir le nouveau marqueur) */
.player-row--choice { width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; flex-wrap: wrap; }
.player-row--choice:hover:not(:disabled) { border-color: var(--border-strong); }
.player-row--choice:disabled { cursor: default; opacity: 0.55; }
.player-row--choice .meta { width: 100%; padding-left: 42px; margin-top: -6px; }
/* « C'est moi » : rattacher ce téléphone à un joueur inscrit par le capitaine */
.player-row__claim {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  background: var(--primary);
  color: var(--ink);
  font: 800 12.5px var(--font-sans);
  cursor: pointer;
}
.player-row__claim:disabled { opacity: 0.55; cursor: default; }

/* Bouton résumé des réglages d'un joueur (départ + handicap) */
.settings-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  max-width: 132px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-control);
  background: var(--surface-subtle);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
  cursor: pointer;
}
.settings-pill--todo { background: var(--surface-warm); border-color: rgba(227, 103, 46, 0.45); }
.tee-dot { width: 10px; height: 10px; flex-shrink: 0; border-radius: var(--radius-pill); box-shadow: inset 0 0 0 1px rgba(26, 43, 31, 0.35); }
.tee-dot--lg { width: 14px; height: 14px; }
.tee-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-control);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.tee-option--selected { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.player-remove {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.btn-add-player {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--ink);
  flex-shrink: 0;
  white-space: nowrap;
}
.badge--pending { background: var(--disabled-surface); color: var(--neutral-text); }
.badge--applied { background: var(--moss-surface); color: var(--moss-dark); }
.badge--rejected { background: var(--danger-surface); color: var(--danger-text); }

.color-swatches { display: flex; gap: 12px; }
.color-swatch {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 3px solid transparent;
  cursor: pointer;
  padding: 0;
}
.color-swatch[aria-pressed="true"] { border-color: var(--surface-cream); box-shadow: 0 0 0 2px var(--ink); }

.info-row { display: flex; flex-wrap: wrap; gap: 6px; }
.info-row__chip { padding: 5px 10px; border-radius: var(--radius-pill); background: rgba(255, 253, 247, 0.62); font-size: 12px; font-weight: 700; }

/* Propositions de parcours */
.suggestion-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
}
.suggestion-card__name { font-weight: 700; font-size: 15px; }
.suggestion-card__meta { font-size: 12.5px; color: var(--ink-muted); font-weight: 500; }

/* ---------- Boutons ---------- */
.btn {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-control);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn .icon { width: 18px; height: 18px; }
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 3px solid var(--accent-moss); outline-offset: 2px; }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn--primary:disabled { background: var(--disabled-surface); color: var(--disabled-text); border-color: transparent; cursor: not-allowed; }
.btn--yellow { background: var(--primary); border-color: var(--primary); color: var(--ink); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-muted); min-height: 44px; font-size: 13px; font-weight: 700; }
.btn--danger { background: var(--danger-text); border-color: var(--danger-text); color: #fff; }
.btn--danger-link { background: transparent; border-color: transparent; color: var(--danger-text); min-height: 44px; font-size: 13px; font-weight: 700; }

/* Barre d'actions collée en bas (Suivant, Valider, Saisir un score…) */
.footer {
  padding: 12px var(--space-5) max(var(--space-5), calc(var(--space-3) + env(safe-area-inset-bottom)));
  background: var(--surface-cream);
  border-top: 1px solid var(--border-hairline);
  display: flex;
  gap: var(--space-3);
}
.footer--fixed { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; }
.footer .btn { flex: 1; width: auto; min-width: 0; }
.footer .btn--back { flex: 0 0 120px; }

.error-text {
  background: var(--danger-surface);
  color: var(--danger-text);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Popups ---------- */
.toast-overlay, .modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(26, 43, 31, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.toast-card, .modal-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5) var(--space-5);
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: var(--shadow-float);
}
.modal-card { text-align: left; display: flex; flex-direction: column; gap: var(--space-4); max-height: 88vh; overflow-y: auto; }
.modal-card--center { text-align: center; align-items: center; }

/* Règles en bref d'un format de jeu (création de partie) */
.rules-card { padding: 14px 16px; border-radius: var(--radius-md); background: var(--surface-warm); display: flex; flex-direction: column; gap: 6px; }
.rules-card__title { font-size: 14px; font-weight: 800; }
/* Version repliable (création de partie) : « Le Skins en bref » + chevron, ouverte au toucher */
details.rules-card { gap: 0; }
details.rules-card[open] { gap: 8px; }
details.rules-card summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; cursor: pointer; list-style: none; }
details.rules-card summary::-webkit-details-marker { display: none; }
details.rules-card summary::after { content: ""; width: 8px; height: 8px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: rotate(45deg); margin-top: -4px; flex-shrink: 0; }
details.rules-card[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.rules-card summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.rules-card__list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.rules-card__list li { font-size: 13px; line-height: 18px; color: var(--on-primary-muted); }
.rules-card__list .rules-card__players { font-weight: 800; color: var(--ink); }
.toast-card__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--surface-subtle);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.toast-card__close .icon { width: 12px; height: 12px; }
.toast-card__icon { color: var(--accent-moss); margin-bottom: var(--space-3); }
.toast-card__icon--error { color: var(--danger-text); }
.toast-card__icon .icon { width: 32px; height: 32px; }
.toast-card__message { font-weight: 700; font-size: 15px; margin-bottom: var(--space-4); }
.toast-card__ok { width: 100%; }
.toast-card__track { width: 100%; height: 5px; background: var(--disabled-surface); border-radius: 999px; overflow: hidden; }
.toast-card__bar { height: 100%; width: 100%; background: var(--accent-moss); border-radius: 999px; transition: width linear; }

/* ---------- Scanner de QR (rejoindre une partie) ---------- */
/* Vidéo plein écran ; le cadre de visée « perce » le voile sombre grâce à une ombre géante. */
.qr-scan-open { overflow: hidden; }
.qr-scan {
  --qr-size: min(72vw, 300px);
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
.qr-scan__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qr-scan__frame {
  position: absolute;
  left: 50%;
  top: 42%;
  width: var(--qr-size);
  height: var(--qr-size);
  transform: translate(-50%, -50%);
  border-radius: 22px;
  box-shadow: 0 0 0 200vmax rgba(14, 22, 16, 0.62);
  transition: box-shadow 0.2s;
}
.qr-scan__frame span { position: absolute; width: 44px; height: 44px; border: 4px solid #fff; }
.qr-scan__frame span:nth-child(1) { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 22px; }
.qr-scan__frame span:nth-child(2) { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 22px; }
.qr-scan__frame span:nth-child(3) { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 22px; }
.qr-scan__frame span:nth-child(4) { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 22px; }
.qr-scan--idle .qr-scan__frame { box-shadow: none; opacity: 0.35; }
.qr-scan--found .qr-scan__frame span { border-color: var(--primary); }
.qr-scan__top {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(42% - var(--qr-size) / 2 - 40px);
  text-align: center;
}
.qr-scan__top .eyebrow { color: rgba(255, 255, 255, 0.75); letter-spacing: 2px; }
.qr-scan__close {
  position: absolute;
  top: max(var(--space-4), env(safe-area-inset-top));
  left: var(--space-4);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.qr-scan__close .icon { width: 20px; height: 20px; }
.qr-scan__bottom {
  position: absolute;
  left: var(--space-5);
  right: var(--space-5);
  top: calc(42% + var(--qr-size) / 2 + var(--space-6));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
}
.qr-scan__title { margin: 0; font-size: 20px; font-weight: 800; }
.qr-scan__text { margin: 0 0 var(--space-3); max-width: 32ch; font-size: 14.5px; font-weight: 500; color: rgba(255, 255, 255, 0.78); }
.qr-scan__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 50px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-pill);
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font: 800 15px var(--font-sans);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.qr-scan__btn .icon { width: 18px; height: 18px; }
.qr-scan__btn--primary { background: var(--primary); color: var(--ink); }
.qr-scan__btn:focus-visible, .qr-scan__close:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .qr-scan__frame { transition: none; } }

/* ---------- Confirmation après création ---------- */
.confirm {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-bottom: max(var(--space-5), calc(var(--space-3) + env(safe-area-inset-bottom)));
  overflow-y: auto;
}
.confirm .link-box {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 4px 4px 4px 14px;
  background: var(--surface);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-sm);
}
.confirm .link-box input { flex: 1; min-width: 0; border: none; background: transparent; font-size: 13px; color: var(--ink); }
.confirm .link-box button {
  min-height: 44px;
  border: none;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--radius-xs);
  padding: 0 14px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.invite-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--space-5) var(--space-4) var(--space-4);
  background: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}
.invite-card__eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); }
.invite-card__course { font-size: 15px; font-weight: 800; color: var(--surface-cream); margin: 0 0 var(--space-3); text-align: center; }
#qr-code { background: #fff; padding: 10px; border-radius: var(--radius-sm); line-height: 0; }
.invite-card__or { font-size: 11.5px; font-weight: 600; color: var(--surface-cream); opacity: 0.65; margin-top: var(--space-3); }
.invite-card__code { font-size: 28px; font-weight: 800; letter-spacing: 4px; color: var(--on-ink); font-variant-numeric: tabular-nums; }

/* Encadré d'état (partie terminée, déjà commencée…) */
.status-banner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--surface-warm);
  border: 1px solid var(--border-control);
}
.status-banner__title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.status-banner .btn { text-decoration: none; }

/* ---------- Saisie d'un trou ---------- */
.wg-noscroll { scrollbar-width: none; -ms-overflow-style: none; }
.wg-noscroll::-webkit-scrollbar { display: none; }

.hole-banner {
  flex-shrink: 0;
  background: var(--ink);
  color: var(--surface-cream);
  padding: 12px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hole-banner__pills { display: flex; gap: 6px; padding: 0 16px; overflow-x: auto; }
.hole-pill {
  flex-shrink: 0;
  width: 40px;
  padding: 6px 0 5px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 253, 247, 0.22);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}
.hole-pill__no { color: var(--surface-cream); font-weight: 800; font-size: 14px; line-height: 1; }
.hole-pill__par { color: rgba(255, 253, 247, 0.6); font-weight: 700; font-size: 9.5px; line-height: 1; }
.hole-pill--current { background: var(--primary); border-color: var(--primary); }
.hole-pill--current .hole-pill__no, .hole-pill--current .hole-pill__par { color: var(--ink); }
.hole-banner__stats { display: flex; gap: 22px; padding: 0 16px; }
.hole-banner__stat { display: flex; flex-direction: column; }
.hole-banner__stat-label { color: var(--primary); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.hole-banner__stat-value { color: var(--surface-cream); font-size: 22px; line-height: 24px; font-weight: 800; }

.hole-banner__tees {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  align-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--surface-cream);
}
.hole-banner__tee { display: flex; align-items: center; gap: 5px; }

/* Gage du trou (orange) */
.challenge-card {
  margin: 12px 16px 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-orange);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.challenge-card__select {
  width: 100%;
  height: 44px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.challenge-card__btn {
  flex: 1;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: none;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
/* Résultat saisi : bouton plein (Réussi = blanc/vert, Raté = encre) */
.challenge-card__btn[aria-pressed="true"] { background: #fff; color: var(--moss-dark); box-shadow: inset 0 0 0 2px var(--moss-dark); }
.challenge-card__btn--fail[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.challenge-card__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.challenge-card__tag { padding: 2px 8px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.22); font-size: 11px; font-weight: 800; }
.challenge-card__note { font-size: 12px; line-height: 16px; font-weight: 600; opacity: 0.95; }
.challenge-card__group { display: flex; flex-direction: column; gap: 6px; }
.challenge-card__row { display: flex; align-items: center; gap: 8px; }
.challenge-card__name { flex: 1; min-width: 0; font-size: 14px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.challenge-card__row .challenge-card__btn { flex: 0 0 auto; min-width: 88px; padding: 0 10px; font-size: 13px; }

/* Carte joueur de la saisie : contraste renforcé (lecture en plein soleil) */
.stepper-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-md);
}
.stepper-row__avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
}
.stepper-row__info { flex: 1; min-width: 0; }
.stepper-row__name { font-size: 15px; font-weight: 800; }
.stepper-row__hcp { font-size: 11.5px; font-weight: 600; color: var(--ink-muted); margin-top: 1px; }
.stepper-btn {
  width: var(--space-7);
  height: var(--space-7);
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  font-size: 22px;
  cursor: pointer;
}
.stepper-btn--fill { background: var(--ink); color: var(--on-ink); }
/* Case de score colorée, même échelle que la carte de score (classes .score-*) */
.stepper-value {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.stepper-value--picked-up { color: var(--danger-text); background: var(--danger-surface); }
.pickup-toggle {
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.pickup-toggle[aria-pressed="true"] { border-style: solid; border-color: var(--danger-text); color: var(--danger-text); background: var(--danger-surface); }

/* Onglets de la partie (Saisie / Carte de score / Classement) */
.tab-bar {
  flex-shrink: 0;
  display: flex;
  gap: 4px;
  padding: 6px 12px max(12px, calc(6px + env(safe-area-inset-bottom)));
  background: var(--surface);
  border-top: 1px solid var(--border-hairline);
}
.tab-bar__item {
  flex: 1;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-muted);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
.tab-bar__pill { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tab-bar__pill .icon { width: 18px; height: 18px; }
.tab-bar__item--active { background: var(--primary); color: var(--ink); font-weight: 800; }
/* Anciennes icônes carrées : remplacées par de vraies icônes SVG dans les pages */

/* Barre du bas des pages de jeu (actions + onglets), toujours visible */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: var(--surface-cream);
}
.bottom-nav .footer { border-top: 1px solid var(--border-hairline); padding-bottom: 10px; }

/* ---------- Classement ---------- */
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
}
.rank-row__pos {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--surface-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}
.rank-row__avatar { width: 34px; height: 34px; border-radius: var(--radius-pill); flex-shrink: 0; }
.rank-row__name { font-weight: 700; font-size: 15px; }
.rank-row__meta { font-size: 11.5px; font-weight: 600; color: var(--ink-muted); }
.rank-row__points { font-weight: 800; font-size: 24px; line-height: 26px; font-variant-numeric: tabular-nums; margin-left: auto; text-align: right; }
.rank-row__points div, .rank-row__points small { font-size: 10.5px; line-height: 14px; font-weight: 700; color: var(--ink-muted); white-space: nowrap; }
.rank-row--leader { background: var(--ink); border-color: var(--ink); color: var(--surface-cream); box-shadow: var(--shadow-raised); }
.rank-row--leader .rank-row__pos { background: var(--primary); color: var(--ink); }
.rank-row--leader .rank-row__name { font-weight: 800; }
.rank-row--leader .rank-row__meta,
.rank-row--leader .rank-row__points div,
.rank-row--leader .rank-row__points small { color: rgba(255, 253, 247, 0.72); }
.rank-row--leader .rank-row__points { color: var(--primary); }
.rank-row__chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.live-chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 800; white-space: nowrap; color: #fff; }
.live-chip--albatros { background: var(--score-albatros); }
.live-chip--eagle { background: var(--score-eagle); }
.live-chip--birdie { background: var(--score-birdie); }
.live-chip--streak { background: var(--danger-surface); color: var(--danger-text); }
/* État propre au format au-dessus du classement (Match play, Skins) */
.format-detail { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-warm); font-size: 14px; font-weight: 800; text-align: center; white-space: pre-line; }
.rank-row--last { background: #FBEBEB; border-color: rgba(178, 58, 58, 0.18); }
.rank-row--last .rank-row__pos { background: var(--danger-surface); color: var(--danger-text); }

.trophy-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(26, 43, 31, 0.25);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-muted);
}

/* Carte de score */
.scorecard-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
}
.scorecard-table { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.scorecard-table th, .scorecard-table td {
  padding: 9px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border-hairline);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.scorecard-table th {
  background: var(--surface-subtle);
  font-weight: 700;
  font-size: 11px;
  color: var(--ink-muted);
  position: sticky;
  top: 0;
}
.scorecard-table td:first-child, .scorecard-table th:first-child {
  text-align: left;
  font-weight: 800;
  position: sticky;
  left: 0;
  background: var(--surface);
}
.scorecard-table th:first-child { background: var(--surface-subtle); }
.scorecard-table td { font-weight: 700; }
.scorecard-table td.scorecard-picked-up { color: var(--danger-text); font-style: italic; }
/* Échelle des scores : cases de la carte de score et case de la saisie */
.scorecard-table td.score-albatros, .stepper-value.score-albatros { background: var(--score-albatros); color: #fff; font-weight: 800; }
.scorecard-table td.score-eagle, .stepper-value.score-eagle { background: var(--score-eagle); color: #fff; font-weight: 800; }
.scorecard-table td.score-birdie, .stepper-value.score-birdie { background: var(--score-birdie); color: #fff; font-weight: 800; }
.scorecard-table td.score-par, .stepper-value.score-par { background: var(--score-par); color: var(--ink); font-weight: 800; }
.scorecard-table td.score-bogey, .stepper-value.score-bogey { background: var(--score-bogey); color: var(--ink); font-weight: 800; }
.scorecard-table td.score-double, .stepper-value.score-double { background: var(--score-double); color: #fff; font-weight: 800; }
.scorecard-table td.score-triple, .stepper-value.score-triple { background: var(--score-triple); color: #fff; font-weight: 800; }
.scorecard-table td.scorecard-total, .scorecard-table th.scorecard-total { font-weight: 900; color: var(--ink); }
.scorecard-table input {
  width: 48px;
  height: 36px;
  padding: 0 4px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-control);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.scorecard-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
}
.scorecard-legend__item { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--ink-muted); }
.scorecard-legend__sw { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--border-control); flex-shrink: 0; }

/* ---------- Feuille de match ---------- */
.recap-dark { background: var(--ink); color: var(--surface-cream); }
.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  padding: 0 var(--space-5);
}
.podium__item { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; min-width: 0; }
.podium__circle {
  border-radius: var(--radius-pill);
  border: 3px solid var(--surface-cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
}
.podium__name { font-size: 13px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium__step {
  width: 100%;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: rgba(255, 253, 247, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
}
.podium__item--first .podium__step { background: var(--primary); color: var(--ink); font-size: 24px; }
.podium__item--first .podium__circle { border-color: var(--primary); }

.trophy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-hairline);
}
.trophy-row__icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trophy-row__icon .icon { width: 18px; height: 18px; }
.trophy-row__label { font-weight: 700; font-size: 15px; flex: 1; min-width: 0; }
.trophy-row__player { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }

[hidden] { display: none !important; }

/* Répartition des joueurs en équipes A / B (création, formats par équipe) */
.team-row { display: flex; align-items: center; gap: 8px; }
.team-row__name { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-row__btn { flex: 0 0 76px; min-height: 44px; }

/* Wolf : choix du partenaire du Loup, en tête de la saisie du trou */
.wolf-choice { display: flex; flex-direction: column; gap: var(--space-2); }
.wolf-choice__title { font-weight: 800; }
.wolf-choice__hint { font-size: 13px; color: var(--ink-muted); }
.wolf-choice__options { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }

/* Couleurs d'équipe : A en bleu, B en rouge (tokens --team-a / --team-b) */
.team-row__btn--a[aria-pressed="true"] { background: var(--team-a); border-color: var(--team-a); color: #fff; }
.team-row__btn--b[aria-pressed="true"] { background: var(--team-b); border-color: var(--team-b); color: #fff; }
.team-row__dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 12px; background: var(--border-strong); }
.team-row__dot--a { background: var(--team-a); }
.team-row__dot--b { background: var(--team-b); }
.stepper-row--team-a { background: var(--team-a-surface); box-shadow: inset 4px 0 0 var(--team-a); }
.stepper-row--team-b { background: var(--team-b-surface); box-shadow: inset 4px 0 0 var(--team-b); }
.rank-row--team-a { box-shadow: inset 4px 0 0 var(--team-a); }
.rank-row--team-b { box-shadow: inset 4px 0 0 var(--team-b); }
.team-tag { display: block; }
.team-tag--a { color: var(--team-a); }
.team-tag--b { color: var(--team-b); }
/* Onglet indisponible (ex. Saisie d'une partie clôturée) */
.tab-bar__item--disabled { color: var(--disabled-text); cursor: not-allowed; pointer-events: none; }
/* Plusieurs gagnants d'un même trophée : les uns sous les autres, à droite */
.trophy-row__players { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.trophy-row__icon--muted { background: var(--surface-subtle); }
.trophy-row__dot { width: 20px; height: 20px; border-radius: var(--radius-pill); flex-shrink: 0; }
.trophy-row__player { text-align: right; }
.trophy-row--compact { padding: 8px 12px; }
.trophy-row--compact .trophy-row__icon { width: 30px; height: 30px; }
.trophy-row--compact .trophy-row__label { font-size: 14px; }
.trophy-list { display: flex; flex-direction: column; gap: var(--space-2); }
/* Classement en direct : trophées provisoires en liste (sans le cadre pointillé de l'état vide) */
.trophy-strip--list { display: block; padding: 0; border: 0; }
.trophy-strip__title { margin: 0 0 var(--space-2); font-size: 15px; font-weight: 800; color: var(--ink); }
.trophy-more { width: 100%; }

/* ---------- Amis ---------- */
.friend-row { gap: 12px; }
.friend-row__avatar {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-pill);
  background: var(--accent-moss); color: #fff; font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.friend-row__actions { display: flex; gap: 6px; flex-shrink: 0; }
.friend-row__btn { width: auto; min-height: 44px; padding: 0 14px; font-size: 13.5px; }
.friend-invite { gap: var(--space-3); }
.friend-invite__qr { display: flex; justify-content: center; padding: 12px; background: #fff; border-radius: var(--radius-sm); }
.hero__back { font-weight: 800; color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.h2h { gap: var(--space-2); }
.h2h__score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--space-3); padding: 6px 0; }
.h2h__side { font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h__side:last-child { text-align: right; }
.h2h__value { font-size: 32px; font-weight: 900; letter-spacing: -0.5px; }
.h2h__detail { text-align: center; }
.h2h__row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: var(--space-3);
  min-height: 44px; padding: 8px 0; border-top: 1px solid var(--border-hairline); color: var(--ink); text-decoration: none;
}
.h2h__name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h2h__result { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: var(--radius-pill); background: var(--surface-subtle); }
.h2h__result--win { background: var(--moss-surface); color: var(--moss-dark); }
.h2h__result--loss { background: var(--danger-surface); color: var(--danger-text); }

/* Nouveautés (notifications dans l'appli, accueil) */
.notif-row { align-items: flex-start; }
.notif-row--unread { border-color: var(--accent-orange); box-shadow: inset 4px 0 0 var(--accent-orange); }

/* Réglages à interrupteur (Mon compte) */
.setting-list { gap: 0; padding-top: 4px; padding-bottom: 4px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 12px 0; }
.setting-row + .setting-row { border-top: 1px solid var(--border-hairline); }
.setting-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.setting-row__title { font-size: 15px; font-weight: 800; }

/* Propositions de partie (« On joue ? ») */
.proposal { gap: var(--space-2); }
.proposal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.proposal__date { margin: 0; font-size: 17px; font-weight: 900; }
.proposal__note { font-style: italic; }
.proposal__count { margin: 4px 0 0; font-weight: 800; font-size: 14px; }
.proposal__people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.proposal__person { display: flex; justify-content: space-between; gap: var(--space-2); font-size: 14px; padding: 6px 0; border-top: 1px solid var(--border-hairline); }
.proposal__name { font-weight: 700; }
.proposal__resp { font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--surface-subtle); color: var(--ink-muted); }
.proposal__person--yes .proposal__resp { background: var(--moss-surface); color: var(--moss-dark); }
.proposal__person--no .proposal__resp { background: var(--danger-surface); color: var(--danger-text); }
.proposal__person--maybe .proposal__resp { background: var(--surface-warm); color: var(--on-primary-muted); }
.proposal__actions { display: flex; flex-direction: column; gap: 4px; margin-top: var(--space-2); }
.proposal__warning { margin: 0; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-warm); font-size: 13.5px; font-weight: 700; }
.launch-picker { gap: var(--space-2); }

/* Choix de la date et de l'heure (propositions de partie) */
.day-strip, .hour-strip {
  display: flex; gap: var(--space-2); overflow-x: auto; padding: 2px 2px 6px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.day-strip::-webkit-scrollbar, .hour-strip::-webkit-scrollbar { display: none; }
.day-tile {
  flex: 0 0 60px; min-height: 72px; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-control); background: var(--surface);
  color: var(--ink); font-family: var(--font-sans); cursor: pointer; padding: 6px 0;
}
.day-tile__weekday, .day-tile__month { font-size: 11.5px; font-weight: 700; color: var(--ink-muted); }
.day-tile__weekday { text-transform: capitalize; }
.day-tile__day { font-size: 20px; font-weight: 900; line-height: 1; }
.day-tile[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.day-tile[aria-checked="true"] .day-tile__weekday, .day-tile[aria-checked="true"] .day-tile__month { color: var(--on-ink); }
.day-tile--other { border-style: dashed; }
.hour-chip { flex: 0 0 auto; min-height: 44px; height: 44px; padding: 0 16px; scroll-snap-align: center; }
.chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.day-tile:focus-visible, .hour-chip:focus-visible { outline: 3px solid var(--accent-moss); outline-offset: 2px; }

/* Accueil : quatre tuiles de chiffres (parties, badges, en cours, amis) côte à côte */
.stat-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stat-grid--4 .stat-tile { padding: 10px 8px; }
.stat-grid--4 .stat-tile__icon { top: 10px; right: 8px; width: 14px; height: 14px; }
.stat-grid--4 .stat-tile__value { font-size: 22px; line-height: 26px; }
.stat-grid--4 .stat-tile__label { font-size: 10px; letter-spacing: 0.3px; }
.stat-grid--4 .stat-tile__detail { font-size: 10px; line-height: 13px; }
.stat-tile--orange { background: var(--accent-orange); color: var(--ink); }
.stat-tile--orange .stat-tile__icon, .stat-tile--orange .stat-tile__label, .stat-tile--orange .stat-tile__detail { color: var(--ink); }

/* Pages légales (confidentialité, mentions légales) */
.legal-page { background: var(--surface-cream); }
.legal { width: 100%; max-width: 640px; margin: 0 auto; padding: 8px 20px 48px; display: flex; flex-direction: column; gap: 22px; }
.legal h1 { font-size: 28px; line-height: 32px; font-weight: 900; letter-spacing: -0.5px; }
.legal h2 { font-size: 18px; line-height: 24px; font-weight: 800; margin-bottom: 6px; }
.legal p, .legal li { font-size: 15px; line-height: 22px; color: var(--ink); }
.legal ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid var(--border-hairline); }
.legal th { font-weight: 800; }
.legal a:not(.btn) { color: var(--ink); font-weight: 700; text-decoration: underline; }
.legal-top { width: 100%; max-width: 640px; margin: 0 auto; padding: 14px 20px 0; }
.legal section > p + p { margin-top: 8px; }

/* Zone de texte (retours des joueurs) : même champ que .input, sur plusieurs lignes */
.input.textarea { height: auto; min-height: 140px; padding: 12px 14px; line-height: 21px; resize: vertical; font-family: var(--font-sans); }

/* Case à cocher avec texte (acceptation des conditions d'utilisation) */
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 19px; font-weight: 600; color: var(--ink); cursor: pointer; min-height: 44px; }
.check-row input { width: 22px; height: 22px; flex-shrink: 0; margin: 0; accent-color: var(--ink); }
.check-row a { color: var(--ink); font-weight: 800; text-decoration: underline; }
