/* =============================================
   HISTORIQUE — Styles spécifiques
   ============================================= */

/* ===== TIMELINE ===== */
.timeline {
  max-width: 860px;
  margin: 3rem auto 0;
  position: relative;
  padding: 2rem 0;
}

/* Filet vertical */
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: rgba(2, 0, 71, 0.15);
}

.timeline-item { padding: 0 0 3.5rem 3rem; position: relative; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -5px; top: 6px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--navy);
  border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px rgba(2, 0, 71, 0.2);
}

/* Années */
.timeline-year {
  position: absolute;
  left: -9%; top: -6px;
  font-family: var(--font-caps);
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.65;
  margin-bottom: 0.5rem;
  display: block;
}
.timeline-year-last { left: -23%; }
.timeline-year-date { left: -15%; }

.timeline-title { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

.timeline-text { opacity: 0.8; text-align: justify; }

/* Photos dans la timeline */
.photo-row { display: flex; gap: 1.5rem; align-items: flex-start; }
.photo-row img { margin-top: 1rem; margin-left: 0.5rem; }

.timeline-photo        { margin-top: 1rem; margin-left: 0.5rem; width: 100%; max-width: 480px; }
.timeline-photo-long   { height: 450px; max-height: 55vh; object-fit: cover; }
.timeline-photo-small-side {
  max-height: 55vh; object-fit: cover; max-width: 45%;
  height: 220px;
}
.timeline-photo-small-side-v2 { height: 420px; max-height: 55vh; object-fit: cover; max-width: 45%; }


/* =============================================
   RESPONSIVE HISTORIQUE
   ============================================= */

/* ── 1440px ── */
@media (max-width: 1440px) {
  .timeline { max-width: 780px; }
  .timeline-photo { max-width: 420px; }
  .timeline-photo-long { height: 380px; max-height: 50vh; }
  .timeline-photo-small-side-v2 { height: 380px; max-height: 50vh; }
  /* Années positionnées absolument — ajustement */
  .timeline-year      { left: -10%; font-size: 1.1rem; }
  .timeline-year-date { left: -16%; }
  .timeline-year-last { left: -25%; }
}

/* ── 1100px ── */
@media (max-width: 1100px) {
  .timeline { max-width: 100%; padding-left: 0; }
  .timeline-year      { left: -11%; }
  .timeline-year-date { left: -17%; }
  .timeline-year-last { left: -26%; }
  .timeline-photo { max-width: 380px; }
}

/* ── Tablette 860px ── */
@media (max-width: 860px) {
  .timeline { max-width: 100%; padding-left: 0; }

  /* Les années en position absolue négative déborderaient — on les remet dans le flux */
  .timeline-year,
  .timeline-year-date,
  .timeline-year-last {
    position: static;
    left: auto;
    margin-bottom: 0.4rem;
    display: block;
    font-size: 1rem;
  }

  /* Photo flottante à droite — on la sort de sa position absolue */
  .timeline-photo-small-side {
    position: static;
    height: auto;
    max-height: 200px;
    object-fit: cover;
    width: 100%;
    margin-top: 1rem;
  }

  /* Paires d'images côte à côte — on les empile */
  .photo-row { flex-direction: column; gap: 1rem; }
  .photo-row img { margin-left: 0; }

  .timeline-photo { width: 100%; max-width: 100%; margin-left: 0; }
  .timeline-photo-long { max-height: 320px; width: 100%; object-fit: cover; }
  .timeline-photo-small-side-v2 { max-width: 100%; max-height: 300px; width: 100%; }

  .timeline-item { padding-left: 2rem; }
}

/* ── Mobile 480px ── */
@media (max-width: 480px) {
  .timeline-item { padding-left: 1.6rem; padding-bottom: 2.5rem; }
  .timeline-title { font-size: 1.25rem; }
  .timeline-text { font-size: var(--text-sm); }
  .timeline-photo-long { max-height: 240px; }
  .timeline-photo-small-side-v2 { max-height: 240px; }
  .timeline { padding: 1.5rem 0; }
}

/* ── Très petit ── */
@media (max-width: 380px) {
  .timeline-item { padding-left: 1.2rem; }
  .timeline-photo-long { max-height: 200px; }
}

/* ── Mobile 640px ── */
@media (max-width: 640px) {
  .timeline { padding: 1rem 0; }
  .timeline-item { padding-left: 1.8rem; padding-bottom: 2.8rem; }
  .timeline-title { font-size: 1.3rem; }
  .timeline-photo { max-width: 100%; }
  .timeline-photo-long { max-height: 280px; }
  .timeline-photo-small-side-v2 { max-height: 280px; }
  .photo-row { flex-direction: column; gap: 0.8rem; }
}
