/* ============================================================
   STEP RAIL — styles partagés (voir js/utils/step-rail.js)
   Zéro hex : uniquement des tokens, pour suivre les 5 thèmes.
   ============================================================ */

.steprail {
  display: flex;
  gap: 6px;
  padding: 6px;
  margin-bottom: var(--space-4, 18px);
  background: color-mix(in srgb, var(--bg-deep) 45%, var(--surface));
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.steprail-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 150px;
  padding: 9px 14px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--muted);
  transition: background .15s, color .15s, box-shadow .15s;
}
.steprail-step:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); color: var(--ink); }
.steprail-step:focus-visible { outline: 2px solid var(--joy-sky-ink); outline-offset: 2px; }

.steprail-n {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  background: var(--surface);
  color: var(--muted);
}
.steprail-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.steprail-label {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.steprail-hint {
  font-size: 11.5px;
  font-weight: 400;
  opacity: .8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Étape affichée */
.steprail-step.is-current {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 10%, transparent);
}
.steprail-step.is-current .steprail-n {
  border-color: color-mix(in srgb, var(--joy-sky-ink) 45%, transparent);
  color: var(--joy-sky-ink);
}
/* Étape acquise — la donnée existe */
.steprail-step.is-done .steprail-n {
  border-color: color-mix(in srgb, var(--joy-sage-ink) 45%, transparent);
  background: var(--joy-sage-tint);
  color: var(--joy-sage-ink);
}
/* Étape en veille — prérequis absent. JAMAIS désactivée : c'est une
   indication, pas une barrière (cf. règle de conception du module). */
.steprail-step.is-idle { opacity: .62; }
.steprail-step.is-idle .steprail-hint { font-style: italic; }

@media (max-width: 900px) {
  .steprail { width: 100%; }
  .steprail-step { flex: 0 0 auto; min-width: 138px; }
}

/* ============================================================
   BANDEAU DE GUIDAGE — « ce qu'il faut faire ici », une ligne.
   Ne s'affiche que tant que l'étape n'a rien à montrer : dès que la
   donnée existe il disparaît de lui-même. Ce n'est pas un tutoriel.
   ============================================================ */
.stepguide {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  margin-bottom: var(--space-4, 18px);
  background: var(--joy-apricot-tint);
  border: 1px solid color-mix(in srgb, var(--joy-apricot-ink) 26%, transparent);
  border-radius: 14px;
}
.stepguide-body { flex: 1; min-width: 0; }
.stepguide-title {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--joy-apricot-ink);
}
.stepguide-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  opacity: .85;
}
.stepguide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.stepguide-close {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--joy-apricot-ink);
  font-size: 15px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
  opacity: .6;
  border-radius: 6px;
}
.stepguide-close:hover { opacity: 1; background: color-mix(in srgb, var(--joy-apricot-ink) 12%, transparent); }
