/* L'animation d'accueil : le plan, les murs qui montent, l'entrée dans la maison. Tout le contenu est construit par hero/hero.js. */

[data-hero] {
  --hero-fond: #0A0C10;
  --hero-encre: #F3F1EC;
  --hero-encre-2: rgba(243, 241, 236, .72);
  --hero-sauge: #7FA3CC;
  position: relative;
  background: var(--hero-fond);
  color: var(--hero-encre);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.hero__piste { position: relative; height: 315svh; }   /* tour 2 : 400 → 315 svh, les trois étapes gardées */
.hero__scene {
  position: sticky; top: 0;
  height: 100svh; width: 100%;
  overflow: hidden;
  background: var(--hero-fond);
  isolation: isolate;
}

/* le cadre virtuel (1600 × 900 ou 900 × 1600) : posé et mis à l'échelle par hero.js comme une image en object-fit: cover */
.hero__cadre { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.hero__cadre > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; }
.hero__maquette { opacity: 0; object-fit: fill; will-change: transform, opacity; }
.hero__plan { overflow: visible; }
.hero__sequence { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; }
.hero__porte { position: absolute; inset: 0; background: #F6F4EF; opacity: 0; pointer-events: none; }

/* le plan */
.hero__plan .mur { fill: #E9E6DF; }
.hero__plan .trait { fill: none; stroke: rgba(236, 233, 226, .78); stroke-linecap: round; }
.hero__plan .trait--vitrage { stroke: rgba(236, 233, 226, .62); }
.hero__plan .trait--arc { stroke: rgba(236, 233, 226, .42); stroke-dasharray: none; }
.hero__plan .cote { fill: none; stroke: rgba(236, 233, 226, .5); }
.hero__plan .cote-fleche { fill: rgba(236, 233, 226, .62); }
.hero__plan .cote-valeur { fill: rgba(236, 233, 226, .78); font-variant-numeric: tabular-nums; letter-spacing: .02em; font-weight: 500; }
.hero__plan .piece-nom { fill: rgba(243, 241, 236, .9); font-weight: 500; letter-spacing: .01em; }
.hero__plan .piece-surface { fill: rgba(243, 241, 236, .5); font-variant-numeric: tabular-nums; }
.hero__plan .a-tracer { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.hero__plan .a-montrer { opacity: 0; }
.hero__plan.trace .a-tracer { stroke-dashoffset: 0; transition: stroke-dashoffset var(--duree, 1s) cubic-bezier(.65, .05, .25, 1) var(--attente, 0s); }
.hero__plan.trace .a-montrer { opacity: 1; transition: opacity .5s ease var(--attente, 0s); }
.hero__plan .masque-trait { fill: none; stroke: #fff; stroke-linecap: butt; }

/* le voile local sous le texte : le titre reste lisible sur les images claires */
.hero__voile {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(10, 12, 16, .9) 0%, rgba(10, 12, 16, .78) 30%, rgba(10, 12, 16, .34) 47%, rgba(10, 12, 16, 0) 62%),
    linear-gradient(0deg, rgba(10, 12, 16, .35) 0%, rgba(10, 12, 16, 0) 22%);
  opacity: .5;
}

/* le texte */
.hero__texte {
  position: absolute; z-index: 3;
  left: clamp(24px, 5.2vw, 88px);
  top: 50%; transform: translateY(-46%);
  width: clamp(480px, 46vw, 760px);   /* (30 nov.) colonne élargie : titre sur 3 lignes larges, sous-titre sur 2 */
}
.hero__titre {
  margin: 0 0 22px;
  font-size: clamp(42px, 4.6vw, 74px);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 500;
  color: var(--hero-encre);
}
.hero__titre .ligne { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.hero__titre .mot { display: inline-block; will-change: transform; }
.hero__sous {
  margin: 0 0 30px;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.5;
  color: var(--hero-encre-2);
  max-width: none;
  letter-spacing: -.005em;
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
/* le bouton et, à côté, le prix d'appel (sobre, sur deux lignes) */
.hero__rangee { display: flex; align-items: center; gap: 20px; }
.hero__prix { margin: 0; font-size: 14px; line-height: 1.35; color: var(--hero-encre-2); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 20px; border-left: 1px solid rgba(243, 241, 236, .18); }
.hero__prix strong { color: var(--hero-encre); font-weight: 500; }
.hero__prix strong { white-space: nowrap; }
.hero__mention { margin: 0; font-size: 14px; line-height: 1.45; color: rgba(243, 241, 236, .6); max-width: 30em; }
.hero__mention strong { color: var(--hero-encre); font-weight: 500; }

/* le bouton (l'autre feuille lui donne son style magnétique ; celui-ci suffit seul) */
[data-hero] .btn-plan {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 24px 0 26px;
  border-radius: 999px;
  background: #34608F; color: #FFFFFF;
  font: 500 16px/1 "Instrument Sans", system-ui, sans-serif;
  letter-spacing: -.01em;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  transition: background-color .25s ease, transform .25s ease;
}
[data-hero] .btn-plan:hover { background: #254769; }
[data-hero] .btn-plan .fleche { width: 16px; height: 16px; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
[data-hero] .btn-plan:hover .fleche { transform: translateX(3px); }
[data-hero] .btn-plan:focus-visible { outline: 2px solid var(--hero-sauge); outline-offset: 3px; }

/* les pastilles d'étapes (verre) */
.hero__etapes {
  position: absolute; z-index: 3;
  right: clamp(20px, 3vw, 44px); bottom: clamp(20px, 3.4svh, 36px);
  display: flex; gap: 8px; margin: 0; padding: 0; list-style: none;
}
.hero__etape {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px;
  border-radius: 999px;
  font-size: 13px; letter-spacing: -.005em; white-space: nowrap;
  color: rgba(243, 241, 236, .55);
  background: rgba(30, 32, 34, .38);
  border: 1px solid rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
  transition: color .45s ease, background-color .45s ease, border-color .45s ease;
}
.hero__etape b { font-weight: 600; font-variant-numeric: tabular-nums; }
.hero__etape.active { color: #111214; background: rgba(246, 244, 239, .86); border-color: rgba(255, 255, 255, .7); }

/* l'indication de défilement */
.hero__defiler {
  position: absolute; z-index: 3; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: 1px; height: 38px; overflow: hidden; background: rgba(243, 241, 236, .14);
}
.hero__defiler::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
  background: rgba(243, 241, 236, .8);
  animation: hero-defiler 2.2s cubic-bezier(.65, .05, .25, 1) infinite;
}
@keyframes hero-defiler { to { top: 110%; } }

/* l'apparition sans GSAP */
.hero--css .hero__titre .mot { transform: translateY(105%); animation: hero-monte .9s cubic-bezier(.16, 1, .3, 1) forwards; animation-delay: calc(.15s + var(--i) * .06s); }
.hero--css .hero__apparait { opacity: 0; animation: hero-fondu .9s ease forwards; animation-delay: calc(.55s + var(--i) * .1s); }
@keyframes hero-monte { to { transform: none; } }
@keyframes hero-fondu { to { opacity: 1; } }

/* ——— téléphone ——— */
@media (max-width: 760px) {
  .hero__piste { height: 205svh; }
  .hero__voile {
    background: linear-gradient(0deg, rgba(10, 12, 16, .92) 0%, rgba(10, 12, 16, .84) 36%, rgba(10, 12, 16, .4) 52%, rgba(10, 12, 16, 0) 64%);
    opacity: .5;
  }
  .hero__texte { left: 20px; right: 20px; top: auto; bottom: max(22px, env(safe-area-inset-bottom)); transform: none; width: auto; }
  .hero__titre { font-size: clamp(32px, 9.2vw, 44px); margin-bottom: 12px; letter-spacing: -.04em; }
  .hero__sous { font-size: 14.5px; line-height: 1.42; margin-bottom: 16px; }
  .hero__actions { gap: 10px; }
  .hero__mention { font-size: 13px; }
  .hero__rangee { gap: 14px; }
  .hero__prix { font-size: 13px; padding-left: 14px; white-space: normal; }
  [data-hero] .btn-plan { height: 48px; font-size: 15px; }
  .hero__etapes { left: 16px; right: 16px; top: 78px; bottom: auto; justify-content: center; gap: 6px; }
  .hero__etape { height: 28px; padding: 0 11px; font-size: 12px; }
  .hero__etape span { display: none; }
  .hero__etape.active span { display: inline; }
  .hero__defiler { display: none; }
}

/* ——— sans mouvement ——— */
@media (prefers-reduced-motion: reduce) {
  .hero__piste { height: 300svh; }
  .hero__defiler::after { animation: none; top: 30%; }
  .hero__etape { transition: none; }
  .hero--css .hero__titre .mot, .hero--css .hero__apparait { animation: none; transform: none; opacity: 1; }
}
