/* --------- Réglages --------- */
:root{
  /* Largeur *fixe* de la vignette du module bloc (mets la valeur exacte si différente) */
  --card-w: 370px;
  /* Espacement entre cartes */
  --gap: 2.5rem;
  /* Un léger “peek” constant à droite (donne l’effet "coupé") */
  --peek: 28px;
}

/* utilitaire SR uniquement si besoin */
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Contexte table : on empêche tout débordement global ---------- */
#wrapper-content-2 table{ table-layout: fixed; width:100%; }
#wrapper-content-2 table td{ min-width:0; }
#wrapper-content-2 table > tbody > tr > td:last-child{
  overflow: visible;               /* coupe les micro-débordements internes */
}

/* ---------- Piste du carrousel ---------- */
.module-bloc-graphic-132.carousel-track{
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* IE/Edge legacy */
  scrollbar-gutter: stable both-edges;
  padding-bottom: .5rem;

  /* IMPORTANT : ce padding crée un “peek” à droite, donc on voit la vignette suivante coupée */
  padding-right: var(--peek);

  position: relative; z-index: 1;
}
.module-bloc-graphic-132.carousel-track::-webkit-scrollbar{ display:none; }
.module-bloc-graphic-132.carousel-track:focus-visible{ outline:2px solid #005fcc; outline-offset:3px; }

/* ---------- Cartes : largeur fixe du module, responsive seulement en très petit ---------- */
.module-bloc-graphic-132.carousel-track .module-bloc-graphic-item{
  scroll-snap-align: start;
  flex: 0 0 clamp(240px, 86vw, var(--card-w));   /* mobile : peut rétrécir mais jamais dépasser la taille module */
  width: clamp(240px, 86vw, var(--card-w));
  max-width: var(--card-w);
  min-width: 0;
}

@media (min-width: 768px){
  .module-bloc-graphic-132.carousel-track .module-bloc-graphic-item{
    flex-basis: var(--card-w);
    width: var(--card-w);
  }
}

/* Images propres */
.module-bloc-graphic-132 .module-bloc-graphic-item-image img{
  display:block; width:100%; height:auto;
  transition: transform 300ms ease, opacity 300ms ease;
  will-change: transform;
}

/* ---------- NAV sous le texte (colonne gauche) ---------- */
.carousel-nav-under-text{
  display:flex; gap:.75rem; align-items:center; justify-content:flex-end;
  margin-top:-3rem; flex-wrap:wrap; position:relative; z-index:5;
}
.carousel-nav-under-text .carousel-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border: 1px solid #002f42;
    background: #002f42;
    color: #ffffff;
    border-radius: 9999px;
    cursor: pointer;
    line-height: 1;
    font-size: 27px;
    font-weight: 700;
    user-select: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.carousel-nav-under-text .carousel-btn[aria-disabled="true"]{ opacity:.5; cursor:not-allowed; }
.carousel-nav-under-text .carousel-btn:focus-visible{ outline:2px solid #005fcc; outline-offset:3px; }

/* ---------- Accessibilité / préférences ---------- */
@media (prefers-reduced-motion: reduce) {
  .carousel-anim-left .module-bloc-graphic-item,
  .carousel-anim-right .module-bloc-graphic-item,
  .module-bloc-graphic-132 .module-bloc-graphic-item-image img {
    animation: none !important; transition: none !important;
  }
}

/* ---------- Micro-anim (optionnel) ---------- */
@keyframes carouselSlideRight {
  from { transform: translateX(-12px) scale(.985); opacity:.92; }
  to   { transform: translateX(0)      scale(1);    opacity:1; }
}
@keyframes carouselSlideLeft {
  from { transform: translateX(12px) scale(.985); opacity:.92; }
  to   { transform: translateX(0)    scale(1);    opacity:1; }
}
.module-bloc-graphic-132.carousel-track.carousel-anim-right .module-bloc-graphic-item { animation: carouselSlideRight 320ms ease both; }
.module-bloc-graphic-132.carousel-track.carousel-anim-left  .module-bloc-graphic-item { animation: carouselSlideLeft  320ms ease both; }
.module-bloc-graphic-132.carousel-track.carousel-anim-right .module-bloc-graphic-item-image img { transform: translateX(6px); }
.module-bloc-graphic-132.carousel-track.carousel-anim-left  .module-bloc-graphic-item-image img { transform: translateX(-6px); }
