@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap');

/* Variables */
:root {
  --primary-color: #f9bcca;
  --secondary-color: #df9fc6;
  --text-color: #ffffff;
  --background-color: rgba(255, 255, 255, 0.05);
  --timeline-color: rgba(255, 255, 255, 0.8);
  --icon-color: white;
  --highlight-color: #f9bcca;
  --transition-speed: 0.4s;
}


/* Layout */
.parcours {
  padding: 40px 20px;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
  font-size: 1em;
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: var(--text-color);
  max-width: 1200px;
  margin: 0 auto;
}

.parcours .title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5em;
  font-weight: 600;
}

.parcours .title span {
  color: var(--primary-color);
  position: relative;
}

.parcours .title span::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.parcours .title:hover span::after {
  transform: scaleX(1);
}

/* Timeline styling */
.timeline {
  margin: 60px auto;
  position: relative;
  max-width: 1000px;
  z-index: 100;
}

.timeline:before {
  background: linear-gradient(to bottom, transparent, var(--timeline-color), transparent);
  content: '';
  position: absolute;
  top: 0;
  left: 2em;
  width: 3px;
  height: 100%;
  border-radius: 1.5px;
}

.timeline-event {
  position: relative;
  margin-bottom: 60px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Timeline event container */
.timeline-event-copy {
  padding: 30px;
  position: relative;
  top: -1.875em;
  left: 5em;
  width: calc(100% - 5.5em);
  background-color: var(--background-color);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.timeline-event-copy:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Typography */
.timeline-event-copy h3 {
  font-size: 1.75em;
  margin-bottom: 5px;
  color: var(--primary-color);
  font-weight: 600;
}

.timeline-event-copy h4 {
  font-size: 1.2em;
  margin-bottom: 1.2em;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

.timeline-event-copy strong {
  font-weight: 700;
  color: var(--highlight-color);
}

.timeline-event-copy p:not(.timeline-event-thumbnail) {
  padding-bottom: 1.2em;
}

/* Lists */
.timeline-event-copy ul {
  list-style-type: none;
  margin-left: 0;
  padding-left: 0;
}

.timeline-event-copy ul ul {
  margin-top: 10px;
  margin-left: 20px;
}

.timeline-event-copy > ul > li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 15px;
}

.timeline-event-copy > ul > li:before {
  content: '•';
  color: var(--primary-color);
  font-size: 1.2em;
  position: absolute;
  left: 0;
  top: 0;
}

.timeline-event-copy > ul > li > ul > li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.timeline-event-copy > ul > li > ul > li:before {
  content: '→';
  color: var(--secondary-color);
  position: absolute;
  left: 0;
  top: 0;
}

/* Event icon */
.timeline-event-icon {
  transition: transform 0.4s ease-in, background-color 0.4s ease;
  transform: rotate(45deg);
  background-color: var(--icon-color);
  outline: 10px solid rgba(0, 0, 0, 0);
  display: block;
  position: absolute;
  top: 0;
  left: 2em;
  width: 1em;
  height: 1em;
  border-radius: 3px;
  z-index: 10;
}

.timeline-event:hover .timeline-event-icon {
  transform: rotate(-45deg) scale(1.2);
  background-color: var(--primary-color);
  box-shadow: 0 0 15px var(--primary-color);
}

/* Date thumbnail */
.timeline-event-thumbnail {
  transition: all 0.5s ease-in-out;
  color: black;
  font-size: 0.85em;
  background-color: white;
  display: inline-block;
  margin-bottom: 1.2em;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.timeline-event:hover .timeline-event-thumbnail {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(239, 71, 111, 0.3);
}

/* Connect dots with line visually */
.timeline-event:after {
  content: '';
  position: absolute;
  top: 0;
  left: 2.48em;
  width: 0.9em;
  height: calc(100% + 60px);
  z-index: -1;
}

/* Responsive design */
@media (max-width: 1024px) {
  .timeline:before {
    left: 0.5em;
  }

  .timeline-event-icon {
    left: 0.5em;
  }

  .timeline-event-copy {
    left: 2.5em;
    width: calc(100% - 3em);
    top: -1em;
  }

  .timeline-event:after {
    left: 0.98em;
  }

  .parcours {
    padding: 20px 10px;
  }

  .timeline-event-copy h3 {
    font-size: 1.5em;
  }

  .timeline-event-copy h4 {
    font-size: 1.1em;
  }

  .timeline-event {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }
}

/* Animation pour les entrées en douceur */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.timeline-event.visible:nth-child(1) {
  animation: fadeInUp 0.6s 0.1s forwards;
}

.timeline-event.visible:nth-child(2) {
  animation: fadeInUp 0.6s 0.3s forwards;
}

.timeline-event.visible:nth-child(3) {
  animation: fadeInUp 0.6s 0.5s forwards;
}

.timeline-event.visible:nth-child(4) {
  animation: fadeInUp 0.6s 0.7s forwards;
}
