/* ==================================================
   SECTION DÉROULEMENT
   Une frise ouverte, pas des cartes : un grand numéro par étape (c'est une
   vraie suite), puis un pointillé qui court vers l'étape suivante. Les tirets
   avancent doucement dans le sens de la lecture ; à l'arrêt si le visiteur
   demande moins d'animations.
   ================================================= */

.offer {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-space) var(--page-gutter);
  scroll-margin-top: calc(var(--navbar-height) + 0.75rem);
}

.offer-steps {
  --dash: color-mix(in srgb, var(--color-accent) 70%, transparent);
  --dash-period: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

html[data-theme="dark"] .offer-steps {
  --dash: color-mix(in srgb, var(--color-accent-bright) 60%, transparent);
}

.offer-step {
  position: relative;
  padding: 0 0 2.5rem 4.25rem;
}

.offer-step:last-child {
  padding-bottom: 0;
}

.offer-step__index {
  position: absolute;
  left: 0;
  top: -0.35rem;
  width: 3rem;
  font-family: var(--font-serif);
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums;
  color: var(--color-accent);
}

html[data-theme="dark"] .offer-step__index {
  color: var(--color-accent-bright);
}

/* Pointillé vertical (une colonne) : du numéro vers l'étape suivante. */
.offer-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: 3.1rem;
  bottom: 0.6rem;
  width: 1px;
  background: repeating-linear-gradient(180deg, var(--dash) 0 5px, transparent 5px var(--dash-period));
  background-size: 1px var(--dash-period);
  animation: offerDashDown 1.4s linear infinite;
}

.offer-step__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.008em;
  color: var(--color-ink);
}

.offer-step__text {
  max-width: 34ch;
  margin: 0;
  line-height: 1.65;
  color: var(--color-ink-muted);
}

@keyframes offerDashDown {
  to { background-position: 0 var(--dash-period); }
}

@keyframes offerDashRight {
  to { background-position: var(--dash-period) 0; }
}

/* Trois colonnes : le numéro au-dessus, le pointillé file à l'horizontale
   jusqu'à l'étape suivante, à hauteur du numéro. */
@media (min-width: 800px) {
  .offer-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .offer-step {
    padding: 4.6rem 2.5rem 0 0;
  }

  .offer-step__index {
    top: 0;
  }

  .offer-step:not(:last-child)::before {
    left: 4.4rem;
    right: 1.25rem;
    top: 1.55rem;
    bottom: auto;
    width: auto;
    height: 1px;
    background: repeating-linear-gradient(90deg, var(--dash) 0 5px, transparent 5px var(--dash-period));
    background-size: var(--dash-period) 1px;
    animation-name: offerDashRight;
  }
}

/* Moins d'animations demandé : les pointillés restent immobiles. */
@media (prefers-reduced-motion: reduce) {
  .offer-step:not(:last-child)::before {
    animation: none;
  }
}
