/* Explain: Styles for the property image gallery, including thumbnails and lightbox. */
/* Galerie photos des biens — vignettes + visionneuse plein écran */
.gallery-main-btn {
    cursor: zoom-in;
}

.gallery-thumb {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    opacity: 0.72;
    transition: opacity 300ms ease, outline-color 300ms ease;
}

.gallery-thumb:hover {
    opacity: 1;
}

.gallery-thumb.is-active {
    opacity: 1;
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 5vw, 3.5rem);
    background: rgba(22, 36, 29, 0.94);
    backdrop-filter: blur(6px);
}

.gallery-lightbox.is-open {
    display: flex;
}

.gallery-lightbox-image {
    max-width: min(100%, 1160px);
    max-height: 84vh;
    border-radius: 1.2rem;
    object-fit: contain;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

.gallery-lightbox-close {
    position: absolute;
    top: clamp(1rem, 3vw, 1.75rem);
    right: clamp(1rem, 3vw, 1.75rem);
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(198, 161, 91, 0.45);
    border-radius: 999px;
    background: rgba(198, 161, 91, 0.16);
    color: #EFE9DA;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 300ms ease;
}

.gallery-lightbox-close:hover {
    background: rgba(198, 161, 91, 0.32);
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    display: inline-flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(198, 161, 91, 0.45);
    border-radius: 999px;
    background: rgba(198, 161, 91, 0.16);
    color: #EFE9DA;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 300ms ease;
}

.gallery-lightbox-nav:hover {
    background: rgba(198, 161, 91, 0.32);
}

.gallery-lightbox-prev {
    left: clamp(0.75rem, 3vw, 2rem);
}

.gallery-lightbox-next {
    right: clamp(0.75rem, 3vw, 2rem);
}

.gallery-counter {
    position: absolute;
    right: 0.9rem;
    bottom: 0.9rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(22, 36, 29, 0.72);
    color: #EFE9DA;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    pointer-events: none;
}

.gallery-lightbox-counter {
    position: absolute;
    bottom: clamp(1rem, 3vw, 1.75rem);
    left: 50%;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(198, 161, 91, 0.45);
    border-radius: 999px;
    background: rgba(198, 161, 91, 0.2);
    color: #EFE9DA;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    transform: translateX(-50%);
    pointer-events: none;
}

.gallery-debug .gallery-thumb-low-res {
    outline: 2px dashed #9B4A3D;
    outline-offset: 2px;
}