/* Style de la lightbox */
.lightbox {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    cursor: zoom-out;
}

/* Image à l'intérieur */
.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}


/* Légende */
#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #ccc;
    padding: 15px 0;
    font-family: sans-serif;
}

/* Positionnement du bouton fermer */
.lightbox .close-overlay {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 10000;
    cursor: pointer;
}

/* On s'assure que les spans sont blancs pour ressortir sur le fond noir */
.lightbox .close-overlay span {
    background-color: #ffffff !important; 
    /* Si vos spans n'ont pas de taille par défaut dans votre CSS global, décommentez ceci : */
    /* display: block;
    width: 30px;
    height: 2px;
    margin-bottom: -2px; 
    */
}

/* Wrapper pour centrer l'image proprement */
.lightbox-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}
@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}