.section {
  padding: 64px 24px;
}

.inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.titre {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gris-fonce);
  text-align: center;
  margin-bottom: 48px;
}

.grille {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.chemin {
  display: none;
}

.etape {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  padding-bottom: 32px;
  transition: transform 0.25s ease;
}

.etape:hover {
  transform: translateX(4px);
}

/* Ligne verticale en pointillés reliant les étapes sur mobile, alignée à gauche */
.etape:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 44px;
  left: 20px;
  transform: translateX(-50%);
  width: 2px;
  height: calc(100% - 44px);
  background-image: linear-gradient(to bottom, var(--vert-fonce) 3px, transparent 3px);
  background-size: 2px 12px;
  background-repeat: repeat-y;
}

.numero {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--vert-fonce);
  color: var(--blanc);
  font-family: var(--font-gotham);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background-color 0.25s ease;
  z-index: 1;
}

.contenu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 6px;
}

.etape:hover .numero {
  transform: scale(1.12);
  background: var(--vert-moyen);
}

.etapeTitre {
  font-family: var(--font-gotham);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gris-fonce);
}

.etapeTexte {
  font-size: 15px;
  color: var(--gris-moyen);
  line-height: 1.5;
  max-width: 280px;
}

@media (min-width: 768px) {
  .grille {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-top: 32px;
  }

  .chemin {
    display: block;
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 100px;
    pointer-events: none;
  }

  .etape {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 0;
  }

  .etape:hover {
    transform: translateY(-4px);
  }

  .contenu {
    padding-top: 0;
    align-items: center;
  }

  /* Décalage en quinconce pour suivre le tracé du chemin en S */
  .etape[data-position="0"] {
    margin-top: 44px;
  }

  .etape[data-position="1"] {
    margin-top: 0;
  }

  .etape[data-position="2"] {
    margin-top: 44px;
  }

  .etape:not(:last-child)::before {
    display: none;
  }
}
