/* ==========================================================
   BimBamBoom — PAGE ALBUM PHOTOS & VIDÉOS
   Dépend de style.css (variables :root) et onepage.css (.btn, .section-title)
   ========================================================== */

/* En-tête fixe (style.css) : la page commence sous l'en-tête */
.bbb-album { background: #f7f8fa; padding-top: var(--header-height, 104px); }

/* ── Bandeau titre + accès rapide aux années ──────────── */
.album-hero {
    background: var(--bbb-red);
    color: #fff;
    text-align: center;
    padding: 56px 0 44px;
}

.album-hero .section-title { color: #fff; margin-bottom: 12px; }
.album-hero .section-intro { margin-bottom: 28px; }

.album-years-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.album-chip {
    display: inline-block;
    padding: 8px 22px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-weight: 800;
    letter-spacing: .5px;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}

.album-chip:hover,
.album-chip:focus-visible {
    background: var(--bbb-yellow-sun);
    border-color: var(--bbb-yellow-sun);
    color: var(--bbb-black);
}

/* ── Cartes par année ─────────────────────────────────── */
.album-list { padding: 56px 0 80px; }

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
    gap: 32px;
}

.album-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .08);
    scroll-margin-top: calc(var(--header-height, 88px) + 16px);
    transition: transform .25s, box-shadow .25s;
}

.album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .14);
}

.album-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    padding: 0;
    border: 0;
    background: #111;
    overflow: hidden;
    cursor: pointer;
}

.album-cover:focus-visible { outline: 3px solid var(--bbb-yellow-sun); outline-offset: -3px; }

.album-slides { position: absolute; inset: 0; }

.album-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1s ease, transform 6s ease;
}

.album-slide.is-active { opacity: 1; transform: scale(1); }

.album-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 55%);
    pointer-events: none;
}

.album-year {
    position: absolute;
    left: 20px;
    bottom: 12px;
    z-index: 2;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 1px;
    color: var(--bbb-yellow-sun);
    text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

.album-cover-hint {
    position: absolute;
    right: 16px;
    bottom: 18px;
    z-index: 2;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    transition: background .2s;
}

.album-cover:hover .album-cover-hint,
.album-cover:focus-visible .album-cover-hint { background: var(--bbb-red); }

.album-card-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    padding: 20px 24px 24px;
}

.album-card-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--bbb-red);
}

.album-card-sub {
    margin: 2px 0 0;
    font-size: .9rem;
    color: var(--color-text-muted);
}

.album-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.album-actions .btn,
.album-actions .btn-outline-dark { padding: 10px 20px; font-size: .82rem; cursor: pointer; }

.album-empty { text-align: center; color: var(--color-text-muted); padding: 40px 0; }

/* ── Visionneuse plein écran ──────────────────────────── */
html.alb-open { overflow: hidden; }

.album-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 10, .95);
    color: #fff;
}

.album-lightbox[hidden] { display: none; }

.alb-head {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
}

.alb-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.alb-tabs { display: flex; gap: 8px; margin: 0 auto; }

.alb-tab,
.alb-vbtn {
    padding: 7px 18px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.alb-tab:hover,
.alb-vbtn:hover { border-color: #fff; }

.alb-tab.is-active,
.alb-vbtn.is-active {
    background: var(--bbb-yellow-sun);
    border-color: var(--bbb-yellow-sun);
    color: var(--bbb-black);
}

.alb-tab[hidden] { display: none; }

.alb-close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
}

.alb-close:hover,
.alb-close:focus-visible { background: rgba(255, 255, 255, .14); }

.alb-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 12px;
}

.album-lightbox.is-videos .alb-stage--photos,
.album-lightbox.is-videos .alb-thumbs { display: none; }
.album-lightbox:not(.is-videos) .alb-stage--videos { display: none; }

.alb-figure {
    flex: 1;
    min-width: 0;
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.alb-img {
    max-width: 100%;
    max-height: calc(100% - 32px);
    object-fit: contain;
    border-radius: 6px;
    transition: opacity .25s;
}

.alb-img.is-loading { opacity: .35; }

.alb-count { margin-top: 8px; font-size: .85rem; opacity: .75; }

.alb-nav {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: background .2s;
}

.alb-nav:hover,
.alb-nav:focus-visible { background: var(--bbb-red); }

.alb-thumbs {
    display: flex;
    justify-content: safe center;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 20px 18px;
    scrollbar-width: thin;
}

.alb-thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 54px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    background: #222;
    opacity: .55;
    cursor: pointer;
    transition: opacity .2s, border-color .2s;
}

.alb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.alb-thumb:hover,
.alb-thumb.is-active { opacity: 1; border-color: var(--bbb-yellow-sun); }

.alb-stage--videos { flex-direction: column; padding: 0 20px 24px; }

.alb-player {
    width: min(100%, calc((100vh - 200px) * 16 / 9), 1100px);
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.alb-player iframe { display: block; width: 100%; height: 100%; border: 0; }

.alb-vlist {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.alb-vlist:empty { display: none; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
    .album-hero { padding: 40px 0 32px; }
    .album-list { padding: 32px 0 56px; }
    .album-card-body { padding: 16px 18px 20px; }

    .alb-head { flex-wrap: wrap; padding: 10px 12px; }
    .alb-close { margin-left: auto; }
    .alb-tabs { order: 3; width: 100%; justify-content: center; margin: 4px 0 0; }
    .alb-nav { display: none; } /* navigation au balayage */
    .alb-thumb { width: 56px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
    .album-slide { transition: none; }
    .album-card,
    .album-card:hover { transition: none; transform: none; }
}
