* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.slider {
    height: 100dvh;
    min-height: 100dvh;
}



.slider img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity .5s;
}

.slider img.active {
    opacity: 1;
    @media (max-width: 768px) {
        .slider img {
            object-fit: cover; /* Assure que l'image couvre tout l'écran */
        }
    }
    
}
.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1; /* Place le slider en arrière-plan */
}
.slider-background img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Évite les bandes blanches en ajustant l’image */
}

/* Styles du conteneur de l'arrière-plan */
.slider-background {
  position: fixed; /* couvre tout l'écran */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1; /* derrière tout le contenu */
}

/* Styles des images dans le slider de fond */
.slider-background .img__slider {
  width: 100%;
  height: 100%;
  object-fit: cover; /* couvre toute la surface sans déformation */
  position: absolute; /* superpose toutes les images */
  top: 0;
  left: 0;
  opacity: 0; /* invisible par défaut */
  transition: opacity 0.5s; /* fondu lors du changement */
  z-index: 0; /* derrière le contenu principal */
}

/* Image active visible */
.slider-background .img__slider.active {
  opacity: 1;
}

