/* Lightbox container */
#simpleLightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* touch-action: pan-y;  Permet le défilement vertical mais pas horizontal */
}

#simpleLightbox.active {
    display: flex !important;
}

/* Lightbox content */
.lightbox-content {
    position: relative;
    width: 90vw;  /* 90% de la largeur de la fenêtre */
    height: 90vh; /* 90% de la hauteur de la fenêtre */
   
    
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* On limite la hauteur totale pour ne pas dépasser la lightbox */
    max-height: 90vh;
}

/* Image */
#lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 48px); /* 48px = place pour la légende et un peu de marge */
    border-radius: 10px;
    margin-bottom: 12px;
    display: block;

    transform: translateX(0);
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}


.hidden-left {
    transform: translateX(-100%);
    opacity: 0;
}

.hidden-right {
    transform: translateX(100%);
    opacity: 0;
}



/* Close button */

.close-btn {
    position: absolute;
    top: -40px;
    right: -20px;
    font-size: 30px;
    color: white;
    background-color: transparent;
    border: none;
    cursor: pointer;
    margin-right: 50px;
    
}

/* Arrows */
.arrow {
    position: absolute;
    top: 50%;
    /* transform: translateY(-50%); */
    font-size: 40px;
    color: white;
    background-color: transparent;
    border: none;
    cursor: pointer;
    
}

.left-arrow {
    left: 0px; /* Ajustez selon vos besoins */
    z-index: 10000;
}

.right-arrow {
    right: 0px; /* Ajustez selon vos besoins */
}

#lightbox-caption{
    color: #fff;
    background: rgba(0,0,0,0.6);
    padding: 8px 16px;
    border-radius: 8px;
    margin-top: 16px; /* ou 12px, ou ce que tu préfères */
    font-size: 1.1em;
    text-align: center;
    min-width: 60px;

    width: auto;
    align-self: center; /* Pour bien centrer dans le flex parent */
}


@media (max-width: 768px) {
    .lightbox-content {
        width: 95vw; /* Réduit la largeur pour petits écrans */
        height: auto;
    }

    #lightbox-image {
        max-width: 95%;
        max-height: 95%;
    }
    /* Cacher les flèches uniquement sur les écrans tactiles */
    .touch-device .left-arrow,
    .touch-device .right-arrow {
        display: none;
    }

/* Les flèches restent visibles sur les petits écrans non tactiles */
    .no-touch-device .left-arrow,
    .no-touch-device .right-arrow {
     display: block;
    }
}









