/* section 1 : Conteneur principal du slider */
.synexta-slider-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

/* section 2 : Enveloppe pour les diapositives, gère l'animation */
.synexta-slider-wrapper {
    display: flex;
    /* L'espacement (gap) et l'animation sont gérés par JavaScript */
}

/* Pour les sliders statiques, on empêche le retour à la ligne */
.static-slider .synexta-slider-wrapper {
    flex-wrap: nowrap;
}


/* section 3 : Style de chaque diapositive (image) */
.synexta-slider-slide {
    flex-shrink: 0; /* Empêche les images de rétrécir */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.synexta-slider-slide img {
    width: 100%;
    display: block;
}

/* Application de l'ajustement de l'image via une classe sur le conteneur */
.image-fit-cover .synexta-slider-slide img {
    object-fit: cover;
}

.image-fit-contain .synexta-slider-slide img {
    object-fit: contain;
}


/* section 4 : Style pour le texte sous l'image */
.synexta-slider-text {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    flex-grow: 1; /* Permet au texte de prendre la hauteur restante si nécessaire */
}

/* section 5 : Visionneuse d'images (Overlay / Lightbox) */

.synexta-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none; /* Caché par défaut */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
}

.synexta-overlay.active {
    display: flex; /* Affiché via JS */
}

.synexta-overlay-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

.synexta-overlay-content img {
    max-width: 100%;
    max-height: 80vh; /* Hauteur maximale de l'image pour laisser de la place au texte */
    object-fit: contain;
    display: block;
}

.synexta-overlay-caption {
    color: #f1f1f1;
    padding: 15px 0;
    font-size: 16px;
    text-align: center;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
}

.synexta-overlay-close, .synexta-overlay-prev, .synexta-overlay-next {
    position: absolute;
    cursor: pointer;
    color: white;
    font-size: 40px;
    font-weight: bold;
    user-select: none;
    background: #000;
    transition: 0.3s;
    border: 1px solid #000;
    z-index: 9;
}

.synexta-overlay-close:hover,
.synexta-overlay-prev:hover,
.synexta-overlay-next:hover {
    color: #000;
    background: #fff;
}

.synexta-overlay-close {
    top: 15px;
    right: 35px;
    font-size: 50px;
}

.synexta-overlay-prev,
.synexta-overlay-next {
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
}

.synexta-overlay-prev {
    left: 0;
}

.synexta-overlay-next {
    right: 0;
}

.synexta-overlay-caption a {
    color: #111 !important;
    border: 1px solid white;
    padding: 0px 10px;
    display: inline-block;
    background: white;
    border-radius: 0.4rem;
}

.synexta-overlay-caption a:hover {
    color: #fff !important;
    background: transparent;
    border-radius: 0.4rem;
    text-decoration: none !important;
}