/* Styles pour les diaporamas verticaux */

/* Conteneur multi-diaporamas */
.multi-carousel-container {
    display: flex;
    flex-wrap: nowrap; /* Empêcher le retour à la ligne */
    gap: 15px;
    justify-content: center;
    width: 100%;
    max-width: 1000px; /* Augmentation de la largeur maximale pour PC */
    margin: 0 auto; /* Centrer le conteneur */
}

/* Chaque colonne de diaporama - adaptée pour responsive */
.carousel-column {
    flex: 1;
    min-width: 160px; /* Réduire encore pour s'adapter aux petits écrans */
    max-width: 300px; /* Largeur augmentée pour une meilleure visibilité sur PC */
    margin-bottom: 15px;
    width: 100%; /* Garantir que la colonne prend toute la largeur disponible */
}

/* Styles du carrousel vertical */
.carousel-vertical {
    margin-bottom: 0.5rem; /* Réduire la marge inférieure */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    background-color: #f8f9fa;
}

.carousel-inner {
    border-radius: 8px;
}

/* Container pour les images verticales - hauteur responsive */
.vertical-img-container {
    height: 0; /* Hauteur initiale nulle */
    padding-bottom: 133.33%; /* Ratio 3:4 (4/3 * 100%) pour un format portrait */
    position: relative; /* Pour le positionnement absolu de l'image */
    display: block; /* Changement pour block */
    background-color: #f8f9fa;
    overflow: hidden; /* Masquer le débordement */
    width: 100%; /* Prendre toute la largeur disponible */
}

/* Style pour les images verticales - positionnement absolu pour responsivité */
.vertical-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recadrer l'image */
    object-position: center; /* Centrer l'image */
}

/* Indicateurs personnalisés pour diaporamas verticaux */
.carousel-indicators {
    margin-bottom: 0;
}

.carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(250, 184, 75, 0.5);
    border: none;
    margin: 0 3px;
}

.carousel-indicators .active {
    background-color: #fab84b;
    transform: scale(1.2);
}

/* Contrôles (flèches) pour format vertical - version améliorée pour responsive */
.carousel-control-prev, .carousel-control-next {
    width: 12%;
    height: 12%;
    top: 45%; /* Centrer verticalement */
    opacity: 0.7;
    transition: opacity 0.3s ease;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control-prev {
    left: 5px;
}

.carousel-control-next {
    right: 5px;
}

.carousel-control-prev:hover, .carousel-control-next:hover {
    opacity: 0.9;
    background-color: rgba(0, 0, 0, 0.25);
}

/* Réduire la taille des icônes sur petit écran */
@media (max-width: 576px) {
    .carousel-control-prev-icon, .carousel-control-next-icon {
        width: 15px;
        height: 15px;
    }
}

/* Légendes des images pour format vertical */
.carousel-caption {
    padding: 6px 10px;
    border-radius: 5px;
    bottom: 10px;
    max-width: 90%;
    left: 5%;
    right: 5%;
    background-color: rgba(0, 0, 0, 0.5);
}

.carousel-vertical .carousel-caption h5 {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.carousel-vertical .carousel-caption p {
    font-size: 0.8rem;
    margin-bottom: 0;
}

/* Miniatures pour diaporamas verticaux - masquées */
.thumbnails-container {
    display: none; /* Masquer complètement les miniatures */
}

/* Compteur de photos */
.photo-counter {
    text-align: center;
    font-size: 0.75rem;
    color: #888;
    margin: 2px 0 10px;
}

/* Titre du diaporama */
.carousel-title {
    font-size: 1.1rem;
    margin-bottom: 8px;
    text-align: center;
    color: #333;
    font-weight: 600;
}

/* Responsive */
@media (min-width: 992px) {
    /* Maintenir les 3 colonnes côte à côte sur desktop */
    .multi-carousel-container {
        justify-content: space-between;
        max-width: 1000px;
        margin: 0 auto;
    }

    .carousel-column {
        flex: 0 0 calc(33.333% - 15px); /* Largeur fixe pour les 3 colonnes */
        max-width: 320px; /* Largeur maximale définie pour chaque colonne */
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    /* Sur tablette, garder les 3 colonnes mais plus petites */
    .multi-carousel-container {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 10px;
        max-width: 650px;
    }

    .carousel-column {
        flex: 0 0 calc(33.333% - 10px); /* Largeur fixe pour les 3 colonnes */
    }

    .carousel-title {
        font-size: 0.95rem;
    }

    .carousel-caption h5 {
        font-size: 0.8rem;
    }
}

@media (max-width: 767px) and (min-width: 576px) {
    /* Sur petite tablette, passer à 2 colonnes en flex-wrap */
    .multi-carousel-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        max-width: 460px;
    }

    .carousel-column {
        flex: 0 0 calc(50% - 10px); /* Deux colonnes de largeur égale */
        margin-bottom: 20px;
    }

    .carousel-caption {
        padding: 3px 6px;
        bottom: 5px;
    }

    .carousel-caption h5 {
        font-size: 0.75rem;
        margin-bottom: 0;
    }

    .carousel-caption p {
        display: none;
    }
}

@media (max-width: 575px) {
    /* Sur mobile, aligner les colonnes verticalement */
    .multi-carousel-container {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }

    .carousel-column {
        width: 85%; /* Prendre plus de largeur sur mobile */
        max-width: 280px;
        margin-bottom: 0;
    }
}