/* ============================================================
   CNGT — feuille de style unique.

   La charte NE VIT PAS ICI : elle vient du Design System partagé
   (web/src/design-system/tokens.css, publié à /design-system/tokens.css).
   Ce fichier ne contient plus AUCUNE valeur graphique en dur : uniquement
   un adaptateur qui mappe les noms internes du CNGT vers les tokens --pb-*,
   puis la mise en forme propre au produit (densité livescore, scoreboard,
   tableaux, arbitrage).

   Règle : si un besoin n'est pas couvert par un token, on le DEMANDE à
   l'agent propriétaire du Design System — on n'invente pas une valeur ici.
   C'est ce qui avait produit 5 blocs :root concurrents et 4 définitions
   contradictoires du même composant.
   ============================================================ */

@import url("/design-system/tokens.css");

/* ------------------------------------------------------------
   Polices servies LOCALEMENT (mêmes fichiers que le reste du site).
   Elles venaient de Google Fonts : une requête tierce à chaque visite,
   donc l'adresse IP de chaque visiteur transmise à Google sans
   consentement — et une dépendance réseau pour afficher du texte.
   ------------------------------------------------------------ */
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Regular.ttf");
  font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-SemiBold.ttf");
  font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-ExtraBold.ttf");
  font-weight: 700 900; font-display: swap; }

/* ------------------------------------------------------------
   ADAPTATEUR — noms internes CNGT → tokens du Design System.
   Un seul bloc :root dans tout le fichier (il y en avait cinq).
   ------------------------------------------------------------ */
:root {
  /* Couleurs */
  /* Marque : le VERT PadelBox, pris a la source commune. Ces deux alias
     s'appelaient `--pb-blue*` ; ils rendaient deja du vert depuis que le
     Design System a repointe la marque, mais leur nom mentait. Le nom local
     ne peut PAS etre `--pb-brand` : il masquerait le token partage et
     produirait `--pb-brand: var(--pb-brand)`, une auto-reference invalide. */
  --brand: var(--pb-brand);
  --brand-ink: var(--pb-brand-ink);
  --pb-red: var(--pb-brand-red);
  --pb-red-dark: var(--pb-brand-red);
  --ink: var(--pb-text-primary);
  --ink-2: var(--pb-surface-inverse);
  --paper: var(--pb-surface-card);
  --paper-soft: var(--pb-surface-page);
  --line: var(--pb-border-default);
  --muted: var(--pb-text-muted);
  --ok: var(--pb-success);
  --pb-amber: var(--pb-warning);
  /* Sémantique livescore : le rouge ne sert QUE au direct. */
  --live: var(--pb-live);
  --win: var(--pb-success);
  --accent: var(--pb-brand);

  /* Formes */
  --radius-sm: var(--pb-radius-input);
  --radius: var(--pb-radius-input);
  --radius-lg: var(--pb-radius-card);
  --shadow-card: var(--pb-shadow-card);
  --shadow-pop: var(--pb-shadow-pop);

  /* Typographie — tout en Inter. On ne consomme volontairement PAS
     --pb-font-display (qui vaut Kanit, la marque PadelBox) : l'identité
     typographique séparée du CNGT a été supprimée. Ne pas consommer un
     token n'est pas créer une charte parallèle. */
  --font-body: var(--pb-font-sans);
  --font-display: var(--pb-font-sans);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--paper-soft);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--pb-text-base);
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; }

/* Réponse : le feedback vit sur l'appui (instantané), le relâchement est
   plus doux — courbe à léger débordement pour un retour vivant. */
button {
  font-family: inherit;
  font-size: var(--pb-text-base);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition:
    background-color 0.15s ease,
    transform 0.25s cubic-bezier(0.34, 1.3, 0.64, 1),
    box-shadow 0.15s ease;
}
button:active {
  transform: scale(0.97);
  transition-duration: 0.15s, 0.08s, 0.15s;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ----- Marque PADELBOX ----- */

.pb-logo {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}
/* Le logotype est monochrome depuis la refonte d'identité. Ces deux classes
   sont les dernières traces du lockup à deux tons : elles héritent, pour
   qu'un balisage ancien ne réintroduise pas de couleur. */
.pb-logo .blue, .pb-logo .red { color: inherit; }

.brand-tag {
  font-weight: 700;
  font-size: var(--pb-text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  padding: var(--pb-space-1) var(--pb-space-2);
}

/* ============================================================
   HEADER / NAV (injectés par layout.js)
   ============================================================ */

/* Header blanc à onglets soulignés, comme l'espace club PadelBox.
   Défini directement ici : une couche V4 le repeignait auparavant à coups
   de !important par-dessus une version sombre. */
.site-header {
  background: var(--paper);
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: var(--pb-border-width) solid var(--line);
}

.site-header .header-inner {
  max-width: var(--pb-container-max);
  margin: 0 auto;
  padding: 0 var(--pb-space-5);
  display: block;
}

.site-header .pb-logo { font-size: var(--pb-text-2xl); }

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--pb-space-1);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: wrap;
}
.site-nav::-webkit-scrollbar { display: none; }

/* Onglets soulignés : le bleu marque l'actif, pas une pastille pleine. */
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--pb-text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  /* ≥44px de zone tactile (cible minimale). */
  padding: var(--pb-space-3) var(--pb-space-2);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 0;
  border-bottom: var(--pb-tab-underline-height) solid transparent;
  white-space: nowrap;
  transition: color var(--pb-duration-fast) var(--pb-ease-out),
    border-color var(--pb-duration-fast) var(--pb-ease-out);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--pb-brand);
}
.site-nav a.nav-exit {
  margin-left: var(--pb-space-2);
  color: var(--muted);
}
.site-nav a.nav-exit:hover { color: var(--pb-text-on-brand); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  margin-top: auto;
  background: var(--ink-2);
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--pb-text-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: var(--pb-space-6) var(--pb-space-4);
}
.site-footer .pb-logo { font-size: var(--pb-text-sm); letter-spacing: -0.01em; }

/* ============================================================
   STRUCTURE DE PAGE
   ============================================================ */

/* Respiration mesurée sur lapadelbox.com : 64px entre les sections, et
   le conteneur du design system plutôt qu'un 1100 arbitraire. L'ancienne
   page démarrait à 24px du haut — c'est ce qui donnait cette impression
   d'entassement dès le premier écran. */
.page {
  width: 100%;
  max-width: var(--pb-container-max);
  margin: 0 auto;
  padding: var(--pb-space-8) var(--pb-space-5) calc(var(--pb-space-8) * 2);
}
.page.narrow { max-width: 720px; }
.page.wide { max-width: 1320px; }

.page-head { margin-bottom: var(--pb-space-8); }

/* Le titre de page suit le H1 de lapadelbox.com : 48px au repos, et le
   tracking se resserre à mesure que le texte grandit — une valeur unique
   serait fausse à une taille ou à l'autre. */
.page-title {
  font-weight: 700;
  letter-spacing: var(--pb-tracking-tight);
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 1.08;
  text-wrap: balance;
}
.page-title .accent { color: inherit; }

/* Corps de texte : 18px et interligne 1.625, comme le site principal. À
   14px la phrase d'introduction avait l'air d'une légende, pas d'un texte. */
.page-sub {
  color: var(--muted);
  font-size: var(--pb-text-lg);
  line-height: 1.625;
  margin-top: var(--pb-space-4);
  max-width: 62ch;
}

/* Un titre de section est un TITRE, pas une étiquette. À 14px gris en
   capitales, il pesait exactement autant que le contenu qu'il annonçait :
   deux niveaux à la même taille ne font pas une hiérarchie. */
.section-title {
  display: flex;
  align-items: baseline;
  gap: var(--pb-space-3);
  font-size: var(--pb-text-xl);
  font-weight: 700;
  letter-spacing: var(--pb-tracking-tight);
  text-transform: none;
  color: var(--ink);
  margin: var(--pb-space-8) 0 var(--pb-space-4);
}
.section-title:first-child { margin-top: 0; }
.section-title .count {
  font-weight: 600;
  font-size: var(--pb-text-sm);
  color: var(--muted);
  letter-spacing: 0;
}
.section-title .title-link {
  margin-left: auto;
  font-size: var(--pb-text-sm);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--brand);
  text-decoration: none;
}
.section-title .title-link:hover { text-decoration: underline; }
.section-title .live-indicator {
  font-size: var(--pb-text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--pb-text-on-brand);
  background: var(--brand);
  border-radius: var(--pb-radius-badge);
  padding: var(--pb-space-1) var(--pb-space-3);
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ============================================================
   BANDEAU TOURNOI (haut du site public)
   ============================================================ */

.tourney-band {
  background: var(--ink-2);
  color: var(--pb-text-on-brand);
  padding: var(--pb-space-7) var(--pb-space-4) var(--pb-space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.tourney-band .band-inner { max-width: 1100px; margin: 0 auto; }
.tourney-band .t-name {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.015em;
  font-size: clamp(22px, 4.5vw, 34px);
  line-height: 1.1;
}
.tourney-band .t-meta {
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--pb-text-sm);
  font-weight: 600;
  margin-top: var(--pb-space-2);
  letter-spacing: 0.02em;
}
.band-badges { display: flex; flex-wrap: wrap; gap: var(--pb-space-2); margin-top: var(--pb-space-4); }
.band-badge {
  font-size: var(--pb-text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: var(--pb-space-1) var(--pb-space-3);
}

/* ----- Mise en page à deux colonnes (site public) ----- */

.layout-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--pb-space-8);
  align-items: start;
}
.col-main section + section { margin-top: var(--pb-space-2); }
.col-side section + section { margin-top: var(--pb-space-2); }
@media (max-width: 880px) {
  .layout-cols { grid-template-columns: 1fr; gap: var(--pb-space-2); }
}

/* ----- Carte "Le tournoi" ----- */

.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--pb-space-1) var(--pb-space-4);
}
.info-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: var(--pb-space-3);
  padding: var(--pb-space-3) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--pb-text-sm);
}
.info-row:last-child { border-bottom: none; }
.info-label {
  color: var(--muted);
  font-weight: 600;
  font-size: var(--pb-text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-top: var(--pb-space-1);
}
.info-value { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.info-value .info-link { color: var(--brand); text-decoration: none; font-weight: 700; }
.info-value .info-link:hover { text-decoration: underline; }

/* ----- Table publique des joueurs inscrits ----- */

.players-table {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.pt-row {
  display: flex;
  align-items: center;
  /* Une distance minimale entre le nom, le classement et le club. Sans elle,
     un nom long et un club long se touchaient, voire se chevauchaient. */
  gap: var(--pb-space-3);
  padding: var(--pb-space-3) var(--pb-space-4);
  border-bottom: var(--pb-border-width) solid var(--line);
  font-size: var(--pb-text-sm);
  font-weight: 600;
  /* La hauteur de rangee du design system : la liste garde son rythme meme
     quand un nom passe sur deux lignes. */
  min-height: var(--pb-row-height);
}
/* Le nom prend la place disponible et se tronque ; le club cede en premier,
   parce qu'il est l'information la moins utile pour identifier quelqu'un. */
.pt-row .pt-name { flex: 1 1 auto; min-width: 0; }
.pt-row .rank { flex: none; }
.pt-row:last-child { border-bottom: none; }
.pt-rank {
  min-width: 30px;
  color: var(--pb-border-strong);
  font-size: var(--pb-text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pt-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   LIGNES DE SCORE (site public, style ticker)
   ============================================================ */

.score-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.score-row {
  display: flex;
  align-items: stretch;
  gap: var(--pb-space-4);
  padding: var(--pb-space-3) var(--pb-space-4);
  border-bottom: 1px solid var(--line);
}
.score-row:last-child { border-bottom: none; }

.score-row .sr-players { flex: 1; min-width: 0; }

.sr-line {
  display: flex;
  align-items: center;
  gap: var(--pb-space-3);
  padding: var(--pb-space-1) 0;
}

.sr-name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: var(--pb-text-base);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sr-line.winner .sr-name { font-weight: 800; }
.sr-line:not(.winner) .sr-name { color: var(--pb-text-muted); }

.sr-serve { color: var(--brand); }

/* Drapeaux + classement (partout où un joueur est affiché) */
.flag {
  display: inline-block;
  vertical-align: -1px;
  border-radius: 2px;
  margin-right: var(--pb-space-2);
  box-shadow: 0 0 0 1px rgba(16, 17, 19, 0.08);
}
/* Pays sans drapeau embarqué : code à deux lettres, jamais d'image cassée. */
.flag-code {
  font-size: var(--pb-text-xs);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: var(--paper-soft);
  border: var(--pb-border-width) solid var(--line);
  border-radius: 2px;
  padding: var(--pb-space-1) var(--pb-space-1);
  box-shadow: none;
}
.rank {
  color: var(--pb-border-strong);
  font-size: var(--pb-text-xs);
  font-weight: 600;
  margin-left: var(--pb-space-2);
  white-space: nowrap;
}
.player-label { display: inline-flex; align-items: center; min-width: 0; }
.player-label-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-name { display: inline-flex; align-items: center; min-width: 0; }
.sr-name > span:first-of-type { overflow: hidden; text-overflow: ellipsis; }

.sr-sets { display: flex; gap: var(--pb-space-1); }
.sr-set {
  min-width: 26px;
  text-align: center;
  font-weight: 700;
  font-size: var(--pb-text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: var(--pb-space-1) var(--pb-space-1);
}
.sr-set.won { color: var(--ink); background: var(--paper); border-color: var(--pb-border-strong); }
.sr-set sup { font-size: var(--pb-text-xs); }

.sr-points {
  min-width: 42px;
  text-align: center;
  font-weight: 800;
  font-size: var(--pb-text-base);
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.score-row .sr-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: var(--pb-space-1);
  min-width: 92px;
  text-align: right;
}
.sr-side .sr-time { color: var(--muted); font-size: var(--pb-text-sm); font-weight: 600; white-space: nowrap; }
.sr-side .sr-badges { display: flex; gap: var(--pb-space-1); flex-wrap: wrap; justify-content: flex-end; }

.badge {
  display: inline-block;
  font-weight: 600;
  font-size: var(--pb-text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--pb-space-1) var(--pb-space-2);
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.red { background: var(--pb-red); border-color: var(--pb-red); color: var(--pb-text-on-brand); }
.badge.blue { background: var(--brand); border-color: var(--brand); color: var(--pb-text-on-brand); }
.badge.outline { background: transparent; color: var(--muted); border: 1px solid var(--line); }

@media (max-width: 540px) {
  .score-row { flex-direction: column; gap: var(--pb-space-2); }
  .score-row .sr-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
  }
}

/* ============================================================
   BOUTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--pb-space-2);
  height: 48px;
  padding: 0 var(--pb-space-6);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--pb-text-base);
  text-decoration: none;
  color: var(--pb-text-on-brand);
  background: var(--brand);
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.btn:hover { background: var(--brand-ink); }
.btn:active { transform: scale(0.98); }

.btn.red { background: var(--pb-red); }
.btn.red:hover { background: var(--pb-red-dark); }

/* « Fin du match » etait noir pur, hors palette. Le vert le plus profond
   (forest-900) joue le meme role -- une action grave, visuellement distincte
   des boutons de point -- sans introduire une troisieme couleur. */
.btn.dark { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn.dark:hover { background: var(--ink); border-color: var(--ink); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.ghost:hover { background: var(--paper-soft); border-color: var(--pb-border-strong); }

.btn.sm { height: 38px; padding: 0 var(--pb-space-4); font-size: var(--pb-text-sm); }
.btn.block { width: 100%; }
.btn.lg { height: 56px; font-size: var(--pb-text-lg); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============================================================
   CARTES / LISTES (espace club)
   ============================================================ */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: var(--pb-space-6);
}
.card + .card { margin-top: var(--pb-space-4); }
.card h2 {
  font-size: var(--pb-text-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: var(--pb-space-4);
}

.item-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.item-row {
  display: flex;
  align-items: center;
  gap: var(--pb-space-3);
  padding: var(--pb-space-3) var(--pb-space-4);
  border-bottom: 1px solid var(--line);
}
.item-row:last-child { border-bottom: none; }
.item-row .ir-main { flex: 1; min-width: 0; }
.item-row .ir-title { font-weight: 700; font-size: var(--pb-text-base); letter-spacing: -0.01em; }
.item-row .ir-sub { color: var(--muted); font-size: var(--pb-text-sm); margin-top: var(--pb-space-1); }
.item-row .ir-actions { display: flex; gap: var(--pb-space-2); align-items: center; }
.item-row.selectable {
  cursor: pointer;
  transition: background-color 0.12s ease, transform 0.2s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.item-row.selectable:hover { background: var(--paper-soft); }
.item-row.selectable:active { background: var(--pb-surface-sunken); transform: scale(0.995); }
.item-row.selected { background: var(--pb-brand-soft); box-shadow: inset 3px 0 0 var(--brand); }

.btn-icon {
  height: 34px;
  padding: 0 var(--pb-space-3);
  font-size: var(--pb-text-sm);
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.btn-icon:hover { color: var(--pb-red); border-color: var(--pb-red); }

/* ----- Bandeaux de statistiques ----- */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--pb-space-3);
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pb-space-4) var(--pb-space-5);
}
.stat .stat-value {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: var(--pb-text-2xl);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
/* Une valeur chiffrée n'est ni un direct ni une erreur : elle prend l'encre
   de marque, pas une couleur d'alerte. */
.stat .stat-value.blue, .stat .stat-value.red { color: var(--brand); }
.stat .stat-label { color: var(--muted); font-size: var(--pb-text-sm); margin-top: var(--pb-space-1); }

/* ============================================================
   FORMULAIRES
   ============================================================ */

.field { margin-bottom: var(--pb-space-4); }
.field:last-child { margin-bottom: 0; }

.field > label {
  display: block;
  font-size: var(--pb-text-sm);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--pb-space-2);
}
.field .sub-label { font-weight: 400; color: var(--muted); }

.field input[type="text"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  height: 48px;
  padding: 0 var(--pb-space-4);
  font-size: var(--pb-text-base);
  font-family: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
}
.field textarea {
  height: auto;
  min-height: 110px;
  padding: var(--pb-space-3) var(--pb-space-4);
  resize: vertical;
  line-height: 1.5;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A6067' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: var(--pb-space-8);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  /* On ne supprime PLUS l'outline : il portait l'anneau de focus partage,
     et le remplacer par une ombre coloree privait l'utilisateur clavier du
     seul repere garanti lisible sur tous les fonds. La bordure coloree
     reste — elle marque le champ actif — l'anneau se dessine par-dessus. */
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--pb-brand-soft);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--pb-border-strong); }

.field input[type="file"] { font-size: var(--pb-text-sm); color: var(--muted); }

.field .hint { font-size: var(--pb-text-sm); color: var(--muted); margin-top: var(--pb-space-2); }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--pb-space-5);
}
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

.form-inline {
  display: flex;
  gap: var(--pb-space-3);
}
.form-inline input { flex: 1; }

.logo-preview {
  margin-top: var(--pb-space-3);
  max-height: 64px;
  max-width: 180px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  padding: var(--pb-space-2);
  display: none;
}

.status-msg { margin-top: var(--pb-space-3); font-size: var(--pb-text-sm); font-weight: 600; color: var(--ok); min-height: 21px; }
.status-msg.error { color: var(--pb-red); }

/* ----- Choix segmentés ----- */

.segmented {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--paper);
}
.segmented button {
  flex: 1;
  height: 46px;
  font-size: var(--pb-text-base);
  font-weight: 600;
  background: transparent;
  color: var(--muted);
  border-radius: 0;
  border-right: 1px solid var(--line);
}
.segmented button:last-child { border-right: none; }
.segmented button.selected { background: var(--brand); color: var(--pb-text-on-brand); }

/* ============================================================
   INTERFACE ARBITRE
   ============================================================ */

.match-screen { display: none; }

.match-topline {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--pb-space-2) var(--pb-space-4);
  margin-bottom: var(--pb-space-4);
  color: var(--muted);
  font-size: var(--pb-text-sm);
  font-weight: 600;
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pb-space-4);
  margin-bottom: var(--pb-space-4);
}
@media (max-width: 480px) { .scoreboard { gap: var(--pb-space-3); } }

.player-panel {
  background: var(--ink-2);
  border-radius: var(--radius);
  padding: var(--pb-space-5) var(--pb-space-3) var(--pb-space-4);
  text-align: center;
  color: var(--pb-text-on-brand);
  position: relative;
  overflow: hidden;
}
.player-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
}
/* Les deux joueurs se distinguent par l'ÉPAISSEUR du filet, pas par la
   teinte : plein pour A, ajouré pour B. Une distinction qui survit au
   daltonisme, et qui ne coûte pas une couleur au vocabulaire. */
.player-panel.a::before { background: var(--brand); }
.player-panel.b::before {
  background: repeating-linear-gradient(90deg,
    var(--brand) 0 var(--pb-space-3), transparent var(--pb-space-3) var(--pb-space-5));
}

.player-name {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-size: clamp(16px, 3.4vw, 24px);
  overflow-wrap: anywhere;
}

.player-sets-games {
  margin-top: var(--pb-space-2);
  color: rgba(255, 255, 255, 0.55);
  font-size: clamp(13px, 2.4vw, 15.5px);
  font-weight: 600;
}
.player-sets-games b { color: var(--pb-text-on-brand); font-weight: 800; }

.player-points {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 900;
  font-size: clamp(68px, 17vw, 140px);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  will-change: transform;
}
/* Chaque point marqué fait "respirer" le chiffre : feedback immédiat,
   retour critique (sans oscillation résiduelle). */
.player-points.pop { animation: point-pop 0.3s cubic-bezier(0.34, 1.4, 0.64, 1); }
@keyframes point-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
/* LE SCORE EST BLANC, et ce n'est pas un choix esthetique.
   Le panneau d'arbitrage est presque noir (#101113). Le vert de marque
   dessus donne 1,54:1 -- le chiffre le plus important de l'ecran etait
   quasi illisible, et il l'etait DEJA pour le joueur A avant cette passe.
   En blanc il donne 18,89:1, comme le nom juste au-dessus.
   Les deux joueurs restent distingues par le filet superieur (plein contre
   ajoure) et par leur bouton (plein contre contour) : une distinction de
   FORME, qui ne depend d'aucun contraste de couleur. */
.player-panel .player-points { color: var(--pb-text-inverse); }

.point-btn {
  width: 100%;
  margin-top: var(--pb-space-3);
  min-height: clamp(72px, 12vh, 110px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(17px, 3.2vw, 22px);
  color: var(--pb-text-on-brand);
  border-radius: var(--radius-sm);
}
/* Exactement la paire de lapadelbox.com : un bouton plein, un bouton en
   contour. L'arbitre les distingue au premier coup d'oeil, et le rouge
   reste disponible pour ce qu'il signifie vraiment. */
.point-btn.a {
  background: var(--brand);
  color: var(--pb-text-on-brand);
  border: 2px solid var(--brand);
}
.point-btn.a:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.point-btn.b {
  background: var(--paper);
  color: var(--brand);
  border: 2px solid var(--brand);
}
.point-btn.b:hover { background: var(--pb-brand-soft); }

.match-status {
  text-align: center;
  min-height: 32px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(15px, 3.2vw, 20px);
  color: var(--ink);
  margin-bottom: var(--pb-space-3);
}

.set-history {
  text-align: center;
  color: var(--muted);
  font-size: var(--pb-text-sm);
  font-weight: 600;
  margin-bottom: var(--pb-space-4);
  min-height: 20px;
}

.match-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pb-space-3);
}
.match-actions .btn { height: 58px; font-size: var(--pb-text-base); }

/* ============================================================
   MODALE
   ============================================================ */

/* Tâche modale : scrim qui atténue l'arrière-plan + surface qui se
   "matérialise" (flou + échelle + opacité ensemble). Entrée et sortie
   empruntent le même chemin (symétrie spatiale). */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 14, 17, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pb-space-4);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0s linear 0.24s;
}
@supports (backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px)) {
  .modal-backdrop {
    background: rgba(13, 14, 17, 0.45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.22s ease;
}

.modal {
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  padding: var(--pb-space-6);
  max-width: 460px;
  width: 100%;
  text-align: center;
  max-height: 92vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(10px);
  filter: blur(4px);
  opacity: 0;
  transition:
    transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1),
    filter 0.24s ease,
    opacity 0.2s ease;
}
.modal-backdrop.open .modal {
  transform: none;
  filter: none;
  opacity: 1;
}
.modal h2 {
  font-weight: 800;
  font-size: var(--pb-text-xl);
  letter-spacing: -0.015em;
}
.modal p { color: var(--muted); margin: var(--pb-space-3) 0 var(--pb-space-5); font-size: var(--pb-text-base); }
.modal .modal-buttons { display: flex; flex-direction: column; gap: var(--pb-space-3); }

.final-preview {
  max-width: 210px;
  border-radius: var(--radius-sm);
  margin: 4px auto 14px;
  display: block;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

/* ============================================================
   PHOTOS / STORIES (espace club uniquement)
   ============================================================ */

.results-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pb-space-3);
  align-items: center;
  margin-bottom: var(--pb-space-5);
}
.results-toolbar .search {
  flex: 1;
  min-width: 220px;
  height: 46px;
  padding: 0 var(--pb-space-4);
  font-size: var(--pb-text-base);
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.results-toolbar .search:focus {
  /* On ne supprime PLUS l'outline : il portait l'anneau de focus partage,
     et le remplacer par une ombre coloree privait l'utilisateur clavier du
     seul repere garanti lisible sur tous les fonds. La bordure coloree
     reste — elle marque le champ actif — l'anneau se dessine par-dessus. */
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--pb-brand-soft);
}

.filter-chips { display: flex; flex-wrap: wrap; gap: var(--pb-space-2); }
.filter-chips button {
  height: 38px;
  padding: 0 var(--pb-space-4);
  font-size: var(--pb-text-sm);
  font-weight: 600;
  background: var(--paper);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.filter-chips button.selected {
  background: var(--ink);
  color: var(--pb-text-on-brand);
  border-color: var(--ink);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--pb-space-5);
}

.result-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.result-card:hover { border-color: var(--pb-border-strong); box-shadow: 0 6px 20px rgba(16, 17, 19, 0.08); }

.result-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: var(--ink-2);
}

.result-card .result-body { padding: var(--pb-space-4) var(--pb-space-4); flex: 1; }
.result-card .result-phase {
  font-weight: 700;
  font-size: var(--pb-text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--pb-space-1);
}
.result-card .result-players { font-weight: 700; font-size: var(--pb-text-base); letter-spacing: -0.01em; }
.result-card .result-score {
  font-weight: 800;
  color: var(--brand);
  font-size: var(--pb-text-lg);
  margin: var(--pb-space-1) 0;
  font-variant-numeric: tabular-nums;
}
.result-card .result-meta { color: var(--muted); font-size: var(--pb-text-sm); }
.result-card .result-wa { font-size: var(--pb-text-xs); margin-top: var(--pb-space-2); font-weight: 600; }
.result-card .result-wa.ok { color: var(--ok); }
.result-card .result-wa.ko { color: var(--muted); }

.result-card .result-actions {
  display: flex;
  gap: var(--pb-space-2);
  padding: 0 var(--pb-space-4) var(--pb-space-4);
}
.result-card .result-actions a,
.result-card .result-actions button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  font-size: var(--pb-text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.result-actions .dl { background: var(--brand); color: var(--pb-text-on-brand); }
.result-actions .dl:hover { background: var(--brand-ink); }
.result-actions .share {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}
.result-actions .share:hover { background: var(--paper-soft); }

.result-card.new { animation: new-result 3s ease-out; }
@keyframes new-result {
  0%   { box-shadow: 0 0 0 3px var(--brand); }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ============================================================
   RECHERCHE DE JOUEURS (suggestions du classement)
   ============================================================ */

.search-wrap { position: relative; flex: 1; }
.search-wrap input { width: 100%; height: 48px; padding: 0 var(--pb-space-4); font-size: var(--pb-text-base);
  font-family: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-sm); }
.search-wrap input:focus {
  /* On ne supprime PLUS l'outline : il portait l'anneau de focus partage,
     et le remplacer par une ombre coloree privait l'utilisateur clavier du
     seul repere garanti lisible sur tous les fonds. La bordure coloree
     reste — elle marque le champ actif — l'anneau se dessine par-dessus. */
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--pb-brand-soft);
}

.suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(16, 17, 19, 0.12);
  z-index: 30;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}
.suggestions.open { display: block; }
.suggestion {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: var(--pb-space-3) var(--pb-space-4);
  font-size: var(--pb-text-base);
  font-weight: 600;
  background: transparent;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
}
.suggestion:last-child { border-bottom: none; }
.suggestion:hover, .suggestion:focus-visible { background: var(--paper-soft); }

/* ============================================================
   TABLEAU (élimination directe)
   ============================================================ */

.toolbar-row {
  display: flex;
  align-items: center;
  gap: var(--pb-space-3);
  flex-wrap: wrap;
}
.draw-info { color: var(--muted); font-size: var(--pb-text-sm); font-weight: 600; margin-right: auto; }

.bracket {
  position: relative;
  display: flex;
  gap: var(--pb-space-6);
  overflow-x: auto;
  padding-bottom: var(--pb-space-3);
  -webkit-overflow-scrolling: touch;
}

.bracket-round {
  min-width: 240px;
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
}

.bracket-round-title {
  font-size: var(--pb-text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--pb-space-3);
}

.bracket-matches {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: var(--pb-space-3);
}

.bracket-match {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.bracket-match.champion { border-color: var(--brand); }

.bm-slot {
  display: flex;
  align-items: center;
  padding: var(--pb-space-3) var(--pb-space-3);
  font-size: var(--pb-text-sm);
  font-weight: 600;
  min-height: 42px;
}
.bm-slot + .bm-slot { border-top: 1px solid var(--line); }
.bm-slot .bm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-slot.winner { font-weight: 800; }
.bm-slot.loser { color: var(--pb-border-strong); }
.bm-slot.loser .flag { opacity: 0.55; }
.bm-slot.empty { color: var(--pb-border-strong); font-weight: 500; }

.bm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pb-space-3);
  padding: var(--pb-space-2) var(--pb-space-3);
  border-top: 1px solid var(--line);
  background: var(--paper-soft);
}
.bm-score {
  font-size: var(--pb-text-sm);
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bm-arbitrer {
  font-size: var(--pb-text-sm);
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  margin-left: auto;
}
.bm-arbitrer:hover { text-decoration: underline; }

/* ============================================================
   ÉTATS VIDES / TOAST / DIVERS
   ============================================================ */

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: var(--pb-space-7) var(--pb-space-5);
  font-size: var(--pb-text-sm);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* Le toast arrive avec du momentum (léger débordement) et repart par le
   même chemin, plus vite qu'il n'est arrivé. */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 90px);
  background: var(--ink-2);
  color: var(--pb-text-on-brand);
  border-left: 4px solid var(--brand);
  padding: var(--pb-space-4) var(--pb-space-5);
  border-radius: var(--radius-sm);
  font-size: var(--pb-text-base);
  font-weight: 600;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transition: transform 0.3s ease-in, opacity 0.25s ease-in;
  z-index: 100;
  max-width: 92vw;
}
.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
  transition: transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1), opacity 0.2s ease-out;
}

.notice {
  display: flex;
  gap: var(--pb-space-3);
  align-items: flex-start;
  background: var(--pb-brand-soft);
  border: 1px solid var(--pb-brand-line);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: var(--pb-space-3) var(--pb-space-4);
  font-size: var(--pb-text-sm);
}
.notice a { color: var(--brand); font-weight: 600; }

/* Mouvement réduit : le feedback reste (fondus courts), les déplacements,
   débordements et échelles disparaissent. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .toast, .toast.show {
    transform: translate(-50%, 0);
    transition: opacity 0.2s ease !important;
  }
  .modal { transform: none; filter: none; }
  .modal-backdrop, .modal-backdrop.open .modal {
    transition: opacity 0.2s ease !important;
  }
  .player-points.pop { animation: none; }
}

/* Transparence réduite : surfaces givrées -> solides. */
@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--ink-2);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .modal-backdrop {
    background: rgba(13, 14, 17, 0.72);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Contraste renforcé : fonds pleins, bordures franches.
   Ce bloc repeignait auparavant l'en-tête en SOMBRE avec du texte blanc —
   hérité d'une version où le header était sombre. Depuis le passage au
   header blanc, cela donnait du texte quasi blanc sur fond blanc en mode
   contraste élevé : exactement l'inverse du but recherché. On renforce
   désormais le contraste À L'INTÉRIEUR du thème clair. */
@media (prefers-contrast: more) {
  .site-header { background: var(--paper); border-bottom-color: var(--pb-border-strong); }
  .site-nav a { color: var(--ink); }
  .site-nav a.active { border-bottom-color: var(--pb-brand-ink); }
  .card, .item-list, .score-list, .result-card { border-color: var(--pb-border-strong); }
  .sr-set { border-color: var(--pb-border-strong); }
  /* Le texte secondaire remonte au texte principal : plus de gris sur gris. */
  .muted, .t-meta, .brand-sub, .powered { color: var(--ink); }
  /* Anneau de focus : on ÉPAISSIT, on ne recolore pas. Les couleurs de
     l'anneau partagé tiennent déjà 12,29:1 sur fond clair comme sur fond
     vert ; les changer ici n'améliorerait rien et créerait un second
     comportement à maintenir. Même règle que côté PadelBox, pour que le
     même geste clavier donne le même résultat sur les deux produits. */
  :focus-visible { outline-width: 3px; }
}


/* ============================================================
   V2 — MARQUE CNGT + LIVESCORE DENSE
   CNGT est la marque principale ; « Powered by PadelBox » discret.
   Discipline couleur : rouge = LIVE/alertes, vert = victoires,
   bleu = accent CNGT (liens/actions), encre = contenu.
   ============================================================ */

/* ----- Marque ----- */

/* Wordmark CNGT : Inter 900 + point bleu. Pas d'italique ni de famille
   display séparée — l'identité typographique parallèle a été supprimée. */
.cngt-logo {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 900;
  font-size: var(--pb-text-2xl);
  letter-spacing: var(--pb-tracking-tight);
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
  position: relative;
}
.cngt-logo::after { content: ""; display: inline-block; width: 6px; height: 6px;
  border-radius: var(--pb-radius-pill); background: var(--accent);
  margin-left: var(--pb-space-1); vertical-align: super; }

.brand-sub {
  color: var(--muted);
  font-size: var(--pb-text-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 640px) { .brand-sub { display: none; } }

.site-footer .f-brand {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 500;
  font-size: var(--pb-text-sm);
  letter-spacing: 0;
  color: var(--muted);
}
.site-footer .f-powered { display: block; margin-top: var(--pb-space-2); letter-spacing: 0.04em;
  font-size: var(--pb-text-xs); color: rgba(255,255,255,0.3); text-transform: none; }
.site-footer .f-powered a { color: rgba(255,255,255,0.45); text-decoration: none; }
.site-footer .f-powered a:hover { color: var(--pb-text-on-brand); }

.site-nav a.nav-search {
  margin-left: var(--pb-space-3);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.55);
}

/* ----- Sous-navigation tournoi ----- */

.t-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 58px;
  z-index: 30;
}
.t-nav-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--pb-space-4);
  display: flex;
  gap: var(--pb-space-1);
  overflow-x: auto;
  scrollbar-width: none;
}
.t-nav-inner::-webkit-scrollbar { display: none; }
.t-nav a {
  padding: var(--pb-space-3) var(--pb-space-3);
  font-size: var(--pb-text-sm);
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.t-nav a:hover { color: var(--ink); }
.t-nav a.active { color: var(--ink); border-bottom-color: var(--accent); }

/* ----- Cartes de match denses (livescore) ----- */

.match-list {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.match-list + .match-list { margin-top: var(--pb-space-3); }

.match-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: var(--pb-space-3);
  align-items: center;
  padding: var(--pb-space-2) var(--pb-space-3);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.12s ease;
}
.match-card:last-child { border-bottom: none; }
.match-card:hover { background: var(--paper-soft); }
.match-card.is-live { box-shadow: inset 3px 0 0 var(--live); }

.mc-left { display: flex; flex-direction: column; gap: var(--pb-space-1); min-width: 0; }
.mc-status { font-size: var(--pb-text-xs); font-weight: 700; letter-spacing: 0.04em; }
.mc-status.live-txt { color: var(--live); }
.mc-status.done { color: var(--muted); text-transform: uppercase; font-size: var(--pb-text-xs); }
.mc-status.sched { color: var(--ink); font-variant-numeric: tabular-nums; font-size: var(--pb-text-sm); }
.mc-sub { font-size: var(--pb-text-xs); color: var(--pb-border-strong); }

.mc-players { min-width: 0; }
.mc-line {
  display: flex;
  align-items: center;
  gap: var(--pb-space-2);
  padding: var(--pb-space-1) 0;
  min-width: 0;
}
.mc-name { flex: 1; display: inline-flex; align-items: center; gap: var(--pb-space-2); min-width: 0;
  font-weight: 600; font-size: var(--pb-text-sm); }
.mc-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-line.winner .mc-n { font-weight: 800; }
.mc-line.loser .mc-n { color: var(--pb-text-muted); }
.serve-dot { color: var(--brand); font-size: var(--pb-text-xs); line-height: 1; flex: none; }
.seed { color: var(--pb-border-strong); font-size: var(--pb-text-xs); font-weight: 700; flex: none; }

/* Hiérarchie d'une carte de match : le SCORE est ce qu'on vient lire.
   Il était plus petit (13 px) que le nom du joueur (14 px) — l'œil tombait
   donc d'abord sur le nom. Le score domine désormais, sans perdre la
   densité de la liste. */
.mc-score { display: flex; gap: var(--pb-space-1); align-items: center; flex: none; }
.mc-set {
  min-width: 22px;
  text-align: center;
  font-size: var(--pb-text-base);
  font-weight: 800;
  font-variant-numeric: var(--pb-font-numeric);
  color: var(--muted);
}
.mc-set sup { font-size: var(--pb-text-xs); }
.mc-set.won { color: var(--win); }
.mc-set.cur { color: var(--ink); background: var(--paper-soft); border-radius: 3px; }
/* Points du jeu en cours : l'information la plus vivante de la carte. */
.mc-pts {
  min-width: 30px;
  text-align: center;
  font-weight: 800;
  font-size: var(--pb-text-lg);
  /* Le point courant était rouge. Un score n'est pas une alerte : le direct
     est déjà dit par le badge LIVE et le filet rouge de la carte. */
  color: var(--brand);
  font-variant-numeric: var(--pb-font-numeric);
}

.mc-meta { display: flex; flex-direction: column; align-items: flex-end; gap: var(--pb-space-1);
  max-width: 200px; font-size: var(--pb-text-xs); }
.mc-tournament { font-size: var(--pb-text-xs); font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.03em; text-align: right; }
.mc-m { font-size: var(--pb-text-xs); color: var(--pb-border-strong); text-align: right; }

@media (max-width: 560px) {
  .match-card { grid-template-columns: 46px minmax(0, 1fr); }
  .mc-meta { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start;
    gap: var(--pb-space-2); padding-left: var(--pb-space-8); max-width: none; }
  .mc-tournament, .mc-m { text-align: left; }
}

.match-list.big .match-card { padding: var(--pb-space-4); }
.match-list.big .mc-name { font-size: var(--pb-text-lg); }
.match-list.big .mc-set { font-size: var(--pb-text-lg); min-width: 26px; }
.match-list.big .mc-pts { font-size: var(--pb-text-lg); min-width: 38px; }

/* ----- Divers dashboard ----- */

.title-link { font-family: var(--font-body); font-style: normal; font-weight: 600;
  font-size: var(--pb-text-xs); letter-spacing: 0; text-transform: none; color: var(--accent);
  text-decoration: none; margin-left: auto; }
.title-link:hover { text-decoration: underline; }

.search-form { display: flex; gap: var(--pb-space-2); }
.search-form input {
  flex: 1; min-width: 0; height: 44px; padding: 0 var(--pb-space-4); font-size: var(--pb-text-base);
  font-family: inherit; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper);
}
.search-form input:focus { border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--pb-brand-soft); }

/* Seule valeur graphique encore en dur : l'or des étoiles de catégorie.
   Aucun token du Design System ne couvre ce besoin — demandé à l'agent
   propriétaire plutôt que d'inventer une couleur locale. */
.stars { color: #eab308; font-size: var(--pb-text-xs); letter-spacing: 1px; }
/* Même spécificité que .badge.red / .badge.blue (et déclaré après) : la
   cascade suffit, plus besoin de !important pour gagner. */
.badge.live-badge, .live-badge {
  background: var(--live); border-color: var(--live); color: var(--pb-text-on-brand);
}
.ir-date { font-size: var(--pb-text-sm); font-weight: 600; color: var(--muted); white-space: nowrap; }
.pt-row.selectable { cursor: pointer; text-decoration: none; color: inherit; }
.pt-row.selectable:hover { background: var(--paper-soft); }
.pt-extra {
  margin-left: auto;
  font-size: var(--pb-text-xs);
  color: var(--muted);
  text-align: right;
  /* Le club se tronque plutot que de pousser le nom hors de la ligne. */
  flex: 0 1 auto;
  min-width: 0;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Sous 480px la ligne n'a plus la largeur pour trois colonnes : le club
   passe dessous plutot que d'ecraser le nom. */
@media (max-width: 480px) {
  .pt-row { flex-wrap: wrap; row-gap: var(--pb-space-1); }
  .pt-extra { max-width: 100%; flex-basis: 100%; text-align: left; margin-left: 0; }
}
.more-link { margin-top: var(--pb-space-3); font-size: var(--pb-text-sm); }
.more-link a { color: var(--accent); text-decoration: none; font-weight: 600; }

.countdown {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--pb-space-4) var(--pb-space-5); font-size: var(--pb-text-base); margin-bottom: var(--pb-space-5);
}
.champion-block {
  background: var(--ink-2); color: var(--pb-text-on-brand); border-radius: var(--radius);
  padding: var(--pb-space-6); text-align: center; margin-bottom: var(--pb-space-5);
}
.champion-block .cb-label { font-size: var(--pb-text-xs); letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); font-weight: 700; }
.champion-block .cb-name { font-family: var(--font-display); font-style: normal;
  font-weight: 900; font-size: var(--pb-text-3xl); margin-top: var(--pb-space-2); }
.champion-block .cb-sub { color: rgba(255,255,255,0.6); font-size: var(--pb-text-sm); margin-top: var(--pb-space-1); }

/* ----- Programme : bascule heure/court + créneaux ----- */

.view-toggle { display: flex; gap: 0; border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden; width: fit-content; margin-bottom: var(--pb-space-4);
  background: var(--paper); }
.vt-btn { height: 40px; padding: 0 var(--pb-space-5); font-size: var(--pb-text-sm); font-weight: 600;
  background: transparent; color: var(--muted); border-radius: 0; }
.vt-btn + .vt-btn { border-left: 1px solid var(--line); }
.vt-btn.active { background: var(--ink); color: var(--pb-text-on-brand); }

.slot-label { font-size: var(--pb-text-sm); font-weight: 800; color: var(--ink);
  margin: var(--pb-space-4) 0 var(--pb-space-2); font-variant-numeric: tabular-nums; }

/* ----- Tableaux : connecteurs + onglets de tour mobiles ----- */

.round-tabs { position: relative; display: none; gap: var(--pb-space-2); overflow-x: auto; margin-bottom: var(--pb-space-3);
  scrollbar-width: none; }
.round-tabs::-webkit-scrollbar { display: none; }
.round-tab { height: 36px; padding: 0 var(--pb-space-3); font-size: var(--pb-text-sm); font-weight: 700;
  border: 1px solid var(--line); background: var(--paper); color: var(--muted);
  border-radius: 999px; white-space: nowrap; }
.round-tab.active { background: var(--ink); color: var(--pb-text-on-brand); border-color: var(--ink); }

.draw-block + .draw-block { margin-top: var(--pb-space-7); }

.bracket-pair { position: relative; display: flex; flex-direction: column;
  justify-content: space-around; gap: var(--pb-space-3); flex: 1; padding-right: var(--pb-space-4); }
.bracket-pair:not(.single)::after {
  content: ""; position: absolute; right: 4px; top: 25%; bottom: 25%;
  border-right: 2px solid var(--line); border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line); width: 10px; border-left: none;
  border-radius: 0 6px 6px 0;
}
.bracket-round .bracket-matches { gap: var(--pb-space-4); }
.bracket-match.is-bye { opacity: 0.65; }
.bm-link { font-size: var(--pb-text-xs); font-weight: 700; color: var(--accent);
  text-decoration: none; margin-left: auto; }
.bm-link:hover { text-decoration: underline; }
.bracket-round.champion-col .bracket-match.champion { border-color: var(--win); }
.bracket-match.champion .bm-slot { font-weight: 800; }

@media (max-width: 768px) {
  .round-tabs { display: flex; }
  .bracket { display: block; }
  .bracket-round { display: none; min-width: 0; flex: none; }
  .bracket-round.active, .bracket-round.active-always { display: block; }
  .bracket-round-title { display: none; }
  .bracket-pair { padding-right: 0; }
  .bracket-pair:not(.single)::after { display: none; }
}

/* ----- Fiche joueur ----- */

.player-head { margin-bottom: var(--pb-space-6); }
.ph-name { display: flex; align-items: center; gap: var(--pb-space-3); }
.ph-name h1 { font-weight: 800; letter-spacing: -0.02em; font-size: clamp(24px, 5vw, 32px); }
.ph-name .flag { width: 26px; height: 19px; }
.ph-facts { display: flex; flex-wrap: wrap; gap: var(--pb-space-4); margin-top: var(--pb-space-3);
  color: var(--muted); font-size: var(--pb-text-sm); }
.ph-facts b { color: var(--ink); }

/* ----- Page match ----- */

.match-head { margin: var(--pb-space-1) 0 var(--pb-space-3); }
.mh-meta { color: var(--muted); font-size: var(--pb-text-sm); }
.end-reason { margin: var(--pb-space-3) 0; font-size: var(--pb-text-sm); font-weight: 600; color: var(--live); }

.stats-table { background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; }
.st-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--pb-space-3);
  padding: var(--pb-space-2) var(--pb-space-4); border-bottom: 1px solid var(--line); align-items: center; }
.st-row:last-child { border-bottom: none; }
.st-a { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-b { text-align: left; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-label { font-size: var(--pb-text-xs); color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.05em; font-weight: 600; text-align: center; }

.momentum { position: relative; background: var(--paper); border: var(--pb-border-width) solid var(--line);
  border-radius: var(--pb-radius-card); padding: var(--pb-space-4) var(--pb-space-4) var(--pb-space-3); overflow-x: auto; }
.momentum-legend { display: flex; gap: var(--pb-space-5); font-size: var(--pb-text-xs); color: var(--muted);
  margin-top: var(--pb-space-2); flex-wrap: wrap; }
.momentum-legend i { display: inline-block; width: var(--pb-dot-size); height: var(--pb-dot-size);
  border-radius: 2px; margin-right: var(--pb-space-1); vertical-align: -1px; }
.momentum-legend .dot-a { background: var(--pb-brand); }
.momentum-legend .dot-b { background: var(--live); }

/* ----- Classement officiel FFT -----
   Dense et lisible : c'est un tableau de chiffres qu'on parcourt, pas une
   liste de cartes. Chiffres à chasse fixe pour que les colonnes s'alignent. */
.rk-table {
  border: var(--pb-border-width) solid var(--line);
  border-radius: var(--pb-radius-card);
  overflow: hidden;
  background: var(--paper);
}
.rk-head, .rk-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 62px 62px 62px;
  align-items: center;
  gap: var(--pb-space-2);
  padding: 0 var(--pb-space-3);
  min-height: var(--pb-row-height-compact);
  border-bottom: var(--pb-border-width) solid var(--line);
}
.rk-row:last-child { border-bottom: 0; }
.rk-head {
  background: var(--paper-soft);
  font-size: var(--pb-text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.rk-pos { font-weight: 800; font-variant-numeric: var(--pb-font-numeric); }
.rk-pos i { font-style: normal; color: var(--muted); font-size: var(--pb-text-xs); }
.rk-name { display: flex; align-items: baseline; gap: var(--pb-space-1); flex-wrap: wrap;
  font-size: var(--pb-text-sm); min-width: 0; }
.rk-club { font-style: normal; color: var(--muted); font-size: var(--pb-text-xs);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-num { text-align: right; font-size: var(--pb-text-sm);
  font-variant-numeric: var(--pb-font-numeric); color: var(--muted); }
.rk-pts { font-weight: 800; color: var(--ink); }
.rk-move { font-size: var(--pb-text-xs); font-weight: 700; }
.rk-move.up { color: var(--pb-success); }
.rk-move.down { color: var(--pb-danger); }
.rk-move.new { color: var(--pb-brand); }
@media (max-width: 560px) {
  /* Sur téléphone on sacrifie « Tournois » : le rang, le nom et les points
     sont ce qu'on vient chercher. */
  .rk-head, .rk-row { grid-template-columns: 34px minmax(0, 1fr) 52px 52px; }
  .rk-head span:nth-child(4), .rk-row span:nth-child(4) { display: none; }
}

/* Mode d'entrée dans le tableau (Q / LL / WC) : discret mais lisible —
   il explique la présence d'un joueur peu classé au tableau final. */
.entry-tag {
  font-size: var(--pb-text-xs);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--pb-brand-ink);
  background: var(--pb-brand-soft);
  border-radius: 2px;
  padding: var(--pb-space-1) var(--pb-space-1);
  margin-left: var(--pb-space-1);
  vertical-align: 1px;
}

/* ----- Conflits de programmation -----
   Deux niveaux visuellement distincts : rouge = matériellement impossible,
   ambre = à vérifier selon le règlement. Les confondre revenait à faire
   ignorer les deux. */
.conflict-list { display: grid; gap: var(--pb-space-1); margin-top: var(--pb-space-2); }
.conflict {
  font-size: var(--pb-text-xs);
  font-weight: 600;
  padding: var(--pb-space-1) var(--pb-space-2);
  border-radius: var(--pb-radius-input);
  border: var(--pb-border-width) solid transparent;
}
.conflict-error {
  color: var(--pb-danger); background: var(--pb-danger-soft);
  border-color: var(--pb-danger);
}
.conflict-warn {
  color: var(--pb-warning); background: var(--pb-warning-soft);
  border-color: var(--pb-warning-soft);
}

/* ----- Tableau multi-courts du superviseur -----
   Dense par nature : on doit suivre 3-4 courts d'un coup d'œil. Ce n'est
   PAS l'écran d'arbitrage en plus petit — une seule action par joueur
   (« il gagne le jeu »), le reste est de la lecture. */
.court-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--pb-space-3);
  margin-top: var(--pb-space-4);
}
.cb-card {
  background: var(--paper);
  border: var(--pb-border-width) solid var(--line);
  border-radius: var(--pb-radius-card);
  padding: var(--pb-space-3);
}
.cb-card.is-live { border-color: var(--live); }
.cb-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--pb-space-2); margin-bottom: var(--pb-space-2);
}
.cb-court { font-weight: 700; font-size: var(--pb-text-sm); }
.cb-live, .cb-susp, .cb-soon {
  font-size: var(--pb-text-xs); font-weight: 700; letter-spacing: 0.04em;
  padding: 2px var(--pb-space-2); border-radius: var(--pb-radius-badge);
}
.cb-live { color: var(--pb-text-on-brand); background: var(--live); }
.cb-susp { color: var(--pb-warning); background: var(--pb-warning-soft); }
.cb-soon { color: var(--muted); background: var(--paper-soft); }
.cb-line {
  display: flex; align-items: center; gap: var(--pb-space-2);
  min-height: var(--pb-row-height-compact);
  border-top: var(--pb-border-width) solid var(--line);
}
.cb-name { flex: 1; font-size: var(--pb-text-sm); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-score {
  font-weight: 800; font-size: var(--pb-text-lg);
  font-variant-numeric: var(--pb-font-numeric);
  min-width: 48px; text-align: right;
}
/* Cible tactile confortable : on l'utilise debout, au bord du court. */
.cb-btn {
  min-height: 40px; min-width: 64px;
  border-radius: var(--pb-radius-button);
  border: var(--pb-border-width) solid var(--line);
  background: var(--paper-soft);
  color: var(--ink);
  font-size: var(--pb-text-sm); font-weight: 600;
}
.cb-btn:hover { background: var(--pb-brand-soft); border-color: var(--pb-brand); }
.cb-btn:disabled { opacity: 0.5; }
.cb-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--pb-space-2); margin-top: var(--pb-space-2);
  border-top: var(--pb-border-width) solid var(--line);
  padding-top: var(--pb-space-2);
}
.cb-op { font-size: var(--pb-text-xs); color: var(--muted); }

/* Mention « donnée non saisie » : distingue explicitement l'absence de
   mesure d'un vrai zéro. */
.stats-note {
  font-size: var(--pb-text-xs);
  color: var(--muted);
  margin-top: var(--pb-space-2);
  font-style: italic;
}

/* Courbe d'écart cumulé. Les couleurs DOIVENT passer par le CSS : un
   attribut de présentation SVG (fill="var(--x)") n'est pas substitué par le
   navigateur et retomberait silencieusement sur du noir. */
.momentum .mo-axis { stroke: var(--line); stroke-width: 1; }
.momentum .mo-set { stroke: var(--pb-border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.momentum .mo-line { fill: none; stroke: var(--pb-brand); stroke-width: 2;
  stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.momentum .mo-area { fill: var(--pb-brand-soft); stroke: none; }

.media-block img { max-width: 240px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); display: block; }
.media-actions { margin-top: var(--pb-space-3); }

/* ----- Pages texte ----- */

.text-page { line-height: 1.7; }
.text-page h1 { font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--pb-space-2); }
.text-page h2 { font-weight: 700; margin: var(--pb-space-5) 0 var(--pb-space-2); font-size: var(--pb-text-lg); }
.text-page h3 { font-weight: 700; margin: var(--pb-space-3) 0 var(--pb-space-1); font-size: var(--pb-text-base); }
.text-page ul { padding-left: var(--pb-space-6); }
.text-page a { color: var(--accent); }

/* ----- Connexion & manage ----- */

.auth-card { max-width: 420px; margin: 40px auto; }
/* Barre des espaces privés : BLANCHE, comme l'espace club de référence. */
.manage-topbar { background: var(--paper); color: var(--ink); padding: var(--pb-space-2) var(--pb-space-4);
  display: flex; align-items: center; gap: var(--pb-space-3); font-size: var(--pb-text-sm); flex-wrap: wrap;
  border-bottom: var(--pb-border-width) solid var(--line); }
.manage-topbar .mt-user { margin-left: auto; color: var(--muted); }
@media (max-width: 560px) {
  /* Sans quoi la barre déborde de l'écran et « Déconnexion » est rognée. */
  .manage-topbar { gap: var(--pb-space-2); padding: var(--pb-space-2) var(--pb-space-3); font-size: var(--pb-text-xs); }
  .manage-topbar .mt-link { display: none; }
  .manage-topbar .mt-user { white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; max-width: 46vw; }
}
.alert-list .item-row { border-left: 3px solid var(--live); }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--pb-space-3); margin-bottom: var(--pb-space-5); }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--pb-space-3) var(--pb-space-4); }
.kpi b { display: block; font-size: var(--pb-text-2xl); font-weight: 800; letter-spacing: -0.02em; }
.kpi span { font-size: var(--pb-text-xs); color: var(--muted); }
.kpi.live b { color: var(--live); }

/* Actions secondaires de l'arbitre (menu) */
.actions-menu { position: relative; }
.actions-panel { position: absolute; bottom: calc(100% + 8px); right: 0;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); padding: var(--pb-space-2); display: none; min-width: 210px; z-index: 50; }
.actions-panel.open { display: block; }
.actions-panel button { display: block; width: 100%; text-align: left; padding: var(--pb-space-3) var(--pb-space-3);
  font-size: var(--pb-text-sm); font-weight: 600; background: transparent; border-radius: var(--radius-sm); }
.actions-panel button:hover { background: var(--paper-soft); }
.actions-panel .danger { color: var(--live); }
.chrono { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }

/* Liens-cartes : jamais de soulignement bleu par defaut */
a.item-row, a.pt-row { text-decoration: none; color: inherit; }
a.item-row .ir-title, a.pt-row .pt-name { color: var(--ink); }

/* ----- Favoris (localStorage) ----- */

.fav-btn { margin-left: var(--pb-space-3); padding: var(--pb-space-1) var(--pb-space-3); border-radius: 999px;
  border: 1px solid var(--line); background: var(--paper); color: var(--muted);
  font: inherit; font-size: var(--pb-text-sm); font-weight: 600; cursor: pointer;
  white-space: nowrap; vertical-align: middle; }
.fav-btn.on { border-color: var(--accent); color: var(--accent); }
.tourney-band .fav-btn { border-color: rgba(255,255,255,0.35); background: transparent;
  color: rgba(255,255,255,0.8); margin-left: 0; margin-top: var(--pb-space-2); align-self: flex-start; }
.tourney-band .fav-btn.on { border-color: var(--accent); color: var(--pb-text-on-brand);
  background: var(--accent); }
.fav-chips { display: flex; flex-wrap: wrap; gap: var(--pb-space-2); margin-bottom: var(--pb-space-5); }
.fav-chip { display: inline-block; padding: var(--pb-space-2) var(--pb-space-4); border-radius: 999px;
  background: var(--paper); border: 1px solid var(--line); color: inherit;
  text-decoration: none; font-size: var(--pb-text-sm); font-weight: 600; }
.fav-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   V3 — ALIGNEMENT SUR LE LANGAGE PADELBOX (espace club de référence)
   Relevé sur web/src/components/ui.tsx + globals.css du site principal :
   boutons pilules encre (36-40px, 14px/500), inputs 40px à libellé dans la
   case avec halo bleu au focus, étiquettes de section au carré bleu,
   modales 16px, ligne #eaecee. Adaptation livescore conservée : cartes
   denses, scores dominants, rouge = LIVE uniquement.
   ============================================================ */


/* ----- Boutons : pilules, encre par défaut (comme la référence) ----- */

/* Bouton primaire : le vert de marque, mesure sur lapadelbox.com
   (rgb(27,59,44)). Il etait noir -- reste d'une charte anterieure. Dans un
   site bicolore blanc et vert, l'action principale ne peut pas etre noire. */
.btn {
  height: 40px;
  padding: 0 var(--pb-space-5);
  border-radius: var(--pb-radius-button);
  font-size: var(--pb-text-sm);
  font-weight: 500;
  background: var(--brand);
  border: var(--pb-border-width) solid var(--brand);
  color: var(--pb-text-on-brand);
}
.btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
/* `.blue` est un nom herite : il ne designe plus une couleur, il designe
   l'action principale -- qui est justement le style par defaut. */
.btn.blue { background: var(--brand); border-color: var(--brand); }
.btn.blue:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn.red { background: var(--pb-red); border-color: var(--pb-red); }
.btn.red:hover { background: var(--pb-red-dark); border-color: var(--pb-red-dark); }
.btn.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--paper-soft); border-color: var(--pb-border-strong); }
.btn.sm { height: 33px; padding: 0 var(--pb-space-4); font-size: var(--pb-text-sm); }
.btn.lg { height: 52px; font-size: var(--pb-text-base); padding: 0 var(--pb-space-6); }
.btn:disabled { opacity: 0.4; }
.btn-icon { border-radius: 999px; }

/* ----- Inputs : 40px, rayon 8, halo bleu discret au focus ----- */

.field input[type="text"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="time"],
.field input[type="date"],
.field input[type="datetime-local"],
.field input[type="number"],
.field select,
.field textarea,
.search-block input,
.auth-card input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 var(--pb-space-4);
  font-size: var(--pb-text-sm);
  background: var(--paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { height: auto; padding: var(--pb-space-3) var(--pb-space-4); }
.field input:focus,
.field select:focus,
.field textarea:focus,
.search-block input:focus,
.auth-card input:focus {
  /* Pas de `outline: none` : l'anneau de focus partage doit rester visible.
     La bordure coloree s'y ajoute, elle ne le remplace pas. */
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--pb-brand-soft);
}
.field > label { font-size: var(--pb-text-sm); font-weight: 600; color: var(--muted); }
.field input::placeholder, .field textarea::placeholder { color: rgba(90, 96, 103, 0.6); }

/* ----- Étiquettes de section : carré bleu + capitales espacées ----- */

/* Ce bloc ramenait le titre a 11px gris tres espace, annulant la
   hierarchie definie plus haut. Il ne conserve que ce qui lui est propre. */
.section-title {
  font-size: var(--pb-text-xl);
  letter-spacing: var(--pb-tracking-tight);
  color: var(--ink);
}
/* Le carré ne portait aucune information : il compensait un titre trop
   discret. Le titre étant maintenant lisible, il n'a plus de raison d'être. */
.section-title::before { content: none; }

/* ----- Cartes et modales : rayons de la référence ----- */

.card { border-radius: 12px; }
.match-card { border-radius: 10px; }
.modal {
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(16, 17, 19, 0.22);
}
.modal h2 { font-size: var(--pb-text-base); font-weight: 600; }

/* ----- Messages d'erreur : bandeau rouge doux (référence ErrorBanner) ----- */

.status-msg.error {
  display: block;
  border: var(--pb-border-width) solid var(--pb-danger);
  background: var(--pb-danger-soft);
  color: var(--pb-danger-ink);
  border-radius: 10px;
  padding: var(--pb-space-2) var(--pb-space-4);
  font-size: var(--pb-text-sm);
}
.status-msg.error:empty { display: none; }

/* ----- Retard (ambre de la référence : ça marche, mais avec une limite) ----- */

.delay { color: var(--pb-amber); font-weight: 600; }

/* ----- Vue COURTS ----- */

.courts-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--pb-space-3); margin-bottom: var(--pb-space-5); }
.court-tile { background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: var(--pb-space-3) var(--pb-space-4); display: flex; flex-direction: column; gap: var(--pb-space-1); min-height: 74px; }
.court-name { font-size: var(--pb-text-xs); font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); }
.court-live { text-decoration: none; color: inherit; font-size: var(--pb-text-sm); font-weight: 600; }
.court-live b { margin-left: var(--pb-space-1); }
.court-next { font-size: var(--pb-text-sm); color: var(--ink); font-weight: 600; }
.court-players { font-size: var(--pb-text-sm); color: var(--muted); }
.court-free { font-size: var(--pb-text-sm); color: var(--muted); }

/* ----- Forme (5 derniers matchs) ----- */

.form-row { display: inline-flex; gap: var(--pb-space-1); }
.form-chip { display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 999px; font-size: var(--pb-text-xs); font-weight: 700; }
.form-chip.w { background: rgba(22, 163, 74, 0.12); color: var(--ok); }
.form-chip.l { background: var(--paper-soft); color: var(--muted); border: 1px solid var(--line); }

/* ----- Ma journée (fiche joueur) ----- */

.my-day { border-left: 3px solid var(--brand); }
.my-day .md-main { font-size: var(--pb-text-base); margin-bottom: var(--pb-space-2); }
.my-day .md-line { font-size: var(--pb-text-sm); color: var(--muted); margin-top: var(--pb-space-1); }
.my-day .md-links { margin-top: var(--pb-space-3); font-size: var(--pb-text-sm); }
.my-day .md-links a { color: var(--brand); text-decoration: none; }

/* ----- Face à face ----- */

.h2h { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.h2h-score { display: flex; align-items: center; justify-content: center; gap: var(--pb-space-4);
  padding: var(--pb-space-3); font-size: var(--pb-text-sm); border-bottom: 1px solid var(--line); }
.h2h-score b { font-size: var(--pb-text-xl); letter-spacing: 0.05em; }
.h2h-row { display: flex; justify-content: space-between; gap: var(--pb-space-3); padding: var(--pb-space-2) var(--pb-space-4);
  font-size: var(--pb-text-sm); color: var(--muted); text-decoration: none; border-top: 1px solid var(--line); }
.h2h-row:first-of-type { border-top: none; }
.h2h-row:hover { background: var(--paper-soft); }
.h2h-res { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* Topbar manager (fond encre) : lien et bouton lisibles sur sombre. */
.manage-topbar .mt-link { color: rgba(255,255,255,0.7); text-decoration: none; }
.manage-topbar .mt-link:hover { color: var(--pb-text-on-brand); }
.manage-topbar .mt-logout {
  background: transparent; color: var(--pb-text-on-brand); border: 1px solid rgba(255,255,255,0.3);
}
.manage-topbar .mt-logout:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }

/* ----- Admin plateforme : codes & badges ----- */

.code-chip { display: inline-flex; align-items: center; gap: var(--pb-space-2); }
.code-chip b { font-size: var(--pb-text-lg); letter-spacing: 3px; font-family: inherit; }
.badge.suspended { background: var(--pb-warning-soft); color: var(--pb-warning);
  border: 1px solid rgba(226,50,55,0.3); margin-left: var(--pb-space-2); font-size: var(--pb-text-xs);
  padding: var(--pb-space-1) var(--pb-space-2); border-radius: 999px; }

/* Codes d'arbitrage (réglages tournoi) */
.scoped-code { display: flex; align-items: center; gap: var(--pb-space-3); flex-wrap: wrap;
  padding: var(--pb-space-3) 0; border-top: 1px solid var(--line); }
.scoped-code:first-of-type { border-top: none; }
.scoped-code .sc-label { font-weight: 600; min-width: 96px; }
.scoped-code .sc-val { font-size: var(--pb-text-lg); letter-spacing: 3px; font-family: inherit;
  min-width: 90px; color: var(--ink); }

/* ============================================================
   CONSOLE D'ADMINISTRATION PLATEFORME (/cngt/admin)
   Langage « tableau de pilotage SaaS » : rail latéral, indicateurs
   groupés, tableau de données. Distinct de l'espace organisateur.
   ============================================================ */

.admin-topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center;
  gap: var(--pb-space-3); padding: 0 var(--pb-space-5); height: 54px; background: var(--paper); color: var(--ink);
  border-bottom: var(--pb-border-width) solid var(--line); }
.admin-topbar .admin-tag { font-size: var(--pb-text-xs); font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); background: var(--paper-soft);
  border: var(--pb-border-width) solid var(--line);
  border-radius: var(--pb-radius-badge); padding: var(--pb-space-1) var(--pb-space-2); }
.admin-topbar .admin-user { margin-left: auto; font-size: var(--pb-text-sm); color: var(--muted); }
.admin-topbar .mt-logout { background: var(--paper); color: var(--ink);
  border: var(--pb-border-width) solid var(--line); }
.admin-topbar .mt-logout:hover { background: var(--paper-soft); border-color: var(--pb-border-strong); }

.admin-layout { display: grid; grid-template-columns: 210px minmax(0,1fr); min-height: calc(100vh - 54px); }
.admin-rail { border-right: 1px solid var(--line); padding: var(--pb-space-5) var(--pb-space-3); display: flex;
  flex-direction: column; gap: var(--pb-space-1); background: var(--paper); position: sticky; top: 54px;
  align-self: start; height: calc(100vh - 54px); }
.admin-nav { text-align: left; background: transparent; color: var(--muted); border: none;
  border-radius: 8px; padding: var(--pb-space-3) var(--pb-space-3); font-size: var(--pb-text-sm); font-weight: 600; cursor: pointer; }
.admin-nav:hover { background: var(--paper-soft); color: var(--ink); }
.admin-nav.active { background: var(--ink); color: var(--pb-text-on-brand); }

.admin-content { padding: var(--pb-space-6) var(--pb-space-7) var(--pb-space-8); max-width: 1180px; }
.admin-h1 { font-size: var(--pb-text-2xl); font-weight: 800; letter-spacing: -0.02em; }
.admin-sub { color: var(--muted); font-size: var(--pb-text-sm); margin: var(--pb-space-1) 0 var(--pb-space-6); }
.admin-back { background: none; border: none; color: var(--brand); font-size: var(--pb-text-sm);
  font-weight: 600; cursor: pointer; padding: 0; margin-bottom: var(--pb-space-4); }

/* Indicateurs groupés */
.metric-group { margin-bottom: var(--pb-space-6); }
.metric-group-title { font-size: var(--pb-text-xs); font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: var(--pb-space-3); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--pb-space-3); }
.metric { background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: var(--pb-space-4) var(--pb-space-5); }
.metric-value { font-size: var(--pb-text-3xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.metric-label { font-size: var(--pb-text-sm); color: var(--muted); margin-top: var(--pb-space-2); font-weight: 600; }
.metric-hint { font-size: var(--pb-text-xs); color: var(--pb-border-strong); margin-top: var(--pb-space-1); }
.metric.accent .metric-value { color: var(--brand); }
.metric.warn .metric-value { color: var(--pb-amber); }

/* Panneaux & colonnes */
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--pb-space-5); margin-top: var(--pb-space-2); }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: var(--pb-space-4) var(--pb-space-5); margin-bottom: var(--pb-space-5); }
.panel-title { font-size: var(--pb-text-sm); font-weight: 700; color: var(--ink); margin-bottom: var(--pb-space-3); }
.mini-list { display: flex; flex-direction: column; }
.mini-row { display: flex; justify-content: space-between; gap: var(--pb-space-3); align-items: center;
  padding: var(--pb-space-3) 0; border-top: 1px solid var(--line); font-size: var(--pb-text-sm); text-decoration: none; color: inherit; }
.mini-row:first-child { border-top: none; }
.mini-row.link:hover { color: var(--brand); }
.mini-name { font-weight: 600; }
.mini-metric { color: var(--muted); white-space: nowrap; }

/* Formulaire compact */
.inline-form { display: flex; gap: var(--pb-space-3); flex-wrap: wrap; }
.inline-form input { flex: 1 1 180px; }

/* Tableau de données */
.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.data-table { width: 100%; border-collapse: collapse; font-size: var(--pb-text-sm); min-width: 760px; }
.data-table th { text-align: left; font-size: var(--pb-text-xs); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: var(--pb-space-3) var(--pb-space-4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: var(--pb-space-3) var(--pb-space-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .cell-strong { font-weight: 700; color: var(--ink); text-decoration: none; }
.data-table .cell-strong:hover { color: var(--brand); }
.data-table td.live-num { color: var(--brand); font-weight: 700; }
.data-table tr.row-suspended { opacity: 0.6; }
.data-table code { font-family: inherit; font-weight: 700; letter-spacing: 2px; font-size: var(--pb-text-sm); }
.code-cell { display: inline-flex; align-items: center; gap: var(--pb-space-2); }
.status-pill { font-size: var(--pb-text-xs); font-weight: 700; padding: var(--pb-space-1) var(--pb-space-2); border-radius: 999px; }
.status-pill.on { background: var(--pb-success-soft); color: var(--pb-success-ink); }
.status-pill.off { background: var(--pb-surface-sunken); color: var(--muted); }
.actions-cell { white-space: nowrap; text-align: right; }
.actions-cell .btn-icon { margin-left: var(--pb-space-1); }
.btn-icon.danger { color: var(--pb-red); }

@media (max-width: 860px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-rail { position: relative; height: auto; flex-direction: row; border-right: none;
    border-bottom: 1px solid var(--line); overflow-x: auto; }
  .admin-content { padding: var(--pb-space-5) var(--pb-space-4) var(--pb-space-8); }
  .admin-cols { grid-template-columns: 1fr; }
}


/* ============================================================
   SPÉCIFICITÉS PRODUIT (bandeau tournoi, cartes, scoring, footer)
   Ce qui reste ici n'existe qu'une fois : plus de couche de
   rattrapage par-dessus une version contradictoire.
   ============================================================ */

/* ----- En-tête national : deuxième rangée + « Powered by » ----- */
.header-top {
  display: flex; align-items: baseline; gap: var(--pb-space-3);
  height: var(--pb-header-height);
}
.powered {
  margin-left: auto; font-size: var(--pb-text-xs); color: var(--muted);
  text-decoration: none; white-space: nowrap; font-weight: 500;
}
/* Le mot de la marque, MONOCHROME. Il portait un dégradé qui rendait « Box »
   en ROUGE — l'ancien logotype deux tons. Depuis la refonte d'identité, le
   rouge ne signifie plus que direct, danger ou erreur : le garder ici lui
   faisait dire deux choses à la fois. Il hérite désormais de la couleur du
   texte alentour, donc lisible sur fond clair comme sur fond vert. */
.pb-mark {
  font-weight: 800;
  letter-spacing: var(--pb-tracking-tight);
  color: inherit;
}

/* Le VRAI symbole PadelBox, servi en même origine par le site
   (/brand/padelbox-symbole.png). Il est appliqué en MASQUE : le tracé est
   porté par le canal alpha, et `currentColor` le peint. Un seul fichier
   suffit donc pour toutes les couleurs de fond — rien à dupliquer, rien à
   redessiner. Ratio 512/443. */
.pb-symbole {
  display: inline-block;
  height: 1em;
  width: 1.156em;
  vertical-align: -0.15em;
  margin-right: 0.35em;
  background-color: currentColor;
  -webkit-mask: url(/brand/padelbox-symbole.png) center / contain no-repeat;
  mask: url(/brand/padelbox-symbole.png) center / contain no-repeat;
}
.powered:hover .pb-mark { filter: brightness(0.92); }

/* Sur une surface FONCÉE (le vert de marque), le gris discret devient
   illisible. Cette variante fait hériter la couleur du parent : le symbole
   étant peint par `currentColor`, il passe en blanc avec le texte, sans
   second fichier ni second tracé.
   Dans le CNGT, le lockup n'apparaît aujourd'hui que sur fond clair — cette
   règle existe pour que le jour où il sera posé sur le vert, il ne
   disparaisse pas en silence. */
.powered.on-dark,
.on-dark .powered { color: inherit; }

/* ----- BANDEAU TOURNOI ----- */
.tourney-band {
  background: var(--paper); color: var(--ink);
  border-bottom: var(--pb-border-width) solid var(--line);
  padding: var(--pb-space-6) var(--pb-space-5) var(--pb-space-5);
}
.tourney-band .band-inner { max-width: var(--pb-container-max); }
.tourney-band .t-name {
  color: var(--ink); font-weight: 800; letter-spacing: var(--pb-tracking-tight);
  text-transform: none; font-size: clamp(21px, 4vw, 30px);
}
.tourney-band .t-meta { color: var(--muted); }
.tourney-band .fav-btn { border-color: var(--line); background: var(--paper); color: var(--muted); }
.tourney-band .fav-btn.on { border-color: var(--pb-brand); color: var(--pb-text-on-brand); background: var(--pb-brand); }
.band-badge {
  color: var(--muted); border: var(--pb-border-width) solid var(--line); background: var(--paper-soft);
  text-transform: none; font-weight: 600; font-size: var(--pb-text-xs);
  border-radius: var(--pb-radius-badge); letter-spacing: 0; padding: var(--pb-space-1) var(--pb-space-3);
}
/* Direct : seul cas où le rouge est employé. */
.band-badge.live-badge {
  color: var(--pb-text-on-brand); background: var(--live); border-color: var(--live);
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* ----- Nav tournoi : onglets soulignés ----- */
.t-nav { background: var(--paper); border-bottom: var(--pb-border-width) solid var(--line); }
.t-nav .t-nav-inner { max-width: var(--pb-container-max); margin: 0 auto;
  padding: 0 var(--pb-space-5); display: flex; flex-wrap: wrap; gap: var(--pb-space-1); }
.t-nav a {
  color: var(--muted); border-bottom: var(--pb-tab-underline-height) solid transparent;
  padding: var(--pb-space-3) var(--pb-space-3); font-size: var(--pb-text-sm); font-weight: 500;
  text-decoration: none; white-space: nowrap;
}
.t-nav a:hover { color: var(--ink); }
.t-nav a.active { color: var(--ink); border-bottom-color: var(--pb-brand); font-weight: 700; }

/* ----- CARTES ----- */
.card, .kpi, .court-tile, .h2h, .my-day, .media-block, .panel,
.stats-table, .players-table, .draw-block, .metric, .auth-card, .modal {
  border-radius: var(--pb-radius-card);
  border: var(--pb-border-width) solid var(--line);
}
.match-card, .item-row { border-radius: var(--pb-radius-card); }

/* ----- FOOTER ----- */
.site-footer {
  background: var(--paper); color: var(--muted);
  border-top: var(--pb-border-width) solid var(--line);
  text-transform: none; letter-spacing: 0; font-size: var(--pb-text-sm);
  text-align: left; padding: var(--pb-space-5); margin-top: auto;
}
.site-footer .footer-inner {
  max-width: var(--pb-container-max); margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; gap: var(--pb-space-3); flex-wrap: wrap;
}

/* ----- SCORING : rouge = direct seul, vert = gagné, chiffres alignés -----
   font-variant-numeric évite que les colonnes de sets « dansent » quand le
   score change en direct (les chiffres n'ont pas tous la même largeur). */
.mc-set, .mc-pts { font-weight: 800; font-variant-numeric: var(--pb-font-numeric); }
.mc-set.won { color: var(--win); }
.match-list.big .mc-set { font-size: var(--pb-text-4xl); }
.match-list.big .mc-pts { font-size: var(--pb-text-3xl); }
.live-txt { color: var(--live); }
/* Le score prend l'encre de marque. Le direct est deja dit par le badge
   LIVE et par le filet rouge de la carte — le repeter sur le score en fait
   une alerte permanente. */
.mc-pts { color: var(--brand); }

/* Contenu réservé aux lecteurs d'écran : présent dans l'arbre
   d'accessibilité, invisible à l'écran. `clip-path` plutôt que
   `display:none`, qui le retirerait aussi des lecteurs d'écran. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Lien d'évitement : au clavier, permet d'atteindre le contenu sans
   traverser toute la navigation. Visible uniquement au focus. */
.skip-link {
  position: absolute;
  left: var(--pb-space-2);
  top: calc(-1 * var(--pb-space-8) * 2);
  z-index: 100;
  background: var(--ink);
  color: var(--pb-text-on-brand);
  padding: var(--pb-space-2) var(--pb-space-4);
  border-radius: var(--pb-radius-button);
  font-size: var(--pb-text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--pb-duration-fast) var(--pb-ease-out);
}
.skip-link:focus { top: var(--pb-space-2); }

/* Précision quand la liste de confrontations est tronquée. */
.h2h-note {
  font-size: var(--pb-text-xs);
  color: var(--muted);
  text-align: center;
  padding: var(--pb-space-1) 0 var(--pb-space-2);
}

/* ----- État réseau de l'arbitrage -----
   L'arbitre doit savoir si ses points sont partis. Trois états seulement :
   en ligne (discret), synchronisation en cours, hors ligne avec le nombre
   d'actions en attente. */
.net-state {
  margin-top: var(--pb-space-3);
  padding: var(--pb-space-2) var(--pb-space-3);
  border-radius: var(--pb-radius-badge);
  font-size: var(--pb-text-sm);
  font-weight: 600;
  text-align: center;
  border: var(--pb-border-width) solid var(--line);
  color: var(--muted);
  background: var(--paper);
}
.net-state::before {
  content: "";
  display: inline-block;
  width: var(--pb-dot-size); height: var(--pb-dot-size);
  border-radius: var(--pb-radius-pill);
  margin-right: var(--pb-space-2);
  vertical-align: -1px;
  background: currentColor;
}
.net-state.online { color: var(--pb-success); border-color: var(--pb-success-soft);
  background: var(--pb-success-soft); }
.net-state.syncing { color: var(--pb-warning); border-color: var(--pb-warning-soft);
  background: var(--pb-warning-soft); }
.net-state.offline { color: var(--pb-danger); border-color: var(--pb-danger-soft);
  background: var(--pb-danger-soft); }

/* ----- État vide ----- */
.empty-state {
  background: var(--paper-soft); border: var(--pb-border-width) dashed var(--line);
  border-radius: var(--pb-radius-card); color: var(--muted);
}

.section-title { margin: var(--pb-space-8) 0 var(--pb-space-4); }

/* ----- Espaces privés : rail admin sur fond clair ----- */
.manage-topbar .brand-tag {
  color: var(--muted); border-color: var(--line); background: var(--paper-soft);
}
.manage-topbar .mt-link { color: var(--pb-brand); }
.manage-topbar .mt-logout {
  background: var(--paper); color: var(--ink); border: var(--pb-border-width) solid var(--line);
}
.manage-topbar .mt-logout:hover { background: var(--paper-soft); border-color: var(--pb-border-strong); }
.manage-topbar .cngt-logo::after, .admin-topbar .cngt-logo::after { display: none; }
.admin-rail { background: var(--paper); }

/* ----- Mobile : en-tête compact ----- */
@media (max-width: 560px) {
  .site-header .header-inner { padding: 0 var(--pb-space-4); }
  .header-top { height: 50px; gap: var(--pb-space-2); }
  .site-header .brand-sub { display: none; }
  .site-nav { gap: 0; }
  .site-nav a { padding: var(--pb-space-2) var(--pb-space-3); font-size: var(--pb-text-sm); }
  .tourney-band { padding: 18px var(--pb-space-4) var(--pb-space-4); }
}

/* Provenance d'une suggestion de recherche joueur : le club doit savoir si
   le nom vient du classement officiel ou d'un tournoi passé. */
.sug-source {
  margin-left: auto;
  font-size: var(--pb-text-xs);
  color: var(--muted);
  white-space: nowrap;
}

/* Code d'arbitrage masqué : chasse fixe pour que les points ne « sautent »
   pas au moment de la révélation. */
.sc-val {
  font-variant-numeric: var(--pb-font-numeric);
  letter-spacing: 2px;
  min-width: 8ch;
  display: inline-block;
}

/* ============================================================
   Contrôleur physique (boîtier à boutons)
   ============================================================ */

/* Voyant « première faute ». Il double ce qu'affiche le boîtier : les deux
   lisent le MÊME état serveur, ils ne peuvent donc pas se contredire. */
.fault-flag {
  display: block;
  margin: 0 auto 10px;
  width: fit-content;
  padding: var(--pb-space-1) var(--pb-space-3);
  border-radius: 999px;
  background: var(--pb-amber);
  color: var(--brand-ink);
  font-family: var(--font-display);
  font-size: var(--pb-text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fault-flag[hidden] { display: none; }

/* Le code d'appairage se lit à voix haute et se tape sur un boîtier : gros,
   espacé, en chiffres tabulaires pour qu'aucun caractère n'en imite un autre. */
.device-code {
  margin: var(--pb-space-3) 0 var(--pb-space-2);
  padding: var(--pb-space-4) var(--pb-space-2);
  border: 2px dashed var(--pb-brand-line, var(--line));
  border-radius: var(--radius);
  background: var(--pb-brand-soft, var(--paper-soft));
  font-family: var(--font-display);
  font-size: var(--pb-text-4xl);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.device-code.expired {
  opacity: 0.45;
  text-decoration: line-through;
  border-style: solid;
}
.device-code-zone { margin-top: var(--pb-space-2); }

/* Pastille d'état : verte si le boîtier a donné signe de vie récemment.
   La couleur ne porte JAMAIS l'information seule — le texte à côté dit
   « connecté » ou « hors ligne ». */
.net-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: var(--pb-space-2);
  vertical-align: baseline;
  background: var(--muted);
}
.net-dot.on { background: var(--ok, var(--pb-brand)); }
.net-dot.off { background: var(--muted); }


/* ============================================================
   RYTHME VERTICAL
   ============================================================
   Le défaut visible ne venait pas d'un bloc en particulier : il venait de
   l'absence de règle. Deux titres pouvaient se toucher à un pixel pendant
   qu'ailleurs on trouvait 26px. Une seule distance entre les blocs d'une
   page, dérivée de l'échelle, et la page redevient lisible.               */

.page > * + * { margin-top: var(--pb-space-7); }
.page > .page-head + * { margin-top: var(--pb-space-8); }

/* Un titre de section n'est jamais collé à ce qui le précède, ni éloigné de
   ce qu'il annonce : la proximité doit dire à quoi il appartient. */
.section-title { margin-bottom: var(--pb-space-4); }
.section-title + * { margin-top: 0; }

/* Les listes et grilles séparent leurs éléments d'une distance unique. */
.item-list > * + * { margin-top: var(--pb-space-2); }

/* L'en-tête respire : le logo n'est plus posé sur la barre de navigation. */
.site-header .header-inner { padding-top: var(--pb-space-4); }
.site-nav { gap: var(--pb-space-2); padding-bottom: var(--pb-space-1); }

/* ============================================================
   Filtres en pastilles (genre, catégorie…)
   ============================================================
   Des LIENS, pas des boutons : chaque filtre a son URL, donc il se partage,
   s'indexe et revient avec le bouton Précédent. Un filtre en JavaScript
   aurait produit une page dont la moitié du contenu reste invisible. */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pb-space-2);
  margin-bottom: var(--pb-space-5);
}
.chip {
  display: inline-flex;
  align-items: center;
  /* 40px : la cible tactile reste confortable au pouce. */
  height: 40px;
  padding: 0 var(--pb-space-5);
  border-radius: var(--pb-radius-pill);
  border: var(--pb-border-width) solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: var(--pb-text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--pb-duration-fast) var(--pb-ease-out),
              color var(--pb-duration-fast) var(--pb-ease-out),
              border-color var(--pb-duration-fast) var(--pb-ease-out);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--pb-text-on-brand);
}

/* Les onglets sont des liens : ils doivent se comporter comme des onglets. */
a.vt-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.vt-btn.active { background: var(--brand); color: var(--pb-text-on-brand); }
