/* Page /stats : DA du site, cartes #2b2b2b, pilules bleues, Poppins. */
.stats-page {
    --bg: #232323;
    --card: #2b2b2b;
    --inner: #202020;
    --line: #3a3a3a;
    --text: #ffffff;
    --muted: #b4b4b4;
    --blue: #2074f0;
    --blue-hover: #1a62cf;

    display: block;
    background: var(--bg);
    color: var(--text);
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    line-height: 1.5;
}

.stats-page *, .stats-page *::before, .stats-page *::after { box-sizing: border-box; }

.stats-wrap {
    max-width: 1140px;
    margin: 0 auto;
    /* La navbar est fixe : le contenu commence sous elle */
    padding: 7rem 16px 80px;
}

.stats-page h1 {
    margin: 0;
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
}

.stats-page h1 .icon { color: var(--blue); font-size: 0.9em; }

.stats-subtitle {
    margin: 14px 0 32px;
    text-align: center;
    color: var(--muted);
    font-size: 15px;
}

.stats-note {
    max-width: 720px;
    margin: -16px auto 28px;
    padding: 12px 18px;
    background: var(--card);
    border-left: 3px solid var(--blue);
    border-radius: 10px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.stats-note strong { color: var(--text); }

.stats-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stats-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--card);
    border-radius: 16px;
    padding: 18px 20px;
}

.stats-tile-label { color: var(--muted); font-size: 13px; }
.stats-tile-value { font-size: 30px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats-tile-detail { color: var(--muted); font-size: 12px; }
.stats-tile-value.is-offline { color: #ff6666; font-size: 20px; }

.stats-card {
    background: var(--card);
    border-radius: 16px;
    padding: 22px;
}

.stats-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    background: var(--inner);
    border-radius: 999px;
}

.stats-tab {
    border: 0;
    border-radius: 999px;
    padding: 6px 16px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.stats-tab:hover { color: var(--text); }
.stats-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.stats-tab.is-active { background: var(--blue); color: #ffffff; }

.stats-legend {
    margin: 12px 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.stats-canvas {
    position: relative;
    height: 340px;
}

.stats-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: var(--muted);
}

@media (max-width: 575px) {
    .stats-page h1 { font-size: 30px; }
    .stats-card { padding: 16px; }
    .stats-canvas { height: 260px; }
    .stats-tile-value { font-size: 24px; }
}
