:root {
  --bg: #0a0b0e;
  --surface: #13151a;
  --surface-2: #1a1d23;
  --surface-3: #22252c;
  --line: #22252c;
  --line-2: #2d3139;
  --text: #f4f5f7;
  --muted: #8d929c;
  --dim: #5f646e;
  --blue: #0b74f0;
  --blue-2: #0a66d6;
  --blue-soft: #102440;
  --blue-text: #5ea3ff;
  --green: #36d07f;
  --green-soft: #0f2a1d;
  --red: #ff5a5f;
  --red-soft: #2a1416;
  --red-line: #5c2a2d;
  --yellow: #ffb400;
  --warn-soft: #2a2414;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); overflow-x: hidden; }
body { min-height: 100vh; overscroll-behavior-y: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .5; }
img { max-width: 100%; display: block; }
a { color: var(--blue-text); }
[hidden] { display: none !important; }
.ic { display: block; flex-shrink: 0; }
h1, h2, h3, h4 { margin: 0; }
.mono { font-family: var(--mono); }

/* ── Barre du haut ── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: rgba(10, 11, 14, .88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-logo { font-size: 28px; line-height: 1; width: 34px; height: 34px; text-align: center; flex-shrink: 0; }
.brand-logo img { width: 34px; height: 34px; border-radius: 10px; }
.brand-text { min-width: 0; }
.brand-text b { display: block; font-size: 17px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { display: block; font: 600 10px/1.2 var(--mono); letter-spacing: .16em; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.balance-pill { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 10px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-2); font-weight: 800; font-size: 15px; }
.purse { font-size: 20px; line-height: 1; width: 22px; height: 22px; }
.aemoji { display: inline-grid; place-items: center; flex-shrink: 0; }
.e-inline { width: 20px; height: 20px; vertical-align: -4px; }
.e-btn { width: 22px; height: 22px; }
.e-big { width: 76px; height: 76px; margin: 0 auto 14px; }
.e-notif { width: 30px; height: 30px; margin-top: 2px; }
.aemoji img, .aemoji svg { width: 100% !important; height: 100% !important; display: block; }
.round-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text); flex-shrink: 0; }
.cart-badge { position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.cart-stepper { display: flex; align-items: center; gap: 4px; flex-shrink: 0; border: 1px solid var(--line-2); border-radius: 18px; padding: 2px; }
.cart-stepper button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.cart-stepper span { min-width: 22px; text-align: center; font-weight: 700; }
.bell-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid var(--surface); }

/* ── Vues ── */
.view { max-width: 640px; margin: 0 auto; padding: 16px 14px calc(120px + var(--safe-b)); }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 4px 2px 18px; }
.loader { display: grid; place-items: center; padding: 70px 0; }
.loader span { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.label { font: 600 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ── Boutons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 22px; border-radius: 26px; font-weight: 700; font-size: 16px; transition: transform .08s, background .15s; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover:not(:disabled) { background: var(--blue-2); }
.btn-dark { background: var(--surface-3); color: var(--text); }
.btn-outline { border: 1px solid var(--line-2); color: var(--text); background: transparent; }
.btn-danger { border: 1px solid var(--red-line); color: var(--red); background: transparent; }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 18px; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line-2); color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.chip.active { background: var(--blue-soft); border-color: transparent; color: var(--blue-text); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--muted); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.nodot::before { display: none; }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.blue { background: var(--blue-soft); color: var(--blue-text); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.yellow { background: var(--warn-soft); color: var(--yellow); }

/* ── Boutique ── */
body.tg-only .topbar, body.tg-only .dock { display: none; }
.store-tools { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 23px; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--text); }
.search input::placeholder { color: var(--dim); }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pcard { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 8px; transition: border-color .15s; }
.pcard.fav { border-color: #3a2a33; }
.pcard-open { display: flex; flex-direction: column; text-align: left; width: 100%; }
.pcard-open:active { opacity: .85; }
.pcard-img { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--dim); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pcard.soldout .pcard-img img { filter: grayscale(.8) brightness(.6); }
.badges { position: absolute; top: 7px; left: 7px; display: flex; gap: 5px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; color: #fff; }
.badge.new { background: #e5312f; }
.badge.official { background: rgba(20, 22, 26, .88); border: 1px solid rgba(255, 255, 255, .12); }
.badge.official i { width: 13px; height: 13px; border-radius: 50%; background: var(--green); color: #07140c; font-style: normal; font-size: 9px; display: grid; place-items: center; }
.badge.out { background: rgba(20, 22, 26, .9); color: var(--red); }
.pcard-name { font-size: 15px; font-weight: 700; line-height: 1.3; margin: 10px 2px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-price { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin: 6px 2px 0; }
.pcard-meta { display: flex; align-items: center; gap: 6px; margin: 8px 2px 0; padding-top: 8px; border-top: 1px solid var(--line); color: var(--dim); min-width: 0; }
.pcard-meta > .ic { flex-shrink: 0; }
.pcard-kicker { flex: 1; min-width: 0; font: 600 10px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-meta .pill { height: 22px; padding: 0 6px; font-size: 11px; background: transparent; flex-shrink: 0; }
.pcard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini-btn { height: 40px; border-radius: 12px; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--muted); }
.mini-btn:active { background: var(--surface-2); }
.fav-toggle { transition: transform .12s, color .15s, background .15s; }
.fav-toggle.on { color: #ff6b81; border-color: #52303a; background: #2a1820; transform: scale(1.04); }
.fav-toggle.on .ic { fill: currentColor; }
.buy-row { display: flex; gap: 10px; align-items: stretch; }
.buy-row .btn { flex: 1; }
.buy-row .mini-btn { width: 56px; height: auto; border-radius: 26px; }
.pcard-add { height: 44px; border-radius: 12px; font-size: 15px; }
.pcard-add:disabled { background: var(--surface-3); color: var(--dim); }

/* ── États vides ── */
.empty { text-align: center; padding: 60px 20px; }
.empty-ic { color: var(--muted); margin: 0 auto 14px; display: grid; place-items: center; }
.empty h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.empty p { margin: 0 auto; max-width: 290px; color: var(--muted); font-size: 14px; }
.empty .btn { margin-top: 20px; }
.divider-line { height: 4px; border-radius: 2px; background: var(--surface-2); margin: 10px 0; }

/* ── Cartes ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; width: 100%; text-align: left; }
button.row:active { background: var(--surface-2); }
.row-thumb { width: 54px; height: 54px; border-radius: 12px; overflow: hidden; background: var(--surface-3); flex-shrink: 0; display: grid; place-items: center; color: var(--dim); font-size: 22px; }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; max-width: 45%; }
.row-end .pill, .row-end .amount { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.amount { font-weight: 800; }
.amount.plus { color: var(--green); }
.tx-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex-shrink: 0; }
.tx-ic.plus { background: var(--green-soft); color: var(--green); }

/* ── Solde ── */
.balance-hero { padding: 14px 4px 22px; }
.balance-hero .big { font-size: 56px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 6px 0 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 26px 2px 14px; flex-wrap: wrap; }
.section-head h3 { font-size: 17px; font-weight: 800; }
.muted-center { text-align: center; color: var(--muted); padding: 30px 0; }

/* ── Profil ── */
.profile-card { position: relative; overflow: hidden; background: linear-gradient(160deg, #0f2342 0%, #0d1523 55%, #10131a 100%); border: 1px solid #1c3558; border-radius: 22px; padding: 20px; }
.profile-top { display: flex; align-items: center; gap: 14px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--blue); background: #0c1a30; display: grid; place-items: center; font-size: 24px; font-weight: 800; color: var(--blue-text); overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 21px; font-weight: 800; }
.verified { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; }
.profile-handle { font-family: var(--mono); color: var(--muted); font-size: 13px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.stat { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 21px; font-weight: 800; }
.stat span { font: 600 10px/1.3 var(--mono); letter-spacing: .12em; color: var(--muted); }
.mini-balance { display: flex; align-items: center; gap: 14px; }
.mini-balance .purse { font-size: 34px; width: 42px; height: 42px; }
.mini-balance b { display: block; font-size: 22px; font-weight: 800; }
.mini-balance .label { white-space: nowrap; }
.list-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 6px 16px; }
.list-card .label { padding: 14px 0 4px; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.list-item:last-child { border-bottom: 0; }
.li-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.li-text { flex: 1; font-weight: 700; font-size: 15.5px; }
.li-text small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.chev { color: var(--dim); }
.count-dot { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.switch { position: relative; width: 50px; height: 30px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 15px; background: var(--surface-3); transition: background .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ── Dock ── */
.dock {
  position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; width: min(400px, calc(100% - 28px)); padding: 6px;
  border-radius: 34px; background: rgba(30, 32, 38, .72); backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 12px 40px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.dock button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; border-radius: 28px; font-size: 11.5px; font-weight: 700; color: #c9ccd2; }
.dock-ic { font-size: 23px; line-height: 1; width: 28px; height: 28px; }
.dock button:not(.active) .dock-ic { opacity: .85; }
.dock button.active { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.dock-dot { position: absolute; top: 6px; right: calc(50% - 18px); width: 9px; height: 9px; border-radius: 50%; background: var(--red); }

/* ── Bottom sheet ── */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .66); animation: fade .2s; }
.sheet { position: relative; width: 100%; max-width: 640px; height: 92vh; height: 92dvh; background: #15171c; border-radius: 26px 26px 0 0; border: 1px solid var(--line-2); border-bottom: 0; display: flex; flex-direction: column; animation: up .28s cubic-bezier(.2, .9, .3, 1); }
.sheet.fit { height: auto; max-height: 92vh; max-height: 92dvh; }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; flex-shrink: 0; }
.sheet-controls { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; z-index: 3; pointer-events: none; }
.sheet-controls .round-btn { pointer-events: auto; background: rgba(34, 37, 44, .9); backdrop-filter: blur(8px); border-color: transparent; color: var(--muted); }
.sheet-scroll { flex: 1; overflow-y: auto; padding: 12px 16px calc(24px + var(--safe-b)); -webkit-overflow-scrolling: touch; }
.sheet-head { padding: 10px 50px 16px 2px; }
.sheet-head.with-back { padding-left: 50px; }
.sheet-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.sheet-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.sheet-foot { position: sticky; bottom: calc(-24px - var(--safe-b)); margin: 16px -16px calc(-24px - var(--safe-b)); padding: 12px 16px calc(14px + var(--safe-b)); background: linear-gradient(180deg, rgba(21, 23, 28, 0), #15171c 30%); }
@keyframes up { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }

/* ── Fiche produit ── */
.hero { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; color: var(--dim); margin-top: 6px; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .badges { top: 10px; left: 10px; }
.p-kicker { margin: 16px 0 6px; }
.p-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.p-price-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; }
.p-price { font-size: 26px; font-weight: 800; color: var(--blue-text); }
.p-desc { border-left: 2px solid var(--line-2); padding: 2px 0 2px 14px; color: var(--muted); white-space: pre-wrap; margin: 0 0 16px; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; color: #c7cad1; }
.checks li .ic { color: var(--green); margin-top: 2px; }
.steps-card { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 18px; padding: 16px; margin-bottom: 18px; }
.steps-card h4 { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; counter-reset: step; }
.steps li { display: flex; gap: 12px; color: #c7cad1; font-size: 14.5px; }
.steps li::before { counter-increment: step; content: counter(step); width: 22px; height: 22px; border-radius: 6px; background: var(--blue-soft); color: var(--blue-text); font-size: 12px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.steps li span { word-break: break-word; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin: 6px 2px 16px; }
.qty-row b { font-size: 16px; }
.stepper { display: flex; align-items: center; gap: 18px; }
.stepper button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); display: grid; place-items: center; color: var(--text); }
.stepper span { min-width: 22px; text-align: center; font-size: 19px; font-weight: 800; }
.info-box { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--blue-soft); margin-bottom: 14px; }
.info-box .ic { color: var(--blue-text); margin-top: 2px; }
.info-box b { display: block; color: var(--blue-text); }
.info-box span { font-size: 13.5px; color: var(--muted); }
.accordion { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 18px; margin-bottom: 12px; overflow: hidden; }
.acc-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; font-weight: 800; font-size: 15.5px; text-align: left; }
.acc-head .ic { color: var(--muted); transition: transform .2s; }
.accordion.open .acc-head .ic { transform: rotate(180deg); }
.acc-body { padding: 0 16px 16px; color: var(--muted); font-size: 14.5px; white-space: pre-line; }
.accordion:not(.open) .acc-body { display: none; }


/* ── Formulaires ── */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input, .textarea, .select { width: 100%; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 13px 14px; outline: 0; color: var(--text); font-size: 16px; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--blue); }
.textarea { min-height: 110px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.upload-zone { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px dashed var(--line-2); border-radius: 14px; color: var(--muted); cursor: pointer; }
.upload-zone input { display: none; }
.preview { position: relative; display: inline-block; margin-top: 8px; }
.preview img { height: 80px; border-radius: 10px; }
.preview button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; }

/* ── Ajout de fonds ── */
.amount-input { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin: 12px auto 4px; padding-bottom: 8px; width: 210px; border-bottom: 3px solid var(--surface-3); }
.amount-input .cur { font-size: 30px; font-weight: 800; color: var(--dim); }
.amount-input input { width: 150px; border: 0; outline: 0; background: transparent; font-size: 56px; font-weight: 800; text-align: center; color: var(--text); letter-spacing: -.03em; padding: 0; -moz-appearance: textfield; }
.amount-input input::-webkit-outer-spin-button, .amount-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 10px; }
.quick button { height: 48px; border-radius: 24px; border: 1px solid var(--line-2); font-weight: 800; color: var(--muted); }
.quick button.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.hint { text-align: center; color: var(--dim); font-size: 13px; margin: 0 0 18px; }
.notice-soft { display: block; padding: 12px 14px; border-radius: 16px; background: var(--warn-soft); color: #e8d9ae; font-size: 14px; margin-bottom: 14px; }
.notice-soft b { color: var(--yellow); }
.methods-title { font-weight: 800; font-size: 16px; margin: 6px 2px 12px; }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.method { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 700; font-size: 13.5px; }
.method small { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.method.active { border-color: var(--blue); background: var(--blue-soft); }
.method:disabled { opacity: .35; }
.coin { position: relative; overflow: hidden; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 21px; color: #fff; flex-shrink: 0; }
.coin.sm { width: 38px; height: 38px; font-size: 17px; }
/* Logo Telegram par-dessus la pastille colorée, et si rien ne charge,
   le symbole de la crypto reste visible. */
.coin img, .coin .coin-anim { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.coin .coin-anim svg { display: block; width: 100%; height: 100%; }
.coin.SOL { background: linear-gradient(135deg, #9945ff, #19fb9b); }
.coin.ETH { background: linear-gradient(135deg, #8a92b2, #454a75); }
.coin.LTC { background: #345d9d; }
.coin.USDT { background: #009393; }
.coin.PAYPAL { background: #fff; }

/* ── Facture ── */
.inv-card { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 22px; padding: 16px; }
.inv-coin { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.inv-coin b { display: block; font-size: 17px; }
.inv-coin span { font-size: 13px; color: var(--muted); }
.inv-coin span em { font-style: normal; color: var(--blue-text); }
.danger-box { display: flex; gap: 12px; padding: 14px; border-radius: 16px; background: var(--red-soft); border: 1px solid var(--red-line); margin-bottom: 16px; }
.danger-box .bang { font-size: 26px; line-height: 1; }
.danger-box b { display: block; color: #ff8a8d; font-size: 14px; letter-spacing: .02em; margin-bottom: 4px; }
.danger-box p { margin: 0; color: #d9b3b4; font-size: 13.5px; }
.inv-label { color: var(--muted); font-size: 13.5px; margin: 0 0 6px; }
.inv-amount { display: flex; align-items: center; gap: 10px; font: 700 23px/1.2 var(--mono); margin-bottom: 12px; word-break: break-all; }
.copy-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.copy-ic:active { background: var(--surface-3); }
.addr { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; background: #0b0c10; border: 1px solid var(--line); font: 500 13.5px/1.5 var(--mono); color: #c7cad1; word-break: break-all; margin-bottom: 14px; }
.addr span { flex: 1; }
.num-steps { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; counter-reset: n; }
.num-steps li { display: flex; gap: 12px; color: #c7cad1; font-size: 14px; }
.num-steps li::before { counter-increment: n; content: counter(n); width: 22px; height: 22px; border-radius: 6px; background: var(--surface-3); color: var(--blue-text); font-size: 12px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.qr { width: 210px; margin: 0 auto 4px; padding: 12px; background: #fff; border-radius: 14px; }
.qr img, .qr canvas { width: 100% !important; height: auto !important; }
.status-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 2px 0; font-size: 14px; color: var(--muted); }
.status-line .st { display: flex; align-items: center; gap: 8px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--blue-text); animation: pulse 1.4s ease-in-out infinite; }
.pulse.green { background: var(--green); animation: none; }
.pulse.red { background: var(--red); animation: none; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
.success { text-align: center; padding: 18px 0 8px; }
.success .big-ic { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.success h3 { font-size: 21px; font-weight: 800; }
.success p { color: var(--muted); margin: 6px 0 0; }

/* ── Commande ── */
.delivered { margin-top: 10px; }
.unit + .unit { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.unit-no { font: 600 10px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.unit-qr { width: fit-content; max-width: 100%; margin: 12px 0 0; padding: 12px; background: #fff; border-radius: 14px; }
.unit-qr img, .unit-qr canvas { display: block; width: 190px; max-width: 100%; height: auto; }
.unit-qr.is-barcode img { width: auto; max-width: 100%; max-height: 110px; }
.code-err { margin: 0; padding: 4px 8px; color: #111; font-size: 13px; }
.delivered pre a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.delivered pre { margin: 0; padding: 12px 14px; border-radius: 12px; background: #0b0c10; border: 1px solid var(--line); white-space: pre-wrap; word-break: break-all; font: 500 13.5px/1.55 var(--mono); }
.kv { display: grid; gap: 10px; margin: 12px 0; }
.kv div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 14px; min-width: 0; }
.kv span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv b { color: var(--text); text-align: right; }

/* ── SAV ── */
.thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; max-width: 100%; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line-2); }
.msg.user { align-self: flex-end; background: var(--blue-soft); border-color: #1b3a66; border-bottom-right-radius: 6px; }
.msg.admin { align-self: flex-start; border-bottom-left-radius: 6px; }
.msg-author { font-size: 12px; font-weight: 800; color: var(--blue-text); margin-bottom: 2px; }
.msg-body { white-space: pre-wrap; word-break: break-word; }
.msg-meta { font-size: 11px; color: var(--dim); margin-top: 4px; }
.msg-img { margin-top: 8px; border-radius: 10px; max-height: 240px; min-width: 120px; min-height: 80px; object-fit: cover; background: var(--surface); cursor: zoom-in; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer .textarea { min-height: 50px; height: 50px; }
.attach, .send { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; cursor: pointer; }
.attach { border: 1px solid var(--line-2); color: var(--muted); }
.attach input { display: none; }
.send { background: var(--blue); color: #fff; }

/* ── CGV ── */
.terms-body { color: #c7cad1; font-size: 14.5px; }
.terms-body h4 { color: var(--text); font-size: 15px; font-weight: 800; letter-spacing: .02em; margin: 20px 0 6px; text-transform: uppercase; }
.terms-body p { margin: 0 0 8px; white-space: pre-wrap; }
.terms-note { color: var(--dim); font-size: 12.5px; margin: 0 0 10px; }
.terms-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }


.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 16px; }
.lightbox img { max-height: 90vh; border-radius: 12px; }
.toast { position: fixed; left: 50%; top: calc(70px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 90; max-width: calc(100% - 28px); padding: 12px 18px; border-radius: 16px; background: #23262d; border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: fade .2s; text-align: center; }
.toast.ok { background: var(--green-soft); border-color: #1d4a33; color: var(--green); }
.toast.err { background: var(--red-soft); border-color: var(--red-line); color: #ff8a8d; }

@media (max-width: 360px) {
  .brand-text b { max-width: 90px; }
  .pcard-name { font-size: 14px; }
  .price { font-size: 17px; }
}

.insufficient { margin: 4px 0 12px; text-align: center; font-weight: 700; color: var(--red); }

/* Second rang de filtres : les sous-catégories de la catégorie ouverte */
.chips-sub { margin-top: 8px; }
.chips-sub .chip { font-size: 13px; padding: 6px 12px; background: var(--surface-2); }
.chips-sub .chip.active { background: var(--blue); color: #fff; }

/* Le logo du pack Telegram a déjà sa propre pastille ronde : on efface la nôtre,
   et on masque le symbole texte (S, Ξ, ₮…) qui se voyait à travers l'animation.
   Si le logo ne charge pas, la règle ne s'applique plus et le symbole revient. */
.coin:has(img), .coin:has(.coin-anim) { background: none; color: transparent; }

.coin .e-coin { width: 70%; height: 70%; display: block; }
.coin .e-coin img, .coin .e-coin svg { width: 100%; height: 100%; }
