/*
 * PronoTennis v2 - feuille de style commune
 * Charte : vert gazon pour le cadre et les « tableaux d'affichage » des scores,
 * jaune balle réservé au vainqueur choisi, à votre ligne au classement et au service en direct.
 * Police : Archivo (variable : graisse 400-800, largeur 75-100 %), licence SIL OFL.
 */

@font-face {
  font-family: "Archivo";
  src: url("archivo-var.woff2") format("woff2");
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --gazon: #0e4a36;
  --gazon-fonce: #093426;
  --gazon-clair: #e2ece6;
  --gazon-voile: #f3f7f4;
  --encre: #17221d;
  --gris: #55635c;
  --gris-clair: #87958e;
  --fond: #edf1ee;
  --surface: #ffffff;
  --ligne: #d4ddd8;
  --balle: #d6ea3a;
  --balle-pale: #f6fbd8;
  --atp: #1f4e79;
  --wta: #7a2f6b;
  --erreur: #a8261b;
  --erreur-fond: #fbebe9;
  --ok: #13684d;
  --ok-fond: #e5f3ec;
  --info-fond: #e9f0f6;
  --rayon: 10px;
  --rayon-petit: 4px;
  --police: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --etroit: 78%;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--police);
  font-size: 16px;
  line-height: 1.5;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--gazon); text-underline-offset: 2px; }
a:hover { color: var(--gazon-fonce); }

h1, h2, h3 {
  font-stretch: var(--etroit);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin: 0 0 0.6em;
}
h1 { font-size: 2.125rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 0.8em; }
small { font-size: 0.8125rem; font-weight: 400; color: var(--gris); }

:focus-visible { outline: 3px solid var(--gazon); outline-offset: 2px; }

.masque {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.evitement {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--balle); color: var(--encre); padding: 8px 14px; border-radius: 6px; font-weight: 650;
}
.evitement:focus { top: 8px; }

.icone { display: inline-flex; width: 1em; height: 1em; vertical-align: -0.125em; }
.icone svg { width: 100%; height: 100%; }

/* ---------- En-tête et bandeau du tournoi ---------- */

.entete { background: var(--gazon); color: #fff; position: relative; z-index: 20; }
.entete-int {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px; min-height: 60px;
}
.entete :focus-visible { outline-color: var(--balle); }

.marque {
  display: inline-flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font-stretch: 75%; font-weight: 800; font-size: 1.375rem; letter-spacing: 0.01em;
}
.marque:hover { color: #fff; }
.marque .icone { width: 28px; height: 28px; }

.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav > a, .menu > summary {
  color: rgba(255, 255, 255, 0.86); text-decoration: none; font-weight: 600; font-size: 0.9375rem;
  padding: 8px 12px; border-radius: 6px; cursor: pointer;
}
.nav > a:hover, .menu > summary:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav > a[aria-current="page"] { color: #fff; box-shadow: inset 0 -3px 0 #fff; border-radius: 0; }
.nav > a { white-space: nowrap; }
/* raccourcis : visibles dans la barre dès que l'écran a la place, sinon seulement dans « Plus » (layout.php) */
.nav > a.raccourci { display: none; }
@media (min-width: 761px) { .nav > a.des-761 { display: block; } .menu-plus .dans-barre-761 { display: none; } }
@media (min-width: 840px) { .nav > a.des-840 { display: block; } .menu-plus .dans-barre-840 { display: none; } }
@media (min-width: 920px) { .nav > a.des-920 { display: block; } .menu-plus .dans-barre-920 { display: none; } }
@media (min-width: 1000px) { .nav > a.des-1000 { display: block; } .menu-plus .dans-barre-1000 { display: none; } }
@media (min-width: 1080px) { .nav > a.des-1080 { display: block; } .menu-plus .dans-barre-1080 { display: none; } }
@media (min-width: 1180px) { .nav > a.des-1180 { display: block; } .menu-plus .dans-barre-1180 { display: none; } }
/* le compte ne se laisse pas écraser ; le pseudo n'apparaît que sur les grands écrans, coupé s'il est long */
.compte { flex-shrink: 0; }
@media (min-width: 761px) and (max-width: 819px) {
  .compte { gap: 8px; }
  .compte .bouton { padding: 7px 12px; font-size: 0.875rem; }
}
.compte-nom { max-width: 6.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1239px) {
  /* caché à l'œil seulement : les lecteurs d'écran annoncent toujours le pseudo */
  .compte-nom { display: block; position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
}

.menu { position: relative; }
.menu > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary .icone { width: 0.85em; height: 0.85em; transition: transform 0.15s; }
.menu[open] > summary .icone-chevron { transform: rotate(180deg); }
.menu-panneau {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px;
  background: var(--surface); color: var(--encre); border: 1px solid var(--ligne); border-radius: var(--rayon);
  box-shadow: 0 12px 32px rgba(9, 52, 38, 0.18); padding: 10px;
}
/* deux colonnes où les groupes s'empilent sans laisser de trou ; calé à droite du bouton « Plus », qui peut être loin à droite */
.menu-plus .menu-panneau { display: block; columns: 2 170px; column-gap: 16px; min-width: 420px; left: auto; right: 0; }
.menu-plus .menu-groupe { break-inside: avoid; padding-bottom: 4px; }
.menu-compte .menu-panneau { left: auto; right: 0; min-width: 200px; }
.menu-panneau a, .menu-panneau .lien {
  display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 6px;
  color: var(--encre); text-decoration: none; font-size: 0.9375rem;
}
.menu-panneau a:hover, .menu-panneau .lien:hover { background: var(--gazon-voile); color: var(--gazon); }
.menu-panneau a[aria-current="page"] { font-weight: 700; }
.menu-groupe { display: flex; flex-direction: column; }
.menu-titre { margin: 6px 10px 2px; font-size: 0.8125rem; font-weight: 650; color: var(--gris); }
.menu-note { grid-column: 1 / -1; margin: 6px 10px 2px; font-size: 0.8125rem; color: var(--gris); }
.menu :focus-visible { outline-color: var(--gazon); }
.entete .menu > summary:focus-visible { outline-color: var(--balle); }

.compte { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.compte .menu > summary { padding: 6px 8px; }
.pastille {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 750; font-size: 0.875rem;
}
.lien-entete { color: #fff; font-weight: 600; text-decoration: none; }
.lien-entete:hover { color: #fff; text-decoration: underline; }

.tournoi {
  background-color: var(--gazon);
  /* lignes de court très discrètes : ligne de service et ligne médiane */
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14)),
    linear-gradient(rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14));
  background-size: 100% 2px, 2px 12%;
  background-position: 0 88%, 72% 100%;
  background-repeat: no-repeat;
  color: #fff;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.tournoi-int { max-width: 1200px; margin: 0 auto; padding: 22px 24px 30px; }
.tournoi-nom {
  font-stretch: 75%; font-weight: 800; font-size: clamp(2rem, 5.2vw, 3.5rem);
  line-height: 1; margin: 0 0 8px; letter-spacing: -0.01em; color: #fff;
}
.tournoi-etat { margin: 0; color: #cfe1d7; font-size: 1.0625rem; }
.compte-a-rebours { color: #fff; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- Mise en page ---------- */

.contenu { max-width: 1200px; margin: 0 auto; padding: 28px 24px 56px; }
/* pied de page toujours en bas de la fenêtre, même sur une page courte */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > .contenu { flex: 1 0 auto; width: 100%; }

.page-etroite { max-width: 460px; margin: 0 auto; }
.page-moyenne { max-width: 760px; margin: 0 auto; }
.page-large { max-width: 900px; margin: 0 auto; }

.bloc { margin-bottom: 40px; }
.bloc-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.bloc-tete h2 { margin: 0; font-size: 1.625rem; }
.maj-live { margin: 0; font-size: 0.8125rem; color: var(--gris); font-variant-numeric: tabular-nums; }
.maj-live:empty { display: none; }

.jour {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.9375rem; font-weight: 700; color: var(--gris); margin: 20px 0 10px;
}
.jour::after { content: ""; flex: 1; height: 1px; background: var(--ligne); }

.vide { color: var(--gris); }
.note { color: var(--gris); font-size: 0.875rem; }

/* ---------- Annonces ---------- */

.annonce { padding: 12px 16px; border-radius: 8px; margin: 0 0 20px; background: var(--info-fond); }
.annonce-ok { background: var(--ok-fond); color: #0d4a37; }
.annonce-erreur { background: var(--erreur-fond); color: var(--erreur); }
.annonce a { font-weight: 650; }

.bienvenue { margin-bottom: 32px; }
.bienvenue h2 { font-size: 1.75rem; max-width: 22ch; }
.bienvenue p { max-width: 62ch; color: var(--gris); }
.bienvenue .bouton { margin-right: 8px; }

/* ---------- Boutons et formulaires ---------- */

.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gazon); color: #fff; border: 1px solid var(--gazon);
  font: inherit; font-weight: 650; font-size: 0.9375rem; line-height: 1.2;
  padding: 10px 18px; border-radius: 8px; cursor: pointer; text-decoration: none;
}
.bouton:hover { background: var(--gazon-fonce); color: #fff; }
.bouton:disabled { opacity: 0.6; cursor: progress; }
.bouton-secondaire { background: var(--surface); color: var(--gazon); border-color: var(--ligne); }
.bouton-secondaire:hover { background: var(--gazon-voile); color: var(--gazon-fonce); }
.bouton-clair { background: #fff; color: var(--gazon); border-color: #fff; }
.bouton-clair:hover { background: var(--balle); border-color: var(--balle); color: var(--encre); }
.bouton-large { width: 100%; }
.lien { background: none; border: 0; font: inherit; color: var(--gazon); cursor: pointer; padding: 0; width: 100%; text-align: left; }

.formulaire { display: flex; flex-direction: column; gap: 16px; }
.carte-formulaire { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 24px; margin-bottom: 20px; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ > span:first-child { font-weight: 650; font-size: 0.9375rem; }
.champ input, .champ select, .champ textarea {
  font: inherit; font-size: 1rem; color: var(--encre); background: #fff;
  border: 1px solid #b9c6bf; border-radius: 8px; padding: 10px 12px; min-height: 44px; width: 100%;
}
.champ textarea { resize: vertical; line-height: 1.5; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: 3px solid rgba(14, 74, 54, 0.22); outline-offset: 0; border-color: var(--gazon); }
.champ input[aria-invalid="true"], .champ textarea[aria-invalid="true"] { border-color: var(--erreur); }
.champ-erreur { color: var(--erreur); font-size: 0.875rem; }

/* Choix du pays avec les drapeaux (app.js remplace l'affichage de select.choix-pays) */
.choix-pays-zone { position: relative; }
.choix-pays-bouton {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 10px 36px 10px 12px;
  font: inherit; font-size: 1rem; color: var(--encre); text-align: left; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2355635c' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid #b9c6bf; border-radius: 8px;
}
.choix-pays-bouton:focus-visible, .choix-pays-bouton[aria-expanded="true"] { outline: 3px solid rgba(14, 74, 54, 0.22); outline-offset: 0; border-color: var(--gazon); }
.choix-pays-bouton .drapeau, .choix-pays-liste .drapeau { margin: 0; flex: none; }
.choix-pays-panneau {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 8px;
  box-shadow: 0 10px 28px rgba(9, 52, 38, 0.16); overflow: hidden;
}
.choix-pays-panneau[hidden] { display: none; }
.champ .choix-pays-panneau input { border: 0; border-bottom: 1px solid var(--ligne); border-radius: 0; min-height: 42px; }
.champ .choix-pays-panneau input:focus { outline: 0; border-color: var(--gazon); }
.choix-pays-liste { list-style: none; margin: 0; padding: 4px 0; max-height: 280px; overflow-y: auto; }
.choix-pays-liste li { display: flex; align-items: center; gap: 10px; padding: 7px 12px; cursor: pointer; }
.choix-pays-liste li[hidden] { display: none; }
.choix-pays-liste li:hover { background: var(--gazon-voile); }
.choix-pays-liste li.actif { background: var(--gazon-clair); }
.choix-pays-liste li[aria-selected="true"] { font-weight: 650; }
.choix-pays-vide { margin: 0; padding: 10px 12px; color: var(--gris); font-size: 0.9375rem; }
.case-a-cocher { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.case-a-cocher input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--gazon); flex: none; }
.groupe { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 14px; }
.groupe legend { font-stretch: var(--etroit); font-weight: 750; font-size: 1.25rem; padding: 0; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.groupe + .groupe { border-top: 1px solid var(--ligne); padding-top: 22px; }
.deux-colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.actions-formulaire { display: flex; align-items: center; gap: 18px; }
.piege { position: absolute; left: -9999px; }
.intro { color: var(--gris); }

.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { position: relative; cursor: pointer; }
.puce input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.puce span {
  display: inline-block; padding: 5px 12px; border: 1px solid #b9c6bf; border-radius: 999px;
  font-size: 0.875rem; font-weight: 600; background: #fff; font-variant-numeric: tabular-nums;
}
.puce input:checked + span { background: var(--gazon); border-color: var(--gazon); color: #fff; }
.puce input:focus-visible + span { outline: 3px solid var(--gazon); outline-offset: 2px; }
.puce input:disabled + span { opacity: 0.55; cursor: default; }

/* ---------- Joueurs ---------- */

.joueur { display: flex; align-items: center; gap: 10px; min-width: 0; }
.joueur-photo {
  flex: none; width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  background: var(--gazon-clair); display: grid; place-items: center;
}
.joueur-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.initiales { font-stretch: 75%; font-weight: 750; font-size: 0.8125rem; color: var(--gazon); }
.joueur-texte { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.joueur-nom { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.joueur-details { font-size: 0.8125rem; color: var(--gris); display: flex; gap: 8px; }
.joueur-nation { text-decoration: none; letter-spacing: 0.02em; }
.joueur-rang { font-variant-numeric: tabular-nums; }

.circuit {
  display: inline-block; font-size: 0.75rem; font-weight: 750; letter-spacing: 0.03em;
  padding: 2px 7px; border-radius: var(--rayon-petit); color: #fff; background: var(--atp);
}
.circuit-wta { background: var(--wta); }

/* ---------- Cartes de match ---------- */

.carte-etat { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--gris); font-size: 0.8125rem; font-weight: 600; }
.carte-etat.est-fait { color: var(--ok); }
.carte-etat.est-direct { color: var(--gazon); }
.point-direct { width: 8px; height: 8px; border-radius: 50%; background: #d23b2b; box-shadow: 0 0 0 3px rgba(210, 59, 43, 0.18); }

.saisie-libelle { font-size: 0.875rem; color: var(--gris); margin: 0 0 8px; }
.nom-vainqueur { color: var(--encre); font-weight: 650; }
.tuiles { display: flex; gap: 6px; flex-wrap: wrap; }
.tuile {
  width: 46px; height: 46px; border: 0; border-radius: var(--rayon-petit);
  background: var(--gazon); color: #fff; text-align: center; padding: 0;
  font-family: var(--police); font-stretch: 75%; font-weight: 750; font-size: 1.375rem;
  letter-spacing: 0.08em; font-variant-numeric: tabular-nums; caret-color: var(--balle);
}
.tuile::placeholder { color: rgba(255, 255, 255, 0.35); }
.tuile:focus { outline: 3px solid var(--balle); outline-offset: 1px; }
.tuile[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #ff8a7a; }
.sets { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.sets-libelle { font-size: 0.875rem; color: var(--gris); margin-right: 2px; }

.carte-message { margin: 0 auto 0 0; font-size: 0.875rem; color: var(--gris); }
.carte-message.erreur { color: var(--erreur); }
.carte-message.ok { color: var(--ok); }

.bouton-beber {
  display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 0.875rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--ligne); border-radius: 999px; padding: 4px 14px 4px 6px; cursor: pointer; color: var(--encre);
}
.bouton-beber:hover { border-color: var(--gazon); }
.bouton-beber img { width: 24px; height: 24px; }

.aide-saisie { font-size: 0.875rem; color: var(--gris); margin-top: 14px; max-width: 70ch; }
.score-texte { font-stretch: 75%; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* ---------- Tableau d'affichage des scores ---------- */

.tableau-score { width: 100%; border-collapse: separate; border-spacing: 0 4px; }
.tableau-score th { text-align: left; font-weight: inherit; padding: 0 8px 0 0; width: 100%; max-width: 0; }
.tableau-score td { padding: 0; }
.tableau-score td + td { padding-left: 4px; }
.tableau-score .service { width: 14px; text-align: center; }
.balle-service { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--balle); box-shadow: 0 0 0 1.5px var(--gazon-fonce); vertical-align: middle; }
.tableau-score .case {
  width: 36px; min-width: 36px; height: 36px; text-align: center; vertical-align: middle;
  background: var(--gazon); color: rgba(255, 255, 255, 0.58); border-radius: var(--rayon-petit);
  font-stretch: 75%; font-weight: 750; font-size: 1.1875rem; font-variant-numeric: tabular-nums;
}
.tableau-score .case-gagnee { color: #fff; }
.tableau-score .case-courante { background: var(--gazon-fonce); color: var(--balle); box-shadow: inset 0 0 0 2px var(--balle); }
.tableau-score .case-vide { background: var(--gazon-clair); }
.tableau-score .case-jeu { background: #fff; color: var(--gazon); box-shadow: inset 0 0 0 1px var(--gazon); min-width: 40px; }
.tableau-score .case-change { animation: case-change 1.6s ease-out; }
@keyframes case-change { from { background: var(--balle); color: var(--gazon-fonce); } }
.tableau-score .perdant .joueur-nom { color: var(--gris); font-weight: 600; }
.tableau-score .gagnant .joueur-nom { font-weight: 750; }

.libelle { color: var(--gris); font-size: 0.8125rem; font-weight: 600; margin-right: 4px; }
.sans-prono { color: var(--gris); }
.beber { vertical-align: -3px; }

.cote { display: flex; height: 8px; border-radius: 4px; overflow: hidden; gap: 2px; background: var(--surface); }
.cote-part { display: block; min-width: 2px; }
.cote-1 { background: var(--gazon); }
.cote-2 { background: #a7bdb2; }
.cote-legende { display: flex; justify-content: space-between; margin: 0; font-size: 0.8125rem; color: var(--gris); font-variant-numeric: tabular-nums; }
.cote-vide { margin: 0; font-size: 0.875rem; color: var(--gris); }
.lien-fleche { font-size: 0.875rem; font-weight: 650; }

/* ---------- Résultats ---------- */

.puce-points { font-size: 0.8125rem; background: var(--gazon-voile); border: 1px solid var(--gazon-clair); border-radius: 6px; padding: 2px 8px; color: var(--gris); }
.puce-points b { color: var(--gazon); font-variant-numeric: tabular-nums; }
.en-attente { color: var(--gris); font-size: 0.8125rem; }

/* ---------- Évolution, tchat, publicité ---------- */

.evolution { display: inline-flex; align-items: center; gap: 2px; font-size: 0.8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.evolution .icone { width: 0.7em; height: 0.7em; }
.evolution.monte { color: var(--ok); }
.evolution.descend { color: var(--erreur); }
.evolution.stable, .evolution.nouveau { color: var(--gris-clair); font-weight: 600; }

.tchat { width: 100%; height: 450px; border: 0; border-radius: 8px; background: var(--gazon-voile); display: block; }

.publicite { min-height: 100px; }

/* ---------- Accueil : une colonne, une ligne par match ---------- */

.tournoi-int { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.tournoi-texte { min-width: 0; }
.tournoi-etat + .tournoi-etat { margin-top: 4px; }
.tournoi-message a, .tournoi-message b, .tournoi-message strong { color: #fff; }
.tournoi-place { display: flex; align-items: center; gap: 10px; flex: none; color: #cfe1d7; text-decoration: none; font-size: 0.875rem; line-height: 1.35; }
.tournoi-place:hover { color: #fff; }
.tournoi-place-rang { font-stretch: 75%; font-weight: 800; font-size: 2.75rem; line-height: 1; color: var(--balle); font-variant-numeric: tabular-nums; }
.tournoi-place .evolution.monte { color: #9fe0b9; }
.tournoi-place .evolution.descend { color: #ffb4a8; }
.page-pronos .tournoi-nom { font-size: clamp(2rem, 4.2vw, 2.75rem); }

.bloc-compte { margin-left: 10px; font-size: 0.9375rem; font-weight: 500; font-stretch: 100%; letter-spacing: 0; color: var(--gris); }
.bloc-compte b { color: var(--encre); font-weight: 700; }

.lignes { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; }
.lignes > li + li { border-top: 1px solid var(--ligne); }
.ligne-groupe { padding: 7px 16px; background: var(--gazon-voile); color: var(--gris); font-size: 0.8125rem; font-weight: 650; }
.ligne { position: relative; display: grid; align-items: center; column-gap: 12px; padding: 10px 16px; min-height: 58px; }
.ligne-prono { display: block; padding: 0; }
.ligne-prono .prono { display: grid; grid-template-columns: 40px 48px minmax(0, 1fr) minmax(96px, auto) 24px; align-items: center; column-gap: 12px; row-gap: 8px; padding: 10px 16px; min-height: 58px; }
.ligne-prono .prono > .circuit { grid-column: 1; grid-row: 1; }
.ligne-heure { grid-column: 2; grid-row: 1; font-size: 0.8125rem; color: var(--gris); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ligne-commence { color: var(--erreur); font-weight: 600; }
.ligne-prono.est-clos .ligne-duel, .ligne-prono.est-clos .ligne-resume { opacity: 0.55; }
.ligne-duel { grid-column: 3; grid-row: 1; border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ligne-resume { grid-column: 4; grid-row: 1; justify-self: end; display: none; font: inherit; font-size: 0.9375rem; color: var(--encre); background: none; border: 0; padding: 4px 6px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.ligne-resume:hover { background: var(--gazon-voile); }
.js .est-fait:not(.est-edition) .ligne-resume { display: inline-block; }
.resume-ajout { color: var(--gazon); font-size: 0.875rem; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ligne-etat { grid-column: 5; grid-row: 1; display: flex; justify-content: center; color: var(--ok); }
.etat-fait .icone { width: 18px; height: 18px; }
.etat-modifie { width: 10px; height: 10px; border-radius: 50%; background: #d9a400; }

.choix { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; min-width: 0; position: relative; }
.ligne-prono .choix { cursor: pointer; }
.ligne-prono .choix:hover { background: var(--gazon-voile); }
.choix input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choix-rond { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #b9c6bf; background: #fff; }
.choix input:checked + .choix-rond { border-color: var(--gazon); background: var(--balle); box-shadow: inset 0 0 0 3px #fff; }
.ligne-prono .choix:has(input:checked) { background: var(--balle-pale); }
.choix:has(input:checked) .choix-nom { font-weight: 750; }
.choix:has(input:focus-visible) { outline: 3px solid var(--gazon); outline-offset: 1px; }
.choix-nom { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rang { flex: none; color: var(--gris-clair); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }

.ligne-saisie { grid-column: 3 / -1; grid-row: 2; display: none; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; background: var(--gazon-voile); border-radius: 8px; }
html:not(.js) .ligne-saisie, .est-edition .ligne-saisie { display: flex; }
.ligne-saisie .saisie-libelle { margin: 0; font-size: 0.875rem; color: var(--gris); }
.ligne-saisie .tuiles { flex-wrap: nowrap; gap: 4px; }
.ligne-saisie .tuile { width: 40px; height: 40px; font-size: 1.1875rem; }
.ligne-saisie .sets { margin: 0; }
.ligne-saisie .bouton { margin-left: auto; padding: 8px 16px; }
.ligne-saisie .carte-message { flex-basis: 100%; margin: 0; }
.ligne-saisie .carte-message:empty { display: none; }

.ligne-visiteur { grid-template-columns: 40px 48px minmax(0, 1fr); }
.ligne-visiteur .ligne-duel { grid-column: auto; grid-row: auto; }
.ligne-visiteur .ligne-heure { grid-column: auto; grid-row: auto; }

.ligne-direct { grid-template-columns: 40px 80px minmax(0, 1fr) 220px; }
.ligne-direct .ligne-heure { grid-column: auto; grid-row: auto; }
.ligne-direct .carte-etat { margin: 0; font-size: 0.75rem; white-space: nowrap; }
.ligne-direct .tableau-score { width: auto; justify-self: start; border-spacing: 0 3px; }
.ligne-direct .tableau-score th { width: 190px; max-width: 190px; }
.ligne-direct .joueur-photo, .ligne-direct .joueur-details { display: none; }
.ligne-direct .joueur-nom { font-weight: 600; }
.ligne-direct .tableau-score .case { width: 28px; min-width: 28px; height: 26px; font-size: 1rem; }
.ligne-direct .tableau-score .case-jeu { min-width: 32px; }
/* la cote du match en cours : part des pronostiqueurs pour chaque joueur */
.tableau-score .cote-joueur { padding-left: 14px; white-space: nowrap; }
.cote-jauge { display: inline-block; width: 40px; height: 6px; margin-right: 6px; vertical-align: middle; border-radius: 3px; background: var(--gazon-clair); overflow: hidden; }
.cote-jauge span { display: block; height: 100%; background: #a7bdb2; }
.cote-favori .cote-jauge span { background: var(--gazon); }
.cote-pct { display: inline-block; min-width: 2.6em; text-align: right; font-size: 0.8125rem; color: var(--gris); font-variant-numeric: tabular-nums; }
.cote-favori .cote-pct { color: var(--encre); font-weight: 650; }
.ligne-votre { font-size: 0.875rem; color: var(--gris); text-align: right; line-height: 1.35; }
.ligne-votre b { color: var(--encre); }
.ligne-votre .libelle { font-weight: 500; margin-right: 2px; }
.ligne-direct .ligne-votre .libelle { display: block; margin: 0; }
.ligne-lien { position: absolute; inset: 0; }
.ligne-lien:focus-visible { outline: 3px solid var(--gazon); outline-offset: -3px; }
.ligne:has(.ligne-lien):hover { background: var(--gazon-voile); }

.ligne-resultat { grid-template-columns: 40px minmax(0, 1fr) auto 80px; }
.ligne-sans-points { grid-template-columns: 40px minmax(0, 1fr) auto; }
.ligne-match .score-texte { margin-left: 8px; color: var(--gris); }
.ligne-points { text-align: right; font-stretch: 75%; font-weight: 800; font-size: 1.0625rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ligne-points.zero, .ligne-points.non-compte { color: var(--gris-clair); }
.ligne-points.en-attente { font-stretch: 100%; font-weight: 500; font-size: 0.8125rem; color: var(--gris); }
.ligne-points small { display: block; font-stretch: 100%; font-weight: 500; font-size: 0.75rem; color: var(--gris); }

.menu-beber > summary { color: var(--encre); padding: 4px 12px 4px 6px; }
.menu-beber > summary:hover { color: var(--encre); background: var(--surface); border-color: var(--gazon); }
.menu-beber .menu-panneau { left: auto; right: 0; min-width: 310px; z-index: 15; }
.menu-beber form { margin: 0; }
.menu-beber .lien { align-items: flex-start; gap: 10px; padding: 8px 10px; font-weight: 600; }
.menu-beber .lien small { display: block; margin-top: 2px; font-weight: 400; }

.liens-accueil { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: -16px 0 32px; font-size: 0.9375rem; }
.liens-accueil form { margin: 0; }
.liens-accueil a, .liens-accueil .lien { display: inline-flex; align-items: center; gap: 6px; width: auto; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }

.tchat-page { height: min(72vh, 760px); }

@media (max-width: 760px) {
  .tournoi-int { flex-direction: column; align-items: flex-start; gap: 10px; }
  .tournoi-place-rang { font-size: 2.125rem; }
  .lignes { border-radius: 8px; }
  .ligne, .ligne-prono { border-left: 3px solid var(--atp); }
  .ligne-wta { border-left-color: var(--wta); }
  .ligne { padding: 10px 12px; }
  .ligne > .circuit, .ligne-prono .prono > .circuit { display: none; }
  .ligne-prono .prono { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; padding: 10px 12px; }
  .ligne-prono .ligne-heure { grid-column: 1; grid-row: 1; }
  .ligne-prono .ligne-heure:empty { display: none; }
  .ligne-prono .ligne-etat { grid-column: 2; grid-row: 2; }
  .ligne-prono .ligne-duel { grid-column: 1; grid-row: 2; grid-template-columns: 1fr; gap: 2px; }
  .ligne-prono .ligne-resume { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
  .ligne-saisie { grid-column: 1 / -1; grid-row: 4; padding: 10px; }
  .ligne-visiteur { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .ligne-visiteur .ligne-heure:empty { display: none; }
  .ligne-visiteur .ligne-duel { grid-template-columns: 1fr; gap: 0; }
  .ligne-direct { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .ligne-direct .tableau-score { width: 100%; }
  .ligne-direct .tableau-score th { width: 100%; max-width: 0; }
  .tableau-score .cote-joueur { padding-left: 8px; }
  .cote-jauge { width: 24px; margin-right: 4px; }
  .ligne-direct .ligne-votre { text-align: left; }
  .ligne-direct .ligne-votre .libelle { display: inline; margin-right: 4px; }
  .ligne-resultat, .ligne-sans-points { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .ligne-resultat .ligne-match { grid-column: 1; grid-row: 1; }
  .ligne-resultat .ligne-votre { grid-column: 1; grid-row: 2; text-align: left; }
  .ligne-resultat .ligne-points { grid-column: 2; grid-row: 1 / 3; }
  .ligne-sans-points .ligne-votre { grid-column: 1; grid-row: 2; }
  .ligne-match .score-texte { display: block; margin: 0; }
  .liens-accueil { margin-top: -20px; }
}

/* ---------- Classement ---------- */

.titre-page { margin-bottom: 18px; }
.titre-page h1 { margin-bottom: 6px; }
.resume-position { font-size: 1.0625rem; margin: 0; }
.barre-classement { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.onglets { display: inline-flex; background: var(--surface); border: 1px solid var(--ligne); border-radius: 8px; padding: 3px; }
.onglets a { padding: 7px 18px; border-radius: 6px; font-weight: 650; text-decoration: none; color: var(--gris); }
.onglets { max-width: 100%; flex-wrap: wrap; }
@media (max-width: 480px) { .onglets a { padding: 7px 11px; } }
.onglets a[aria-current="page"] { background: var(--gazon); color: #fff; }
.recherche input {
  font: inherit; font-size: 0.9375rem; border: 1px solid #b9c6bf; border-radius: 8px; padding: 8px 12px; min-height: 40px; width: 240px; background: #fff;
}

.classement { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; }
.classement th { text-align: left; font-size: 0.8125rem; color: var(--gris); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--ligne); background: var(--gazon-voile); }
.classement td { padding: 9px 12px; border-bottom: 1px solid #e6ece8; vertical-align: middle; }
.classement tbody tr:last-child td { border-bottom: 0; }
.classement tr.moi td { background: var(--balle-pale); }
.classement tr.moi td:first-child { box-shadow: inset 4px 0 0 var(--balle); }
.col-rang { width: 64px; font-stretch: 75%; font-weight: 800; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.ex-aequo { color: var(--gris-clair); }
.col-evol { width: 64px; }
.col-points { width: 96px; text-align: right !important; font-stretch: 75%; font-weight: 750; font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.col-pseudo { font-weight: 600; }
.drapeau { margin-right: 6px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }
.col-pseudo .drapeau { margin-right: 8px; }
.col-pseudo { white-space: nowrap; }
/* totem du binôme : seule l'icône au bout de l'ancienne bande 141 × 14 est montrée */
.totem { display: inline-block; width: 14px; height: 14px; margin-left: 8px; background-repeat: no-repeat; background-position: right center; background-size: auto 100%; image-rendering: pixelated; vertical-align: -2px; }
.aucun-resultat { color: var(--gris); padding: 12px; }
.sous-tableau { margin-top: 12px; font-size: 0.875rem; color: var(--gris); }

.table-pronos .phrase-beber { display: block; font-size: 0.8125rem; color: var(--gris); font-weight: 400; font-style: italic; margin-top: 2px; }
.table-pronos td:nth-child(2) { white-space: nowrap; }
.prono-bon b { color: var(--ok); }
.prono-faux b { color: var(--gris); font-weight: 600; text-decoration: line-through; text-decoration-color: rgba(168, 38, 27, 0.5); }
.bilan { display: block; font-size: 0.8125rem; font-weight: 650; margin-bottom: 4px; }
.table-pronos .puce-points { display: inline-block; margin: 0 4px 4px 0; }

.fil { font-size: 0.875rem; margin-bottom: 4px; }
.titre-match { font-size: 2.25rem; margin-bottom: 4px; }
.sous-titre { color: var(--gris); display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.page-moyenne > .tableau-score, .score-match .tableau-score { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 8px 12px; border-spacing: 0 6px; margin-bottom: 16px; }
.score-match-etat { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.score-match-etat .carte-etat { margin-left: 0; }
.repartition { margin-bottom: 24px; }
.page-moyenne .recherche { display: block; margin-bottom: 12px; }

/* ---------- Accueil : colonne du tchat ---------- */

.accueil { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.accueil-tchat { min-width: 0; }
@media (min-width: 1180px) {
  .accueil { grid-template-columns: minmax(0, 1fr) 320px; }
  .accueil-tchat { position: sticky; top: 16px; }
  .accueil-tchat .tchat-messages { max-height: calc(100vh - 230px); }
}

.tchat-bloc { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px 16px 6px; }
.tchat-tete { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.tchat-tete h2 { margin: 0; font-size: 1.375rem; }
.tchat-historique { font-size: 0.8125rem; font-weight: 600; }
.tchat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; margin-bottom: 8px; }
.tchat-form input {
  font: inherit; font-size: 0.9375rem; color: var(--encre); background: #fff; min-width: 0;
  border: 1px solid #b9c6bf; border-radius: 8px; padding: 8px 10px; min-height: 40px;
}
.tchat-form input:focus { outline: 3px solid rgba(14, 74, 54, 0.22); outline-offset: 0; border-color: var(--gazon); }
.tchat-form .bouton { padding: 8px 14px; }
.tchat-erreur { grid-column: 1 / -1; margin: 0; font-size: 0.8125rem; color: var(--erreur); }
.tchat-erreur:empty { display: none; }
.tchat-messages { list-style: none; margin: 0 -16px; padding: 0 16px; overflow-y: auto; overscroll-behavior: contain; max-height: 520px; }
.tchat-message { padding: 8px 0; border-top: 1px solid #e6ece8; }
.tchat-message:first-child { border-top: 0; }
.tchat-message.nouveau { animation: tchat-nouveau 2s ease-out; }
@keyframes tchat-nouveau { from { background: var(--balle-pale); } }
.tchat-entete { display: flex; align-items: baseline; gap: 8px; margin: 0 0 1px; font-size: 0.8125rem; }
.tchat-auteur { font-weight: 700; color: var(--gazon); font-size: 0.875rem; }
.tchat-entete time { color: var(--gris-clair); font-variant-numeric: tabular-nums; }
.tchat-texte { margin: 0; font-size: 0.9375rem; line-height: 1.4; overflow-wrap: anywhere; }
.tchat-texte .smiley { vertical-align: -3px; max-height: 20px; }
.tchat-supprimer { margin: 0 0 0 auto; }
.tchat-supprimer button { font: inherit; font-size: 1rem; line-height: 1; border: 0; background: none; color: var(--gris-clair); cursor: pointer; padding: 0 4px; border-radius: 4px; }
.tchat-supprimer button:hover { color: var(--erreur); background: var(--erreur-fond); }
/* modifier son message (15 minutes après l'envoi) */
.tchat-modifie { color: var(--gris-clair); font-style: italic; }
.tchat-modifier { margin-left: auto; padding: 0 4px; border: 0; border-radius: 4px; background: none; font: inherit; font-size: 0.75rem; color: var(--gris); text-decoration: underline; cursor: pointer; }
.tchat-modifier:hover { color: var(--gazon-fonce); background: var(--gazon-clair); }
.tchat-modifier + .tchat-supprimer { margin-left: 0; }
.tchat-edition { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.tchat-edition input { flex: 1 1 12em; min-width: 0; padding: 6px 8px; border: 1px solid var(--ligne); border-radius: 6px; font: inherit; }
.tchat-edition input:focus { outline: 3px solid rgba(14, 74, 54, 0.22); outline-offset: 0; border-color: var(--gazon); }
.tchat-edition .bouton { padding: 6px 12px; font-size: 0.875rem; }
.tchat-edition .tchat-erreur { flex-basis: 100%; margin: 0; }
.tchat-edition .tchat-erreur:empty { display: none; }
.tchat-invite { font-size: 0.9375rem; color: var(--gris); }
.tchat-vide { margin: 8px 0 10px; }
.tchat-historique-liste { max-height: none; margin: 0; padding: 0 16px; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 18px 0; font-size: 0.9375rem; }

/* ---------- Classements au long cours ---------- */

.nav-classements { background: var(--surface); border-bottom: 1px solid var(--ligne); }
.nav-classements-int { max-width: 1200px; margin: 0 auto; padding: 0 14px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-classements-int::-webkit-scrollbar { display: none; }
.nav-classements a { padding: 13px 10px 10px; white-space: nowrap; color: var(--gris); text-decoration: none; font-weight: 650; font-size: 0.9375rem; border-bottom: 3px solid transparent; }
.nav-classements a:hover { color: var(--encre); }
.nav-classements a[aria-current="page"] { color: var(--encre); border-bottom-color: var(--gazon); }

.barre-gauche { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bascule-detail { font-size: 0.875rem; font-weight: 650; }
.bascule-detail[data-actif] { color: var(--gazon-fonce); }
.choix-annee { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.choix-annee select {
  font: inherit; font-size: 0.9375rem; font-weight: 650; color: var(--encre); background: var(--surface);
  border: 1px solid var(--ligne); border-radius: 8px; padding: 7px 10px; min-height: 38px;
}
.defilement-tableau { overflow-x: auto; }
.col-chiffre { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; width: 1%; }
.zero { color: var(--gris-clair); }
.classement abbr { text-decoration: none; cursor: help; }
.badge-type { display: inline-block; font-size: 0.6875rem; font-weight: 750; letter-spacing: 0.03em; color: var(--gris); border: 1px solid var(--ligne); border-radius: 4px; padding: 0 5px; vertical-align: 1px; }
.badge-en-cours { color: var(--gazon); border-color: var(--gazon-clair); background: var(--gazon-voile); }
.table-detail tfoot th, .table-detail tfoot td { padding: 10px 12px; border-top: 1px solid var(--ligne); background: var(--gazon-voile); }
.table-detail .col-groupe { text-align: center; }
.table-detail tr.absent td { color: var(--gris-clair); }
.table-detail .col-absent { text-align: center; font-size: 0.875rem; }

.avec-aside { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.encadre { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px 16px; min-width: 0; }
.encadre h2, .encadre h3 { font-size: 1.125rem; margin-bottom: 6px; }
.encadre .note { margin: 0 0 10px; }
.encadre-moi { box-shadow: inset 4px 0 0 var(--balle); }
.liste-chiffres { list-style: none; margin: 0; padding: 0; }
.liste-chiffres li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 0; border-top: 1px solid #e6ece8; font-size: 0.9375rem; }
.liste-chiffres li:first-child { border-top: 0; }
.liste-chiffres li.moi { background: var(--balle-pale); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: 4px; }
.liste-chiffres .chiffre { white-space: nowrap; }
.liste-longue { columns: 2; column-gap: 24px; }
.liste-longue li { break-inside: avoid; }
.rang-liste { display: inline-block; min-width: 26px; color: var(--gris-clair); font-stretch: 75%; font-weight: 750; font-variant-numeric: tabular-nums; }
.chiffre { font-variant-numeric: tabular-nums; color: var(--gris); }

.chiffres { margin-top: 36px; }
.chiffres h2 { font-size: 1.375rem; }
.chiffres-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.chiffres-bloc { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px 16px; }
.chiffres-bloc h3 { font-size: 1.0625rem; margin-bottom: 8px; }
.chiffres-bloc .note { margin: 8px 0 0; }
.mini-table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.mini-table caption { text-align: left; font-weight: 700; padding-bottom: 6px; }
.mini-table th, .mini-table td { padding: 4px 0; text-align: left; border-bottom: 1px solid #e6ece8; }
.mini-table td { text-align: right; font-variant-numeric: tabular-nums; }
.mini-table thead th { font-size: 0.8125rem; color: var(--gris); font-weight: 650; text-align: right; }
.mini-table tbody th { font-weight: 500; }
.liste-perfects { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; max-height: 260px; overflow-y: auto; }
.liste-perfects li { padding: 4px 0; border-top: 1px solid #e6ece8; }
.liste-perfects li:first-child { border-top: 0; }
.liste-defense { margin: 0; padding-left: 22px; font-size: 0.9375rem; }
.liste-defense li { padding: 2px 0; }
.liste-defense li span { display: inline-flex; }
.liste-defense .chiffre { float: right; }

.chiffres-cles { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 0 0 20px; }
.chiffres-cles div { min-width: 120px; }
.chiffres-cles dt { font-size: 0.8125rem; color: var(--gris); font-weight: 600; }
.chiffres-cles dd { margin: 0; font-stretch: 75%; font-weight: 800; font-size: 1.75rem; line-height: 1.15; color: var(--encre); }
.chiffres-cles dd small { font-stretch: 100%; font-weight: 500; font-size: 0.8125rem; color: var(--gris); margin-left: 4px; }

.courbe { margin: 0 0 16px; }
.courbe-zone { position: relative; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 8px 8px 0; min-height: 320px; }
.courbe-zone:focus-visible { outline: 3px solid var(--gazon); outline-offset: 2px; }
.courbe svg { display: block; width: 100%; height: auto; overflow: visible; }
.courbe .grille { stroke: #e6ece8; stroke-width: 1; }
.courbe .axe { stroke: #b9c6bf; stroke-width: 1; }
.courbe .etiquette { fill: var(--gris); font-family: var(--police); font-size: 12px; font-variant-numeric: tabular-nums; }
.courbe .trace { fill: none; stroke: var(--gazon); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.courbe .point { fill: var(--gazon); stroke: var(--surface); stroke-width: 2; }
.courbe .point-meilleur { fill: var(--balle); stroke: var(--gazon); stroke-width: 2; }
.courbe .valeur { fill: var(--encre); font-family: var(--police); font-size: 12px; font-weight: 700; }
.courbe .repere { stroke: var(--gris-clair); stroke-width: 1; }
.courbe-bulle {
  position: absolute; top: 8px; pointer-events: none; background: var(--encre); color: #fff; border-radius: 6px;
  padding: 5px 9px; font-size: 0.8125rem; line-height: 1.3; white-space: nowrap; transform: translateX(-50%);
}
.courbe-bulle b { font-size: 0.9375rem; }
.courbe figcaption { margin-top: 6px; }
.donnees { margin: 8px 0 24px; }
.donnees summary { cursor: pointer; font-weight: 650; color: var(--gazon); font-size: 0.9375rem; padding: 4px 0; }
.donnees[open] summary { margin-bottom: 10px; }
.table-donnees { max-width: 360px; }
.baremes { display: flex; gap: 24px; flex-wrap: wrap; }
.baremes .mini-table { width: 160px; }

.grille-palmares { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.palmares {
  display: flex; flex-direction: column; gap: 3px; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon);
  padding: 12px 14px; color: var(--encre); text-decoration: none;
}
.palmares:hover { border-color: var(--gazon); color: var(--encre); }
.palmares-tete { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.palmares-nom { font-stretch: 75%; font-weight: 800; font-size: 1.1875rem; color: var(--gazon); }
.podium { font-size: 0.9375rem; overflow-wrap: anywhere; }
.podium-place { display: inline-block; min-width: 30px; font-stretch: 75%; font-weight: 800; color: var(--gris-clair); }
.podium-1 { font-weight: 700; }
.podium-1 .podium-place { color: var(--gazon); }
.podium mark { background: var(--balle-pale); color: inherit; padding: 0 2px; border-radius: 3px; }
.photos-vainqueurs { margin-top: 40px; }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.galerie figure { margin: 0; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; }
.galerie img { display: block; width: 100%; height: 180px; object-fit: cover; }
.galerie figcaption { padding: 8px 10px; font-size: 0.875rem; color: var(--gris); }

.grille-tournois { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; align-items: start; }
.table-equipes { margin-bottom: 28px; }
.col-meilleurs { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--gris); white-space: normal; }
.col-meilleurs a { font-weight: 600; }
.effectif { margin-top: 12px; }
.effectif h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.liste-pseudos { margin: 0; font-size: 0.875rem; color: var(--gris); line-height: 1.6; }
.liste-pseudos b { color: var(--encre); font-weight: 650; }
.liens-equipe { margin: 0; font-size: 0.9375rem; font-weight: 650; }

.col-date { white-space: nowrap; color: var(--gris); font-variant-numeric: tabular-nums; width: 1%; }
.fiche-infos { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 4px 0 0; font-size: 0.9375rem; }
.fiche-infos div { display: flex; gap: 6px; }
.fiche-infos dt { color: var(--gris); }
.fiche-infos dd { margin: 0; font-weight: 600; }
.bloc-fiche { margin-top: 28px; }
.bloc-fiche h2 { font-size: 1.375rem; }
.jour-court { display: inline-block; min-width: 28px; color: var(--gris-clair); font-size: 0.8125rem; font-weight: 700; }
.table-pronos-membre td { font-size: 0.9375rem; }
.table-pronos-membre .circuit { font-size: 0.625rem; padding: 1px 5px; vertical-align: 1px; }
.liste-palmares { list-style: none; margin: 0 0 10px; padding: 0; font-size: 0.9375rem; }
.liste-palmares li { padding: 4px 0; }
.liste-palmares .podium-place { min-width: 96px; font-stretch: 100%; font-weight: 700; color: var(--gris); }
.liste-palmares .podium-1 { color: var(--gazon); }
.liens-fiche { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.9375rem; font-weight: 600; }
.deux-listes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 14px 0 8px; }
.deux-listes h3 { font-size: 1.0625rem; margin-bottom: 6px; }

.recherche-joueur { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px 16px; margin-bottom: 20px; }
.recherche-joueur label { display: block; font-weight: 650; margin-bottom: 6px; }
.recherche-ligne { display: flex; gap: 8px; }
.recherche-ligne input { flex: 1; min-width: 0; font: inherit; border: 1px solid #b9c6bf; border-radius: 8px; padding: 8px 12px; min-height: 42px; }
.resultats-recherche { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.grille-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 14px; align-items: start; }
.grille-deux { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.titre-joueur { display: flex; align-items: center; gap: 16px; }
.photo-joueur { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--gazon-clair); }
.titre-joueur .sous-titre { margin: 0; }
.table-matchs-joueur td { font-size: 0.9375rem; }
.table-matchs-joueur tr.victoire td:first-child { box-shadow: inset 3px 0 0 var(--gazon); }
a.surprise, .ligne-cote.surprise { font-weight: 750; color: var(--erreur); }
.ligne-cote { display: inline-block; margin-left: 8px; font-size: 0.8125rem; color: var(--gris); }
.ligne-puces { display: block; margin-top: 4px; }
.ligne-puces .puce-points { display: inline-block; margin: 0 4px 4px 0; }

@media (max-width: 760px) {
  .nav-classements-int { padding: 0 6px; }
  .avec-aside { grid-template-columns: 1fr; }
  .liste-longue { columns: 1; }
  .barre-gauche { width: 100%; }
  .barre-gauche .onglets { max-width: 100%; overflow-x: auto; }
  .onglets a { padding: 7px 12px; white-space: nowrap; }
  .chiffres-cles { gap: 8px 20px; }
  .chiffres-cles dd { font-size: 1.5rem; }
  .courbe-zone { min-height: 260px; }
  .titre-joueur { align-items: flex-start; }
}

/* ---------- Communauté : binômes, équipe, calendrier, règlement ---------- */

.liste-demandes { list-style: none; margin: 0; padding: 0; }
.liste-demandes li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-top: 1px solid #e6ece8; }
.liste-demandes li:first-child { border-top: 0; }
.actions-ligne { display: flex; gap: 8px; }
.actions-ligne form { margin: 0; }
.carte-binome { background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 16px 18px; }
.carte-binome h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.totem-grand { width: 28px; height: 28px; margin-left: 0; vertical-align: middle; border-radius: 4px; flex: none; }
.totem-petit { width: 18px; height: 18px; margin-left: 0; flex: none; }
.choix-totem fieldset { border: 0; margin: 0 0 12px; padding: 0; }
.choix-totem legend { font-weight: 650; font-size: 0.9375rem; padding: 0; margin-bottom: 8px; }
.totems { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 6px; }
.totem-choix { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--ligne); border-radius: 8px; cursor: pointer; font-size: 0.9375rem; }
.totem-choix input { accent-color: var(--gazon); margin: 0; }
.totem-choix:has(input:checked) { border-color: var(--gazon); background: var(--gazon-voile); font-weight: 650; }
.rompre { margin: 14px 0 0; }
.lien-danger { width: auto; color: var(--erreur); font-weight: 600; text-decoration: underline; }
.lien-danger:hover { color: var(--encre); }
.messagerie { margin-top: 28px; }
.avec-aside .messagerie { margin-top: 0; }
.messagerie .note { margin: 8px 0 10px; }
.tchat-messages-long { max-height: 520px; }
.message-supprimer { margin: 0 0 0 auto; }
.message-supprimer button { font: inherit; font-size: 1rem; line-height: 1; border: 0; background: none; color: var(--gris-clair); cursor: pointer; padding: 0 4px; border-radius: 4px; }
.message-supprimer button:hover { color: var(--erreur); background: var(--erreur-fond); }
.formulaire-ligne { flex-direction: row; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.formulaire-ligne .champ { flex: 1 1 260px; }
.formulaire-ligne .bouton { min-height: 44px; }
.liste-binomes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 20px; }
.liste-binomes li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid #e6ece8; font-size: 0.9375rem; }
.liste-binomes li.moi { background: var(--balle-pale); }
.titre-equipe { display: flex; align-items: center; gap: 12px; }
.titre-equipe .drapeau { margin: 0; }
.creer-equipe summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.creer-equipe summary::-webkit-details-marker { display: none; }
.creer-equipe summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gazon-voile); color: var(--gazon); font-weight: 800; }
.creer-equipe[open] summary::before { content: "−"; }
.creer-equipe summary h2 { margin: 0; }
.creer-equipe .formulaire { margin-top: 14px; max-width: 640px; }

.reglement section { margin-top: 28px; }
.reglement h2 { font-size: 1.375rem; }
.table-bareme { margin: 4px 0 8px; }
.table-bareme tbody th { font-weight: 600; text-align: left; padding: 9px 12px; border-bottom: 1px solid #e6ece8; background: none; color: var(--encre); font-size: 0.9375rem; }
.table-bareme tbody td { font-weight: 650; }
.definitions { margin: 0; }
.definitions dt { font-weight: 700; margin-top: 12px; display: flex; align-items: center; gap: 6px; }
.definitions dd { margin: 2px 0 0; color: var(--gris); }

.calendrier { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); overflow: hidden; }
.calendrier-mois { padding: 8px 16px; background: var(--gazon-voile); border-top: 1px solid var(--ligne); font-weight: 700; font-size: 0.8125rem; color: var(--gris); }
.calendrier-mois:first-child { border-top: 0; }
.calendrier-tournoi { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 104px; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid #e6ece8; }
.calendrier-date { font-variant-numeric: tabular-nums; color: var(--gris); white-space: nowrap; }
.calendrier-date b { font-stretch: 75%; font-weight: 800; font-size: 1.25rem; color: var(--encre); }
.calendrier-nom { display: flex; flex-direction: column; font-weight: 650; }
.calendrier-nom small { font-weight: 500; color: var(--gris); font-size: 0.8125rem; }
.est-gc .calendrier-nom > a, .est-gc .calendrier-nom { font-stretch: 85%; }
.est-gc .calendrier-nom { font-size: 1.0625rem; font-weight: 800; }
.calendrier-circuits { display: flex; gap: 4px; }
.calendrier-etat { text-align: right; font-size: 0.875rem; color: var(--gris); }
.est-passe { color: var(--gris); }
.est-passe .calendrier-date b, .est-passe .calendrier-nom { color: var(--gris); }
.est-passe .circuit { opacity: 0.55; }
.est-prochain { box-shadow: inset 4px 0 0 var(--balle); background: var(--balle-pale); }
.est-prochain .calendrier-etat { color: var(--encre); font-weight: 700; }
.est-en-cours { box-shadow: inset 4px 0 0 var(--gazon); }
.est-en-cours .calendrier-etat { color: var(--gazon); font-weight: 700; }

@media (max-width: 760px) {
  .calendrier-tournoi { grid-template-columns: 70px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .calendrier-circuits { display: none; }
  .formulaire-ligne { flex-direction: column; align-items: stretch; }
  .formulaire-ligne .champ { flex: none; }
}

/* ---------- Gestion du tournoi (webmestre) ---------- */

.bouton-petit { padding: 7px 12px; font-size: 0.875rem; border-radius: 6px; min-height: 36px; }
.bouton-danger { background: var(--surface); color: var(--erreur); border-color: #e7c8c3; }
.bouton-danger:hover { background: var(--erreur-fond); color: var(--erreur); border-color: var(--erreur); }
.bouton[disabled] { opacity: 0.55; cursor: not-allowed; }

.etat {
  display: inline-block; font-size: 0.75rem; font-weight: 650; line-height: 1.4; padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--ligne); color: var(--gris); background: var(--surface); white-space: nowrap; vertical-align: 2px;
}
.etat-en-ligne { color: var(--ok); border-color: #b9d9ca; background: var(--ok-fond); }
.etat-hors-ligne { border-style: dashed; }
.etat-ouvert { color: var(--gazon); border-color: #c6dbcf; background: var(--gazon-voile); }
.etat-clos { color: #fff; background: var(--gazon); border-color: var(--gazon); }
.etat-alerte { color: var(--erreur); border-color: #e7c8c3; background: var(--erreur-fond); }

/* haut de « Matchs et résultats » : titre, alertes, chiffres et ajout d'un match à gauche, tchat des organisateurs à droite */
.gm-haut { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 8px 28px; align-items: start; margin-bottom: 36px; }
.gm-haut .gm-ajout { margin-bottom: 0; }
.gm-haut .chiffres-cles { margin-bottom: 16px; }
.tchat-orga { margin: 0; scroll-margin-top: 12px; }
.tchat-orga .tchat-tete h2 { font-size: 1.25rem; }
.tchat-orga .tchat-messages { max-height: 340px; }
.tchat-orga .tchat-vide { margin: 4px 0 10px; }
.gestion-journal .tchat-orga .tchat-messages { max-height: 680px; }

.gm-annonce-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gm-annonce-action p { margin: 0; }
.gm-annonce-action form { margin: 0; }

.gm-ajout > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.gm-ajout > summary::-webkit-details-marker { display: none; }
.gm-ajout > summary::before {
  content: "+"; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--gazon-voile); color: var(--gazon); font-weight: 800; flex: none;
}
.gm-ajout[open] > summary::before { content: "\2212"; }
.gm-ajout > summary h2 { margin: 0; }
.gm-ajout[open] > summary { margin-bottom: 14px; }
.gm-ajout:not([open]) { padding-top: 16px; padding-bottom: 16px; }
.gm-ajout-form {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 12px 14px; align-items: start;
}
.gm-ajout-form .gm-en-ligne { grid-column: 1 / 4; align-self: center; }
.gm-ajout-form > .bouton { grid-column: 4 / -1; }
.gm-ajout .note { margin: 12px 0 0; }
.champ-jour input { text-align: center; }

.gm-source { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 0 0 6px; }
.gm-source .note { margin: 0; flex: 1 1 320px; }
.gm-api-form { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }

.gestion-liste { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gestion-match {
  background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 12px;
}
.gestion-match.est-hors-ligne { border-style: dashed; background: #fafcfb; }
.gestion-match:target { box-shadow: 0 0 0 3px var(--balle); }
.gm-tete { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.gm-joueurs { margin: 0; flex: 1 1 340px; font-size: 1rem; }
.gm-joueurs b { font-weight: 750; }
.gm-joueurs .score-texte { margin-left: 8px; font-weight: 700; }
.gm-nation { color: var(--gris); font-size: 0.8125rem; font-weight: 500; }
.gm-contre { color: var(--gris-clair); font-size: 0.8125rem; margin: 0 2px; }
.gm-etats { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gm-compte { font-size: 0.875rem; color: var(--gris); }
.gm-api { margin: 0; font-size: 0.875rem; color: var(--gris); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gm-api-fini { color: var(--encre); background: var(--balle-pale); border-radius: 6px; padding: 6px 10px; }
.gm-cloture { margin: 0; font-size: 0.875rem; color: var(--gris); }

.gm-resultat { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; margin: 0; }
.gm-vainqueur { border: 0; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.gm-vainqueur legend { float: left; width: 100%; font-size: 0.8125rem; font-weight: 650; color: var(--gris); padding: 0; margin-bottom: 4px; }
.choix-court {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ligne); border-radius: 8px;
  padding: 6px 10px; min-height: 38px; cursor: pointer; font-size: 0.9375rem; background: var(--surface);
}
.choix-court:has(input:checked) { border-color: var(--gazon); background: var(--balle-pale); font-weight: 700; }
.choix-court:has(input:focus-visible) { outline: 3px solid var(--gazon); outline-offset: 2px; }
.choix-court input { accent-color: var(--gazon); margin: 0; }
.gm-score { display: flex; flex-direction: column; gap: 4px; font-size: 0.8125rem; font-weight: 650; color: var(--gris); }
.gm-score input {
  font: inherit; font-size: 1rem; font-weight: 650; color: var(--encre); letter-spacing: 0.04em; font-variant-numeric: tabular-nums;
  border: 1px solid #b9c6bf; border-radius: 8px; padding: 6px 10px; min-height: 38px; width: 11.5em;
}
.gm-score input:focus { outline: 3px solid rgba(14, 74, 54, 0.22); border-color: var(--gazon); }
.gm-score input[aria-invalid="true"] { border-color: var(--erreur); }
.gm-resultat > .bouton { min-height: 38px; }
.gm-aide, .gm-erreur { flex-basis: 100%; margin: 0; }
.gm-aide { font-size: 0.8125rem; }

.gm-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; border-top: 1px solid #e6ece8; padding-top: 10px; }
.gm-actions form { margin: 0; }
.gm-modifier { margin: 0; }
.gm-modifier > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 36px; padding: 7px 12px; border-radius: 6px;
  border: 1px solid var(--ligne); background: var(--surface); color: var(--gazon); font-weight: 650; font-size: 0.875rem; line-height: 1.2;
}
.gm-modifier > summary::-webkit-details-marker { display: none; }
.gm-modifier > summary:hover { background: var(--gazon-voile); }
.gm-modifier[open] { flex-basis: 100%; order: 10; }
.gm-modifier[open] > summary { background: var(--gazon-voile); border-color: var(--gazon); }
.gm-modification { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 14px; align-items: end; margin-top: 10px; }
.gm-modification .note, .gm-modification .champ-erreur { grid-column: 1 / -1; margin: 0; }
.gm-modification .champ input, .gm-modification .champ select { min-height: 38px; padding: 6px 10px; }
.gm-modifier .gm-resultat { margin-top: 10px; }
.gm-modifier > .note { margin: 8px 0 0; }

/* un résultat : la ligne du match et ses actions côte à côte */
.gestion-match.est-termine { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.est-termine .gm-tete { flex: 1 1 520px; }
.est-termine .gm-actions { border-top: 0; padding-top: 0; margin-left: auto; }
.est-termine .gm-modifier[open] { margin-top: 4px; }

.gm-jour { margin: 0 0 8px; }
.gm-jour > summary { cursor: pointer; list-style: none; }
.gm-jour > summary::-webkit-details-marker { display: none; }
.gm-jour > summary::before { content: "+"; font-weight: 800; color: var(--gazon); width: 14px; }
.gm-jour[open] > summary::before { content: "\2212"; }
.gm-jour > summary small { font-weight: 500; }

.gestion-colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 20px; align-items: start; }
.gestion-colonnes > .carte-formulaire { margin: 0; }
.gestion-colonnes h2 { font-size: 1.25rem; }
.carte-formulaire > p:last-child, .carte-formulaire > .note:last-child { margin-bottom: 0; }
.champ small { font-weight: 400; }

.gestion-journal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 32px; align-items: start; }
.gestion-journal h2 { font-size: 1.25rem; }
.journal-liste { list-style: none; margin: 14px 0 0; padding: 0; font-size: 0.9375rem; }
.journal-liste li { padding: 8px 0; border-top: 1px solid #e6ece8; overflow-wrap: anywhere; }
.journal-liste li p { margin: 2px 0 0; }
.journal-quand { color: var(--gris); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.journal-actions li { padding: 6px 0; }
.journal-site > form { margin-top: 18px; }
.raccourcis-journal { margin: 10px 0 4px; }

.fiche-membre h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fiche-membre h2 small { font-size: 0.9375rem; }
.fiche-membre h3 { font-size: 1.0625rem; margin: 22px 0 8px; }
.fiche-infos-colonnes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 24px; margin: 6px 0 12px; }
.fiche-infos-colonnes div { flex-direction: column; gap: 0; }
.fiche-infos-colonnes dt { font-size: 0.8125rem; }
.actions-membre { flex-wrap: wrap; }
.table-membres td { font-size: 0.9375rem; overflow-wrap: anywhere; }

.liste-retards { list-style: none; margin: 0; padding: 0; font-size: 0.9375rem; }
.liste-retards li { padding: 5px 0; border-top: 1px solid #e6ece8; }
.liste-retards li:first-child { border-top: 0; }
.liste-retards-matchs { display: block; color: var(--gris); font-size: 0.8125rem; }
.liste-retards-courte { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.liste-retards-courte li, .liste-retards-courte li:first-child { border-top: 0; padding: 2px 0; }

.filtres-pronos { margin-bottom: 18px; }
.filtres-pronos .champ { flex: 1 1 220px; }
.table-tous-pronos td { font-size: 0.9375rem; }
.table-tous-pronos td small { color: var(--gris); }
.prono-tardif td { background: var(--erreur-fond); }

.liste-calendrier-gestion { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste-calendrier-gestion li {
  background: var(--surface); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 10px 12px;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; scroll-margin-top: 12px;
}
.liste-calendrier-gestion li:target { box-shadow: 0 0 0 3px var(--balle); }
.ct-form {
  flex: 1 1 760px; display: grid; gap: 8px 10px; align-items: end;
  grid-template-columns: minmax(140px, 1.6fr) minmax(130px, 1.1fr) minmax(190px, 1.7fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr) minmax(72px, 0.5fr) auto;
}
/* sur grand écran, les intitulés de la première ligne servent d'en-têtes de colonnes (ils restent lus par les lecteurs d'écran) */
@media (min-width: 901px) {
  .liste-calendrier-gestion li + li .ct-form .champ > span:first-child {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}
.ct-form .champ > span:first-child { font-size: 0.8125rem; color: var(--gris); }
.ct-form .champ input, .ct-form .champ select { min-height: 38px; padding: 6px 8px; font-size: 0.9375rem; }
.ct-form > .bouton, .ct-supprimer .bouton { min-height: 38px; }
.ct-supprimer { margin: 0; }
.liste-calendrier-gestion .champ-erreur { flex-basis: 100%; margin: 0; }

.verifications { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.verifications li { position: relative; padding: 10px 14px 10px 40px; border-radius: 8px; background: var(--surface); border: 1px solid var(--ligne); }
.verifications li::before {
  position: absolute; left: 12px; top: 10px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 800; color: #fff;
}
.verif-ok::before { content: "\2713"; background: var(--ok); }
.verif-attention { background: var(--balle-pale) !important; }
.verif-attention::before { content: "!"; background: #8a7a00; }
.verif-bloquant { background: var(--erreur-fond) !important; border-color: #e7c8c3 !important; }
.verif-bloquant::before { content: "\00D7"; background: var(--erreur); }
.liste-rapport { margin: 0 0 12px; padding-left: 22px; }
.liste-rapport li { padding: 3px 0; }
.operations-fin { flex-wrap: wrap; margin-top: 10px; }

.aide-gestion section { margin-top: 28px; }
.aide-gestion h2 { font-size: 1.375rem; }
.etapes-aide { margin: 0; padding-left: 22px; }
.etapes-aide li { padding: 5px 0; }
.commande { display: inline-block; max-width: 100%; overflow-wrap: anywhere; font-family: Consolas, "Liberation Mono", monospace; font-size: 0.875rem; background: var(--gazon-voile); border: 1px solid var(--ligne); border-radius: 4px; padding: 4px 8px; }

@media (max-width: 900px) {
  .gm-haut { grid-template-columns: 1fr; gap: 20px; }
  .gm-ajout-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gm-ajout-form .champ:nth-of-type(1), .gm-ajout-form .champ:nth-of-type(2) { grid-column: 1 / -1; }
  .gm-ajout-form .gm-en-ligne, .gm-ajout-form > .bouton { grid-column: 1 / -1; }
  .ct-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ct-form .ct-nom { grid-column: 1 / -1; }
  .gestion-journal { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .gestion-match { padding: 10px 12px; }
  .gm-joueurs { flex-basis: 100%; }
  .gm-score input { width: 100%; }
  .gm-score { flex: 1 1 160px; }
  .gm-resultat > .bouton { flex: 1 1 100%; }
  .ct-form > .bouton { grid-column: 1 / -1; }
}

/* ---------- Pied de page ---------- */

.pied { border-top: 1px solid var(--ligne); background: var(--surface); }
.pied-int { max-width: 1200px; margin: 0 auto; padding: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.875rem; color: var(--gris); }
.pied-int p { margin: 0; }
.pied-liens { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Message éphémère ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--encre); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 100;
  max-width: min(520px, calc(100vw - 32px)); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transition: opacity 0.2s, transform 0.2s; font-size: 0.9375rem;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Écrans moyens et petits ---------- */

@media (max-width: 1000px) {
    }

@media (max-width: 760px) {
  .entete-int { flex-wrap: wrap; gap: 0 12px; padding: 0 16px; }
  .marque { min-height: 54px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; gap: 0; margin: 0 -8px; padding-bottom: 4px; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .menu-plus { position: static; }
  .menu-plus .menu-panneau { left: 8px; right: 8px; min-width: 0; columns: 2; }
  .compte-nom { display: none; }
  .compte .bouton { padding: 7px 12px; font-size: 0.875rem; }
  .lien-entete { font-size: 0.9375rem; }
  .tournoi-int { padding: 16px 16px 22px; }
  .tournoi-etat { font-size: 0.9375rem; }
  .contenu { padding: 20px 16px 48px; }
    .deux-colonnes { grid-template-columns: 1fr; }
  .recherche, .recherche input { width: 100%; }
  .barre-classement { flex-direction: column; align-items: stretch; }
  .onglets { justify-content: stretch; }
  .onglets a { flex: 1; text-align: center; }
  .col-evol { width: 44px; }
  .col-rang { width: 48px; }
  .classement th, .classement td { padding: 8px; }
  .titre-match { font-size: 1.75rem; }
  .table-pronos td:nth-child(2) { white-space: normal; }
  .table-pronos .puce-points { display: none; }
  .table-pronos .col-pseudo { white-space: normal; }

  /* tableaux à 3 ou 4 colonnes repliés en lignes de deux étages sur téléphone */
  .empile, .empile tbody { display: block; }
  .empile thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .empile tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 3px; align-items: baseline; padding: 9px 12px; border-bottom: 1px solid #e6ece8; }
  .empile tbody tr:last-child { border-bottom: 0; }
  .empile td, .classement.empile td { display: block; padding: 0; border: 0; min-width: 0; }
  .empile tr.moi { background: var(--balle-pale); box-shadow: inset 4px 0 0 var(--balle); }
  .empile tr.moi td { background: none; }
  .empile tr.moi td:first-child { box-shadow: none; }
  .empile .col-points { text-align: right; }

  .table-pronos.empile td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .table-pronos.empile td:nth-child(4) { grid-column: 2; grid-row: 1; }
  .table-pronos.empile td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 0.875rem; }
  .table-pronos.empile td:nth-child(3) { grid-column: 2; grid-row: 2; text-align: right; font-size: 0.8125rem; color: var(--gris); }

  .table-pronos-membre.empile td:nth-child(1) { grid-column: 1 / -1; }
  .table-pronos-membre.empile td:nth-child(2), .table-pronos-membre.empile td:nth-child(3) { grid-column: 1; font-size: 0.875rem; }
  .table-pronos-membre.empile td:nth-child(2)::before { content: "Son prono "; color: var(--gris); font-size: 0.8125rem; }
  .table-pronos-membre.empile td:nth-child(3)::before { content: "Résultat "; color: var(--gris); font-size: 0.8125rem; }
  .table-pronos-membre.empile td:nth-child(4) { grid-column: 2; grid-row: 2 / span 2; align-self: center; }

  .table-matchs-joueur.empile td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .table-matchs-joueur.empile td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 0.8125rem; color: var(--gris); }
  .table-matchs-joueur.empile td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .table-matchs-joueur.empile tr.victoire { box-shadow: inset 3px 0 0 var(--gazon); }
  .table-matchs-joueur.empile tr.victoire td:first-child { box-shadow: none; }
}

@media (max-width: 400px) {
  .tuile { width: 42px; height: 44px; font-size: 1.25rem; }
  .tableau-score .case { width: 30px; min-width: 30px; height: 32px; font-size: 1.0625rem; }
  .joueur-photo { width: 30px; height: 30px; }
  .compte .bouton { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Gestion > Journal > Appels à l'API */
.api-bilan { margin-top: 28px; }
.api-bilan h2 { margin-top: 1.6em; }
.api-bilan h2:first-child { margin-top: 0; }
.chiffre-quota b { font-size: 1.6em; font-variant-numeric: tabular-nums; }
.table-api { max-width: 40rem; margin-bottom: 14px; }
.table-api .nombre { text-align: right; font-variant-numeric: tabular-nums; }

/* Accueil : « Tout enregistrer », collé en bas de l'écran tant que des pronostics modifiés attendent */
.enregistrer-tout {
  position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 12px 0 0; padding: 8px 8px 8px 16px; border-radius: 10px; background: var(--gazon-fonce); color: #fff;
  box-shadow: 0 6px 20px rgba(9, 52, 38, 0.28); font-size: 0.9375rem;
}
.enregistrer-tout[hidden] { display: none; }
.enregistrer-tout .bouton { flex-shrink: 0; background: var(--balle); border-color: var(--balle); color: var(--gazon-fonce); }
.enregistrer-tout .bouton:hover { background: #e4f25c; color: var(--gazon-fonce); }
.enregistrer-tout .bouton:disabled { opacity: 0.7; cursor: progress; }
@media (max-width: 480px) { .enregistrer-tout { font-size: 0.875rem; padding-left: 12px; } }

/* Classement : la meilleure journée du tournoi en cours */
.meilleur-jour {
  margin: 0 0 18px; padding: 10px 14px; border-left: 4px solid var(--balle); border-radius: 0 8px 8px 0;
  background: var(--balle-pale); color: var(--encre);
}
.meilleur-jour-titre { display: block; font-size: 0.8125rem; font-weight: 650; color: var(--gris); }
.meilleur-jour a { margin-left: 4px; white-space: nowrap; }

/* Drapeau de la nation à côté du nom d'un joueur (inc/drapeaux.php ; celui des membres, c'est .drapeau) */
.drapeau-joueur { flex-shrink: 0; width: 20px; height: 15px; margin-right: 7px; border-radius: 2px; vertical-align: -2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(9, 52, 38, 0.12); }
.joueur-nom .drapeau-joueur { width: 18px; height: 13.5px; margin-right: 6px; vertical-align: -1px; }
.choix .drapeau-joueur { margin-right: 0; }
