/* =====================================================
   GLOBAL SETTINGS
===================================================== */
/* ✅ CFO PAGE — SCROLL OVERRIDE (FINAL) */
html[data-page="cfo-slides"],
html[data-page="cfo-slides"] body {
  overscroll-behavior: auto;
  overflow-y: auto;
  height: auto;
}

html[data-page="cfo-slides"] {
  overscroll-behavior-y: contain;
}

/* Ensure main grows naturally */
html[data-page="cfo-slides"] main {
  min-height: unset;
  padding-bottom: 0;
  overflow: visible;
}

/* html {
  scroll-behavior: smooth;
  // Force scroll to track content, not viewport
} */

/* body[data-page="cfo-slides"] layout fix */
body[data-page="cfo-slides"] {

  /* Light Theme (Fix background) */
  background: var(--bg);
  color: var(--ink);
}

main {
  min-height: auto;

}

/* ✅ FIX CFO SCROLL — override overscroll lock */
#cfo-scroll {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: auto !important;
  -webkit-overflow-scrolling: touch;
}


.cfo-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;

  height: 440px;
  /* 🔒 CLÉ ABSOLUE */
  align-items: stretch;
}

/* =====================================================
   CFO MODULES — VERSION STABLE & PRO
===================================================== */

:root {
  --cfo-card-height: 420px;
  --cfo-radius: 22px;
  --medelec-blue: linear-gradient(180deg, #0b5e92, #083d63);
  --medelec-yellow: linear-gradient(180deg, #f5c400, #ffd84d);
}

/* ================= CONTAINER ================= */

.cfo-modules {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* ================= ROW ================= */

.cfo-module {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  min-height: var(--cfo-card-height);
  align-items: stretch;
}

/* inversion */
.cfo-module.reverse {
  direction: rtl;
}

.cfo-module.reverse>* {
  direction: ltr;
}

/* ================= TEXT CARD ================= */

.cfo-text {
  background: #ffffff;
  border-radius: var(--cfo-radius);
  padding: 40px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.06);

  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* index */
.cfo-index {
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
}

/* title */
.cfo-text h3 {
  font-size: 26px;
  margin: 0;
  color: #0f172a;
}

/* paragraph */
.cfo-text p {
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
  margin: 0;
}

/* ================= BULLETS (FIX FINAL) ================= */

.cfo-text ul {
  margin-top: auto;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--medelec-blue);

  /* 🔥 FIX CRITIQUE */
  height: auto;
  max-height: none;
  overflow: visible;
  list-style: none;
  /* supprime les points */
}

.cfo-text ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.6;
}

.cfo-text ul li:last-child {
  margin-bottom: 0;
}

/* barre jaune Medelec */
.cfo-text ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 4px;
  height: 16px;
  background: var(--medelec-yellow);
  border-radius: 3px;
}

/* ================= IMAGE CARD ================= */

.cfo-image {
  border-radius: var(--cfo-radius);
  overflow: hidden;
  height: var(--cfo-card-height);
  /* Fixed height per user request */
}

.cfo-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================================
   BLOC VALEUR MEDELEC
================================ */

.cfo-value {
  background: linear-gradient(180deg, #f6f9fc, #ffffff);
  padding: 80px 24px;
}

.cfo-value-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.cfo-value-item {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
  position: relative;
}

.cfo-value-item h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #0f172a;
}

.cfo-value-item p {
  font-size: 15px;
  line-height: 1.6;
  color: #475569;
}

.value-accent {
  position: absolute;
  left: 0;
  top: 32px;
  width: 4px;
  height: 40px;
  background: #facc15;
  /* jaune MEDELEC */
  border-radius: 2px;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 900px) {
  .cfo-value-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {

  .cfo-modules {
    padding: 48px 16px;
    gap: 40px;
  }

  .cfo-module {
    grid-template-columns: 1fr;
    height: auto;
  }

  .cfo-text {
    padding: 24px;
  }

  .cfo-image {
    height: 220px;
  }
}