:root {
  --cream: #FFF6E5; --cream-2: #FFEFD2; --card: #FFFDF8; --ink: #3B2A1A; --muted: #7A6450;
  --honey: #F5A623; --honey-2: #E89A12; --honey-light: #FFE08A; --ok: #2E8B57; --warn: #C0521C;
  --radius: 22px; --shadow: 0 8px 0 rgba(59,42,26,.08), 0 14px 32px rgba(59,42,26,.08);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--cream); line-height: 1.45; }
body.cream { background: radial-gradient(120% 700px at 50% -10%, #FFF0C8 0%, var(--cream) 70%) no-repeat var(--cream); }
a { color: var(--honey-2); font-weight: 600; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .35em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.5rem, 6vw, 2.1rem); }
h2 { font-size: 1.15rem; }
p { margin: 0 0 .7em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.fine { font-size: .78rem; color: var(--muted); }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 800; color: var(--honey-2); margin: 0 0 .2em; }
.honey { color: var(--honey-2); }

.demo-ribbon { position: sticky; top: 0; z-index: 50; background: repeating-linear-gradient(-45deg, #3B2A1A 0 14px, #4a3623 14px 28px); color: var(--honey-light); text-align: center; font-weight: 800; font-size: .78rem; letter-spacing: .06em; padding: .45rem .5rem; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 14px 18px; }
.logo { text-decoration: none; color: var(--ink); font-weight: 900; font-size: 1.05rem; display: inline-flex; align-items: center; gap: .35rem; }
.logo-dot { color: var(--honey); font-size: 1.2rem; }
.lang select { appearance: none; border: 2px solid var(--ink); border-radius: 999px; padding: .35rem 1.8rem .35rem .8rem; font: inherit; font-weight: 700; font-size: .85rem; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%233B2A1A'/%3E%3C/svg%3E") no-repeat right .7rem center; color: var(--ink); }
[dir=rtl] .lang select { padding: .35rem .8rem .35rem 1.8rem; background-position: left .7rem center; }

.tip-page { max-width: 480px; margin: 0 auto; padding: 0 14px 150px; }
.card { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin: 0 0 16px; }
.person { display: flex; align-items: center; gap: 14px; }
.person h1 { margin: 0; font-size: 1.55rem; }
.person .muted { margin: .15rem 0 0; }
.avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.4rem; background: linear-gradient(145deg, var(--honey-light), var(--honey)); border: 2px solid var(--ink); }

.blocked { background: #FFF1E8; border-color: var(--warn); }
.blocked h2 { color: var(--warn); }
.is-disabled { opacity: .5; pointer-events: none; filter: grayscale(.4); }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--cream-2); border-radius: 999px; padding: 5px; margin-bottom: 8px; }
.tab { border: 0; background: transparent; border-radius: 999px; padding: .6rem .4rem; font: inherit; font-weight: 800; color: var(--muted); cursor: pointer; }
.tab.is-active { background: var(--ink); color: var(--cream); }

.jar-wrap { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 10px; margin: 6px 0 10px; }
.jar { width: 120px; height: 150px; overflow: visible; }
.jar.bump { animation: bump .4s ease; }
@keyframes bump { 30% { transform: scale(1.06) rotate(-3deg); } 60% { transform: scale(.98) rotate(2deg); } }
.jar-fill { transition: transform .6s cubic-bezier(.2,1.4,.4,1); }
.jar-wave { animation: wave 3s linear infinite; }
@keyframes wave { to { transform: translateX(-40px); } }
.jar-amount strong { display: block; font-size: clamp(2.1rem, 11vw, 2.8rem); font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.jar-amount small { color: var(--muted); font-weight: 700; }
.coin { animation: drop .9s cubic-bezier(.5,0,.8,.6) forwards; transform: translate(var(--x), -40px); opacity: 0; }
@keyframes drop { 10% { opacity: 1; } 100% { transform: translate(var(--x), 165px); opacity: 1; } }

.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0; }
.chip { border: 2px solid var(--ink); background: var(--card); border-radius: 16px; padding: .85rem .2rem; font: inherit; font-size: 1.05rem; font-weight: 900; color: var(--ink); cursor: pointer; box-shadow: 0 4px 0 var(--ink); transition: transform .08s, box-shadow .08s, background .15s; }
.chip:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.chip.is-active { background: var(--honey); }
.field { display: block; margin: 10px 0; }
.field > span { display: block; font-weight: 800; font-size: .85rem; margin-bottom: 4px; }
.field input, .field select { width: 100%; font: inherit; font-size: 1.1rem; font-weight: 700; padding: .8rem 1rem; border: 2px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); }
.field input:focus, .field select:focus { outline: 3px solid var(--honey-light); outline-offset: 1px; }
.hint { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }
.error { color: #B3261E; font-weight: 700; background: #FDECEA; border-radius: 12px; padding: .55rem .8rem; }

.breakdown dl { margin: 0; }
.breakdown dl div { display: flex; justify-content: space-between; gap: 10px; padding: .45rem 0; border-bottom: 1px dashed rgba(59,42,26,.2); }
.breakdown dt { color: var(--muted); }
.breakdown dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.breakdown .total { border-bottom: 0; padding-top: .7rem; font-size: 1.15rem; }
.breakdown .total dt { color: var(--ink); font-weight: 900; }
.breakdown .note { margin: .6rem 0 0; font-weight: 700; background: var(--cream-2); border-radius: 12px; padding: .55rem .8rem; }

.cta-bar { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--cream) 70%, rgba(255,246,229,0)); }
.cta-bar > * { max-width: 452px; margin-inline: auto; }
.btn-honey { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; border: 2px solid var(--ink); border-radius: 20px; background: linear-gradient(180deg, #FFC24A, var(--honey)); color: var(--ink); font: inherit; font-weight: 900; font-size: 1.15rem; padding: .9rem 1rem; box-shadow: 0 6px 0 var(--ink); cursor: pointer; text-decoration: none; text-align: center; transition: transform .08s, box-shadow .08s; }
.btn-honey small { font-weight: 700; font-size: .8rem; opacity: .8; }
.btn-honey:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn-honey:disabled { opacity: .5; cursor: not-allowed; }
.secure { text-align: center; font-size: .72rem; color: var(--muted); margin: 8px auto 0; }
.btn-ghost { display: inline-block; width: 100%; margin-top: 10px; border: 0; background: transparent; font: inherit; font-weight: 800; color: var(--muted); padding: .7rem; cursor: pointer; text-align: center; text-decoration: none; }
.btn-small { display: inline-block; border: 2px solid var(--ink); border-radius: 12px; padding: .4rem .8rem; background: var(--honey-light); color: var(--ink); text-decoration: none; font-weight: 800; font-size: .85rem; font-family: inherit; cursor: pointer; }

.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(59,42,26,.45); opacity: 0; transition: opacity .25s; }
.sheet-panel { position: absolute; inset-inline: 0; bottom: 0; max-width: 520px; margin: 0 auto; background: var(--card); border: 2px solid var(--ink); border-bottom: 0; border-radius: 26px 26px 0 0; padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .28s cubic-bezier(.2,.9,.3,1); }
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: none; }
.sheet-grip { width: 44px; height: 5px; border-radius: 9px; background: rgba(59,42,26,.25); margin: 0 auto 12px; }
.sheet-total { font-weight: 800; color: var(--muted); }
.demo-note { background: #3B2A1A; color: var(--cream); border-radius: 14px; padding: .7rem .9rem; font-size: .85rem; }
.demo-note strong { color: var(--honey-light); }
.fake-wallets { display: grid; grid-template-columns: 1fr 1fr 60px; gap: 8px; margin: 10px 0 14px; }
.fake-wallets span { background: #111; color: #fff; border-radius: 12px; padding: .75rem; text-align: center; font-weight: 800; opacity: .35; }
#payment-element { margin: 10px 0 16px; min-height: 120px; }

.foot { text-align: center; font-size: .78rem; color: var(--muted); padding: 22px 0 10px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1rem; margin-bottom: .4rem; }
.foot a { color: var(--muted); }

.thanks .card { display: grid; justify-items: center; gap: 6px; padding: 26px 18px; }
.thanks .jar { width: 150px; height: 190px; }
.big { font-size: 1.15rem; font-weight: 700; }

/* ── Espace pro ───────────────────────────────────────────────────────── */
.pro { max-width: 960px; margin: 0 auto; padding: 0 14px 30px; }
.pro-nav { display: flex; align-items: center; gap: 12px; }
.pro-nav form { margin: 0; }
.link { border: 0; background: none; font: inherit; font-weight: 700; color: var(--honey-2); cursor: pointer; padding: 0; }
.narrow { max-width: 520px; margin: 0 auto; }
.form .btn-honey { margin-top: 14px; }
.circuits { border: 0; padding: 0; margin: 0 0 6px; display: grid; gap: 8px; }
.circuits legend { font-weight: 900; margin-bottom: 6px; }
.circuit input { position: absolute; opacity: 0; }
.circuit-box { display: grid; grid-template-columns: 34px 1fr; column-gap: 8px; border: 2px solid rgba(59,42,26,.25); border-radius: 16px; padding: 10px 12px; cursor: pointer; background: #fff; }
.circuit-icon { grid-row: span 2; font-size: 1.5rem; }
.circuit-box small { color: var(--muted); }
.circuit input:checked + .circuit-box { border-color: var(--ink); background: var(--cream-2); box-shadow: 0 4px 0 var(--ink); }
.circuit input:focus-visible + .circuit-box { outline: 3px solid var(--honey); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; margin-top: 10px; }
.check input { width: 20px; height: 20px; accent-color: var(--honey-2); }

.home .hero { display: grid; grid-template-columns: 1fr; gap: 10px; align-items: center; padding: 10px 0 18px; }
.home .hero .jar { width: 160px; height: 200px; justify-self: center; }
.home h1 { font-size: clamp(2rem, 8vw, 3rem); }
.lead { font-size: 1.08rem; color: var(--muted); }
.hero-cta { display: grid; gap: 4px; }
.steps { list-style: none; padding: 0; display: grid; gap: 10px; margin: 10px 0 18px; }
.steps li { background: var(--card); border: 2px solid var(--ink); border-radius: 18px; padding: 12px 14px; display: grid; grid-template-columns: 40px 1fr; column-gap: 8px; }
.steps li span { grid-row: span 2; font-size: 1.6rem; }
.steps p { margin: 0; color: var(--muted); }
@media (min-width: 760px) {
  .home .hero { grid-template-columns: 1.4fr 1fr; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .hero-cta { grid-template-columns: auto auto; justify-content: start; }
}

.dash .status.ok { border-color: var(--ok); background: #F0FAF3; }
.dash .status.ok h2 { color: var(--ok); }
.dash .status.todo { border-color: var(--warn); background: #FFF4EC; }
.flash { background: var(--ink); color: var(--cream); border-radius: 14px; padding: .7rem 1rem; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.stat { background: var(--card); border: 2px solid var(--ink); border-radius: 16px; padding: 10px; }
.stat span { display: block; font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.stat strong { font-size: 1.2rem; font-weight: 900; }
.qr-list { display: grid; gap: 12px; }
.qr-card { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; background: #fff; border: 2px dashed rgba(59,42,26,.3); border-radius: 18px; padding: 10px; }
.qr-card img { width: 130px; height: 130px; border-radius: 10px; image-rendering: pixelated; }
.qr-card h3 { margin: 0; }
.qr-card .url { font-size: .75rem; word-break: break-all; margin: .3rem 0 .5rem; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.between { justify-content: space-between; }
.inline-form { display: grid; gap: 0 8px; grid-template-columns: 1fr 1fr; align-items: end; margin-top: 12px; }
.inline-form .btn-small { grid-column: span 2; padding: .7rem; }
.tips-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tips-table th, .tips-table td { text-align: start; padding: .5rem .3rem; border-bottom: 1px dashed rgba(59,42,26,.2); }
.tips-table .amount { font-weight: 900; text-align: end; }
.stripe-mock { border-color: #635BFF; }
.demo-pill { display: inline-block; background: #3B2A1A; color: var(--honey-light); border-radius: 999px; padding: .25rem .7rem; font-weight: 800; font-size: .75rem; }
.checklist { padding-inline-start: 1.2rem; }
.checklist li::marker { content: "✓  "; color: var(--ok); font-weight: 900; }

.legal h2 { margin-top: 1.2em; font-size: 1.05rem; }
.legal { background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.draft-banner { background: #FFF1C2; border: 2px dashed #B7791F; color: #7A4A00; border-radius: 14px; padding: .7rem .9rem; font-weight: 800; margin-bottom: 14px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 20px; font-size: .85rem; }
.legal-nav [aria-current] { color: var(--ink); text-decoration: none; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.sheet-breakdown { margin: 0 0 12px; font-size: .9rem; }
.sheet-breakdown div { display: flex; justify-content: space-between; gap: 10px; padding: .3rem 0; border-bottom: 1px dashed rgba(59,42,26,.2); }
.sheet-breakdown dt { color: var(--muted); }
.sheet-breakdown dd { margin: 0; font-weight: 800; }
.sheet-breakdown .total { border-bottom: 0; font-size: 1.05rem; }
.sheet-breakdown .total dt { color: var(--ink); font-weight: 900; }

.danger summary { cursor: pointer; font-weight: 800; color: #B3261E; }
.danger[open] summary { margin-bottom: 8px; }
