/* FOBAK V129.6.31 — CARROUSEL PHOTO ENTIÈRE
   Objectif : ne plus couper les images larges/verticales.
   L'image originale est toujours visible en entier ; un fond dérivé, flouté et assombri
   remplit élégamment l'espace restant sans bandes grises. */

body.page-index .home-hero-carousel{
  width:100%!important;
  height:clamp(460px,41vw,620px)!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  margin:14px 0 0!important;
  overflow:hidden!important;
  background:#082f4c!important;
  position:relative!important;
  contain:layout paint!important;
}

body.page-index .home-hero-carousel .slides,
body.page-index .home-hero-carousel .slide{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  background:#082f4c!important;
}

/* Fond de remplissage : même photo, agrandie et floutée. */
body.page-index .home-hero-carousel .slide::before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  inset:-28px!important;
  z-index:0!important;
  pointer-events:none!important;
  background-image:linear-gradient(90deg,rgba(4,35,57,.18),rgba(4,35,57,.08)),var(--slide-image)!important;
  background-size:cover!important;
  background-position:center center!important;
  background-repeat:no-repeat!important;
  filter:blur(18px) saturate(.9) brightness(.72)!important;
  transform:scale(1.08)!important;
  opacity:.95!important;
}

/* Photo principale : JAMAIS rognée. Même les anciens slides enregistrés en "cover"
   utilisent l'adaptation intelligente de V129.6.31. */
body.page-index .home-hero-carousel .banner-smart .carousel-photo,
body.page-index .home-hero-carousel .fit-cover .carousel-photo,
body.page-index .home-hero-carousel .fit-contain .carousel-photo,
body.page-index .home-hero-carousel .carousel-photo{
  position:absolute!important;
  inset:0!important;
  z-index:1!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  padding:0!important;
  margin:0!important;
  object-fit:contain!important;
  object-position:center center!important;
  background:transparent!important;
  transform:none!important;
}

/* Le réglage du point focal reste utile pour les photos verticales ou très panoramiques. */
body.page-index .home-hero-carousel .pos-top .carousel-photo{object-position:center top!important}
body.page-index .home-hero-carousel .pos-bottom .carousel-photo{object-position:center bottom!important}
body.page-index .home-hero-carousel .pos-left .carousel-photo{object-position:left center!important}
body.page-index .home-hero-carousel .pos-right .carousel-photo{object-position:right center!important}
body.page-index .home-hero-carousel .pos-center .carousel-photo{object-position:center center!important}

/* Lisibilité du texte sans masquer inutilement la photo. */
body.page-index .home-hero-carousel .carousel-photo-shade{
  position:absolute!important;
  inset:0!important;
  z-index:2!important;
  pointer-events:none!important;
  background:
    linear-gradient(90deg,rgba(3,29,48,.48) 0%,rgba(3,29,48,.16) 42%,transparent 72%),
    linear-gradient(0deg,rgba(3,29,48,.42) 0%,rgba(3,29,48,.05) 42%,transparent 68%)!important;
}
body.page-index .home-hero-carousel .slide-message{
  z-index:4!important;
  left:clamp(28px,5vw,72px)!important;
  bottom:clamp(28px,5vw,62px)!important;
  width:min(690px,72%)!important;
}

/* Tablette / application installée */
@media(max-width:820px){
  body.page-index .public-content>.home-hero-carousel,
  body.page-index .home-hero-carousel{
    width:100%!important;
    margin:0!important;
    height:clamp(320px,62vw,500px)!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
  }
  body.page-index .home-hero-carousel .slide-message{
    left:20px!important;
    right:20px!important;
    bottom:30px!important;
    width:auto!important;
    max-width:none!important;
  }
}

/* Téléphone : hauteur raisonnable, photo entière et fond adaptatif. */
@media(max-width:520px){
  body.page-index .home-hero-carousel{
    height:clamp(260px,64vw,340px)!important;
  }
  body.page-index .home-hero-carousel .slide::before{
    inset:-20px!important;
    filter:blur(14px) saturate(.88) brightness(.68)!important;
  }
  body.page-index .home-hero-carousel .carousel-photo-shade{
    background:linear-gradient(0deg,rgba(3,29,48,.62) 0%,rgba(3,29,48,.12) 52%,transparent 78%)!important;
  }
  body.page-index .home-hero-carousel .slide-message{
    left:16px!important;
    right:16px!important;
    bottom:24px!important;
  }
  body.page-index .home-hero-carousel .slide-message strong{
    font-size:clamp(1.35rem,7vw,1.9rem)!important;
  }
}
