/**
 * ═══════════════════════════════════════════════════════════════
 * RIAD DAR MAMOUNI — Lightbox galerie v3.9.20 (luxe sombre + or)
 * ═══════════════════════════════════════════════════════════════
 */

.riad-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(12, 7, 4, 0.96);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.riad-lightbox.is-open {
    display: flex;
    animation: riad-lb-in 0.22s ease;
}
@keyframes riad-lb-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Scène principale */
.riad-lightbox__stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: calc(100vh - 190px);
    overflow: hidden;
}
.riad-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

/* Bouton fermer */
.riad-lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(245, 237, 224, 0.08);
    border: 1px solid rgba(229, 199, 122, 0.3);
    color: #F5EDE0;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    z-index: 2;
}
.riad-lightbox__close:hover {
    background: rgba(229, 199, 122, 0.18);
    border-color: #E5C77A;
    color: #E5C77A;
}

/* Flèches de navigation */
.riad-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(245, 237, 224, 0.08);
    border: 1px solid rgba(229, 199, 122, 0.3);
    color: #F5EDE0;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0 0 4px;
    z-index: 2;
}
.riad-lightbox__nav:hover {
    background: rgba(229, 199, 122, 0.18);
    border-color: #E5C77A;
    color: #E5C77A;
}
.riad-lightbox__nav--prev { left: 24px; }
.riad-lightbox__nav--next { right: 24px; }

/* Compteur */
.riad-lightbox__counter {
    margin-top: 14px;
    color: #E5C77A;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

/* Bandeau de miniatures */
.riad-lightbox__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    max-width: 100%;
    overflow-x: auto;
    padding: 4px 2px 8px;
    scrollbar-width: thin;
    flex-shrink: 0;
}
.riad-lightbox__thumbs::-webkit-scrollbar { height: 5px; }
.riad-lightbox__thumbs::-webkit-scrollbar-thumb {
    background: rgba(229, 199, 122, 0.4);
    border-radius: 4px;
}
.riad-lightbox__thumb {
    width: 68px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 7px;
    overflow: hidden;
    border: 2px solid transparent;
    background: none;
    padding: 0;
    cursor: pointer;
    opacity: 0.55;
    transition: all 0.2s ease;
}
.riad-lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.riad-lightbox__thumb:hover { opacity: 0.85; }
.riad-lightbox__thumb.is-active {
    opacity: 1;
    border-color: #E5C77A;
    box-shadow: 0 0 0 1px rgba(229, 199, 122, 0.4);
}

/* Compteur dans le bouton "Voir toutes les photos" */
.rl-gallery__count {
    opacity: 0.7;
    margin-left: 2px;
}

/* Mobile */
@media (max-width: 767px) {
    .riad-lightbox { padding: 12px; }
    .riad-lightbox__stage { max-height: calc(100vh - 170px); }
    .riad-lightbox__nav {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }
    .riad-lightbox__nav--prev { left: 10px; }
    .riad-lightbox__nav--next { right: 10px; }
    .riad-lightbox__close { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 22px; }
    .riad-lightbox__thumb { width: 54px; height: 40px; }
}
