/* VISITE360 — CARROUSEL LIGHTBOX FLOTTANT */

#info-lightbox-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    background: rgba(15, 10, 25, 0.75) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
}

/* Masquage explicite quand la classe hidden est présente */
#info-lightbox-overlay.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

#info-lightbox-container {
    width: 85vw !important;
    height: 80vh !important;
    max-width: 1100px !important;
    max-height: 750px !important;
    border-radius: 24px !important;
    overflow: hidden !important;
    position: relative !important;
    background: #0f172a !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.lightbox-close-btn {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 100001 !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.95) !important;
    color: #4c1d95 !important;
    border: none !important;
    font-size: 24px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lightbox-btn-prev,
.lightbox-btn-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    z-index: 100000 !important;
    transition: background 0.2s !important;
}

.lightbox-btn-prev:hover,
.lightbox-btn-next:hover {
    background: rgba(141, 87, 198, 0.9) !important;
}

.lightbox-btn-prev { left: 16px !important; }
.lightbox-btn-next { right: 16px !important; }

.lightbox-flat-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

/* Conteneur média + ergonomie mobile */
.lightbox-media-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: pan-y;
}

#lightbox-pano-viewer {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.lightbox-caption {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    z-index: 100002;
    max-width: calc(100% - 140px);
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 14px;
    text-align: center;
    pointer-events: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox-counter {
    position: absolute;
    left: 50%;
    top: 14px;
    transform: translateX(-50%);
    z-index: 100002;
    padding: 6px 11px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 13px;
    pointer-events: none;
}

body.info-lightbox-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    #info-lightbox-overlay {
        padding: 8px !important;
        align-items: center !important;
    }

    #info-lightbox-container {
        width: 100% !important;
        height: min(88vh, 760px) !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 16px !important;
    }

    .lightbox-btn-prev,
    .lightbox-btn-next {
        width: 40px !important;
        height: 40px !important;
        font-size: 22px !important;
        background: rgba(15, 23, 42, 0.72) !important;
    }

    .lightbox-btn-prev { left: 8px !important; }
    .lightbox-btn-next { right: 8px !important; }

    .lightbox-close-btn {
        top: 8px !important;
        right: 8px !important;
        width: 38px !important;
        height: 38px !important;
        font-size: 21px !important;
    }

    .lightbox-caption {
        bottom: 10px;
        max-width: calc(100% - 110px);
        font-size: 12px;
        padding: 7px 11px;
    }

    .lightbox-counter {
        top: 10px;
        font-size: 12px;
    }
}


/* Indication explicite sur les images des points info */
.info-image-wrap {
    position: relative;
    width: 100%;
    margin: 0 0 12px;
}

.info-image-wrap[hidden],
.info-image-hint[hidden] {
    display: none !important;
}

.info-image-wrap {
    position: relative;
    z-index: 2;
    pointer-events: auto !important;
}

.info-image-wrap #infoImage {
    display: block;
    width: 100%;
    cursor: pointer;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: filter 0.18s ease, transform 0.18s ease;
}

.info-image-wrap:hover #infoImage {
    filter: brightness(0.82);
}

.info-image-hint {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 8px 12px;
    box-sizing: border-box;
    background: linear-gradient(transparent, rgba(0,0,0,0.72));
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
}

@media (max-width: 700px) {
    .info-image-hint {
        font-size: 12px;
        padding: 9px 10px;
    }
}
