body {
    margin: 0;
}

.maincontent {
    display: flex;
    height: 50rem;
    width: 75%;
    gap: 10px;
    padding: 10px;
    margin: 1rem 5% 0rem 12%;
}

.slideshow-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 60%;
    position: relative;
    min-height: 500px; 
}

#slideshow {
    border: 5px solid rgb(27, 27, 27);
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

#slideshow img {
    width: 100%;
    height: 87vh; 
    display: none;
}

#slideshow img.active {
    display: block;
}

#thumbnails {
    display: flex;
    flex-direction: column;
    background-color: rgb(27, 27, 27);
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 26px;
    margin-left: -10px;
    max-height: 100%;
    height: 94.7%;
}

.thumbnailstitle {
    width: 130%;
    margin: -26px -22px 0px -22px;
    background-color: rgb(243, 208, 11);
    font-size: 22px;
    text-align: center;
    font-family: "Anton", sans-serif;
    padding: 5px;
    font-weight: 400;
    font-style: normal;
}

#thumbnails img {
    width: 200px;
    height: 100px;
    margin: 5px;
    filter: grayscale(100%);
    object-fit: cover;
    cursor: pointer;
    transition: 0.3s;
}

#thumbnails img:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
}

#thumbnails img.active-thumb {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.89); 
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease-in-out; 
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.modal img {
    max-width: 100%;
    max-height: 100%;
    transform: scale(0.7); 
    animation: zoomIn 0.5s ease-out forwards; 
}

@keyframes zoomIn {
    0% {
        transform: scale(0.7); 
    }
    100% {
        transform: scale(1); /* Agrandit à sa taille normale */
    }
}

/* Style de la croix pour fermer la modale */


@media (max-width: 1100px) {
    .maincontent {
        flex-direction: column;
        align-items: center;
        width: 95%;
        height: 98vh;
        margin: 1rem auto;
    }

    .slideshow-container {
        max-width: 100%;
        height: 85vh;
    }

    #slideshow {
    border: none;
    position: relative;
    width: 100%;
    height: 85vh;
    cursor: pointer;
}

    #slideshow img {
    width: 100%;
    height: 85vh; 
    display: none;
}
    .thumbnailstitle {
        display: none;
    }

#thumbnails {
    display: flex;
    flex-direction: row;
    background-color: rgb(27, 27, 27);
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    width: 97.3%;
    padding: 10px;
    margin-top: -10px;
    margin-left: 0px;
    max-height: 100%;
    gap: 10px;
}

#thumbnails img {
    flex: 0 0 auto;
    width: 150px;  
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    transition: 0.3s;
    filter: grayscale(100%);
}
}