.how-launcher {
  position: fixed;
  z-index: 249;
  right: 24px;
  bottom: 24px;
  left: auto;
  display: grid;
  width: 60px;
  height: 60px;
  min-height: 60px;
  padding: 0;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--saffron);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.how-launcher:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.how-launcher svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.how-launcher span {
  display: none;
}
body .support-launcher {
  right: 24px;
  bottom: 98px;
}
body .support-panel {
  right: 24px;
  bottom: 172px;
}
.how-overlay {
  position: fixed;
  z-index: 190;
  inset: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 18px;
  overscroll-behavior: none;
  background: linear-gradient(135deg, rgb(255 253 247 / 74%), rgb(248 246 240 / 66%));
  -webkit-backdrop-filter: blur(14px) saturate(0.92);
  backdrop-filter: blur(14px) saturate(0.92);
  animation: how-overlay-in 0.28s ease-out both;
}
.how-overlay[hidden] {
  display: none;
}
@media (max-width: 980px) {
  .how-overlay {
    right: 0;
    bottom: auto;
    left: 0;
    height: 100vh;
    height: 100lvh;
    height: max(100dvh, 100lvh);
    height: var(--how-overlay-height, 100lvh);
    min-height: 0;
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
}
.how-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: 25px;
  border: 2px solid var(--ink);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% 5%, rgb(245 178 26 / 13%), transparent 24%),
    linear-gradient(145deg, #fffdf7 0%, #fbf7ec 100%);
  box-shadow:
    8px 8px 0 var(--ink),
    0 28px 90px rgb(23 19 16 / 28%);
  outline: 0;
  animation: how-dialog-in 0.45s var(--ease) both;
}
.how-close {
  position: absolute;
  z-index: 2;
  right: 14px;
  top: 13px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font: 500 1.45rem/1 var(--body);
  cursor: pointer;
}
.how-progress {
  height: 5px;
  margin: 0 48px 20px 0;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ink-07);
}
.how-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--saffron-hot);
  transition: width 0.65s var(--ease);
}
.how-kicker {
  margin: 0 0 7px;
  color: var(--saffron-hot);
  font: 700 0.68rem var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.how-step-label {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 9px;
  border: 1px solid var(--ink-14);
  border-radius: 999px;
  background: rgb(255 255 255 / 70%);
  color: var(--cedar);
  font: 700 0.65rem var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.how-content {
  min-height: 390px;
}
.how-slide {
  animation: how-fade 0.72s var(--ease) both;
}
/* Le passage d'une étape glisse dans le sens de la navigation : avancer
   fait entrer par la droite, reculer par la gauche. */
.how-slide--avant {
  animation-name: how-step-avant;
  animation-duration: 0.45s;
}
.how-slide--retour {
  animation-name: how-step-retour;
  animation-duration: 0.45s;
}
.how-slide h2 {
  max-width: 15ch;
  font-size: clamp(2rem, 5vw, 3.45rem);
}
.how-lead {
  max-width: 60ch;
  margin: 13px 0 20px;
  color: var(--ink-70);
  font-size: 1rem;
}
.how-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}
.how-choice {
  position: relative;
  min-height: 230px;
  padding: 20px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: linear-gradient(145deg, rgb(255 255 255 / 96%), rgb(255 250 235 / 96%));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    5px 5px 0 var(--ink-14),
    0 14px 35px rgb(23 19 16 / 7%);
  transition:
    transform 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}
.how-choice:hover,
.how-choice:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 var(--ink);
}
.how-choice strong {
  display: block;
  margin-top: 12px;
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.05;
}
.how-choice span {
  display: block;
  margin-top: 8px;
  color: var(--ink-70);
  font-size: 0.9rem;
  line-height: 1.45;
}
.how-choice .how-illustration {
  width: 100%;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 10px 13px rgb(23 19 16 / 10%));
  animation: how-card-float 6s ease-in-out infinite;
}
.how-choice:nth-child(2) .how-illustration {
  animation-delay: -3s;
}
.how-scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.75fr);
  gap: 24px;
  align-items: center;
  min-height: 330px;
}
.how-copy h2 {
  font-size: clamp(2rem, 5vw, 3.35rem);
}
.how-copy p {
  max-width: 42ch;
  margin-top: 15px;
  color: var(--ink-70);
  font-size: 1.02rem;
}
.how-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  padding: 11px 13px;
  border: 1px solid var(--ink-14);
  border-radius: 12px;
  background: var(--white);
  font-size: 0.84rem;
  color: var(--ink-70);
}
.how-note svg {
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  fill: var(--saffron);
  stroke: var(--ink);
  stroke-width: 1.8;
}
.how-visual {
  position: relative;
  display: grid;
  min-height: 270px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background:
    radial-gradient(circle at 72% 18%, rgb(245 178 26 / 31%), transparent 23%),
    linear-gradient(145deg, #fffdf7 0%, #f8eed5 100%);
  box-shadow:
    6px 6px 0 var(--ink-14),
    0 18px 40px rgb(23 19 16 / 10%);
  overflow: hidden;
}
.how-visual::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(23 19 16 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(23 19 16 / 4%) 1px, transparent 1px);
  background-size: 24px 24px;
  content: '';
  mask-image: linear-gradient(to bottom right, black, transparent 70%);
}
.how-visual::after {
  position: absolute;
  right: -38px;
  bottom: -46px;
  width: 130px;
  height: 130px;
  border: 22px solid rgb(39 102 80 / 9%);
  border-radius: 50%;
  content: '';
}
.how-visual-route,
.how-visual-caption {
  position: absolute;
  z-index: 2;
  font-family: var(--mono);
}
.how-visual-route {
  top: 14px;
  left: 15px;
  padding: 5px 8px;
  border: 1px solid var(--ink-14);
  border-radius: 999px;
  background: rgb(255 255 255 / 80%);
  font-size: 0.62rem;
  font-weight: 700;
  backdrop-filter: blur(5px);
}
.how-visual-route i {
  color: var(--saffron-hot);
  font-style: normal;
}
.how-visual-caption {
  right: 14px;
  bottom: 12px;
  color: var(--ink-40);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
}
.how-visual .how-illustration {
  position: relative;
  z-index: 1;
  width: 86%;
  height: 230px;
  object-fit: contain;
  filter: drop-shadow(0 13px 18px rgb(23 19 16 / 12%));
  animation:
    how-illustration-in 0.8s var(--ease) both,
    how-card-float 6s ease-in-out 0.9s infinite;
}
.how-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--ink-14);
}
.how-actions[hidden] {
  display: none;
}
.how-button {
  min-height: 46px;
  padding: 0.65rem 1.15rem;
  border: 2px solid var(--ink);
  border-radius: 12px;
  color: var(--ink);
  font: 700 0.9rem var(--body);
  cursor: pointer;
}
.how-button--quiet {
  justify-self: start;
  background: var(--white);
}
.how-button--next {
  justify-self: end;
  background: var(--saffron);
  box-shadow: 3px 3px 0 var(--ink);
}
.how-counter {
  color: var(--ink-40);
  font: 700 0.72rem var(--mono);
}
body.how-open {
  overflow: hidden;
}
body.how-open .how-launcher,
body.how-open .support-launcher,
body.how-open .support-panel {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
@keyframes how-fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes how-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes how-dialog-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes how-step-avant {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes how-step-retour {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes how-illustration-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes how-card-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}
@keyframes how-pulse {
  0%,
  100% {
    transform: scale(0.92);
  }
  50% {
    transform: scale(1.08);
  }
}
@media (max-width: 640px) {
  .how-launcher {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
    min-height: 54px;
  }
  .how-launcher svg {
    width: 27px;
    height: 27px;
  }
  body .support-launcher {
    right: 16px;
    bottom: 82px;
    width: 54px;
    height: 54px;
  }
  body .support-launcher svg {
    width: 27px;
    height: 27px;
  }
  body .support-panel {
    right: 16px;
    bottom: 148px;
  }
  .how-overlay {
    align-items: center;
    min-height: 100svh;
    min-height: 100dvh;
    padding: 9px;
    padding-bottom: max(9px, env(safe-area-inset-bottom));
  }
  .how-dialog {
    max-height: calc(var(--how-overlay-height, 100dvh) - 18px);
    padding: 18px 15px;
    border-radius: 17px;
    box-shadow: 5px 5px 0 var(--ink);
  }
  .how-content {
    min-height: 0;
  }
  .how-choices {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .how-choice {
    display: grid;
    grid-template-columns: 110px 1fr;
    align-items: center;
    min-height: 138px;
    padding: 13px;
  }
  .how-choice .how-illustration {
    height: 78px;
    grid-row: 1/3;
  }
  .how-choice strong,
  .how-choice span {
    margin-top: 0;
  }
  .how-scene {
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 0;
  }
  .how-visual {
    min-height: 190px;
    order: -1;
  }
  .how-visual .how-illustration {
    width: 80%;
    height: 168px;
  }
  .how-copy h2,
  .how-slide h2 {
    font-size: clamp(1.75rem, 9vw, 2.45rem);
  }
  .how-copy p {
    font-size: 0.92rem;
  }
  .how-note {
    margin-top: 12px;
  }
  .how-actions {
    margin-top: 14px;
  }
  .how-button {
    padding: 0.55rem 0.75rem;
    font-size: 0.8rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .how-progress span,
  .how-launcher {
    transition: none;
  }
  .how-overlay,
  .how-dialog,
  .how-slide,
  .how-visual .how-illustration,
  .how-choice .how-illustration {
    animation: none;
  }
}
