/* Conteneur principal du carrousel */
.image-gallery-container {
    position: relative;
    width: 100%;
    max-width: 1920px; /* Largeur maximale du carrousel */
    margin: 20px auto;
    overflow: hidden; /* Cache les éléments hors de la zone visible */
}

/* Conteneur des éléments du carrousel (disposition horizontale) */
.image-gallery {
    display: flex; /* Disposition horizontale */
    transition: transform 0.3s ease;
}

/* Chaque image */
.image-gallery-item {
    margin-right: 5px; /* Espacement entre les images */
    flex-shrink: 0; /* Empêche l'image de rétrécir */
}

/* Images du carrousel */
.image-gallery-item img {
    width: auto; /* L'image peut avoir une largeur variable */
    height: 320px; /* Hauteur fixe de l'image */
    max-width: 100%; /* Les images ne dépassent pas la largeur de l'élément */
    object-fit: cover; /* Maintien du ratio et découpe l'image si nécessaire */
}

/* Flèches de navigation */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    font-size: 30px;
    cursor: pointer;
    z-index: 1;
}

/* Flèche précédente */
.prev {
    left: 10px;
}

/* Flèche suivante */
.next {
    right: 10px;
}

/* Désactiver les flèches quand on atteint le début ou la fin */
.arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsivité */
@media screen and (max-width: 768px) {
    .image-gallery-container {
        width: 90%;
    }

    .image-gallery-item img {
        height: auto;
    }
}

@media screen and (max-width: 480px) {
    .image-gallery-container {
        width: 100%;
    }

    .arrow {
        font-size: 24px;
        padding: 8px;
    }
}
