/* Étapes — une suite ordonnée d'états : l'assistant, le statut LinkedIn, la barre des
   phases. `<ol class="steps">` > `<li class="steps__item steps__item--current">`
   (`steps__marker`, `steps__label`). Référence : docs/design-system.md § Composants. */

.steps {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps__item {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  color: var(--color-text-secondary);
  font-size: var(--text-12);
  text-align: center;
}

/* Le trait qui relie deux marqueurs, vert quand l'étape d'avant est faite. */
.steps__item + .steps__item::before {
  content: "";
  position: absolute;
  top: 13px;
  right: calc(50% + 18px);
  left: calc(-50% + 18px);
  height: 2px;
  background: var(--color-border);
}

.steps__item--done + .steps__item::before {
  background: var(--color-success);
}

.steps__marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-circle);
  background: var(--color-surface);
  font-size: var(--text-13);
  font-weight: var(--weight-semibold);
}

.steps__item--current {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}

.steps__item--current .steps__marker {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.steps__item--done .steps__marker {
  border-color: var(--color-success);
  background: var(--color-success);
  color: var(--color-text-inverse);
}

/* En ligne : un point et son libellé, un tiret entre deux étapes (un statut à trois temps). */
.steps--inline {
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.steps--inline .steps__item {
  flex: none;
  flex-direction: row;
  gap: var(--space-1-5);
}

.steps--inline .steps__item + .steps__item::before {
  position: static;
  width: 12px;
  height: 1px;
}

.steps--inline .steps__marker {
  width: 8px;
  height: 8px;
  border: 0;
  background: var(--color-border);
}

/* En segments : une case par étape, pleine de la couleur de son état (la barre des phases). */
.steps--segments {
  flex-wrap: wrap;
  gap: var(--space-1-5);
}

.steps--segments .steps__item {
  padding: var(--space-2) var(--space-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}

.steps--segments .steps__item + .steps__item::before {
  content: none;
}

.steps--segments .steps__item--done {
  border-color: var(--color-success);
  background: var(--color-success);
  color: var(--color-text-inverse);
}

.steps--segments .steps__item--current {
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 30%, transparent);
  color: var(--color-text-inverse);
}

.steps--segments .steps__item--paused {
  border-color: var(--color-warning-dark);
  background: var(--color-warning-dark);
  color: var(--color-text-inverse);
}

.steps__item--cancelled {
  text-decoration: line-through;
}

.steps--segments .steps__item--cancelled {
  background: var(--color-border);
}

@media (width <= 768px) {
  .steps--segments .steps__item {
    flex: 1 1 80px;
  }
}

/* Sur un téléphone, seule l'étape courante garde son libellé. */
@media (width <= 480px) {
  .steps:not(.steps--inline, .steps--segments) .steps__item:not(.steps__item--current) .steps__label {
    display: none;
  }
}
