/* 1. Wrapper : Le cadre fixe du carrousel */
.carousel-wrapper {
    position: relative;
    max-width: 700px;
    margin: 20px auto;
    border-radius: 15px;
    overflow: hidden;
    aspect-ratio: 4 / 3; 
    /* Bleu Nuit profond pour le fond du cadre */
    background-color: #001a33; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

/* 2. Conteneur scrollable */
.carousel-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

/* 3. Slides : Chaque conteneur de photo */
.carousel-container .photo-container-carousel {
    flex: 0 0 100%;
    min-width: 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Dégradé radial allant du bleu sombre au bleu nuit pour donner de la profondeur */
    background: radial-gradient(circle, #002b55 0%, #001a33 100%);
}

/* 4. Images et vidéos : Avec cadre bleu #007BFF de 10px */
.carousel-container .photo-container-carousel img,
.carousel-container .photo-container-carousel video {
    max-width: 90%; /* On réduit un peu pour voir le fond en dégradé autour */
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain; 
    display: block;
    user-select: none;
    -webkit-user-drag: none;

    /* Ton cadre bleu de 10px */
    padding: 10px;
    background-color: #007BFF;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

/* 5. Boutons de navigation */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    /* Noir plus transparent pour laisser passer le bleu du fond */
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    padding: 0;
}

.prev:hover, .next:hover {
    background: #007BFF; /* Le bouton devient bleu au survol */
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.6);
    scale: 1.1;
}

.prev { left: 15px; }
.next { right: 15px; }

/* 6. Adaptabilité Mobile */
@media (max-width: 480px) {
    .carousel-wrapper {
        border-radius: 0;
        margin: 10px auto;
    }
    
    .carousel-container .photo-container-carousel img,
    .carousel-container .photo-container-carousel video {
        max-width: 95%; /* Plus large sur mobile */
        max-height: 95%;
        padding: 6px; /* Cadre légèrement plus fin sur mobile */
    }

    .prev, .next {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    
    .prev { left: 8px; }
    .next { right: 8px; }
}