/* Pages de solution (src/lib/page-service.ts) : panneaux, pompes à chaleur, ballon, isolation. Même langage que l'accueil. */
.esl-pv-intro,
.esl-pv-marche,
.esl-pv-materiel,
.esl-pv-pose,
.esl-pv-faq {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --encre: #0f1430;
  --doux: #5b6178;
  --ligne: #e6e8ee;
  --fond: #f4f5f9;
  --blanc: #fff;
  --bleu: #252f61;
  --jaune: #fbbb1c;
  --orange: #e8482f;
  --radius: 24px;
  --radius-in: 16px;
  --radius-sm: 11px;
  --radius-xs: 7px;
  --radius-fin: 2px;
  --noir: #000;
  --trait-clair: rgba(255, 255, 255, 0.35);
  box-sizing: border-box;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) 20px;
  font-family: "Montserrat", sans-serif;
  color: var(--encre);
}

.esl-pv-intro h2,
.esl-pv-marche h2,
.esl-pv-materiel h2,
.esl-pv-pose h2,
.esl-pv-faq h2 {
  margin: 0;
  color: var(--noir);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.esl-pv-surtitre {
  margin: 0 0 14px;
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Haut de page en photo : pas d'image de secours de la vidéo derrière. */
.esl-hero--image {
  --jaune: #fbbb1c;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

.esl-hero--image .esl-hero__cadre {
  background-image: none;
}

/* Surtitre du haut de page, au-dessus des mots animés. */
.esl-hero__surtitre {
  display: block;
  margin-bottom: 18px;
  color: var(--jaune);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.esl-hero--image .esl-hero__video {
  animation: esl-pv-recul 1600ms var(--ease-out) both;
}

@keyframes esl-pv-recul {
  from {
    transform: scale(1.06);
  }
}

/* Intro et chiffres */
.esl-pv-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: end;
}

.esl-pv-intro__texte p:last-child {
  max-width: 52ch;
  margin: 20px 0 0;
  color: var(--doux);
  font-size: 1.05rem;
  line-height: 1.6;
}

.esl-pv-chiffres {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ligne);
}

.esl-pv-chiffres li {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--ligne);
}

.esl-pv-chiffres strong {
  color: var(--bleu);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.esl-pv-chiffres span {
  color: var(--doux);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Comment ça marche : l'image reste en place, les étapes défilent à côté. */
.esl-pv-marche {
  padding-top: 0;
}

.esl-pv-marche__tete {
  max-width: 640px;
  margin-bottom: 8px;
}

.esl-pv-raconte {
  display: grid;
  gap: 0 64px;
}

.esl-pv-raconte__scene {
  position: sticky;
  top: 64px;
  z-index: 1;
  height: 44svh;
  padding: 12px 0;
  background: var(--blanc);
}

.esl-pv-raconte__cadre {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bleu);
}

.esl-pv-raconte__cadre img.esl-pv-raconte__vue {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* --cadrage : garde visible le sujet de la photo (la clim en haut, par exemple). */
  object-position: var(--cadrage, 50% 50%);
  opacity: 0;
  scale: 1.04;
  transition:
    opacity 400ms var(--ease-out),
    scale 700ms var(--ease-out);
}

.esl-pv-raconte__cadre img.esl-pv-raconte__vue.est-active {
  opacity: 1;
  scale: 1;
}

.esl-pv-raconte__repere {
  position: absolute;
  inset: auto 20px 18px;
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.esl-pv-raconte__repere li {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-fin);
  background: var(--trait-clair);
  transition: background-color 300ms ease;
}

.esl-pv-raconte__repere li.est-active {
  background: var(--jaune);
}

.esl-pv-raconte__etapes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.esl-pv-raconte__etape {
  display: grid;
  align-content: center;
  min-height: 52svh;
  max-width: 40ch;
  opacity: 0.3;
  transition: opacity 300ms var(--ease-out);
}

.esl-pv-raconte__etape.est-active {
  opacity: 1;
}

.esl-pv-raconte__numero {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: var(--radius-sm);
  background: var(--jaune);
  color: var(--noir);
  font-size: 0.85rem;
  font-weight: 700;
}

.esl-pv-raconte__etape h3 {
  margin: 0 0 10px;
  color: var(--noir);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.esl-pv-raconte__etape p {
  margin: 0;
  color: var(--doux);
  font-size: 1rem;
  line-height: 1.6;
}

@media (min-width: 900px) {
  .esl-pv-raconte {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  }

  .esl-pv-raconte__scene {
    top: 14svh;
    height: 72svh;
    padding: 0;
  }

  .esl-pv-raconte__etapes {
    padding: 10svh 0 22svh;
  }

  .esl-pv-raconte__etape {
    min-height: 62svh;
  }
}

/* Matériel */
.esl-pv-materiel {
  padding-top: 0;
}

.esl-pv-materiel__tete {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: 16px 48px;
  align-items: end;
  margin-bottom: 36px;
}

.esl-pv-materiel__tete .esl-pv-surtitre {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.esl-pv-materiel__tete p:last-child {
  margin: 0;
  color: var(--doux);
  line-height: 1.6;
}

.esl-pv-materiel__cartes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.esl-pv-carte {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--ligne);
  border-radius: var(--radius);
  background: var(--blanc);
  scroll-margin-top: 120px;
}

.esl-pv-carte img.esl-pv-carte__image,
.esl-pv-carte div.esl-pv-carte__image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: var(--cadrage, 50% 50%);
}

.esl-pv-carte__image--produit {
  display: grid;
  place-items: center;
  background: var(--fond);
}

.esl-pv-carte__image--produit img {
  width: auto;
  max-width: 62%;
  height: 200px;
  object-fit: contain;
  border-radius: var(--radius-in);
}

.esl-pv-carte__corps {
  padding: 28px 28px 32px;
}

.esl-pv-carte__marque {
  margin: 0 0 6px;
  color: var(--doux);
  font-size: 0.8rem;
  font-weight: 600;
}

.esl-pv-carte h3 {
  margin: 0 0 18px;
  color: var(--noir);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.esl-pv-liste {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.esl-pv-liste li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  color: var(--encre);
  font-size: 0.95rem;
  line-height: 1.5;
}

.esl-pv-liste__coche {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: var(--radius-xs);
  background: var(--bleu);
}

.esl-pv-liste__coche svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: var(--jaune);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.esl-pv-materiel a.esl-pv-lien {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--bleu);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.esl-pv-lien small {
  color: var(--doux);
  font-weight: 400;
}

/* Installation */
.esl-pv-pose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 64px;
  align-items: start;
}

.esl-pv-pose__photo {
  position: sticky;
  top: 120px;
  overflow: hidden;
  border-radius: var(--radius);
}

.esl-pv-pose__photo img {
  display: block;
  width: 100%;
  height: min(78svh, 680px);
  object-fit: cover;
}

.esl-pv-pose__etapes {
  margin: 32px 0;
  padding: 0;
  list-style: none;
}

.esl-pv-pose__etapes li {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 26px;
}

/* Trait qui relie les numéros. */
.esl-pv-pose__etapes li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 44px;
  bottom: 4px;
  left: 19px;
  width: 2px;
  border-radius: var(--radius-fin);
  background: var(--ligne);
}

.esl-pv-pose__numero {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bleu);
  color: var(--blanc);
  font-size: 0.9rem;
  font-weight: 700;
}

.esl-pv-pose h3 {
  margin: 8px 0 6px;
  color: var(--noir);
  font-size: 1.1rem;
  font-weight: 700;
}

.esl-pv-pose__etapes p {
  margin: 0;
  color: var(--doux);
  line-height: 1.55;
}

.esl-pv-pose .esl-hero__bouton {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

.esl-pv-pose a.esl-hero__bouton,
.esl-pv-pose a.esl-hero__bouton:focus {
  color: var(--noir);
}

/* Questions (l'encart de qualification qui suit garde l'espace du bas). */
.esl-pv-faq {
  padding-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 32px 64px;
  align-items: start;
}

.esl-pv-faq__tete p:last-child {
  margin: 18px 0 0;
  color: var(--doux);
  line-height: 1.6;
}

.esl-pv-faq__tete a {
  color: var(--bleu);
  font-weight: 700;
  white-space: nowrap;
}

.esl-pv-faq__liste {
  border-top: 1px solid var(--ligne);
}

.esl-pv-question {
  border-bottom: 1px solid var(--ligne);
}

.esl-pv-question summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  color: var(--noir);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.esl-pv-question summary::-webkit-details-marker {
  display: none;
}

.esl-pv-question summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
  border-radius: var(--radius-xs);
}

/* Signe plus qui devient moins. */
.esl-pv-question__signe {
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--fond);
  transition: background-color 200ms ease;
}

.esl-pv-question__signe::before,
.esl-pv-question__signe::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 10px;
  width: 12px;
  height: 2px;
  border-radius: var(--radius-fin);
  background: var(--bleu);
  transition: transform 200ms var(--ease-out);
}

.esl-pv-question__signe::after {
  transform: rotate(90deg);
}

.esl-pv-question[open] .esl-pv-question__signe {
  background: var(--jaune);
}

.esl-pv-question[open] .esl-pv-question__signe::after {
  transform: rotate(0deg);
}

.esl-pv-question p {
  max-width: 62ch;
  margin: 0;
  padding: 0 52px 24px 0;
  color: var(--doux);
  line-height: 1.6;
}

@media (hover: hover) and (pointer: fine) {
  .esl-pv-question summary:hover .esl-pv-question__signe {
    background: var(--ligne);
  }

  .esl-pv-question[open] summary:hover .esl-pv-question__signe {
    background: var(--jaune);
  }

  .esl-pv-materiel a.esl-pv-lien:hover {
    color: var(--orange);
  }
}

/* Tablette et téléphone */
@media (max-width: 899px) {
  .esl-pv-intro,
  .esl-pv-materiel__tete,
  .esl-pv-materiel__cartes,
  .esl-pv-pose,
  .esl-pv-faq {
    grid-template-columns: minmax(0, 1fr);
  }

  .esl-pv-pose__photo {
    position: static;
  }

  .esl-pv-pose__photo img {
    height: 300px;
  }
}

@media (max-width: 767px) {
  .esl-pv-intro,
  .esl-pv-marche,
  .esl-pv-materiel,
  .esl-pv-pose,
  .esl-pv-faq {
    padding-inline: 24px;
  }

  .esl-pv-chiffres li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .esl-pv-raconte__scene {
    top: 56px;
  }

  .esl-pv-carte__corps {
    padding: 22px 20px 26px;
  }

  .esl-pv-question p {
    padding-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .esl-hero--image .esl-hero__video {
    animation: none;
  }

  .esl-pv-raconte__cadre img.esl-pv-raconte__vue {
    scale: 1;
    transition: opacity 200ms linear;
  }
}

/* Elementor force « height: auto » sur ses images : on garde la photo en plein cadre. */
.esl-hero--image .esl-hero__cadre img.esl-hero__video {
  height: 100%;
  max-width: none;
}

@media (hover: hover) and (pointer: fine) {
  .esl-pv-pose a.esl-hero__bouton:hover {
    color: var(--noir);
  }
}
