/* Pages de stats du site (2026-11-30) : onglet Stats de l'espace membre, joueur/, stats/, replay/.
   S'appuie sur ../styles.css et compte.css (m-card, m-stat, m-row, m-chip...). Pas de vert (regle de l'UI du jeu). */

.s-lead { margin: -8px 0 14px; }
.s-tiles { margin-bottom: 0; }

/* Barre V / N / D */
.s-wdl { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: rgba(0,0,0,.45); }
.s-wdl .w { background: linear-gradient(90deg, var(--gold-deep), var(--gold-lit)); }
.s-wdl .d { background: var(--dim); }
.s-wdl .l { background: #7a2a3a; }
.s-mode { padding: 10px 0; border-top: 1px solid var(--rule); }
.s-mode:first-child { border-top: 0; padding-top: 0; }
.s-mode-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 15px; }
.s-mode-head strong { font-family: var(--display); font-weight: 600; }

.s-records { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.s-rec { background: var(--ground); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.s-rec span { font-size: 13px; }
.s-rec strong { font-family: var(--display); font-size: 24px; }

/* Taux de victoire en barre */
.s-rate { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.s-rate-track { flex: 1 1 auto; height: 8px; border-radius: 4px; background: rgba(0,0,0,.45); overflow: hidden; min-width: 50px; }
.s-rate-track span { display: block; height: 100%; }
.s-rate-track .up { background: linear-gradient(90deg, var(--gold-deep), var(--gold-lit)); }
.s-rate-track .down { background: var(--dim); }
.s-rate strong { font-family: var(--display); font-weight: 600; min-width: 48px; text-align: right; }

/* Tableaux */
.s-table { display: flex; flex-direction: column; }
.s-tr { display: grid; grid-template-columns: minmax(150px, 2fr) 80px minmax(140px, 2fr) 100px 120px; gap: 14px; align-items: center; padding: 8px 0; border-top: 1px solid var(--rule); }
.s-th { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; border-top: 0; }
.s-champ-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.s-champ-cell strong { font-family: var(--display); font-weight: 600; overflow-wrap: anywhere; }
.m-champ.s-champ-sm { width: 40px; height: 40px; }
.s-duo { display: flex; }
.s-duo .m-champ + .m-champ { margin-left: -12px; }

/* Courbe d'ELO */
.s-elo { width: 100%; height: auto; display: block; }
.s-elo text { font-family: var(--body); }

/* Activite */
.s-heat { display: flex; flex-direction: column; gap: 3px; overflow-x: auto; }
.s-heat-row { display: grid; grid-template-columns: 34px repeat(24, minmax(12px, 1fr)); gap: 3px; min-width: 420px; }
.s-heat-cell { aspect-ratio: 1; border-radius: 3px; background: var(--gold); }
.s-heat-day, .s-heat-hour { font-size: 12px; color: var(--dim); }
.s-heat-hour { white-space: nowrap; }

/* Page publique (joueur/, stats/, replay/) */
.s-page { max-width: var(--maxw); margin: 0 auto; padding: 36px 24px 72px; display: flex; flex-direction: column; gap: 24px; }
.s-page section { padding: 0; }
.s-hero h1 { font-size: clamp(32px, 4.5vw, 48px); margin: 0 0 8px; }
.s-hero p { color: var(--muted); font-size: 18px; margin: 0; max-width: 760px; }
.s-toolbar { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; }
.s-note { font-size: 14px; color: var(--dim); margin: 0; }
.s-search { display: flex; gap: 10px; flex-wrap: wrap; }
.s-search input { height: 48px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--rule); background: var(--ground); color: var(--text); font: inherit; flex: 1 1 240px; min-width: 0; }
.s-search input:focus { border-color: var(--gold); outline: none; }
.s-link-row { color: inherit; text-decoration: none; }
.s-link-row:hover .m-row-title { color: var(--gold-lit); }

/* Stats des champions : cartes cliquables pour trier */
.cs-table .s-tr { grid-template-columns: 44px minmax(150px, 2fr) minmax(140px, 2fr) minmax(110px, 1.2fr) minmax(110px, 1.2fr) 90px; }
.cs-sort { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; text-align: left; min-height: 32px; }
.cs-sort[aria-sort] { color: var(--gold-lit); }
.cs-rank { font-family: var(--display); font-weight: 700; color: var(--dim); text-align: center; }
.cs-low { opacity: .55; }
.cs-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cs-pod { display: flex; gap: 14px; align-items: center; }
.cs-pod img { width: 64px; height: 64px; border-radius: 10px; border: 2px solid var(--line-gold); object-fit: cover; }
.cs-pod .m-stat-value { font-size: 26px; }

/* Replay */
.r-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.r-board-wrap { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 16px; }
.r-board { width: 100%; height: auto; display: block; max-height: 78vh; }
.r-players { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.r-player { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 18px; }
.r-player i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.r-player.p0 i { background: #3d8bff; }
.r-player.p1 i { background: #ff4d5c; }
.r-player .r-energy { font-family: var(--body); font-weight: 500; font-size: 14px; color: var(--muted); }
.r-player .r-crown { color: var(--gold-lit); }
.r-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.r-controls .btn { min-height: 44px; }
.r-controls input[type=range] { flex: 1 1 200px; accent-color: var(--gold); min-height: 44px; }
.r-turn { font-family: var(--display); font-weight: 700; font-size: 18px; min-width: 120px; }
.r-log { max-height: 70vh; overflow-y: auto; }
.r-log h3 { font-size: 15px; margin: 14px 0 6px; color: var(--gold-lit); letter-spacing: .06em; text-transform: uppercase; }
.r-log h3:first-child { margin-top: 0; }
.r-ev { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 15px; }
.r-ev img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.r-ev.p0 { border-left: 3px solid #3d8bff; padding-left: 8px; }
.r-ev.p1 { border-left: 3px solid #ff4d5c; padding-left: 8px; }
.r-ev.cur { background: rgba(233,181,79,.08); }
.r-end { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--gold-lit); }

@media (max-width: 960px) {
  .r-layout { grid-template-columns: 1fr; }
  .r-log { max-height: none; }
}
@media (max-width: 760px) {
  .s-tr { grid-template-columns: minmax(120px, 2fr) 56px minmax(110px, 2fr) 64px; gap: 10px; }
  .s-hide-sm { display: none; }
  .cs-table .s-tr { grid-template-columns: 30px minmax(110px, 2fr) minmax(100px, 2fr) 64px 64px; }
  .cs-table .s-hide-sm { display: none; }
  .cs-podium { grid-template-columns: 1fr; }
  .s-page { padding: 24px 16px 56px; }
  .r-board-wrap { padding: 10px; }
}

/* Bandeau de profil hors de l'espace membre (joueur/) : compte.css le met en flex via .m-main > section. */
.s-page .m-banner { display: flex; }
.s-page .m-wallet { align-items: center; }
.s-page section.m-banner { padding: 26px 30px; }
