[hidden]{display:none !important}
/* ════════════════════════════════════════════════════════════════
   Tableau de bord — Styles spécifiques (v6 — épuré + skins VIP)
   Design inspiré du mockup envoyé : liste épurée, pas de carte champion,
   une ligne par joueur avec rang + nom + breakdown + score.
   Touche personnelle : palette orange du site (pas de bleu), accent
   doré sur le #1, hover orange subtil, flèche › au survol.
   v6 : skins VIP (prism, cyberpunk, gold…) sur les pseudos.
   ════════════════════════════════════════════════════════════════ */

/* v5.26 — zéro décalage horizontal : la gouttière de la scrollbar est
 * RÉSERVÉE en permanence (la page dashboard est toujours plus haute que
 * l'écran, donc la gouttière serait de toute façon occupée). Conséquence :
 * la levée du rideau (dash-booting) et le swap aperçu→live ne peuvent plus
 * décaler TOUTE la page d'un aller-retour de scrollbar — le leaderboard
 * n'est plus jamais « bougé » horizontalement. */
html { scrollbar-gutter: stable; }

.dash-view {
  padding: 24px;
  max-width: none;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

/* ── Intro (description au-dessus des classements) ── */
.dash-intro {
  margin-bottom: 32px;
  text-align: center;
  position: relative;
}
.dash-intro-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto;
}

/* ── Bouton aide (point d'interrogation rond) ── */
.dash-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  margin-top: 12px;
  transition: all 0.2s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
  vertical-align: middle;
}
.dash-help-btn:hover,
.dash-help-btn.active {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-pale);
}

/* ── Popover barème ── */
.dash-help-popover {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 280px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)),
              transform 0.2s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
  z-index: 100;
  margin-top: 8px;
}
.dash-help-popover.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dash-help-popover-header {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 10px;
}
.dash-help-popover-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}
.dash-help-popover-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.dash-help-popover-list li:last-child {
  border-bottom: none;
}
.dash-help-mode {
  color: var(--text);
  font-weight: 500;
}
.dash-help-pts {
  color: var(--orange);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dash-help-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* ── Loading / Empty / Error ── */
.dash-loading,
.dash-error,
.dash-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  gap: 12px;
  color: var(--fg-muted, #6B7280);
  text-align: center;
}
.dash-empty-state h3,
.dash-error h3 { color: var(--fg, #111827); margin: 0; font-size: 18px; }
.dash-empty-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--orange-pale, #FFF7ED);
  color: var(--orange);
  display: flex; align-items: center; justify-content: center;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--bg-muted, #F3F4F6);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: dash-spin 0.8s linear infinite;
}
@keyframes dash-spin { to { transform: rotate(360deg); } }

/* ═══ Fallback tag ═══ */
.dash-fallback-tag {
  display: block;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--orange-pale, #FFF7ED);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 10px;
  color: var(--orange-deep);
  font-size: 13px;
  font-weight: 600;
}

/* ═══ Progress bar (chargement live 0-100%) ═══ */
.dash-progress {
  margin-bottom: 16px;
  padding: 12px 14px;
  background: var(--orange-pale, #FFF7ED);
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 10px;
}
.dash-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dash-progress-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--orange-deep);
  font-size: 13px;
  font-weight: 600;
}
.dash-progress-label svg,
.dash-progress-label i {
  width: 14px;
  height: 14px;
  color: var(--orange);
  display: inline-flex;
}
.dash-progress-pct {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange-deep);
  font-variant-numeric: tabular-nums;
}
.dash-progress-track {
  height: 6px;
  background: rgba(249, 115, 22, 0.15);
  border-radius: 999px;
  overflow: hidden;
}
.dash-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--orange-deep));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* ═══ Controls row (toggle + scoring hint) ═══ */
.dash-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.dash-scoring-inline {
  font-size: 12px;
  color: var(--fg-muted, #6B7280);
  font-family: var(--mono, monospace);
  letter-spacing: 0.01em;
}

/* ── Toggle (segmented pill, orange on active) ── */
.dash-toggle {
  display: inline-flex;
  background: var(--bg-muted, #F3F4F6);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.dash-toggle-btn {
  padding: 8px 18px;
  border: none;
  background: transparent;
  color: var(--fg-muted, #6B7280);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out), background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
  white-space: nowrap;
}
.dash-toggle-btn:hover { color: var(--fg, #111827); }
.dash-toggle-btn.active {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 122, 0, 0.25);
}

/* ═══ Two-column grid ═══ */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

/* ═══ Panel (une colonne = un classement) ═══ */
.dash-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dash-panel-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--orange);
  position: relative;
}
.dash-panel-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 40px;
  height: 1px;
  background: var(--orange-deep);
}
.dash-panel-title {
  font-family: var(--mono, "JetBrains Mono", monospace);
  font-size: 15px;
  font-weight: 800;
  color: var(--fg, #111827);
  margin: 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.dash-panel-sub {
  font-size: 12px;
  color: var(--fg-muted, #6B7280);
  font-weight: 500;
}

/* ═══ Ranking list — scrollable, épuré ═══ */
.dash-list {
  display: flex;
  flex-direction: column;
  max-height: 640px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  /* Fondu en bas : signale que la liste continue (scroll) au lieu
     de ressembler à des lignes coupées net */
  mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent 100%);
  scrollbar-color: #E5E7EB transparent;
  -webkit-overflow-scrolling: touch;
}
.dash-list::-webkit-scrollbar { width: 6px; }
.dash-list::-webkit-scrollbar-thumb {
  background: #E5E7EB;
  border-radius: 3px;
}
.dash-list::-webkit-scrollbar-thumb:hover { background: var(--orange-light); }

.dash-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 10px 10px;
  border-bottom: 1px solid #F5F5F5;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  text-decoration: none;
  color: inherit;
  position: relative;
  animation: dash-row-in 0.3s var(--ease-out) backwards;
}
.dash-row:last-child { border-bottom: none; }
.dash-row:hover {
  background: var(--orange-pale);
}
.dash-row:active {
  transform: scale(0.998);
}
.dash-row:nth-child(1) { animation-delay: 0.02s; }
.dash-row:nth-child(2) { animation-delay: 0.04s; }
.dash-row:nth-child(3) { animation-delay: 0.06s; }
.dash-row:nth-child(4) { animation-delay: 0.08s; }
.dash-row:nth-child(5) { animation-delay: 0.10s; }
@keyframes dash-row-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ v5.24 — swap aperçu→live sans « reset » ═══
 * Au refresh, l'aperçu statique (déjà décoré : pseudos hub + badge vérifié +
 * skins + bannières) est remplacé par le rendu live IDENTIQUE → le passage
 * ne doit RIEN montrer. .no-anim neutralise les animations d'entrée des
 * lignes et les transitions reveal des panneaux pour TOUT re-rendu qui suit
 * le premier (swap, late flush, progressive live, recherche, pagination). */
.dash-view.no-anim .dash-row { animation: none !important; }
.dash-view.no-anim .dash-panel,
.dash-view.no-anim .dash-panel-header,
.dash-view.no-anim .reveal {
  transition: none !important;
  animation: none !important;
}
/* Panneaux déjà visibles dès le swap (pas de fondu reveal rejoué) */
.dash-view.no-anim .dash-panel.reveal,
.dash-view.no-anim .dash-panel-header.reveal { opacity: 1; transform: none; }

/* ═══ v5.25 — gate « tout d'un coup » ═══
 * Le dashboard démarre INVISIBLE (classe .dash-booting posée dans le HTML) :
 * tant que les données + cosmétiques (pseudos hub, badge vérifié, skins,
 * bannières) ne sont pas prêts, RIEN n'est montré — donc aucune cascade
 * « pseudos puis badges puis skins puis bannières ». À la levée du rideau
 * (dashboard.js au 1ᵉʳ rendu complet, filets de sécurité 3 s JS / 3,5 s
 * inline / <noscript>) : UNE peinture complète, sans transition (pas de
 * fondu — l'apparition doit être instantanée) et sans décalage de layout
 * (opacity, PAS display:none → la hauteur de page ne saute pas). */
#dashboard-view.dash-booting {
  opacity: 0;
  pointer-events: none;
}

/* ═══ v5.37 — WARM BOOT + levée INSTANTANÉE (anti « cut blanc ») ═══
 * Repli terrain : à chaque refresh, le gate v5.25 rendait le classement
 * pré-généré invisible pendant 1-3 s → « leaderboard → écran blanc →
 * leaderboard » (fond du site = --bg #FFFFFF, le « cut blanc » était
 * littéral), puis l'aperçu revenait avec un fondu fantôme de 0,4 s posé
 * par animations.js (règle générique `section { reveal-premium }` +
 * IntersectionObserver .is-visible → transition opacity/translateY).
 *
 * 1) WARM BOOT — quand le cache cosmétiques est frais, dashboard.html pose
 *    `tfh-warm-boot` sur <html> AVANT la première peinture (script inline
 *    du <head>) : le gate est court-circuité, l'aperçu (déjà décoré au
 *    1ᵉʳ tick JS depuis le même cache) est affiché DÈS LA PREMIÈRE FRAME
 *    et ne disparaît plus jamais — le swap vers le live reste invisible
 *    (déjà .no-anim depuis v5.24). Première visite = chemin v5.25 inchangé.
 * 2) La vue dashboard n'hérite PLUS du reveal premium : le fondu 0,4 s
 *    (opacité 0,59→0,96→1 constaté) est supprimé → la levée du rideau
 *    (chemin cold) est elle aussi un affichage INSTANTANÉ, comme voulu
 *    par le v5.25 (« pas de fondu — l'apparition doit être instantanée »). */
html.tfh-warm-boot #dashboard-view.dash-booting {
  opacity: 1 !important;
  pointer-events: auto !important;
}
/* Warm boot uniquement : le reveal premium ne doit pas non plus masquer la
 * vue (opacity 0 tant que l'IntersectionObserver n'a pas posé .is-visible). */
html.tfh-warm-boot #dashboard-view.reveal-premium,
html.tfh-warm-boot #dashboard-view.reveal-fade,
html.tfh-warm-boot #dashboard-view.reveal-scale-premium,
html.tfh-warm-boot #dashboard-view.reveal-slide-left,
html.tfh-warm-boot #dashboard-view.reveal-slide-right {
  opacity: 1 !important;
}
/* TOUS les boots : le fondu/translate 0,4 s du reveal premium est interdit
 * sur la vue dashboard — la levée du rideau (chemin cold, rare) reste
 * INSTANTANÉE (0 → 1 sans transition dès que le rideau est levé). */
#dashboard-view.reveal-premium,
#dashboard-view.reveal-fade,
#dashboard-view.reveal-scale-premium,
#dashboard-view.reveal-slide-left,
#dashboard-view.reveal-slide-right {
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* L'aperçu statique est une PHOTO du classement : ses lignes ne rejouent
 * PAS l'animation dash-row-in (décalages 0,02 s→0,10 s = cascade visible à
 * chaque refresh avant même que le JS ne décore) et ses panneaux ne font
 * pas de fondu reveal (animations.js leur ajoute .reveal au boot). */
.dash-static-preview .dash-row { animation: none !important; }
.dash-static-preview .dash-panel,
.dash-static-preview .dash-panel-header,
.dash-static-preview .reveal {
  transition: none !important;
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

/* ── Podium (rangs 1-3) : accent gauche orange ── */
.dash-row-podium {
  padding-left: 14px;
}
.dash-row-podium::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--orange);
  opacity: 0.5;
  transition: opacity var(--dur) var(--ease-out);
}
.dash-row-podium:hover::before { opacity: 1; }

/* ── Rang #1 : subtil fond doré ── */
.dash-row-gold {
  background: linear-gradient(90deg, rgba(255, 200, 0, 0.06) 0%, transparent 60%);
}
.dash-row-gold::before {
  background: linear-gradient(180deg, var(--gold), var(--orange));
  opacity: 0.7;
}
.dash-row-gold:hover {
  background: linear-gradient(90deg, rgba(255, 200, 0, 0.12) 0%, var(--orange-pale) 60%);
}
.dash-row-gold:hover::before { opacity: 1; }

/* Rank slot (trophy for 1-3, square badge for 4+) */
.dash-rank-slot {
  width: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-rank-trophy {
  font-size: 26px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}
.dash-rank-trophy svg,
.dash-rank-trophy i {
  width: 26px;
  height: 26px;
  display: inline-flex;
}
/* Couleurs par rang : or / argent / bronze */
.dash-rank-1 { color: var(--gold); }       /* or */
.dash-rank-2 { color: var(--silver); }     /* argent */
.dash-rank-3 { color: var(--bronze); }     /* bronze */
.dash-rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--bg-subtle);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.dash-row:hover .dash-rank-badge {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* Player name + breakdown */
.dash-player {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dash-player-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg, #111827);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  transition: color var(--dur) var(--ease-out);
}
.dash-row:hover .dash-player-name {
  color: var(--orange-deep);
}

/* Mini breakdown des wins : "29 ⚔ · 9 👥" en texte discret */
.dash-player-breakdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.dash-player-breakdown i,
.dash-player-breakdown svg {
  width: 11px;
  height: 11px;
  opacity: 0.7;
  display: inline-flex;
  vertical-align: -1px;
  margin-left: 2px;
}
.dash-bd-sep {
  color: var(--border-strong);
  margin: 0 1px;
}

/* Score (right-aligned) */
.dash-score {
  flex-shrink: 0;
  text-align: right;
  min-width: 80px;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 3px;
}
.dash-score-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--fg, #111827);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.dash-row-podium .dash-score-val {
  color: var(--orange-deep);
}
.dash-row-gold .dash-score-val {
  color: var(--orange-deep);
}
.dash-score-suffix {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: lowercase;
}

/* Flèche › au survol (touche personnelle) */
.dash-row-arrow {
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--orange);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  width: 14px;
  text-align: center;
}
.dash-row:hover .dash-row-arrow {
  opacity: 1;
  transform: translateX(0);
}

.dash-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--fg-muted, #6B7280);
  font-size: 14px;
}

/* Scoring info (footer of view) */
.dash-scoring-info {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 24px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--orange-pale, #FFF7ED);
  border: 1px solid rgba(249, 115, 22, 0.2);
  color: #4B5563;
  font-size: 12px;
  line-height: 1.5;
}
.dash-scoring-info strong { color: var(--orange); font-weight: 700; }
.dash-scoring-info svg { flex-shrink: 0; margin-top: 2px; color: var(--orange); }

/* ═══ Sticky footer ═══ */
.dash-footer {
  background: var(--bg-subtle, #FAFAFA);
  border-top: 1px solid var(--border, #F3F4F6);
  padding: 14px 24px;
  font-size: 12px;
  color: var(--fg-muted, #6B7280);
  flex-shrink: 0;
}
.dash-footer-inner {
  max-width: none;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.dash-footer-legend {
  font-family: var(--mono, monospace);
  font-size: 11px;
  color: var(--fg-subtle, #9CA3AF);
}

/* ═══ Skins VIP — pseudo en dégradé animé ═══
   Les joueurs avec un cosmétique actif (prism, cyberpunk, gold…)
   voient leur pseudo rendu en texte dégradé animé.

   IMPORTANT : on utilise background-image (PAS background:) car le
   shorthand `background` reset background-clip à border-box, ce qui
   ferait apparaître le dégradé comme un rectangle plein au lieu d'être
   découpé par la forme du texte. background-image ne touche PAS
   background-clip → le clip:text reste actif. */
@keyframes dash-prism-slide { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

.dash-player-name.rgb-prism,
.dash-player-name.rgb-cyberpunk,
.dash-player-name.rgb-sunset,
.dash-player-name.rgb-aurore,
.dash-player-name.rgb-pastel,
.dash-player-name.rgb-gold,
.dash-player-name.rgb-volcano,
.dash-player-name.rgb-ocean,
.dash-player-name.rgb-miami,
.dash-player-name.rgb-toxic,
.dash-player-name.rgb-chroma {
  display: inline-block;
  font-weight: 800;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  background-size: 200% auto !important;
  background-repeat: no-repeat !important;
  animation: dash-prism-slide 4s linear infinite !important;
}

.dash-player-name.rgb-prism {
  font-family: 'Orbitron', sans-serif !important;
  background-image: linear-gradient(90deg, #ff0055, #ff6600, #ffdd00, #00ff88, #00ccff, #6644ff, #cc00ff, #ff0055) !important;
}
.dash-player-name.rgb-cyberpunk {
  font-family: 'Orbitron', sans-serif !important;
  background-image: linear-gradient(90deg, #ff00ff, #00ffff, #ff00ff) !important;
  animation-duration: 3s !important;
  filter: brightness(1.2);
}
.dash-player-name.rgb-sunset {
  background-image: linear-gradient(90deg, #ff4500, #ff8c00, #ffd700, #ff6347) !important;
}
.dash-player-name.rgb-aurore {
  background-image: linear-gradient(90deg, #00ff87, #60efff, #0061ff, #60efff, #00ff87) !important;
  animation-duration: 5s !important;
}
.dash-player-name.rgb-gold {
  background-image: linear-gradient(90deg, #ffd700, #ffec8b, #daa520, #ffec8b, #ffd700) !important;
  animation-duration: 3s !important;
  filter: brightness(1.1);
}
.dash-player-name.rgb-volcano {
  background-image: linear-gradient(90deg, #ff0000, #ff4500, #ff8c00, #ff4500, #ff0000) !important;
  animation-duration: 2.5s !important;
}
.dash-player-name.rgb-ocean {
  background-image: linear-gradient(90deg, #0077b6, #00b4d8, #90e0ef, #00b4d8, #0077b6) !important;
}
.dash-player-name.rgb-miami {
  background-image: linear-gradient(90deg, #ff6ec7, #7b68ee, #ff6ec7) !important;
  animation-duration: 3s !important;
}
.dash-player-name.rgb-toxic {
  background-image: linear-gradient(90deg, #39ff14, #7fff00, #adff2f, #7fff00, #39ff14) !important;
  animation-duration: 2s !important;
  filter: brightness(1.15);
}
.dash-player-name.rgb-chroma {
  background-image: linear-gradient(90deg, #ff0000, #ff8800, #ffff00, #00ff00, #00aaff, #8800ff, #ff0088, #ff0000) !important;
}
.dash-player-name.rgb-pastel {
  background-image: linear-gradient(90deg, #ff9a9e, #fecfef, #a18cd1, #fbc2eb, #ff9a9e) !important;
  animation-duration: 6s !important;
}

/* Les skins VIP ne doivent pas changer de couleur au hover (le dégradé
   reste intact). On neutralise le hover orange-deep pour ces pseudos. */
.dash-row:hover .dash-player-name[class*="rgb-"] {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

/* ═══ Responsive ═══ */
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; gap: 32px; }
  /* FIX (audit 2026-09) : 520px pour 40+ joueurs = scroll imbriqué qui piège
     le scroll de la page sur mobile → on laisse la liste s'étendre naturellement */
  .dash-list {
    max-height: none;
    overflow-y: visible;
    mask-image: none;
    -webkit-mask-image: none;
  }
  /* Clear the mobile hamburger button (44px + 14px top = ~58px) */
  .dash-view { padding: 70px 16px 60px; }
  .dash-panel-title { font-size: 14px; }
}
@media (max-width: 640px) {
  .dash-view { padding: 70px 14px 60px; }
  .dash-intro { margin-bottom: 24px; }
  .dash-intro-sub { font-size: 13px; }
  .dash-panel-header { padding-bottom: 10px; }
  .dash-panel-title { font-size: 14px; }
  .dash-panel-sub { font-size: 11px; }

  .dash-row { min-height: 48px; padding: 8px 8px; gap: 10px; }
  .dash-rank-slot { width: 30px; }
  .dash-rank-badge { width: 24px; height: 24px; font-size: 11px; border-radius: 6px; }
  .dash-rank-trophy { font-size: 22px; width: 24px; height: 24px; }
  .dash-rank-trophy svg, .dash-rank-trophy i { width: 20px; height: 20px; }
  .dash-player-name { font-size: 14px; }
  .dash-player-breakdown { font-size: 10px; }
  .dash-player-breakdown i, .dash-player-breakdown svg { width: 10px; height: 10px; }
  .dash-score { min-width: 64px; }
  .dash-score-val { font-size: 14px; }
  .dash-score-suffix { font-size: 10px; }
  .dash-row-arrow { display: none; }

  .dash-footer-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* ════════════════════════════════════════════════════════════════
   Badge Plutonium (preview) — à côté du 1er du panel « Cette semaine »
   Icône = atome vert officiel OpenFront (#22c55e, même tracé que la
   page Tournois). Infobulle « preview » au survol / focus clavier.
   Placement de la bulle SOUS le badge : la ligne #1 est en haut du
   conteneur scrollable (.dash-list, overflow-y:auto) → au-dessus,
   elle serait rognée.
   ════════════════════════════════════════════════════════════════ */
.dash-pu {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px 1px 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #16a34a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: middle;
  cursor: help;
  flex-shrink: 0;
  width: max-content;
  max-width: 100%;
  align-self: flex-start;
}
.dash-pu svg { display: block; width: 12px; height: 12px; }
.dash-pu b { font-weight: 700; }

/* Infobulle « preview » (survol ou focus clavier) */
.dash-pu::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: max-content;
  max-width: 230px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #E5E7EB);
  color: var(--text, #111);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  pointer-events: none;
}
.dash-pu:hover::after,
.dash-pu:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Thème sombre : fond carte déjà sombre via var(--card) */
[data-theme="dark"] .dash-pu { color: #4ade80; background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.4); }

/* Mobile : chip légèrement réduit */
@media (max-width: 720px) {
  .dash-pu { font-size: 10px; padding: 1px 6px 1px 4px; gap: 3px; margin-left: 5px; }
  .dash-pu svg { width: 10px; height: 10px; }
  .dash-pu::after { max-width: 180px; font-size: 11px; }
}

/* Ligne pseudo + badge Plutonium (uniquement la ligne #1 hebdo) */
.dash-player-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

/* ════════════════════════════════════════════════════════════════
   Toolbar — barre de recherche joueur + filtres Tous/FFA/Team
   Placée entre l'intro et la grille, au-dessus des 2 panneaux.
   ════════════════════════════════════════════════════════════════ */
.dash-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.dash-search {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  border-radius: 10px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #E5E7EB);
  color: var(--muted, #9CA3AF);
  transition: border-color 0.2s var(--ease-out, ease), box-shadow 0.2s var(--ease-out, ease);
}
.dash-search:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}
.dash-search > svg { flex-shrink: 0; opacity: 0.6; }
.dash-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--fg, #111827);
  font-size: 14px;
  font-family: inherit;
  height: 100%;
}
.dash-search input::placeholder { color: var(--muted, #9CA3AF); }
/* On a notre propre bouton ✕ (le cancel-button natif est incohérent) */
.dash-search input::-webkit-search-cancel-button { display: none; }
.dash-search-clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--bg-subtle, #F3F4F6);
  color: var(--muted, #6B7280);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.dash-search-clear:hover { background: var(--orange); color: #fff; }

/* ── Filtres Tous / FFA / Team ── */
.dash-filters {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--card, #fff);
  border: 1px solid var(--border, #E5E7EB);
}
.dash-filter {
  border: none;
  background: transparent;
  color: var(--muted, #6B7280);
  font-size: 12.5px;
  font-weight: 700;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  min-height: 32px;
  transition: background 0.15s ease, color 0.15s ease;
}
.dash-filter:hover { color: var(--orange-deep); background: var(--orange-pale, #FFF7ED); }
.dash-filter.active {
  background: var(--orange);
  color: #fff;
}
.dash-filter:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 1px;
}

/* Corps de panel (liste + ligne TOI épinglée) */
.dash-panel-body { min-width: 0; }

/* ════════════════════════════════════════════════════════════════
   Tendance hebdo — flèche ↑/↓ vs rang FINAL de la semaine dernière
   (panel « Cette semaine » uniquement). Tooltip natif (title) :
   jamais rogné par le conteneur scrollable .dash-list.
   ════════════════════════════════════════════════════════════════ */
.dash-trend {
  flex-shrink: 0;
  min-width: 34px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: help;
  white-space: nowrap;
}
.dash-trend-up   { color: #16a34a; background: rgba(34, 197, 94, 0.10); }
.dash-trend-down { color: #dc2626; background: rgba(220, 38, 38, 0.08); }
.dash-trend-same { color: var(--muted, #9CA3AF); background: var(--bg-subtle, #F3F4F6); }
.dash-trend-new  { color: var(--orange-deep, #C2410C); background: var(--orange-pale, #FFF7ED); }

/* Thème sombre : contraste accru */
[data-theme="dark"] .dash-trend-up   { color: #4ade80; background: rgba(34, 197, 94, 0.14); }
[data-theme="dark"] .dash-trend-down { color: #f87171; background: rgba(220, 38, 38, 0.16); }

/* ════════════════════════════════════════════════════════════════
   Ligne TOI — joueur connecté dans le classement
     .dash-row-me      : ligne surlignée (dans le top 50 ou résultats)
     .dash-me-pinned   : ligne épinglée SOUS la liste (hors scroll),
                       pour le joueur classé au-delà du top 50
   ════════════════════════════════════════════════════════════════ */
.dash-me-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.6;
  vertical-align: middle;
}
.dash-row-me {
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.10) 0%, transparent 70%);
}
.dash-row-me::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--orange);
  opacity: 0.85;
}
.dash-row-me:hover { background: var(--orange-pale, #FFF7ED); }
.dash-me-pinned {
  border-top: 1px dashed var(--border-strong, #E5E7EB);
  border-bottom: none;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.10) 0%, transparent 70%);
}
.dash-me-pinned:hover { background: var(--orange-pale, #FFF7ED); }

/* ── Responsive toolbar / tendance / TOI ── */
@media (max-width: 640px) {
  .dash-toolbar { gap: 10px; margin-bottom: 18px; }
  .dash-search { max-width: none; flex-basis: 100%; height: 38px; }
  .dash-filters { flex: 1 1 100%; }
  .dash-filter { flex: 1; text-align: center; padding: 6px 8px; }
  .dash-trend { min-width: 28px; font-size: 10px; padding: 2px 4px; }
  .dash-me-chip { font-size: 9px; padding: 1px 6px; }
}

/* ── Aperçu statique pré-généré (scripts/gen-ranked-preview.js) ────
   Affiché instantanément au chargement (robots + connexions lentes),
   remplacé par le classement live dès que les données arrivent.
   v5.22 : DEUX panneaux (global + squelette hebdo) pour que la mise
   en page ne saute plus et que le « Top de la semaine » soit visible
   dès la première seconde — l'aperçu global ne prend plus tout l'écran. */
.dash-static-preview .dash-panel-preview {
  /* 2 colonnes normales comme le rendu live (plus de grid-column: 1/-1) */
  grid-column: auto;
}
/* Garde-fou hauteur : l'aperçu reste scrollable même sur mobile
   (spécificité > media query .dash-list { max-height:none }) */
.dash-static-preview .dash-list {
  max-height: 640px;
  overflow-y: auto;
  overflow-x: hidden;
  mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 34px), transparent 100%);
}
/* Squelette du panneau hebdo pendant le préchargement */
.dash-skeleton-list {
  display: flex;
  flex-direction: column;
  max-height: 640px;
  overflow: hidden;
}
.dash-skeleton-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 10px;
  border-bottom: 1px solid #F5F5F5;
}
.dash-skeleton-rank,
.dash-skeleton-name,
.dash-skeleton-pts {
  border-radius: 6px;
  background: linear-gradient(90deg, #ECECEF 25%, #F6F6F8 50%, #ECECEF 75%);
  background-size: 200% 100%;
  animation: dash-skeleton-shimmer 1.4s ease-in-out infinite;
}
.dash-skeleton-rank { flex: 0 0 26px; height: 26px; }
.dash-skeleton-name { flex: 1 1 auto; height: 14px; max-width: 220px; }
.dash-skeleton-pts  { flex: 0 0 64px; height: 14px; margin-left: auto; }
.dash-skeleton-row:nth-child(2n) .dash-skeleton-name { max-width: 170px; animation-delay: 0.15s; }
.dash-skeleton-row:nth-child(3n) .dash-skeleton-pts  { animation-delay: 0.3s; }
@keyframes dash-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dash-skeleton-rank, .dash-skeleton-name, .dash-skeleton-pts { animation: none; }
}
.dash-preview-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--fg-muted);
}
/* v5.24 — version « en direct » de la note (rendu live) : mêmes dimensions
   que .dash-preview-note → zéro décalage vertical au swap aperçu→live. */
.dash-live-note .dash-preview-dot {
  background: #22c55e;
  animation: dash-preview-pulse 1.6s ease-in-out infinite;
}
.dash-preview-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: dash-preview-pulse 1.6s ease-in-out infinite;
}
@keyframes dash-preview-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .dash-preview-dot { animation: none; }
}
