/* =====================================================
   MOVAWAY — PAGE NOTRE HISTOIRE
   (header/footer/components/base sont chargés en amont)
   ===================================================== */

/* ============ HERO : H1 centré PAR-DESSUS l'image, fond blanc, pas de bordure ============ */
.histoire-hero {
  padding: 40px 0 60px;
  /* Pas de background explicite : sinon le z-index:-1 du .txt-souligne::before
     passerait derrière et le trait bleu serait invisible. */
}
.histoire-hero-wrap {
  position: relative;
}
.histoire-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}
.histoire-hero-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
  pointer-events: none;
  z-index: 2;
}
.histoire-hero-title h1 {
  font-size: clamp(2.4rem, 1.6rem + 3vw, 4.8rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}
.histoire-hero-tagline {
  text-align: right;
  font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.35rem);
  font-weight: 500;
  color: var(--ink);
  margin: 28px 12px 0 0;
}
.histoire-hero-tagline strong {
  font-weight: 800;
}
/* Pas d'override sur .txt-souligne : on réutilise tel quel le style global
   (le même qui sert à "partout." sur la homepage) */

@media (max-width: 540px) {
  .histoire-hero-title h1 {
    font-size: clamp(1.6rem, 1rem + 4vw, 2.4rem);
  }
}

/* ============ TEXTE NARRATIF ============ */
.histoire-story {
  padding: 0 0 80px;
}
.histoire-story-col {
  max-width: 980px;
  margin: 0 auto;
}
.histoire-story-col p {
  margin-bottom: 16px;
  line-height: 1.7;
  font-size: 1.02rem;
  color: var(--ink);
}
.histoire-story-col p strong { font-weight: 700; }
.histoire-story-col p u {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* ============ 4 CARDS AVANTAGES ============ */
.histoire-avantages {
  padding: 0 0 80px;
}
.histoire-avantages-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.histoire-avantage {
  background: #EFF1F4;
  border-radius: var(--border-radius);
  padding: 50px;
}
.histoire-avantage h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--ink);
}
.histoire-avantage p {
  margin: 0;
  line-height: 1.65;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.histoire-avantage p strong { color: var(--ink); font-weight: 800; }

/* ============ DIMENSION INTERNATIONALE ============ */
.histoire-international {
  padding: 0 0 100px;
}
.histoire-international h2 {
  font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.1;
  margin: 0 0 24px;
}
.histoire-international-text {
  max-width: 920px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 40px;
}
.histoire-international-text strong { font-weight: 700; }
.histoire-international-map img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============ TIMELINE "Il était une fois Movaway" ============ */
.histoire-timeline-section {
  padding: 40px 0 50px;
  background-color: #fff;
  background-image: url("https://movaway.fr/wp-content/uploads/2025/11/bg-faq-003.svg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%; /* l'image va jusqu'en bas */
}
.histoire-timeline-head {
  text-align: center;
  margin-bottom: 30px;
}
.histoire-timeline-head h2 {
  font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin: 0;
}
.histoire-timeline-souligne {
  margin-top: -10px;
  text-align: center;
}
.histoire-timeline-souligne img {
  display: inline-block;
  width: 100%;
  max-width: 640px;
  height: auto;
}

/* Timeline verticale : année grosse pastille en haut, descriptif en-dessous,
   tirets pointillés entre items. Facile à étendre : il suffit d'ajouter un
   <div class="timeline-item" data-year="YYYY">…</div> dans le HTML. */
.timeline {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 0;
}
.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 64px; /* place pour les tirets sous l'item */
  /* État initial pour l'animation au scroll */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(0.4, 0, 0.2, 1), transform .7s cubic-bezier(0.4, 0, 0.2, 1);
}
.timeline-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pastille année — plus grande, position relative pour ancrer les tirets */
.timeline-date {
  position: relative;
  margin-bottom: 36px; /* place pour les tirets entre pastille et descriptif */
}
/* Tirets entre l'année et le descriptif (s'animent depuis le haut) */
.timeline-date::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 3px;
  height: 0; /* part de 0 → grandit vers le bas */
  transform: translateX(-50%);
  background-image: linear-gradient(to bottom, var(--primary) 50%, transparent 50%);
  background-size: 3px 8px;
  background-repeat: repeat-y;
  opacity: 0;
  transition: height .55s cubic-bezier(0.4, 0, 0.2, 1) .25s,
              opacity .35s ease .25s;
}
.timeline-item.is-visible .timeline-date::after {
  height: 28px;
  opacity: 0.65;
}

/* Tirets sous le descriptif (vers le prochain item ou jusqu'au bas de la section) */
.timeline-item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 3px;
  height: 0;
  transform: translateX(-50%);
  background-image: linear-gradient(to bottom, var(--primary) 50%, transparent 50%);
  background-size: 3px 8px;
  background-repeat: repeat-y;
  opacity: 0;
  transition: height .65s cubic-bezier(0.4, 0, 0.2, 1) .5s,
              opacity .4s ease .5s;
}
.timeline-item.is-visible::after {
  height: 44px;
  opacity: 0.65;
}
.timeline-date .year {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.5px;
  box-shadow: 0 8px 22px rgba(41, 124, 255, 0.32);
  /* Animation d'apparition (scale-bounce) */
  transform: scale(0.6);
  transition: transform .5s cubic-bezier(0.34, 1.56, 0.64, 1) .15s;
}
.timeline-item.is-visible .timeline-date .year {
  transform: scale(1);
}

/* Descriptif sous la pastille — bordure bleue brand */
.timeline-content {
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 22px 28px;
  max-width: 560px;
  box-shadow: 0 6px 20px rgba(41, 124, 255, 0.08);
}
.timeline-content p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Respect du réglage 'réduire les animations' */
@media (prefers-reduced-motion: reduce) {
  .timeline-item {
    opacity: 1;
    transform: none;
  }
  .timeline-item .timeline-date .year { transform: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 999px) {
  .histoire-avantages-grid { grid-template-columns: 1fr; }
  .histoire-avantage { padding: 36px 28px; }
  .histoire-hero { padding: 40px 0 60px; }
  .histoire-hero-tagline { margin-top: -20px; }

  /* Timeline mobile : pastilles un peu plus petites */
  .timeline-date .year {
    width: 88px;
    height: 88px;
    font-size: 22px;
  }
  .timeline-content {
    padding: 18px 22px;
  }
  .timeline-item { padding-bottom: 48px; }
  .timeline-item:not(:last-child)::after { height: 28px; }
}
@media (max-width: 540px) {
  .histoire-avantage { padding: 28px 22px; }
  .histoire-story-col p { font-size: 1rem; }
  .histoire-timeline-section { padding: 60px 0 70px; }
  .histoire-international { padding-bottom: 60px; }
  .timeline-date .year { width: 76px; height: 76px; font-size: 18px; }
}
