/* Guidance : composants, puis adaptations tablette et téléphone.
   Couleurs et typographie communes : réglages du thème et variables de system.css. */
.wobly-guidance {
  overflow: clip;
  width: 100%;
}

.wobly-guidance .wobly-guide-hero {
  position: relative;
  isolation: isolate;
  padding-inline: 24px;
  padding-bottom: 94px;
  text-align: center;
  background: var(--theme-palette-color-6);
}

.wobly-guidance .wobly-guide-hero::before {
  width: 230px;
  height: 230px;
  border-radius: 47% 53% 64% 36%;
  background: color-mix(in srgb, var(--theme-palette-color-10) 60%, transparent);
  top: 30px;
  left: -90px;
  transform: rotate(-19deg);
}

.wobly-guidance .wobly-guide-hero::after {
  width: 220px;
  height: 220px;
  border-radius: 42% 58% 44% 56%;
  background: color-mix(in srgb, var(--theme-palette-color-8) 20%, transparent);
  top: 60px;
  right: -90px;
  transform: rotate(22deg);
}

.wobly-guidance .wobly-guide-title {
  max-width: 830px;
  margin: 22px auto 18px;
}

.wobly-guidance .wobly-guide-intro {
  font-size: var(--wobly-text-size);
  line-height: var(--wobly-text-line-height);
  max-width: 900px;
  color: var(--theme-palette-color-4);
  margin: 0 auto;
}

.wobly-guidance .wobly-guide-journey {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 44px 20px;
  position: relative;
}

.wobly-guidance .wobly-guide-steps {
  position: relative;
  padding: 3px 0 30px;
}

.wobly-guidance .wobly-guide-step {
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  position: relative;
  isolation: isolate;
  margin: 0;
}

/* Each half ends precisely at its own step center or row edge. Changing text
   height moves both halves with the row; there is no page-height SVG to align. */
.wobly-guidance .wobly-guide-step::before,
.wobly-guidance .wobly-guide-step::after {
  content: "";
  position: absolute;
  width: 88px;
  height: 50%;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  opacity: .85;
  background-color: var(--wobly-line-accent);
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}

.wobly-guidance .wobly-guide-step::before {
  top: 0;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 265' preserveAspectRatio='none'%3E%3Cpath d='M2 0 C2 86 44 179 44 265' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-dasharray='2 11' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}

.wobly-guidance .wobly-guide-step::after {
  bottom: 0;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 265' preserveAspectRatio='none'%3E%3Cpath d='M44 0 C44 86 86 179 86 265' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-dasharray='2 11' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
}

.wobly-guidance .wobly-guide-step:nth-child(even)::before,
.wobly-guidance .wobly-guide-step:nth-child(even)::after {
  transform: translateX(-50%) scaleX(-1);
}

.wobly-guidance .wobly-guide-step:first-child::before {
  top: 25%;
  height: 25%;
}

.wobly-guidance .wobly-guide-step:last-child::after {
  bottom: 25%;
  height: 25%;
}

.wobly-guidance .wobly-step-art {
  grid-column: 3;
  grid-row: 1;
  position: relative;
  isolation: isolate;
  width: 100%;
  margin: 0;
}

.wobly-guidance .wobly-step-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% 4% 5%;
  border-radius: 46% 54% 49% 51%;
  background: linear-gradient(130deg, var(--wobly-soft-green), var(--wobly-soft-peach));
  filter: blur(18px);
  opacity: .55;
}

.wobly-guidance .wobly-step-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: contain;
  display: block;
  border-radius: 22px;
  /* Les fichiers WebP ont un vrai canal alpha : conserver leurs couleurs. */
}

.wobly-guidance .wobly-step-copy {
  grid-column: 1;
  grid-row: 1;
  padding: 16px 10px 20px 0;
  max-width: 510px;
  min-width: 0;
}

.wobly-guidance .wobly-guide-step:nth-child(even) .wobly-step-art {
  grid-column: 1;
}

.wobly-guidance .wobly-guide-step:nth-child(even) .wobly-step-copy {
  grid-column: 3;
  padding-left: 19px;
  padding-right: 4px;
}

/* Repères du chemin : chiffres natifs et forme dessinée uniquement en CSS. */
.wobly-guidance .wobly-step-point {
  --step-rays-scale: 1;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  position: relative;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: var(--theme-palette-color-2);
  box-shadow: 0 0 0 7px var(--theme-palette-color-6);
  color: var(--theme-palette-color-7);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  font-weight: 800;
  font-size: 36px;
  line-height: 1;
  z-index: 2;
  margin: 0;
}
/* Trois traits CSS : une barre centrale et deux dégradés obliques.
   Les transitions de 0,6 px adoucissent les diagonales ; le trait du bas
   est plus court, moins incliné et légèrement décalé pour un tracé fait main. */
.wobly-guidance .wobly-step-point::before {
  content: "";
  position: absolute;
  left: calc(100% + 9px);
  top: calc(50% - 2.5px);
  width: 17px;
  height: 5px;
  border-radius: 999px;
  background: var(--theme-palette-color-2);
  transform: scale(var(--step-rays-scale));
  filter: blur(.15px);
  pointer-events: none;
}
.wobly-guidance .wobly-step-point::after {
  content: "";
  position: absolute;
  left: calc(100% + 5px);
  top: calc(50% - 25px);
  width: 22px;
  height: 50px;
  background:
    linear-gradient(-30deg, transparent calc(50% - 2.8px), var(--theme-palette-color-2) calc(50% - 2.2px) calc(50% + 2.2px), transparent calc(50% + 2.8px)) left top / 22px 14px no-repeat,
    linear-gradient(23deg, transparent calc(50% - 2.6px), var(--theme-palette-color-2) calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2.6px)) 2px calc(100% - 3px) / 19px 12px no-repeat;
  transform: scale(var(--step-rays-scale));
  filter: blur(.15px);
  pointer-events: none;
}
/* Étapes impaires : texte à gauche. Étapes paires : texte à droite. */
.wobly-guidance .wobly-guide-step:nth-child(odd) .wobly-step-point::before {
  left: auto;
  right: calc(100% + 9px);
}
.wobly-guidance .wobly-guide-step:nth-child(odd) .wobly-step-point::after {
  left: auto;
  right: calc(100% + 5px);
  transform: scaleX(-1) scale(var(--step-rays-scale));
}

.wobly-guidance .wobly-step-eyebrow {
  font-weight: 700;
  color: color-mix(in srgb, var(--theme-palette-color-8) 80%, var(--theme-palette-color-3));
  letter-spacing: .13em;
  text-transform: uppercase;
  font-size: var(--wobly-text-label);
  line-height: var(--wobly-text-line-height);
  margin: 0 0 17px;
}

.wobly-guidance .wobly-step-title {
  margin: 0 0 18px;
  max-width: 440px;
}

.wobly-guidance .wobly-step-desc {
  font-size: var(--wobly-text-size);
  line-height: var(--wobly-text-line-height);
  color: var(--theme-palette-color-4);
  margin: 0;
  max-width: 440px;
}

.wobly-guidance .wobly-step-desc+.wobly-step-desc {
  margin-top: 14px;
}

.wobly-guidance ul.wobly-step-desc {
  padding-inline-start: 1.3em;
}

.wobly-guidance .wobly-step-desc li+li {
  margin-top: 10px;
}

.wobly-guidance .wobly-step-desc a {
  color: var(--theme-palette-color-1);
  text-decoration: underline;
  text-underline-offset: .16em;
}

.wobly-guidance .wobly-step-desc strong {
  color: var(--theme-palette-color-1);
}

.wobly-guidance .wobly-step-desc em {
  font-style: italic;
  color: var(--theme-palette-color-1);
}

.wobly-guidance .wobly-step-foot {
  margin-top: 23px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--theme-palette-color-4);
  font-size: var(--wobly-text-caption);
  line-height: var(--wobly-text-line-height);
  font-weight: 700;
}

.wobly-guidance .wobly-step-foot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--theme-palette-color-2);
  flex-shrink: 0;
}

.wobly-guidance .wobly-guide-step:nth-child(even) .wobly-step-foot::before {
  background: var(--theme-palette-color-8);
}

.wobly-guidance .wobly-guide-lower {
  padding: 55px 24px 90px;
}

/* Signature de bas de page, séparée de la carte « The Wobly Way ». */
.wobly-guidance .wobly-guide-signature {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 6px 8px;
  width: 100%;
  padding: 22px 24px;
  border-top: 1px solid var(--theme-palette-color-5);
  background: var(--theme-palette-color-6);
  text-align: center;
}
.wobly-guidance .wobly-guide-signature p {
  flex: 0 1 auto;
  width: auto;
  max-width: 100%;
  margin: 0;
  color: var(--theme-palette-color-4);
  font-size: var(--wobly-text-caption);
  font-weight: 400;
  line-height: var(--wobly-text-line-height);
  letter-spacing: .025em;
}
.wobly-guidance .wobly-guide-signature .wobly-guide-signature-brand {
  color: var(--theme-palette-color-1);
  white-space: nowrap;
}
.wobly-guidance .wobly-guide-signature-brand::before {
  content: "·";
  margin-right: 8px;
  color: var(--theme-palette-color-4);
}
.wobly-guidance .wobly-guide-signature-brand strong {
  font-weight: 700;
}

.wobly-guidance .wobly-guide-endcap {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  padding: 58px 30px 62px;
  border: 1px solid var(--theme-palette-color-5);
  border-radius: 38px;
  background: linear-gradient(122deg, var(--wobly-soft-peach), var(--wobly-soft-peach) 65%, var(--wobly-soft-green));
  position: relative;
  overflow: hidden;
}

.wobly-guidance .wobly-guide-endcap::before {
  content: "✳︎";
  font-size: 130px;
  color: color-mix(in srgb, var(--theme-palette-color-8) 17%, transparent);
  position: absolute;
  left: -22px;
  top: -30px;
  pointer-events: none;
}

.wobly-guidance .wobly-guide-kicker {
  font-size: var(--wobly-text-label);
  line-height: var(--wobly-text-line-height);
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--theme-palette-color-9);
  font-weight: 700;
}

.wobly-guidance .wobly-guide-endtitle {
  margin: 14px 0 13px;
}

.wobly-guidance .wobly-guide-endtext {
  font-size: var(--wobly-text-size);
  color: var(--theme-palette-color-4);
  line-height: var(--wobly-text-line-height);
  margin: 0 auto;
  max-width: 800px;
}

.wobly-guidance .wobly-guide-endtext+.wobly-guide-endtext {
  margin-top: 18px;
}

@media (min-width: 1280px) {
  .wobly-guidance .wobly-guide-step {
    min-height: 530px;
  }
}

@media (max-width: 900px) {
  .wobly-guidance .wobly-step-point {
    --step-rays-scale: .75;
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  .wobly-guidance .wobly-guide-hero {
    padding-bottom: 68px;
  }

  .wobly-guidance .wobly-guide-journey {
    padding: 0 24px;
  }

  .wobly-guidance .wobly-guide-step {
    min-height: 390px;
    /* Garder les traits à distance du texte avec les bulles de 44 px. */
    grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
    gap: 8px;
  }

  .wobly-guidance .wobly-guide-step:nth-child(even) .wobly-step-copy {
    padding-left: 4px;
  }

  .wobly-guidance .wobly-guide-step::before,
  .wobly-guidance .wobly-guide-step::after {
    width: 60px;
  }
}

@media (max-width: 690px) {
  .wobly-guidance .wobly-guide-hero {
    padding-inline: 22px;
    padding-bottom: 64px;
  }

  .wobly-guidance .wobly-guide-title {
    max-width: 420px;
    margin: 22px auto 16px;
  }

  .wobly-guidance .wobly-guide-intro {
    max-width: 450px;
  }

  .wobly-guidance .wobly-guide-journey {
    padding: 0 16px 24px;
  }

  .wobly-guidance .wobly-guide-steps {
    padding: 4px 0;
  }

  .wobly-guidance .wobly-guide-step {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 0;
    gap: 0;
    padding: 16px 0 36px 21px;
    margin: 0 0 0 9px;
    border-left: 2px dashed var(--wobly-line-accent);
  }

  .wobly-guidance .wobly-guide-step::before,
  .wobly-guidance .wobly-guide-step::after {
    display: none;
  }

  .wobly-guidance .wobly-guide-step:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
  }

  /* La bulle partage la première ligne de grille avec l'image : son centre
     suit automatiquement celui de l'illustration, quelle que soit sa hauteur. */
  .wobly-guidance .wobly-step-point {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    left: -40px;
    width: 36px;
    height: 36px;
    box-shadow: 0 0 0 4px var(--theme-palette-color-6);
    font-size: 22px;
  }
  .wobly-guidance .wobly-step-point::before,
  .wobly-guidance .wobly-step-point::after {
    display: none;
  }

  .wobly-guidance .wobly-step-art {
    grid-column: 1;
    grid-row: 1;
    max-width: 460px;
    margin: 0 auto;
  }

  .wobly-guidance .wobly-step-art img {
    border-radius: 21px;
  }

  .wobly-guidance .wobly-step-copy,
  .wobly-guidance .wobly-guide-step:nth-child(even) .wobly-step-copy {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    max-width: 450px;
    padding: 3px 5px 0 12px;
    margin: 0 auto;
  }

  .wobly-guidance .wobly-step-eyebrow {
    letter-spacing: .12em;
    margin: 0 0 10px;
  }

  .wobly-guidance .wobly-step-title {
    max-width: 390px;
    margin: 0 0 11px;
  }

  .wobly-guidance .wobly-step-desc {
    max-width: 390px;
  }

  .wobly-guidance .wobly-step-foot {
    margin-top: 13px;
  }

  .wobly-guidance .wobly-guide-lower {
    padding: 26px 16px 42px;
  }

  .wobly-guidance .wobly-guide-endcap {
    border-radius: 28px;
    padding: 36px 22px 41px;
  }

  .wobly-guidance .wobly-guide-signature {
    flex-direction: column;
    align-items: center;
    padding: 20px 18px;
  }

  .wobly-guidance .wobly-guide-signature-brand::before {
    content: none;
  }
}
