/* Start Matches – mise en page compacte en 2 lignes (teamA / teamB) */
/* Taille responsive du panneau de score (laisse de la marge pour les logos à gauche/droite) */
.scoreboard {
  display: block;
  width: 100%;
  margin: 1rem auto; /* centre le panneau */
}

/* ≥ 768px : commence à rétrécir */
@media (min-width: 768px) {
  .scoreboard {
    width: 78%;
  }
}

/* ≥ 992px : un peu plus étroit */
@media (min-width: 992px) {
  .scoreboard {
    width: 66%;
  }
}

/* ≥ 1200px : encore plus compact */
@media (min-width: 1200px) {
  .scoreboard {
    width: 30%;
  }
}

/* On garde l’alignement des deux lignes et des scores */
.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
}
.score-row--top {
  margin-bottom: 0.25rem;
}
.score-row__name {
  font-size: 1rem;
}
.score-row__score {
  min-width: 2ch;
  text-align: right;
  font-weight: 600;
}

/* Highlight du gagnant (vert pâle + texte vert) */
.score-row--win {
  background: #f2faf4;
}
.score-row--win .score-row__name {
  color: #2e7d32;
  font-weight: 600;
}

.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
}
.score-row--top {
  margin-bottom: 0.25rem;
}

/* Gagnant : fond vert pâle + texte vert */
.score-row--win {
  background: #f2faf4;
}
.score-row--win .score-row__name {
  color: #2e7d32;
  font-weight: 600;
}

.score-row__name {
  font-size: 1rem;
}
.score-row__score {
  min-width: 2ch;
  text-align: right;
  font-weight: 600;
  font-size: 1rem;
}

/* Aligner visuellement tous les boutons du filtre équipes */
#team_filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* espace homogène entre les chips */
  align-items: center; /* centrage vertical si une ligne se wrap */
}

#team_filter .button {
  display: inline-flex; /* contenu centré verticalement */
  align-items: center;
  box-sizing: border-box;
  height: 34px; /* hauteur uniforme */
  line-height: 1; /* évite la variation avec bold/uppercase */
  padding: 0 12px; /* vertical = 0 car on fixe la hauteur */
  vertical-align: middle; /* corrige l'alignement avec inline elements */
}

/* S’assure que la variante .button-xs garde la même hauteur */
#team_filter .button.button-xs {
  height: 34px;
  padding: 0 12px;
}

/* L'état actif ne doit pas modifier la hauteur */
#team_filter .button.button-active {
  padding: 0 12px; /* identique aux autres */
  border-width: 1px; /* normalise si le thème change l’épaisseur */
}

/* === Classement – regroupements & largeurs === */
.table-standings {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-size: 0.95rem;
}
.table-standings tbody tr:nth-child(odd) {
  background: #fafafa;
}
.table-standings tr.is-our-team {
  background: #90d7a2!important;
  font-weight: 700;
} /* FC Saint-Aubin/Vallon en gras */

.table-standings thead th {
  white-space: nowrap;
  padding: 0.4rem 0.5rem;
}
.table-standings thead tr.grouping th {
  font-size: 0.85rem;
  color: #666;
  border-bottom: 1px solid #ececec;
  text-align: center; /* centre "Résultats", "Buts", "Pts" */
}

/* Ligne colonnes */
.table-standings thead tr + tr th {
  font-weight: 700;
  border-bottom: 2px solid #e5e7eb;
}

/* Alignements */
.table-standings th.num,
.table-standings td.num,
.table-standings .g,
.table-standings .n,
.table-standings .p,
.table-standings .bp,
.table-standings .bc,
.table-standings .diff,
.table-standings .mj,
.table-standings .pos,
.table-standings .fp {
  text-align: center;
}
.table-standings .team {
  text-align: left;
}
/* Verrouille la grille des colonnes */
.table-standings {
  table-layout: fixed;
}

/* Largeurs via <colgroup> */
.table-standings col.col-pos {
  width: 4ch;
}
.table-standings col.col-team {
  width: auto;
} /* prend le reste */
.table-standings col.col-mj {
  width: 4.8ch;
}

.table-standings col.col-g,
.table-standings col.col-n,
.table-standings col.col-p {
  width: 4.5ch;
} /* mêmes largeurs pour G/N/P */

.table-standings col.col-fp {
  width: 6ch;
}

.table-standings col.col-bp,
.table-standings col.col-bc,
.table-standings col.col-diff {
  width: 5.5ch;
} /* regroupés */

.table-standings col.col-pts {
  width: 5ch;
} /* un peu plus large */

/* Équipe : ellipsis si ça déborde */
.table-standings td.team {
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Supprime la border-bottom sur la ligne de groupement */
.table-standings thead tr.grouping th {
  border-bottom: 0; /* ou 0 !important si nécessaire */
}

/* (on garde tes autres règles existantes : zébrage, .is-our-team, etc.) */

/* BP/BC/DIFF regroupés */
.table-standings .bp,
.table-standings .bc,
.table-standings .diff {
  width: 3.2ch;
  min-width: 3.2ch;
}
.table-standings .bp {
  border-left: 1px solid #eee;
}
.table-standings .diff {
  border-right: 3px solid #eee;
}

/* PTS un peu plus grand */
.table-standings .pts {
  font-weight: 700;
  font-size: 1.06rem;
}

/* Cells */
.table-standings td {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
  white-space: nowrap;
}
.update-note {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: #6b7280; /* gris discret */
  background: transparent;
  border: 0;
}
.update-note--jr {
  margin: 0 0 12px;
  font-size: .8rem;
  color: #6b7280;  /* gris discret */
}

/* —— Tournois Juniors —————————————————————————————— */
/* —— Tournois Juniors : centrage & typographies ——————————— */
#jrTournaments {
  text-align: center; /* centre tout par défaut */
}

/* Titres de section (Tournois futurs / passés) */
#jrTournaments .heading-component,
#jrTournaments .heading-component-title {
  text-align: center;
}

/* Carte tournoi */
#jrTournaments .game-result {
  text-align: center; /* s'assure que l'article est centré */
}

/* Bandeau catégorie (icône + libellé) en centrage horizontal */
#jrTournaments .table-game-info-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

/* La grille */
#jrTournaments .scoreboard.scoreboard--single {
  width: 100%;
}

/* 1re ligne (labels) en gras */
#jrTournaments .scoreboard .score-row__name {
color: black;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: .25rem;
  text-align: center;
}

/* 2e ligne (valeurs) légèrement plus petite */
#jrTournaments .scoreboard .score-row__score {
  font-size: .95rem;
  text-align: center;
}

/* Liste des équipes, centrée proprement */
#jrTournaments .scoreboard .score-row__score ul {
  margin: 0 auto;                 /* centre le bloc de liste */
  padding: 0;                     /* retire l'indentation */
  list-style-position: inside;    /* puces alignées au texte */
  display: inline-block;          /* largeur au contenu, centré */
  text-align: center;
}

#jrTournaments .scoreboard .score-row__score li {
  margin: 0 0 .25rem;
}
#jrTournaments .scoreboard .score-row__score li:last-child {
  margin-bottom: 0;
}

/* ──────────────────────────────────────────────────────────────
   Smartphone • PORTRAIT
   - Police + paddings réduits
   - Masque Résultats (G/N/P) + Buts (BP/BC/DIFF)
   - Garde FP (Fair-play) visible
   ────────────────────────────────────────────────────────────── */
@media (max-width: 600px) and (orientation: portrait) {
  .table-standings {
    font-size: 0.88rem;         /* ↓ taille globale */
  }
  .table-standings th,
  .table-standings td {
    padding: 0.28rem 0.35rem;   /* ↓ paddings */
  }

  /* Nom d’équipe compact avec ellipsis */
  .table-standings td.team { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }

  /* PTS un peu moins gros que la version desktop */
  .table-standings .pts { font-size: 0.95rem; font-weight: 700; }

  /* Garder FP visible et un peu plus étroit */
  .table-standings col.col-fp { display: table-column; width: 5ch; }
  .table-standings th.fp, .table-standings td.fp { display: table-cell; }

  /* Cacher les en-têtes de groupement inutiles */
  .table-standings thead .g-group,
  .table-standings thead .bp-group { display: none; }

  /* Cacher G/N/P et BP/BC/DIFF (cols + cellules) */
  .table-standings col.col-g,
  .table-standings col.col-n,
  .table-standings col.col-p,
  .table-standings col.col-bp,
  .table-standings col.col-bc,
  .table-standings col.col-diff { display: none; }

  .table-standings th.g,   .table-standings td.g,
  .table-standings th.n,   .table-standings td.n,
  .table-standings th.p,   .table-standings td.p,
  .table-standings th.bp,  .table-standings td.bp,
  .table-standings th.bc,  .table-standings td.bc,
  .table-standings th.diff,.table-standings td.diff { display: none; }
}

/* Rappel PAYSAGE (smartphone couché) : cacher seulement BP et BC */
@media (max-width: 600px) and (orientation: landscape) {
  .table-standings col.col-bp,
  .table-standings col.col-bc { display: none; }

  .table-standings th.bp, .table-standings td.bp,
  .table-standings th.bc, .table-standings td.bc { display: none; }
}
