/* ============================================================
   Klick Service — hero

   Une photo, un titre, une action. Les vignettes servent de
   sommaire ; la photo change, le reste ne bouge pas.
   ============================================================ */

.hero {
    --card-w: 132px;
    --card-gap: 1px;

    /* Le texte est calé à gauche : le voile est le plus dense de ce côté
       et sous la barre du bas, pour tenir le contraste quelle que soit
       la photo — y compris les plus claires. */
    --scrim:
        linear-gradient(90deg, rgba(9,10,11,.86) 0%, rgba(9,10,11,.62) 34%, rgba(9,10,11,.22) 68%, rgba(9,10,11,.34) 100%),
        linear-gradient(0deg, rgba(9,10,11,.78) 0%, rgba(9,10,11,.18) 40%, rgba(9,10,11,.44) 100%);

    position: relative;
    min-height: 620px;
    height: 88svh;
    max-height: 860px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    isolation: isolate;
    background: #0a0b0c;
    color: #fff;
}

/* --- fond --- */

.hero__bg { position: absolute; inset: 0; z-index: -2; background: #0a0b0c; }

.hero__layer { position: absolute; inset: 0; opacity: 0; }

/* Le calque qui arrive monte par-dessus celui qui part, resté opaque :
   aucun creux de luminosité au milieu du fondu. */
.hero__layer.is-active  { opacity: 1; z-index: 2; transition: opacity .7s var(--ease); }
.hero__layer.is-leaving { opacity: 1; z-index: 1; }

/* légère désaturation : les photos viennent de sources hétérogènes,
   ce filtre leur donne une tenue commune */
.hero__layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.82) brightness(.92);
}

.hero__scrim { position: absolute; inset: 0; z-index: 3; background: var(--scrim); }

/* la vignette choisie s'installe dans le fond, sous le texte */
.hero-fly {
    position: absolute;
    z-index: 4;
    overflow: hidden;
    pointer-events: none;
}
.hero-fly img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.hero-fly__veil { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .58s var(--ease); }

.hero-fly.is-flying {
    transition:
        left .58s var(--ease),
        top .58s var(--ease),
        width .58s var(--ease),
        height .58s var(--ease);
}
.hero-fly.is-flying .hero-fly__veil { opacity: 1; }
.hero-fly.is-done { opacity: 0; transition: opacity .2s linear; }

/* --- trame --- */

.hero__inner {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    align-items: flex-end;
    padding: calc(var(--header-h) + 32px) var(--gutter) 0;
}

.hero__copy { max-width: 620px; padding-bottom: 40px; }

.hero__label {
    margin: 0 0 14px;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .62);
}

.hero__title {
    margin: 0 0 16px;
    /* deux lignes réservées : le titre change de longueur d'un service à
       l'autre, les boutons ne doivent pas sauter pour autant */
    min-height: 2.12em;
    font-size: clamp(32px, 4.6vw, 58px);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -.035em;
}

.hero__text {
    margin: 0 0 28px;
    min-height: 3.2em;                 /* deux lignes, même raison */
    max-width: 46ch;
    font-size: 16px;
    color: rgba(255, 255, 255, .78);
}

.hero__actions { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; }
.hero .lnk { color: #fff; border-bottom-color: rgba(255, 255, 255, .38); }
.hero .lnk:hover { color: #fff; border-bottom-color: #fff; }

/* appeler est la seconde action : même hauteur que le bouton, pour
   que la cible tactile soit confortable */
.lnk--tel {
    height: 46px;
    padding: 0 2px;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    border-bottom: 0;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .38);
    transition: box-shadow .18s var(--ease);
}
.lnk--tel:hover { box-shadow: inset 0 -1px 0 #fff; }

/* --- barre du bas : sommaire + repères --- */

/* Colonne de gauche à largeur fixe : le tarif et la durée changent de
   longueur d'un service à l'autre, le sommaire ne doit pas se décaler
   ni se comprimer pour autant. */
.hero__bar {
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    align-items: end;
    gap: 24px;
    padding: 0 var(--gutter) 22px;
}

.hero__side { display: grid; gap: 14px; }

.hero__meta {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0;
    min-height: 20px;            /* une ligne, toujours */
    font-size: 13px;
    white-space: nowrap;
    color: rgba(255, 255, 255, .62);
    font-variant-numeric: tabular-nums;
}
.hero__meta b { font-weight: 500; color: #fff; }

/* le tarif se relaie en fondu, comme le reste du texte */
.js .hero__meta { transition: opacity .45s var(--ease) .1s; }
.js .hero__meta.is-out { opacity: 0; transition-duration: .18s; transition-delay: 0s; }

.hero__rail { overflow: hidden; }

.rail {
    display: flex;
    gap: var(--card-gap);
    background: rgba(255, 255, 255, .18);
}

.rail__item { flex: 0 0 var(--card-w); }
.rail__item--ghost { pointer-events: none; }

.card {
    position: relative;
    display: block;
    width: 100%;
    height: 86px;
    overflow: hidden;
    text-align: left;
    background: #16181a;
}

.card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .5;
    transition: opacity .25s var(--ease);
}
.card:hover .card__img,
.card:focus-visible .card__img { opacity: .78; }
.card.is-taken { opacity: 0; }

.card__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.6)); }

.card__name {
    position: absolute;
    inset: auto 10px 8px 10px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: -.01em;
    color: #fff;
}

/* --- commandes --- */

.hero__ctrl { display: flex; align-items: center; gap: 14px; }

.ctrl__btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: rgba(255, 255, 255, .7);
    border: 1px solid rgba(255, 255, 255, .28);
    transition: color .18s var(--ease), border-color .18s var(--ease);
}
.ctrl__btn:hover { color: #fff; border-color: #fff; }

.counter {
    margin: 0;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, .62);
}
.counter b { font-weight: 500; color: #fff; }

.progress {
    position: relative;
    flex: none;
    width: 120px;
    height: 1px;
    background: rgba(255, 255, 255, .28);
    overflow: hidden;
}
.progress__bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: 100%;
    height: 100%;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left center;
}

.hero__live {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* --- relais du texte au changement de service --- */

/* Chaque bloc entre à son tour, de haut en bas ; la sortie est plus
   courte et plus resserrée, pour que le changement paraisse net. */
.js [data-copy] > * {
    transition: opacity .45s var(--ease), transform .45s var(--ease);
    transition-delay: calc(var(--i, 0) * 55ms);
}
.js [data-copy].is-out > * {
    opacity: 0;
    transform: translateY(-7px);
    transition-duration: .2s;
    transition-delay: calc(var(--i, 0) * 20ms);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 1000px) {
    .hero { --card-w: 118px; }
    .hero__bar { grid-template-columns: 1fr; gap: 16px; }
    .hero__rail { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
}

@media (max-width: 620px) {
    .hero {
        --card-w: 104px;
        height: auto;
        min-height: 92svh;
        max-height: none;
    }
    .hero__copy { padding-bottom: 28px; }
    .hero__title { font-size: clamp(28px, 8.4vw, 40px); }
    .hero__actions .btn { flex: 1; }
    .card { height: 72px; }
    .progress { flex: 1; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .hero__layer { transition: none; }
}
