/* Historique — 1ʳᵉ édition des Barutem Goni Awards (2025). */

.bga-hist {
    --bga-gold: var(--color-primary);
    --bga-gold-bright: var(--color-primary-bright, var(--color-primary));
}

/* ── Hero ─────────────────────────────────────────────── */
.bga-hist-hero {
    position: relative;
    padding: 128px 0 72px;
    background-color: var(--color-bg);
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--color-border);
}

.bga-hist-hero-inner {
    max-width: 820px;
}

.bga-hist-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.2vw, 4.2rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    color: var(--color-secondary);
    margin: 18px 0 20px;
}

.bga-hist-hero p {
    max-width: 640px;
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.85;
}

/* ── Stats ────────────────────────────────────────────── */
.bga-hist-stats-wrap {
    margin-top: -34px;
    position: relative;
    z-index: 2;
}

.bga-hist-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.bga-hist-stat {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 26px 24px;
    text-align: center;
    box-shadow: var(--shadow-soft);
}

.bga-hist-stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    color: var(--bga-gold);
    line-height: 1;
    margin-bottom: 8px;
}

.bga-hist-stat span {
    color: var(--color-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Toolbar (recherche + filtres) ────────────────────── */
.bga-hist-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
}

.bga-hist-search input {
    width: min(340px, 100%);
    padding: 13px 18px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
}

.bga-hist-search input:focus {
    outline: 2px solid var(--bga-gold);
    outline-offset: 1px;
}

.bga-hist-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bga-hist-chip {
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-muted);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.bga-hist-chip:hover {
    color: var(--color-secondary);
    border-color: var(--bga-gold);
}

.bga-hist-chip.is-active {
    background: var(--bga-gold);
    border-color: var(--bga-gold);
    color: #0a0a0a;
    font-weight: 600;
}

/* ── Classement ───────────────────────────────────────── */
.bga-hist-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bga-hist-row {
    display: grid;
    grid-template-columns: 56px 64px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    transition: transform 0.16s ease, border-color 0.16s ease;
}

.bga-hist-row:hover {
    transform: translateX(3px);
    border-color: rgba(212, 175, 55, 0.4);
}

.bga-hist-row.is-top {
    border-color: rgba(212, 175, 55, 0.55);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.12), var(--color-surface) 34%);
}

.bga-hist-rank-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-muted);
}

.bga-hist-row.is-top .bga-hist-rank-num {
    background: var(--bga-gold);
    color: #0a0a0a;
    border-color: var(--bga-gold);
}

.bga-hist-media img,
.bga-hist-media-fallback {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    display: block;
}

.bga-hist-media-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--bga-gold);
}

.bga-hist-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.bga-hist-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.08rem;
    color: var(--color-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bga-hist-cat {
    font-size: 0.8rem;
    color: var(--bga-gold);
}

.bga-hist-cat.is-pending {
    color: var(--color-muted);
    font-style: italic;
}

.bga-hist-votes {
    text-align: right;
    line-height: 1.2;
}

.bga-hist-votes strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--color-secondary);
}

.bga-hist-votes span {
    font-size: 0.75rem;
    color: var(--color-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.bga-hist-empty {
    text-align: center;
    color: var(--color-muted);
    padding: 32px 0;
}

/* ── Galerie ──────────────────────────────────────────── */
.bga-hist-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.bga-hist-photo {
    position: relative;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    aspect-ratio: 3 / 4;
}

.bga-hist-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bga-hist-photo:hover img {
    transform: scale(1.05);
}

.bga-hist-photo figcaption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 34px 12px 12px;
    background: linear-gradient(180deg, transparent, rgba(7, 7, 7, 0.92));
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bga-hist-photo-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--color-secondary);
}

.bga-hist-photo-meta {
    font-size: 0.74rem;
    color: var(--bga-gold);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 720px) {
    .bga-hist-stats {
        grid-template-columns: 1fr;
    }
    .bga-hist-row {
        grid-template-columns: 40px 52px 1fr auto;
        gap: 12px;
        padding: 12px 14px;
    }
    .bga-hist-rank-num {
        width: 34px;
        height: 34px;
        font-size: 0.86rem;
    }
    .bga-hist-media img,
    .bga-hist-media-fallback {
        width: 52px;
        height: 52px;
        border-radius: 12px;
    }
    .bga-hist-votes strong {
        font-size: 1.05rem;
    }
    .bga-hist-gallery {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
