:root {
  --cream: #fdf1ea;
  --cream-2: #fff8f3;
  --rose: #fbc9cf;
  --rose-soft: #fde3e1;
  --rose-mid: #f5b3bb;
  --wine: #6e1230;
  --wine-2: #8a2444;
  --ink: #3a1020;
  --muted: #7d5560;
  --radius: 20px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--cream); color: var(--ink); }
body { font-family: 'Nunito', system-ui, sans-serif; font-size: 16px; line-height: 1.4; min-height: 100dvh; }
h1, h2, h3, .title { font-family: 'Fraunces', Georgia, serif; font-weight: 800; color: var(--wine); }
button { font: inherit; cursor: pointer; }
textarea, input { font: inherit; color: var(--ink); }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; overflow: hidden; }
.screen { padding: 18px 18px calc(28px + env(safe-area-inset-bottom)); min-height: 100dvh; display: flex; flex-direction: column; }
#app.enter > .screen { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── En-tête ── */
.head { text-align: center; position: relative; padding-top: 6px; }
.head .crown { width: 46px; height: 32px; color: var(--wine); }
.logo { font-size: 44px; line-height: 1; margin: 2px 0 6px; letter-spacing: -0.5px; }
.deco { position: absolute; color: var(--rose-mid); pointer-events: none; }
.deco.h1 { left: 8px; top: 6px; width: 20px; transform: rotate(-12deg); }
.deco.h2 { right: 12px; top: 0; width: 26px; transform: rotate(10deg); }
.deco.h3 { right: 6px; top: 70px; width: 16px; color: var(--rose); }
.step-label { font-size: 15px; color: var(--ink); margin: 0 0 6px; }
.progress { height: 9px; background: var(--rose); border-radius: 6px; max-width: 300px; margin: 0 auto 14px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--wine); border-radius: 6px; transition: width .4s; }

h2.q { font-size: 27px; text-wrap: balance; text-align: center; margin: 6px 0 6px; line-height: 1.1; }
p.sub { text-align: center; margin: 0 4px 14px; color: var(--ink); }

/* ── Boutons ── */
.btn { display: block; width: 100%; border: 0; border-radius: 999px; padding: 16px 20px; font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 20px; color: #fff; background: var(--wine); box-shadow: 0 3px 0 rgba(110, 18, 48, .25); transition: transform .1s, opacity .2s; }
.btn:active { transform: translateY(2px); }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.light { background: var(--cream-2); color: var(--wine); border: 1.5px solid var(--wine); box-shadow: none; font-size: 17px; padding: 12px 18px; }
.link { background: none; border: 0; color: var(--wine); text-decoration: underline; padding: 10px; display: block; margin: 4px auto 0; font-size: 15px; }
.spacer { flex: 1; min-height: 12px; }
.note { text-align: center; color: var(--muted); font-size: 14px; margin: 8px 0 0; }

/* ── Cartes de choix ── */
.opts { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 12px; }
.opt { position: relative; display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--wine); border-radius: 18px; background: var(--cream-2); overflow: hidden; cursor: pointer; transition: background .15s; min-height: 78px; text-align: left; width: 100%; padding: 0; }
.opt.on { background: var(--rose); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt img { align-self: stretch; min-height: 100%; object-fit: cover; object-position: center; mix-blend-mode: multiply; flex: none; }
.opt .txt { flex: 1; padding: 10px 6px; font-size: 16px; }
.opt .mark { flex: none; width: 28px; height: 28px; border: 2px solid var(--wine); background: #fff; margin: 0 12px; display: grid; place-items: center; }
.opt .mark.radio { border-radius: 50%; }
.opt .mark.check { border-radius: 8px; }
.opt.on .mark { background: var(--wine); }
.opt.on .mark::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.opt.on .mark.check::after { width: 6px; height: 12px; border-radius: 0; background: none; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); }
.opt:focus-within { outline: 3px solid rgba(110, 18, 48, .35); outline-offset: 2px; }
/* étape 1 : image à gauche, texte, radio à droite */
.opts.s1 .opt img { width: 36%; }
/* étape 2 : case à gauche, texte, image à droite */
.opts.s2 .opt { min-height: 70px; }
.opts.s2 .opt .mark { margin-left: 14px; margin-right: 4px; }
.opts.s2 .opt img { width: 34%; }
/* étape 3 et 5 : sans image */
.opts.plain .opt { min-height: 56px; }
.opts.plain .opt .txt { padding: 12px 14px; }

.field { position: relative; margin: 2px 0 12px; }
.field textarea { width: 100%; border: 1.5px solid rgba(110, 18, 48, .35); border-radius: 16px; background: var(--cream-2); padding: 12px 40px 12px 14px; resize: none; min-height: 52px; line-height: 1.35; }
.field textarea:focus { outline: 2px solid rgba(110, 18, 48, .45); }
.field svg { position: absolute; right: 12px; top: 14px; width: 18px; color: var(--muted); pointer-events: none; }
.panel { border: 1.5px solid var(--wine); border-radius: 20px; background: var(--cream-2); padding: 12px 14px 14px; margin-bottom: 12px; }
.panel h3 { margin: 0 0 8px; font-size: 22px; }
.soft { background: var(--rose-soft); border-radius: 18px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; margin: 4px 0 14px; font-size: 15px; }
.soft svg { flex: none; width: 34px; color: var(--wine-2); }
.soft p { margin: 0; padding-left: 12px; border-left: 1.5px solid rgba(110, 18, 48, .35); }

.banner { margin: 0 -18px 12px; width: calc(100% + 36px); display: block; }

/* ── Accueil ── */
.home .logo { font-size: 52px; margin-top: 8px; }
.home .tag { text-align: center; margin: 6px 20px 8px; }
.hero { width: 100%; display: block; margin: 0 auto; -webkit-mask-image: linear-gradient(#000 85%, transparent); mask-image: linear-gradient(#000 85%, transparent); }
.tabs { display: flex; justify-content: space-around; margin-top: 14px; }
.tabs button { background: none; border: 0; color: var(--muted); font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 6px; }
.tabs svg { width: 24px; height: 24px; color: var(--wine-2); }

/* ── Étape 4 : pistes ── */
.piste { border: 1.5px solid var(--wine); border-radius: 20px; background: var(--rose-soft); overflow: hidden; margin-bottom: 10px; }
.piste.on { background: var(--rose); box-shadow: 0 0 0 2px var(--wine) inset; }
.piste .row { display: flex; }
.piste img { width: 40%; object-fit: cover; object-position: 20% center; mix-blend-mode: multiply; flex: none; }
.piste .body { padding: 10px 12px; flex: 1; }
.piste h3 { margin: 0 0 4px; font-size: 19px; line-height: 1.1; }
.piste p { margin: 0 0 8px; font-size: 14.5px; }
.chip { border: 0; background: var(--rose); color: var(--ink); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14.5px; }
.piste.on .chip { background: var(--wine); color: #fff; }
.example { padding: 10px 14px 14px; background: var(--cream-2); border-top: 1.5px dashed rgba(110, 18, 48, .4); font-size: 15px; }
.example q { font-style: italic; quotes: '« ' ' »'; }
.example .pick { margin-top: 10px; }

/* ── Chargement ── */
.loading { align-items: center; justify-content: center; text-align: center; gap: 10px; }
.loading .hearts { display: flex; gap: 8px; margin-bottom: 8px; }
.loading .hearts svg { width: 28px; color: var(--wine-2); animation: beat 1.2s infinite; }
.loading .hearts svg:nth-child(2) { animation-delay: .2s; }
.loading .hearts svg:nth-child(3) { animation-delay: .4s; }
@keyframes beat { 0%, 100% { transform: scale(.8); opacity: .5; } 50% { transform: scale(1.15); opacity: 1; } }

/* ── Écran final ── */
.card { border: 1.5px solid var(--wine); border-radius: 22px; background: var(--rose-soft); padding: 12px; margin-bottom: 12px; display: flex; gap: 10px; align-items: flex-start; }
.card img { width: 36%; border-radius: 14px; mix-blend-mode: multiply; flex: none; }
.card .col { flex: 1; min-width: 0; }
.pill { background: var(--rose); border: 1.5px solid var(--wine); border-radius: 12px; padding: 6px 10px; font-family: 'Fraunces', serif; font-weight: 800; color: var(--wine); font-size: 17px; margin-bottom: 8px; }
.white { background: #fff; border: 1.5px solid rgba(110, 18, 48, .5); border-radius: 14px; padding: 10px 12px; font-size: 15px; margin-bottom: 8px; }
.quote { background: var(--rose-soft); border: 1.5px solid rgba(110, 18, 48, .35); border-radius: 14px; padding: 8px 12px; font-style: italic; font-size: 15px; }
.quote::before { content: '“'; font-family: 'Fraunces', serif; font-size: 26px; line-height: 0; color: var(--wine); margin-right: 4px; vertical-align: -6px; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 15px; cursor: pointer; }
.checks .box { flex: none; width: 22px; height: 22px; border: 2px solid var(--wine); border-radius: 6px; background: #fff; margin-top: 1px; display: grid; place-items: center; }
.checks li.done .box { background: var(--wine); }
.checks li.done .box::after { content: ''; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.checks li.done span:last-child { text-decoration: line-through; opacity: .7; }
.card.heart { background: var(--rose); }
.card.heart img { width: 26%; }

.hearts-rate { display: flex; justify-content: center; gap: 6px; margin: 8px 0; }
.hearts-rate button { background: none; border: 0; padding: 2px; }
.hearts-rate svg { width: 36px; color: var(--rose-mid); transition: transform .1s, color .1s; }
.hearts-rate button.on svg { color: var(--wine-2); transform: scale(1.1); }

/* ── Aide, toast ── */
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); background: var(--wine); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 15px; opacity: 0; pointer-events: none; transition: .25s; z-index: 30; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.sheet { position: fixed; inset: 0; background: rgba(58, 16, 32, .5); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet .in { background: var(--cream); border-radius: 26px 26px 0 0; padding: 22px 20px calc(24px + env(safe-area-inset-bottom)); width: 100%; max-width: 480px; max-height: 90dvh; overflow: auto; animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h3 { font-size: 24px; margin: 0 0 8px; }
.sheet p { margin: 0 0 10px; }
.sheet a.tel { display: flex; justify-content: space-between; align-items: center; background: var(--rose-soft); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; color: var(--ink); text-decoration: none; }
.sheet a.tel b { font-family: 'Fraunces', serif; font-size: 22px; color: var(--wine); }
.sheet .check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 14px; font-size: 15px; cursor: pointer; }
.sheet .check input { width: 22px; height: 22px; accent-color: var(--wine); flex: none; margin-top: 1px; }
.help-fab { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 360px) { .logo { font-size: 38px; } h2.q { font-size: 26px; } }
