/*
 * Custom code goes here.
 * A template should always ship with an empty custom.css
 */

/* Base : recadrage propre */
#carousel, #homeslider { overflow: hidden; }

#carousel .carousel-item,
#homeslider .carousel-item {
  height: 620px;
  max-height: none !important;   /* neutralise limites du module */
}

#carousel .carousel-item img,
#homeslider .carousel-item img,
#carousel .carousel-item > a,
#homeslider .carousel-item > a,
#carousel .carousel-item > a > img,
#homeslider .carousel-item > a > img,
#carousel .carousel-item picture,
#homeslider .carousel-item picture {
  display: block;
  width: 100%;
  height: 100% !important;       /* force le remplissage */
  object-fit: cover;
  object-position: center;
  max-height: none !important;
}

/* Mobile */
@media (max-width: 767.98px) {
  #carousel .carousel-item,
  #homeslider .carousel-item { height: 380px; }
}

/* Desktop ≥1200px : hauteur responsive selon l’écran */
@media (min-width: 1200px) {
  #carousel .carousel-inner,
  #homeslider .carousel-inner,
  #carousel .carousel-item,
  #homeslider .carousel-item {
    height: clamp(520px, 62vh, 820px) !important;
  }
}

/* Très grands écrans ≥1400px (si tu veux plus haut) */
@media (min-width: 1400px) {
  #carousel .carousel-item,
  #homeslider .carousel-item {
    height: 980px !important;
  }
}
