
/* CSS de la timeline (extrait de timeline.php converti) */
.timeline-container {
  position: relative;
  height: 500vh;
  background-color: #f5fbf7;
  z-index: 1;
  overflow: visible;
  overflow-anchor: none;
}

.timeline-container.reduced-height {
  height: 250vh !important;
}

.timeline-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: block;
  z-index: 1;
}

.timeline-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  width: 100%;
  max-width: 1200px;
  margin: auto;
}

.timeline-upper {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
  box-sizing: border-box;
}

.timeline-extra-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  padding: 30px 40px;
  max-width: 1200px;
  width: 100%;
  text-align: center;
  min-height: 300px;
  max-height: 500px;
  margin-top: 0;
  margin-bottom: auto;
  align-self: flex-start;
  overflow: hidden;
}

.extra-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.97);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.extra-content.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.timeline-title {
  font-size: 28px;
  margin-top: 80px;
  margin-bottom: 60px;
  color: #1e1e1e;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.timeline-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.timeline-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.timeline-step {
  width: 200px;
  min-height: 280px;
  background: white;
  padding: 20px 15px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 0;
  cursor: pointer;
  transform: translateY(30px) scale(1);
  transition: transform 0.6s ease, box-shadow 0.6s ease, opacity 0.6s ease;
  z-index: 1;
}

.timeline-step.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.timeline-step.zoomed {
  transform: translateY(0) scale(1.09);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  z-index: 2;
  background-color: rgb(228, 228, 228);
}

.timeline-step .icon {
  background: linear-gradient(to right, #28a745, #00b894);
  color: white;
  font-weight: bold;
  font-size: 18px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin: 0 auto 15px;
  flex-shrink: 0;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  transform: scale(0.8);
  opacity: 0;
}

.timeline-step.visible .icon {
  animation: iconPop 0.6s ease forwards;
}

.timeline-step h3,
.timeline-step p {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.timeline-step.visible h3,
.timeline-step.visible p {
  opacity: 1;
  transform: translateY(0);
}

.timeline-step h3 {
  font-size: 17px;
  font-weight: 600;
  color: #1e1e1e;
  margin-bottom: 12px;
  line-height: 1.4;
}

.timeline-step p {
  font-size: 15px;
  color: #555;
  line-height: 1.5;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-line {
  min-width: 70px;
  height: 4px;
  background: linear-gradient(to right, #28a745, #00b894);
  border-radius: 5px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  margin-inline: 12px;
}

.timeline-line.visible {
  animation: growLine 1.4s ease forwards;
}

@keyframes iconPop {
  0% { transform: scale(0.4); opacity: 0; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes growLine {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

@media screen and (max-width: 1230px) {
  .timeline { flex-direction: column; align-items: center; }
  .timeline-group { flex-direction: column; }
  .timeline-line { width: 4px; height: 30px; transform-origin: top; }
  .timeline-step { max-width: 80%; }
}


@media screen and (max-width: 768px) {
  .timeline {
    display: none;
  }

  .timeline-extra-content {
    display: none;
  }

  .timeline-container {
    height: 600vh;
    overflow: visible !important;
    background-color: #f5fbf7;
  }

  .timeline-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .timeline-title {
    font-size: 18px;
    text-align: center;
    margin: 30% auto 10px auto;
    padding: 0 16px;
    color: #1e1e1e;
    line-height: 1.4;
  }

  .mobile-slide-wrapper {
    flex-grow: 1;
    position: relative;
    overflow: hidden;
  }

  .mobile-slide {
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.5s ease;
    padding: 20px;
    box-sizing: border-box;
    background-color: #f5fbf7;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .mobile-slide.active {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-slide .timeline-step {
    all: unset;
    width: 70%;
    margin: 0 auto 24px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 1 !important;
    transform: none !important;
  }


.mobile-slide .step-header {
  display: inline-flex; /* ✅ Pour s'adapter au contenu sans forcer la hauteur */
  align-items: center;  /* ✅ Aligne verticalement l'icône et le texte */
  justify-content: center;
  gap: 8px;
}

.mobile-slide .step-header .icon {
  width: 32px;
  height: 32px;
  background: #28a745;
  color: white;
  font-weight: 600;
  font-size: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.mobile-slide .step-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e1e1e;
  line-height: 1;
  padding: 0;
}



  .mobile-slide .timeline-step p {
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
  }

  .mobile-slide .extra-content {
    flex-grow: 1;
    position: static;
    opacity: 1 !important;
    transform: none !important;
    transition: none;
    overflow: auto;
    margin: 0;
  }

  .mobile-slide .timeline-step .icon,
  .mobile-slide .timeline-step h3,
  .mobile-slide .timeline-step p {
    opacity: 1 !important;
    transform: none !important;
  }
}

