/* =============================================================================
   Guide avancé - pages satellites (/{lang}/guides/...)
   =============================================================================
   Mise en forme volontairement propre à ces pages : une colonne de lecture
   étroite, rythmée par des étapes numérotées. Les pages satellites suivantes
   pourront avoir leur propre forme sans hériter de celle-ci.
   ========================================================================== */

.guide {
  max-width: 760px;
}

/* ----- Étape numérotée ---------------------------------------------------- */

.guide-step {
  display: grid;
  /* minmax(0, 1fr) et non 1fr : un track `1fr` a un min-width:auto implicite,
     il refuse donc de rétrécir sous la largeur min-content de son contenu.
     Un seul élément insécable (bouton en nowrap, nom de fichier, URL) suffit
     alors à faire déborder toute la page en mobile. */
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-4);
  padding-bottom: var(--sp-10);
}

.guide-step + .guide-step {
  border-top: 1px solid var(--color-border);
  padding-top: var(--sp-10);
}

.guide-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-pill);
  color: var(--color-brand);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  line-height: 1;
  flex-shrink: 0;
}

.guide-step__body > h2 {
  margin: 0 0 var(--sp-4);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-snug);
}

.guide-step__body > p {
  margin: 0 0 var(--sp-4);
  color: var(--color-text-soft);
  line-height: var(--lh-base);
}

.guide-step__body > p:last-child {
  margin-bottom: 0;
}

.guide-step__body strong {
  color: var(--color-text);
  font-weight: var(--fw-semibold);
}

/* .btn est en white-space:nowrap sur tout le site. Dans une colonne de lecture
   étroite, un libellé un peu long déborde. On autorise le retour à la ligne
   ici seulement, sans toucher au bouton global. */
.guide-step__body .btn {
  white-space: normal;
}

.guide-step__body code {
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.9em;
  word-break: break-all;
}

/* ----- Listes ------------------------------------------------------------- */

.guide-list {
  margin: 0 0 var(--sp-4);
  padding-left: var(--sp-5);
  color: var(--color-text-soft);
  line-height: var(--lh-base);
}

.guide-list li + li {
  margin-top: var(--sp-3);
}

.guide-list li::marker {
  color: var(--color-brand);
}

/* ----- Aparté ------------------------------------------------------------- */

.guide-note {
  padding: var(--sp-4);
  border-left: 2px solid var(--color-brand);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--color-brand-soft);
  font-size: var(--fs-sm);
}

/* ----- Bloc prestation ---------------------------------------------------- */

.guide-step--service .guide-step__body {
  padding: var(--sp-6);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

/* ----- CTA de fin : renvoi vers la page produit --------------------------- */

.guide-cta {
  margin-top: var(--sp-6);
  padding: var(--sp-8) var(--sp-6);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-bg-soft);
  text-align: center;
}

.guide-cta__title {
  margin: 0 0 var(--sp-3);
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-snug);
}

.guide-cta__lead {
  max-width: 46ch;
  margin: 0 auto var(--sp-6);
  color: var(--color-text-soft);
  line-height: var(--lh-base);
}

/* .btn est en white-space:nowrap sur tout le site : sans ça un libellé long
   déborde en mobile. Même correctif que dans .guide-step__body. */
.guide-cta .btn {
  white-space: normal;
}

@media (min-width: 768px) {
  .guide-step {
    gap: var(--sp-6);
  }

  .guide-step__body > h2 {
    font-size: var(--fs-2xl);
  }

  .guide-cta {
    padding: var(--sp-10);
  }

  .guide-cta__title {
    font-size: var(--fs-2xl);
  }
}
