/* ShapeMorph — classements : le bandeau du tournoi en direct (accueil) et la
   page /leaderboards. Chargé par les DEUX pages, d'où son fichier propre.

   Le bloc `.board*` vient de `sections.css`, où il ne servait qu'au faux
   classement de la section « Compete ». Il sert maintenant à afficher de vraies
   données, sur deux pages : il ne pouvait plus vivre dans la feuille de l'accueil. */

/* ---------- Leaderboard mock ---------- */
.board {
  width: min(430px, 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(14px);
  padding: 1.6rem;
}

.board-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-hud);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-2);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.board-row {
  display: grid;
  grid-template-columns: 2.2rem 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.78rem 0.4rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.07);
}

.board-row .rank { font-family: var(--font-hud); font-weight: 700; color: var(--text-3); }

.board-row.p1 .rank { color: var(--gold-soft); }
.board-row.p2 .rank { color: #cbd5e1; }
.board-row.p3 .rank { color: #d97706; }

.board-row .who { font-weight: 600; font-size: 0.95rem; }
.board-row .who small { display: block; font-weight: 400; font-size: 0.72rem; color: var(--text-3); }

.board-row .prize { font-family: var(--font-hud); font-weight: 700; color: var(--gold-soft); font-size: 0.95rem; }

.board-foot { padding-top: 1rem; font-size: 0.8rem; color: var(--text-3); text-align: center; }


/* ---------- Bandeau « tournoi en direct » (accueil, le dimanche) ----------
   Il est INSÉRÉ PAR LE SERVEUR DE DONNÉES, pas par le calendrier du visiteur :
   `hidden` tant que `donneesPubliques` n'a pas confirmé que le tournoi tourne.

   Seule l'opacité est animée, sur des couches promues — même règle que dans le
   jeu : un fond ou une ombre animés re-rastérisent le bandeau à chaque pas, ici
   au-dessus d'une scène WebGL qui occupe déjà le GPU. */
.live-panel {
  width: min(560px, 100%);
  margin: 2.2rem auto 0;
  padding: 1.3rem 1.5rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 158, 11, 0.45);
  background:
    radial-gradient(120% 140% at 8% 0%, rgba(245, 158, 11, 0.16), transparent 62%),
    rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  text-align: left;
}

.live-head {
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex-wrap: wrap;
  font-family: var(--font-hud);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  flex: none;
  animation: live-battement 1.1s ease-in-out infinite;
  will-change: opacity;
  transform: translateZ(0);
}

.live-label { color: var(--gold-soft); font-weight: 700; }
.live-meta { color: var(--text-3); margin-left: auto; letter-spacing: 0.1em; }

.live-leader {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-top: 0.7rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.live-crown { color: var(--gold-soft); display: inline-flex; flex: none; }
.live-crown svg { width: 20px; height: 20px; }

.live-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-score { margin-left: auto; color: var(--gold-soft); font-family: var(--font-hud); font-weight: 700; }
.live-empty { margin: 0.7rem 0 0; color: var(--text-2); font-size: 0.9rem; }

/* Le classement complet, sous le meneur : c'est la MÊME grille que partout,
   sans le cadre — il est déjà dans celui du bandeau. */
.live-board { width: 100%; border: 0; background: none; backdrop-filter: none; padding: 0.2rem 0 0; }

.live-more {
  display: inline-block;
  margin-top: 0.9rem;
  font-family: var(--font-hud);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
  text-decoration: none;
}

.live-more:hover { text-decoration: underline; }

@keyframes live-battement {
  0%, 100% { opacity: 0.15; }
  50%      { opacity: 1; }
}

/* « Le tournoi est en cours » est une information, pas une animation. */
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; opacity: 1; }
}

/* ---------- Page /leaderboards ---------- */
.board-block { margin-top: 3rem; }
.board-block .board { width: 100%; }

.board-block h2 { margin-bottom: 0.2em; }
.board-block .board-note { margin: 0 0 1rem; font-size: 0.85rem; color: var(--text-3); }

/* Repères de jeu : des CHIFFRES, alignés, lisibles d'un coup d'œil. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.5);
  padding: 1rem 1.1rem;
}

.stat-card b {
  display: block;
  font-family: var(--font-hud);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.stat-card span {
  display: block;
  margin-top: 0.25em;
  font-size: 0.78rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

#boards-state { color: var(--text-3); font-family: var(--font-hud); font-size: 0.85rem; }

/* La page de classements est plus large que les pages légales : un tableau à
   trois colonnes étouffe dans une colonne de lecture de 46rem. */
body.boards main { max-width: 60rem; }
