/* Timeline personnalisée - Style moderne avec cartes alternées */

.custom-timeline-section {
  padding: 80px 10px;
}

.timeline-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  padding: 40px 0;
}

/* Ligne verticale centrale avec gradient */
.timeline-wrapper::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 96%;
  background: linear-gradient(180deg, #3b82f6 0%, #f97316 50%, #10b981 100%);
  top: 0;
  z-index: 0; /* ligne derrière */
}

.timeline-item {
  position: relative;
  margin-bottom: 50px; /* plus d’espace vertical */
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeSlide 0.8s ease forwards;
}

.timeline-item:nth-child(1) {
  animation-delay: 0.1s;
}
.timeline-item:nth-child(2) {
  animation-delay: 0.3s;
}
.timeline-item:nth-child(3) {
  animation-delay: 0.5s;
}

/* Numéros de la timeline */
.timeline-number {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: var(--main-color); 
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  z-index: 2; /* au-dessus de la ligne */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.timeline-item[data-color="blue"] .timeline-number {
  color: #3b82f6;
  border: 3px solid #3b82f6;
}
.timeline-item[data-color="purple"] .timeline-number {
  color: #a855f7;
  border: 3px solid #a855f7;
}
.timeline-item[data-color="orange"] .timeline-number {
  color: #f97316;
  border: 3px solid #f97316;
}
.timeline-item[data-color="green"] .timeline-number {
  color: #10b981;
  border: 3px solid #10b981;
}
.timeline-item[data-color="indigo"] .timeline-number {
  color: #6366f1;
  border: 3px solid #6366f1;
}

.timeline-item:hover .timeline-number {
  transform: translateX(-50%) scale(1.15);
}

/* Contenu des cartes - Alterné gauche/droite */
.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
  text-align: left;
  width: 48%;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: auto;
  text-align: left;
  width: 48%;
}

.timeline-content {
  background: var(--main-color);
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  position: relative;
}

.timeline-content:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Icônes colorées */
.timeline-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--main-color);
}

.timeline-icon svg {
  width: 28px;
  height: 28px;
}

.timeline-icon.blue {
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}
.timeline-icon.purple {
  background: linear-gradient(135deg, #a855f7 0%, #c084fc 100%);
}
.timeline-icon.orange {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}
.timeline-icon.green {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}
.timeline-icon.indigo {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
}

/* Durée */
.timeline-duration {
  font-size: 0.85rem;
  color: var(--second-bg-color);
  padding: 15px 0 10px 0;
  font-weight: 500;
}

/* Titres */
.timeline-content h3 {
  font-family: "Archivo Black";
  font-size: 1.5rem;
  color: var(--second-bg-color);
  padding-bottom: 12px;
  font-weight: 700;
  line-height: 1.3;
}

/* Paragraphes */
.timeline-content p {
  color: var(--second-bg-color);
  line-height: 1.7;
  margin: 0;
  font-size: 1rem;
}

/* Barres de progression colorées */
.timeline-progress {
  height: 4px;
  border-radius: 2px;
  margin-top: 20px;
  width: 100%;
}

.timeline-progress.blue {
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  width: 33%;
}
.timeline-progress.orange {
  background: linear-gradient(90deg, #f97316 0%, #fb923c 100%);
  width: 66%;
}
.timeline-progress.green {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  width: 100%;
}

/* Responsive */
@media (max-width: 1023px) {
  .timeline-wrapper::before {
    left: 30px;
  }
  .timeline-number {
    left: 30px;
    transform: translateX(-50%);
  }
  .timeline-item:nth-child(odd) .timeline-content,
  .timeline-item:nth-child(even) .timeline-content {
    width: calc(100% - 100px);
    margin-left: 80px;
    padding: 15px;
    text-align: left;
  }
}

@media (max-width: 768px) {
  .timeline-number {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  .timeline-content h3 {
    font-size: 1.3rem;
  }
  .timeline-content p {
    font-size: 0.95rem;
  }
  .timeline-icon {
    width: 50px;
    height: 50px;
  }
  .custom-timeline-section {
    padding: 50px 0;
  }
}
