/* --- Lightbox plein écran --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox.show {
    display: flex;
}

.lightbox-content img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 1rem;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.lightbox-content .before-after {
    position: relative;
    width: 90%;
    height: 80vh;
}

.lightbox-content .before-after .after {
    clip-path: inset(0 50% 0 0);
    transition: clip-path 0.3s ease;
}

.lightbox-content .before-after:hover .after {
    clip-path: inset(0 0 0 0);
}

/* --- Boutons navigation --- */
.lightbox .prev,
.lightbox .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2.5rem;
    background: rgba(0,0,0,0.3);
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
    user-select: none;
}

.lightbox .prev { left: 2rem; }
.lightbox .next { right: 2rem; }

.lightbox .prev:hover,
.lightbox .next:hover {
    background: rgba(255,255,255,0.2);
}

/* --- Bouton fermeture --- */
.lightbox .close {
    position: absolute;
    top: 1.2rem;
    right: 2rem;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    user-select: none;
}

@media (max-width: 600px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}