/* ================= Base ================= */
html, body {
  height: auto;                 /* on laisse la page grandir naturellement */
}
body {
  background: linear-gradient(180deg,rgba(246, 247, 249, 0.97) 90%, rgba(213, 233, 247, 1) 100%);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  color: var(--subtext);
}
  /* Ne pas mettre ici overflow-y:auto ni height:100vh,
     sinon le footer peut disparaître. */

/* ================= Layout timeline ================= */
.parcours-container {
  width: 100%;
}

.timeline {
  position: relative;
  max-width: 1000px;   /* largeur totale centrée */
  margin: 0 auto;      /* centre le bloc timeline dans la page */
  padding: 2rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center; /* 🔒 centre horizontalement TOUTES les vignettes */
}

/* Ligne verticale centrale */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  background: #e0e0e0;
  z-index: 0;
}

/* ================= Étapes ================= */
/* ⚠️ Neutralise le padding global de l'autre feuille:
   elle applique "section { padding:40px; }".
   On le remet à 0 pour NOS sections .etape. */
.parcours-container .etape {
  padding: 0 !important;
}

.etape {
  position: relative;
  width: 100%;
  min-height: unset;
  margin : 5rem 0;
  display: flex;
  justify-content: center; /* centre parfaitement la carte */
  align-items: center;
  scroll-snap-align: start; /* le snap se fait au niveau du BODY (voir plus bas) */

  /* état initial invisible + légèrement plus bas */
  opacity: 0;
  transform: translateY(30px);
}

/* Animation douce avec easing soyeux */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* lorsqu’on rend visible via JS */
.etape.visible {
  animation: fadeUp 800ms cubic-bezier(0.22, 1, 0.36, 1) both; /* “springy” soft */
  animation-delay: var(--delay, 0ms); /* permet un léger décalage (“stagger”) */
}

/* ================= Cartes ================= */
.carte {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 700px;                 /* ~+20% vs une carte standard */
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  margin: 0 auto;                   /* 🔒 centre la carte dans son étape */
}

.resume{
  text-align: justify;
}

.resume_visible {
  text-align: center;
  margin: 20px 0px;
}

.carte h3 {
  margin: 0 0 20px 0;
  font-size: 1.7rem;
  text-align: center;
  font-weight: 750;
  color: var(--text);
}

.etape.visible h3 {
  margin-bottom: 10px;
}

.carte .illustration {
  display: block;
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 0.75rem;
  margin: 35px 0;
}

.carte .resume {
  line-height: 1.5;
  margin-bottom: 40px;
}

/* ================= Bouton “En savoir plus” ================= */
.btn-plus {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: #111;
  color: #fff;
  padding: 0.55rem 1.2rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.btn-plus:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

/* ================= Scroll-snap sur la PAGE =================
   Très important pour que le footer réapparaisse !
   On met le snap sur le body (page entière) et non plus sur <main>.
*/
body {
  scroll-snap-type: y mandatory;
}

/* ================= Modales (si pas déjà stylées ailleurs) ================= */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 2rem;
  backdrop-filter: blur(4px);              /* 🔥 flou moderne */
  background: rgba(0,0,0,0.45);            /* ombre douce */
  align-items: center;
  justify-content: center;
  animation: modal-fade 0.25s ease-out;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal.open { display: flex; }

.modal-content {
  background: #ffffff;
  border-radius: 22px;                     /* ✔ arrondi plus haut de gamme */
  padding: 2.2rem 2.4rem;
  width: 100%;
  max-width: 750px;
  box-shadow:
      0 12px 34px rgba(0,0,0,0.12),
      0 4px 16px rgba(0,0,0,0.06);
  position: relative;
  font-family: 'Manrope', sans-serif;
  animation: modal-slide 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modal-slide {
  from { opacity: 0; transform: translateY(25px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Titre */
.modal-content h3 {
  margin-top: 0;
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 1.2rem;
  font-weight: 700;
  color: #0f1c2e;
  letter-spacing: -0.5px;
}

/* Texte */
.modal-content p {
  font-size: 1rem;
  line-height: 1.55;
  margin: 1rem 1rem;
  color: #2b2b2b;
}

/* Liste */
.modal-content ul {
  margin-top: 0.8rem;
  padding-left: 1.2rem;
}
.modal-content li {
  margin-bottom: .4rem;
  line-height: 1.45;
}

/* Image */
.modal-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 1.2rem;
}

/* Bouton fermer (premium) */
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: #f1f2f6;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
  background: #e0e4ea;
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 600px) {
  .modal-content {
    padding: 1.6rem 1.4rem;
    border-radius: 16px;
  }
  .modal-content h3 {
    font-size: 1.5rem;
  }
}

/* ================= Responsive ================= */
@media (max-width: 767px) {
  .carte { max-width: 92%; text-align: center; }
  .timeline::before { left: 50%; transform: translateX(-50%); } /* reste centrée */
}