* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0a0e17; --bg2: #0d1524; --card: rgba(20,28,44,.75); --card2: rgba(30,40,60,.6);
  --text: #eef2f8; --muted: #7d8aa3; --accent: #2f6bff; --accent2: #4f8bff;
  --border: rgba(255,255,255,.06); --green: #1fd18e; --gold: #f5b23b;
}
body {
  background: var(--bg); color: var(--text); position: relative; overflow-x: hidden;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif; padding-bottom: 110px;
}

/* ---------- FOND ANIME (etoiles filantes) ---------- */
.sky { position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #14203a 0%, #0a0e17 60%, #070a11 100%); }
.stars { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.star { position: absolute; width: 2px; height: 2px; background: #fff; border-radius: 50%;
  opacity: 0; animation: twinkle 3.5s infinite ease-in-out; }
@keyframes twinkle { 0%,100% { opacity: .1; } 50% { opacity: .9; } }
.shoot { position: absolute; width: 120px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,.9), rgba(255,255,255,0));
  transform: rotate(35deg); opacity: 0; filter: drop-shadow(0 0 6px rgba(120,170,255,.8));
  animation: shoot 6s linear infinite; }
@keyframes shoot {
  0% { transform: translate(-10vw, -10vh) rotate(35deg); opacity: 0; }
  8% { opacity: 1; }
  20% { opacity: 0; }
  100% { transform: translate(120vw, 90vh) rotate(35deg); opacity: 0; }
}

/* ---------- HEADER ---------- */
.header { display: flex; align-items: center; gap: 12px; padding: 16px 16px 4px; }
.header img.avatar { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.header .idbox .name { font-weight: 800; font-size: 15px; }
.header .idbox .handle { color: var(--muted); font-size: 11px; letter-spacing: .5px; }
.header .hicons { margin-left: auto; display: flex; gap: 14px; color: var(--muted); font-size: 20px; cursor: pointer; }
.balance-box { text-align: center; padding: 10px 0 16px; }
.balance-box small { color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.balance-box .amount { font-weight: 900; font-size: 34px; margin-top: 2px; }

/* ---------- ONGLETS haut (Cartes / Box) ---------- */
.tabs { display: flex; gap: 6px; margin: 0 16px 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: 14px; padding: 5px; backdrop-filter: blur(8px); }
.tab { flex: 1; text-align: center; padding: 11px; border-radius: 10px; color: var(--muted);
  font-size: 14px; font-weight: 600; cursor: pointer; transition: .2s; }
.tab.active { background: linear-gradient(180deg, #10203f, #0c1830); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(90,140,255,.3); }

/* ---------- RECHERCHE + FILTRES ---------- */
.search-bar { display:flex; gap:10px; padding: 0 16px 12px; }
.search-bar .search-wrap { flex:1; position: relative; }
.search-bar .search-wrap:before { content:"\1F50D"; position:absolute; left:14px; top:50%;
  transform:translateY(-50%); font-size:14px; opacity:.5; }
.search-bar input { width:100%; background: var(--card); border:1px solid var(--border);
  border-radius: 12px; padding: 13px 14px 13px 40px; color: var(--text); font-size:14px; outline:none; backdrop-filter: blur(8px); }
.search-bar input::placeholder { color: var(--muted); }
.search-bar .filter-btn { background: var(--card); border:1px solid var(--border);
  border-radius: 12px; padding: 0 16px; color: var(--text); font-size:14px; cursor:pointer; position:relative;
  display:flex; align-items:center; gap:6px; backdrop-filter: blur(8px); }
.search-bar .filter-btn .dot { position:absolute; top:8px; right:10px; width:7px; height:7px;
  border-radius:50%; background: var(--accent2); display:none; }
.search-bar .filter-btn.active .dot { display:block; }
.results-count { color: var(--muted); font-size: 13px; padding: 0 16px 10px; }
.filter-panel { padding: 0 16px 12px; }
.filter-group { margin-bottom: 14px; }
.filter-group .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.chips { display:flex; gap:8px; flex-wrap:wrap; }
.chip { padding: 7px 14px; border-radius: 14px; background: var(--card2);
  border:1px solid var(--border); color: var(--muted); font-size:13px; cursor:pointer; }
.chip.active { color:#fff; background: var(--accent); border-color: var(--accent); }
.price-row { display:flex; gap:10px; align-items:center; }
.price-row input { width:100%; background: var(--card2); border:1px solid var(--border);
  border-radius:10px; padding:10px; color:var(--text); outline:none; }
.filter-actions { display:flex; gap:10px; margin-top:4px; }
.filter-actions button { flex:1; padding:12px; border-radius:12px; border:none; font-weight:700; cursor:pointer; }
.filter-actions .apply { background: var(--accent); color:#fff; }
.filter-actions .reset { background: var(--card2); color: var(--text); border:1px solid var(--border); }
.no-result { color: var(--muted); padding: 30px 16px; text-align:center; }

/* ---------- CARTE CC (style MISTERBIN, horizontal) ---------- */
.list { padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.cc-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px; backdrop-filter: blur(10px); }
.cc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cc-bin { font-weight: 800; font-size: 16px; margin-right: 4px; }
.cc-tag { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .3px; }
.tag-orange { background: rgba(245,150,60,.16); color: #f5963c; }
.tag-blue { background: rgba(90,140,255,.16); color: var(--accent2); }
.tag-green { background: rgba(31,209,142,.16); color: var(--green); }
.tag-grey { background: rgba(160,175,200,.14); color: #9fb0cc; }
.cc-price { margin-left: auto; font-weight: 800; font-size: 17px; color: var(--accent2); }
.cc-body { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.cc-thumb { width: 74px; height: 48px; border-radius: 8px; object-fit: cover; background: var(--card2); flex-shrink: 0; }
.cc-info { font-size: 13px; color: var(--muted); line-height: 1.7; flex: 1; }
.cc-info b { color: var(--text); font-weight: 600; }
.cc-actions { display: flex; gap: 8px; align-items: center; }
.cc-auto { background: rgba(90,140,255,.14); color: var(--accent2); border:1px solid rgba(90,140,255,.3);
  border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.cc-add { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color:#fff;
  border:none; font-size: 22px; cursor:pointer; display:flex; align-items:center; justify-content:center;
  box-shadow: 0 3px 10px rgba(47,107,255,.5); }
.cc-foot { color: var(--muted); font-size: 11px; margin-top: 10px; text-align: right; }

/* ---------- BOX ---------- */
.info-box { margin: 0 16px 14px; background: var(--card); border:1px solid var(--border);
  border-radius: 16px; padding: 16px; backdrop-filter: blur(8px); }
.info-box .t { font-weight: 700; margin-bottom: 6px; }
.info-box p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.info-box .stock { color: var(--muted); font-size: 12px; margin-top: 8px; }
.info-box .stock b { color: var(--accent2); }
.qty-box { margin: 0 16px; background: var(--card); border:1px solid var(--border);
  border-radius: 16px; padding: 18px; backdrop-filter: blur(8px); }
.qty-box .t { font-weight: 700; margin-bottom: 16px; }
.qty-row { display:flex; align-items:center; justify-content:center; gap: 22px; margin-bottom: 16px; }
.qty-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--card2); border:1px solid var(--border);
  color:#fff; font-size: 24px; cursor:pointer; }
.qty-val { text-align:center; }
.qty-val .n { font-size: 40px; font-weight: 900; line-height: 1; }
.qty-val .u { color: var(--muted); font-size: 12px; }
.qty-slider { width: 100%; accent-color: var(--accent); margin-bottom: 18px; }
.qty-line { display:flex; justify-content: space-between; color: var(--muted); font-size: 14px; padding: 6px 0; }
.qty-line.total { color: var(--accent2); font-weight: 800; font-size: 18px; border-top:1px solid var(--border); margin-top: 6px; padding-top: 12px; }
.qty-warn { color: #ff6b6b; font-size: 13px; text-align:center; margin-top: 10px; }

/* ---------- DEPOT ---------- */
.mysolde { margin: 0 16px 14px; background: var(--card); border:1px solid var(--border);
  border-radius: 16px; padding: 18px; backdrop-filter: blur(8px); }
.mysolde .lbl { color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.mysolde .val { color: var(--accent2); font-weight: 900; font-size: 30px; margin: 4px 0; }
.mysolde .sub { color: var(--green); font-size: 12px; }
.fidelite { margin: 0 16px 14px; background: var(--card); border:1px solid var(--border);
  border-radius: 16px; padding: 16px; backdrop-filter: blur(8px); }
.fidelite .t { font-weight: 700; margin-bottom: 6px; }
.fidelite p { color: var(--muted); font-size: 13px; line-height: 1.5; margin-bottom: 12px; }
.fidelite p b { color: var(--accent2); }
.prog { height: 8px; background: var(--card2); border-radius: 6px; overflow: hidden; }
.prog > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.prog-lbls { display:flex; justify-content: space-between; color: var(--muted); font-size: 11px; margin-top: 6px; }
.crypto-list { padding: 0 16px; }
.crypto-list .t { font-weight: 700; margin-bottom: 12px; }
.crypto-item { display:flex; align-items:center; gap: 12px; background: var(--card); border:1px solid var(--border);
  border-radius: 14px; padding: 14px; margin-bottom: 10px; cursor:pointer; backdrop-filter: blur(8px); }
.crypto-item .ico { width: 38px; height: 38px; border-radius: 50%; display:flex; align-items:center; justify-content:center; font-weight:800; color:#fff; }
.crypto-item .nm { font-weight: 700; }
.crypto-item .nt { color: var(--muted); font-size: 12px; }
.crypto-item .arr { margin-left:auto; color: var(--muted); font-size: 18px; }
.deposit-qr { text-align:center; padding: 16px; }
.deposit-qr img { width: 220px; height: 220px; background:#fff; border-radius:12px; padding:8px; }
.deposit-qr .addr { margin-top:14px; font-size:12px; color:var(--muted); word-break:break-all;
  background: var(--card); border:1px solid var(--border); border-radius:10px; padding:10px; }
.deposit-qr .amount-due { font-weight:800; font-size:20px; margin-top:10px; }
.deposit-amt { padding: 0 16px 14px; }
.deposit-amt input { width:100%; background: var(--card); border:1px solid var(--border);
  border-radius:12px; padding:14px; color:var(--text); font-size:18px; outline:none; margin-bottom:12px; }

/* ---------- PRECOMMANDE ---------- */
.pre-head { display:flex; align-items:center; padding: 0 16px 14px; }
.pre-head .order-btn { margin-left:auto; background: var(--accent); color:#fff; border:none;
  border-radius: 12px; padding: 10px 22px; font-weight:700; cursor:pointer; }
.rank-item { display:flex; align-items:center; gap:12px; padding: 12px 16px; }
.rank-item .pos { width:26px; height:26px; border-radius:50%; background: var(--card2);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; }
.rank-item .pos.g1 { background: var(--gold); color:#000; }
.rank-item .pos.g2 { background:#c0c8d6; color:#000; }
.rank-item .pos.g3 { background:#cd7f32; color:#000; }
.rank-item .amt { margin-left:auto; font-weight:700; color: var(--accent2); }

/* ---------- COMMANDES ---------- */
.order-card { margin: 0 16px 12px; background: var(--card); border:1px solid var(--border);
  border-radius: 16px; padding: 16px; backdrop-filter: blur(8px); }
.order-card .top { display:flex; align-items:center; }
.order-card .oid { font-weight: 800; }
.order-card .date { color: var(--muted); font-size: 12px; margin-top: 2px; }
.order-card .price { margin-left:auto; background: rgba(31,209,142,.16); color: var(--green);
  font-weight:700; font-size: 13px; padding: 4px 10px; border-radius: 8px; }
.order-line { display:flex; align-items:center; gap: 12px; margin-top: 14px; }
.order-line img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--card2); }
.order-line .nm { font-weight: 600; font-size: 14px; }
.order-line .ref { color: var(--muted); font-size: 12px; }

/* ---------- COMMUN ---------- */
.section-title { font-size: 24px; font-weight: 900; padding: 4px 16px 12px; }
.hidden { display: none; }
.btn { display:block; width:100%; padding:15px; border:none; border-radius:14px;
  background: linear-gradient(180deg, var(--accent2), var(--accent)); color:#fff; font-weight:700; font-size:15px; margin-top:10px; cursor:pointer;
  box-shadow: 0 6px 18px rgba(47,107,255,.4); }
.btn.secondary { background: var(--card2); color: var(--text); border:1px solid var(--border); box-shadow:none; }
.btn:disabled { opacity: .5; box-shadow:none; }
.cart-item { background: var(--card); border:1px solid var(--border); border-radius:14px;
  padding:14px; margin:0 16px 12px; display:flex; justify-content:space-between; align-items:center; backdrop-filter: blur(8px); }
.cart-item .info { font-size:13px; color:var(--muted); line-height:1.6; }
.cart-item .info b { color: var(--text); }
.cart-item .rm { background:none; border:none; color:#ff6b6b; font-size:20px; cursor:pointer; }
.cart-total { padding: 0 16px; margin-top: 8px; font-weight:800; font-size:20px; }
.cart-checkout { margin: 12px 16px; }

/* Toast */
.toast { position: fixed; top: 16px; left: 50%; transform: translateX(-50%) translateY(-80px);
  background: linear-gradient(180deg, #23b880, #1a9e6c); color:#fff; padding: 12px 20px; border-radius: 12px; font-weight:600;
  font-size:14px; z-index: 100; opacity: 0; transition: transform .3s ease, opacity .3s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,.4); max-width: 90%; text-align:center; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* Banniere annonce */
.announce { margin: 0 16px 12px; background: linear-gradient(90deg, rgba(47,107,255,.14), transparent);
  border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 14px; overflow: hidden; }
.announce .track { color: var(--accent2); font-size: 13px; font-weight: 600; white-space: nowrap;
  display: inline-block; animation: marquee 16s linear infinite; }
@keyframes marquee { from { transform: translateX(100%); } to { transform: translateX(-100%); } }

/* Sheet (paiement) */
.sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display:flex; align-items:flex-end; z-index:50; }
.sheet { background: var(--bg2); width: 100%; border-radius: 20px 20px 0 0; padding: 20px; max-height:85vh; overflow:auto; border-top:1px solid var(--border); }
.sheet h3 { margin-bottom: 12px; }
.mode-row { display:flex; gap:10px; margin-bottom:12px; }
.mode-btn { flex:1; padding:10px; border-radius:10px; background:var(--card2); border:1px solid var(--border); color:var(--muted); text-align:center; cursor:pointer; }
.mode-btn.active { color:var(--text); border-color:var(--accent); }
.cur-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cur-cell { background: var(--card2); border:1px solid var(--border); border-radius: 12px; padding: 14px; cursor:pointer; }
.cur-cell .cur { font-weight: 700; }
.cur-cell .net { color: var(--muted); font-size: 12px; }

/* ---------- NAVBAR flottante centrale ---------- */
.navbar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: rgba(16,24,40,.92); border: 1px solid var(--border); border-radius: 22px;
  display: flex; gap: 6px; padding: 8px; z-index: 40; backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.navbar .item { width: 48px; height: 44px; border-radius: 16px; display:flex; align-items:center; justify-content:center;
  color: var(--muted); font-size: 20px; cursor: pointer; transition: .2s; }
.navbar .item.active { background: linear-gradient(180deg, var(--accent2), var(--accent)); color:#fff;
  box-shadow: 0 4px 12px rgba(47,107,255,.5); }
