/* Conteneur principal du diaporama */
.diapo {
    position: relative;
    width: 100%;
    max-width: 2000px;
    margin: 40px auto;
    aspect-ratio: 16 / 9;      /* 🎯 moderne & responsive */
    overflow: hidden;
    border-radius: 12px;
    max-height: 400px;
}

/* Slide */
.element {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    transform: scale(0.75);
    filter: blur(1px);
    transition:
        transform 0.6s ease,
        opacity 0.6s ease,
        filter 0.6s ease;

    z-index: 1;
    pointer-events: none;

}

/* Image */
.element img {
    width: 75%;              
    height: 95%;
    max-width: 600px;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

/* Slide active (centre) */
.element.active {
    opacity: 1;
    transform: scale(1);
    filter: none;
    z-index: 4;
    pointer-events: auto;
}

/* Slide précédente (gauche) */
.element.prev {
    opacity: 0.5;
    transform: translateX(-30%) scale(0.85);
    z-index: 2;
}

.element.prev {
    color: transparent;
}

/* Slide suivante (droite) */
.element.next {
    opacity: 0.5;
    transform: translateX(30%) scale(0.85);
    z-index: 2;
}

/* Caption */
.caption {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);   /* 🎯 centrage parfait */

    width: 77%;
        max-width: 600px;
    padding: 12px 16px;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75),
        rgba(0, 0, 0, 0)
    );

    color: #fff;
    font-size: 0.9rem;
    text-align: center;            /* centre le texte */
}

/* cacher toutes les captions par défaut */
.element .caption {
    display: none;
}

/* afficher uniquement la caption du slide actif */
.element.active .caption {
    display: block;
}

/* Texte de la caption */
.caption h2 {
    margin: 0;
    font-size: 1.1rem;
}

.caption p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Flèches de navigation */
.nav-gauche,
.nav-droite {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    font-family: sans-serif;

    width: 48px;
    height: 100%;
    max-height: 300px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 42px;
    color: #ffffff98;

    background: rgba(0, 0, 0, 0.35);
    user-select: none;
    transition: background 0.3s ease;
}

.nav-gauche:hover,
.nav-droite:hover {
    background: rgba(0, 0, 0, 0.6);
}

.nav-gauche {
    left: 0;
}

.nav-droite {
    right: 0;
}

/* Responsive mobile */
@media (max-width: 768px) {
    .diapo {
        aspect-ratio: 4 / 3;
    }

    .caption {
        font-size: 0.8rem;
        padding: 10px 12px;
    }

    .nav-gauche,
    .nav-droite {
        font-size: 32px;
    }
}

#halal_info {
    text-align: center;
    font-size: small;
    margin-top: 10px;
    font-style: italic;
}