/* Le dessin est celui de la V77. L'origine des bouffées est la lèvre de sa cheminée. */
.hero {
  --v-unite: clamp(.58px, .06944444vw, 1.1px);
  --v-echelle: min(calc(.72 * var(--v-unite)), calc(.1099656px + .5556014 * var(--v-unite)));
  --v-bord: max(48px, calc(80px + 161.68 * var(--v-unite) - 291 * var(--v-echelle)));
  --v-sortie: 26.634vw;
}
.vapeur {
  position: absolute;
  inset: 0;
  overflow: hidden;
  contain: layout paint;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 79% 53%, rgba(170,185,177,.28), transparent 66%),
    radial-gradient(ellipse at 20% 89%, rgba(213,201,176,.19), transparent 55%);
}
@media(min-width:1440px) {
  .hero { --v-sortie: min(calc(225.4403px + 10.97874vw), calc(321.028px + 6vw)); }
}
@media(max-width:760px) {
  .hero { --v-sortie: calc(6vw + clamp(128px, 41vw, 165px) + 29.65px); }
}
.vapeur::after {
  content: "";
  position: absolute;
  bottom: calc(var(--v-bord) - 55 * var(--v-echelle));
  left: var(--v-sortie);
  width: calc(540 * var(--v-echelle));
  height: calc(400 * var(--v-echelle));
  transform: translateX(-69.444444%);
  background: url("./maison.webp") center / 100% 100% no-repeat;
}
.vapeur::before, .vapeur canvas {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.vapeur {
  --air-w: clamp(265px,min(39vw,75svh),780px);
  --air-cx: calc(var(--v-sortie) + (100vw - var(--v-sortie)) * .51);
  --air-cy: clamp(calc(.18 * var(--air-w) + 12px),calc(100% - var(--v-bord) - 291 * var(--v-echelle) - clamp(30px,7svh,79px)),69%);
}
.vapeur::before {
  inset: auto; left: var(--air-cx); top: var(--air-cy);
  width:var(--air-w); height:calc(var(--air-w) * .56);
  transform:translate(-50%,-50%);background:url('./air/repos.webp') center / 100% 100% no-repeat;
}
.vapeur[data-pret]::before,.vapeur[data-amorce]:not([data-pret])::before{visibility:hidden}
.vapeur:not([data-pret]) canvas{visibility:hidden}
@media(max-width:760px){
 .vapeur{--air-w:clamp(182px,63vw,360px);--air-cx:calc(100% - .415 * var(--air-w) - 17px);
   --air-cy:clamp(calc(114px + .18 * var(--air-w)),calc(100% - var(--v-bord) - 291 * var(--v-echelle) - 16px),74%)}
}

.vapeur {
  background:
    radial-gradient(ellipse at 76% 35%,rgba(176,203,205,.63),rgba(201,218,213,.30) 47%,transparent 78%),
    radial-gradient(ellipse at 25% 91%,rgba(233,215,176,.26),transparent 53%);
}
.vapeur::before { background-image:var(--air-repos,url('./air/repos.webp')); }
@media(max-width:760px){
 .vapeur{background:
  radial-gradient(ellipse at 90% 56%,rgba(178,206,207,.65),rgba(208,221,213,.25) 55%,transparent 90%),
  radial-gradient(ellipse at 19% 86%,rgba(236,218,185,.20),transparent 52%);}
}

.vapeur-repos-souffle {
  position:absolute; pointer-events:none; width:clamp(77px,8vw,152px); max-width:none; height:auto;
  left:var(--v-sortie); bottom:calc(var(--v-bord) + 291 * var(--v-echelle) - 17px);
  transform:translateX(-56%); opacity:.95;
}
.vapeur[data-pret] .vapeur-repos-souffle { visibility:hidden; }

.vapeur::before{transform:translate(-50%,-50%) scaleX(var(--repos-sens,1))}

/* Même hiérarchie de masses dans la composition fixe et le ciel animé. */
.vapeur::before{transform:translate(-50%,-50%) scale(var(--repos-echelle,1)) scaleX(var(--repos-sens,1))}

.vapeur::before{left:var(--repos-x,var(--air-cx));top:var(--repos-y,var(--air-cy))}

/* Le petit écran reçoit un ciel plus haut pour laisser coexister deux formes. */
@media(max-width:760px){.hero:has(> .vapeur){height:clamp(540px,72svh,660px)}}

/* V79 : le logo validé repose au-dessus du sommet de la maison. */
.hero h1.hero-brand { margin: 9px 0 0; line-height: 1; }
.hero-brand img { width:100%; height:auto; }
@media(min-width:761px) {
 .hero:has(> .vapeur) { min-height:max(440px,calc(var(--v-bord) + 345 * var(--v-echelle) + 185px)); }
 .hero .hero-copy {
  width:clamp(250px,27vw,400px);
  top:auto;
  bottom:calc(var(--v-bord) + 345 * var(--v-echelle) + 16px);
  left:calc(var(--v-sortie) - 90 * var(--v-echelle) - (100vw - 100%) / 2);
  transform:translateX(-50%);
 }
 .hero-copy .kicker { font-size:10px; letter-spacing:.115em; text-align:center; }
}
@media(max-width:760px) {
 .hero .hero-copy { width:min(100%,320px); top:23px; left:0; }
 .hero h1.hero-brand { width:min(100%,290px); }
 .hero-copy .kicker { font-size:9px; }
}
