/* ============================================================
   Groupes & classement général
   ============================================================ */

/* ---- Ancres de groupes ---- */
.group-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--sp-5);
}
.group-nav a {
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: .85rem;
  color: var(--ink-soft);
}
.group-nav a:hover { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); text-decoration: none; }

/* ---- Grille de groupes ---- */
.group-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 760px) { .group-grid { grid-template-columns: repeat(2, 1fr); } }

.group-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.group-card-head h2 a { color: inherit; text-decoration: none; }
.group-card-head h2 a:hover { text-decoration: underline; }

.group-page-standings { margin-bottom: var(--sp-6); }
.group-page-matches .section-title { margin-bottom: var(--sp-4); }

.group-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px var(--sp-4);
  background: linear-gradient(120deg, var(--brand-700), var(--brand));
  color: #fff;
}
.group-card-head h2 { color: #fff; font-size: 1rem; }
.group-card-head .tag { font-size: .68rem; opacity: .85; text-transform: uppercase; letter-spacing: .08em; }

/* ---- Tableau de classement de groupe ---- */
.standings { width: 100%; border-collapse: collapse; font-size: .9rem; }
.standings th {
  font-family: var(--display);
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  font-weight: 700;
  padding: 9px 8px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.standings th.team-col, .standings td.team-col { text-align: left; }
.standings td { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.standings tr:last-child td { border-bottom: none; }
.standings .rank { color: var(--faint); font-weight: 700; width: 26px; }
.standings .team-col { display: flex; align-items: center; gap: 9px; }
.standings .flag { width: 26px; height: 19px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px var(--line); flex: 0 0 auto; }
.standings .team-col .nom { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.standings .pts { font-weight: 800; color: var(--ink); }
.standings tr.qualif td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.standings tr.qualif .rank { color: var(--brand-700); }
.group-card .legend { padding: 9px var(--sp-4); font-size: .72rem; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line); }

/* ---- Podium ---- */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: var(--sp-3);
  align-items: end;
  margin-bottom: var(--sp-5);
}
.podium-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-4) var(--sp-2);
  text-align: center;
  /* Sans ça, min-width:auto (défaut des items de grille) + .who{white-space:nowrap}
     gonfle les pistes 1fr à la largeur du nom → débordement et 3e carte tronquée sur mobile. */
  min-width: 0;
}
.podium-item .medal { font-size: 1.6rem; }
.podium-item .who { font-weight: 800; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium-item .pts { color: var(--muted); font-size: .82rem; font-weight: 600; }
.podium-item.p1 { border-color: var(--gold); box-shadow: 0 10px 26px rgba(231, 181, 60, .28); padding-top: var(--sp-5); }
.podium-item.p2 { border-color: var(--silver); }
.podium-item.p3 { border-color: var(--bronze); }

/* ---- Classement général ---- */
.my-rank {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--r);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-4);
  color: var(--brand-700);
  font-weight: 600;
}
.ranking td:first-child { font-family: var(--display); font-weight: 700; color: var(--muted); width: 48px; }
.ranking tr.me { background: var(--brand-50); }
.ranking tr.me td { box-shadow: inset 0 0 0 9999px transparent; font-weight: 700; }
.ranking tr.me td:first-child { box-shadow: inset 3px 0 0 var(--brand); color: var(--brand-700); }
.pagination { display:flex; flex-wrap:wrap; gap:8px; margin-top:var(--sp-4); }
.pagination .page-current { font-weight:700; }
