/* ============================================================================
   DealUp — onboarding.css
   Le parcours d'arrivée : plein écran, sombre, une décision par écran.

   Le parcours est autonome : il ne dépend pas des tokens clairs de
   style.css. Sur téléphone il occupe tout l'écran (9:16) ; sur grand écran il
   reste une colonne étroite centrée, comme une application posée sur la page.
   ========================================================================== */

:root {
  --ob-bg: #0a0a0a;
  --ob-surface: #111111;
  --ob-surface-2: #181818;
  --ob-line: rgba(255, 255, 255, .08);
  --ob-line-strong: rgba(255, 255, 255, .16);
  --ob-fg: #f5f5f7;
  --ob-fg-2: #a3a3ab;
  --ob-fg-3: #6f6f78;
  --ob-accent: #e7c08a;
  --ob-radius: 20px;
  --ob-ease: cubic-bezier(.22, .68, .32, 1);
  --ob-spring: cubic-bezier(.34, 1.4, .64, 1);
}

/* ---------- Mode immersif : l'application s'efface ---------- */
body.is-immersive { background: var(--ob-bg); color: var(--ob-fg); }
body.is-immersive .app-header,
body.is-immersive .app-footer,
body.is-immersive .bottom-nav { display: none !important; }
body.is-immersive .app-main { padding: 0; max-width: none; min-height: 100dvh; }
body.is-immersive .skip-link:focus { background: var(--ob-fg); color: var(--ob-bg); }

/* ---------- Colonne ---------- */
.ob {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 100dvh;
  width: 100%; max-width: 520px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 22px calc(18px + env(safe-area-inset-bottom, 0px));
  color: var(--ob-fg);
  animation: ob-in .38s var(--ob-ease) both;
}
@keyframes ob-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ob.is-leaving { animation: ob-out .18s var(--ob-ease) both; }
@keyframes ob-out { to { opacity: 0; transform: translateY(-8px); } }

@media (min-width: 900px) {
  body.is-immersive .app-main { display: grid; place-items: center; padding: 32px 0; }
  .ob {
    min-height: min(860px, calc(100dvh - 64px)); max-width: 460px;
    padding: 22px 26px 24px; border-radius: 36px;
    background: var(--ob-surface); border: 1px solid var(--ob-line);
    box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  }
}

/* ---------- Barre haute ---------- */
.ob-top { display: flex; align-items: center; gap: 16px; min-height: 44px; }
.ob-back {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ob-surface-2); color: var(--ob-fg); border: 1px solid var(--ob-line);
  cursor: pointer; transition: transform .16s var(--ob-ease), background .16s var(--ob-ease);
}
.ob-back .icon { width: 20px; height: 20px; }
.ob-back:hover { background: #202020; }
.ob-back:active { transform: scale(.94); }
.ob-back--ghost { visibility: hidden; }
.ob-progress { flex: 1; height: 3px; border-radius: 999px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.ob-progress__bar {
  display: block; height: 100%; width: var(--p, 0%); border-radius: inherit;
  background: var(--ob-fg); transition: width .5s var(--ob-ease);
}

/* ---------- Titres ---------- */
.ob-body { flex: 1; display: flex; flex-direction: column; gap: 22px; padding-top: 26px; }
.ob-head { display: flex; flex-direction: column; gap: 10px; }
.ob-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ob-fg-2);
}
.ob-title {
  margin: 0; font-size: clamp(1.85rem, 7.4vw, 2.3rem); line-height: 1.08; font-weight: 800;
  letter-spacing: -.025em; color: var(--ob-fg); text-wrap: balance; outline: none;
}
.ob-title--hero { font-size: clamp(2.2rem, 9.4vw, 2.9rem); }
.ob-title em { font-style: normal; color: var(--ob-fg-2); }
.ob-hint { margin: 0; color: var(--ob-fg-2); font-size: .98rem; line-height: 1.45; max-width: 36ch; }
.ob-lead { margin: 0; color: var(--ob-fg-2); font-size: 1.04rem; line-height: 1.5; }
.ob-subhead { margin: 6px 0 0; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ob-fg-3); }
.ob-note { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .78rem; color: var(--ob-fg-3); flex-wrap: wrap; }
.ob-note__link { color: var(--ob-fg-2); text-decoration: underline; text-underline-offset: 3px; }
.ob-note__link:hover { color: var(--ob-fg); }

/* ---------- Pied et boutons ---------- */
.ob-foot {
  position: sticky; bottom: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 16px 0 0; margin-top: 12px;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0) 0%, var(--ob-bg) 32%);
}
@media (min-width: 900px) { .ob-foot { background: linear-gradient(180deg, rgba(17, 17, 17, 0) 0%, var(--ob-surface) 32%); } }
.ob-cta {
  width: 100%; min-height: 58px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--ob-fg); color: var(--ob-bg);
  font: inherit; font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .18s var(--ob-spring), background .2s var(--ob-ease), color .2s var(--ob-ease), opacity .2s var(--ob-ease);
}
.ob-cta:hover { background: #fff; }
.ob-cta:active { transform: scale(.98); }
.ob-cta:disabled { background: rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .38); cursor: default; }
.ob-cta:focus-visible, .ob-choice:focus-visible, .ob-chip:focus-visible, .ob-back:focus-visible, .ob-link:focus-visible {
  outline: 2px solid var(--ob-fg); outline-offset: 3px;
}
.ob-link {
  background: none; border: 0; padding: 10px 14px; border-radius: 999px;
  color: var(--ob-fg-2); font: inherit; font-size: .95rem; font-weight: 600; cursor: pointer;
}
.ob-link:hover { color: var(--ob-fg); }
.btn--google.ob-google {
  width: 100%; min-height: 54px; border-radius: 999px; justify-content: center;
  --btn-bg: var(--ob-surface-2); background: var(--ob-surface-2); color: var(--ob-fg); border: 1px solid var(--ob-line-strong);
}
.btn--google.ob-google:hover { background: #202020; border-color: rgba(255, 255, 255, .28); box-shadow: none; }

/* ---------- Cartes de réponse ---------- */
.ob-choices { display: flex; flex-direction: column; gap: 10px; }
.ob-choice {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  width: 100%; min-height: 66px; padding: 14px 16px; text-align: left;
  border-radius: var(--ob-radius); border: 1.5px solid var(--ob-line);
  background: var(--ob-surface); color: var(--ob-fg);
  font: inherit; cursor: pointer;
  animation: ob-rise .42s var(--ob-ease) both; animation-delay: calc(var(--i, 0) * 45ms);
  transition: border-color .18s var(--ob-ease), background .18s var(--ob-ease), transform .18s var(--ob-spring);
}
@keyframes ob-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ob-choice:hover { border-color: var(--ob-line-strong); background: #141414; }
.ob-choice:active { transform: scale(.985); }
.ob-choice.is-on { border-color: var(--ob-fg); background: var(--ob-surface-2); }
.ob-choice__badge {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .06); font-size: 1.25rem; color: var(--ob-fg);
}
.ob-choice__badge .icon { width: 20px; height: 20px; }
.ob-choice__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ob-choice__label { font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.ob-choice__sub { font-size: .82rem; color: var(--ob-fg-2); line-height: 1.3; }
.ob-choice__mark {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ob-line-strong);
  display: grid; place-items: center; color: var(--ob-bg);
  transition: background .18s var(--ob-ease), border-color .18s var(--ob-ease), transform .22s var(--ob-spring);
}
.ob-choice__mark .icon { width: 13px; height: 13px; stroke-width: 3; opacity: 0; transition: opacity .15s var(--ob-ease); }
.ob-choice.is-on .ob-choice__mark { background: var(--ob-fg); border-color: var(--ob-fg); transform: scale(1.06); }
.ob-choice.is-on .ob-choice__mark .icon { opacity: 1; }
.ob-choice[role="radio"] .ob-choice__mark::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ob-bg);
  transform: scale(0); transition: transform .2s var(--ob-spring);
}
.ob-choice[role="radio"].is-on .ob-choice__mark::after { transform: scale(1); }

/* Objectifs : cartes plus hautes, montant en avant, une seule touche de chaleur */
.ob-choices--goal .ob-choice { grid-template-columns: minmax(0, 1fr) auto; padding: 18px 18px; min-height: 74px; }
.ob-choices--goal .ob-choice__label { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.ob-choices--goal .ob-choice__sub { font-size: .84rem; }
.ob-choices--goal .ob-choice.is-on .ob-choice__label { color: var(--ob-accent); }
.ob-choices--goal .ob-choice:nth-last-child(-n+2) .ob-choice__sub { color: var(--ob-accent); opacity: .9; }

/* ---------- Chips (marques, tailles, prix) ---------- */
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-chips--center { justify-content: center; }
.ob-chips--selected:empty { display: none; }
.ob-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--ob-line); background: var(--ob-surface); color: var(--ob-fg);
  font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
  animation: ob-rise .36s var(--ob-ease) both; animation-delay: calc(var(--i, 0) * 22ms);
  transition: border-color .16s var(--ob-ease), background .16s var(--ob-ease), transform .16s var(--ob-spring), color .16s var(--ob-ease);
}
.ob-chip:hover { border-color: var(--ob-line-strong); }
.ob-chip:active { transform: scale(.95); }
.ob-chip.is-on { background: var(--ob-fg); color: var(--ob-bg); border-color: var(--ob-fg); }
.ob-chip .icon--xs { width: 12px; height: 12px; }
.no-anim .ob-chip { animation: none; }
.ob-chip--size { min-width: 52px; justify-content: center; }
.ob-sizes { display: flex; flex-direction: column; gap: 16px; }
.ob-sizes__group { display: flex; flex-direction: column; gap: 8px; }

.ob-brands { display: flex; flex-direction: column; gap: 14px; }
.ob-brands__add { display: flex; gap: 8px; }
.ob-input {
  flex: 1; min-height: 50px; padding: 0 16px; border-radius: 16px;
  border: 1.5px solid var(--ob-line); background: var(--ob-surface); color: var(--ob-fg);
  font: inherit; font-size: 1rem;
}
.ob-input::placeholder { color: var(--ob-fg-3); }
.ob-input:focus { outline: none; border-color: var(--ob-fg); }
.ob-input--lg { min-height: 58px; font-size: 1.15rem; font-weight: 600; }
.ob-add {
  flex: none; width: 50px; height: 50px; border-radius: 16px; border: 0;
  background: var(--ob-fg); color: var(--ob-bg); display: grid; place-items: center; cursor: pointer;
  transition: transform .16s var(--ob-spring);
}
.ob-add:active { transform: scale(.94); }
.ob-add .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.ob-text { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Prix ---------- */
.ob-price { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 10px; }
.ob-price__field { display: inline-flex; align-items: baseline; gap: 8px; cursor: text; }
.ob-price__input {
  width: min(60vw, 240px); border: 0; border-bottom: 2px solid var(--ob-line-strong); background: none;
  color: var(--ob-fg); font: inherit; font-size: clamp(3rem, 16vw, 4.4rem); font-weight: 800; letter-spacing: -.04em;
  text-align: right; padding: 0 4px 6px; -moz-appearance: textfield;
}
.ob-price__input::-webkit-outer-spin-button, .ob-price__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ob-price__input::placeholder { color: var(--ob-fg-3); }
.ob-price__input:focus { outline: none; border-bottom-color: var(--ob-fg); }
.ob-price__unit { font-size: 2rem; font-weight: 700; color: var(--ob-fg-2); }

/* ---------- Visuels ---------- */
.ob-visual {
  position: relative; margin: 0; overflow: hidden; border-radius: 24px;
  background: #101318; border: 1px solid var(--ob-line);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9);
}
.ob-visual--wide { aspect-ratio: 16 / 9; }
.ob-visual--tall { aspect-ratio: 4 / 5; }
.ob-visual--portrait { aspect-ratio: 5 / 6; }
.ob-visual--portrait.is-missing { aspect-ratio: 16 / 10; }
.ob-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ob-visual__fallback {
  display: none; place-items: center; position: absolute; inset: 0; color: rgba(255, 255, 255, .28);
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, 0) 60%);
}
.ob-visual.is-missing .ob-visual__fallback { display: grid; }
.ob-visual::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), inset 0 -60px 60px -40px rgba(10, 10, 10, .7);
}
.ob-info__mark {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ob-surface); border: 1px solid var(--ob-line); color: var(--ob-fg);
}
.ob-info__mark .icon--lg { width: 30px; height: 30px; }

/* ---------- Compte (Google uniquement) ---------- */
.ob-account { display: flex; flex-direction: column; gap: 22px; }
.ob-account__entry { display: flex; flex-direction: column; gap: 12px; }
.ob-account__note { margin: 0; text-align: center; font-size: .88rem; color: var(--ob-fg-2); line-height: 1.5; }
.ob-foot--quiet { padding-top: 6px; }
.ob-info { display: flex; flex-direction: column; gap: 20px; }
.ob-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ob-points li {
  display: flex; gap: 12px; align-items: flex-start; font-size: .98rem; line-height: 1.45; color: var(--ob-fg);
  animation: ob-rise .4s var(--ob-ease) both; animation-delay: calc(140ms + var(--i, 0) * 90ms);
}
.ob-points__dot {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: var(--ob-fg);
}
.ob-points__dot .icon { width: 13px; height: 13px; stroke-width: 3; }

/* ---------- Arrivée ---------- */
.ob--arrival { gap: 22px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.ob-arrival__visual { margin: 0 -6px; }
.ob-visual--portrait img { object-position: 50% 42%; }
.ob-arrival__body { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.ob-arrival__actions { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 8px; }
.ob-arrival__actions .ob-cta { animation: ob-rise .4s var(--ob-ease) both; animation-delay: 160ms; }
@media (max-height: 760px) { .ob-visual--portrait { aspect-ratio: 16 / 11; } }
@media (min-width: 900px) { .ob-arrival__visual { margin: 0; } }

/* ---------- Projection ---------- */
.ob-projection { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-top: 8px; }
.ob-projection__amount {
  margin: 0; font-size: clamp(3.2rem, 17vw, 4.8rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; color: var(--ob-fg);
  animation: ob-pop .6s var(--ob-spring) both;
}
@keyframes ob-pop { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
.ob-projection__period { margin: 0; color: var(--ob-fg-2); font-size: 1rem; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.ob-projection__tag { padding: 4px 10px; border-radius: 999px; background: rgba(231, 192, 138, .14); color: var(--ob-accent); font-size: .78rem; font-weight: 700; }
.ob-curve { width: 100%; max-width: 340px; height: auto; margin-top: 18px; }
.ob-curve__line { stroke-dasharray: 420; stroke-dashoffset: 420; animation: ob-draw 1.3s var(--ob-ease) .2s forwards; }
@keyframes ob-draw { to { stroke-dashoffset: 0; } }
.ob-curve__dot--end { opacity: 0; animation: ob-pop .4s var(--ob-spring) 1.3s forwards; }
.ob-projection__axis { width: 100%; max-width: 340px; display: flex; justify-content: space-between; font-size: .78rem; color: var(--ob-fg-3); padding: 0 6px; }
.ob-projection__caption { margin: 18px 0 0; color: var(--ob-fg-2); font-size: .95rem; line-height: 1.5; max-width: 34ch; }

/* ---------- Synthèse animée ---------- */
.ob-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; position: relative; }
.ob-steps__item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 16px; background: var(--ob-surface); border: 1px solid var(--ob-line);
  animation: ob-rise .45s var(--ob-ease) both; animation-delay: calc(160ms + var(--i, 0) * 230ms);
}
.ob-steps__icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); color: var(--ob-fg); }
.ob-steps__icon .icon { width: 18px; height: 18px; }
.ob-steps__text { display: flex; flex-direction: column; min-width: 0; }
.ob-steps__label { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ob-fg-3); }
.ob-steps__value { font-size: .98rem; font-weight: 600; color: var(--ob-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-steps__check {
  width: 22px; height: 22px; border-radius: 50%; background: var(--ob-fg); color: var(--ob-bg); display: grid; place-items: center;
  animation: ob-pop .35s var(--ob-spring) both; animation-delay: calc(420ms + var(--i, 0) * 230ms);
}
.ob-steps__check .icon { width: 12px; height: 12px; stroke-width: 3; }
.ob-steps__item:last-child .ob-steps__check { background: var(--ob-accent); }

/* ---------- Résumé ---------- */
.ob-summary { display: flex; flex-direction: column; gap: 18px; }
.ob-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ob-line {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
  background: var(--ob-surface); border: 1px solid var(--ob-line); font-size: .98rem; font-weight: 600;
  animation: ob-rise .4s var(--ob-ease) both; animation-delay: calc(var(--i, 0) * 70ms);
}
.ob-line__icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); flex: none; }
.ob-line__icon .icon { width: 16px; height: 16px; }
.ob-summary__note { margin: 0; color: var(--ob-fg-2); font-size: .92rem; line-height: 1.5; }
.ob-summary__google { display: flex; }

/* ---------- Tableau de bord : le radar attend sa première alerte ---------- */
.radar-ready {
  position: relative; overflow: hidden; border-radius: 28px; min-height: 420px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: #0d0d0d; border: 1px solid rgba(255, 255, 255, .07); color: #f5f5f7;
}
.radar-ready__visual { position: absolute; inset: 0; margin: 0; }
.radar-ready__visual img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; display: block; opacity: .9; }
.radar-ready__visual.is-missing { background: radial-gradient(circle at 70% 45%, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, 0) 45%); }
.radar-ready__visual::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13, 13, 13, .1) 0%, rgba(13, 13, 13, .55) 45%, rgba(13, 13, 13, .96) 78%);
}
.radar-ready__body { position: relative; padding: 140px 28px 30px; max-width: 520px; }
.radar-ready .eyebrow { color: #a3a3ab; }
.radar-ready__title { margin: 8px 0 8px; font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.08; }
.radar-ready__text { margin: 0 0 12px; max-width: 38ch; color: #b0b0b8; font-size: .98rem; line-height: 1.5; }
.radar-ready__profile { margin: 0 0 22px; font-size: .86rem; color: #7c7c85; }
.radar-ready__actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.radar-ready__actions .btn--primary { min-width: 240px; }
.radar-ready__actions .ob-link { padding-inline: 4px; }
@media (max-width: 720px) {
  .radar-ready { min-height: 460px; }
  .radar-ready__visual img { object-position: 62% 30%; }
  .radar-ready__body { padding: 200px 22px 24px; }
  .radar-ready__actions { flex-direction: column; align-items: stretch; }
  .radar-ready__actions .btn--primary { width: 100%; }
  .radar-ready__actions .ob-link { text-align: center; }
}

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .ob, .ob.is-leaving, .ob-choice, .ob-chip, .ob-points li, .ob-steps__item, .ob-steps__check, .ob-line,
  .ob-projection__amount, .ob-curve__dot--end, .ob-arrival__actions .ob-cta { animation: none !important; opacity: 1; transform: none; }
  .ob-curve__line { stroke-dashoffset: 0; animation: none; }
  .ob-progress__bar, .ob-choice, .ob-chip, .ob-cta { transition: none; }
}
