/**
 * yc-leaderboard.css — ecran de classement PARTAGE (podium top 3 + liste +
 * ligne VOUS + pagination), themable via --game-* (cf. yc-screens.css pour les
 * variables ; un jeu qui utilise ce fichier doit aussi lier yc-screens.css).
 * Convention SPA : #view-leaderboard. Extrait de cosmocat (2026-06-27).
 */

/* ============================================================
   Écran classement — design "arcade classement" (Claude Design 2026-04-24)
   Hero avec chips partenaire/cause, titre gradient, podium top 3 avec
   cartouches Game Boy (avatars pixel cat or/argent/bronze), liste rangs
   4+ avec avatars initiales, ligne VOUS highlight rose, footer stats +
   actions. Classes préfixées ycs-lb-.
   ============================================================ */

/* Layout posé directement sur l'id : permet l'override anti-flash
   `html[data-route="leaderboard"] #view-leaderboard[hidden]` de toucher
   uniquement le display sans avoir à dupliquer toutes les règles flex. */
#view-leaderboard {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--yc-sp-6) var(--yc-sp-4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-x: hidden;
}
#view-leaderboard[hidden] { display: none; }

/* Anti-flash deep-link leaderboard (PARTAGÉ, tous les jeux avec classement).
   yc-early-route.js pose html[data-route="leaderboard"] AVANT le parse du body
   (cf. yc-views.js) ; on masque view-home et on dévoile view-leaderboard pour
   que la 1re frame soit déjà la bonne vue, sans passage par l'intro pendant que
   le JS du jeu (deferred) initialise. Spécificité > règles [hidden] ci-dessus.
   One-shot : YCViews.show() retire data-route dès qu'il pilote les vues. */
html[data-route="leaderboard"] #view-home { display: none !important; }
html[data-route="leaderboard"] #view-leaderboard[hidden] { display: flex !important; }

/* Carte centrale */
.ycs-lb-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 720px;
  background: var(--game-card-grad);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 40px 100px rgba(0,0,0,0.55),
    0 0 60px var(--game-card-glow),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Hero : bannière étoilée + chips partenaire/cause + titre */
.ycs-lb-hero {
  position: relative;
  padding: 26px 28px 22px;
  background: var(--game-lb-hero-grad);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
}
.ycs-lb-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--game-lb-hero-glow);
  pointer-events: none;
}
.ycs-lb-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20% 30%, #fff 1px, transparent 1px),
    radial-gradient(1px 1px at 60% 20%, #fff 1px, transparent 1px),
    radial-gradient(1.5px 1.5px at 80% 60%, #fff 1px, transparent 1px),
    radial-gradient(1px 1px at 40% 80%, #fff 1px, transparent 1px),
    radial-gradient(1px 1px at 90% 40%, #fff 1px, transparent 1px),
    radial-gradient(1px 1px at 10% 50%, #fff 1px, transparent 1px);
  background-size: 300px 200px;
  opacity: 0.7;
  pointer-events: none;
}

.ycs-lb-head-row {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-top: 20px; margin-bottom: 0; flex-wrap: wrap;
}
/* Chip partenaire du leaderboard : style .yc-partner --sm
   (design-system.css), plus aucune règle locale nécessaire. */
.ycs-lb-cause-chip {
  /* Padding asymétrique (7 haut / 5 bas) + line-height: 1 pour compenser
     l'absence de descendeurs en uppercase : le texte est optiquement centré. */
  display: inline-flex;
  align-items: center;
  padding: 7px 12px 5px;
  line-height: 1;
  background: rgba(255, 77, 204, 0.12);
  border: 1px solid rgba(255, 77, 204, 0.35);
  border-radius: 999px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--game-accent);
  font-weight: 700;
}

.ycs-lb-meta {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.ycs-lb-tag {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yc-violet-light, var(--game-light));
  font-weight: 700;
}
.ycs-lb-sep { width: 4px; height: 4px; background: rgba(255,255,255,0.25); border-radius: 50%; }
.ycs-lb-live {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  color: var(--game-neon);
  letter-spacing: 0.08em;
}
.ycs-lb-live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--game-neon); box-shadow: 0 0 8px var(--game-neon);
  animation: ycs-lb-blink 1.6s ease-in-out infinite;
}
@keyframes ycs-lb-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.ycs-lb-title {
  position: relative; z-index: 2;
  font-family: var(--yc-font-display, 'Outfit', 'Inter', sans-serif);
  font-size: 44px; font-weight: 900;
  line-height: 0.95; letter-spacing: -0.03em;
  margin: 4px 0 6px;
  background: var(--game-title-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ycs-lb-subtitle {
  position: relative; z-index: 2;
  font-size: 14px; color: rgba(255,255,255,0.8); margin: 0;
}

/* Empty state */
.ycs-lb-empty {
  padding: 28px 28px 32px;
  text-align: center;
  color: rgba(255,255,255,0.72);
  font-size: 14px;
}
.ycs-lb-empty p { margin: 0; }

/* Podium */
.ycs-lb-podium-wrap {
  position: relative; z-index: 2;
  padding: 8px 20px 28px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 100%);
}
.ycs-lb-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 12px;
  align-items: end;
  margin-top: 20px;
}

/* Cartouche podium (Game Boy style) */
.ycs-lb-pod {
  position: relative;
  border-radius: 18px;
  padding: 14px 12px 16px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--game-pod-grad);
  text-align: center;
  transition: transform 200ms ease;
}
.ycs-lb-pod[hidden] { display: none; }
.ycs-lb-pod:hover { transform: translateY(-4px); }

/* grid-column ancre chaque pod à sa colonne indépendamment de l'ordre DOM
   (HTML : 2, 1, 3). Nécessaire pour que si un pod est caché (ex. moins de
   3 entrées), les autres gardent leur position visuelle au lieu de se
   décaler dans les colonnes laissées vides. */
.ycs-lb-pod--2 { grid-column: 1 / 2; }
.ycs-lb-pod--1 { grid-column: 2 / 3; }
.ycs-lb-pod--3 { grid-column: 3 / 4; }

.ycs-lb-pod--1 {
  background: linear-gradient(180deg, rgba(255, 208, 105, 0.18) 0%, var(--game-pod-base) 100%);
  border-color: rgba(255, 208, 105, 0.45);
  box-shadow: 0 0 30px rgba(255, 208, 105, 0.25), inset 0 1px 0 rgba(255,255,255,0.15);
  padding-top: 20px;
  padding-bottom: 20px;
  transform: translateY(-8px);
}
.ycs-lb-pod--2 {
  background: linear-gradient(180deg, rgba(212, 226, 255, 0.14) 0%, var(--game-pod-base) 100%);
  border-color: rgba(212, 226, 255, 0.35);
  box-shadow: 0 0 20px rgba(212, 226, 255, 0.18);
}
.ycs-lb-pod--3 {
  background: linear-gradient(180deg, rgba(212, 122, 82, 0.16) 0%, var(--game-pod-base) 100%);
  border-color: rgba(212, 122, 82, 0.4);
  box-shadow: 0 0 20px rgba(212, 122, 82, 0.2);
}

/* "VOUS" sur le podium : surcouche rose néon pour identifier le joueur
   courant quand il est rang 1-3, cohérence visuelle avec .ycs-lb-row--me
   sans masquer l'or/argent/bronze positionnel (ajouté par-dessus). */
.ycs-lb-pod--me {
  outline: 2px solid rgba(255, 77, 204, 0.55);
  outline-offset: -1px;
}
.ycs-lb-pod--me .ycs-lb-pod-name {
  color: var(--game-accent);
}

/* Médaille / couronne du 1er */
.ycs-lb-pod-medal {
  width: 40px; height: 40px;
  margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--yc-font-display, 'Outfit', 'Inter', sans-serif);
  font-weight: 900; font-size: 18px;
  border-radius: 50%;
  color: #0a0418;
}
.ycs-lb-pod--1 .ycs-lb-pod-medal {
  background: linear-gradient(135deg, #fff4c4, #ffd069);
  box-shadow: 0 0 20px rgba(255, 208, 105, 0.6);
}
.ycs-lb-pod--2 .ycs-lb-pod-medal {
  background: linear-gradient(135deg, #fff, #d4e2ff);
  box-shadow: 0 0 14px rgba(212, 226, 255, 0.5);
}
.ycs-lb-pod--3 .ycs-lb-pod-medal {
  background: linear-gradient(135deg, #ffb88a, #d47a52);
  box-shadow: 0 0 14px rgba(212, 122, 82, 0.5);
}
.ycs-lb-pod-crown { width: 28px; height: 28px; }

/* Avatar (sprite chat pixel art) */
.ycs-lb-pod-avatar {
  width: 72px; height: 72px;
  margin: 6px auto 8px;
  border-radius: 18px;
  background: var(--game-avatar-grad);
  border: 2px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.ycs-lb-pod-avatar svg { width: 64px; height: 64px; }
.ycs-lb-pod--1 .ycs-lb-pod-avatar {
  border-color: #ffd069;
  box-shadow: 0 0 18px rgba(255, 208, 105, 0.4), inset 0 0 12px rgba(255, 208, 105, 0.15);
}
.ycs-lb-pod--2 .ycs-lb-pod-avatar { border-color: rgba(212, 226, 255, 0.5); }
.ycs-lb-pod--3 .ycs-lb-pod-avatar { border-color: rgba(212, 122, 82, 0.5); }

.ycs-lb-pod-name {
  font-family: var(--yc-font-display, 'Outfit', 'Inter', sans-serif);
  font-weight: 800; font-size: 16px;
  margin: 2px 0;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ycs-lb-pod-score {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  margin-top: 8px;
}
.ycs-lb-pod--1 .ycs-lb-pod-score { color: #ffd069; }
.ycs-lb-pod--2 .ycs-lb-pod-score { color: #d4e2ff; }
.ycs-lb-pod--3 .ycs-lb-pod-score { color: #ffb88a; }
.ycs-lb-pod-score-lab {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 9px;
  color: rgba(255,255,255,0.62);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 4px;
}
.ycs-lb-pod-meals {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 10px;
  padding: 4px 10px;
  background: rgba(255, 184, 77, 0.12);
  border: 1px solid rgba(255, 184, 77, 0.3);
  border-radius: 999px;
  font-size: 10px;
  color: var(--game-gold);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-weight: 700;
}

/* Liste rangs 4+ */
.ycs-lb-list-wrap { padding: 18px 28px 8px; }
.ycs-lb-list-head {
  display: grid;
  grid-template-columns: 40px 1fr 90px 100px;
  gap: 14px;
  padding: 8px 14px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ycs-lb-list-head .ycs-lb-col-meals { text-align: right; }
.ycs-lb-list-head .ycs-lb-col-score { text-align: right; }

.ycs-lb-list { list-style: none; padding: 8px 0 0; margin: 0; }
.ycs-lb-row {
  display: grid;
  grid-template-columns: 40px 1fr 90px 100px;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  transition: background 160ms ease, transform 160ms ease;
}
.ycs-lb-row + .ycs-lb-row { margin-top: 4px; }
.ycs-lb-row:hover {
  background: rgba(124, 77, 255, 0.08);
  transform: translateX(2px);
}
.ycs-lb-row--me {
  background: linear-gradient(90deg, rgba(255, 77, 204, 0.12), rgba(124, 77, 255, 0.08));
  border: 1px solid rgba(255, 77, 204, 0.3);
  box-shadow: 0 0 14px rgba(255, 77, 204, 0.15);
}
.ycs-lb-row--me:hover { background: linear-gradient(90deg, rgba(255, 77, 204, 0.18), rgba(124, 77, 255, 0.12)); }

/* Séparateur visuel entre la dernière ligne visible et la ligne "VOUS"
   appended quand le joueur courant est hors de la page visible (ex. rang 24
   alors qu'on n'affiche que 1-10). Indique au joueur qu'il y a un "saut"
   de rangs. */
.ycs-lb-gap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0 4px;
  gap: 6px;
  color: rgba(255,255,255,0.35);
  font-size: 14px;
  letter-spacing: 0.3em;
  pointer-events: none;
}

/* Bouton "Voir plus" — pagination client par lots de 10. Ghost full-width
   sous la liste, apparaît uniquement s'il reste des entrées à afficher. */
.ycs-lb-see-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: rgba(255,255,255,0.85);
  font-family: var(--yc-font-sans, 'Inter', system-ui, sans-serif);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.ycs-lb-see-more[hidden] { display: none; }
.ycs-lb-see-more:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(179,136,255,0.4);
  transform: translateY(-1px);
}

.ycs-lb-rank {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.62);
  text-align: center;
}

.ycs-lb-player {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.ycs-lb-player-avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--game-avatar-grad);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--yc-font-display, 'Outfit', 'Inter', sans-serif);
  font-weight: 800; font-size: 14px;
  color: var(--yc-violet-light, var(--game-light));
  flex-shrink: 0;
  overflow: hidden;
}
.ycs-lb-row--me .ycs-lb-player-avatar {
  background: linear-gradient(135deg, var(--game-accent), var(--game-primary));
  color: #fff;
  border-color: rgba(255, 77, 204, 0.5);
}
/* Cœur vectoriel (LB_IC_HEART) : centrage parfait via flex, indépendant de la
   font système. Le SVG hérite de la couleur du texte de l'avatar (#fff). */
.ycs-lb-me-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ycs-lb-me-heart svg { display: block; }
.ycs-lb-player-info { min-width: 0; }
.ycs-lb-player-name {
  font-weight: 700; font-size: 14px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.ycs-lb-badge-you {
  padding: 1px 6px;
  background: rgba(255, 77, 204, 0.15);
  border: 1px solid rgba(255, 77, 204, 0.4);
  border-radius: 4px;
  color: var(--game-accent);
  font-weight: 700; font-size: 9px;
  letter-spacing: 0.1em;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.ycs-lb-meals-cell {
  text-align: right;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--game-gold);
  font-weight: 700;
  white-space: nowrap;
}
.ycs-lb-meals-cell .ycs-lb-meals-lab {
  color: rgba(255,255,255,0.62);
  font-weight: 500;
  margin-left: 2px;
  font-size: 10px;
}

.ycs-lb-score-cell {
  text-align: right;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.ycs-lb-row--me .ycs-lb-score-cell { color: var(--game-accent); }

/* Stats leaderboard : composant partagé .yc-stats (design-system.css).
   Override ciblé pour passer au-dessus des pseudo-éléments décoratifs
   du hero (::before radials, ::after étoiles). */
.ycs-lb-hero .yc-stats {
  position: relative;
  z-index: 2;
}

/* Footer : uniquement les actions maintenant que les stats sont dans le hero.
   justify-content: center → le trio nom-du-jeu / Partager / Rejouer est
   centré horizontalement (plus équilibré qu'aligné à droite). */
.ycs-lb-foot {
  padding: 14px 28px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.25);
  display: flex; justify-content: center; align-items: center;
  gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: rgba(255,255,255,0.62);
}

.ycs-lb-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ycs-lb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700; font-size: 13px;
  font-family: var(--yc-font-sans, 'Inter', system-ui, sans-serif);
  cursor: pointer; border: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  color: #fff; text-decoration: none; white-space: nowrap;
}
.ycs-lb-btn:hover { transform: translateY(-2px); }
.ycs-lb-btn--primary {
  background: linear-gradient(135deg, var(--game-accent), var(--game-primary));
  box-shadow:
    0 0 24px rgba(255, 77, 204, 0.4),
    0 8px 20px rgba(124, 77, 255, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.25);
  font-weight: 800;
  position: relative; overflow: hidden;
}
.ycs-lb-btn--primary::before {
  content: '';
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: ycs-lb-shine 3s ease-in-out infinite;
}
@keyframes ycs-lb-shine {
  0%, 30% { left: -100%; }
  60%, 100% { left: 200%; }
}
.ycs-lb-btn--ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 600;
}
.ycs-lb-btn--ghost:hover { background: rgba(255,255,255,0.09); border-color: var(--yc-violet-light, var(--game-light)); }

/* Responsive mobile : podium en layout horizontal compact (au lieu d'une
   pile de cartes qui prenaient trop de hauteur). Chaque pod devient une
   rangée avec médaille + avatar + pseudo à gauche, score + label + badge
   repas à droite (alignés via grid-template-areas). */
@media (max-width: 640px) {
  .ycs-lb-title { font-size: 34px; }
  .ycs-lb-podium {
    grid-template-columns: 1fr;
    gap: 8px;
    /* max-width + margin auto → podium centré sur la largeur de l'écran,
       chaque carte ne s'étire plus sur toute la largeur mobile (plus lisible
       sur grands mobiles et tablettes portrait). */
    max-width: 315px;
    margin: 12px auto 0;
  }
  .ycs-lb-pod--1, .ycs-lb-pod--2, .ycs-lb-pod--3 { grid-column: 1 / 2; }
  .ycs-lb-pod--1 { transform: none; order: -1; }
  .ycs-lb-pod--2 { order: 0; }
  .ycs-lb-pod--3 { order: 1; }

  .ycs-lb-pod {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas:
      "medal avatar name  score"
      "medal avatar name  lab"
      "medal avatar name  meals";
    column-gap: 10px;
    row-gap: 0;
    align-items: center;
    text-align: left;
    padding: 10px 12px;
  }
  .ycs-lb-pod--1 { padding: 12px; }
  .ycs-lb-pod-medal {
    grid-area: medal;
    width: 32px; height: 32px;
    margin: 0;
    font-size: 14px;
    align-self: center;
  }
  .ycs-lb-pod-crown { width: 22px; height: 22px; }
  .ycs-lb-pod-avatar {
    grid-area: avatar;
    width: 52px; height: 52px;
    margin: 0;
    border-radius: 12px;
  }
  .ycs-lb-pod-avatar svg { width: 46px; height: 46px; }
  .ycs-lb-pod-name {
    grid-area: name;
    margin: 0;
    font-size: 15px;
    align-self: center;
    min-width: 0;
  }
  .ycs-lb-pod-score {
    grid-area: score;
    margin: 0;
    font-size: 20px;
    line-height: 1;
    text-align: right;
    align-self: end;
  }
  .ycs-lb-pod-score-lab {
    grid-area: lab;
    margin: 2px 0 0;
    text-align: right;
    align-self: start;
  }
  .ycs-lb-pod-meals {
    grid-area: meals;
    justify-self: end;
    margin: 4px 0 0;
    padding: 3px 8px;
    font-size: 9px;
  }

  .ycs-lb-list-head, .ycs-lb-row { grid-template-columns: 32px 1fr 70px 80px; gap: 10px; padding: 10px 8px; }
  .ycs-lb-list-wrap { padding: 14px 16px 4px; }
  .ycs-lb-hero { padding: 20px 20px 16px; }
  .ycs-lb-foot { padding: 14px 16px 16px; flex-direction: column; align-items: stretch; }
  .ycs-lb-actions { justify-content: space-between; }
  .ycs-lb-actions .ycs-lb-btn { flex: 1; padding: 12px 10px; font-size: 12px; }
  .ycs-lb-head-row { gap: 8px; }
  .ycs-lb-partner { font-size: 11px; padding: 6px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .ycs-lb-live::before { animation: none; }
  .ycs-lb-btn--primary::before { display: none; }
  .ycs-lb-row:hover { transform: none; }
  .ycs-lb-pod:hover { transform: none; }
  .ycs-lb-pod--1 { transform: translateY(-8px); }
}

/* ============================================================
   Animations d'apparition du leaderboard — déclenchées par .is-fresh
   posée sur #view-leaderboard à chaque ouverture / rebuild. La carte
   slide-up, le podium révèle 3→2→1 (rang 1 finit en dernier, effet
   "couronnement"), les rangs 4+ cascadent depuis la droite. Cohérent
   avec le count-up des scores (animateScore côté game.js).
   ============================================================ */
@keyframes ycs-lb-card-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ycs-lb-pod-rise {
  from { opacity: 0; transform: translateY(36px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* Pod 1 garde son translateY(-8px) à l'arrivée (surélevé). */
@keyframes ycs-lb-pod1-rise {
  from { opacity: 0; transform: translateY(28px) scale(0.92); }
  to   { opacity: 1; transform: translateY(-8px) scale(1); }
}
@keyframes ycs-lb-row-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ycs-lb-soft-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

#view-leaderboard.is-fresh .ycs-lb-card {
  animation: ycs-lb-card-rise 540ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
#view-leaderboard.is-fresh .ycs-lb-pod {
  animation: ycs-lb-pod-rise 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
#view-leaderboard.is-fresh .ycs-lb-pod--3 { animation-delay: 240ms; }
#view-leaderboard.is-fresh .ycs-lb-pod--2 { animation-delay: 360ms; }
#view-leaderboard.is-fresh .ycs-lb-pod--1 {
  animation-name: ycs-lb-pod1-rise;
  animation-delay: 480ms;
  animation-duration: 720ms;
}
#view-leaderboard.is-fresh .ycs-lb-list-head {
  animation: ycs-lb-soft-in 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 380ms;
}
#view-leaderboard.is-fresh .ycs-lb-row {
  animation: ycs-lb-row-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
#view-leaderboard.is-fresh .ycs-lb-row:nth-child(1)  { animation-delay: 440ms; }
#view-leaderboard.is-fresh .ycs-lb-row:nth-child(2)  { animation-delay: 485ms; }
#view-leaderboard.is-fresh .ycs-lb-row:nth-child(3)  { animation-delay: 530ms; }
#view-leaderboard.is-fresh .ycs-lb-row:nth-child(4)  { animation-delay: 575ms; }
#view-leaderboard.is-fresh .ycs-lb-row:nth-child(5)  { animation-delay: 620ms; }
#view-leaderboard.is-fresh .ycs-lb-row:nth-child(6)  { animation-delay: 665ms; }
#view-leaderboard.is-fresh .ycs-lb-row:nth-child(7)  { animation-delay: 710ms; }
#view-leaderboard.is-fresh .ycs-lb-row:nth-child(n+8) { animation-delay: 755ms; }
#view-leaderboard.is-fresh .ycs-lb-foot {
  animation: ycs-lb-soft-in 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 560ms;
}
#view-leaderboard.is-fresh .ycs-lb-empty {
  animation: ycs-lb-soft-in 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 240ms;
}

@media (prefers-reduced-motion: reduce) {
  #view-leaderboard.is-fresh .ycs-lb-card,
  #view-leaderboard.is-fresh .ycs-lb-pod,
  #view-leaderboard.is-fresh .ycs-lb-pod--1,
  #view-leaderboard.is-fresh .ycs-lb-list-head,
  #view-leaderboard.is-fresh .ycs-lb-row,
  #view-leaderboard.is-fresh .ycs-lb-foot,
  #view-leaderboard.is-fresh .ycs-lb-empty {
    animation: none;
  }
}
