/* ─── VARIABLES ─── */
:root {
  --navy: #1b3a5c;
  --blue: #0078c8;
  --blue-dark: #005fa3;
  --text: #444;
  --light-bg: #f9fbfd;
  --white: #fff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
}

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

body {
  font-family: 'Lato', sans-serif;
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* ================= HERO CDEX ================= */

.cdex-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 60px 20px;
  overflow: hidden;
 
}

/* image desktop */
.cdex-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../../../image/cdex-hero.jpeg') center center / cover no-repeat;
  z-index: 0;
}

/* overlay */
.cdex-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.1);
  z-index: 1;
}

/* contenu */
.hero-container {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: auto;
}

/* ================= MOBILE HERO OPTIMISÉ ================= */
@media (max-width: 768px) {

  .cdex-hero {
    min-height: 100vh;
    padding: 0;
  }

  .cdex-hero::before {
    background: url('../../../image/cdex-hero.jpeg') center 20% / cover no-repeat;
    transform: scale(1.08); /* léger zoom contrôlé */
  }

  .cdex-hero::after {
    background: rgba(0,0,0,0.1);
  }
}

/* petit mobile */
@media (max-width: 480px) {
  .cdex-hero::before {
    background-position: center 15%;
    transform: scale(1.1);
  }
}

/* ================= ABOUT SECTION ================= */
.about-section {
  max-width: 1100px;
  margin: 70px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-img img,
.about-image img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-img img:hover,
.about-image img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-hover);
}

.about-text h2 {
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  margin-bottom: 15px;
  color: var(--navy);
}

.about-text p {
  margin-bottom: 15px;
  font-size: clamp(14px, 2vw, 16px);
}

/* ================= INTRO ================= */
.intro {
  max-width: 900px;
  margin: 60px auto;
  text-align: center;
  padding: 0 20px;
}

/* ================= DOMAINES ================= */
.domaines-section {
  padding: 80px 20px;
  background: var(--light-bg);
}

.section-title {
  text-align: center;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  margin-bottom: 40px;
  color: var(--navy);
}

.domaines-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: auto;
}

.domaine-card {
  background: #fff;
  border-radius: 12px;
  padding: 25px;
  transition: 0.3s ease;
  box-shadow: var(--shadow);
}

.domaine-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.domaine-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: var(--blue);
}

.domaine-card ul {
  padding-left: 20px;
}

.domaine-card li {
  font-size: 14px;
  margin-bottom: 5px;
}

.card-desc {
  font-size: 14px;
  margin-top: 12px;
  color: #666;
}

/* ================= VISION / MISSION ================= */
.vm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}

.vm-card {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.vm-card:hover {
  transform: translateY(-5px);
}

.vm-card h3 {
  margin-bottom: 15px;
  color: var(--blue);
  font-size: 22px;
}

.vm-card ul {
  padding-left: 20px;
}

.vm-card li {
  margin-bottom: 8px;
}

/* ================= VALEURS ================= */
.valeurs-section {
  background: var(--light-bg);
  padding: 80px 20px;
  text-align: center;
}

.valeurs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 30px auto;
}

.valeur-card {
  background: #fff;
  padding: 25px 15px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border-top: 4px solid var(--blue);
  transition: 0.3s ease;
  cursor: pointer;
}

.valeur-card:hover {
  background: var(--blue);
  color: #fff;
  transform: translateY(-5px);
}

/* ================= AMBITION ================= */
.ambition-bg {
  background: linear-gradient(135deg, rgba(27, 58, 92, 0.95), rgba(13, 26, 42, 0.95)),
              url('../../image/ambition-bg.jpg') center center / cover no-repeat fixed;
  padding: 100px 20px;
  text-align: center;
  color: #fff;
}

.ambition-content {
  max-width: 700px;
  margin: auto;
}

.ambition-content h2 {
  font-size: clamp(28px, 4vw, 36px);
  margin-bottom: 20px;
}

.ambition-content p {
  font-size: clamp(16px, 2.5vw, 18px);
  opacity: 0.95;
}

/* ================= INSIGHTS ================= */
.insights-section {
  padding: 80px 20px;
  background: var(--light-bg);
}

.insight-item {
  display: flex;
  gap: 25px;
  background: #fff;
  border-radius: 14px;
  padding: 25px;
  box-shadow: var(--shadow);
  margin-bottom: 25px;
  transition: transform 0.3s ease;
}

.insight-item:hover {
  transform: translateX(8px);
}

/* ================= SPOTLIGHT ================= */
.spotlight-section {
  max-width: 1200px;
  margin: auto;
  padding: 80px 20px;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.sp-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.3s ease;
  box-shadow: var(--shadow);
}

.sp-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.sp-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.sp-body {
  padding: 20px;
}

.sp-body h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--navy);
}

.sp-body p {
  font-size: 14px;
  color: #666;
}

/* ================= GROUPES ================= */
.groups-section .sp-card {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.6s ease;
}

.groups-section .sp-card.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================= BLOCK SPLIT ================= */
.block.split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  max-width: 1100px;
  margin: 70px auto;
  padding: 0 20px;
}

.block.split .text {
  flex: 1;
}

.block.split .text h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 20px;
}

.block.split .text p {
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.8;
  color: #444;
  margin-bottom: 15px;
}

.block.split .img {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.block.split .img img {
  width: 100%;
  max-width: 450px;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: 0.3s ease;
}

.block.split .img img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-hover);
}

.block.split.reverse {
  flex-direction: row-reverse;
}

/* ================= INTRO SPLIT ================= */
.intro-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  max-width: 1100px;
  margin: 80px auto;
  padding: 0 20px;
}

.intro-img {
  flex: 1;
}

.intro-img img {
  width: 100%;
  max-width: 450px;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: 0.3s ease;
}

.intro-img img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-hover);
}

.intro {
  flex: 1;
  text-align: left;
  margin: 0;
  padding: 0;
}

.intro p {
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.8;
  color: #444;
  margin-bottom: 15px;
}

.intro strong {
  color: var(--navy);
  font-weight: 800;
}

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

/* Tablette (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  .about-section {
    gap: 40px;
  }
  
  .domaines-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .valeurs-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .spotlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
  
  /* About section */
  .about-section {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
    margin: 50px auto;
  }
  
  .about-text h2 {
    text-align: center;
  }
  
  /* Domaines */
  .domaines-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }
  
  /* Valeurs */
  .valeurs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .valeur-card {
    padding: 20px 10px;
  }
  
  /* Vision Mission */
  .vm-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  /* Spotlight */
  .spotlight-grid {
    grid-template-columns: 1fr;
  }
  
  /* Block split */
  .block.split {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  
  .block.split.reverse {
    flex-direction: column;
  }
  
  .block.split .img img {
    max-width: 100%;
  }
  
  /* Intro split */
  .intro-split {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  
  .intro-img img {
    max-width: 100%;
  }
  
  .intro {
    text-align: center;
  }
  
  /* Insights */
  .insight-item {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  
  .insight-item:hover {
    transform: translateY(-5px);
  }
  
  /* Hero */
  .cdex-hero {
    min-height: 80vh;
    padding: 60px 20px;
  }
  
  .hero-container h1 {
    margin-bottom: 10px;
  }
  
  .hero-container h2 {
    font-size: 16px;
  }
}

/* Petit mobile (max 480px) */
@media (max-width: 480px) {
  .valeurs-grid {
    grid-template-columns: 1fr;
  }
  
  .domaine-card {
    padding: 20px;
  }
  
  .vm-card {
    padding: 20px;
  }
  
  .ambition-bg {
    background-attachment: scroll;
    padding: 60px 20px;
  }
  
  .sp-img img {
    height: 180px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .cdex-hero {
    min-height: 70vh;
  }
  
  .hero-container h1 {
    font-size: 24px;
  }
  
  .hero-container h2 {
    font-size: 14px;
  }
  
  .hero-container p {
    font-size: 12px;
  }
}

/* Desktop grand écran (min 1440px) */
@media (min-width: 1440px) {
  .cdex-hero {
    min-height: 90vh;
  }
  
  .about-section,
  .vm-grid,
  .intro-split,
  .block.split {
    max-width: 1300px;
  }
  
  .domaines-grid {
    max-width: 1300px;
  }
}

/* ================= UTILITAIRES ================= */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 40px;
}

.mb-4 {
  margin-bottom: 40px;
}

.shadow-sm {
  box-shadow: var(--shadow);
}

.rounded {
  border-radius: 12px;
}

/* Mobile */
@media (max-width: 768px) {
  .cdex-hero {
    min-height: 90vh; /* 👈 plus grand que avant */
    padding: 50px 20px;
  }
}

/* Petit mobile */
@media (max-width: 480px) {
  .cdex-hero {
    min-height: 85vh;
  }

  .hero-container h1 {
    font-size: 24px;
  }

  .hero-container h2 {
    font-size: 14px;
  }

  .hero-container p {
    font-size: 12px;
  }
}

/* Grand écran */
@media (min-width: 1440px) {
  .cdex-hero {
    min-height: 110vh;
  }
}



@media (max-width: 768px) {

  .cdex-hero {
    min-height: auto;        /* 👈 important */
    height: 30vh;            /* 👈 réduit fortement les bandes */
    padding: 0;
    overflow: hidden;
  }

  .cdex-hero::before {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
  }
}