/* =================================================================
   NEXHOM — Couche « landing » pages service (trafic Google Ads)
   Chargée APRÈS style.css, seulement sur les 5 pages service.
   Scope : body.landing + composants .ld-*
   Charte stricte : Rouge #E20613 · Noir #12100B · Blanc · Gris ·
   Microgramma (titres) · Helvetica (corps). Conversion d'abord :
   hero sombre photo + carte formulaire multi-étapes visible à l'arrivée.
   ================================================================= */

body.landing {
  --ld-ink: #0b0a07;
  --ld-glass: rgba(255, 255, 255, .06);
  --ld-glass-line: rgba(255, 255, 255, .14);
}

/* ----------  1. Header : transparent au-dessus du hero → verre au scroll  ---------- */
body.landing .site-header {
  position: fixed; top: 0; left: 0; right: 0;
  padding-top: env(safe-area-inset-top);
  background: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: background .4s var(--ease-lux), border-color .4s var(--ease-lux);
}
body.landing .site-header.is-scrolled {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--border);
  box-shadow: 0 10px 30px -22px rgba(18, 16, 11, .4);
}
/* Deux logos : blanc au-dessus du hero, sombre au scroll */
body.landing .brand { position: relative; }
body.landing .brand__logo { transition: opacity .35s var(--ease-lux); }
body.landing .brand__logo--dark { position: absolute; inset: 0; opacity: 0; }
body.landing .site-header.is-scrolled .brand__logo--light { opacity: 0; }
body.landing .site-header.is-scrolled .brand__logo--dark { opacity: 1; }
/* Liens clairs au-dessus du hero */
body.landing .site-header:not(.is-scrolled) .nav__links > a,
body.landing .site-header:not(.is-scrolled) .has-dropdown > a,
body.landing .site-header:not(.is-scrolled) .nav__phone { color: #fff; }
body.landing .site-header:not(.is-scrolled) .nav__links > a:hover,
body.landing .site-header:not(.is-scrolled) .has-dropdown > a:hover,
body.landing .site-header:not(.is-scrolled) .nav__phone:hover { color: #fff; background: rgba(255, 255, 255, .1); }
body.landing .site-header:not(.is-scrolled) .has-dropdown > a::after { border-color: rgba(255, 255, 255, .85); }
body.landing .site-header:not(.is-scrolled) .nav__toggle span { background: #fff; }
body.landing .site-header:not(.is-scrolled) .nav__links a.is-active { color: #fff; background: rgba(255, 255, 255, .14); }
@media (max-width: 1080px) {
  /* Menu mobile : panneau blanc, liens sombres */
  body.landing .site-header:not(.is-scrolled) .nav__links > a,
  body.landing .site-header:not(.is-scrolled) .has-dropdown > a,
  body.landing .site-header:not(.is-scrolled) .nav__phone { color: var(--black); }
  body.landing .site-header:not(.is-scrolled) .nav__links > a:hover { background: var(--red-050); color: var(--red); }
  /* Panneau blanc : le lien de la page ACTIVE doit rester lisible (rouge, pas blanc) */
  body.landing .site-header:not(.is-scrolled) .nav__links a.is-active { color: var(--red); background: var(--red-050); }
}

/* ----------  2. Hero landing  ---------- */
/* Hero plein écran cinématographique — même esprit que l'accueil (.nx-hero) */
body.landing .ld-hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--ld-ink); color: #fff;
  min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--header-h) + env(safe-area-inset-top) + clamp(20px, 3vw, 40px)) 0 clamp(36px, 4vw, 60px);
}
body.landing .ld-hero > .container { width: 100%; }
body.landing .ld-hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: 70% 42%;
  filter: saturate(1.03) contrast(1.02) brightness(1.03);
  transform: scale(1.05);
  animation: ld-hero-zoom 26s ease-in-out infinite alternate;
}
@keyframes ld-hero-zoom { from { transform: scale(1.06); } to { transform: scale(1.14) translateY(-1.2%); } }
body.landing .ld-hero__wash {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(94deg, rgba(11, 10, 7, .96) 5%, rgba(11, 10, 7, .8) 42%, rgba(11, 10, 7, .5) 74%, rgba(11, 10, 7, .32) 100%),
    linear-gradient(0deg, rgba(11, 10, 7, .55) 0%, transparent 34%),
    radial-gradient(52% 44% at 88% 6%, rgba(226, 6, 19, .22), transparent 62%);
}
body.landing .ld-grid {
  display: grid; grid-template-columns: 1.04fr .96fr;
  gap: clamp(32px, 5vw, 68px); align-items: center;
}
body.landing .ld-hero .breadcrumb { margin-bottom: 18px; }

/* Surtitre pastille (même esprit que l'accueil) */
body.landing .ld-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: .74rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: rgba(255, 255, 255, .82);
  background: var(--ld-glass); border: 1px solid var(--ld-glass-line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 9px 16px 9px 14px; border-radius: 100px;
}
body.landing .ld-kicker__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(226, 6, 19, .18); flex: none; }

body.landing .ld-hero h1 {
  color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.7rem); line-height: 1.06;
  letter-spacing: .01em; margin: 18px 0 0; text-shadow: 0 2px 40px rgba(0, 0, 0, .35);
  text-transform: uppercase;
}
body.landing .ld-hero h1 .hl { color: var(--red); text-shadow: 0 0 38px rgba(226, 6, 19, .5); }
body.landing .ld-lead {
  color: rgba(255, 255, 255, .82); font-weight: 300;
  font-size: clamp(1.02rem, 1.35vw, 1.14rem); line-height: 1.65;
  max-width: 480px; margin: 16px 0 0;
}

/* Bénéfices scannables (style IZI) */
body.landing .ld-points { display: grid; gap: 12px; margin: 24px 0 0; }
body.landing .ld-points li { display: flex; align-items: flex-start; gap: 11px; color: rgba(255, 255, 255, .92); font-size: .99rem; line-height: 1.5; }
body.landing .ld-points svg { width: 20px; height: 20px; color: var(--red); flex: none; margin-top: 1px; }
body.landing .ld-points b { font-weight: 600; }

/* Ligne de confiance sous les bénéfices */
body.landing .ld-trust {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 26px; padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-family: var(--font-display); font-size: .68rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .5);
}
body.landing .ld-trust .grating__txt { color: rgba(255, 255, 255, .88); font-size: .68rem; letter-spacing: .14em; }
body.landing .ld-card__sub .grating { gap: 6px; vertical-align: middle; margin-left: 2px; }
body.landing .ld-card__sub .grating__stars svg { width: 11px; height: 11px; }
body.landing .ld-card__sub .grating__txt { font-size: .72rem; letter-spacing: .06em; color: var(--black); }

/* ----------  3. Carte formulaire (wizard)  ---------- */
body.landing .ld-aside { position: relative; }
body.landing .ld-aside::before {
  content: ""; position: absolute; inset: -10% -6% -10% 8%; z-index: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 6, 19, .26), transparent 68%); filter: blur(24px);
}
body.landing .ld-card {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), #fff);
  border-radius: 24px; padding: clamp(22px, 2.4vw, 32px);
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(255, 255, 255, .7);
  color: var(--black);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
body.landing .ld-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgba(226, 6, 19, .55), rgba(255, 255, 255, 0) 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
body.landing .ld-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
body.landing .ld-card__badge {
  width: 46px; height: 46px; border-radius: 14px; flex: none; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--red), var(--red-900)); color: #fff; box-shadow: var(--shadow-red);
}
body.landing .ld-card__badge svg { width: 24px; height: 24px; }
body.landing .ld-card__head h2 { font-size: 1.12rem; text-transform: uppercase; letter-spacing: .01em; margin: 0; }
body.landing .ld-card__sub { color: var(--text-soft); font-size: .9rem; margin: 2px 0 18px; }

/* Progression */
body.landing .ld-progress { height: 4px; border-radius: 2px; background: var(--paper-2); overflow: hidden; margin-bottom: 18px; }
body.landing .ld-progress i { display: block; height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, var(--red), #ff5a63); transition: width .4s var(--ease-lux); }

/* Étapes */
body.landing .ld-step { display: none; }
body.landing .ld-step.is-on { display: grid; gap: 14px; animation: ld-in .35s var(--ease-lux); }
@keyframes ld-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
body.landing .ld-q { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; margin: 0; }

/* Options — grands boutons cliquables (style Borne4You) */
body.landing .ld-opts { display: grid; gap: 10px; }
body.landing .ld-opt {
  position: relative; display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--border); border-radius: 14px; padding: 14px 16px;
  cursor: pointer; background: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: .97rem;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition), transform var(--transition);
}
body.landing .ld-opt:hover { border-color: rgba(226, 6, 19, .55); transform: translateY(-1px); }
body.landing .ld-opt input { position: absolute; opacity: 0; pointer-events: none; }
body.landing .ld-opt .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--grey-300); flex: none; display: grid; place-items: center; transition: border-color var(--transition); }
body.landing .ld-opt.is-checked { border-color: var(--red); background: var(--red-050); box-shadow: 0 0 0 3px rgba(226, 6, 19, .12); }
body.landing .ld-opt.is-checked .dot { border-color: var(--red); }
body.landing .ld-opt.is-checked .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

/* Navigation du wizard */
body.landing .ld-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
body.landing .ld-back {
  background: none; border: 0; cursor: pointer; color: var(--text-soft);
  font-family: var(--font-display); font-weight: 600; font-size: .92rem;
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 9px;
  transition: var(--transition);
}
body.landing .ld-back:hover { color: var(--black); background: var(--paper-2); }
body.landing .ld-back svg { width: 16px; height: 16px; }
body.landing .ld-count { font-family: var(--font-display); font-size: .85rem; color: var(--text-soft); font-variant-numeric: tabular-nums; }
body.landing .ld-next { min-width: 132px; }
body.landing .is-hidden { visibility: hidden; pointer-events: none; }

/* Champs contact (réutilise .field de style.css) */
body.landing .ld-card .field input { background: #fbfbfa; border-radius: 12px; }
body.landing .ld-card .field input:focus { background: #fff; }

/* Pied de carte : confiance */
body.landing .ld-card__foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: .8rem; color: var(--text-soft); }
body.landing .ld-card__foot svg { width: 15px; height: 15px; color: #3f9d54; flex: none; }

/* ----------  4. Corps de page  ---------- */
/* Le contenu (sections existantes) suit le hero fixe : rien à décaler,
   le hero est en flux. Les ancres #devis remontent à la carte. */
body.landing { scroll-behavior: smooth; }

/* ----------  5. Responsive  ---------- */
@media (max-width: 960px) {
  body.landing .ld-grid { grid-template-columns: 1fr; gap: 24px; }
  /* Un mot très large (ex. « AUTOCONSOMMATION ») ne doit jamais élargir la piste
     de grille : la carte formulaire débordait de l'écran sur mobile. */
  body.landing .ld-grid > * { min-width: 0; }
  body.landing .ld-hero h1 { hyphens: auto; overflow-wrap: anywhere; }
  body.landing .ld-hero { min-height: 100svh; align-items: flex-start; padding-top: calc(var(--header-h) + env(safe-area-inset-top) + 16px); padding-bottom: 36px; }
  /* Voile renforcé : le formulaire blanc porte la lisibilité */
  body.landing .ld-hero__wash { background:
    linear-gradient(180deg, rgba(11, 10, 7, .93) 0%, rgba(11, 10, 7, .88) 55%, rgba(11, 10, 7, .93) 100%),
    radial-gradient(70% 34% at 80% 6%, rgba(226, 6, 19, .16), transparent 62%); }
  body.landing .ld-lead { max-width: 100%; }
  body.landing .ld-points { margin-top: 18px; }
  body.landing .ld-trust { margin-top: 18px; }
}
/* Tablette portrait (621–960) : colonne unique centrée, pas de carte étirée pleine largeur */
@media (min-width: 621px) and (max-width: 960px) {
  body.landing .ld-grid { max-width: 680px; margin-inline: auto; }
}

@media (max-width: 620px) {
  /* 5,9vw : « AUTOCONSOMMATION » (mot le plus large du site) tient entier à 360 px */
  body.landing .ld-hero h1 { font-size: clamp(1.35rem, 5.9vw, 1.9rem); }
  body.landing .ld-hero .breadcrumb { display: none; }
  body.landing .ld-card { padding: 20px 18px; }
  body.landing .ld-next { min-width: 118px; }
}

/* Pastille hero compacte sur téléphone (texte raccourci via .kick-x) */
@media (max-width: 540px) {
  body.landing .ld-kicker { font-size: .72rem; letter-spacing: .12em; gap: 9px; padding: 8px 14px 8px 12px; }
}

/* ----------  6. Barre de réassurance (juste sous le hero)  ---------- */
body.landing .ld-assur { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
body.landing .ld-assur ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 22px 0; }
body.landing .ld-assur li { display: flex; align-items: center; gap: 13px; }
body.landing .ld-assur .ic { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; background: var(--red-050); color: var(--red); }
body.landing .ld-assur svg { width: 21px; height: 21px; }
body.landing .ld-assur b { display: block; font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--black); line-height: 1.2; }
body.landing .ld-assur span { font-size: .82rem; color: var(--text-soft); }
@media (max-width: 860px) { body.landing .ld-assur ul { grid-template-columns: repeat(2, 1fr); gap: 16px 20px; } }
@media (max-width: 460px) { body.landing .ld-assur span { display: none; } body.landing .ld-assur .ic { width: 34px; height: 34px; } }

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  body.landing .ld-step.is-on { animation: none; }
  body.landing .ld-hero__bg { animation: none; transform: scale(1.05); }
}
