/* ===== GD – Hero Slideshow (renommé pour éviter conflit) ===== */
.gd-hero-home{
  --gd-header-h: 0px;
  --gd-bottom-pad: 20px;

  position: relative;
  width: 100%;
  height: calc(90vh - var(--gd-header-h));
  overflow: hidden;
  background: #fff;
}

/* Mobile/modern browsers: utiliser la hauteur dynamique du viewport */
@supports (height: 100dvh) {
  .gd-hero-home {
    height: calc(90dvh - var(--gd-header-h));
  }
}

/* Mobile: reduire encore la hauteur du hero */
@media (max-width: 767px) {
  .gd-hero-home {
    height: calc(85vh - var(--gd-header-h));
  }

  @supports (height: 100dvh) {
    .gd-hero-home {
      height: calc(85dvh - var(--gd-header-h));
    }
  }
}

/* Swiper pleine hauteur */
.gd-hero-home .swiper-wrapper,
.gd-hero-home .swiper-slide{
  width: 100%;
  height: 100%;
}

/* Slide: ancrage bas-gauche + marge basse */
.gd-hero-home__slide{
  display: flex !important;
  align-items: center !important;       /* bas */
  justify-content: center !important; /* gauche */
  padding-bottom: var(--gd-bottom-pad);
  box-sizing: border-box;
  width: 100%;
  height: 100%;
}

/* Lien plein slide (permet aux images portrait d'utiliser height:100%) */
.gd-hero-home__link{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Base image: jamais coupée, ancrée bas-gauche */
.gd-hero-home__img{
  display: block;
  align-self: center;
  object-fit: contain;
  object-position: right bottom;
  margin: 0;
  /* Protection contre le clic droit */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Paysage: remplir la largeur */
.gd-hero-home__img.is-wide{
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

/* Portrait: remplir la hauteur utile (marge basse déduite) */
.gd-hero-home__img.is-tall{
  height: calc(100% - var(--gd-bottom-pad));
  width: auto;
  max-height: 100%;
  max-width: 100%;
}

/* Effet fade Swiper (robuste) */
.gd-hero-home.swiper-fade .swiper-slide{
  opacity: 0;
  transition: opacity .8s ease-in-out;
  pointer-events: none;
}
.gd-hero-home.swiper-fade .swiper-slide.swiper-slide-active{
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* La hauteur du header est calculee dynamiquement en JS */