/* ============================================================
   HERO 35 — TYPO CINÉTIQUE
   Hero « scroll » (mécanique partagée : heros/main.css + main.js, hook
   data-hero-scroll). Éditorial et graphique : des numéros géants en contour
   qui défilent comme un compteur à rouleau, un service du site en très grand
   qui change à chaque étape, des chapitres qui montent avec une légère
   inclinaison, un ruban de points forts qui défile en continu. La
   conclusion se termine sur un disque « devis » dont le texte tourne, qui
   pulse, et le numéro de téléphone en grand.

   Tout texte est posé sur une image : blanc, contraste construit par le
   voile (§4.14).
   ============================================================ */

.hero-35 {
    --hero-35-gouttiere: clamp(1rem, 4vw, 3.5rem);
    --hero-35-numero: clamp(6rem, 17vw, 15rem);

    background: var(--black);
    color: var(--white);
}

.hero-35__voile {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0, rgba(0, 0, 0, 0.2) 35%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.88) 100%),
        color-mix(in srgb, var(--primary) 18%, transparent);
}

/* ---- Le compteur à rouleau --------------------------------- */
.hero-35__compteur {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: var(--hero-35-gouttiere);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    transform: translateY(-62%);
    pointer-events: none;
}

.hero-35__compteur-rouleau {
    display: flex;
    flex-direction: column;
    height: 1em;
    overflow: hidden;
    color: transparent;
    font-family: var(--font-heading);
    font-size: var(--hero-35-numero);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -0.04em;
}

.hero-35__compteur-numero {
    display: block;
    height: 1em;
    color: transparent;
    -webkit-text-stroke: 1.5px color-mix(in srgb, var(--white) 75%, transparent);
    transform: translateY(calc(var(--hero-scroll-index, 0) * -100%));
    transition: transform 0.9s cubic-bezier(0.7, 0, 0.2, 1);
}

.hero-35__compteur-total {
    margin-top: 0.6em;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1;
}

/* ---- Le mot du moment -------------------------------------- */
.hero-35__mots {
    position: absolute;
    z-index: 2;
    top: calc(var(--header-height, 80px) + clamp(1rem, 3vh, 2rem));
    left: var(--hero-35-gouttiere);
    right: calc(var(--hero-35-gouttiere) + 30%);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    pointer-events: none;
}

.hero-35__mots-libelle {
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.24em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hero-35__mots-fenetre {
    position: relative;
    display: grid;
    overflow: hidden;
}

.hero-35__mot {
    grid-area: 1 / 1;
    overflow: hidden;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3.6vw, 2.75rem);
    font-style: italic;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
    transform: translateY(110%);
    transition: transform 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}

.hero-35__mot.is-actif {
    transform: none;
}

.hero-35__mot.est-vue {
    transform: translateY(-110%);
}

/* ---- Les étapes -------------------------------------------- */
.hero-35__etapes {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    padding: calc(var(--header-height, 80px) + 7rem) var(--hero-35-gouttiere) clamp(6rem, 14vh, 8.5rem);
}

/* Entrée : le bloc monte, légèrement incliné, et se redresse. */
.hero-35__etape {
    align-self: end;
    max-width: 48rem;
    transform: translateY(3rem) skewY(3deg);
    transform-origin: left bottom;
    transition: opacity 0.4s ease, transform 0.6s ease, visibility 0s linear 0.4s;
}

.hero-35__etape.is-actif {
    transform: none;
    transition: opacity 0.6s ease 0.15s, transform 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s, visibility 0s;
}

.hero-35__etape.est-vue {
    transform: translateY(-3rem) skewY(-2deg);
}

.hero-35__etape--conclusion {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    max-width: 68rem;
}

.hero-35__conclusion-texte {
    flex: 1 1 22rem;
    min-width: 0;
}

/* ---- Textes ------------------------------------------------ */
.hero-35__surtitre {
    margin: 0 0 1rem;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    line-height: 1.4;
    text-transform: uppercase;
}

.hero-35__titre,
.hero-35__titre:hover {
    margin: 0;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(2.75rem, 8vw, 6.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    text-wrap: balance;
}

.hero-35__chapitre,
.hero-35__chapitre:hover {
    margin: 0;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-wrap: balance;
}

/* L'accent ((…)) : le mot quitte les capitales, passe en italique fin. */
.hero-35__titre .mcl-accent,
.hero-35__chapitre .mcl-accent {
    color: var(--white);
    font-style: italic;
    font-weight: 300;
    text-transform: none;
}

.hero-35__texte {
    margin: 1.1rem 0 0;
    max-width: 34rem;
    color: var(--white);
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    line-height: 1.6;
}

/* ---- Indice ------------------------------------------------ */
.hero-35__indice {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin: clamp(2rem, 6vh, 3.5rem) 0 0;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    line-height: 1;
    text-transform: uppercase;
}

.hero-35__indice-texte {
    color: var(--white);
}

.hero-35__indice-trait {
    position: relative;
    width: 4rem;
    height: 1px;
    overflow: hidden;
    background: color-mix(in srgb, var(--white) 30%, transparent);
}

.hero-35__indice-trait::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--white);
    animation: hero35Trait 2s cubic-bezier(0.6, 0, 0.3, 1) infinite;
}

@keyframes hero35Trait {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

/* ---- Chiffres ---------------------------------------------- */
.hero-35__chiffres {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}

.hero-35__chiffre {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.25rem 1rem 0;
    border-top: 1px solid color-mix(in srgb, var(--white) 40%, transparent);
    color: var(--white);
}

.hero-35__chiffre-valeur {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    letter-spacing: -0.03em;
}

.hero-35__chiffre-libelle {
    color: color-mix(in srgb, var(--white) 82%, transparent);
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* ---- Conclusion : liens ------------------------------------ */
.hero-35__liens {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 2rem;
    margin-top: 1.75rem;
}

.hero-35__appel,
.hero-35__lien {
    border: 0;
    background: none;
    color: var(--white);
    font-family: var(--font-body);
    text-decoration: none;
    cursor: pointer;
}

.hero-35__appel {
    display: inline-flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.25rem 0;
}

.hero-35__appel-libelle {
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    line-height: 1.2;
    text-transform: uppercase;
}

.hero-35__appel-numero {
    position: relative;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

/* Un trait qui se trace sous le numéro au survol. */
.hero-35__appel-numero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.2rem;
    height: 2px;
    background: var(--white);
    transform: scaleX(0.25);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.hero-35__appel:hover,
.hero-35__appel:focus-visible {
    color: var(--white);
}

.hero-35__appel:hover .hero-35__appel-numero::after,
.hero-35__appel:focus-visible .hero-35__appel-numero::after {
    transform: scaleX(1);
}

.hero-35__lien {
    padding: 0.4rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: underline;
    text-underline-offset: 0.3em;
}

.hero-35__lien:hover,
.hero-35__lien:focus-visible {
    color: var(--white);
    text-decoration-thickness: 2px;
}

/* ---- Le disque devis --------------------------------------- */
.hero-35__disque {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: clamp(10rem, 18vw, 13.5rem);
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--on-accent);
    font-family: var(--font-body);
    text-decoration: none;
    cursor: pointer;
}

/* Le « pulse » : un halo qui s'échappe du disque en continu. */
.hero-35__disque::before,
.hero-35__disque::after {
    content: "";
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    border: 2px solid var(--white);
    opacity: 0;
    animation: hero35Halo 2.8s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
    pointer-events: none;
}

.hero-35__disque::after {
    animation-delay: 1.4s;
}

@keyframes hero35Halo {
    from { transform: scale(1);   opacity: 0.7; }
    to   { transform: scale(1.9); opacity: 0; }
}

.hero-35__disque-anneau {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    animation: hero35Tourne 16s linear infinite;
}

@keyframes hero35Tourne {
    to { transform: rotate(360deg); }
}

.hero-35__disque-texte {
    fill: var(--white);
    font-family: var(--font-body);
    font-size: 7.4px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-35__disque-centre {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 64%;
    aspect-ratio: 1;
    padding: 0.75rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1), background-color 0.3s ease;
}

.hero-35__disque-libelle {
    color: var(--on-accent);
    font-size: clamp(0.8rem, 1.1vw, 0.95rem);
    font-weight: 700;
    line-height: 1.15;
}

.hero-35__disque:hover .hero-35__disque-centre,
.hero-35__disque:focus-visible .hero-35__disque-centre {
    background: color-mix(in srgb, var(--accent) 86%, var(--black));
    transform: scale(1.08);
}

.hero-35__disque:hover,
.hero-35__disque:focus-visible {
    color: var(--on-accent);
}

.hero-35__disque:focus-visible,
.hero-35__appel:focus-visible,
.hero-35__lien:focus-visible,
.hero-35__passer:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 4px;
}

/* ---- Le ruban ---------------------------------------------- */
.hero-35__ruban {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: clamp(2.75rem, 6vh, 3.5rem);
    overflow: hidden;
    border-top: 1px solid color-mix(in srgb, var(--white) 25%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--white) 25%, transparent);
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.hero-35__ruban-piste {
    display: flex;
    width: max-content;
    /* Durée posée par hero-35.js d'après la longueur réelle du ruban :
       vitesse constante, quel que soit le nombre de points forts. */
    animation: hero35Ruban var(--hero-35-ruban-duree, 28s) linear infinite;
}

@keyframes hero35Ruban {
    to { transform: translateX(-50%); }
}

.hero-35__ruban-liste {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hero-35__ruban-item {
    display: inline-flex;
    align-items: center;
    gap: 2.5rem;
    padding: 0.7rem 0 0.7rem 2.5rem;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(0.85rem, 1.3vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

.hero-35__ruban-item::after {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--white);
}

/* ---- Sortie ------------------------------------------------ */
.hero-35__passer {
    position: absolute;
    z-index: 5;
    right: var(--hero-35-gouttiere);
    bottom: clamp(0.5rem, 1.5vh, 1rem);
    padding: 0.4rem 0;
    border: 0;
    background: none;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    line-height: 1.3;
    text-decoration: underline;
    text-underline-offset: 0.3em;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.hero-35__passer:hover,
.hero-35__passer:focus-visible {
    color: var(--white);
    opacity: 1;
}

/* ---- État statique : sans JS, ou mouvement réduit ---------- */
.hero-35.is-statique .hero-35__etapes {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    gap: clamp(3rem, 10vh, 6rem);
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: 6rem;
}

.hero-35.is-statique .hero-35__etape {
    align-self: stretch;
}

.hero-35.is-statique .hero-35__voile {
    background: rgba(0, 0, 0, 0.6);
}

/* Immobile, le ruban n'a pas besoin de sa copie de bouclage. */
.hero-35.is-statique .hero-35__ruban-piste {
    animation: none;
}

.hero-35.is-statique .hero-35__ruban-liste[aria-hidden="true"],
.hero-35.is-statique .hero-35__ruban-item[aria-hidden="true"] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .hero-35__ruban-liste[aria-hidden="true"],
    .hero-35__ruban-item[aria-hidden="true"] {
        display: none;
    }
}

/* ---- Responsive -------------------------------------------- */
@media (min-width: 1024px) {
    .hero-35__chiffres {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-35__etape--chiffres {
        max-width: 60rem;
    }
}

@media (max-width: 1024px) {
    .hero-35__compteur {
        top: calc(var(--header-height, 80px) + 1rem);
        transform: none;
    }

    .hero-35__mots {
        right: calc(var(--hero-35-gouttiere) + 9rem);
    }

    .hero-35 {
        --hero-35-numero: clamp(4.5rem, 16vw, 8rem);
    }
}

@media (max-width: 768px) {
    .hero-35__etapes {
        padding-top: calc(var(--header-height, 80px) + 9rem);
    }

    .hero-35__etape--conclusion {
        align-items: flex-start;
    }

    .hero-35__disque {
        width: 9rem;
    }

    .hero-35__passer {
        left: var(--hero-35-gouttiere);
        right: auto;
    }
}

/* Accent du contrat ((…)) : la donnée du socle marque un mot, le composant
   décide de son rendu (sans cette règle il sort en texte nu). */
.hero-35__ruban-item .mcl-accent {
  color: inherit;
  font-style: italic;
}

/* D-42 : l'accent ((…)) d'un titre de l'offre garde la couleur du mot ; le
   mot étant déjà en italique, l'accent passe en fin, comme celui du titre. */
.hero-35__mot .mcl-accent {
  color: inherit;
  font-weight: 300;
}

/* Enveloppe du texte : le parent est en flex ; sans elle, un accent ((…))
   deviendrait un élément flex (le gap remplacerait l'espace entre les mots). */
.hero-35__ruban-texte {
  color: inherit;
}
