/* ============================================================
   HERO 16 — LISIERE
   Deux moities : un aplat de marque qui porte le texte, une photo qui porte
   l'ambiance. Aucun texte n'est pose sur l'image : le contraste est celui que
   le theme garantit pour --primary (§4.14), quelle que soit la photo.
   La frontiere n'est pas une ligne mais une vague, de la couleur du panneau,
   qui ondule lentement : c'est la signature de la variante.
   ============================================================ */

.hero-16 {
    /* Or des etoiles d'avis : couleur de SENS, pas de charte (§4.1). Une note
       se lit en etoiles dorees sur tous les sites, et ce dore ne se confond ni
       avec un aplat --primary ni avec un accent --secondary. */
    --hero-16-etoile: #e3a53a;

    background: var(--primary);
    color: var(--on-primary);
    overflow: hidden;
}

.hero-16__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: clamp(540px, calc(100svh - var(--header-height)), 880px);
}

/* ---- Le texte, sur l'aplat ---------------------------------- */
.hero-16__texte {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(0.9rem, 1.6vw, 1.35rem);
    padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 4vw, 4rem) clamp(2.5rem, 6vw, 5rem) max(5vw, calc((100vw - 1280px) / 2));
}

.hero-16__surtitre {
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    line-height: 1.4;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--on-primary) 78%, transparent);
    animation: hero16Monte 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-16__titre,
.hero-16__titre:hover {
    margin: 0;
    max-width: 16ch;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.01em;
    color: var(--on-primary);
    animation: hero16Monte 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* Le mot-cle marque ((…)) : italique, plus fin — la voix change, pas la couleur,
   qui doit rester celle que le theme garantit sur l'aplat. */
.hero-16__titre .mcl-accent {
    font-style: italic;
    font-weight: 400;
    color: var(--on-primary);
}

.hero-16__desc {
    margin: 0;
    max-width: 46ch;
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.15vw, 1.1rem);
    font-weight: 300;
    line-height: 1.75;
    color: color-mix(in srgb, var(--on-primary) 86%, transparent);
    animation: hero16Monte 1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

/* ---- Actions ------------------------------------------------ */
.hero-16__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.4rem;
    animation: hero16Monte 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.hero-16__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.9rem 1.9rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: none;
    color: inherit;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.hero-16__btn--principal {
    background: var(--secondary);
    color: var(--on-secondary);
}

.hero-16__btn--principal:hover,
.hero-16__btn--principal:focus-visible {
    background: var(--on-primary);
    color: var(--primary);
}

.hero-16__btn--secondaire {
    border-color: color-mix(in srgb, var(--on-primary) 45%, transparent);
    color: var(--on-primary);
}

.hero-16__btn--secondaire:hover,
.hero-16__btn--secondaire:focus-visible {
    border-color: var(--on-primary);
    background: var(--on-primary);
    color: var(--primary);
}

.hero-16__btn:focus-visible {
    outline: 2px solid var(--on-primary);
    outline-offset: 3px;
}

/* ---- Pied : preuve sociale et reassurance ------------------- */
.hero-16__pied {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: clamp(0.5rem, 1.5vw, 1.25rem);
    padding-top: clamp(1rem, 1.8vw, 1.5rem);
    border-top: 1px solid color-mix(in srgb, var(--on-primary) 18%, transparent);
    animation: hero16Monte 1s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both;
}

.hero-16__avis {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
    margin: 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--on-primary) 86%, transparent);
}

.hero-16__avis-texte {
    color: color-mix(in srgb, var(--on-primary) 86%, transparent);
}

.hero-16__avis-note {
    font-weight: 600;
    color: var(--on-primary);
}

/* Cinq etoiles dessinees par un masque, remplies au prorata de la note. */
.hero-16__etoiles {
    display: inline-block;
    flex: none;
    width: 5.6em;
    height: 1em;
    background: linear-gradient(90deg, var(--hero-16-etoile) var(--hero-16-note, 100%), color-mix(in srgb, var(--on-primary) 28%, transparent) 0);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l2.9 6.6 7.1.7-5.4 4.8 1.6 7L12 17.6l-6.2 3.7 1.6-7L2 9.5l7.1-.7z'/%3E%3C/svg%3E") 0 0 / 1.12em 1em repeat-x;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.2l2.9 6.6 7.1.7-5.4 4.8 1.6 7L12 17.6l-6.2 3.7 1.6-7L2 9.5l7.1-.7z'/%3E%3C/svg%3E") 0 0 / 1.12em 1em repeat-x;
}

.hero-16__points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-16__point {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.4;
    color: color-mix(in srgb, var(--on-primary) 80%, transparent);
}

.hero-16__point-icone {
    display: inline-flex;
    flex: none;
    width: 17px;
    height: 17px;
    color: var(--on-primary);
}

/* Le <svg> vient de mcl_icone() : pas de classe possible, on le vise sous son
   conteneur, qui n'heberge aucun sous-composant (§4.12). */
.hero-16__point-icone svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

/* ---- La photo et sa lisiere --------------------------------- */
.hero-16__visuel {
    position: relative;
    overflow: hidden;
    background: color-mix(in srgb, var(--on-primary) 12%, var(--primary));
}

.hero-16__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: hero16Apparait 1.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-16__lisiere {
    position: absolute;
    display: block;
    pointer-events: none;
}

.hero-16__lisiere-trace {
    fill: var(--primary);
}

.hero-16__lisiere--verticale {
    top: 0;
    left: -1px;
    width: clamp(48px, 7vw, 112px);
    height: 200%;
    animation: hero16MareeY 14s ease-in-out infinite alternate;
}

.hero-16__lisiere--horizontale {
    display: none;
    left: 0;
    bottom: -1px;
    width: 200%;
    height: clamp(26px, 7vw, 46px);
    animation: hero16MareeX 14s ease-in-out infinite alternate;
}

/* ---- Mouvements --------------------------------------------- */
@keyframes hero16Monte {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes hero16Apparait {
    from { opacity: 0; transform: scale(1.06) translateX(14px); }
    to   { opacity: 1; transform: scale(1) translateX(0); }
}

/* Une periode de vague = 25 % du trace : on glisse d'une periode, aller-retour. */
@keyframes hero16MareeY {
    from { transform: translateY(0); }
    to   { transform: translateY(-25%); }
}

@keyframes hero16MareeX {
    from { transform: translateX(0); }
    to   { transform: translateX(-25%); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-16__surtitre,
    .hero-16__titre,
    .hero-16__desc,
    .hero-16__actions,
    .hero-16__pied,
    .hero-16__image,
    .hero-16__lisiere--verticale,
    .hero-16__lisiere--horizontale {
        animation: none;
    }
}

/* ---- Responsive --------------------------------------------- */
@media (max-width: 1024px) {
    .hero-16__inner {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    .hero-16__visuel {
        order: -1;
        height: clamp(240px, 50vw, 440px);
    }

    .hero-16__lisiere--verticale {
        display: none;
    }

    .hero-16__lisiere--horizontale {
        display: block;
    }

    .hero-16__texte {
        padding: clamp(1.75rem, 5vw, 3rem) 5% clamp(2.5rem, 7vw, 4rem);
    }
}

@media (max-width: 480px) {
    .hero-16__actions {
        width: 100%;
    }

    .hero-16__btn {
        flex: 1 1 100%;
    }
}
