/* Tarmac Master 360° — landing page "Coming soon"
   Deux maquettes :
   - paysage  (ordinateur / tablette horizontale) : Landing-page-Final.png  (16:9)
   - portrait (mobile / tablette verticale)        : landing-page_mobile.png (9:16)
   L'unité --u = 1 % de la largeur de la maquette, bornée par la hauteur visible,
   pour que logo / bouton / copyright gardent les proportions des maquettes
   quel que soit le format d'écran. */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #111;
  color: #fff;
  font-family: "Century Gothic", CenturyGothic, AppleGothic, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, p { margin: 0; }

.landing {
  position: relative;
  width: 100%;
  height: 100vh;          /* repli anciens navigateurs */
  height: 100svh;         /* hauteur visible réelle sur mobile */
  min-height: 320px;
  overflow: hidden;
  isolation: isolate;

  /* Paysage (maquette 16:9) */
  --u: min(1vw, calc(100svh * 16 / 9 / 100));
}

/* ---------- Fond ---------- */
.landing__bg,
.landing__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.landing__bg { z-index: -1; }
.landing__bg img {
  object-fit: cover;
  object-position: 50% 50%;
}

/* ---------- Éléments superposés (paysage) ---------- */
.landing__logo,
.landing__soon,
.landing__copyright {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.landing__logo {
  top: 5.3%;
  width: calc(var(--u) * 33.5);
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, .25));
}
.landing__logo img { width: 100%; }

.landing__soon {
  transform: translate(-50%, -100%);
  /* bas du bouton calé à 92.4 % de la hauteur, comme sur la maquette */
  top: 92.4%;
  width: calc(var(--u) * 15.5);
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .35));
}

.landing__copyright {
  bottom: 3.1%;
  width: calc(var(--u) * 35);
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .6));
}

/* ---------- Portrait : mobile / tablette verticale (maquette 9:16) ---------- */
@media (orientation: portrait) {
  .landing {
    --u: min(1vw, calc(100svh * 9 / 16 / 100));
  }
  .landing__bg img { object-position: 50% 60%; }

  .landing__logo {
    top: 17%;
    width: calc(var(--u) * 78.7);
  }
  .landing__soon {
    top: 80.6%;
    width: calc(var(--u) * 37.2);
  }
  .landing__copyright {
    bottom: 1.9%;
    width: calc(var(--u) * 64);
  }
}

/* Écrans plus larges que la maquette 16:9 (fenêtres de navigateur classiques,
   téléphone couché…) : l'image est rognée en haut/bas. On la cadre légèrement vers
   le haut et on accroche le logo au haut de l'image, pour qu'il reste dans le ciel
   au-dessus de la voiture, comme sur la maquette. */
@media (orientation: landscape) and (min-aspect-ratio: 16/9) {
  .landing { --img-h: calc(100vw * 9 / 16); --crop: calc(100svh - var(--img-h)); }
  .landing__bg img { object-position: 50% 30%; }
  /* léger dégradé en bas pour garder le copyright lisible quand il passe sur la voiture */
  .landing__bg::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 22%;
    background: linear-gradient(to top, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0));
    pointer-events: none;
  }
  .landing__logo {
    top: max(1.5svh, calc(var(--crop) * 0.3 + var(--img-h) * 0.05));
    width: min(calc(var(--u) * 33.5), calc(var(--img-h) * 0.68));
  }
}

/* Écrans paysage très bas (téléphone couché) */
@media (orientation: landscape) and (max-height: 500px) {
  .landing__copyright { bottom: 2.5%; }
}

/* ---------- Apparition douce ---------- */
.js .landing__bg img,
.js .landing__logo,
.js .landing__soon,
.js .landing__copyright {
  opacity: 0;
  transition: opacity 1s ease, translate 1s ease;
}
.js .landing__logo { translate: 0 -12px; }
.js .landing__soon { translate: 0 12px; transition-delay: .35s; }
.js .landing__copyright { transition-delay: .6s; }

.js.is-ready .landing__bg img,
.js.is-ready .landing__logo,
.js.is-ready .landing__soon,
.js.is-ready .landing__copyright {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .js .landing__bg img,
  .js .landing__logo,
  .js .landing__soon,
  .js .landing__copyright {
    transition: none;
    translate: 0 0;
  }
}
