/* =============================================================
   EK Slider v1.1 - CSS
   ============================================================= */

/* Force la visibilité du wrapper contre tout CSS du thème */
.eksl-wrapper {
    position: relative !important;
    width: 100% !important;
    height: var(--eksl-height, 480px);
    overflow: hidden;
    background: #f0f0f0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 0;
    z-index: 1;
}

.eksl-wrapper * {
    box-sizing: border-box;
}

/* Liste des slides */
.eksl-slides {
    position: relative;
    width: 100%;
    height: 100%;
    display: block !important;
}

/* Slide individuelle */
.eksl-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    pointer-events: none;
}

/* Première slide visible par défaut, même sans JS (sécurité) */
.eksl-slide:first-child,
.eksl-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

/* Mais quand JS active une autre slide, la première redevient invisible */
.eksl-slide:first-child:not(.is-active):not(:only-child) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Image de fond */
.eksl-slide-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.eksl-slide-placeholder {
    background: linear-gradient(135deg, #cfe1ec 0%, #e8d5b7 100%);
}

/* Overlay sombre par-dessus l'image */
.eksl-slide-overlay {
    position: absolute;
    inset: 0;
    background: var(--eksl-overlay, rgba(0,0,0,0.3));
}

/* Contenu texte */
.eksl-slide-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 60px;
    max-width: 1280px;
    margin: 0 auto;
}

/* Positions du texte */
.eksl-pos-left .eksl-slide-inner {
    margin-right: auto;
    max-width: 50%;
    text-align: left;
}

.eksl-pos-center .eksl-slide-content {
    justify-content: center;
}
.eksl-pos-center .eksl-slide-inner {
    max-width: 80%;
    text-align: center;
}

.eksl-pos-right .eksl-slide-content {
    justify-content: flex-end;
}
.eksl-pos-right .eksl-slide-inner {
    margin-left: auto;
    max-width: 50%;
    text-align: right;
}

/* Textes */
.eksl-slide-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 16px;
    color: inherit;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.eksl-slide-subtitle {
    font-size: 18px;
    line-height: 1.5;
    margin: 0 0 24px;
    color: inherit;
    text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Bouton CTA */
.eksl-slide-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.eksl-slide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    opacity: 0.95;
    text-decoration: none;
}

/* Flèches */
.eksl-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: 0;
    font-size: 32px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.eksl-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.05);
}

.eksl-arrow-prev { left: 20px; }
.eksl-arrow-next { right: 20px; }

/* Indicateurs (points) */
.eksl-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.eksl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    padding: 0;
}

.eksl-dot:hover {
    background: rgba(255,255,255,0.6);
}

.eksl-dot.is-active {
    background: #fff;
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 991.98px) {
    .eksl-slide-content {
        padding: 0 40px;
    }
    .eksl-slide-title {
        font-size: 36px;
    }
    .eksl-slide-subtitle {
        font-size: 16px;
    }
    .eksl-pos-left .eksl-slide-inner,
    .eksl-pos-right .eksl-slide-inner {
        max-width: 70%;
    }
    .eksl-arrow {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

@media (max-width: 575.98px) {
    .eksl-wrapper {
        height: 320px;
    }
    .eksl-slide-content {
        padding: 0 20px;
    }
    .eksl-pos-left .eksl-slide-inner,
    .eksl-pos-right .eksl-slide-inner,
    .eksl-pos-center .eksl-slide-inner {
        max-width: 100%;
        text-align: center;
    }
    .eksl-pos-left .eksl-slide-content,
    .eksl-pos-right .eksl-slide-content {
        justify-content: center;
    }
    .eksl-slide-title {
        font-size: 26px;
    }
    .eksl-slide-subtitle {
        font-size: 14px;
        margin-bottom: 16px;
    }
    .eksl-slide-btn {
        padding: 10px 22px;
        font-size: 13px;
    }
    .eksl-arrow {
        display: none;
    }
}
