/* ============================================================
   HERO 17 — CARTE DES SOINS
   Le texte a gauche ; a droite une photo haute, et posee sur son bord une
   carte des soins, comme celle qu'on tend a l'accueil d'un cabinet. Survoler
   un soin fait passer la photo a la sienne.
   La carte est un panneau OPAQUE : le texte qu'elle porte est sur son fond,
   pas sur la photo (§4.14, « la seule sortie »).
   ============================================================ */

.hero-17 {
    /* Or des etoiles d'avis : couleur de SENS, pas de charte (§4.1). */
    --hero-17-etoile: #e3a53a;

    padding: clamp(2.5rem, 6vw, 5rem) 5% clamp(3rem, 7vw, 6rem);
    padding-top: calc(var(--header-height) + clamp(2rem, 5vw, 4.5rem));
    background: var(--gray-light);
    overflow: hidden;
}

.hero-17__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    max-width: 1320px;
    margin: 0 auto;
}

/* ---- Le texte ----------------------------------------------- */
.hero-17__texte {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(0.9rem, 1.6vw, 1.3rem);
}

.hero-17__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;
    /* --secondary legerement assombri : un surtitre de 12 px sur fond clair
       doit tenir 4,5:1 quelle que soit la charte. */
    color: color-mix(in srgb, var(--secondary) 82%, var(--black));
    animation: hero17Monte 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-17__titre,
.hero-17__titre:hover {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 4.4vw, 4.1rem);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -0.01em;
    color: var(--black);
    animation: hero17Monte 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.hero-17__titre .mcl-accent {
    font-style: italic;
    font-weight: 400;
    color: var(--secondary);
}

.hero-17__desc {
    margin: 0;
    max-width: 44ch;
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.15vw, 1.1rem);
    font-weight: 300;
    line-height: 1.75;
    color: var(--gray-dark);
    animation: hero17Monte 1s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

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

.hero-17__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-17__btn--principal {
    background: var(--primary);
    color: var(--on-primary);
}

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

.hero-17__btn--secondaire {
    border-color: color-mix(in srgb, var(--black) 25%, transparent);
    color: var(--black);
}

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

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

.hero-17__avis {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
    margin: 0.6rem 0 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--gray-dark);
    animation: hero17Monte 1s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both;
}

.hero-17__avis-texte {
    color: var(--gray-dark);
}

.hero-17__avis-note {
    font-weight: 600;
    color: var(--black);
}

.hero-17__etoiles {
    display: inline-block;
    flex: none;
    width: 5.6em;
    height: 1em;
    background: linear-gradient(90deg, var(--hero-17-etoile) var(--hero-17-note, 100%), color-mix(in srgb, var(--black) 18%, 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;
}

/* ---- La scene : photo + carte ------------------------------- */
.hero-17__scene {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.28fr) minmax(0, 1fr);
    align-items: end;
}

.hero-17__photos {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    aspect-ratio: 4 / 5;
    max-height: min(78svh, 680px);
    width: 100%;
    overflow: hidden;
    border-radius: 22px;
    background: color-mix(in srgb, var(--primary) 14%, var(--gray-light));
    animation: hero17Apparait 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.hero-17__photo {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.9s ease, transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-17__photo.is-actif {
    opacity: 1;
    transform: scale(1);
}

/* La carte : panneau opaque qui chevauche le bord gauche de la photo. */
.hero-17__carte {
    position: relative;
    z-index: 1;
    grid-column: 1 / span 2;
    grid-row: 1;
    align-self: end;
    width: min(100%, 360px);
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
    padding: clamp(1.25rem, 2vw, 1.75rem) clamp(1.25rem, 2vw, 1.75rem) clamp(0.75rem, 1.4vw, 1.1rem);
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.28);
    animation: hero17Monte 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

.hero-17__carte-titre {
    margin: 0 0 0.5rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--gray-dark);
}

/* Regroupement par metier (§4.16) : sur une surface utilitaire, un intitule
   et un filet, rien de plus. Mono-metier : le conteneur s'efface. */
.hero-17__groupe {
    --m-couleur: color-mix(in oklab, var(--secondary), var(--primary) var(--m-melange, 0%));
}

.hero-17__groupe--nu {
    display: contents;
}

.hero-17__metier {
    margin: 0.85rem 0 0.1rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--m-couleur);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
    color: var(--m-couleur);
}

.hero-17__liste {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Chaque ligne trace son filet a son tour : c'est la signature. */
.hero-17__ligne {
    position: relative;
}

.hero-17__ligne::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: color-mix(in srgb, var(--black) 12%, transparent);
    transform-origin: left center;
    animation: hero17Trace 0.9s cubic-bezier(0.65, 0, 0.35, 1) calc(0.7s + var(--hero-17-i, 1) * 0.12s) both;
}

.hero-17__ligne:last-child::after {
    display: none;
}

.hero-17__lien {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.8rem 0;
    border: 0;
    background: none;
    font-family: inherit;
    color: var(--black);
    text-decoration: none;
    cursor: pointer;
}

.hero-17__num {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1;
    color: var(--m-couleur, var(--secondary));
}

.hero-17__nom {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 1.5vw, 1.35rem);
    font-weight: 500;
    line-height: 1.2;
    color: var(--black);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-17__fleche {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1;
    color: var(--gray-dark);
    opacity: 0.35;
    transform: translateX(-6px);
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease;
}

.hero-17__lien:hover,
.hero-17__lien:focus-visible {
    color: var(--black);
}

.hero-17__lien:hover .hero-17__nom,
.hero-17__lien:focus-visible .hero-17__nom {
    transform: translateX(4px);
}

.hero-17__lien:hover .hero-17__fleche,
.hero-17__lien:focus-visible .hero-17__fleche {
    opacity: 1;
    color: var(--secondary);
    transform: translateX(0);
}

.hero-17__lien:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 6px;
}

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

@keyframes hero17Apparait {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes hero17Trace {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-17__surtitre,
    .hero-17__titre,
    .hero-17__desc,
    .hero-17__actions,
    .hero-17__avis,
    .hero-17__photos,
    .hero-17__carte,
    .hero-17__ligne::after {
        animation: none;
    }

    .hero-17__photo,
    .hero-17__nom,
    .hero-17__fleche {
        transition: none;
    }
}

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

    .hero-17__scene {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-17__photos {
        grid-column: 1;
        aspect-ratio: 4 / 3;
        max-height: none;
        border-radius: 18px;
    }

    .hero-17__carte {
        grid-column: 1;
        grid-row: 2;
        width: auto;
        margin: -2.5rem clamp(0.75rem, 4vw, 2rem) 0;
    }
}

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

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