/* =========================================================
   ENJEUX — VUES & LAYOUTS (CANONIQUE GELÉ)
   Scope :
   - Rubrique Enjeux (body.page-enjeux)
   - Slider Enjeux (Home)
========================================================= */


/* =========================================================
   A) RUBRIQUE ENJEUX — MOSAÏQUE
========================================================= */

/* Main */
body.page-enjeux .gh-main.enjeux-rubrique{
  padding: 1.5rem 1rem 3rem;
}

/* Titre */
body.page-enjeux .enjeux-rub-title{
  font-size: 2rem;
  font-weight: 700;
  margin: 1rem 0 1.5rem;
}


/* =========================================================
   STRUCTURE (Ghost-safe)
   ⚠️ Ne pas toucher gh-inner
========================================================= */

body.page-enjeux section.enjeux-rub-grid{
  display: block;
  width: 100%;
}


/* =========================================================
   GRILLE
========================================================= */

body.page-enjeux .enjeux-rub-grid-inner{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem;
  width: 100%;
}

@media (min-width: 768px){
  body.page-enjeux .enjeux-rub-grid-inner{
    grid-template-columns: repeat(3, minmax(0,1fr));
  }
}

@media (min-width: 1024px){
  body.page-enjeux .enjeux-rub-grid-inner{
    grid-template-columns: repeat(4, minmax(0,1fr));
  }
}


/* =========================================================
   CARTES
========================================================= */

body.page-enjeux .enjeux-card{
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #111;
}

/* Média */
body.page-enjeux .enjeux-card-media{
  margin: 0;
}

body.page-enjeux .enjeux-card-media img{
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* Titre overlay */
body.page-enjeux .enjeux-card-title{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 1.2rem 1.4rem;
  margin: 0;

  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;

  color: #fff;

  background: linear-gradient(
    to top,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.25) 55%,
    rgba(0,0,0,0) 100%
  );
}


/* =========================================================
   B) SLIDER ENJEUX — HOME (CANONIQUE / GELÉ)
   ⚠️ ROOT RÉEL : .pf-enjeux-zone
========================================================= */

/* Zone full-bleed */
body.home-template .pf-enjeux-zone{
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  overflow: hidden;
}

/* Alignement visuel avec la home */
body.home-template .pf-enjeux-zone-inner{
  padding-left: 1.4rem;
  padding-right: 0;
}

/* Bloc slider */
body.home-template .pf-enjeux-slider{
  margin: 2rem 0 1.4rem;
}

body.home-template .pf-enjeux-slider-title{
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

/* Track horizontal */
body.home-template .pf-enjeux-slider-track{
  display: flex;
  flex-wrap: nowrap;
  gap: 1.2rem;

  overflow-x: auto;
  overflow-y: hidden;

  padding-bottom: 1rem;
  padding-right: 38vw; /* laisse voir la slide suivante */

  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

body.home-template .pf-enjeux-slider-track::-webkit-scrollbar{
  display: none;
}

/* Slides */
body.home-template .pf-enjeux-slide{
  flex: 0 0 auto;
  flex-basis: 68vw;   /* mobile : 1 + ~1/3 visible */
  width: auto !important;
  max-width: none !important;

  scroll-snap-align: start;
  scroll-snap-stop: always;
}

@media (min-width: 768px){
  body.home-template .pf-enjeux-slide{
    flex-basis: 44%;
  }
}

@media (min-width: 1024px){
  body.home-template .pf-enjeux-slide{
    flex-basis: 32%;
  }
}

/* Carte */
body.home-template .pf-enjeux-slide-link{
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  overflow: hidden;
}

/* Image */
body.home-template .pf-enjeux-slide-media{
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

body.home-template .pf-enjeux-slide-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bande titre */
body.home-template .pf-enjeux-slide-overlay{
  background: #000;
  padding: .9rem 1.1rem;
  height: 4.6rem;

  display: flex;
  align-items: center;
}

body.home-template .pf-enjeux-slide-title{
  font-size: 1.65rem;
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
  margin: 0;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Dots */
body.home-template .pf-enjeux-slider-dots{
  display: flex;
  justify-content: center;
  gap: .6rem;
  margin-top: .6rem;
}

body.home-template .pf-enjeux-slider-dot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cfcfcf;
}

body.home-template .pf-enjeux-slider-dot.is-active{
  background: #000;
}