/* Styles spécifiques à la page Statistiques */

header img.logo-sm { width: 80px; height: auto; border-radius: 12px; box-shadow: var(--shadow); }

.section { max-width: 900px; }

/* ── GLOBAL STATS ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.stat-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(200,235,255,0.5));
  border-radius: 14px;
  padding: 20px 18px;
  text-align: center;
  border: 1.5px solid rgba(255,255,255,0.8);
  box-shadow: 0 4px 16px rgba(0,80,150,0.1);
  transition: transform 0.25s;
}
.stat-card:hover { transform: translateY(-4px); }
.stat-card .stat-icon { font-size: 2rem; margin-bottom: 6px; display: block; }
.stat-card .stat-val {
  font-size: 1.9rem;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}
.stat-card .stat-label { font-size: 0.78rem; font-weight: 700; color: #445566; text-transform: uppercase; letter-spacing: 0.05em; }

/* Carrousel */
#carousel-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--blue);
  display: block;
  min-height: 2.2rem;
  transition: opacity 0.4s;
}
#carousel-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #445566;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: 1.2em;
  transition: opacity 0.4s;
}
.carousel-dots {
  display: flex; justify-content: center; gap: 5px; margin-top: 8px;
}
.carousel-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(0,120,200,0.25);
  transition: background 0.3s;
}
.carousel-dots span.active { background: var(--blue); }

.disclaimer {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(0,50,80,0.55);
  font-weight: 600;
  margin-top: 10px;
}

/* ── CLASSEMENT ── */
.sort-btns {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.sort-btn {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1.5px solid rgba(0,120,200,0.35);
  background: rgba(255,255,255,0.5);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-dark);
  cursor: pointer;
  transition: all 0.2s;
}
.sort-btn.active, .sort-btn:hover {
  background: rgba(0,120,200,0.15);
  border-color: var(--blue);
}

.player-table { width: 100%; border-collapse: collapse; }
.player-table thead tr {
  border-bottom: 2px solid rgba(0,100,180,0.15);
}
.player-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 800;
  color: #446688;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 10px 8px;
}
.player-table tbody tr {
  border-bottom: 1px solid rgba(0,100,180,0.08);
  transition: background 0.2s;
}
.player-table tbody tr:hover {
  background: rgba(0,120,200,0.06);
}
.player-table td {
  padding: 8px 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  vertical-align: middle;
}
.player-row-head {
  display: flex; align-items: center; gap: 10px;
}
.player-row-head img {
  width: 32px; height: 32px;
  border-radius: 6px;
  image-rendering: pixelated;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.rank-badge {
  font-size: 0.75rem; font-weight: 900;
  color: #7a99bb;
  min-width: 24px;
  text-align: right;
}
.rank-badge.gold   { color: #d4a017; }
.rank-badge.silver { color: #888; }
.rank-badge.bronze { color: #a05a2c; }
.playtime-bar-wrap {
  width: 100%; background: rgba(0,100,180,0.1);
  border-radius: 99px; height: 6px; margin-top: 3px; overflow: hidden;
}
.playtime-bar { height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--sky-top), #5bc8a0); }

.players-more-wrap { text-align: center; margin-top: 16px; }

.players-more-btn {
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  color: white;
  background: linear-gradient(135deg, var(--sky-top), #5bc8a0);
  border: none;
  border-radius: 999px;
  padding: 9px 24px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,120,200,0.3);
  transition: all 0.25s;
}

.players-more-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,120,200,0.4); }
.players-more-wrap[hidden] { display: none; }

/* ── GRAPHIQUES ── */
.chart-tabs {
  display: flex; gap: 8px; margin-bottom: 16px;
}
.chart-tab {
  padding: 5px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(0,120,200,0.35);
  background: rgba(255,255,255,0.5);
  font-family: inherit;
  font-size: 0.82rem; font-weight: 700;
  color: var(--blue-dark);
  cursor: pointer;
  transition: all 0.2s;
}
.chart-tab.active {
  background: linear-gradient(135deg, var(--sky-top), #5bc8a0);
  color: white; border-color: transparent;
}
canvas { width: 100% !important; max-height: 300px; }

/* Loading / error */
#loading {
  margin-top: 60px;
  text-align: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.spinner {
  display: inline-block;
  width: 36px; height: 36px;
  border: 4px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.seo-text {
  font-size: 0.85rem;
  color: rgba(0,50,80,0.7);
  font-weight: 600;
  line-height: 1.6;
  text-align: left;
}

@media(max-width:600px) {
  .player-table th:nth-child(3),
  .player-table td:nth-child(3) { display: none; }
  .section { padding: 18px 14px; }
}
