/* ============================================================
   PS Pattern — Expertise timeline (vertical zigzag, cards alternées L/R)
   Usage : /entretien-reparation/ (6 étapes du processus d'expertise)
   Layout desktop : ligne verticale centrale + cards alternées gauche/droite
   Layout mobile (<900px) : stack vertical avec point à gauche du texte
   Tokens : assets/css/tokens.css (--ps-*)
   ============================================================ */

.ps-expertise-timeline {
  padding-block: var(--ps-spacing-96) calc(var(--ps-spacing-96) * 1.5);
  background-color: var(--ps-color-white);
  overflow: hidden;
  position: relative;
}

/* Coolshape SVG en fond (les vagues — même vibe que ps-confiance / ps-histoire) */
.ps-expertise-timeline__coolshape {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.ps-expertise-timeline__coolshape img {
  width: 100%;
  max-width: 1440px;
  height: auto;
  opacity: 0.6;
}

.ps-expertise-timeline__inner {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--ps-spacing-52);
  position: relative;
  z-index: 2;
}

.ps-expertise-timeline__header {
  text-align: center;
  margin-bottom: calc(var(--ps-spacing-96) * 2);
}

.ps-expertise-timeline__eyebrow {
  font-family: var(--ps-font-family-brand);
  font-weight: var(--ps-font-weight-bold);
  font-size: var(--ps-font-size-14);
  letter-spacing: 2.34px;
  text-transform: uppercase;
  color: var(--ps-color-red-500);
  margin: 0 0 var(--ps-spacing-14) 0;
}

.ps-expertise-timeline__title {
  font-family: var(--ps-font-family-brand);
  font-weight: var(--ps-font-weight-light);
  font-size: var(--ps-font-size-40);
  line-height: 1.15;
  letter-spacing: -0.4px;
  color: var(--ps-color-black);
  margin: 0;
}

/* Track = liste verticale avec ligne au centre */
.ps-expertise-timeline__track {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}

.ps-expertise-timeline__track::before {
  content: "";
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 50%;
  width: 2px;
  background-color: rgba(0, 0, 0, 0.12);
  transform: translateX(-1px);
  z-index: 1;
}

/* Chaque step = article positionné à gauche ou à droite de la ligne centrale.
   margin-bottom négatif → les cards se chevauchent verticalement mais alternent
   gauche/droite, ce qui produit un rythme visuel serré des points rouges centraux.
   min-height sur la card → hauteur uniforme entre les 6 cards indépendamment
   de la longueur du texte, donc espacement constant. */
.ps-expertise-timeline__step {
  position: relative;
  display: flex;
  margin: 0 0 -60px 0;
  padding: 0;
}

.ps-expertise-timeline__step:last-child {
  margin-bottom: var(--ps-spacing-64);
}

/* Position gauche (impair : 01, 03, 05) */
.ps-expertise-timeline__step--top {
  justify-content: flex-start;
  padding-right: calc(50% + var(--ps-spacing-14));
}

/* Position droite (pair : 02, 04, 06) */
.ps-expertise-timeline__step--bottom {
  justify-content: flex-end;
  padding-left: calc(50% + var(--ps-spacing-14));
}

/* Point rouge centré sur la ligne verticale */
.ps-expertise-timeline__step::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background-color: var(--ps-color-red-500);
  box-shadow: 0 0 0 4px var(--ps-color-white);
  z-index: 2;
}

/* Card : contient num + title + desc.
   min-height : force toutes les cards à la même hauteur pour un espacement uniforme. */
.ps-expertise-timeline__card {
  background-color: var(--ps-color-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: var(--ps-spacing-24) var(--ps-spacing-32);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  width: 100%;
  min-height: 200px;
  justify-content: center;
}

.ps-expertise-timeline__step--top .ps-expertise-timeline__card {
  text-align: right;
  align-items: flex-end;
}

.ps-expertise-timeline__step--bottom .ps-expertise-timeline__card {
  text-align: left;
  align-items: flex-start;
}

.ps-expertise-timeline__num {
  font-family: var(--ps-font-family-brand);
  font-weight: var(--ps-font-weight-medium);
  font-size: var(--ps-font-size-14);
  letter-spacing: 2.16px;
  color: var(--ps-color-red-500);
  line-height: 1;
}

.ps-expertise-timeline__step-title {
  font-family: var(--ps-font-family-brand);
  font-weight: var(--ps-font-weight-medium);
  font-size: var(--ps-font-size-22, 22px);
  line-height: 1.25;
  letter-spacing: -0.11px;
  color: var(--ps-color-black);
  margin: 0;
}

.ps-expertise-timeline__step-desc {
  font-family: var(--ps-font-family-brand);
  font-size: var(--ps-font-size-16);
  line-height: 1.55;
  color: rgba(10, 10, 10, 0.65);
  margin: 0;
  max-width: 42ch;
}

/* Responsive — mobile stack vertical avec ligne + point à gauche */
@media (max-width: 900px) {
  .ps-expertise-timeline__track::before {
    left: 22px;
    top: 20px;
    bottom: 20px;
  }

  .ps-expertise-timeline__step {
    justify-content: flex-start;
    padding-left: var(--ps-spacing-52);
    padding-right: 0;
    margin-bottom: var(--ps-spacing-24);
  }

  .ps-expertise-timeline__step::after {
    left: 22px;
    top: var(--ps-spacing-24);
    transform: translateX(-50%);
  }

  .ps-expertise-timeline__step .ps-expertise-timeline__card {
    text-align: left;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .ps-expertise-timeline {
    padding-block: var(--ps-spacing-64);
  }
  .ps-expertise-timeline__inner {
    padding-inline: var(--ps-spacing-24);
  }
  .ps-expertise-timeline__title {
    font-size: var(--ps-font-size-28, 28px);
  }
  .ps-expertise-timeline__card {
    padding: var(--ps-spacing-24);
  }
}
