/* ============================================================
   Coupe à la maison — page Équipes
   ============================================================ */

.grp-block {
  margin-bottom: 34px;
  opacity: 1;
  animation: rise .5s ease both;
}

/* Bascule entre les deux vues */
.teams-view { display: none; }
.teams-view.is-active { display: block; animation: fade .35s ease; }

/* ---------- Vue classement mondial ---------- */
.rank-head, .rank-row {
  display: grid;
  grid-template-columns: 52px 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
.rank-head {
  color: var(--muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
}
.rank-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 8px;
  cursor: help;
  transition: transform .18s, border-color .18s;
}
.rank-row:hover, .rank-row:focus { transform: translateX(4px); border-color: var(--cyan); outline: none; }
.rank-pos {
  font-family: 'Anton', sans-serif;
  font-size: 1.3rem;
  color: var(--ink);
  text-align: center;
}
.rank-flag { display: flex; align-items: center; justify-content: center; }
.rank-flag img { max-width: 34px; max-height: 24px; object-fit: contain; }
.rank-name { font-weight: 800; }
.rank-meta { color: var(--muted); font-size: 0.8rem; text-align: right; }
/* Podium */
.rank-row.top1 { border-color: rgba(255,215,0,0.5); }
.rank-row.top1 .rank-pos { color: #ffd23d; }
.rank-row.top2 { border-color: rgba(200,200,210,0.5); }
.rank-row.top2 .rank-pos { color: #d2d6e0; }
.rank-row.top3 { border-color: rgba(205,127,50,0.5); }
.rank-row.top3 .rank-pos { color: #e08b3d; }

@media (max-width: 720px) {
  .rank-meta { display: none; }
  .rank-head, .rank-row { grid-template-columns: 44px 34px 1fr; }
}
.grp-title {
  font-family: 'Anton', sans-serif;
  text-transform: uppercase;
  font-size: 1.4rem;
  letter-spacing: 1px;
  color: var(--cyan);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.team-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
  cursor: help;
  transition: transform .2s, border-color .2s;
}
.team-card:hover, .team-card:focus {
  transform: translateY(-4px);
  border-color: var(--cyan);
  outline: none;
}
.team-card.qualified { border-color: rgba(198,255,61,0.35); }

.tc-flag { height: 40px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.tc-flag img { max-height: 38px; max-width: 56px; object-fit: contain; }

.tc-name {
  font-weight: 800;
  font-size: 1.02rem;
  margin-bottom: 8px;
}
.tc-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.tc-conf {
  display: inline-block;
  align-self: center;
  color: var(--cyan);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.66rem;
}
.tc-rank {
  align-self: center;
  font-weight: 800;
  color: var(--ink);
  font-size: 0.78rem;
}
.tc-rank sup { font-size: 0.6em; }
.tc-debut {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #07121f;
  background: var(--lime);
  border-radius: 100px;
  padding: 3px 8px;
}
.team-card { position: relative; }
.tc-stats {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.8rem;
  color: var(--muted);
}
.tc-pts { color: var(--lime); font-weight: 800; }

@media (max-width: 720px) {
  .nav-links > a:not(.btn) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .grp-block { animation: none !important; opacity: 1 !important; }
}

/* ---------- Palmarès (classement des parieurs) ---------- */
.rank-head.lb-grid, .rank-row.lb-grid {
  grid-template-columns: 52px 1fr 76px 76px 88px;
}
.lb-col { text-align: center; color: var(--muted); font-weight: 700; }
.lb-pts {
  font-family: 'Anton', sans-serif;
  font-size: 1.25rem;
  color: var(--cyan);
}
.rank-head .lb-pts { font-family: inherit; font-size: inherit; color: var(--muted); }
.rank-row.top1 .lb-pts { color: #ffd23d; }
@media (max-width: 720px) {
  .rank-head.lb-grid, .rank-row.lb-grid { grid-template-columns: 44px 1fr 60px 72px; }
  .lb-grid .lb-col:first-of-type { display: none; } /* masque "Pronos" sur mobile */
}
