:root {
  --bg: #0f0a1f; --bg2: #1a1233; --card: #221847; --card2: #2b1e5a;
  --line: rgba(167, 139, 250, .18);
  --p1: #7c3aed; --p2: #a855f7; --p3: #c4b5fd;
  --text: #f3efff; --muted: #a79bc9;
  --ok: #34d399; --err: #fb7185;
  --grad: linear-gradient(135deg, #6d28d9, #a855f7 60%, #d946ef);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; margin: 0; }
html, body { background: var(--bg); color: var(--text); font: 15px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif; }
body { min-height: 100vh; background: radial-gradient(900px 500px at 50% -10%, #3b1d7a55, transparent), var(--bg); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.hidden { display: none !important; }

#app { max-width: 560px; margin: 0 auto; padding: 0 16px calc(84px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; justify-content: space-between; padding: 16px 0 8px; }
.brand { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 19px; }
.brand i { color: var(--p2); filter: drop-shadow(0 0 8px #a855f7aa); }
.chip { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; }
.chip i { color: var(--p3); }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: #150e2cee; backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; color: var(--muted); font-size: 11px; border-radius: 12px; transition: .2s; }
.tabs button i { font-size: 19px; }
.tabs button.active { color: #fff; }
.tabs button.active i { color: var(--p2); filter: drop-shadow(0 0 8px #a855f7aa); }

h2 { font-size: 18px; margin: 14px 0 12px; display: flex; align-items: center; gap: 10px; }
h2 i { color: var(--p2); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 13px; }
.empty { text-align: center; padding: 40px 0; color: var(--muted); }
.empty i { font-size: 38px; color: var(--p1); display: block; margin-bottom: 12px; }

.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.cat.active { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 20px #7c3aed55; }

.product { display: flex; align-items: center; gap: 12px; }
.ico { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--card2); color: var(--p3); font-size: 19px; }
.grow { flex: 1; min-width: 0; }
.grow b { display: block; overflow: hidden; text-overflow: ellipsis; }
.price { font-weight: 700; color: var(--p3); }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #34d39922; color: var(--ok); }
.badge.out { background: #fb718522; color: var(--err); }

.btn { display: inline-flex; gap: 8px; align-items: center; justify-content: center; padding: 11px 18px; border-radius: 14px; background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 8px 22px #7c3aed55; transition: transform .1s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; box-shadow: none; }
.btn.ghost { background: var(--card2); box-shadow: none; }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 14px; font-size: 14px; }

.hero { background: var(--grad); border-radius: 22px; padding: 22px; box-shadow: 0 14px 36px #7c3aed55; margin-bottom: 14px; }
.hero small { opacity: .85; }
.hero .big { font-size: 38px; font-weight: 800; margin-top: 4px; }

.row { display: flex; align-items: center; gap: 12px; }
.amt.neg { color: var(--err); font-weight: 700; }
.amt.pos { color: var(--ok); font-weight: 700; }
.kv { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border: 0; }
.avatar { width: 76px; height: 76px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; font-size: 30px; margin: 6px auto 10px; box-shadow: 0 8px 26px #7c3aed66; }

.code { font-family: ui-monospace, Consolas, monospace; background: #0f0a1f; border: 1px dashed var(--p1); border-radius: 12px; padding: 12px; word-break: break-all; margin: 10px 0; user-select: all; }

.modal { position: fixed; inset: 0; background: #000a; display: flex; align-items: flex-end; justify-content: center; z-index: 10; animation: fade .2s; }
.sheet { width: 100%; max-width: 560px; background: var(--bg2); border-radius: 24px 24px 0 0; border: 1px solid var(--line); padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .25s; }
.sheet h3 { margin-bottom: 6px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 14px; }
.sheet .actions .btn { flex: 1; }
.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); background: var(--card2); border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; z-index: 20; display: flex; gap: 8px; align-items: center; }
.toast.err i { color: var(--err); } .toast.ok i { color: var(--ok); }
.spin { text-align: center; padding: 50px; color: var(--p2); font-size: 26px; }
@keyframes fade { from { opacity: 0 } }
@keyframes up { from { transform: translateY(40px); opacity: 0 } }

/* Kiosque */
#app { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
.kiosk-wrap { max-width: 420px; margin: 0 auto; padding-top: 8px; }
.kiosk-hero { text-align: center; padding: 28px 16px 22px; }
.kiosk-hero i { font-size: 48px; color: var(--p2); filter: drop-shadow(0 0 14px #a855f7aa); display: block; margin-bottom: 14px; }
.kiosk-hero h2 { justify-content: center; font-size: 22px; margin: 0 0 8px; }
.kiosk-success { text-align: center; padding: 28px 16px 22px; }
.kiosk-success i { font-size: 56px; color: var(--ok); filter: drop-shadow(0 0 14px #34d39966); display: block; margin-bottom: 14px; }
.kiosk-success h2 { justify-content: center; font-size: 22px; margin: 0 0 8px; }
.oid-label { text-align: center; font-size: 12px; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin-bottom: 10px; }
.oid-row { display: flex; justify-content: center; gap: 6px; }
.oid-box { flex: 1 1 0; max-width: 48px; height: 56px; min-width: 0; text-align: center; font: inherit; font-size: 22px; font-weight: 700; color: var(--text); background: var(--card2); border: 1.5px solid var(--line); border-radius: 10px; outline: none; padding: 0; caret-color: var(--p2); transition: border-color .15s, box-shadow .15s; }
.oid-box:focus { border-color: var(--p2); box-shadow: 0 0 0 3px #a855f733; }
.oid-row .oid-box:nth-child(4) { margin-right: 6px; }
.kiosk-wrap .card + .card { margin-top: 12px; }
.steps { display: grid; gap: 4px; }
.step { display: flex; align-items: center; gap: 12px; padding: 10px 4px; color: var(--muted); transition: color .2s; }
.step-ic { width: 22px; display: grid; place-items: center; font-size: 18px; }
.step.wait .step-ic { opacity: .35; font-size: 10px; }
.step.run { color: var(--text); font-weight: 600; }
.step.run .step-ic { color: var(--p2); }
.step.done { color: var(--text); }
.step.done .step-ic { color: var(--ok); }
.step.fail { color: var(--err); font-weight: 600; }
.step.fail .step-ic { color: var(--err); }
.kiosk-err { display: flex; gap: 10px; align-items: center; color: var(--err); margin-top: 12px; }
.oid-box:disabled { opacity: .6; }
.oid-hint { text-align: center; margin-top: 12px; }
.shake { animation: shake .35s; border-color: var(--err) !important; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.kiosk-actions { margin-top: 16px; display: grid; gap: 10px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.progress { height: 6px; border-radius: 999px; background: var(--card2); overflow: hidden; margin-bottom: 12px; }
.progress-bar { height: 100%; background: var(--grad); border-radius: inherit; transition: width .5s ease; }
.progress-bar.fail { background: var(--err); }

/* Barre d'onglets : libellés jamais superposés, même sur écran étroit */
.tabs button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
#app { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
@media (max-width: 380px) {
  .tabs button { font-size: 10px; }
  .tabs button i { font-size: 17px; }
  .oid-row { gap: 4px; }
  .oid-row .oid-box:nth-child(4) { margin-right: 4px; }
  .oid-box { height: 50px; font-size: 20px; }
}
@media (max-height: 640px) {
  .kiosk-hero { padding: 12px 16px 12px; }
  .kiosk-hero i { font-size: 34px; margin-bottom: 8px; }
}

/* Version PC / grand écran */
@media (min-width: 760px) {
  #app { max-width: 980px; padding: 0 32px 120px; }
  .top { padding: 24px 0 12px; }
  .tabs { left: 50%; right: auto; bottom: 18px; transform: translateX(-50%); width: min(620px, calc(100% - 48px));
    border: 1px solid var(--line); border-radius: 20px; padding: 8px; box-shadow: 0 12px 40px #00000066; }
  .tabs button { flex-direction: row; justify-content: center; gap: 8px; font-size: 14px; padding: 10px 0; }
  .tabs button:hover { background: var(--card); color: var(--text); }
  .tabs button.active { background: var(--card2); }
  .tabs button i { font-size: 16px; }
  .kiosk-wrap { max-width: 560px; }
  .kiosk-hero { padding: 40px 16px 28px; }
  .kiosk-hero h2 { font-size: 28px; }
  .card { padding: 20px; }
  .oid-row { gap: 10px; }
  .oid-box { max-width: 56px; height: 66px; font-size: 28px; }
  .oid-box:hover { border-color: var(--p1); }
  .kiosk-grid:has(> .card + .card) { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .kiosk-wrap:has(.kiosk-grid > .card + .card) { max-width: 820px; }
  .kiosk-grid > .card + .card { margin-top: 0; }
  .kiosk-actions { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .btn { cursor: pointer; }
  .btn:not(:disabled):hover { filter: brightness(1.12); }
}
.fld { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.inp { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: inherit; font-size: 18px; padding: 13px 14px; width: 100%; outline: none; }
.inp:focus { border-color: var(--p2); box-shadow: 0 0 0 3px #7c3aed33; }
.inp::placeholder { color: var(--muted); font-size: 15px; }

/* ---- Profil ---- */
.pf-head { position: relative; text-align: center; padding: 26px 16px 20px; margin: 8px 0 16px; border-radius: 26px; overflow: hidden;
  background: linear-gradient(160deg, #2b1e5a, #1a1233 70%); border: 1px solid var(--line); }
.pf-glow { position: absolute; inset: -40% -20% auto; height: 220px; background: radial-gradient(closest-side, #a855f788, transparent); pointer-events: none; }
.avatar { position: relative; width: 92px; height: 92px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); font-size: 38px; font-weight: 800; box-shadow: 0 0 0 4px #0f0a1f, 0 0 0 6px #a855f7aa, 0 12px 34px #7c3aed88; }
.pf-name { position: relative; font-size: 21px; font-weight: 800; }
.idpill { position: relative; margin-top: 14px; display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px;
  background: #ffffff12; border: 1px solid var(--line); font-size: 13px; font-variant-numeric: tabular-nums; }
.idpill i:first-child { color: var(--p2); } .idpill i:last-child { color: var(--muted); font-size: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.tile { background: linear-gradient(160deg, var(--card2), var(--card)); border: 1px solid var(--line); border-radius: 20px; padding: 16px 14px; position: relative; overflow: hidden; }
.tile.accent { background: var(--grad); border-color: transparent; box-shadow: 0 12px 30px #7c3aed55; }
.tile-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #ffffff1c; color: var(--p3); margin-bottom: 12px; }
.tile.accent .tile-ico { color: #fff; }
.tile-val { font-size: 19px; font-weight: 800; }
.tile-lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tile.accent .tile-lbl { color: #ffffffcc; }
.card.list { padding: 4px 14px; }
.info { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info:last-child { border: 0; }
.info-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); color: var(--p3); }
.info > i { color: var(--muted); }

/* ---- Finitions globales ---- */
.card { background: linear-gradient(160deg, #261b52, var(--card)); box-shadow: 0 6px 20px #0004; }
.tabs { border-radius: 22px 22px 0 0; }
.view-in { animation: up .3s; }
main#view > * { animation: up .3s both; }

/* ---- Admin / rôles ---- */
.fld { display: block; margin: 10px 0; }
.fld span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.inp { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #0f0a1f; color: var(--text); font: inherit; outline: none; }
.inp:focus { border-color: var(--p2); box-shadow: 0 0 0 3px #a855f733; }
textarea.inp { resize: vertical; }
.card .btn.block { margin-top: 8px; }
.sheet .btn.block { margin-top: 10px; }
.sep { height: 1px; background: var(--line); margin: 16px 0 4px; }
.old { text-decoration: line-through; font-size: 12px; }
.role { position: relative; display: inline-flex; gap: 6px; align-items: center; margin-top: 8px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #ffffff14; color: var(--p3); }
.role-admin { background: var(--grad); color: #fff; }
.role-reseller { background: #34d39922; color: var(--ok); }
.tabs button { min-width: 0; }

/* ---- Boutique v2 : images, prix, remises, statuts ---- */
.sheet { max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; }
.sheet h3 { display: flex; gap: 8px; align-items: center; }
h4 { margin: 16px 0 6px; font-size: 14px; color: var(--p3); }
.thumb { width: 52px; height: 52px; flex: none; border-radius: 14px; object-fit: cover; background: var(--card2); }
.cover { width: 100%; max-height: 190px; object-fit: cover; border-radius: 16px; margin-bottom: 10px; }
.pbox { text-align: right; flex: none; }
.pbox .badge { margin-top: 2px; display: inline-block; }
.badge { display: inline-block; margin-top: 2px; }
.badge.disc { background: #f472b622; color: #f9a8d4; }
.badge.wait { background: #fbbf2422; color: #fcd34d; }
.badge.ok { background: #34d39922; color: var(--ok); }
.badge.out { background: #fb718522; color: var(--err); }
.card.ann { display: flex; gap: 10px; align-items: center; background: linear-gradient(135deg, #4c1d95aa, #7c3aed55); }
.card.ann i { color: var(--p3); }
.card.manual { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; }
.card.manual i { color: var(--p2); margin-top: 3px; }
.card.stack { display: grid; gap: 10px; }
.card.row { cursor: default; }
.pad { padding: 10px 0; }
.link { cursor: pointer; word-break: break-all; text-align: right; }
.btn.danger { color: var(--err); }
.btn.block { width: 100%; margin-top: 8px; display: flex; }
.btn.sm i:only-child { margin: 0; }
.hero small { display: block; }

.bar { height: 10px; border-radius: 999px; background: #0f0a1f; overflow: hidden; margin: 12px 0 6px; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width .6s; }
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.tier { background: var(--card2); border: 1px solid var(--line); border-radius: 14px; padding: 8px 4px; text-align: center; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.tier b { color: var(--text); font-size: 13px; }
.tier.on { background: var(--grad); color: #fff; border-color: transparent; }
.tier.on b { color: #fff; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.mini { background: #0f0a1f88; border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.mini b { font-size: 16px; } .mini span { font-size: 11px; color: var(--muted); }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 6px; }
.col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.colbar { width: 100%; border-radius: 8px 8px 3px 3px; background: var(--grad); min-height: 3px; }
.info.me { background: #a855f722; border-radius: 12px; padding-left: 8px; padding-right: 8px; }
.info-ico { font-weight: 700; font-size: 13px; }

.qr { display: block; width: 190px; height: 190px; margin: 12px auto; padding: 8px; background: #fff; border-radius: 16px; }
.fld select.inp, select.inp { appearance: none; }
input[type=file].inp { padding: 9px; }
.chk { width: 20px; height: 20px; accent-color: var(--p2); flex: none; }
.checks { max-height: 150px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.chkrow { display: flex; gap: 8px; align-items: center; padding: 5px 0; font-size: 14px; }
.chkrow input { accent-color: var(--p2); }
.imgprev { margin: 8px 0; }
.sheet .kv { gap: 12px; }
.sheet .role { margin: 4px 0 10px; }

/* ---- Import d'image, support ---- */
.imgbox { margin: 12px 0; padding: 14px; border: 1.5px dashed var(--p1); border-radius: 18px; background: #0f0a1f88; text-align: center; }
.imgbox .cover { margin-bottom: 12px; }
.imgph { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 0 16px; color: var(--muted); }
.imgph i { font-size: 34px; color: var(--p1); }
.btnrow { display: flex; gap: 8px; justify-content: center; }
.btnrow .btn { flex: 1; margin: 0; }
.btnrow .btn:last-child:only-child { flex: none; }
.imgbox .fld { text-align: left; }
.imgbox .btn.block { margin-top: 0; }
.small { font-size: 12px; margin-top: 10px; }
.info.tap { cursor: pointer; }
.info.tap:active { background: #a855f722; border-radius: 12px; }
.info.tap b { color: var(--p3); }

/* ==================== v3 : pages Historique / Solde / Profil / Admin ==================== */
.top { gap: 10px; }
.brand { flex: 1; min-width: 0; }
.fs-btn { padding: 8px 12px; }
html.desktop #app { padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)); }
.small { font-size: 12px; }

.page-head { display: flex; align-items: center; gap: 14px; margin: 10px 0 16px; }
.page-ico { width: 48px; height: 48px; flex: none; border-radius: 16px; display: grid; place-items: center; background: var(--grad); font-size: 20px; box-shadow: 0 10px 26px #7c3aed55; }
.page-head h1 { font-size: 22px; line-height: 1.15; }
.page-head p { margin-top: 2px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: #34d39922; color: var(--ok); }
.pill.wait { background: #fbbf2422; color: #fcd34d; }
.pill.warn { background: #fb923c22; color: #fdba74; }
.pill.err { background: #fb718522; color: var(--err); }
.pill.muted { background: #ffffff10; color: var(--muted); }

.seg { display: flex; gap: 4px; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; }
.seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; transition: .2s; }
.seg button.on { background: var(--card2); color: var(--text); box-shadow: 0 4px 14px #0005; }
.seg button.on i { color: var(--p2); }

.info-ico.in { background: #34d39922; color: var(--ok); }
.info-ico.out { background: #fb718522; color: var(--err); }
.info.click { cursor: pointer; }
.info .grow b, .info .grow span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty-cta { text-align: center; padding: 36px 20px; background: var(--card); border: 1px dashed var(--line); border-radius: 20px; display: grid; gap: 8px; justify-items: center; }
.empty-cta > i { font-size: 40px; color: var(--p2); margin-bottom: 6px; }
.empty-cta .btn { margin-top: 8px; }

.olist { display: grid; gap: 10px; }
.card.order { width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; margin: 0; cursor: pointer; transition: border-color .2s, transform .1s; }
.card.order:active { transform: scale(.99); }
.card.order > i:last-child { color: var(--muted); font-size: 12px; }
.card.order .grow b, .card.order .grow span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-ico { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 18px; background: var(--card2); color: var(--p3); }
.order-ico.ok { background: #34d39922; color: var(--ok); }
.order-ico.wait { background: #fbbf2422; color: #fcd34d; }
.order-ico.warn { background: #fb923c22; color: #fdba74; }
.order-ico.err { background: #fb718522; color: var(--err); }
.order-ico.big { width: 56px; height: 56px; font-size: 24px; border-radius: 18px; }
.order-amt { text-align: right; display: flex; flex-direction: column; }
.order-amt s { font-size: 12px; }
.sheet-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.sheet-head h3 { margin-bottom: 4px; }

/* Solde */
.bal-hero { position: relative; overflow: hidden; background: var(--grad); border-radius: 26px; padding: 24px 22px; margin: 6px 0 18px; box-shadow: 0 16px 40px #7c3aed55; }
.bal-glow { position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(closest-side, #ffffff40, transparent); pointer-events: none; }
.bal-hero small { position: relative; opacity: .9; font-weight: 600; }
.bal-hero .big { position: relative; font-size: 40px; font-weight: 800; margin: 4px 0 6px; letter-spacing: -.02em; }
.bal-sub { position: relative; display: inline-block; font-size: 13px; padding: 5px 12px; border-radius: 999px; background: #0003; }
.amt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.chip-amt { padding: 12px 6px; border-radius: 12px; background: var(--card2); border: 1.5px solid var(--line); font-weight: 700; transition: .15s; }
.chip-amt.on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px #7c3aed55; }
.chip-amt.sm { padding: 8px 12px; font-size: 13px; font-weight: 600; }
.amt-inp { margin-bottom: 8px; }
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-bottom: 12px; }
.method { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); transition: .15s; }
.method b { font-size: 14px; } .method span { font-size: 11px; color: var(--muted); }
.method-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); color: var(--p3); font-size: 18px; margin-bottom: 4px; }
.method.on { border-color: var(--p2); background: linear-gradient(160deg, #3a2775, var(--card)); box-shadow: 0 0 0 3px #a855f722; }
.method.on .method-ico { background: var(--grad); color: #fff; }
.tsteps { display: grid; gap: 4px; }
.tstep { display: flex; gap: 12px; padding: 10px 0; }
.tstep + .tstep { border-top: 1px solid var(--line); }
.tstep > .grow > b { display: block; margin: 4px 0 8px; }
.tstep-n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); font-weight: 800; font-size: 13px; }
.copyrow { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; background: #0f0a1f99; border: 1px solid var(--line); transition: border-color .15s; }
.copyrow:active { border-color: var(--p2); }
.copyrow .grow span, .copyrow .grow b { display: block; overflow: hidden; text-overflow: ellipsis; }
.copyrow .grow b { word-break: break-all; white-space: normal; font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.copyrow > i { color: var(--p3); }
.card.list .copyrow { margin: 8px 0; }
.warn-box { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #fbbf2414; border: 1px solid #fbbf2440; color: #fcd34d; font-size: 13px; }
.drop { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 12px; border-radius: 16px; border: 1.5px dashed var(--p1); background: #0f0a1f88; color: var(--text); }
.drop > i { font-size: 28px; color: var(--p2); }
.drop.has { border-style: solid; border-color: var(--ok); }
.drop img { max-width: 100%; max-height: 160px; border-radius: 10px; object-fit: contain; }
.drop span { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.coin { display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 12px; background: var(--card2); border: 1.5px solid var(--line); }
.coin b { font-size: 15px; } .coin span { font-size: 11px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin.on { border-color: var(--p2); box-shadow: 0 0 0 3px #a855f722; }
.net-row { display: flex; flex-wrap: wrap; gap: 8px; }
.qr { display: grid; place-items: center; margin: 4px 0 12px; }
.qr img { width: 200px; height: 200px; padding: 10px; border-radius: 18px; background: #fff; }
.crypto-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 6px 2px; }

/* Profil */
.pf-head .role { margin-top: 10px; }
.pf-grid { display: grid; gap: 0; }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-title > i { color: var(--p2); }
.card-title > b { flex: 1; }
.tier-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tier.on { background: linear-gradient(160deg, #3a2775, var(--card2)); box-shadow: 0 0 0 2px #ffffff10; }
.mini-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; }
.btnrow2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ref-card .code { cursor: pointer; font-size: 13px; }
.lb { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 12px; }
.lb + .lb { border-top: 1px solid var(--line); }
.lb.me { background: #a855f71a; border-color: transparent; }
.lb-rank { width: 32px; text-align: center; font-weight: 800; color: var(--muted); }
.lb .grow b, .lb .grow span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.colbar.zero { background: var(--card2); }

/* Admin */
.adm-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px; margin-bottom: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.adm-nav::-webkit-scrollbar { display: none; }
.adm-nav button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; }
.adm-nav button.on { background: var(--grad); color: #fff; box-shadow: 0 6px 18px #7c3aed55; }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.adm-two { display: grid; gap: 0; }

@media (min-width: 760px) {
  .pf-grid { grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
  .adm-two { grid-template-columns: 1fr 1fr; gap: 14px; }
  .bal-hero { padding: 30px 32px; }
  .bal-hero .big { font-size: 48px; }
  #view > .card, #view > .method-grid, #view > div > .card.tsteps { max-width: 100%; }
  .copyrow:hover, .method:hover, .coin:hover, .chip-amt:hover, .card.order:hover { border-color: var(--p1); }
  .seg button:hover, .adm-nav button:not(.on):hover { color: var(--text); }
  .sheet { max-width: 620px; border-radius: 24px; margin-bottom: 24px; }
  .modal { align-items: center; }
}
@media (max-width: 380px) {
  .amt-grid { grid-template-columns: repeat(2, 1fr); }
  .coin-grid { grid-template-columns: repeat(2, 1fr); }
  .tier-row { grid-template-columns: repeat(2, 1fr); }
}

/* Détail du panier (récap kiosque + commandes) */
.card.basket { padding-bottom: 8px; }
.bline { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.bqty { min-width: 30px; height: 26px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; background: var(--card2); color: var(--p3); font-weight: 700; font-size: 13px; }
.bline .grow b { display: block; white-space: normal; }
.bdet { display: block; font-size: 12px; margin-top: 2px; line-height: 1.35; }
.bprice { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.bprice b { color: var(--p3); }
.bprice s { font-size: 12px; }
.osum { display: block; font-size: 13px; color: var(--text); opacity: .85; }

/* ===== Mise à jour : en-tête, annonces, historique compact, vouch, admin ===== */
.top-right { display: flex; align-items: center; gap: 8px; }
.chip.join { padding: 8px 12px; background: linear-gradient(135deg, #229ed9, #1b7fb8); border-color: transparent; color: #fff; }
.chip.join i { color: #fff; }
.join-long { display: none; }
@media (min-width: 520px) { .join-long { display: inline; } }
@media (max-width: 399px) {
  .brand { font-size: 16px; gap: 8px; min-width: 0; }
  .brand i { display: none; }
  .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .chip { padding: 8px 11px; gap: 6px; font-size: 14px; }
  .top-right { gap: 6px; flex: none; }
}
@media (max-width: 359px) { .chip.join > span { display: none; } }

.ann-list { max-width: 420px; margin: 4px auto 6px; display: grid; gap: 8px; }
.ann { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.35;
  background: linear-gradient(135deg, #fbbf2420, #f472b620); border: 1px solid #fbbf2440; }
.ann i { color: #fcd34d; margin-top: 2px; }
@media (min-width: 760px) { .ann-list { max-width: 560px; } }

/* Historique : cartes plus petites */
.olist { gap: 6px; }
.card.order { padding: 8px 12px; gap: 10px; border-radius: 14px; }
.card.order .order-ico { width: 34px; height: 34px; border-radius: 11px; font-size: 14px; }
.card.order .grow b { font-size: 14px; }
.card.order .grow span { font-size: 12px; }
.card.order .order-amt b { font-size: 14px; }
.card.order .order-amt s { font-size: 11px; }
.card.order > i:last-child { font-size: 11px; }
@media (min-width: 760px) { .olist { grid-template-columns: 1fr 1fr; gap: 8px; } }
.card.order .grow b .star { display: inline; margin-left: 6px; color: #fcd34d; font-size: 11px; font-style: normal; }
.card.order .grow b small { display: inline; font-weight: 400; font-size: 11px; }
.card.order .grow .osum { opacity: .75; }
.card.order .order-cost { font-size: 15px; white-space: nowrap; }

/* Vouch */
.btn.ok-btn, .ok-btn { background: linear-gradient(135deg, #059669, #34d399); color: #04301e; box-shadow: 0 8px 22px #05966955; }
.vouch-state { display: flex; justify-content: center; margin: 4px 0 2px; }
.vouch-send { margin-top: 12px; }
.vouch-help { margin: 6px 0 12px; line-height: 1.4; }
.linkrow { margin-bottom: 4px; }
.vouch-text { white-space: pre-wrap; word-break: break-word; }
.vouch-note { margin: 0 2px 10px; }
.rwgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 8px 0 4px; }
.sheet textarea.inp { font-size: 16px; resize: vertical; min-height: 90px; }

/* Admin : stats, à traiter, réglages */
.nav-dot { font-style: normal; font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--err); color: #fff; display: inline-grid; place-items: center; font-weight: 700; }
.adm-nav button .nav-dot { margin-left: -2px; }
.tile-sub { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.25; }
.tile.accent .tile-sub { color: #ffffffcc; }
.tile-val { overflow-wrap: anywhere; }
.seg.range { max-width: 260px; }
.todo { border-color: #fb718555; }
.todo-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 4px; text-align: left; border-top: 1px solid var(--line); }
.todo-row > i:first-child { color: var(--p2); width: 18px; text-align: center; }
.todo-row > i:last-child { color: var(--muted); font-size: 12px; }
.chart.dense { gap: 2px; }
.chart.dense .col { font-size: 9px; gap: 4px; }
.chart.dense .colbar { border-radius: 4px 4px 2px 2px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.set-row .grow { min-width: 0; }
.set-row .grow b, .set-row .grow span { display: block; }
.set-row .inp { width: 220px; max-width: 48%; flex: none; font-size: 15px; padding: 10px 12px; }
.set-group .card-title { margin-bottom: 0; }
.switch { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line);
  position: relative; cursor: pointer; flex: none; transition: .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; }
.switch:checked { background: #10b981; border-color: transparent; }
.switch:checked::after { left: 23px; }
@media (max-width: 480px) { .set-row { flex-wrap: wrap; } .set-row .inp { width: 100%; max-width: 100%; } }
html.locked #app, html.locked #modal, html.locked #toast { display: none !important; }
.set-row > i:first-child { color: var(--p2); width: 20px; text-align: center; flex: none; }
