:root {
  --cream: #FBF6EC;
  --paper: #FFFDF8;
  --ink: #22302B;
  --muted: #5F6B65;
  --line: #E6DDCB;
  --sage: #7FA383;
  --sage-d: #4B7152;
  --sage-l: #E6EFE3;
  --coral: #EF6A56;
  --coral-d: #D2503D;
  --coral-l: #FDE7E2;
  --radius: 16px;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fraunces', Georgia, serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; min-height: 100dvh; }
button, input, textarea { font: inherit; color: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.noscript { padding: 24px; text-align: center; }

.app { max-width: 680px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: 0 16px; }
/* iframe à hauteur fixe : l'app remplit l'iframe, la navigation reste collée en bas */
.embed .top { padding-top: 12px; }
/* iframe à hauteur automatique (embed.js) : hauteur = contenu */
.embed-auto body, .embed-auto .app { min-height: 0; }
.embed-auto .app { padding-bottom: 8px; }

.top { display: flex; align-items: center; gap: 12px; padding: 16px 0 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--paper); box-shadow: 0 1px 0 var(--line); }
.who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.who strong { font-size: 15px; }
.who span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link { background: none; border: 0; color: var(--sage-d); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; padding: 6px 0; }

.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--sage); border-radius: 99px; transition: width .45s ease; }

.stage { flex: 1; padding: 28px 0 20px; }
.screen { animation: in .38s ease both; }
.screen.back { animation-name: inBack; }
@keyframes in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes inBack { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen, .bar > div { animation: none !important; transition: none !important; } }

.bubble { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 22px; }
.bubble img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }
.bubble p { margin: 0; background: var(--sage-l); color: var(--ink); padding: 10px 14px; border-radius: 4px 16px 16px 16px; font-size: 15px; line-height: 1.45; }

.qnum { font-size: 13px; font-weight: 700; color: var(--coral-d); letter-spacing: .02em; margin-bottom: 8px; }
h1.q { font-family: var(--display); font-weight: 600; font-size: clamp(24px, 5.4vw, 32px); line-height: 1.18; margin: 0 0 10px; letter-spacing: -0.01em; }
.help { color: var(--muted); font-size: 16px; line-height: 1.45; margin: 0 0 6px; }
.why { color: var(--muted); font-size: 13.5px; line-height: 1.45; margin: 10px 0 0; }
.why b { color: var(--sage-d); font-weight: 700; }
.field { margin-top: 22px; }

.opts { display: grid; gap: 10px; margin-top: 22px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 14px; font-size: 17px; line-height: 1.3; cursor: pointer; transition: border-color .15s, background .15s, transform .08s; min-height: 56px; }
.opt:hover { border-color: var(--sage); }
.opt:active { transform: scale(.99); }
.opt .key { flex: none; width: 26px; height: 26px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--cream); }
.opt .lbl { flex: 1; }
.opt .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; font-size: 13px; }
.opt.multi .tick { border-radius: 6px; }
.opt[aria-pressed="true"], .opt[aria-checked="true"] { border-color: var(--sage-d); background: var(--sage-l); }
.opt[aria-pressed="true"] .key, .opt[aria-checked="true"] .key { background: var(--sage-d); color: #fff; border-color: var(--sage-d); }
.opt[aria-pressed="true"] .tick, .opt[aria-checked="true"] .tick { background: var(--sage-d); border-color: var(--sage-d); color: #fff; }
.opt:focus-visible, .primary:focus-visible, .ghost:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }

.inp { width: 100%; background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; font-size: 20px; outline: none; transition: border-color .15s; }
.inp:focus { border-color: var(--sage-d); }
textarea.inp { min-height: 130px; resize: vertical; font-size: 17px; line-height: 1.45; }
.row { display: flex; gap: 10px; align-items: center; }
.unitbox { position: relative; flex: 1; }
.unitbox .inp { padding-right: 52px; }
.unitbox .u { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 16px; pointer-events: none; }
.switch { margin-top: 12px; }

.err { color: var(--coral-d); font-weight: 500; font-size: 15px; margin: 12px 0 0; min-height: 1px; }

.checks { display: grid; gap: 10px; margin-top: 20px; }
.check { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; cursor: pointer; font-size: 16px; line-height: 1.4; }
.check input { width: 22px; height: 22px; margin: 0; accent-color: var(--sage-d); flex: none; }
.check:has(input:checked) { border-color: var(--sage-d); background: var(--sage-l); }

.card { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.care { border-color: var(--coral); background: var(--coral-l); }
.card p { font-size: 17px; line-height: 1.55; margin: 0; }

.hero { text-align: center; padding-top: 6px; }
.hero img { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 4px solid var(--paper); box-shadow: 0 0 0 2px var(--coral-l); }
.hero h1 { margin-top: 18px; }
.hero p { font-size: 17px; line-height: 1.55; color: var(--ink); max-width: 520px; margin: 0 auto 10px; }
.hero .meta { color: var(--muted); font-size: 14px; }
.hero .cta { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.as { font-size: 14px; color: var(--muted); margin-top: 10px; }

.nav { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 12px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, rgba(251, 246, 236, 0), var(--cream) 30%); }
.nav .hint { flex: 1; text-align: right; font-size: 13px; color: var(--muted); }
.primary { background: var(--coral); color: #fff; border: 0; border-radius: 12px; padding: 14px 24px; font-size: 17px; font-weight: 700; cursor: pointer; min-height: 52px; box-shadow: 0 2px 0 var(--coral-d); transition: background .15s, transform .08s; }
.primary:hover { background: var(--coral-d); }
.primary:active { transform: translateY(1px); }
.primary:disabled { opacity: .6; cursor: progress; }
.primary.big { padding: 16px 34px; font-size: 18px; }
.ghost { background: transparent; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 15px; cursor: pointer; min-height: 48px; color: var(--muted); }
.ghost:hover { border-color: var(--sage); color: var(--ink); }
.ghost[hidden] { display: none; }

.copy { display: flex; gap: 8px; margin-top: 14px; }
.copy input { flex: 1; font-size: 14px; }

@media (max-width: 520px) {
  .stage { padding-top: 22px; }
  .opt { font-size: 16px; padding: 13px 12px; }
  .nav .hint { display: none; }
  .nav .primary { flex: 1; }
}
@media (hover: none) { .opt .key { display: none; } }
