/* Haut de page plein écran : vidéo de l'accueil (src/lib/hero.ts) et photo de la page solaire (src/lib/page-solaire.ts). */

/* En-tête posé sur la vidéo, transparent et en blanc tant qu'on n'a pas défilé (comme copsolar.fr).
   Dès qu'on défile (classe esl-en-haut retirée par src/lib/hero.ts), il reprend son fond blanc d'origine. */
.elementor-location-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 100;
}

html.esl-en-haut header.elementor-7359 .elementor-element.elementor-element-4e07912b:not(.elementor-motion-effects-element-type-background),
html.esl-en-haut header.elementor-7359 .elementor-element.elementor-element-48d4df9c:not(.elementor-motion-effects-element-type-background) {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.elementor-element-48d4df9c {
  transition: background-color 250ms ease;
}

html.esl-en-haut .elementor-element-48d4df9c .elementor-element-5ab0c483 img {
  content: url("/wp-content/uploads/2025/01/logo-ESL-txt-blanc.svg");
}

html.esl-en-haut .elementor-element-48d4df9c .elementor-nav-menu--main > .elementor-nav-menu > li > a,
html.esl-en-haut .elementor-element-48d4df9c .elementor-icon {
  color: #fff;
  fill: #fff;
}

html.esl-en-haut header.elementor-7359 .elementor-element.elementor-element-48d4df9c .elementor-icon svg {
  fill: #fff;
}

/* Menu ouvert ou survolé sur la photo : le rouge se lit mal, on garde le blanc et un trait jaune. */
html.esl-en-haut header.elementor-7359 .elementor-element-48d4df9c .elementor-nav-menu--main .elementor-item:is(:hover, :focus, .highlighted, [aria-expanded="true"]) {
  color: #fff;
}

html.esl-en-haut header.elementor-7359 .elementor-element.elementor-element-48d4df9c .elementor-nav-menu--main:not(.e--pointer-framed) .elementor-item::after {
  background-color: #fbbb1c;
}

.esl-hero {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  background: #252f61;
  font-family: "Montserrat", sans-serif;
}

.esl-hero__cadre {
  position: relative;
  min-height: max(560px, 100svh);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  background: #252f61 url("/videos/hero-poster.webp") center / cover no-repeat;
}

.esl-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.esl-hero__voile {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(10, 14, 34, 0.6) 0%, rgba(10, 14, 34, 0) 220px),
    linear-gradient(to top, rgba(10, 14, 34, 0.82) 0%, rgba(10, 14, 34, 0.35) 45%, rgba(10, 14, 34, 0) 70%),
    linear-gradient(to right, rgba(10, 14, 34, 0.45) 0%, rgba(10, 14, 34, 0) 60%);
}

/* Trame de points façon écran (comme copsolar.fr) : adoucit le rendu IA de la vidéo. */
.esl-hero__voile::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Points ronds dessinés en vectoriel : ils restent réguliers sur les écrans de téléphone (2x, 3x, 2,6x). */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='3' height='3'%3E%3Ccircle cx='1.5' cy='1.5' r='.95' fill-opacity='.5'/%3E%3C/svg%3E");
  background-size: 3px 3px;
  pointer-events: none;
}

.esl-hero__contenu {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  align-items: end;
  gap: 40px;
  padding: clamp(24px, 4vw, 56px) clamp(24px, 4vw, 56px) calc(clamp(24px, 4vw, 56px) + 28px);
}

.esl-hero__titre {
  margin: 0;
  color: #fff;
  font-size: clamp(2.25rem, 4.6vw, 4.25rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.esl-hero__mot {
  display: inline-block;
  animation: esl-hero-mot 900ms var(--ease-out) both;
  animation-delay: calc(150ms + var(--i) * 70ms);
}

.esl-hero__mot:last-child::after {
  content: "";
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  margin-left: 0.06em;
  border-radius: 50%;
  background: #fbbb1c;
}

@keyframes esl-hero-mot {
  from {
    opacity: 0;
    transform: translateY(0.35em);
    filter: blur(6px);
  }
}

.esl-hero__cote {
  display: grid;
  gap: 20px;
  justify-items: start;
  animation: esl-hero-mot 900ms var(--ease-out) 650ms both;
}

.esl-hero__texte {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1rem;
  line-height: 1.55;
}

.esl-hero a.esl-hero__bouton,
.esl-hero a.esl-hero__bouton:hover,
.esl-hero a.esl-hero__bouton:focus {
  color: #000;
}

.esl-hero__bouton {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 9px 9px 22px;
  border-radius: 16px;
  background: #fbbb1c;
  color: #000;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}

.esl-hero__bouton span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #000;
  color: #fbbb1c;
  transition: transform 200ms var(--ease-out);
}

.esl-hero__bouton:active {
  transform: scale(0.97);
}

.esl-hero__bouton:focus-visible,
.esl-hero__pause:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .esl-hero__bouton:hover {
    background: #ffc93d;
  }

  .esl-hero__bouton:hover span {
    transform: translateX(3px);
  }
}

.esl-hero__legende {
  position: absolute;
  bottom: 18px;
  left: 22px;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.esl-hero__pause {
  position: absolute;
  bottom: 12px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(10, 14, 34, 0.45);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.esl-hero__pause[hidden] {
  display: none;
}

.esl-hero__pause svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

@media (max-width: 767px) {
  /* Aligné sur le logo de l'en-tête (36px du bord, voir entete.css). */
  .esl-hero__contenu {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-inline: 36px;
  }

  .esl-hero__legende {
    left: 36px;
  }

  .esl-hero__texte {
    font-size: 0.95rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .esl-hero__mot,
  .esl-hero__cote {
    animation: none;
  }
}

/* Pages internes (photo) : même haut de page que l'accueil, en moins haut. */
.esl-hero--image .esl-hero__cadre {
  min-height: max(460px, 68svh);
}

.esl-hero--image .esl-hero__titre {
  font-size: clamp(2rem, 3.8vw, 3.5rem);
}

/* --cadrage : sur téléphone, garde la personne de la photo dans le cadre. */
.esl-hero--image .esl-hero__video {
  object-position: var(--cadrage, 50% 30%);
}

/* Coins du bas arrondis, comme les cartes et photos du reste du site. */
.esl-hero--image {
  background: transparent;
}

.esl-hero--image .esl-hero__cadre {
  border-radius: 0 0 clamp(24px, 3vw, 40px) clamp(24px, 3vw, 40px);
}
