/* ============================================
   LIGHTBOX v3 — CSS
   À placer dans : user/themes/gommecourt/css/lightbox.css
   
   Plus de .lightbox-wrap : on style directement 
   les images marquées .lightbox-img par le JS.
   ============================================ */

/* Curseur zoom-in sur les images cliquables */
img.lightbox-img {
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

img.lightbox-img:hover {
    opacity: 0.88;
}

/* Overlay plein écran */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    cursor: zoom-out;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 95%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    cursor: zoom-out;
}

/* Bouton fermer */
.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
    background: none;
    border: none;
    font-family: inherit;
    padding: 0.5rem;
}

.lightbox-close:hover {
    opacity: 1;
}

/* Légende sous l'image */
.lightbox-caption {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: #ccc;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    max-width: 80%;
    z-index: 10000;
}
