/* SECTION TIMELINE */
.timeline-section {
  padding: 60px 20px;
  max-width: 1200px;
  margin: auto;
  background: #f9f9f9;
  position: relative;
}

/* TITRE PRINCIPAL */
.timeline-section h1 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 50px;
}

/* CONTENEUR TIMELINE */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(60rem, 90%);
  margin: auto;
  padding: 0;
  list-style: none;
}

/* LIGNE CENTRALE */
.timeline::before {
  content: "";
  position: absolute;
  width: 4px;
  background: rgb(200, 200, 200);
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* PANELS - ESPACEMENT ALTERNÉ */
.timeline li {
  position: relative;
  width: 45%;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ALTERNANCE GAUCHE / DROITE */
.timeline li:nth-child(odd) {
  align-self: flex-start;
  text-align: right;
  margin-left: 0;
}

.timeline li:nth-child(even) {
  align-self: flex-end;
  text-align: left;
  margin-right: 0;
}

/* DÉCALAGE PROGRESSIF POUR QUINCONCE À MI-HAUTEUR */
.timeline li {
  margin-top: -200px; /* Tous les panels montent pour créer le chevauchement */
}

/* Rétablir le premier élément */
.timeline li:first-child {
  margin-top: 0;
}

/* AJOUT D'UNE IMAGE DANS UN CARRÉ FIXE */
.timeline li .timeline-img-container {
  width: 150px;
  height: 150px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f1f1;
  margin: 10px auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.timeline li .timeline-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* POINTS ALIGNÉS SUR LA LIGNE CENTRALE */
.timeline li::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: var(--accent-color);
  border-radius: 50%;
  z-index: 2;
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--accent-color);
}

/* DÉPLACEMENT DES POINTS SELON ALTERNANCE */
.timeline li:nth-child(odd)::after {
  left: 100%;
  transform: translateX(-50%);
}

.timeline li:nth-child(even)::after {
  left: 0;
  transform: translateX(-50%);
}

/* RESPONSIVE - AJUSTEMENT SUR MOBILE */
@media (max-width: 768px) {
  .timeline li {
      width: 80%;
      align-self: center;
      text-align: left;
      margin-left: 40px;
  }

  .timeline li:nth-child(odd)::after,
  .timeline li:nth-child(even)::after {
      left: 20px;
      transform: translateX(0);
  }

  /* Suppression du décalage progressif sur mobile */
  .timeline li {
      margin-top: 20px;
  }
}


/* DATE STYLE */
.date {
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  background: var(--accent-color); /* Utilisation de la couleur définie */
  padding: 10px 15px;
  border-radius: 6px;
  display: inline-block;
  text-align: center;
  min-width: 80px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease-in-out;
}

.date:hover {
  transform: scale(1.05);
}

/* TITRE STYLE */
.title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-top: 10px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1px;
}

/* EFFET D'OMBRE SOFT POUR LE TITRE */
.title::after {
  content: "";
  display: block;
  width: 50px;
  height: 3px;
  background: var(--accent-color);
  margin: 8px auto 0;
  border-radius: 3px;
}