/* ==========================================================================
   LEH HERO SLIDER — Stylesheet premium
   Glassmorphism · micro-animations · gradients · parallax
   ========================================================================== */

/* ---------- Reset & base ---------- */
.leh-hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    isolation: isolate;
    background: #0a1e15;
}

.leh-hero-slider *,
.leh-hero-slider *::before,
.leh-hero-slider *::after {
    box-sizing: border-box;
}

.leh-hero-slider button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* ---------- Pattern décoratif (motif fluide animé) ---------- */
.leh-pattern-decoration {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 600px;
    height: 600px;
    z-index: 2;
    color: rgba(122, 181, 92, 0.15);
    pointer-events: none;
    animation: leh-rotate 60s linear infinite;
}

.leh-pattern-decoration svg {
    width: 100%;
    height: 100%;
}

@keyframes leh-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ---------- Slides wrapper ---------- */
.leh-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.leh-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 1s ease-in-out, visibility 1s;
    z-index: 1;
}

.leh-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

/* ---------- Background image avec Ken Burns ---------- */
.leh-slide-bg {
    position: absolute;
    inset: -5%;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    transform: scale(1);
    transition: transform 8s ease-out;
    will-change: transform;
}

.leh-hero-slider[data-effect="fade-zoom"] .leh-slide.active .leh-slide-bg {
    animation: leh-ken-burns 12s ease-out forwards;
}

@keyframes leh-ken-burns {
    0%   { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.15) translate(-2%, -2%); }
}

/* Slide effects variants */
.leh-hero-slider[data-effect="slide-left"] .leh-slide {
    transform: translateX(100%);
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 0s 1s;
}
.leh-hero-slider[data-effect="slide-left"] .leh-slide.active {
    transform: translateX(0);
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.leh-hero-slider[data-effect="slide-left"] .leh-slide.leaving {
    transform: translateX(-100%);
}

.leh-hero-slider[data-effect="slide-up"] .leh-slide {
    transform: translateY(100%);
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 0s 1s;
}
.leh-hero-slider[data-effect="slide-up"] .leh-slide.active {
    transform: translateY(0);
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}
.leh-hero-slider[data-effect="slide-up"] .leh-slide.leaving {
    transform: translateY(-100%);
}

/* ---------- Overlay ---------- */
.leh-slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ---------- Inner container ---------- */
.leh-slide-inner {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    z-index: 3;
    display: flex;
    align-items: center;
}

.leh-slide-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ---------- Badge (glassmorphism) ---------- */
.leh-slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 28px;
    width: fit-content;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

.leh-slide-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: rotate(45deg);
    animation: leh-shine 5s infinite;
}

@keyframes leh-shine {
    0%   { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.leh-slide-badge i,
.leh-slide-badge svg {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

/* ---------- Sur-titre ---------- */
.leh-slide-pretitle {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #7AB55C;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.leh-pretitle-line {
    width: 40px;
    height: 2px;
    background: currentColor;
    display: inline-block;
    transform-origin: left;
    animation: leh-line-grow 1s ease-out 0.2s both;
}

@keyframes leh-line-grow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* ---------- Titre principal ---------- */
.leh-slide-title {
    font-size: clamp(2.2rem, 4.5vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    color: #fff;
    margin: 0 0 24px;
    letter-spacing: -0.02em;
}

.leh-slide-title-highlight {
    position: relative;
    color: #7AB55C;
    display: inline;
}

/* Le soulignement courbé nécessite inline-block pour le background-size,
   mais on autorise le wrap avec box-decoration-break */
.leh-highlight-underline-curved,
.leh-highlight-background {
    display: inline;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Highlight: trait courbé dessous */
.leh-highlight-underline-curved {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'><path d='M5,8 Q50,2 100,7 T195,8' stroke='%237AB55C' stroke-width='3' fill='none' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat;
    background-position: bottom left;
    background-size: 100% 0.3em;
    padding-bottom: 0.15em;
}

/* Highlight: trait droit */
.leh-highlight-underline-straight {
    border-bottom: 4px solid currentColor;
    padding-bottom: 0.05em;
}

/* Highlight: surligné fond */
.leh-highlight-background {
    background: rgba(122, 181, 92, 0.25);
    padding: 0.05em 0.2em;
    border-radius: 6px;
}

/* Highlight: italique cursive */
.leh-highlight-italic {
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 400;
}

/* ---------- Description ---------- */
.leh-slide-description {
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.7;
    color: rgba(255,255,255,0.92);
    margin: 0 0 32px;
    max-width: 600px;
}

/* ---------- Features list ---------- */
.leh-slide-features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 28px;
    margin: 0 0 36px;
    padding: 0;
    list-style: none;
}

.leh-slide-feature {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

.leh-slide-feature i,
.leh-slide-feature svg {
    color: #7AB55C;
    fill: #7AB55C;
    width: 18px;
    height: 18px;
    font-size: 18px;
    flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.leh-slide-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.leh-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 36px;
    border-radius: 60px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    will-change: transform;
}

.leh-btn-text {
    position: relative;
    z-index: 2;
}

.leh-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 2;
}

.leh-btn-icon i,
.leh-btn-icon svg {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.leh-btn:hover .leh-btn-icon {
    transform: translateX(6px);
}

/* Btn primary */
.leh-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #1B4D2E 0%, #4A7C3B 100%);
    background-size: 200% 200%;
    background-position: 0% 50%;
}

.leh-btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: 1;
}

.leh-btn-primary:hover {
    transform: translateY(-3px);
    background-position: 100% 50%;
}

.leh-btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

.leh-btn-primary:active {
    transform: translateY(-1px);
}

/* Btn secondary (glassmorphism) */
.leh-btn-secondary {
    color: #fff;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(255,255,255,0.35);
}

.leh-btn-secondary:hover {
    background: #fff;
    border-color: #fff;
    color: #1B4D2E;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ---------- Arrows ---------- */
.leh-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1.5px solid rgba(255,255,255,0.25);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.4s ease;
}

.leh-arrow svg {
    width: 22px;
    height: 22px;
    transition: transform 0.4s ease;
}

.leh-arrow:hover {
    background: #7AB55C;
    border-color: #7AB55C;
    transform: translateY(-50%) scale(1.1);
}

.leh-arrow-prev { left: 30px; }
.leh-arrow-next { right: 30px; }

.leh-arrow-prev:hover svg { transform: translateX(-3px); }
.leh-arrow-next:hover svg { transform: translateX(3px); }

/* ---------- Pagination ---------- */
.leh-pagination {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

/* Dots */
.leh-pagination-item.is-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    border: none;
    padding: 0;
    transition: all 0.4s ease;
}

.leh-pagination-item.is-dot.active {
    width: 32px;
    border-radius: 6px;
    background: #7AB55C;
}

/* Progress bars */
.leh-pagination-item.is-progress {
    width: 60px;
    height: 3px;
    border-radius: 3px;
    background: rgba(255,255,255,0.3);
    border: none;
    padding: 0;
    position: relative;
    overflow: hidden;
}

.leh-pagination-fill {
    position: absolute;
    inset: 0;
    background: #7AB55C;
    width: 0;
    border-radius: 3px;
    transition: width 0.1s linear;
}

.leh-pagination-item.is-progress.active .leh-pagination-fill {
    animation: leh-progress-fill var(--leh-autoplay-duration, 6s) linear forwards;
}

@keyframes leh-progress-fill {
    from { width: 0%; }
    to   { width: 100%; }
}

/* Numbers */
.leh-pagination-item.is-numbers {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    color: rgba(255,255,255,0.3);
    font-size: 13px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    border: none;
    padding: 0;
    transition: all 0.4s ease;
}

.leh-pagination-item.is-numbers.active {
    color: #7AB55C;
    transform: scale(1.3);
}

/* ---------- Counter (01/03) ---------- */
.leh-counter {
    position: absolute;
    bottom: 50px;
    right: 50px;
    display: flex;
    align-items: baseline;
    gap: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    z-index: 10;
}

.leh-counter-current {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.leh-counter-divider {
    font-size: 20px;
    opacity: 0.5;
    margin: 0 4px;
}

.leh-counter-total {
    font-size: 14px;
    opacity: 0.7;
}

/* ---------- Scroll indicator ---------- */
.leh-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 10;
    animation: leh-bounce 2.5s infinite;
}

.leh-scroll-mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255,255,255,0.55);
    border-radius: 14px;
    position: relative;
}

.leh-scroll-wheel {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    animation: leh-scroll-wheel-anim 1.8s infinite;
}

@keyframes leh-scroll-wheel-anim {
    0%   { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, 14px); }
}

.leh-scroll-text {
    color: rgba(255,255,255,0.65);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}

@keyframes leh-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, -8px); }
}

/* ---------- Shape divider ---------- */
.leh-shape-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    line-height: 0;
    pointer-events: none;
}

.leh-shape-divider svg {
    width: 100%;
    height: 80px;
    display: block;
}

.leh-shape-divider path {
    fill: #fff;
}

/* ---------- Animations d'entrée (slide active) ---------- */
.leh-slide [data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.leh-slide.active [data-animate] {
    opacity: 1;
    transform: translateY(0);
}

.leh-slide.active [data-animate][data-delay="0"]   { transition-delay: 0.2s; }
.leh-slide.active [data-animate][data-delay="100"] { transition-delay: 0.35s; }
.leh-slide.active [data-animate][data-delay="200"] { transition-delay: 0.5s; }
.leh-slide.active [data-animate][data-delay="300"] { transition-delay: 0.65s; }
.leh-slide.active [data-animate][data-delay="400"] { transition-delay: 0.8s; }
.leh-slide.active [data-animate][data-delay="500"] { transition-delay: 0.95s; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .leh-arrow-prev { left: 15px; }
    .leh-arrow-next { right: 15px; }
    .leh-counter { right: 30px; }

    .leh-hero-slider .leh-slide-inner {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}

@media (max-width: 767px) {
    /* === MOBILE : navigation par swipe uniquement === */

    /* Highlight : autorise la coupure du mot accentué si trop long
       (évite le débordement horizontal sur petit écran) */
    html body .leh-hero-slider .leh-slide-title-highlight {
        white-space: normal !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
    }

    /* PADDING GÉNÉRAL : air en haut + en bas standard */
    html body .leh-hero-slider .leh-slide-inner,
    html body .leh-hero-slider .leh-slide {
        padding-top: 80px !important;
        padding-bottom: 80px !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    /* Badge plus compact, avec marge basse pour respirer */
    html body .leh-hero-slider .leh-slide-badge {
        font-size: 12px !important;
        padding: 10px 18px !important;
        margin-bottom: 24px !important;
    }

    /* Pré-titre */
    html body .leh-hero-slider .leh-slide-pretitle {
        gap: 10px !important;
        letter-spacing: 1.5px !important;
        font-size: 12px !important;
        margin-bottom: 16px !important;
    }
    html body .leh-hero-slider .leh-pretitle-line { width: 20px !important; }

    /* Titre */
    html body .leh-hero-slider .leh-slide-title {
        font-size: clamp(34px, 9vw, 52px) !important;
        line-height: 1.1 !important;
        margin-bottom: 20px !important;
    }

    /* Description */
    html body .leh-hero-slider .leh-slide-description {
        font-size: 15px !important;
        line-height: 1.55 !important;
        margin-bottom: 24px !important;
    }

    /* Features en colonne pour éviter débordement */
    html body .leh-hero-slider .leh-slide-features {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: flex-start !important;
        margin-bottom: 32px !important;
    }
    html body .leh-hero-slider .leh-slide-feature {
        font-size: 14px !important;
    }

    /* Boutons CTA full-width empilés, avec bon espacement */
    html body .leh-hero-slider .leh-slide-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 14px !important;
        margin-top: 28px !important;
        margin-bottom: 0 !important;
    }
    html body .leh-hero-slider .leh-btn {
        justify-content: center !important;
        width: 100% !important;
        padding: 16px 24px !important;
        font-size: 15px !important;
    }

    /* === NAVIGATION MASQUÉE SUR MOBILE === */
    /* Sur mobile, l'utilisateur swipe pour changer de slide */
    html body .leh-hero-slider .leh-arrow,
    html body .leh-hero-slider .leh-pagination,
    html body .leh-hero-slider .leh-counter,
    html body .leh-hero-slider .leh-scroll-indicator {
        display: none !important;
    }

    /* Indicateur swipe minimaliste (3 dots discrets en bas) */
    html body .leh-hero-slider::after {
        content: "";
        position: absolute;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.4);
        border-radius: 2px;
        z-index: 5;
        pointer-events: none;
    }

    /* Pattern décoratif moins envahissant */
    html body .leh-hero-slider .leh-pattern-decoration {
        width: 280px !important;
        height: 280px !important;
        top: -40px !important;
        right: -80px !important;
        opacity: 0.5 !important;
    }

    /* Shape divider mobile */
    html body .leh-hero-slider .leh-shape-divider svg { height: 60px !important; }
}

/* === Très petits écrans (≤ 380px) === */
@media (max-width: 380px) {
    .leh-hero-slider .leh-slide-inner {
        padding: 75px 14px 200px !important;
    }
    .leh-slide-title {
        font-size: clamp(30px, 8.5vw, 44px) !important;
    }
    .leh-slide-description {
        font-size: 14px;
    }
    .leh-btn {
        padding: 14px 20px;
        font-size: 14px;
    }
    .leh-arrow {
        width: 42px;
        height: 42px;
    }
}

/* ---------- Accessibilité : reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .leh-hero-slider *,
    .leh-hero-slider *::before,
    .leh-hero-slider *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .leh-slide.active .leh-slide-bg {
        animation: none !important;
    }
}
