/* ============================================================
   YelPay — design system
   Jaune ambre et noir encre (identité du logo), surfaces blanches très arrondies,
   un seul moment fort : le bandeau sombre du solde.
   ============================================================ */
:root {
  --brand: #fdb802;
  --brand-2: #ffc72c;
  --brand-deep: #e59f00;
  --brand-ink: #9a6400;
  --on-brand: #13171e;
  --brand-soft: #fff4d1;
  --brand-line: #fbe29a;
  --ink: #13171e;
  --ink-2: #353b47;
  --muted: #6a7080;
  --faint: #9ca1ae;
  --line: #ebe9e1;
  --bg: #f6f5f1;
  --card: #ffffff;
  --ok: #0c8a54;
  --ok-bg: #dff7ea;
  --warn: #b25e09;
  --warn-bg: #fff1d6;
  --bad: #c2362b;
  --bad-bg: #fde6e3;
  --info: #9a6400;
  --info-bg: #fff4d1;
  --wave: #1dc8ff;
  --orange: #ff7900;
  --mtn: #f5b800;
  --moov: #0a69c7;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --shadow: 0 1px 2px rgba(19, 23, 30, .05), 0 8px 24px -12px rgba(19, 23, 30, .16);
  --shadow-lg: 0 24px 60px -20px rgba(19, 23, 30, .55);
  --hero: linear-gradient(155deg, #2b313d 0%, #1b2029 46%, #11141a 100%);
  --amber: linear-gradient(135deg, #ffcf3d 0%, #fdb802 55%, #f59a00 100%);
  font-family: Inter, 'SF Pro Text', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: 1.65rem; font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 750; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.right { text-align: right; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 16px; } .mt2 { margin-top: 28px; } .mb { margin-bottom: 16px; }
.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .84rem; }
code { background: var(--brand-soft); color: var(--brand-ink); padding: 2px 7px; border-radius: 7px; }
pre { background: #14122f; color: #fbe29a; padding: 18px; border-radius: var(--r); overflow: auto; font-size: .82rem; line-height: 1.6; }
pre code { background: none; padding: 0; color: inherit; }
:focus-visible { outline: 3px solid var(--brand-line); outline-offset: 2px; border-radius: 8px; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; background: var(--brand); color: var(--on-brand); padding: 11px 20px; border-radius: 14px; font-weight: 650; font-size: .95rem; cursor: pointer; transition: background .15s, transform .08s, box-shadow .15s; font-family: inherit; box-shadow: 0 6px 16px -8px rgba(229, 159, 0, .8); }
.btn:hover { background: var(--brand-deep); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: none; }
.btn.secondary:hover { background: #fbfaf6; border-color: var(--brand-line); }
.btn.ghost { background: transparent; color: var(--brand-ink); box-shadow: none; }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.danger { background: #fff; color: var(--bad); border-color: #f4c7c2; box-shadow: none; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.small { padding: 7px 13px; font-size: .84rem; border-radius: 11px; }
.btn.block { width: 100%; padding: 14px 20px; font-size: 1rem; }
.btn.on-dark { background: var(--brand); color: var(--on-brand); box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5); }
.btn.on-dark:hover { background: #fff8e0; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .26); }
.ico { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Formulaires ---------- */
label { display: block; font-weight: 650; font-size: .86rem; margin: 16px 0 6px; color: var(--ink-2); }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--brand-line); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input:disabled { background: #f8f7f3; color: var(--muted); }
.hint { color: var(--muted); font-size: .82rem; margin-top: 6px; }
.err, .okmsg, .banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; margin: 14px 0; font-size: .9rem; }
.err { color: var(--bad); background: var(--bad-bg); }
.okmsg { color: var(--ok); background: var(--ok-bg); }
.banner { color: var(--warn); background: var(--warn-bg); margin-top: 0; }
.banner a { color: inherit; font-weight: 700; text-decoration: underline; }
.amount-field { position: relative; }
.amount-field input { padding-right: 64px; font-size: 1.4rem; font-weight: 750; }
.amount-field span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 650; }

/* ---------- Cartes, grilles ---------- */
.card { background: var(--card); border: 1px solid rgba(232, 232, 243, .9); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid.cols-4, .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } .grid.cols-4.keep2 { grid-template-columns: repeat(2, 1fr); } }
.stat { position: relative; }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 650; }
.stat .value { font-size: 1.75rem; font-weight: 800; margin-top: 4px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat .sub { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.stat .chip-ico { position: absolute; right: 18px; top: 18px; width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty b { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: 4px; }

/* ---------- Onglets segmentés ---------- */
.seg { display: inline-flex; background: #ece9df; padding: 4px; border-radius: 16px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg a, .seg button { border: 0; background: transparent; padding: 9px 16px; border-radius: 12px; font-weight: 650; font-size: .88rem; color: var(--muted); white-space: nowrap; cursor: pointer; font-family: inherit; text-decoration: none; transition: background .15s, color .15s; }
.seg a:hover, .seg button:hover { color: var(--ink); text-decoration: none; }
.seg a.active, .seg button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(19, 23, 30, .12); }
.seg.full { display: flex; } .seg.full a, .seg.full button { flex: 1; text-align: center; }
.tabs { display: flex; background: #ece9df; padding: 4px; border-radius: 16px; margin: 0 0 18px; gap: 2px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 12px; font-weight: 650; cursor: pointer; color: var(--muted); font-family: inherit; font-size: .93rem; }
.tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(19, 23, 30, .12); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: #eeece4; color: #5b6070; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; color: var(--muted); font-weight: 650; font-size: .78rem; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 12px; border-bottom: 1px solid #f1efe8; vertical-align: middle; }
tbody tr:hover td { background: #fbfaf6; }
tr:last-child td { border-bottom: none; }

/* ---------- Liste de transactions ---------- */
.tx { list-style: none; margin: 0; padding: 0; }
.tx li { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid #f1efe8; }
.tx li:last-child { border-bottom: 0; }
.tx .av { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; color: var(--on-brand); font-weight: 800; font-size: 1rem; flex-shrink: 0; background: var(--brand); }
.av.none { background: #e3e0d5; color: #6a7080 !important; }
.tx .mid { flex: 1; min-width: 0; }
.tx .t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .s { color: var(--muted); font-size: .82rem; }
.tx .amt { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx .amt small { display: block; font-weight: 500; color: var(--muted); font-size: .76rem; margin-top: 2px; }
.tx .amt.neg { color: var(--bad); } .tx .amt.pos { color: var(--ok); }

/* Logos des opérateurs (fichiers dans /logos) */
.av.wave, .dot.wave { background: #4cc9f8 url(/logos/wave.png) center / cover no-repeat; }
.av.orange, .dot.orange { background: #000 url(/logos/orange.png) center / cover no-repeat; }
.av.mtn, .dot.mtn { background: #fdb802 url(/logos/mtn.png) center / cover no-repeat; }
.av.moov, .dot.moov { background: #0a3fc4 url(/logos/moov.png) center / cover no-repeat; }
.av.wave, .av.orange, .av.mtn, .av.moov, .dot.wave, .dot.orange, .dot.mtn, .dot.moov { color: transparent !important; font-size: 0; }
.tile .dot { width: 52px; height: 52px; border-radius: 15px; box-shadow: 0 0 0 1px rgba(20, 18, 47, .08); }
.tx .av.wave, .tx .av.orange, .tx .av.mtn, .tx .av.moov { box-shadow: 0 0 0 1px rgba(20, 18, 47, .08); }

/* ---------- Graphique ---------- */
.chart { width: 100%; height: 150px; display: block; }
.chart .area { fill: url(#cg); }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart .grid-l { stroke: #ebe9e1; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-x { display: flex; justify-content: space-between; color: var(--faint); font-size: .74rem; margin-top: 4px; }

/* ---------- Tuiles de choix (moyens de paiement) ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { border: 2px solid transparent; background: #f6f5f1; border-radius: 18px; padding: 14px 10px; cursor: pointer; text-align: center; font-weight: 650; font-family: inherit; font-size: .9rem; color: var(--ink); transition: border-color .15s, background .15s, transform .08s; }
.tile:hover { background: #f1efe8; }
.tile:active { transform: scale(.98); }
.tile.sel { border-color: var(--brand); background: var(--brand-soft); }
.tile .dot { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; margin: 0 auto 8px; color: #fff; font-weight: 800; font-size: 1.05rem; }
.tiles.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 480px) { .tiles.four { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Coque (barre latérale + contenu) ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 252px; background: #fff; border-right: 1px solid var(--line); padding: 22px 16px; position: sticky; top: 0; height: 100vh; flex-shrink: 0; display: flex; flex-direction: column; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 850; letter-spacing: -.03em; padding: 2px 8px 22px; color: var(--ink); }
.logo-mark { width: 46px; height: 28px; background: url(/logo-mark.png) center / contain no-repeat; display: block; flex-shrink: 0; }
.logo-mark svg { display: none; }
.logo em { font-style: normal; color: var(--brand); }
.logo .tag { font-size: .68rem; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); padding: 2px 8px; border-radius: 999px; letter-spacing: 0; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side a.nav { display: flex; align-items: center; gap: 12px; color: var(--ink-2); padding: 11px 14px; border-radius: 14px; font-weight: 600; transition: background .15s, color .15s; }
.side a.nav:hover { background: #f7f6f1; text-decoration: none; }
.side a.nav.active { background: var(--brand-soft); color: var(--ink); box-shadow: inset 3px 0 0 var(--brand); }
.side .bottom { margin-top: auto; padding: 14px; border-radius: 18px; background: #f6f5f1; display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--hero); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; flex-shrink: 0; }
.side .bottom .who { min-width: 0; flex: 1; }
.side .bottom .who b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side .bottom a { color: var(--muted); font-size: .8rem; cursor: pointer; }
.main { flex: 1; min-width: 0; overflow-x: clip; padding: 26px 34px 70px; max-width: none; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); font-size: .92rem; margin-top: 2px; }

/* ---------- Bandeau du solde (le moment fort) ---------- */
.hero { position: relative; overflow: hidden; background: var(--hero); color: #fff; border-radius: 32px; padding: 26px 28px 28px; margin-bottom: 18px; box-shadow: var(--shadow-lg); isolation: isolate; }
.hero::before { content: ''; position: absolute; width: 420px; height: 420px; right: -120px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(253, 184, 2, .38), rgba(253, 184, 2, 0) 65%); z-index: -1; }
.hero::after { content: ''; position: absolute; width: 360px; height: 360px; left: -140px; bottom: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 154, 0, .22), rgba(245, 154, 0, 0) 70%); z-index: -1; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hero-top .hello { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hero-top .hello b { display: block; font-size: 1rem; }
.hero-top .hello span { display: block; font-size: .82rem; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero .avatar { background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .16); padding: 7px 14px; border-radius: 999px; font-size: .82rem; font-weight: 650; }
.hero-balance { text-align: center; padding: 26px 0 22px; }
.hero-balance .lbl { font-size: .9rem; opacity: .85; font-weight: 550; }
.hero-balance .big { font-size: clamp(2.4rem, 7vw, 3.6rem); font-weight: 850; letter-spacing: -.045em; line-height: 1.1; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.hero-balance .big small { font-size: .42em; font-weight: 700; opacity: .65; letter-spacing: 0; margin-left: 6px; }
.hero-balance .note { font-size: .84rem; opacity: .8; }
.hero-actions { display: flex; gap: 10px; justify-content: center; margin-bottom: 22px; flex-wrap: wrap; }
.glass-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: rgba(255, 255, 255, .13); border: 1px solid rgba(255, 255, 255, .18); border-radius: 22px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.glass-row > div { padding: 14px 16px; text-align: center; min-width: 0; }
.glass-row > div + div { border-left: 1px solid rgba(255, 255, 255, .16); }
.glass-row .k { font-size: .74rem; opacity: .78; font-weight: 600; }
.glass-row .v { font-size: 1.12rem; font-weight: 800; margin-top: 3px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glass-row .d { font-size: .74rem; opacity: .75; margin-top: 1px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.two-col > * { min-width: 0; }
@media (max-width: 1000px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Barre d'onglets mobile + bouton flottant ---------- */
.tabbar { display: none; }
.fab { display: none; position: fixed; right: 30px; bottom: 30px; z-index: 30; display: inline-flex; align-items: center; gap: 10px; background: var(--amber); color: var(--on-brand); border: 0; border-radius: 20px; padding: 15px 22px 15px 18px; font-weight: 700; font-size: .98rem; cursor: pointer; font-family: inherit; box-shadow: 0 18px 40px -14px rgba(229, 159, 0, .9); transition: transform .12s, box-shadow .12s; }
.fab:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -14px rgba(229, 159, 0, 1); }
.fab .ico { width: 22px; height: 22px; stroke-width: 2.4; }
@media (max-width: 860px) {
  .shell { display: block; }
  .side { display: none; }
  .main { padding: 0 0 110px; max-width: none; }
  .main > *:not(.hero) { margin-left: 16px; margin-right: 16px; }
  .main > .hero + * { margin-top: 0; }
  .main > h1, .main > .page-head { margin-top: 22px; }
  .hero { border-radius: 0 0 32px 32px; margin-bottom: 18px; padding: 22px 18px 22px; padding-top: max(22px, env(safe-area-inset-top)); }
  .main > *:first-child:not(.hero) { margin-top: 20px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 26px; padding: 8px 6px; box-shadow: 0 18px 40px -16px rgba(19, 23, 30, .5); align-items: end; }
  .tabbar a, .tabbar button.tb { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--faint); font-size: .68rem; font-weight: 650; padding: 6px 0; border: 0; background: none; cursor: pointer; font-family: inherit; text-decoration: none; }
  .tabbar a.active { color: var(--brand-ink); }
  .tabbar .ico { width: 22px; height: 22px; }
  .tabbar .plus { justify-self: center; width: 56px; height: 56px; margin-top: -30px; border-radius: 50%; border: 4px solid var(--bg); background: var(--amber); color: var(--on-brand); display: grid; place-items: center; cursor: pointer; box-shadow: 0 14px 28px -10px rgba(229, 159, 0, .95); padding: 0; }
  .tabbar .plus .ico { width: 26px; height: 26px; stroke-width: 2.4; }
  .glass-row .v { font-size: .98rem; }
  .glass-row > div { padding: 12px 8px; }
  .page-head { margin-bottom: 14px; }
}

/* ---------- Modale / feuille ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 18, 47, .55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; animation: fade .18s ease; }
.modal { position: relative; background: #fff; border-radius: 28px; padding: 26px; width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.2, .9, .3, 1.1); }
.modal h2 { margin-bottom: 4px; }
.modal .sub { color: var(--muted); font-size: .9rem; margin-bottom: 4px; }
.modal-grab { display: none; }
.sheet-list { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.sheet-list a, .sheet-list button { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; color: var(--ink); font-weight: 650; background: none; border: 0; font-family: inherit; font-size: 1rem; cursor: pointer; text-align: left; text-decoration: none; }
.sheet-list a:hover, .sheet-list button:hover { background: #f6f5f1; text-decoration: none; }
.sheet-list .ic { width: 40px; height: 40px; border-radius: 13px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes slide { from { transform: translateY(100%); } }
@media (max-width: 640px) {
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { border-radius: 30px 30px 0 0; max-width: none; padding: 14px 20px max(24px, env(safe-area-inset-bottom)); animation: slide .26s cubic-bezier(.2, .8, .2, 1); }
  .modal-grab { display: block; width: 44px; height: 5px; border-radius: 99px; background: #e3e0d5; margin: 0 auto 16px; }
}
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 16px; font-size: .9rem; font-weight: 600; z-index: 60; box-shadow: 0 14px 34px -10px rgba(0, 0, 0, .45); animation: pop .2s ease; }
@media (max-width: 860px) { .toast { bottom: 100px; } }

/* ---------- Pages publiques ---------- */
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-box { width: 100%; max-width: 440px; }
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.6rem; font-weight: 850; letter-spacing: -.03em; margin-bottom: 14px; }
.brand b { font-weight: inherit; }
.brand span { color: var(--brand); }
.brand::before { content: ''; width: 54px; height: 33px; background: url(/logo-mark.png) center / contain no-repeat; }

.landing { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.landing .left { position: relative; overflow: hidden; background: var(--hero); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; isolation: isolate; }
.landing .left::before { content: ''; position: absolute; width: 640px; height: 640px; right: -220px; top: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(253, 184, 2, .34), transparent 65%); z-index: -1; }
.landing .left::after { content: ''; position: absolute; width: 520px; height: 520px; left: -200px; bottom: -280px; border-radius: 50%; background: radial-gradient(circle, rgba(245, 154, 0, .2), transparent 70%); z-index: -1; }
.landing .brand { justify-content: flex-start; color: #fff; margin-bottom: 36px; }
.landing .brand span { color: var(--brand); }
.landing .brand::before { width: 60px; height: 44px; border-radius: 14px; background: #fff url(/logo-mark.png) center / 78% no-repeat; }
.landing h1 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -.04em; max-width: 14ch; line-height: 1.08; }
.landing .lead { font-size: 1.08rem; opacity: .88; max-width: 44ch; margin: 14px 0 26px; }
.landing .feats { display: grid; gap: 12px; max-width: 460px; margin-bottom: 30px; }
.landing .feat { display: flex; gap: 14px; align-items: flex-start; background: rgba(255, 255, 255, .11); border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; padding: 14px 16px; }
.landing .feat .ic { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; flex-shrink: 0; }
.landing .feat b { display: block; font-size: .95rem; }
.landing .feat span { font-size: .85rem; opacity: .82; }
.landing .ops { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .82rem; opacity: .9; }
.landing .ops i { font-style: normal; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.landing .right-col { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.landing .auth-box { box-shadow: var(--shadow-lg); }
.landing .doc-link { text-align: center; margin-top: 16px; font-size: .88rem; }
@media (max-width: 900px) {
  .landing { grid-template-columns: 1fr; }
  .landing .left { padding: 34px 22px 40px; border-radius: 0 0 32px 32px; }
  .landing .feats { display: none; }
  .landing .right-col { padding: 24px 16px 40px; margin-top: -20px; }
}

/* ---------- Page de paiement ---------- */
.pay-page { min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 28px 16px 40px; background: radial-gradient(1200px 500px at 50% -10%, #ffefb8, transparent 70%), var(--bg); }
.pay-card { width: 100%; max-width: 440px; background: #fff; border-radius: 34px; box-shadow: var(--shadow-lg); overflow: hidden; }
.pay-head { position: relative; overflow: hidden; background: var(--hero); color: #fff; padding: 26px 26px 54px; text-align: center; isolation: isolate; }
.pay-head::before { content: ''; position: absolute; width: 300px; height: 300px; right: -90px; top: -150px; border-radius: 50%; background: radial-gradient(circle, rgba(253, 184, 2, .36), transparent 65%); z-index: -1; }
.pay-head .merchant-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.pay-head .avatar { background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); width: 34px; height: 34px; font-size: .8rem; }
.pay-head .lbl { font-size: .78rem; opacity: .8; }
.pay-head .merchant { font-weight: 700; font-size: 1rem; }
.pay-head .amount { font-size: 2.9rem; font-weight: 850; letter-spacing: -.045em; margin-top: 14px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pay-head .amount small { font-size: .4em; opacity: .65; font-weight: 700; letter-spacing: 0; margin-left: 5px; }
.pay-head .desc { font-size: .88rem; opacity: .85; margin-top: 6px; }
.pay-body { position: relative; margin-top: -28px; background: #fff; border-radius: 30px 30px 0 0; padding: 24px 24px 26px; }
.pay-body .sec-title { font-weight: 700; margin-bottom: 12px; }
.pay-body .phone-row { display: flex; gap: 10px; align-items: center; }
.secure { text-align: center; color: var(--muted); font-size: .78rem; margin-top: 16px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.secure .ico { width: 14px; height: 14px; }
.status-box { text-align: center; padding: 14px 6px 6px; }
.status-icon { width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 800; }
.status-icon.ok { background: var(--ok-bg); color: var(--ok); box-shadow: 0 0 0 10px rgba(223, 247, 234, .5); }
.status-icon.bad { background: var(--bad-bg); color: var(--bad); box-shadow: 0 0 0 10px rgba(253, 230, 227, .5); }
.status-icon.wait { background: var(--brand-soft); color: var(--brand-ink); }
.spinner { width: 36px; height: 36px; border: 4px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .85s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Documentation ---------- */
.docs { max-width: 860px; margin: 0 auto; padding: 32px 20px 80px; }
.docs h2 { margin-top: 38px; } .docs h3 { margin-top: 24px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-all; }

/* ---- Gains, filtres, graphiques (admin) ---- */
.pos { color: var(--ok); }
.card.stat .value.pos { color: var(--ok); }
.filters { padding: 16px 18px; margin-bottom: 16px; }
.filters .row { gap: 12px; align-items: flex-end; }
.filters .row.wrap { flex-wrap: wrap; }
.filters label { margin-top: 0; }
.grid.earn { margin: 6px 0 16px; }
.earn-box { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; background: #fff; }
.earn-box .label { color: var(--muted); font-size: .85rem; font-weight: 600; }
.earn-box .value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; }
.earn-box .sub { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.earn-box.me { background: var(--ok-bg); border-color: transparent; }
.earn-box.me .value { color: var(--ok); }
.earn-box.jeko { background: var(--brand-soft); border-color: transparent; }
tr.total td { border-top: 2px solid var(--line); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding: 6px 0 4px; }
.bars .bar { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.bars .bar i { display: block; width: 100%; background: var(--amber); border-radius: 4px 4px 0 0; }
.bars-l { display: flex; justify-content: space-between; }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
@media (max-width: 860px) { .filters .row.wrap > div { flex: 1 1 45%; } .grid.cols-3 { grid-template-columns: 1fr; } }
