/*
 * Slider d'accueil Yetim Eli — version 5 sur grand écran,
 * avec le comportement compact du modèle 1 sur mobile.
 *
 * Le Blade actuel conserve les diapositives, photos, textes, liens et
 * commandes administrables. Cette feuille ne change que leur présentation.
 */

body.ye-v4 .y5-hero.y5-wrap {
    width: min(1380px, calc(100% - 48px));
    padding-top: 22px;
}

body.ye-v4 .y5-hero-frame {
    position: relative;
    isolation: isolate;
    min-height: clamp(470px, 49vw, 650px);
    overflow: hidden;
    border-radius: 24px;
    background: #203239;
    box-shadow: 0 22px 58px rgba(23, 45, 39, .18);
    /* Sans cela, le navigateur s'approprie le geste horizontal et annule le
       pointeur : home-slider-swipe.js ne reçoit jamais la fin du balayage. */
    touch-action: pan-y;
}

body.ye-v4 .y5-slide:not([hidden]) {
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: clamp(470px, 49vw, 650px);
    overflow: hidden;
}

body.ye-v4 .y5-hero-photo {
    position: absolute;
    z-index: 0;
    inset: 0;
    min-width: 0;
    min-height: 0;
    background: #203239;
}

body.ye-v4 .y5-hero-photo::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    width: auto;
    height: auto;
    background:
        linear-gradient(90deg, rgba(12, 35, 30, .86) 0%, rgba(12, 35, 30, .62) 42%, rgba(12, 35, 30, .12) 100%),
        linear-gradient(0deg, rgba(10, 24, 25, .38), transparent 48%);
    pointer-events: none;
}

body.ye-v4 .y5-hero-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

body.ye-v4 .y5-hero-copy {
    align-self: flex-end;
    position: relative;
    z-index: 2;
    width: min(690px, 66%);
    margin-top: auto;
    padding: clamp(36px, 6vw, 76px) 30px clamp(92px, 9vw, 118px) clamp(30px, 6.5vw, 88px);
}

body.ye-v4 .y5-hero-copy .y5-eyebrow {
    color: #f0d184;
}

body.ye-v4 .y5-hero-copy h1,
body.ye-v4 .y5-hero-copy .y5-h1 {
    max-width: 680px;
    margin: 15px 0 16px;
    color: #fff;
    font-size: clamp(42px, 5.4vw, 72px);
    line-height: 1.02;
    letter-spacing: -.045em;
    text-wrap: balance;
}

body.ye-v4 .y5-hero-copy p {
    max-width: 570px;
    margin: 0 0 25px;
    color: rgba(255, 255, 255, .9);
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.6;
}

body.ye-v4 .y5-hero-copy .y5-button {
    min-height: 50px;
    padding: 12px 20px;
    border-radius: 10px;
    background: #c94a59;
    box-shadow: 0 10px 24px rgba(15, 25, 22, .2);
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
}

body.ye-v4 .y5-hero-copy .y5-button:hover {
    transform: translateY(-2px);
    background: #b53e4d;
    box-shadow: 0 13px 28px rgba(15, 25, 22, .3);
}

body.ye-v4 .y5-slider-controls {
    right: 22px;
    bottom: 20px;
    gap: 4px;
    padding: 5px;
    border-color: rgba(255, 255, 255, .28);
    background: rgba(18, 34, 34, .64);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
    backdrop-filter: blur(12px);
}

body.ye-v4 .y5-slide-arrow {
    width: 42px;
    height: 42px;
    background: transparent;
    color: #fff;
}

body.ye-v4 .y5-slide-arrow:hover {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

body.ye-v4 .y5-slide-dot {
    width: 20px;
    height: 42px;
}

body.ye-v4 .y5-slide-dot::after {
    background: rgba(255, 255, 255, .65);
}

body.ye-v4 .y5-slide-dot[aria-current="true"]::after {
    background: #f0d184;
}

body.ye-v4 .y5-slide-count {
    color: #fff;
}

body.ye-v4 .y5-slide-count span {
    color: rgba(255, 255, 255, .7);
}

body.ye-v4 .y5-trust {
    margin: 15px 3px 0;
}

@media (max-width: 760px) {
    body.ye-v4 .y5-hero.y5-wrap {
        width: calc(100% - 24px);
        padding-top: 12px;
    }

    body.ye-v4 .y5-hero-frame {
        min-height: max(510px, 72svh);
        border-radius: 18px;
    }

    body.ye-v4 .y5-slide:not([hidden]) {
        min-height: max(510px, 72svh);
    }

    /* yetimeli-v5.css impose un format 1.55 sous 680 px : la photo ne
       couvrirait que le haut du cadre. */
    body.ye-v4 .y5-hero-photo {
        aspect-ratio: auto;
    }

    body.ye-v4 .y5-hero-photo::before {
        background:
            linear-gradient(0deg, rgba(12, 31, 28, .94) 0%, rgba(12, 31, 28, .74) 34%, rgba(12, 31, 28, .08) 78%),
            linear-gradient(90deg, rgba(12, 31, 28, .18), transparent 70%);
    }

    /* Photo plein cadre (slider 5), avec texte et CTA regroupés en bas
       comme dans le modèle mobile 1. L'image reste celle de l'admin. */
    body.ye-v4 .y5-hero-copy {
        width: 100%;
        padding: 25px 20px 88px;
    }

    body.ye-v4 .y5-hero-copy h1,
    body.ye-v4 .y5-hero-copy .y5-h1 {
        max-width: 18ch;
        margin: 11px 0 10px;
        font-size: clamp(32px, 9vw, 46px);
        line-height: 1.04;
    }

    body.ye-v4 .y5-hero-copy p {
        max-width: 42ch;
        margin-bottom: 17px;
        font-size: 15px;
        line-height: 1.5;
    }

    body.ye-v4 .y5-hero-copy .y5-button {
        min-height: 46px;
        padding: 10px 16px;
        font-size: 15px;
    }

    body.ye-v4 .y5-slider-controls {
        /* « top » est posé par yetimeli-v5.css sous 680 px : avec « bottom »,
           il étirerait les commandes sur toute la hauteur. */
        top: auto;
        right: 12px;
        bottom: 12px;
        gap: 0;
        padding: 3px;
    }

    body.ye-v4 .y5-slide-arrow {
        width: 38px;
        height: 38px;
    }

    body.ye-v4 .y5-slide-dot {
        width: 17px;
        height: 38px;
    }

    body.ye-v4 .y5-slide-count {
        padding: 0 3px;
        font-size: 11px;
    }

    body.ye-v4 .y5-trust {
        gap: 9px;
        margin: 11px 3px 0;
        font-size: 12px;
    }
}

@media (max-width: 390px) {
    body.ye-v4 .y5-hero-frame,
    body.ye-v4 .y5-slide:not([hidden]) {
        min-height: max(490px, 70svh);
    }

    body.ye-v4 .y5-hero-copy {
        padding-inline: 16px;
        padding-bottom: 84px;
    }

    body.ye-v4 .y5-slide-arrow {
        width: 35px;
        height: 36px;
    }

    body.ye-v4 .y5-slide-dot {
        width: 14px;
        height: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.ye-v4 .y5-hero *,
    body.ye-v4 .y5-hero *::before,
    body.ye-v4 .y5-hero *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
