/* Hero pleine largeur */
.hero-fade {
  position: relative;
  display: block;
  width: 100vw;
  height: auto;
  overflow: hidden;
  line-height: 0;
}

/* Neutralisation Gutenberg ajustée */
body.home .entry-content > .hero-fade,
body.home .has-global-padding > .hero-fade,
body.home .is-layout-constrained > .hero-fade {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

/* Images superposées */
.hero-fade .hero-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  transition: opacity 1.5s linear;
}

/* Base */
.hero-fade .hero-img.base {
  opacity: 1;
  z-index: 1;
  position: relative;
}

/* Hover */
.hero-fade .hero-img.hover {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
}

/* Survol desktop */
.hero-fade:hover .hero-img.hover {
  opacity: 1;
}

/* Effets de bord haut/bas */
.hero-fade::before,
.hero-fade::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 50px;
  pointer-events: none;
  z-index: 3;
}

.hero-fade::before {
  top: 0;
  background: linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
}

.hero-fade::after {
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%);
}

/* TABLET + MOBILE – mêmes dimensions qu’avant */
@media (max-width: 1024px) {

  .hero-fade .hero-img {
    object-fit: cover;
    object-position: center bottom;
    width: 100%;
    height: 100vh !important;  /* ✔ même hauteur */
  }
}

/* MOBILE – désactivation du hover mais conservation des dimensions */
@media (max-width: 768px) {

  /* On garde exactement les mêmes proportions */
  .hero-fade {
    height: 100vh !important;
  }

  .hero-fade .hero-img {
    height: 100vh !important;
    object-fit: cover;
    object-position: center bottom;
  }

  /* Une seule image = plus fluide */
  .hero-fade .hero-img.hover {
    display: none !important;
  }
}
