/* Styles de la modale */
.modal {
    display: none;
    /* Par défaut, la modale est masquée */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    max-width: 60%;
    /* max-height: 80%; */
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#modalImage {
    width: 60%;
    height: auto;
    border-radius: 8px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 30px;
    color: #ffffff;
    cursor: pointer;
}

.modal-navigation {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.prev-image,
.next-image {
    padding: 10px;
}

/* Appliquer une transition sur l'opacité de l'image */
#modalImage {
    transition: opacity 1s ease-in-out;
    /* Définir la transition sur l'opacité */
}

/* Ajouter une classe pour masquer l'image lors du changement */
.fade-out {
    opacity: 0;
}

@media screen and (max-width: 660px) {

    #modalImage {
        width: 90vw;
        height: auto;

    }
}

@media screen and (max-width: 960px) {

    /* modal */

    .modal-content {
        max-width: 80%;
        max-height: 80%;

    }

    #modalImage {
        width: 100%;
        height: auto;

    }
}
