/* ============================================================
   HERO 34 — LE RADAR
   Hero « scroll » (mécanique partagée : heros/main.css + main.js, hook
   data-hero-scroll). Sur le film, des balises : une par étape, qui
   s'allument et pulsent tour à tour, reliées par un tracé qui se dessine
   au défilement. En haut, une pastille dont le contenu change (la ville,
   les services, la disponibilité). À la conclusion, la dernière balise
   devient un radar qui balaie la zone d'intervention, à côté du CTA.

   Les chapitres entrent par une mise au point (flou → net).
   Tout texte est posé sur une image : blanc, contraste construit par le
   voile (§4.14).
   ============================================================ */

.hero-34 {
    --hero-34-gouttiere: clamp(1rem, 4vw, 3.5rem);
    /* Vert de disponibilité : couleur de SENS (un « disponible » est vert),
       pas de charte (§4.1). Toujours sur fond neutre sombre, jamais posé sur
       --primary : pas de confusion possible avec la marque. */
    --hero-34-dispo: #22c55e;

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

.hero-34__voile {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0.05) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0, transparent 30%, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
}

/* ---- La carte : tracé, balises, radar ---------------------- */
.hero-34__carte {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.hero-34__trace {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.hero-34__trace-fond,
.hero-34__trace-ligne {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hero-34__trace-fond {
    stroke: color-mix(in srgb, var(--white) 35%, transparent);
    stroke-width: 1;
    stroke-dasharray: 4 7;
}

/* Le tracé avance avec le défilement : longueur posée par hero-34.js
   (--hero-34-longueur), décalage tiré de l'avancement. */
.hero-34__trace-ligne {
    stroke: var(--white);
    stroke-width: 2;
    stroke-dasharray: var(--hero-34-longueur, 0) var(--hero-34-longueur, 0);
    stroke-dashoffset: calc(var(--hero-34-longueur, 0) * (1 - var(--hero-scroll-avance, 0)));
}

.hero-34__balise {
    position: absolute;
    top: var(--hero-34-y, 50%);
    left: var(--hero-34-x, 50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translate(-0.6rem, -50%);
    color: var(--white);
}

.hero-34__balise-point {
    position: relative;
    flex-shrink: 0;
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--white) 30%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--white) 50%, transparent), 0 2px 10px rgba(0, 0, 0, 0.35);
    transform: scale(0.6);
    transition: transform 0.5s cubic-bezier(0.3, 1.6, 0.5, 1), background-color 0.4s ease;
}

.hero-34__balise-point::after {
    content: "";
    position: absolute;
    inset: 30%;
    border-radius: 50%;
    background: var(--white);
}

/* Le « pulse » : deux anneaux décalés, seulement sur la balise active. */
.hero-34__balise-point::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--white);
    opacity: 0;
}

.hero-34__balise.est-vue .hero-34__balise-point {
    background: var(--white);
    transform: scale(0.7);
}

.hero-34__balise.is-actif .hero-34__balise-point {
    background: color-mix(in srgb, var(--white) 35%, transparent);
    transform: scale(1);
}

.hero-34__balise.is-actif .hero-34__balise-point::before {
    animation: hero34Pulse 1.8s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

@keyframes hero34Pulse {
    from { transform: scale(1);   opacity: 0.9; }
    to   { transform: scale(3.2); opacity: 0; }
}

.hero-34__balise-libelle {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-0.5rem);
    transition: opacity 0.4s ease, transform 0.5s ease;
}

.hero-34__balise-libelle .mcl-accent {
    color: var(--white);
    font-style: normal;
}

.hero-34__balise.is-actif .hero-34__balise-libelle {
    opacity: 1;
    transform: none;
}

/* Près du bord droit, le libellé passe à gauche du point. */
.hero-34__balise--gauche {
    flex-direction: row-reverse;
    transform: translate(calc(-100% + 0.6rem), -50%);
}

.hero-34__balise--gauche .hero-34__balise-libelle {
    transform: translateX(0.5rem);
}

/* La balise du centre ne porte pas son libellé : le radar parle pour elle. */
.hero-34__balise--centre .hero-34__balise-libelle {
    display: none;
}

/* Le radar : ondes concentriques + faisceau qui tourne, à la conclusion. */
.hero-34__radar {
    position: absolute;
    top: var(--hero-34-y, 50%);
    left: var(--hero-34-x, 50%);
    width: clamp(14rem, 34vw, 30rem);
    aspect-ratio: 1;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero-34.est-fin .hero-34__radar {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.hero-34__radar::before,
.hero-34__radar::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--white) 35%, transparent);
}

.hero-34__radar::before { inset: 0; }
.hero-34__radar::after  { inset: 25%; }

.hero-34__radar-onde {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid color-mix(in srgb, var(--white) 70%, transparent);
    opacity: 0;
    transform: scale(0.1);
}

.hero-34.est-fin .hero-34__radar-onde {
    animation: hero34Onde 3.6s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}

.hero-34.est-fin .hero-34__radar-onde:nth-child(2) { animation-delay: 1.2s; }
.hero-34.est-fin .hero-34__radar-onde:nth-child(3) { animation-delay: 2.4s; }

@keyframes hero34Onde {
    from { transform: scale(0.1); opacity: 0.9; }
    to   { transform: scale(1);   opacity: 0; }
}

.hero-34__radar-balayage {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, color-mix(in srgb, var(--white) 32%, transparent), transparent 22%, transparent);
    mask: radial-gradient(circle, var(--black) 69%, transparent 70%);
    -webkit-mask: radial-gradient(circle, var(--black) 69%, transparent 70%);
}

.hero-34.est-fin .hero-34__radar-balayage {
    animation: hero34Balayage 4s linear infinite;
}

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

/* ---- La pastille ------------------------------------------- */
.hero-34__pastille {
    position: absolute;
    z-index: 3;
    top: calc(var(--header-height, 80px) + 1rem);
    left: 50%;
    display: grid;
    min-width: 12rem;
    max-width: calc(100% - 2 * var(--hero-34-gouttiere));
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--white) 30%, transparent);
    color: var(--white);
    transform: translateX(-50%);
    overflow: hidden;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.hero-34__pastille-item {
    grid-area: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-width: 0;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
    opacity: 0;
    filter: blur(6px);
    transform: translateY(0.6rem) scale(0.96);
    transition: opacity 0.35s ease, filter 0.35s ease, transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero-34__pastille-item.is-actif {
    opacity: 1;
    filter: none;
    transform: none;
}

.hero-34__pastille-item.est-vue {
    transform: translateY(-0.6rem) scale(0.96);
}

.hero-34__pastille-texte {
    overflow: hidden;
    color: var(--white);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-34__pastille-numero {
    color: color-mix(in srgb, var(--white) 65%, transparent);
    font-variant-numeric: tabular-nums;
}

.hero-34__pastille-icone {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    color: var(--white);
}

.hero-34__pastille-icone svg {
    width: 100%;
    height: 100%;
}

.hero-34__pastille-dispo {
    position: relative;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--hero-34-dispo);
}

.hero-34__pastille-dispo::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--hero-34-dispo);
    animation: hero34Dispo 1.6s ease-out infinite;
}

@keyframes hero34Dispo {
    from { transform: scale(1);   opacity: 0.8; }
    to   { transform: scale(2.8); opacity: 0; }
}

/* ---- Les étapes -------------------------------------------- */
.hero-34__etapes {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    padding: calc(var(--header-height, 80px) + 5rem) var(--hero-34-gouttiere) clamp(4.5rem, 10vh, 6.5rem);
    pointer-events: none;
}

/* Entrée en mise au point : flou et légèrement grossi, puis net. */
.hero-34__etape {
    align-self: end;
    max-width: 40rem;
    filter: blur(12px);
    transform: scale(1.04);
    transform-origin: left bottom;
    transition: opacity 0.4s ease, filter 0.4s ease, transform 0.6s ease, visibility 0s linear 0.4s;
}

.hero-34__etape.is-actif {
    filter: none;
    transform: none;
    pointer-events: auto;
    transition: opacity 0.6s ease 0.15s, filter 0.8s ease 0.15s, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s, visibility 0s;
}

.hero-34__etape--ouverture {
    max-width: 50rem;
}

/* ---- Textes ------------------------------------------------ */
.hero-34__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-34__titre,
.hero-34__titre:hover {
    margin: 0;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 6.4vw, 5.25rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.hero-34__chapitre,
.hero-34__chapitre:hover {
    margin: 0;
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 4.4vw, 3.3rem);
    font-weight: 700;
    line-height: 1.08;
    text-wrap: balance;
}

/* L'accent ((…)) : en contour, la lettre ouverte sur l'image. */
.hero-34__titre .mcl-accent,
.hero-34__chapitre .mcl-accent {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--white);
    font-style: normal;
}

.hero-34__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-34__indice {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    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-34__indice-texte {
    color: var(--white);
}

.hero-34__indice-souris {
    position: relative;
    width: 1.4rem;
    height: 2.2rem;
    border: 1.5px solid var(--white);
    border-radius: 1rem;
}

.hero-34__indice-souris::after {
    content: "";
    position: absolute;
    top: 0.4rem;
    left: 50%;
    width: 3px;
    height: 0.45rem;
    border-radius: 2px;
    background: var(--white);
    transform: translateX(-50%);
    animation: hero34Molette 1.6s ease-in-out infinite;
}

@keyframes hero34Molette {
    0%   { transform: translate(-50%, 0);      opacity: 1; }
    70%  { transform: translate(-50%, 0.7rem); opacity: 0; }
    100% { transform: translate(-50%, 0);      opacity: 0; }
}

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

.hero-34__chiffre {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-left: 1.4rem;
    color: var(--white);
}

/* Chaque chiffre a sa petite balise, qui pulse une fois à l'arrivée. */
.hero-34__chiffre::before {
    content: "";
    position: absolute;
    top: calc(clamp(2rem, 4.5vw, 3.2rem) / 2 - 0.25rem);
    left: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--white) 60%, transparent);
}

.hero-34__etape.is-actif .hero-34__chiffre::before {
    animation: hero34Ping 1.6s ease-out 0.4s 2;
}

@keyframes hero34Ping {
    from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--white) 60%, transparent); }
    to   { box-shadow: 0 0 0 0.9rem transparent; }
}

.hero-34__chiffre-valeur {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.hero-34__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 -------------------------------------------- */
.hero-34__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.hero-34__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 3.2rem;
    padding: 0.85rem 1.5rem;
    border: 0;
    border-radius: 999px;
    background: none;
    color: inherit;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.hero-34__btn-texte {
    color: inherit;
}

.hero-34__btn--principal {
    background: var(--accent);
    color: var(--on-accent);
}

.hero-34__btn--principal:hover,
.hero-34__btn--principal:focus-visible {
    background: color-mix(in srgb, var(--accent) 86%, var(--black));
    color: var(--on-accent);
}

.hero-34__btn-fleche {
    position: relative;
    width: 1rem;
    height: 2px;
    background: currentColor;
    transition: transform 0.3s ease;
}

.hero-34__btn-fleche::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 0.45rem;
    height: 0.45rem;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
}

.hero-34__btn--principal:hover .hero-34__btn-fleche,
.hero-34__btn--principal:focus-visible .hero-34__btn-fleche {
    transform: translateX(4px);
}

.hero-34__btn--appel {
    background: var(--white);
    color: var(--black);
}

.hero-34__btn--appel:hover,
.hero-34__btn--appel:focus-visible {
    background: color-mix(in srgb, var(--white) 86%, var(--black));
    color: var(--black);
}

.hero-34__appel-icone {
    position: relative;
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
    color: var(--black);
    animation: hero34Sonne 2.6s ease-in-out infinite;
}

.hero-34__appel-icone svg {
    width: 100%;
    height: 100%;
}

/* Le combiné « sonne » : trois petites secousses, puis une pause. */
@keyframes hero34Sonne {
    0%, 30%, 100% { transform: rotate(0); }
    5%, 15%, 25%  { transform: rotate(-14deg); }
    10%, 20%      { transform: rotate(14deg); }
}

.hero-34__btn--lien {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    color: var(--white);
    text-decoration: underline;
    text-underline-offset: 0.3em;
}

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

.hero-34__btn:focus-visible,
.hero-34__passer:focus-visible {
    outline: 2px solid var(--white);
    outline-offset: 3px;
}

.hero-34__points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.hero-34__point {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.85rem;
    line-height: 1.3;
}

.hero-34__point-icone {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
    color: var(--white);
}

.hero-34__point-icone svg {
    width: 100%;
    height: 100%;
}

/* ---- Sortie ------------------------------------------------ */
.hero-34__passer {
    position: absolute;
    z-index: 5;
    right: var(--hero-34-gouttiere);
    bottom: clamp(1rem, 3vh, 1.75rem);
    padding: 0.4rem 0;
    border: 0;
    background: none;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.78rem;
    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-34__passer:hover,
.hero-34__passer:focus-visible {
    color: var(--white);
    opacity: 1;
}

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

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

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

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

    .hero-34__etape--chiffres {
        max-width: 56rem;
    }
}

@media (max-width: 768px) {
    .hero-34__voile {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.1) 25%, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0.88) 100%);
    }

    /* Sur un téléphone, le texte occupe le bas : les balises montent. */
    .hero-34__balise {
        top: calc(var(--hero-34-y, 50%) * 0.6 + 4%);
    }

    .hero-34__radar {
        top: 28%;
        left: 50%;
        width: 13rem;
    }

    /* La pastille du haut dit déjà ce que raconte l'étape : sur un écran
       étroit, les libellés des balises chevaucheraient le texte. */
    .hero-34__balise-libelle {
        display: none;
    }

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

    .hero-34__btn--lien {
        flex: 0 0 auto;
    }

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