/* Jingi Trade · jeton JINGI. Même identité que la cagnotte : rampe graphite, un seul accent (orange Jingi),
   chiffres en mono comme sur un terminal. La page est une application : rien ne défile hors des panneaux. */
: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: #8e8e94;
  --accent: #ff5a1f;
  --accent-ink: #141415;
  --jingi: #4a4a50; /* part de Jingi dans les barres 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 { -webkit-text-size-adjust: 100%; }
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; }
a { color: inherit; }
p { margin: 0; }
dl, dd { margin: 0; }
.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, h3 { font-size: 14px; 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; }
.label { font-size: 12px; line-height: 16px; color: var(--muted); }

/* ---------- coque ---------- */
.app { height: 100vh; height: 100dvh; display: grid; grid-template-rows: 52px minmax(0, 1fr); }
.top { position: relative; z-index: 20; 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; }
.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; }
.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: 8px; 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); }
.net-badge { padding: 3px 5px; border: 1px solid var(--line-2); border-radius: 4px; color: var(--text-2); font: 500 10px/1 var(--mono); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.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); }
.dot { width: 8px; height: 8px; border-radius: 4px; background: var(--muted); flex: none; display: inline-block; }
.dot.on { background: var(--pos); }
.dot.off { background: var(--warn); }

/* ---------- 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; text-decoration: none; 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.45; 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-primary:disabled { opacity: 1; background: var(--raised); border-color: var(--line); color: var(--muted); box-shadow: none; }
.btn-primary:focus-visible { outline-color: var(--text); }
.btn-quiet { background: var(--raised); border-color: var(--line); color: var(--text); }
.btn-quiet:hover:not(:disabled) { background: var(--hover); }
.btn-big { min-height: 48px; height: auto; width: 100%; padding: 8px 16px; font-size: 15px; line-height: 20px; border-radius: 10px; white-space: normal; text-align: center; text-wrap: balance; }
.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); font-family: var(--mono); }
.btn-wallet.connected:hover { background: var(--hover); }
.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; text-decoration: none; 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; line-height: 20px; text-decoration: none; transition: color 150ms var(--ease); }
.link:hover { color: var(--text); }

/* 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; animation: paneIn 200ms var(--ease); }
.wm-addr { padding: 8px 10px 10px; font-size: 11px; line-height: 16px; 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: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 13px; text-align: left; text-decoration: none; transition: background-color 150ms var(--ease); }
.wmenu button:hover, .wmenu a:hover { background: var(--raised); }
.wmenu .icon { color: var(--muted); }
.wmenu .wm-out, .wmenu .wm-out .icon { color: var(--neg); }

/* ---------- gabarit des vues ---------- */
.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; min-width: 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: baseline; justify-content: space-between; gap: 12px; }
.card-head .muted { font-size: 12px; line-height: 16px; }
.card-head h2 { display: inline-flex; align-items: baseline; gap: 8px; }
.card-head h2 .num { font-size: 12px; font-weight: 400; }

.rows { margin: 0; display: flex; flex-direction: column; }
.rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 20px; }
.rows > div:last-child { border-bottom: 0; }
.rows dt { color: var(--text-2); min-width: 0; }
.rows dd { margin: 0; text-align: right; white-space: nowrap; }
.rows .total dt { color: var(--text); }
.rows .total dd { font-size: 16px; font-weight: 500; }
.rows.tight > div { padding: 6px 0; }
.dt-note { display: block; color: var(--muted); font-size: 12px; }
.hint { color: var(--muted); font-size: 12px; line-height: 16px; text-wrap: pretty; }

.hero { padding: 8px 4px 0; }
.hero h1 { font-size: 22px; line-height: 28px; letter-spacing: -0.015em; text-wrap: balance; }
.sub { margin-top: 12px; color: var(--text-2); font-size: 14px; line-height: 20px; max-width: 34rem; text-wrap: pretty; }

/* ---------- guichet : swap USDG ⇄ JINGI ---------- */
.act { padding: 12px; display: flex; flex-direction: column; min-height: 0; flex: none; }
.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; flex: none; }
.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'] { color: var(--text); }
.seg-ink { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 2); border-radius: 7px; background: var(--raised); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); transition: transform 280ms var(--ease); }
.seg[data-i='1'] .seg-ink { transform: translateX(100%); }
.seg-n { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 16px; font-weight: 500; text-align: center; }

.pane { padding: 12px 4px 4px; display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.pane::-webkit-scrollbar { display: none; }
.pane.enter { animation: paneIn 280ms var(--ease); }
@keyframes paneIn { from { opacity: 0; transform: translateY(6px); } }

.swap-boxes { position: relative; display: flex; flex-direction: column; gap: 4px; }
.sbox { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; transition: border-color 150ms var(--ease); }
.sbox.pay { cursor: text; }
.sbox.pay:focus-within { border-color: var(--line-2); }
.sbox.pay.bad, .sbox.pay.bad:focus-within { border-color: rgba(229, 72, 77, 0.6); }
.sbox.rcv { background: transparent; }
.sbox-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.sbox-bal { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; color: var(--muted); min-width: 0; white-space: nowrap; }
.max-btn { height: 24px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--raised); color: var(--text-2); font: 500 12px/1 var(--mono); transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.max-btn:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.max-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.sbox-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sbox-main input, .rcv-fig { flex: 1; min-width: 0; width: 100%; padding: 0; border: 0; background: transparent; font: 500 32px/40px var(--mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbox-main input:focus-visible { outline: none; }
.sbox-main input::placeholder { color: var(--muted); }
.rcv-fig { display: block; color: var(--text-2); }
.tok { flex: none; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); color: var(--text); font-size: 13px; font-weight: 500; line-height: 30px; }
/* Bouton rond d'inversion, à cheval sur les deux boîtes */
.flip { position: absolute; left: 50%; top: var(--flip-y, 50%); z-index: 2; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--card); color: var(--text-2); display: grid; place-content: center; box-shadow: 0 0 0 4px var(--card); transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.flip:hover { background: var(--raised); color: var(--text); }
.flip:focus-visible { border-radius: 18px; }
.flip .icon { transition: transform 320ms var(--ease); transform: rotate(var(--turn, 0deg)); }
.swap.flipping .sbox-top .label, .swap.flipping .tok, .swap.flipping .sbox-main input, .swap.flipping .rcv-fig, .swap.flipping .sbox-bal { animation: fadeIn 280ms var(--ease); }
@keyframes fadeIn { from { opacity: 0; } }

.swap-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: -4px; padding: 0 4px; font-size: 12px; line-height: 16px; }
.swap-meta:has(.amt-msg:empty) { display: none; }
.amt-msg { color: var(--muted); min-width: 0; text-wrap: pretty; }
.amt-msg.err { color: var(--neg); }
.amt-msg.warn { color: var(--warn); }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; flex: none; }
.chips.three { grid-template-columns: repeat(3, 1fr); }
.chips button { height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); color: var(--text-2); font: 500 13px/1 var(--mono); transition: background-color 150ms var(--ease), color 150ms var(--ease), border-color 150ms var(--ease); }
.chips button:hover:not(:disabled) { color: var(--text); background: var(--hover); }
.chips button.on { color: var(--text); border-color: var(--line-2); background: var(--hover); }
.chips button:disabled { opacity: 0.45; cursor: not-allowed; }
.details { padding: 4px 12px; border: 1px solid var(--line); border-radius: 12px; flex: none; }
.details > div { font-size: 12px; line-height: 16px; }
.details dt { color: var(--text-2); }
.details dd { color: var(--text); }
.details .settle { align-items: flex-start; }
.details .settle dd { white-space: normal; max-width: 15.5rem; text-wrap: balance; color: var(--text-2); }
.ack { display: flex; align-items: flex-start; gap: 10px; padding: 8px; margin: -4px -4px; border-radius: 8px; color: var(--text-2); font-size: 12px; line-height: 16px; cursor: pointer; transition: background-color 150ms var(--ease), color 150ms var(--ease); flex: none; }
.ack input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); cursor: pointer; }
.ack.need { background: rgba(255, 90, 31, 0.08); color: var(--text); }
.swap .btn-big { margin-top: auto; flex: none; }
#t-faucet { flex: none; }

/* ---------- volet My JINGI ---------- */
.mine-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 12px 4px 4px; color: var(--text-2); font-size: 13px; line-height: 20px; }
.mine-ico { width: 32px; height: 32px; border-radius: 8px; background: var(--raised); color: var(--text-2); display: grid; place-content: center; }
.mine { display: flex; flex-direction: column; padding: 4px 4px 0; min-height: 0; }
.mine-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.addr { font-size: 12px; line-height: 16px; color: var(--text-2); }
.mine-fig { display: flex; align-items: baseline; gap: 8px; margin-top: 8px; font-size: 32px; line-height: 40px; font-weight: 500; letter-spacing: -0.02em; white-space: nowrap; }
.mine-unit { font-size: 13px; line-height: 1; letter-spacing: 0; color: var(--text-2); }
.mine-val { color: var(--text-2); font-size: 13px; line-height: 20px; }
.mine-rows { margin-top: 12px; border-top: 1px solid var(--line); }
.reqs { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.reqs-head { display: flex; align-items: baseline; gap: 8px; }
.reqs-head .num { font-size: 12px; }
.req-none { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 20px; }
.req-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.req-list:empty { display: none; }
.req { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); animation: paneIn 280ms var(--ease) both; }
.req-ico { width: 28px; height: 28px; border-radius: 6px; background: var(--raised); color: var(--text-2); display: grid; place-content: center; flex: none; }
.req-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.req-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; font-size: 13px; line-height: 20px; }
.req-amt { color: var(--text); }
.req-state { color: var(--muted); font-size: 12px; line-height: 16px; }
.req-cancel { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 6px; flex: none; }

/* ---------- cotation : le moment riche de l'écran ---------- */
.quote { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 20px; }
.quote-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 16px; flex: none; }
.quote-pair { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.quote-upd { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); }
.quote-price { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 16px; flex: none; }
.quote-main, .quote-ch { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.quote-ch { align-items: flex-end; padding-bottom: 4px; }
.quote-ch b { font: 500 16px/24px var(--mono); color: var(--text-2); }
.quote-ch b.pos { color: var(--pos); }
.quote-ch b.neg { color: var(--neg); }
.quote-fig { font-size: 56px; line-height: 60px; font-weight: 500; letter-spacing: -0.03em; white-space: nowrap; }
.quote-chart { position: relative; flex: 1; min-height: 96px; margin-top: 12px; }
.quote-plot { position: absolute; inset: 0; }
/* Pas encore d'historique : la ligne de base au prix de lancement, dite telle quelle */
.quote-empty { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.qe-base { display: flex; align-items: center; gap: 12px; }
.qe-base i { flex: 1; height: 0; border-top: 1px dashed var(--line-2); }
.qe-base .num { padding: 4px 8px; border-radius: 4px; background: var(--raised); color: var(--text); font-size: 12px; line-height: 16px; }
.qe-text { display: flex; flex-direction: column; gap: 4px; max-width: 30rem; }
.qe-text b { font-size: 14px; line-height: 20px; }
.qe-text span { color: var(--text-2); font-size: 13px; line-height: 20px; text-wrap: pretty; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; background: var(--card); flex: none; }
.kpi { padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.fig { font-size: 20px; line-height: 28px; font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bottom { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; height: 184px; flex: none; }
.side, .capcard { padding: 16px; display: flex; flex-direction: column; min-height: 0; }
.flow { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.flow li { position: relative; display: flex; flex-direction: column; gap: 8px; padding-right: 12px; font-size: 13px; line-height: 20px; color: var(--text); text-wrap: balance; }
.flow li::before { content: ''; position: absolute; left: 32px; right: 8px; top: 12px; height: 1px; background: var(--line-2); }
.flow li:last-child::before { display: none; }
.how-n { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--card); color: var(--text-2); font-size: 12px; line-height: 1; display: grid; place-content: center; position: relative; flex: none; }
.flow-safe { display: flex; align-items: flex-start; gap: 8px; margin-top: auto; padding-top: 12px; color: var(--text-2); font-size: 12px; line-height: 16px; }
.flow-safe .icon { color: var(--muted); }
#side-reqs .req-list { margin-top: 8px; gap: 4px; }
#side-reqs .req { padding: 4px 8px 4px 12px; }
#side-reqs .req-list { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--hover) transparent; min-height: 0; }
.cap-fig { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.capcard .capline { margin-top: 12px; }
.capcard > .link { margin-top: auto; align-self: flex-start; }
.capline { display: flex; flex-direction: column; gap: 8px; }
.capline-legend { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 16px; color: var(--text-2); }
.capline-legend b { color: var(--text); }
.meter { height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width 420ms var(--ease); }
.meter span.grey { background: #6b6b73; }
.meter.tall { height: 12px; border-radius: 6px; }
.meter.tall span { border-radius: 6px 0 0 6px; }

/* ---------- vue About ---------- */
.about { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 32px; }
.about-side { min-height: 0; overflow-y: auto; scrollbar-width: none; padding: 8px 4px 0; display: flex; flex-direction: column; }
.about-side::-webkit-scrollbar { display: none; }
.hero-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; line-height: 16px; color: var(--text-2); }
.hero-kicker .mono { color: var(--accent); font-weight: 500; }
.hero-kicker .sep { width: 16px; height: 1px; background: var(--line-2); }
.about-side h1 { margin-top: 16px; font-size: 28px; line-height: 32px; letter-spacing: -0.02em; text-wrap: balance; }
.hero-note { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 16px; text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.toc { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.toc a { display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 8px; margin: 0 -8px; border-radius: 8px; color: var(--text-2); font-size: 14px; text-decoration: none; transition: background-color 150ms var(--ease), color 150ms var(--ease); }
.toc a .mono { width: 20px; font-size: 12px; color: var(--muted); }
.toc a:hover { color: var(--text); background: rgba(237, 237, 237, 0.04); }
.toc a[aria-current='true'] { color: var(--text); background: var(--raised); }
.toc a[aria-current='true'] .mono { color: var(--accent); }

.about-body { min-height: 0; min-width: 0; overflow-y: auto; padding-right: 12px; margin-right: -12px; display: flex; flex-direction: column; gap: 40px; scrollbar-width: thin; scrollbar-color: var(--hover) transparent; scroll-behavior: smooth; }
.sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; scroll-margin-top: 0; }
.sec-head { display: flex; flex-direction: column; gap: 4px; padding: 8px 0 4px; }
.sec-head h2 { font-size: 18px; line-height: 24px; letter-spacing: -0.01em; }
.sec-head p { color: var(--text-2); font-size: 13px; line-height: 20px; }

.terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.term { padding: 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.term + .term { border-left: 1px solid var(--line); }
.term-fig { font-size: 36px; line-height: 40px; font-weight: 500; letter-spacing: -0.03em; margin-bottom: 4px; white-space: nowrap; }
.term-fig.you { color: var(--accent); }
.term b { font-size: 14px; line-height: 20px; }
.term p { color: var(--text-2); font-size: 13px; line-height: 20px; text-wrap: pretty; }
.cap-tag { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; line-height: 16px; }
.cap-tag b { color: var(--text); }

.share { padding: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
/* Barre de partage : signature de la cagnotte, avec le repère du plafond du contrat */
.splitbar { position: relative; display: flex; gap: 2px; height: 12px; margin-top: 20px; }
.splitbar span { height: 100%; flex: 1 1 0; min-width: 0; transition: flex-grow 420ms var(--ease); }
.sb-you { background: var(--accent); border-radius: 4px 0 0 4px; }
.sb-jingi { background: var(--jingi); border-radius: 0 4px 4px 0; }
.sb-cap { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; background: var(--text); border-radius: 1px; box-shadow: 0 0 0 2px var(--card); transition: left 420ms var(--ease); }
.share-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 12px; font-size: 12px; line-height: 16px; color: var(--text-2); }
.share-legend > span { display: inline-flex; align-items: center; gap: 8px; }
.share-legend b { color: var(--text); }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: none; }
.sw.you { background: var(--accent); }
.sw.jingi { background: #6b6b73; }
.sw.cap { width: 2px; height: 12px; border-radius: 1px; background: var(--text); margin: 0 3px; }
.gauge { position: relative; margin-top: 20px; }
.gauge::after { content: ''; position: absolute; right: 0; top: -6px; width: 2px; height: 24px; background: var(--text); border-radius: 1px; }
.gauge-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; line-height: 16px; color: var(--muted); }
.share-note { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13px; line-height: 20px; max-width: 46em; text-wrap: pretty; }

.duo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }
.hwm, .example { padding: 20px; }
.hwm-svg { display: block; width: 100%; height: auto; max-height: 180px; margin-top: 12px; overflow: visible; }
.hwm-svg path, .hwm-svg polyline { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.hwm-grid path { stroke: var(--line); stroke-width: 1; }
.hwm-line { stroke: #6b6b73; stroke-width: 1.5; }
.hwm-new { stroke: var(--accent); stroke-width: 2.5; }
.hwm-high { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 4; }
.hwm-pt { fill: var(--card); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hwm-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: 12px; line-height: 16px; }
.hwm-legend li { display: flex; align-items: baseline; gap: 12px; }
.ln { display: inline-block; width: 16px; height: 0; flex: none; transform: translateY(-4px); border-top: 2px solid #6b6b73; }
.ln.new { border-top: 3px solid var(--accent); }
.ln.high { border-top: 1px dashed var(--text-2); }
.example { display: flex; flex-direction: column; }
.ex-intro { margin: 8px 0 4px; color: var(--text-2); font-size: 13px; line-height: 20px; text-wrap: pretty; }
.example .hint { margin-top: auto; padding-top: 8px; }

.supply { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 32px; padding: 20px; }
.supply-text p { margin-top: 8px; color: var(--text-2); font-size: 13px; line-height: 20px; text-wrap: pretty; }
.supply-rows > div { padding: 8px 0; }
.supply-rows > div:first-child { padding-top: 0; }
.supply-rows > div:last-child { padding-bottom: 0; }

.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.how li { position: relative; padding: 0 20px 0 0; display: flex; flex-direction: column; gap: 4px; }
.how li::before { content: ''; position: absolute; left: 32px; right: 8px; top: 12px; height: 1px; background: var(--line-2); }
.how li:last-child::before { display: none; }
.how .how-n { margin-bottom: 8px; }
.how li:first-child .how-n { border-color: var(--accent); color: var(--accent); }
.how b { font-size: 14px; line-height: 20px; }
.how p { color: var(--text-2); font-size: 13px; line-height: 20px; text-wrap: pretty; }
.safeguard { display: flex; align-items: flex-start; gap: 12px; margin-top: 4px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font-size: 13px; line-height: 20px; }
.safeguard .icon { margin-top: 2px; color: var(--accent); }

.contract { padding: 4px 20px 20px; }
.crow { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.crow-l { color: var(--text-2); font-size: 13px; line-height: 20px; }
.crow-v { font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.crow-v[data-i18n] { font-family: var(--sans); color: var(--muted); }
.crow-a { display: inline-flex; gap: 4px; margin-right: -8px; }
.cfacts { margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, auto)); justify-content: space-between; gap: 16px 24px; padding: 16px 0; }
.cfacts div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cfacts dt { color: var(--muted); font-size: 12px; line-height: 16px; }
.cfacts dd { margin: 0; font-size: 13px; line-height: 20px; }
.contract-act { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); }

.risks { list-style: none; margin: 0; padding: 4px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; border-color: rgba(217, 164, 65, 0.28); }
.risks li { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.risks li:nth-last-child(-n + 2) { border-bottom: 0; }
.risks .icon { margin-top: 2px; color: var(--warn); }
.risks b { display: block; font-size: 14px; line-height: 20px; }
.risks p { margin-top: 4px; color: var(--text-2); font-size: 13px; line-height: 20px; text-wrap: pretty; }

.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 12px 0; list-style: none; cursor: pointer; font-size: 14px; line-height: 20px; font-weight: 500; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--muted); transition: transform 220ms var(--ease), color 150ms var(--ease); }
.faq-item summary:hover .icon { color: var(--text); }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-item p { padding: 0 40px 16px 0; color: var(--text-2); font-size: 13px; line-height: 20px; max-width: 46em; text-wrap: pretty; }

.foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 48px; padding: 20px 0 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 16px; }
.foot p { max-width: 44em; text-wrap: pretty; }
.foot nav { display: flex; gap: 20px; flex: none; }
.foot a { color: var(--text-2); text-decoration: none; padding: 8px 0; margin: -8px 0; transition: color 150ms var(--ease); }
.foot a:hover { color: var(--text); }

/* ---------- fenêtres : compactes, jamais de défilement ---------- */
.sheet { width: min(400px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 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); overflow: hidden; }
.sheet[open] { display: flex; flex-direction: column; 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); } }
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 20px; flex: none; }
.sheet-head h2 { font-size: 15px; line-height: 20px; }
.sheet-note { padding: 12px 20px 20px; font-size: 12px; line-height: 16px; color: var(--muted); text-wrap: pretty; flex: none; }
.sheet-note:empty { padding: 0 0 12px; }
.wallets { padding: 4px 12px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-height: 0; }
.wallets.many { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wallets.many .wd { display: none; }
.wallets button, .wallets a { height: 44px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--text); text-decoration: none; font-size: 14px; text-align: left; transition: background-color 150ms var(--ease); }
.wallets button > span:not(.wd):not(.wl), .wallets a > span:not(.wd) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wallets button:hover, .wallets a:hover { background: var(--raised); }
.wallets img, .wallets .wl { width: 28px; height: 28px; border-radius: 6px; 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); white-space: nowrap; }
.wallets .none { padding: 4px 8px 8px; color: var(--text-2); font-size: 13px; line-height: 20px; text-wrap: pretty; }
.steps { list-style: none; margin: 0; padding: 8px 20px 4px; display: flex; flex-direction: column; }
.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); }
.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); }
#tx-link { margin: 0 20px 20px; align-self: flex-start; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line-2); font-size: 13px; line-height: 20px; z-index: 40; animation: fadeIn 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) { animation-delay: 50ms; }
.col-data .rise:nth-child(1) { animation-delay: 80ms; }
.col-data .rise:nth-child(2) { animation-delay: 130ms; }
.col-data .rise:nth-child(3) { animation-delay: 180ms; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- écrans de bureau bas ---------- */
@media (max-height: 820px) and (min-width: 1001px) {
  .hero { padding-top: 0; }
  .hero h1 { font-size: 18px; line-height: 24px; }
  .hero .sub { display: none; }
  .col-act, .col-data { gap: 12px; }
  .pane { gap: 8px; }
  .sbox { padding: 8px 16px; }
  .sbox-main input, .rcv-fig { font-size: 28px; line-height: 36px; }
  .details { padding: 0 12px; }
  .quote { padding: 16px 20px; }
  .quote-price { margin-top: 12px; }
  .quote-fig { font-size: 44px; line-height: 48px; }
  .kpi { padding: 8px 16px; }
  .bottom { height: 168px; gap: 12px; }
  .flow { margin-top: 12px; }
  .about-side h1 { font-size: 24px; line-height: 28px; }
  .toc { margin-top: 16px; padding-top: 12px; }
}
@media (max-width: 1280px) and (min-width: 1001px) {
  .main { grid-template-columns: minmax(340px, 380px) minmax(0, 1fr); }
  .about { grid-template-columns: minmax(260px, 300px) minmax(0, 1fr); gap: 24px; }
  .how { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; }
  .how li:nth-child(2)::before { display: none; }
  .cfacts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .crow { grid-template-columns: 160px minmax(0, 1fr) auto; }
}

/* ---------- 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 minmax(0, 1fr) calc(56px + env(safe-area-inset-bottom)); }
  .top { padding: 0 16px; gap: 12px; }
  .views-nav { display: none; }
  .top-right { gap: 6px; min-width: 0; }
  .btn-wallet { height: 36px; }
  .btn-wallet span { max-width: 96px; overflow: hidden; text-overflow: ellipsis; }
  .lang button { height: 30px; }
  .main { grid-template-columns: minmax(0, 1fr); padding: 12px 16px; overflow: hidden; }
  .main > section { 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; }
  .col-act, .col-data { gap: 12px; width: 100%; max-width: 560px; margin: 0 auto; }
  .hero { padding-top: 0; }
  .hero h1 { font-size: 18px; line-height: 24px; }
  .hero .sub { display: none; }
  .act { flex: 1; }
  .chips button { height: 36px; }
  .max-btn { height: 28px; }
  .sbox-top { min-height: 28px; }
  .flip { width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 20px; }
  .req-cancel { height: 40px; }

  .quote { flex: 1 0 auto; min-height: 256px; padding: 16px; }
  .quote-fig { font-size: 44px; line-height: 48px; }
  .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); }
  .bottom { grid-template-columns: minmax(0, 1fr); height: auto; gap: 12px; }
  #side-how { display: none; }
  #side-reqs .req-list { max-height: 216px; }
  .capcard > .link { margin-top: 12px; min-height: 28px; }

  /* About : une seule colonne qui défile dans son panneau, sommaire collant en haut */
  .about { display: block; overflow-y: auto; padding: 0 16px 16px; scrollbar-width: none; scroll-behavior: smooth; }
  .about::-webkit-scrollbar { display: none; }
  /* display: contents : le sommaire collant se cale sur le panneau qui défile, pas sur l'encart */
  .about-side { display: contents; }
  .about-side .hero-kicker { margin-top: 16px; }
  .about-side h1 { font-size: 24px; line-height: 28px; margin-top: 12px; }
  .hero-cta .btn { height: 44px; flex: 1 1 auto; }
  .toc { position: sticky; top: 0; z-index: 5; flex-direction: row; gap: 4px; margin: 16px -16px 0; padding: 8px 16px; border-top: 0; border-bottom: 1px solid var(--line); background: var(--bg); overflow-x: auto; scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
  .toc a { flex: none; margin: 0; padding: 0 12px; height: 36px; font-size: 13px; white-space: nowrap; }
  .toc a .mono { display: none; }
  .about-body { overflow: visible; padding: 16px 0 0; margin: 0; gap: 32px; }
  .sec { scroll-margin-top: 60px; }
  .terms { grid-template-columns: minmax(0, 1fr); }
  .term { padding: 16px; display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; align-items: start; }
  .term + .term { border-left: 0; border-top: 1px solid var(--line); }
  .term-fig { grid-row: 1 / span 3; font-size: 32px; line-height: 36px; margin: 0; }
  .term > :not(.term-fig) { grid-column: 2; }
  .share { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .share-legend { flex-direction: column; }
  .hwm, .example { padding: 16px; }
  .duo { grid-template-columns: minmax(0, 1fr); }
  .supply { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px; }
  .how { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .how li { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; padding: 0 0 20px; }
  .how li::before { left: 12px; right: auto; top: 28px; bottom: 4px; width: 1px; height: auto; display: block; }
  .how li:last-child { padding-bottom: 0; }
  .how li:last-child::before { display: none; }
  .how .how-n { grid-row: 1 / span 2; margin: 0; }
  .how b { align-self: center; min-height: 24px; display: flex; align-items: center; }
  .how p { grid-column: 2; }
  .contract { padding: 4px 16px 16px; }
  .crow { grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; padding: 12px 0; }
  .crow-l { grid-column: 1 / -1; }
  .icon-btn { width: 44px; height: 44px; }
  .cfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contract-act .btn { flex: 1 1 100%; height: 44px; white-space: normal; }
  .risks { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
  .risks li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .faq-item p { padding-right: 0; }
  .foot { flex-direction: column; }
  .foot a { padding: 12px 0; margin: -12px 0; }

  .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: 16px; transition: color 150ms var(--ease); }
  .mob-nav button[aria-pressed='true'] { color: var(--text); }
  .mob-nav .icon { width: 18px; height: 18px; }
  .wmenu button, .wmenu a { height: 44px; }
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
}
/* Téléphone bas : le titre cède sa place au guichet */
@media (max-width: 1000px) and (max-height: 800px) {
  .hero { display: none; }
  .pane { gap: 8px; }
  .sbox { padding: 8px 16px; }
  .sbox-main input, .rcv-fig { font-size: 28px; line-height: 36px; }
  .details { padding: 0 12px; }
}
@media (max-width: 1000px) and (max-height: 780px) {
  .swap .chips { display: none; }
}

/* Fenêtres en feuille du bas sur téléphone, cibles tactiles de 48 px */
@media (max-width: 600px) {
  .sheet { width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; border-width: 1px 0 0; max-height: calc(100dvh - 52px); padding-bottom: env(safe-area-inset-bottom); }
  .sheet[open] { animation: sheetUp 280ms var(--ease); }
  .sheet-head { padding: 12px 8px 4px 20px; }
  .sheet-head h2 { font-size: 16px; line-height: 24px; }
  .wallets { padding: 4px 12px 0; }
  .wallets button, .wallets a { height: 52px; font-size: 15px; }
  .wallets img, .wallets .wl { width: 32px; height: 32px; border-radius: 8px; }
  .steps li { height: 44px; }
  #tx-link { min-height: 44px; margin-bottom: 12px; }
}
@media (max-width: 440px) {
  .top { gap: 6px; }
  .brand .beta { display: none; }
  .lang button { width: 28px; padding: 0; }
  /* Bouton wallet en icône seule ; connecté, un point vert le dit */
  .top-right .btn-wallet { position: relative; width: 36px; padding: 0; }
  .top-right .btn-wallet span { display: none; }
  .top-right .btn-wallet.connected::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 4px; background: var(--pos); box-shadow: 0 0 0 2px var(--raised); }
}
/* Très petit téléphone : le symbole seul suffit pour la marque */
@media (max-width: 380px) {
  .brand .wm { display: none; }
  .sbox { padding-left: 12px; padding-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
