/* Jingi Trade · cagnotte. Rampe graphite, un seul accent (orange Jingi), chiffres en mono comme sur un terminal. */
:root {
  --bg-deep: #0c0c0d;
  --bg: #111112;
  --card: #161618;
  --raised: #1f1f22;
  --hover: #27272a;
  --line: rgba(237, 237, 237, 0.07);
  --line-2: rgba(237, 237, 237, 0.13);
  --text: #ededed;
  --text-2: #a1a1a6;
  --muted: #85858b;
  --accent: #ff5a1f;
  --accent-ink: #141415;
  --jingi: #4a4a50; /* part de Jingi dans la barre de partage */
  --pos: #4cc38a;
  --neg: #e5484d;
  --warn: #d9a441;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14px/20px var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
b { font-weight: 500; }
h1, h2, h3 { margin: 0; font-weight: 500; }
h2 { font-size: 13px; line-height: 20px; color: var(--text); }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.sm { width: 14px; height: 14px; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- coque ---------- */
.app { height: 100dvh; display: grid; grid-template-rows: 52px 36px minmax(0, 1fr); }
.top { display: flex; align-items: center; gap: 24px; padding: 0 20px; background: var(--bg-deep); border-bottom: 1px solid var(--line); min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex: none; }
.brand img { display: block; }
.wm { display: inline-flex; align-items: baseline; gap: 6px; line-height: 1; }
.wm b { font: 600 18px/1 var(--sans); letter-spacing: -0.02em; }
.wm-t { font: 500 13px/1 var(--mono); color: var(--text-2); padding: 3px 6px; border: 1px solid var(--line-2); border-radius: 4px; transform: translateY(-1px); }
.views-nav { display: flex; gap: 4px; }
.vtab { height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 500 13px/1 var(--sans); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: background-color 150ms var(--ease), color 150ms var(--ease); white-space: nowrap; }
.vtab:hover { color: var(--text-2); background: rgba(237, 237, 237, 0.04); }
.vtab[aria-pressed='true'] { color: var(--text); background: var(--raised); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.live { display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1 var(--mono); color: var(--text-2); white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--muted); flex: none; }
.dot.on { background: var(--pos); }
.dot.off { background: var(--warn); }
.lang { display: flex; padding: 2px; border: 1px solid var(--line); border-radius: 8px; }
.lang button { height: 24px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font: 500 12px/1 var(--mono); transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.lang button[aria-pressed='true'] { background: var(--raised); color: var(--text); }

.ticker { display: flex; align-items: center; gap: 28px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--bg-deep); font-size: 12px; line-height: 16px; white-space: nowrap; overflow: hidden; }
.pairs { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pairs::-webkit-scrollbar { display: none; }
.pair { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; flex: none; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--text); font: 500 12px/1 var(--mono); white-space: nowrap; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.pair.on { background: var(--raised); border-color: var(--line-2); }
.pair:disabled { color: var(--muted); cursor: not-allowed; }
.mkt-ico { width: 14px; height: 14px; flex: none; }
.pair-soon { padding: 3px 5px; border-radius: 4px; background: var(--hover); color: var(--text-2); font: 500 10px/1 var(--sans); }
.tk { display: inline-flex; gap: 8px; align-items: baseline; }
.tk-l { color: var(--muted); }
.tk b { font-weight: 500; }
.tk-end { margin-left: auto; }
.flash-up { animation: flashUp 900ms var(--ease); }
.flash-down { animation: flashDown 900ms var(--ease); }
@keyframes flashUp { from { color: var(--pos); } }
@keyframes flashDown { from { color: var(--neg); } }

/* ---------- boutons ---------- */
.btn { height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 14px/1 var(--sans); white-space: nowrap; transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease), opacity 150ms var(--ease), transform 120ms var(--ease); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.btn-primary:hover:not(:disabled) { background: #ff6a33; }
.btn-quiet { background: var(--raised); border-color: var(--line); color: var(--text); }
.btn-quiet:hover:not(:disabled) { background: var(--hover); }
.btn-wallet { height: 32px; padding: 0 12px; font-size: 13px; background: var(--text); color: var(--accent-ink); border-radius: 8px; }
.btn-wallet:hover { background: #ffffff; }
.btn-wallet.connected { background: var(--raised); color: var(--text); border-color: var(--line); }
.btn-wallet img { width: 16px; height: 16px; border-radius: 4px; }
.icon-btn { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.icon-btn:hover { background: var(--raised); color: var(--text); }
.link { border: 0; background: none; padding: 0; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; text-decoration: none; transition: color 150ms var(--ease); }
.link:hover { color: var(--text); }

/* ---------- vue cagnotte ---------- */
.main { min-height: 0; display: grid; grid-template-columns: minmax(360px, 420px) minmax(0, 1fr); gap: 16px; padding: 16px 20px 20px; max-width: 1640px; width: 100%; margin: 0 auto; }
.col-act, .col-data { min-height: 0; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 16px 0; }
.card-head .muted { font-size: 12px; line-height: 16px; }

.hero { padding: 8px 4px 0; }
.hero h1 { font-size: 22px; line-height: 28px; letter-spacing: -0.015em; white-space: nowrap; }
.accent-num { font-style: normal; color: var(--accent); font-variant-numeric: tabular-nums; }
.sub { margin: 12px 0 0; color: var(--text-2); font-size: 14px; line-height: 21px; max-width: 34rem; }

.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.seg button { position: relative; z-index: 1; height: 32px; border: 0; background: transparent; color: var(--muted); border-radius: 7px; font: 500 13px/1 var(--sans); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: color 150ms var(--ease); }
.seg button:hover { color: var(--text-2); }
.seg button[aria-selected='true'], .seg button[aria-pressed='true'] { color: var(--text); }
.seg-ink { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; border-radius: 7px; background: var(--raised); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); transition: transform 280ms var(--ease); }
.seg.small { padding: 2px; border-radius: 8px; }
.seg.small button[aria-pressed='true'] { background: var(--raised); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.seg.small button { height: 26px; padding: 0 10px; font-size: 12px; border-radius: 6px; }

.pane { padding: 16px 4px 4px; display: flex; flex-direction: column; gap: 16px; flex: 1; min-height: 0; }
.pane.enter { animation: paneIn 320ms var(--ease); }
@keyframes paneIn { from { opacity: 0; transform: translateY(6px); } }


input[type='range'] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; margin: 0; }
input[type='range']::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--fill, var(--text-2)) 0 var(--p, 0%), var(--line-2) var(--p, 0%)); }
input[type='range']::-moz-range-track { height: 4px; border-radius: 2px; background: var(--raised); }
input[type='range']::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 8px; background: var(--text); border: 0; box-shadow: 0 0 0 4px var(--card); }
input[type='range']::-moz-range-thumb { width: 16px; height: 16px; border-radius: 8px; background: var(--text); border: 0; }

/* Barre de partage : signature de la cagnotte */
.split { position: relative; height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; display: flex; gap: 2px; }
.split span { height: 100%; flex: none; width: 100%; transform-origin: left center; transition: transform 420ms var(--ease); }
.split-you { background: var(--accent); border-radius: 4px 0 0 4px; }
.split-jingi { position: absolute; inset: 0; background: var(--jingi); border-radius: 0 4px 4px 0; transform-origin: right center !important; }
.split.big { height: 12px; border-radius: 6px; }
.split-legend { display: flex; justify-content: space-between; font-size: 12px; line-height: 16px; color: var(--text-2); }
.split-legend b { color: var(--text); margin-left: 4px; }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.sw.you { background: var(--accent); }
.sw.jingi { background: var(--jingi); }


.rows { margin: 0; display: flex; flex-direction: column; }
.rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 18px; }
.rows > div:last-child { border-bottom: 0; }
.rows dt { color: var(--text-2); }
.rows dd { margin: 0; text-align: right; }
.rows .total dd { font-size: 15px; font-weight: 500; }
.rows.dim dd { color: var(--muted); }
.rows.tight > div { padding: 8px 0; }

.addr { font-size: 12px; color: var(--text-2); }
.tag { font: 400 12px/1 var(--mono); color: var(--muted); }

/* ---------- données ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.label { font-size: 12px; line-height: 16px; color: var(--muted); }
.fig { font-size: 24px; line-height: 28px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { font-size: 12px; line-height: 16px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chart-card { flex: 1; min-height: 200px; display: flex; flex-direction: column; }
.chart { position: relative; flex: 1; min-height: 0; margin: 8px 0 0; }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.chart .grid line { stroke: var(--line); }
.chart .axis text { fill: var(--muted); font: 400 11px/1 var(--mono); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .base { stroke: var(--line-2); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.chart .cross { stroke: var(--line-2); vector-effect: non-scaling-stroke; }
.chart .knob { fill: var(--accent); stroke: var(--card); stroke-width: 3; }
.chart .flow { fill: var(--text-2); }
.chart .draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 900ms var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .empty { fill: var(--muted); font: 400 13px var(--sans); }
.tip { position: absolute; pointer-events: none; padding: 8px 10px; background: var(--raised); border: 1px solid var(--line-2); border-radius: 8px; font: 400 12px/16px var(--mono); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.tip b { display: block; font-size: 13px; color: var(--text); }
.tip span { color: var(--muted); }

.bottom { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; height: 236px; flex: none; }
.ledger, .bot { display: flex; flex-direction: column; min-height: 0; }
.ledger-list { list-style: none; margin: 8px 0 0; padding: 0 16px 8px; overflow: hidden; flex: 1; }
.ledger-list li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; height: 36px; border-bottom: 1px solid var(--line); font-size: 13px; animation: rowIn 360ms var(--ease) both; }
.ledger-list li:last-child { border-bottom: 0; }
.ledger-list .lk { width: 20px; height: 20px; border-radius: 6px; display: grid; place-content: center; background: var(--raised); color: var(--text-2); }
.ledger-list .lk .icon { width: 12px; height: 12px; }
.ledger-list .lk.in { color: var(--text); }
.ledger-list .lk.out { color: var(--accent); }
.ledger-list .lt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.ledger-list .lt b { color: var(--text); font-weight: 500; }
.ledger-list .lv { font: 400 12px/1 var(--mono); color: var(--muted); display: inline-flex; gap: 10px; align-items: center; }
.ledger-list .lv a { color: var(--muted); display: inline-flex; }
.ledger-list .lv a:hover { color: var(--text); }
.ledger-list .none { display: block; height: auto; padding: 12px 0; color: var(--muted); border: 0; animation: none; }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px); } }
.bot { padding-bottom: 14px; }
.bot .rows { padding: 0 16px; flex: 1; }
.bot-state { margin: 12px 16px 4px; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.bot .link { margin: 0 16px; }

/* ---------- à propos ---------- */
.about { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); align-items: stretch; }
.about-intro { display: flex; flex-direction: column; gap: 0; padding: 12px 4px; }
.about-intro h1 { font-size: 28px; line-height: 34px; letter-spacing: -0.015em; text-wrap: balance; }
.about-split { margin-top: 24px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); display: flex; flex-direction: column; gap: 12px; }
.about-split p { margin: 0; font-size: 12px; }
.about-split .rows { margin-top: 4px; border-top: 1px solid var(--line); }
.ex-h dt { color: var(--text) !important; font-weight: 500; }
.about-list { padding: 4px 20px; align-self: start; }
.rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
.rules li { display: grid; grid-template-columns: 28px 136px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 19px; animation: rowIn 360ms var(--ease) both; }
.rules li:nth-child(n + 2) { animation-delay: 40ms; }
.rules li:nth-child(n + 5) { animation-delay: 80ms; }
.rules b { font-size: 14px; color: var(--text); }
.rules span:last-child { color: var(--text-2); }
.rule-n { font-size: 12px; color: var(--accent); align-self: center; display: inline-flex; }
.rules li.warn .rule-n { color: var(--warn); }
.rules li.warn .icon { width: 14px; height: 14px; }
/* ---------- fenêtres ---------- */
.sheet { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: var(--card); color: var(--text); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5); }
.sheet[open] { animation: sheetIn 260ms var(--ease); }
.sheet::backdrop { background: rgba(8, 8, 9, 0.66); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(8px) scale(0.99); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 20px; }
.sheet-head h2 { font-size: 15px; }
.sheet-sub { padding: 12px 20px 4px; font-size: 12px; color: var(--muted); }
.sheet-note { margin: 0; padding: 12px 20px 20px; font-size: 12px; line-height: 18px; color: var(--muted); }
.wallets { padding: 8px 12px 0; display: flex; flex-direction: column; gap: 2px; }
.wallets button, .wallets a { height: 44px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-size: 14px; transition: background-color 150ms var(--ease); animation: rowIn 300ms var(--ease) both; }
.wallets button:hover, .wallets a:hover { background: var(--raised); }
.wallets img, .wallets .wl { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.wallets .wl { display: grid; place-content: center; background: var(--raised); color: var(--text-2); font: 500 12px/1 var(--mono); }
.wallets .wd { margin-left: auto; font: 400 12px/1 var(--mono); color: var(--muted); }
.wallets .wd.ok { color: var(--pos); }
.wallets.more { display: grid; grid-template-columns: repeat(2, 1fr); }
.wallets .none { padding: 8px; color: var(--muted); font-size: 13px; }
.qr-wrap { padding: 12px 20px 0; display: grid; place-content: center; }
.qr { width: 232px; height: 232px; padding: 12px; background: #ededed; border-radius: 12px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr-what { text-align: center; padding: 12px 20px 0; font-size: 14px; }
.addr-copy { margin: 12px 20px 0; width: calc(100% - 40px); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text-2); display: flex; gap: 10px; align-items: center; font-size: 12px; text-align: left; word-break: break-all; transition: border-color 150ms var(--ease), color 150ms var(--ease); }
.addr-copy:hover { border-color: var(--line-2); color: var(--text); }
.addr-copy span { flex: 1; }
.steps { list-style: none; margin: 0; padding: 12px 20px 4px; display: flex; flex-direction: column; gap: 0; }
.steps li { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; color: var(--muted); font-size: 14px; transition: color 200ms var(--ease); }
.steps li + li::before { content: ''; position: absolute; left: 7px; top: -12px; height: 24px; width: 2px; background: var(--line-2); }
.st-dot { width: 16px; height: 16px; border-radius: 8px; border: 2px solid var(--line-2); flex: none; transition: background-color 200ms var(--ease), border-color 200ms var(--ease); position: relative; z-index: 1; background: var(--card); }
.steps li.now { color: var(--text); }
.steps li.now .st-dot { border-color: var(--accent); animation: ring 1.4s var(--ease) infinite; }
.steps li.done { color: var(--text-2); }
.steps li.done .st-dot { background: var(--accent); border-color: var(--accent); }
.steps li.fail { color: var(--neg); }
.steps li.fail .st-dot { border-color: var(--neg); }
@keyframes ring { 50% { box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.18); } }
#tx-link { margin: 0 20px 20px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 14px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line-2); font-size: 13px; z-index: 10; animation: sheetIn 220ms var(--ease); }
.toast.err { color: var(--neg); }

/* Entrée unique au chargement */
.rise { animation: rise 460ms var(--ease) both; }
.col-act .rise:nth-child(2), .about-grid .rise:nth-child(2) { animation-delay: 50ms; }
.col-data .rise:nth-child(1), .about-grid .rise:nth-child(3) { animation-delay: 80ms; }
.col-data .rise:nth-child(2), .about-grid .rise:nth-child(4) { animation-delay: 130ms; }
.col-data .rise:nth-child(3), .about-grid .rise:nth-child(n + 5) { animation-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- écrans moyens ---------- */
@media (max-height: 820px) and (min-width: 1001px) {
  .hero h1 { font-size: 18px; line-height: 24px; }
  .sub { margin-top: 8px; font-size: 13px; line-height: 19px; }
  .bottom { height: 200px; }
  .rows.tight > div { padding: 5px 0; }
  .bot-state { margin-top: 8px; }
  .ledger-list li { height: 32px; }
  .pane { gap: 12px; }
}
@media (max-width: 1280px) and (min-width: 1001px) {
  .kpi:nth-child(4) { display: none; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
  .rules { grid-template-columns: 1fr; }
  .live { display: none; }
}

/* ---------- téléphone : une vue à la fois, barre en bas, pas de défilement de page ---------- */
.mob-nav { display: none; }
@media (max-width: 1000px) {
  .app { grid-template-rows: 52px 32px minmax(0, 1fr) calc(56px + env(safe-area-inset-bottom)); }
  .top { padding: 0 16px; gap: 12px; }
  .views-nav, .live, .ticker > :nth-child(n + 5) { display: none; }
  .ticker { padding: 0 16px; gap: 20px; }
  .wm-t { display: none; }
  .btn-wallet span { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
  .top-right { gap: 6px; min-width: 0; }
  .main { grid-template-columns: 1fr; padding: 12px 16px; overflow: hidden; }
  .main > section { min-height: 0; overflow-y: auto; scrollbar-width: none; }
  .main > section::-webkit-scrollbar { display: none; }
  body[data-m='act'] .col-data, body[data-m='data'] .col-act { display: none; }
  .hero h1 { font-size: 18px; line-height: 24px; }
  .sub { margin-top: 8px; font-size: 13px; line-height: 19px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .fig { font-size: 20px; line-height: 24px; }
  .chart-card { min-height: 220px; }
  .bottom { grid-template-columns: 1fr; height: auto; }
  .ledger-list { max-height: 216px; }
  .bot { display: none; }
  .about { grid-template-columns: 1fr; }
  .about-intro h1 { font-size: 22px; line-height: 28px; }
  .about-split { margin-top: 16px; }
  .rules { grid-template-columns: 1fr; }
  .rules li { grid-template-columns: 24px 104px minmax(0, 1fr); }
  .mob-nav { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg-deep); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .mob-nav button { border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; line-height: 14px; transition: color 150ms var(--ease); }
  .mob-nav button[aria-pressed='true'] { color: var(--text); }
  .mob-nav .icon { width: 18px; height: 18px; }
}
@media (max-width: 1000px) and (max-height: 720px) {
  .hero { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .chart .draw { stroke-dashoffset: 0; }
}
.about { align-content: center; }

/* « beta » écrit au stylo à côté du logo */
.beta { font: 600 20px/1 'Caveat', cursive; color: var(--accent); transform: rotate(-9deg) translate(-2px, -7px); display: inline-block; letter-spacing: 0.01em; margin-left: -2px; pointer-events: none; user-select: none; }
@media (max-width: 1000px) {
  /* Téléphone : « Bientôt » dans l'infobulle, la pastille grisée suffit */
  .pair-soon { display: none; }
  .pair:disabled { opacity: 0.55; }
  .ticker .tk-l[data-i18n='tkMark'] { display: none; }
}

/* Déposants : liste défilante, adresses vers Solscan */
.ledger-list.people { overflow-y: auto; scrollbar-width: thin; }
.ledger-list.people .lk { font: 500 11px/1 var(--mono); }
.ledger-list.people .lt .muted { font-size: 12px; }
.ledger-list.people .lv b { color: var(--text); font-weight: 500; }
.ledger-list li.op .lk img { display: block; }
.addr-link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.addr-link:hover { text-decoration-color: currentColor; }
#ledger-tabs button span.num { margin-left: 4px; }

/* Menu du wallet connecté */
.wallet-wrap { position: relative; }
.wmenu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 260px; padding: 6px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--card); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45); display: grid; gap: 2px; }
.wmenu[hidden] { display: none; }
.wm-addr { padding: 8px 10px 10px; font-size: 11px; line-height: 15px; color: var(--muted); word-break: break-all; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.wmenu button, .wmenu a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 13px; text-align: left; text-decoration: none; }
.wmenu button:hover, .wmenu a:hover { background: var(--raised); }
.wmenu .wm-out { color: var(--neg); }

/* Ma part : demande de retrait en cours, valeur en direct */
.live-tag { display: inline-flex; align-items: center; gap: 5px; color: var(--pos); }
.live-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--pos); }

/* À propos : l'icône reste alignée sur le titre quand le texte passe sur plusieurs lignes */
.rules li.warn .rule-n { align-self: start; margin-top: 2px; }

/* Solde du wallet connecté : en haut de la colonne, à la place de l'accroche */
.bal { padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.bal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bal-addr { height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text-2); font-size: 12px; cursor: pointer; transition: color 150ms var(--ease), border-color 150ms var(--ease); }
.bal-addr:hover { color: var(--text); border-color: var(--line-2); }
.bal-value { margin-top: 4px; font-size: 40px; line-height: 48px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bal-res { font-size: 13px; line-height: 20px; color: var(--text-2); }
.bal-res b { font-weight: 500; }
.bal-res .pos { color: var(--pos); }
.bal-res .neg { color: var(--neg); }
.bal-rows { margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); padding-top: 12px; gap: 12px; }
.bal-rows div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bal-rows dt { font-size: 12px; line-height: 16px; color: var(--muted); }
.bal-rows dd { margin: 0; font-size: 13px; line-height: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal.flash .bal-value { animation: bal-in 600ms var(--ease); }
@keyframes bal-in { from { opacity: 0; transform: translateY(6px); } }
.btn-wallet .w-bal { padding-left: 8px; margin-left: 2px; border-left: 1px solid var(--line-2); color: var(--text); font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .btn-wallet .w-bal { display: none; } .bal-value { font-size: 36px; line-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .bal.flash .bal-value { animation: none; } }

/* Petit téléphone : l'en-tête tenait 427 px pour 390 (bouton wallet coupé) */
@media (max-width: 440px) {
  .top { gap: 6px; }
  .brand .beta { display: none; }
  .lang button { width: 26px; padding: 0; }
}
.wallets.more button span:not(.wd) { white-space: nowrap; }

/* ---------- 17/11 : dépôt et choix du wallet sans défilement, à toutes les tailles ---------- */
.hero h1 { white-space: normal; text-wrap: balance; }

/* Simulateur repliable : une ligne « +10 % → vous 4,00 $ », le curseur à l'ouverture */
input[type='range']::-moz-range-track { background: var(--line-2); }
input[type='range']::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--fill, var(--text-2)); }

/* Montant : bordure d'accent au focus, rouge quand le bouton refuse (minimum, solde) */
#tk-upd.warn { color: var(--warn); }

/* Toast dans la couche supérieure (popover) : au-dessus du voile des fenêtres */
.toast[popover] { inset: auto auto 24px 50%; margin: 0; color: var(--text); overflow: visible; }
.toast.err[popover] { color: var(--neg); }

/* Bureau : le bouton d'action reste toujours visible, le volet se comprime au lieu de déborder */
@media (min-width: 1001px) {
  .col-act { overflow: hidden; }
  .pane { overflow-y: auto; scrollbar-width: none; }
  .pane::-webkit-scrollbar { display: none; }
}
@media (max-height: 820px) and (min-width: 1001px) {
  .bal { padding: 12px 16px; }
  .bal-value { font-size: 28px; line-height: 32px; margin-top: 0; }
  .bal-rows { margin-top: 8px; padding-top: 8px; }
}

/* Choix du wallet : jamais coupé ; la liste passe sur deux colonnes au lieu de défiler */
.sheet[open] { max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
#wallets, #wallets-more { min-height: 0; }
.wallets:has(> :nth-child(5)), .wallets.more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wallets button > span:not(.wd), .wallets a > span:not(.wd) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallets .wd { flex: none; white-space: nowrap; }

/* Téléphone : dépôt compact (accroche, détail du solde et simulateur repliés), cibles de 44 px */
@media (max-width: 1000px) {
  .hero .sub { display: none; }
  .bal { padding: 12px 16px; }
  .bal-value { font-size: 28px; line-height: 32px; margin-top: 0; }
  .bal-rows { display: none; }
  .wmenu button, .wmenu a { height: 44px; }
}
@media (max-width: 600px) {
  .sheet { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .sheet[open] { animation: sheetUp 260ms var(--ease); }
  .wallets.more .wd, .wallets:has(> :nth-child(5)) .wd { display: none; }
  .wallets button, .wallets a { min-height: 48px; }
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } }
@media (max-width: 1000px) and (max-height: 720px) {
  .hero { display: none; }
  .pane { gap: 12px; padding-top: 12px; }
}

/* Bouton principal bloqué (minimum, solde) : surface neutre lisible au lieu d'un orange délavé */
.btn-primary:disabled { background: var(--raised); color: var(--text-2); border-color: var(--line); box-shadow: none; opacity: 1; }

/* Barre du haut : le lieu du bot à la place de l'ancien sélecteur SOL */
.tk-venue { display: inline-flex; align-items: center; gap: 8px; flex: none; height: 22px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-2); font-size: 12px; white-space: nowrap; }
@media (max-width: 1000px) { .tk-venue span:last-child { display: none; } .tk-venue { padding: 0 7px; } }

/* ================= 19/11 : guichet refait (déposer, retirer, ma part) =================
   Simple et lisible : un onglet souligné, un champ par action, un reçu, un encadré d'état qui dit quoi faire. */
.act { padding: 0; display: flex; flex-direction: column; min-height: 0; flex: 0 1 auto; overflow: hidden; }
.g-tabs { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); flex: none; }
.g-tabs button { height: 48px; border: 0; background: transparent; color: var(--muted); font: 500 13px/1 var(--sans); display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: color 150ms var(--ease), background-color 150ms var(--ease); }
.g-tabs button:hover { color: var(--text-2); background: rgba(237, 237, 237, 0.02); }
.g-tabs button[aria-selected='true'] { color: var(--text); }
.g-tabs button[aria-selected='true'] .icon { color: var(--accent); }
.g-tabs .seg-ink { position: absolute; left: 0; bottom: -1px; top: auto; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: none; transition: transform 280ms var(--ease), width 280ms var(--ease); }

.pane { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.pane > * { flex-shrink: 0; }
.g-label { font-size: 12px; line-height: 16px; color: var(--muted); }

/* Champ : montant ou part, puces dessous */
.g-field { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; transition: border-color 150ms var(--ease); }
.g-field:focus-within { border-color: rgba(255, 90, 31, 0.45); }
.g-field.err, .g-field.err:focus-within { border-color: rgba(229, 72, 77, 0.6); }
.g-field-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.g-amount { display: flex; align-items: baseline; gap: 10px; cursor: text; }
.g-amount input { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; font: 500 40px/48px var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.g-amount input:focus-visible { outline: none; }
.g-unit { font: 500 15px/1 var(--mono); color: var(--text-2); }
.g-field.err .g-amount input { color: var(--neg); }
.g-field-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: -6px; font-size: 12px; line-height: 16px; color: var(--muted); }
.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.chips button { height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--text-2); font: 500 12px/1 var(--mono); transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease); }
.chips button:hover { color: var(--text); background: var(--raised); }
.chips button.on, .chips button[aria-pressed='true'] { color: var(--text); background: var(--raised); border-color: var(--line-2); }

/* Choix du jeton */
.tok-switch { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.tok-switch button { height: 26px; padding: 0 10px 0 4px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--mono); transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.tok-switch button:hover { color: var(--text-2); }
.tok-switch button[aria-checked='true'] { background: var(--raised); color: var(--text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.tok-ico { width: 18px; height: 18px; flex: none; }
.tok-switch button[aria-checked='false'] .tok-ico { filter: grayscale(1); opacity: 0.6; }

/* Simulateur : une ligne, le curseur à l'ouverture */
.sim { border: 1px solid var(--line); border-radius: 12px; }
.sim > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; cursor: pointer; border-radius: 11px; font-size: 13px; color: var(--text-2); transition: background-color 150ms var(--ease); }
.sim > summary::-webkit-details-marker { display: none; }
.sim > summary:hover { background: rgba(237, 237, 237, 0.025); }
.sim-ico { color: var(--muted); }
.sim-q { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sim-q b { color: var(--text); white-space: nowrap; }
.sim-sum { margin-left: auto; font-size: 12px; white-space: nowrap; }
.sim-sum b { color: var(--pos); font-weight: 500; margin-left: 4px; }
.sim[open] .sim-sum { visibility: hidden; }
.sim-chev { color: var(--muted); transition: transform 200ms var(--ease); }
.sim[open] .sim-chev { transform: rotate(180deg); }
.sim-body { display: flex; flex-direction: column; gap: 10px; padding: 2px 12px 12px; }
.sim-body input[type='range'] { --fill: var(--text-2); }

/* Note et boutons */
.g-note { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 17px; color: var(--muted); }
.g-note .icon { margin-top: 1px; }
.g-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: auto; padding-top: 4px; }
.g-actions .btn { height: 48px; border-radius: 12px; }
.g-actions .btn-primary { font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.g-actions .btn-primary span { overflow: hidden; text-overflow: ellipsis; }
.g-actions.solo { grid-template-columns: 1fr; }
.g-actions.solo .btn-quiet { display: none; }
.g-foot { margin: -4px 0 0; font-size: 11px; line-height: 16px; color: var(--muted); text-align: center; }
.g-foot:empty { display: none; }

/* Retrait : part choisie au curseur, reçu, encadré d'état */
.w-pct { font: 500 28px/32px var(--mono); letter-spacing: -0.02em; color: var(--text); }
.w-range { --fill: var(--accent); }
.w-range::-webkit-slider-thumb { background: var(--accent) !important; box-shadow: 0 0 0 4px var(--bg) !important; }
.w-range::-moz-range-thumb { background: var(--accent) !important; }
.w-receipt { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.w-get { display: flex; flex-direction: column; gap: 2px; padding: 14px 14px 12px; }
.w-get b { font: 500 32px/38px var(--mono); letter-spacing: -0.02em; color: var(--text); transition: color 150ms var(--ease); }
.w-to { font-size: 12px; line-height: 16px; color: var(--text-2); }
.w-lines { margin: 0; padding: 4px 14px; border-top: 1px dashed var(--line-2); background: rgba(237, 237, 237, 0.015); }
.w-lines > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 12px; line-height: 16px; }
.w-lines dt { color: var(--muted); }
.w-lines dd { margin: 0; color: var(--text-2); }
.w-receipt.dim .w-get b { color: var(--muted); }
.w-receipt.dim .w-lines { display: none; }

.g-callout { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--raised); font-size: 12px; line-height: 17px; color: var(--text-2); }
.g-callout > .icon { margin-top: 1px; color: var(--text-2); }
.g-callout b { display: block; font-size: 13px; line-height: 18px; color: var(--text); margin-bottom: 2px; }
.g-callout p { margin: 0; }
.g-callout[data-tone='ok'] > .icon { color: var(--pos); }
.g-callout[data-tone='wait'] > .icon { color: var(--accent); }
.g-callout[data-tone='warn'] { border-color: rgba(217, 164, 65, 0.28); background: rgba(217, 164, 65, 0.07); }
.g-callout[data-tone='warn'] > .icon, .g-callout[data-tone='warn'] b { color: var(--warn); }

/* Ma part */
.mine-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 12px 8px; text-align: center; color: var(--text-2); font-size: 13px; line-height: 19px; }
.mine-empty p { margin: 0; max-width: 28ch; }
.me-ico { width: 44px; height: 44px; border-radius: 50%; display: grid; place-content: center; background: var(--raised); border: 1px solid var(--line); color: var(--text-2); }
.me-ico .icon { width: 20px; height: 20px; }
.mine-empty > .btn { width: 100%; height: 44px; }
.me-or { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 10px; width: 100%; }
.me-or::before, .me-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.peek { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; }
.peek input { height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: 400 13px/1 var(--mono); min-width: 0; transition: border-color 150ms var(--ease); }
.peek input:focus { border-color: rgba(255, 90, 31, 0.45); }
.peek .btn { width: 44px; height: 44px; padding: 0; }
.mine { display: flex; flex-direction: column; }
.mine-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mine-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.mine-who .addr { height: 24px; padding: 0 8px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.mine-head .link { font-size: 12px; }
.tag { font: 400 12px/1 var(--mono); color: var(--muted); }
.mine-value { margin-top: 16px; font-size: 40px; line-height: 48px; font-weight: 500; letter-spacing: -0.03em; }
.mine-sub { font-size: 13px; line-height: 20px; color: var(--text-2); }
.mine-req { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--raised); color: var(--text-2); font-size: 12px; line-height: 17px; }
.mine-grid { margin: 16px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.mine-grid > div { display: flex; flex-direction: column; gap: 4px; padding: 12px; background: var(--card); min-width: 0; }
.mine-grid dt { font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine-grid dd { margin: 0; font-size: 14px; line-height: 18px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Bureau : bouton toujours visible, le volet se comprime */
@media (min-width: 1001px) {
  .g-actions { position: sticky; bottom: 0; background: var(--card); padding-top: 8px; }
}
@media (max-height: 820px) and (min-width: 1001px) {
  .pane { gap: 10px; padding: 12px 14px 14px; }
  .g-amount input { font-size: 32px; line-height: 40px; }
  .g-field { padding: 12px; gap: 8px; }
  .w-get b { font-size: 28px; line-height: 32px; }
  .mine-value { font-size: 32px; line-height: 40px; margin-top: 12px; }
  .g-tabs button { height: 44px; }
}
/* Téléphone : cibles de 44 px, bouton collé en bas */
@media (max-width: 1000px) {
  .act { flex: 1; }
  .g-tabs button { height: 48px; }
  .chips button { height: 40px; font-size: 13px; }
  .g-amount input { font-size: 34px; line-height: 42px; }
  .g-actions { position: sticky; bottom: 0; background: var(--card); padding-top: 8px; }
}
@media (max-width: 480px) {
  .g-tabs button .icon { display: none; }
  .g-actions .btn-quiet { width: 48px; padding: 0; }
  .g-actions .btn-quiet span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .sim-sum span { display: none; }
  .w-lines > div { font-size: 12px; }
}
@media (max-width: 1000px) and (max-height: 720px) {
  .pane { gap: 10px; padding: 12px; }
  .w-get b { font-size: 26px; line-height: 30px; }
}
