/**
 * Composant  : Stepper
 * Description : Parcours en étapes (onglets numérotés, barre de progression, panneau de contenu)
 * Auteur      : Équipe Marketing
 * URL         : linkavie.com
 * Thème       : Linkavie terra
 * Tags        : stepper, étapes, onglets, méthodologie, processus
 * Version     : 1.0
 */

/* ─────────────────────────────────────────
   lk-stepper — BLOCK
   ───────────────────────────────────────── */
.lk-stepper {
  --lk-stepper-progress: 0%;
}

/* ─────────────────────────────────────────
   lk-stepper — ELEMENTS
   ───────────────────────────────────────── */
.lk-stepper__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 48px;
}

.lk-stepper__header .lk-section__title {
  max-width: 640px;
  margin-bottom: 0;
}

.lk-stepper__header .lk-section__title em {
  color: var(--lk-color-terra-text);
}

.lk-stepper__counter {
  font-size: 14px;
  color: var(--lk-color-text-lo);
}

.lk-stepper__counter-num {
  font-size: 28px;
  font-weight: var(--lk-font-weight-bold);
  color: var(--lk-color-terra-text);
}

/* Mobile : la barre d'étapes est masquée, on navigue avec les boutons précédent / suivant */
.lk-stepper__scroll {
  display: none;
  overflow-x: auto;
  padding: 14px 0 8px;
}

.lk-stepper__nav {
  position: relative;
  display: flex;
  min-width: 720px;
}

.lk-stepper__track {
  position: absolute;
  top: 21px;
  left: calc(100% / 12);
  right: calc(100% / 12);
  height: 2px;
  border-radius: 2px;
  background: var(--lk-color-terra-lo);
}

.lk-stepper__fill {
  width: var(--lk-stepper-progress);
  height: 100%;
  border-radius: 2px;
  background: var(--lk-color-terra);
  transition: width 0.45s ease;
}

.lk-stepper__step {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 120px;
  padding: 0 8px 8px;
  border: 0;
  background: transparent;
  color: var(--lk-color-text-lo);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.lk-stepper__step:focus-visible {
  outline: 2px solid var(--lk-color-terra);
  outline-offset: 3px;
}

.lk-stepper__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--lk-border-radius-full);
  background: var(--lk-color-terra-lo);
  color: var(--lk-color-text-hi);
  font-size: 14px;
  font-weight: var(--lk-font-weight-bold);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.lk-stepper__label {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: var(--lk-font-weight-medium);
  line-height: 1.3;
}

.lk-stepper__panel {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-height: 340px;
  margin-top: 40px;
  padding: clamp(28px, 4vw, 56px);
  border: 1px solid var(--lk-color-border);
  border-radius: var(--lk-border-radius-lg);
  background: var(--lk-color-card-bg);
}

.lk-stepper__pane[hidden] {
  display: none;
}

.lk-stepper__pane-body {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  animation: lk-stepper-fondu 0.45s ease both;
}

.lk-stepper__intro {
  display: flex;
  flex: 1 1 100%;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.lk-stepper__eyebrow {
  font-size: 13px;
  font-weight: var(--lk-font-weight-bold);
  color: var(--lk-color-terra-text);
}

.lk-stepper__title {
  font-size: clamp(24px, 6vw, 32px);
  font-weight: var(--lk-font-weight-semibold);
  line-height: 1.15;
  color: var(--lk-color-text-hi);
  overflow-wrap: break-word;
}

.lk-stepper__subtitle {
  font-size: 18px;
  color: var(--lk-color-text-lo);
}

.lk-stepper__details {
  display: flex;
  flex: 1 1 100%;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.lk-stepper__details-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lk-color-text-lo);
}

.lk-stepper__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lk-stepper__chip {
  padding: 6px 14px;
  border-radius: var(--lk-border-radius-full);
  background: var(--lk-color-terra-lo);
  color: var(--lk-color-text-hi);
  font-size: 13px;
}

.lk-stepper__bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--lk-color-text-lo);
}

.lk-stepper__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.lk-stepper__controls .lk-btn {
  cursor: pointer;
}

/* Mobile : boutons réduits à une flèche (le nom accessible vient de aria-label) */
.lk-stepper__controls .lk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 52px;
  min-height: 48px;
}

.lk-stepper__arrow {
  font-size: 20px;
  line-height: 1;
}

.lk-stepper__btn-text {
  display: none;
}

.lk-stepper__controls .lk-btn[hidden] {
  display: none;
}

/* « Étape suivante » reste à droite même quand « Étape précédente » est masqué */
.lk-stepper__controls .lk-btn:last-child {
  margin-left: auto;
}

/* ─────────────────────────────────────────
   lk-stepper — MODIFIERS
   ───────────────────────────────────────── */
.lk-stepper__step--done .lk-stepper__dot,
.lk-stepper__step--active .lk-stepper__dot {
  background: var(--lk-color-terra);
  color: var(--lk-color-white);
}

.lk-stepper__step--active {
  color: var(--lk-color-text-hi);
}

.lk-stepper__step--active .lk-stepper__label {
  font-weight: var(--lk-font-weight-bold);
}

.lk-stepper__step--active .lk-stepper__dot {
  box-shadow: 0 0 0 6px var(--lk-color-terra-mid);
}

@keyframes lk-stepper-fondu {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ─────────────────────────────────────────
   RESPONSIVE — mobile-first
   ───────────────────────────────────────── */
@media (min-width: 769px) {
  .lk-stepper__scroll {
    display: block;
  }

  .lk-stepper__intro {
    flex-basis: 360px;
  }

  .lk-stepper__details {
    flex-basis: 420px;
  }

  .lk-stepper__btn-text {
    display: inline;
  }

  .lk-stepper__arrow {
    font-size: inherit;
  }
}

/* ─────────────────────────────────────────
   ACCESSIBILITÉ — mouvement réduit
   ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .lk-stepper__fill,
  .lk-stepper__dot {
    transition: none;
  }

  .lk-stepper__pane-body {
    animation: none;
  }
}
