/* ═══════════════════════════════════════════
   general.css — Styles spécifiques Stats générales
   ═══════════════════════════════════════════ */

/* ── Close button (pas de core.js ici) ── */
.modal-close-btn {
    position: absolute;
    top: 14px; left: 14px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--glass);
    color: var(--muted);
    font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    z-index: 5;
    padding: 0;
    line-height: 1;
}
.modal-close-btn:active { transform: scale(0.9); background: var(--glass-hover); }
.modal-overlay .modal { position: relative; }

/* ── Top3 charts in modal ── */
.top3-game-block {
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
}
.top3-game-block:last-child { border-bottom: none; margin-bottom: 0; }

.top3-game-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem; font-weight: 700;
    color: var(--accent);
    margin-bottom: 10px;
}

/* ── Scrollable chart container (fixed Y-axis + scrollable content) ── */
.scroll-chart-container {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    position: relative;
}
.scroll-chart-yaxis,
.scroll-chart-yaxis-r {
    flex-shrink: 0;
    display: block;
}
.scroll-chart-content {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.scroll-chart-content::-webkit-scrollbar { height: 4px; }
.scroll-chart-content::-webkit-scrollbar-track { background: transparent; }
.scroll-chart-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.scroll-chart-content canvas { display: block; }

/* ── Timeline sticky flags (année + mois) ── */
.timeline-sticky-flags {
    display: flex;
    gap: 8px;
    padding: 4px 0 0 36px;
    font-family: 'DM Sans', sans-serif;
}
.sticky-year {
    font-size: 0.78rem; font-weight: 700;
    color: #f5c542;
    background: rgba(245,197,66,0.12);
    border: 1px solid rgba(245,197,66,0.3);
    padding: 1px 8px; border-radius: 6px;
}
.sticky-month {
    font-size: 0.78rem; font-weight: 700;
    color: #38bdf8;
    background: rgba(56,189,248,0.1);
    border: 1px solid rgba(56,189,248,0.25);
    padding: 1px 8px; border-radius: 6px;
}
.sticky-sep {
    color: var(--muted);
    font-size: 0.85rem;
    opacity: 0.4;
}
.sticky-avg {
    font-size: 0.78rem; font-weight: 700;
    color: #38bdf8;
    background: rgba(56,189,248,0.08);
    border: 1px dashed rgba(56,189,248,0.3);
    padding: 1px 8px; border-radius: 6px;
}

/* ── Timeline legend (HTML instead of canvas) ── */
.timeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0 0;
    font-size: 0.72rem;
    color: var(--muted);
}
.tl-leg-item {
    display: flex; align-items: center; gap: 4px;
}
.tl-leg-bar {
    width: 10px; height: 6px; border-radius: 1px; opacity: 0.78;
}
.tl-leg-dot {
    width: 8px; height: 8px; border-radius: 50%;
}
.tl-leg-line {
    width: 14px; height: 0;
    border-top: 2px dashed;
}