/* ============================================================
   TIMELINE HORIZONTALE — css/timeline.css
   À inclure après css/style.css dans about.html
   ============================================================ */

/* Section wrapper */
.section-timeline {
  background: #f9f3e8;
  padding: 5em 0 4em;
  overflow: hidden;
}

/* Heading */
.timeline-heading {
  text-align: center;
  margin-bottom: 3em;
}
.timeline-heading .subheading {
  display: block;
  color: #b7472a;
  font-style: italic;
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: .5em;
}
.timeline-heading h2 {
  font-family: 'Spectral', serif;
  font-size: 2.4rem;
  color: #1a0a00;
  font-weight: 700;
}
.timeline-heading h2 em {
  color: #b7472a;
  font-style: italic;
}
.timeline-intro {
  color: #8a7060;
  max-width: 500px;
  margin: .8em auto 0;
  font-size: .95rem;
}

/* Scrollable container */
.timeline-scroll-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  padding: 0 2em 2em;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.timeline-scroll-wrapper:active {
  cursor: grabbing;
}
.timeline-scroll-wrapper::-webkit-scrollbar {
  height: 6px;
}
.timeline-scroll-wrapper::-webkit-scrollbar-track {
  background: rgba(0,0,0,.08);
  border-radius: 3px;
}
.timeline-scroll-wrapper::-webkit-scrollbar-thumb {
  background: #b7472a;
  border-radius: 3px;
}

/* Horizontal track */
.timeline-track {
  display: flex;
  align-items: flex-start;
  min-width: max-content;
  padding: 0 3em;
  position: relative;
}

/* Continuous line running through all dots */
.timeline-track::before {
  content: '';
  position: absolute;
  /* vertically centred on the dot area:
     content box (≈260px) + spacer (24px) = dot sits at 284px from top */
  top: 284px;
  left: 3em;
  right: 3em;
  height: 3px;
  background: linear-gradient(to right, #b7472a, #c9a84c, #b7472a);
  pointer-events: none;
}

/* Each timeline stop */
.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 260px;
  flex-shrink: 0;
  position: relative;
}

/* Odd items: card on top, dot below */
.timeline-item:nth-child(odd) {
  flex-direction: column;
}

/* Even items: card below, dot above  */
.timeline-item:nth-child(even) {
  flex-direction: column-reverse;
}

/* Adjust the line position so it always sits on the dots.
   For column-reverse items the dot also ends up at the same
   absolute position because the spacers are equal. */

/* Card */
.timeline-content {
  background: #fff;
  border: 1px solid rgba(183, 71, 42, .12);
  border-radius: 4px;
  padding: 1.2em 1.4em;
  width: 220px;
  box-shadow: 0 4px 18px rgba(183, 71, 42, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(183, 71, 42, .18);
}

/* Thumbnail image inside card */
.tl-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 3px;
  margin-bottom: .8em;
  display: block;
}

/* Year badge */
.timeline-year {
  display: inline-block;
  background: #b7472a;
  color: #fff;
  font-family: 'Spectral', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1rem;
  padding: .2em .8em;
  border-radius: 2px;
  margin-bottom: .5em;
}

.timeline-content h5 {
  font-family: 'Spectral', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1a0a00;
  margin-bottom: .4em;
}
.timeline-content p {
  font-size: .85rem;
  color: #8a7060;
  margin: 0;
  line-height: 1.5;
}

/* Arrow tip pointing from card toward the dot */
/* Odd: arrow points downward (bottom of card) */
.timeline-item:nth-child(odd) .timeline-content::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid #b7472a;
}
/* Even (column-reverse): arrow points upward (top of card = visual bottom) */
.timeline-item:nth-child(even) .timeline-content::after {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid #b7472a;
}

/* Spacer between card and dot */
.tl-spacer {
  height: 24px;
  flex-shrink: 0;
}

/* Dot on the horizontal line */
.timeline-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #b7472a;
  border: 4px solid #c9a84c;
  flex-shrink: 0;
  z-index: 1;
  box-shadow: 0 0 0 4px rgba(183, 71, 42, .15);
  transition: transform .2s ease;
}
.timeline-item:hover .timeline-dot {
  transform: scale(1.35);
}
