/* ============================================================================
   Stepper d'onboarding Sites Vitrines (partage par index / generation /
   site-accueil / confirm). Variante sombre par defaut (fonds photo),
   variante claire .ob-steps--light (site-accueil), flottante .ob-steps--float.
   Couleur d'accent = var(--primary) defini par chaque page (repli emeraude).
   ========================================================================== */
.ob-steps {
  --ob-accent:        var(--primary, #10b981);
  --ob-accent-soft:   rgba(16, 185, 129, .25);
  --ob-line:          rgba(255, 255, 255, .28);
  --ob-dot-bg:        rgba(255, 255, 255, .14);
  --ob-dot-fg:        rgba(255, 255, 255, .85);
  --ob-label:         rgba(255, 255, 255, .62);
  --ob-label-active:  #ffffff;

  position: relative;
  z-index: 2;
  display: flex;
  /* width 100% : sur les pages dont le body est un flex column centre
     (generation.php), sans cette regle le nav se reduit a son contenu et les
     etapes se resserrent. Force la meme largeur que sur les autres pages. */
  width: 100%;
  justify-content: center;
  padding: 10px clamp(16px, 5vw, 40px) 0;
}

/* Variante fond clair (site-accueil) */
.ob-steps--light {
  --ob-accent-soft:  rgba(16, 185, 129, .18);
  --ob-line:         #e5e7eb;
  --ob-dot-bg:       #ffffff;
  --ob-dot-fg:       #9ca3af;
  --ob-label:        #6b7280;
  --ob-label-active: #064e3b;
}

/* Variante flottante (pages centrees plein ecran : generation) */
.ob-steps--float {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: auto; /* recentrage par translateX : garde la largeur du contenu */
  padding: 0;
  pointer-events: none; /* purement informatif */
}

.ob-steps ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 460px;
}

.ob-step {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Trait reliant le centre du point precedent au centre du point courant */
.ob-step:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 13px;            /* centre du point (26px / 2) */
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--ob-line);
  z-index: 0;
}
.ob-step.is-done:not(:first-child)::before,
.ob-step.is-active:not(:first-child)::before { background: var(--ob-accent); }

.ob-step-dot {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .74rem;
  font-weight: 700;
  background: var(--ob-dot-bg);
  color: var(--ob-dot-fg);
  border: 2px solid var(--ob-line);
  transition: background .25s, border-color .25s, color .25s, box-shadow .25s;
}
.ob-step-dot svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none;
  stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
}
.ob-step.is-active .ob-step-dot {
  background: var(--ob-accent);
  color: #fff;
  border-color: var(--ob-accent);
  box-shadow: 0 0 0 4px var(--ob-accent-soft);
}
.ob-step.is-done .ob-step-dot {
  background: var(--ob-accent);
  color: #fff;
  border-color: var(--ob-accent);
}

.ob-step-label {
  margin-top: 7px;
  padding: 0 4px;
  font-family: var(--font-body, 'Outfit', sans-serif);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ob-label);
  text-wrap: balance;
}
.ob-step.is-active .ob-step-label { color: var(--ob-label-active); }

@media (max-width: 480px) {
  .ob-steps ol { max-width: 100%; }
  .ob-step-label { font-size: .66rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ob-step-dot { transition: none; }
}
