/*
 * Section d'accueil (hero), rendue par [lg_accueil_hero] (includes/lg-accueil-hero.php).
 * Reprend les styles de l'ancien bloc HTML d'Elementor (pages/home/home section 1 hero.txt),
 * plus les ajouts du 2026-10-15 (spec docs/superpowers/specs/2026-10-15-accueil-hero-design.md).
 * A INCREMENTER dans includes/lg-accueil-hero.php a chaque modification.
 */

.lg-hero {
  --lg-hero-accent: var(--color-accent-main, #a1907d);
  --lg-hero-police: var(--font-primary, 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif);
  position: relative;
  width: 100vw;
  height: calc(100svh + 80px);
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -80px;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding-top: 80px;
  box-sizing: border-box;
  isolation: isolate;
}

.lg-hero-video { position: absolute; inset: 0; z-index: 1; }
.lg-hero-video-element { width: 100%; height: 100%; object-fit: cover; }

/* Voile : plus sombre à gauche, où se trouve le texte */
.lg-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, rgba(25, 18, 12, 0.74) 0%, rgba(25, 18, 12, 0.48) 50%, rgba(25, 18, 12, 0.12) 82%);
}

/* La carte est positionnée par rapport à .lg-hero : le contenu reste « static »,
   ses enfants passent au-dessus du voile. */
.lg-hero-content {
  width: 100%;
  max-width: 1280px;
  padding: 0 56px;
  box-sizing: border-box;
  color: #fff;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.lg-hero-content > * {
  position: relative;
  z-index: 3;
  max-width: 640px;
}

/* Le titre garde ses deux lignes (le <br>) au lieu de passer sur quatre */
.lg-hero-content > .lg-hero-title {
  max-width: 980px;
}

.lg-hero-surtitre {
  margin: 0 0 18px;
  font-family: var(--lg-hero-police);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  opacity: 0.92;
  animation: lgHeroFadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.1s backwards;
}

.lg-hero-title {
  margin: 0 0 16px;
  font-family: var(--lg-hero-police);
  font-size: clamp(36px, 4vw, 64px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.5px;
  color: #fff;
  animation: lgHeroFadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

.lg-hero-subtitle {
  margin: 0 0 18px;
  font-family: var(--lg-hero-police);
  font-size: clamp(16px, 1.5vw, 22px);
  line-height: 1.5;
  animation: lgHeroFadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s backwards;
}

.lg-hero-quote {
  font-style: italic;
  font-weight: 300;
  opacity: 0.9;
}

.lg-hero-phrase {
  margin: 0 0 32px;
  max-width: 520px;
  font-family: var(--lg-hero-police);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.55;
  opacity: 0.92;
  animation: lgHeroFadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.5s backwards;
}

.lg-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  animation: lgHeroFadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s backwards;
}

.lg-hero-cta {
  display: inline-block;
  padding: 18px 40px;
  background: var(--lg-hero-accent);
  border: 1px solid var(--lg-hero-accent);
  border-radius: 6px;
  color: #fff;
  font-family: var(--lg-hero-police);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
}

.lg-hero-cta:hover,
.lg-hero-cta:focus {
  background: #8a7c69;
  border-color: #8a7c69;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(161, 144, 125, 0.3);
}

.lg-hero-cta--secondaire {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.85);
  padding-left: 32px;
  padding-right: 32px;
}

.lg-hero-cta--secondaire:hover,
.lg-hero-cta--secondaire:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  box-shadow: none;
}

.lg-hero-preuves {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--lg-hero-police);
  font-size: 14px;
  animation: lgHeroFadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.8s backwards;
}

.lg-hero-preuves li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Avis sur sa propre ligne, France + paiement ensemble en dessous */
.lg-hero-preuves .lg-hero-preuves-avis {
  flex-basis: 100%;
}

.lg-hero-preuves svg {
  flex: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  /* Les icônes paraissaient un peu basses à côté du texte (retour d'Élie) */
  transform: translateY(-1.5px);
}

/* Bouton « Avis clients vérifiés » : protégé des styles button du thème */
.lg-hero .lg-hero-avis,
.lg-hero .lg-hero-avis:hover,
.lg-hero .lg-hero-avis:focus,
.lg-hero .lg-hero-avis:active {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  color: #fff;
  font: inherit;
  text-transform: none;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.5);
  text-underline-offset: 3px;
  cursor: pointer;
}

.lg-hero .lg-hero-avis:hover { text-decoration-color: #fff; }
.lg-hero .lg-hero-avis:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.lg-hero-etoiles {
  color: #e3b54a;
  letter-spacing: 1px;
}

/* Carte « Exemple sur mesure » : en bas à droite sur grand écran */
/* À droite, centrée verticalement en face du texte, alignée sur le bord droit
   de la colonne de contenu (1280 px max). */
.lg-hero-content > .lg-hero-exemples {
  position: absolute;
  top: 50%;
  right: max(56px, calc((100vw - 1280px) / 2 + 56px));
  bottom: auto;
  z-index: 4;
  width: 340px;
  max-width: none;
  transform: translateY(-50%);
  margin-top: 40px; /* compense le header qui recouvre le haut de la section */
}

/* Tirage au hasard : les cartes non choisies portent l'attribut hidden */
.lg-hero-exemple[hidden] { display: none !important; }

.lg-hero-exemple {
  display: block;
  padding: 12px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  color: #1a1a1a;
  font-family: var(--lg-hero-police);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  transition: transform 0.25s ease;
  animation: lgHeroFadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) 0.9s backwards;
}

.lg-hero-exemple:hover { transform: translateY(-3px); color: #1a1a1a; }

.lg-hero-exemple-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--lg-hero-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* Format du mur (aspect-ratio en ligne, ex. 300 / 250) : le motif design est recadré comme dans le configurateur */
.lg-hero-exemple-visuel {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 9px;
  background: #eee;
}

.lg-hero-exemple-visuel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lg-hero-dim {
  position: absolute;
  padding: 3px 9px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.lg-hero-dim--l { top: 8px; left: 50%; transform: translateX(-50%); }
.lg-hero-dim--h { left: 8px; top: 50%; transform: translateY(-50%); }

.lg-hero-exemple-infos { display: block; }
.lg-hero-exemple-nom { display: block; margin-top: 10px; font-weight: 600; }
.lg-hero-exemple-dims { display: none; }

.lg-hero-exemple-prix {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-top: 4px;
}

.lg-hero-exemple-prix del { color: #999; font-size: 12px; }
.lg-hero-exemple-prix strong { font-size: 18px; font-weight: 700; }

/* Format « B » (lg_prix_balisage, styles communs dans style.css) */
.lg-hero-exemple-prix .lg-prix-actuel { font-size: 18px; font-weight: 700; color: #1f1f1f; }
.lg-hero-exemple-prix .lg-prix-promo { font-size: 12px; }

.lg-hero-exemple-etiquette {
  padding: 2px 7px;
  background: var(--lg-hero-accent);
  border-radius: 3px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.lg-hero-exemple-mur { display: block; margin-top: 2px; color: #777; font-size: 12px; }
.lg-hero-exemple-lien { display: block; margin-top: 8px; color: var(--lg-hero-accent); font-weight: 600; }

/* Flèche de défilement (inchangée) */
.lg-hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  cursor: pointer;
  opacity: 0;
  animation: lgHeroScrollFadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

.lg-hero-scroll-arrow { color: #fff; animation: lgHeroBounce 2s infinite; }
.lg-hero-scroll:hover .lg-hero-scroll-arrow { animation: lgHeroBounce 1s infinite; }

@keyframes lgHeroFadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes lgHeroScrollFadeIn {
  from { opacity: 0; bottom: 30px; }
  to   { opacity: 1; bottom: 40px; }
}

@keyframes lgHeroBounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* Hauteurs par écran (reprises telles quelles) */
@media (min-width: 1280px) and (max-width: 1599px) {
  .lg-hero { height: calc(105svh + 96px); margin-top: -96px; padding-top: 96px; }
}

@media (min-width: 1600px) {
  .lg-hero { height: calc(100svh + 112px); margin-top: -112px; padding-top: 112px; }
}

@media (max-width: 1180px) {
  .lg-hero { height: calc(100svh + 64px); margin-top: -64px; padding-top: 64px; }
  .lg-hero-content { padding: 0 36px; }
  .lg-hero-content > .lg-hero-exemples { right: 36px; width: 280px; }
}

/* Tablette portrait et mobile : texte en bas du visuel, carte en ligne compacte */
@media (max-width: 1024px) {
  /* Bloc centré en hauteur (pas collé en bas) : tout tient dans l'écran */
  .lg-hero { align-items: center; }

  .lg-hero-overlay {
    background: linear-gradient(180deg, rgba(25, 18, 12, 0.35) 0%, rgba(25, 18, 12, 0.62) 35%, rgba(25, 18, 12, 0.78) 100%);
  }

  .lg-hero-content { padding: 0 24px 32px; }
  .lg-hero-title { font-size: clamp(30px, 6vw, 48px); }

  .lg-hero-content > .lg-hero-exemples {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: 440px;
    margin: 22px 0 0;
    /* En dernier sur mobile (après boutons et preuves) : elle ne coupe plus la lecture */
    order: 10;
  }

  /* Carte compacte mais lisible seule : titre « Exemple sur mesure », décor,
     taille du mur, prix, et une flèche qui invite à cliquer.
       [visuel] EXEMPLE SUR MESURE        ›
                Décor
                pour un mur de 3 m × 2,50 m
                279,00 € ~~465,00 €~~ −40 % */
  .lg-hero-exemple {
    display: grid;
    grid-template-columns: 76px 1fr 18px;
    grid-template-areas:
      "visuel kicker fleche"
      "visuel infos  fleche";
    align-items: center;
    column-gap: 12px;
    padding: 10px 12px 10px 10px;
    border-radius: 12px;
  }

  .lg-hero-exemple-visuel {
    grid-area: visuel;
    align-self: stretch;
    width: 76px;
    height: auto;
    min-height: 76px;
    border-radius: 8px;
  }

  .lg-hero-exemple-kicker {
    grid-area: kicker;
    align-self: end;
    margin: 0 0 2px;
    font-size: 9.5px;
  }

  .lg-hero-exemple-infos { grid-area: infos; align-self: start; }

  .lg-hero-exemple::after {
    content: "›";
    grid-area: fleche;
    color: var(--lg-hero-accent);
    font-size: 26px;
    line-height: 1;
    text-align: right;
  }

  .lg-hero-dim,
  .lg-hero-exemple-dims,
  .lg-hero-exemple-lien { display: none; }

  .lg-hero-exemple-nom { margin-top: 0; font-size: 14px; }
  .lg-hero-exemple-mur { margin-top: 0; font-size: 12px; }
  .lg-hero-exemple-prix { margin-top: 3px; }
  .lg-hero-exemple-prix strong,
  .lg-hero-exemple-prix .lg-prix-actuel { font-size: 16px; }
  .lg-hero-exemple-prix .lg-prix-promo { font-size: 11px; }
}

@media (max-width: 768px) {
  .lg-hero { height: calc(100svh + 56px); margin-top: -56px; padding-top: 56px; }
  .lg-hero-surtitre { margin-bottom: 10px; font-size: 11px; letter-spacing: 2px; }
  .lg-hero-subtitle { margin-bottom: 12px; font-size: 15px; }
  .lg-hero-phrase { margin-bottom: 18px; font-size: 14px; }
  .lg-hero-ctas { width: 100%; }
  .lg-hero-cta { flex: 1 1 100%; padding: 15px 20px; text-align: center; font-size: 16px; }
  .lg-hero-preuves { gap: 8px 16px; margin-top: 16px; font-size: 12.5px; }
  .lg-hero-scroll { display: none; }
  .lg-hero-content { padding-bottom: 28px; }
}

@media (max-width: 480px) {
  .lg-hero { height: calc(100svh + 48px); margin-top: -48px; padding-top: 48px; }
  .lg-hero-content { padding: 0 16px 22px; }
  .lg-hero-phrase { display: none; }
  .lg-hero-cta--secondaire { padding-top: 13px; padding-bottom: 13px; }
}

/* (L'ancien « height: -webkit-fill-available » pour iOS est retiré : il écrasait
   les hauteurs en svh, gérées par iOS depuis 15.4, et rognait le contenu.) */

/* Le hero fait 100vw : pas de barre de défilement horizontale (l'ancien bloc
   le posait lui-même dans son <style>). */
body.home { overflow-x: clip; }

/* Tablette et mobile : la section grandit si le contenu dépasse l'écran
   (téléphone tenu à l'horizontale, texte agrandi), au lieu de rogner le titre.
   Placé après les hauteurs par écran pour les remplacer. */
@media (max-width: 1024px) {
  .lg-hero { height: auto; min-height: calc(100svh + 64px); }
}

@media (max-width: 768px) {
  .lg-hero { min-height: calc(100svh + 56px); }
}

@media (max-width: 480px) {
  .lg-hero { min-height: calc(100svh + 48px); }
}

@media (prefers-reduced-motion: reduce) {
  .lg-hero * { animation: none !important; transition: none !important; }
  .lg-hero-scroll { opacity: 1; }
}
