/**
 * Sun Travel — Homepage v7
 *
 * Hero « vol » (ciel animé + avion), conteneur du moteur mint/glass et
 * badge split-flap. Scopé sous `.v7-page`. Le contenu (hôtels, avis, trust,
 * confiance) utilise des styles inline dans le template et n'a pas besoin
 * de règles ici.
 */

/* — HERO VOL — */
.v7-page .hero-vol {
  position: relative; height: 701px; overflow: hidden;
  background: linear-gradient(180deg, #0a3fa8 0%, #1a6ad8 35%, #5aafeb 65%, #87ceeb 100%);
}
.v7-page .sky-bg {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1;
}
.v7-page .cloud-band {
  opacity: .52; position: absolute; bottom: 0; left: 0; width: 100%; height: 80%;
  overflow: hidden; z-index: 2;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.05) 20%, rgba(0,0,0,.36) 45%, rgba(0,0,0,.78) 67%, black 90%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.05) 20%, rgba(0,0,0,.36) 45%, rgba(0,0,0,.78) 67%, black 90%);
}
.v7-page .cloud-strip {
  position: absolute; top: 0; left: 0; width: 300%; height: 100%;
  animation: scrollClouds 120s linear infinite; will-change: transform;
}
.v7-page .cloud-strip .cc { position: absolute; top: 0; width: 33.3333%; height: 100%; overflow: hidden; }
.v7-page .cloud-strip .cc:nth-child(1) { left: 0; }
.v7-page .cloud-strip .cc:nth-child(2) { left: 33.3333%; transform: scaleX(-1); }
.v7-page .cloud-strip .cc:nth-child(3) { left: 66.6666%; }
.v7-page .cloud-strip .cc img {
  position: absolute; bottom: 0; left: 0; width: 100%; height: 250%;
  object-fit: cover; display: block;
}
@keyframes scrollClouds { 0% { transform: translateX(0); } 100% { transform: translateX(-33.3333%); } }

.v7-page .plane {
  position: absolute; z-index: 4; width: 830px; top: 2%; right: 15%;
  transform-origin: center; opacity: 0;
  animation: planeEntry 4s cubic-bezier(.25,.1,.25,1) forwards, float 7s ease-in-out 4s infinite;
}
@keyframes planeEntry {
  0% { right: 110%; top: 8%; opacity: 1; transform: rotate(-2deg); }
  40% { top: 4%; opacity: 1; transform: rotate(-1deg); }
  70% { right: 20%; top: 2%; transform: rotate(-.3deg); }
  100% { right: 15%; top: 2%; opacity: 1; transform: rotate(0deg); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(.3deg); }
}

.v7-page .hero-vol-overlay {
  position: absolute; inset: 0; z-index: 5;
  background: linear-gradient(to right, rgba(0,0,0,.35) 0%, rgba(0,0,0,.1) 45%, transparent 70%);
}
.v7-page .hero-vol-content {
  position: absolute; top: 0; bottom: 0; left: 0; z-index: 6;
  padding: 60px 56px 80px; display: flex; flex-direction: column; justify-content: flex-start;
  opacity: 0; animation: fadeInContent 1.2s ease-out 2.8s forwards;
}
@keyframes fadeInContent {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.v7-page .hv-h1 {
  font-size: 72px; font-weight: 800; color: #fff; line-height: 1.04;
  letter-spacing: -.04em; max-width: 620px; text-shadow: 0 3px 20px rgba(0,0,0,.25);
}
.v7-page .hv-accent {
  display: block; font-family: 'Playfair Display', serif; font-style: italic;
  color: var(--accent-gold); font-weight: 400; font-size: 86px; margin-top: 38px;
}
.v7-page .hv-sub {
  font-size: 25px; color: rgba(255,255,255,.85); margin-top: 40px; max-width: 550px;
  text-shadow: 0 2px 10px rgba(0,0,0,.3); font-weight: 500;
}

/* — Conteneur du moteur — ancré en bas du hero (style Kenya Airways) — */
.v7-page .search-wrap {
  max-width: 1155px; margin: -170px auto 0; padding: 0 48px;
  position: relative; z-index: 50;
  opacity: 0; animation: fadeInSearch 1s ease-out 3.5s forwards;
}
/* Ancre #vols : le haut du moteur s'arrête 20 px sous le menu collant, à l'arrivée
   par un lien comme par le menu. */
.v7-page #vols { scroll-margin-top: calc(var(--nav-h) + 20px); }
@keyframes fadeInSearch {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* SYN-1930 — sur ordinateur, le bouton « Voir les tarifs » tient dans l'écran dès
   l'ouverture : le hero suit la hauteur de la fenêtre (701 px au plus). 106 px =
   bas du bouton sous le bas du hero (moteur remonté de 170 px) + 16 px de marge.
   Sur un écran bas, le titre se resserre pour ne pas passer sous le moteur. */
@media (min-width: 1025px) {
  .v7-page .hero-vol { height: clamp(430px, calc(100vh - var(--nav-h) - 106px), 701px); }
}
@media (min-width: 1025px) and (max-height: 800px) {
  .v7-page .hero-vol-content { padding-top: 24px; }
  .v7-page .hv-accent { margin-top: 12px; }
  .v7-page .hv-sub { margin-top: 24px; }
}
@media (min-width: 1025px) and (max-height: 700px) {
  .v7-page .hv-accent { font-size: 64px; }
  .v7-page .hv-sub { font-size: 20px; }
}

/* — Badge split-flap (tableau d'aéroport animé) — */
.v7-page .sf-t {
  display: inline-block; width: 22px; height: 30px; line-height: 30px; text-align: center;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 18px; font-weight: 700;
  color: #fff; background: var(--slate); border-radius: 3px; position: relative; overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.3);
}
.v7-page .sf-t::after {
  content: ''; position: absolute; left: 0; right: 0; top: 49%; height: 1px; background: rgba(0,0,0,.35);
}
.v7-page .sf-t.sf-blank { background: transparent; box-shadow: none; color: transparent; }
.v7-page .sf-t.sf-blank::after { display: none; }
.v7-page .sf-t.sf-gap { width: 10px; background: transparent; box-shadow: none; color: transparent; }
.v7-page .sf-t.sf-gap::after { display: none; }
.v7-page .sf-sub { margin: 10px 0 0; font-size: 17px; font-weight: 600; color: #1a2436; }
.v7-page .sf-anim { animation: sfF .06s linear; }
@keyframes sfF { 0% { transform: scaleY(1); } 50% { transform: scaleY(0); } 100% { transform: scaleY(1); } }

/* — Phrase d'assistance sous le moteur : discrète, en retrait du bouton — */
.v7-page .search-help { margin: 16px 0 0; text-align: center; font-size: 15px; color: #5a6472; }
/* Le numéro est la raison d'être de la phrase sur mobile : zone de toucher agrandie
   par un rembourrage que la marge négative annule dans la mise en page. */
.v7-page .search-help a {
  color: inherit; font-weight: 600; white-space: nowrap; text-decoration: underline; text-underline-offset: 2px;
  display: inline-block; padding: 10px 4px; margin: -10px -4px;
}
.v7-page .search-help a:hover, .v7-page .search-help a:focus-visible { color: #1a2436; }
.v7-page .search-help a:focus-visible { outline: 2px solid #1a2436; outline-offset: 2px; border-radius: 4px; }

/* — Formalités & infos (v209) —
   Deux cartes qui remplacent l'ancienne image pleine largeur formulaire.webp.
   Le ratio 792/478 est celui des visuels fournis : le figer évite le saut de
   mise en page au chargement, les <img> n'ayant pas d'attributs width/height. */
.v7-page .fai-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.v7-page .fai-card {
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 2px 14px rgba(0,0,0,.06); display: flex; flex-direction: column;
}
.v7-page .fai-card img { width: 100%; aspect-ratio: 792/478; object-fit: cover; display: block; }
.v7-page .fai-body { padding: 28px 24px 32px; text-align: center; display: flex; flex-direction: column; align-items: center; flex: 1; }
.v7-page .fai-body h3 { font-size: 30px; font-weight: 800; color: #12295C; margin: 0 0 8px; letter-spacing: -.01em; text-transform: uppercase; }
.v7-page .fai-flag { color: #E35D14; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 10px; font-size: 17px; }
.v7-page .fai-body p { color: #3A4149; font-size: 17px; line-height: 1.55; margin: 0 0 6px; }
.v7-page .fai-btn {
  margin-top: auto; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  width: min(100%, 340px); padding: 16px 24px; border-radius: 10px; color: #fff;
  font-weight: 700; font-size: 17px; text-transform: uppercase; letter-spacing: .03em;
  transition: filter .2s, transform .2s;
}
.v7-page .fai-btn:hover { filter: brightness(1.07); transform: translateY(-2px); color: #fff; }
.v7-page .fai-btn-o { background: linear-gradient(90deg, #FAA918, #F39317); }
.v7-page .fai-btn-b { background: #3371B7; }

/* — Responsive — */
@media (max-width: 1024px) {
  .v7-page .hero-vol { height: 500px; }
  .v7-page .plane { width: 500px; right: -2%; }
  .v7-page .hv-h1 { font-size: 42px; }
  .v7-page .hv-accent { font-size: 46px; }
  .v7-page .hero-vol-content { padding: 32px 20px 70px; }
  .v7-page .search-wrap { padding-left: 20px !important; padding-right: 20px !important; }
}
@media (max-width: 900px) {
  /* Grille des hôtels : 4 → 2 colonnes ; barres de confiance et avis resserrées. */
  .v7-page .st-hgrid { grid-template-columns: repeat(2, 1fr) !important; gap: 14px !important; }
  .v7-page .st-wrap { justify-content: center !important; gap: 18px !important; }
  /* Les remontées négatives de la maquette (margin-top:-114px) chevauchent le
     contenu sur petit écran : on les annule. */
  .v7-page .st-overlap { margin-top: 0 !important; padding-left: 16px !important; padding-right: 16px !important; }
  .v7-page .fai-grid { grid-template-columns: 1fr; gap: 20px; }
  .v7-page .fai-body h3 { font-size: 24px; }
  .v7-page .fai-body p, .v7-page .fai-flag, .v7-page .fai-btn { font-size: 15px; }
}
@media (max-width: 640px) {
  .v7-page .plane { width: 250px; top: 40%; right: -10%; }
  .v7-page .hv-h1 { font-size: 34px; }
  .v7-page .hv-accent { font-size: 38px; }
  .v7-page .hv-sub { font-size: 17px; margin-top: 20px; }
  .v7-page .hero-vol-content { padding: 24px 20px 40px; }
  .v7-page .search-wrap { margin-top: -90px !important; }
}
@media (max-width: 760px) {
  /* Le badge à 27 cases fait 628 px en 22 px : il déborde sous ~680 px. */
  .v7-page #sf-badge { max-width: 100%; }
  .v7-page .sf-t { width: 16px !important; }
  .v7-page .sf-t.sf-gap { width: 10px !important; }
}
@media (max-width: 600px) {
  .v7-page .st-hgrid { grid-template-columns: 1fr !important; }
  .v7-page #sf-badge { padding: 10px 12px !important; }
  /* 27 cases pour « À QUEL PRIX PARTIREZ-VOUS ? » : resserrées pour tenir en 390 px. */
  .v7-page .sf-t { width: 11px !important; height: 24px; line-height: 24px; font-size: 12px; }
  .v7-page .sf-t.sf-gap { width: 6px !important; }
  .v7-page .sf-sub { font-size: 15px; padding: 0 12px; }
}

/* — SUN-2 (17/11/2026) — téléphone : le moteur entier, jusqu'au bouton « Voir les
   tarifs », est visible dès l'ouverture, sans défiler ; le menu ne change pas.
   Pendant mobile de SYN-1930 (ordinateur, plus haut) :
   - le moteur ne chevauche plus le hero et le hero prend la hauteur qui reste
     sous le moteur, avec un plancher de 96 px pour garder le titre ;
   - le moteur se resserre : marges latérales réduites, type de voyage et classe
     côte à côte, pastille « Passagers » retirée (le compteur ouvre le même menu) ;
   - les animations d'entrée ne retardent plus l'affichage (3,5 s sinon).
   --sun2-engine : hauteur du bloc badge + moteur ainsi resserré, mesurée à 390 px
   de large, plus 12 px de marge sous le bouton. 100svh plutôt que 100vh : sur
   iOS, vh compte la hauteur sans les barres de Safari et le bouton passerait
   dessous. */
@media (max-width: 767px) {
  .v7-page { --sun2-engine: 500px; }
  .v7-page .hero-vol { height: max(96px, calc(100svh - var(--nav-h) - var(--sun2-engine))); }
  .v7-page .plane, .v7-page .hv-sub { display: none; }
  .v7-page .hero-vol-content { padding: 16px 16px 12px; justify-content: center; animation: none; opacity: 1; }
  .v7-page .hv-h1 { font-size: 26px; }
  .v7-page .hv-accent { font-size: 30px; margin-top: 0; }
  .v7-page .search-wrap {
    margin-top: 0 !important; padding-left: 8px !important; padding-right: 8px !important;
    animation: none; opacity: 1;
  }

  /* Badge split-flap */
  .v7-page #sf-badge { min-height: 40px !important; padding: 8px 12px !important; }
  .v7-page #sf-badge + .sf-sub { margin-top: 6px; font-size: 14px; }
  .v7-page #vols > div > div:first-child { padding-top: 10px !important; }

  /* Moteur */
  .v7-page #vols #hero-search { padding: 10px 12px 12px !important; }
  #vols #hero-search .v7-sqa-row1 { gap: 8px; margin-bottom: 8px; }
  #vols #hero-search .v7-sqa-row1 > .v7-pill-select { flex: 1 1 0; min-width: 0; }
  #vols #hero-search .v7-passengers-group { flex: 1 1 100%; }
  #vols #hero-search .v7-pill.v7-pax-label { display: none; }
  #vols #hero-search .v7-pill.v7-pax-counts { flex: 1 1 100%; justify-content: space-between; }
  #vols #hero-search .v7-cell { padding-top: 4px; padding-bottom: 4px; }
}
/* SUN-2 — écran bas (iPhone SE dans Safari : ~548 px visibles) : le hero et la
   phrase sous le badge cèdent la place, le moteur passe avant. */
@media (max-width: 767px) and (max-height: 620px) {
  .v7-page .hero-vol { display: none; }
  .v7-page #sf-badge + .sf-sub { display: none; }
}
