/* IDM - Innovative Digital Marketplace */
:root {
  --bg: #0b1220;
  --surface: #111a2e;
  --surface-2: #1a2543;
  --text: #e8ecf5;
  --muted: #94a3b8;
  --primary: #10b981;
  --primary-dark: #059669;
  --accent: #f59e0b;
  --purple: #8b5cf6;
  --border: #253258;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 8px 30px rgba(0,0,0,.25);
}

/* Wallet modal */
.wallet-list { display: grid; gap: 10px; margin-top: 14px; }
.wallet-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text);
  border-radius: var(--radius); cursor: pointer;
  font-size: 15px; font-weight: 500; text-align: left;
  transition: border-color .2s, transform .1s;
}
.wallet-option:hover { border-color: var(--primary); }
.wallet-option:active { transform: scale(.98); }
.wallet-option .wo-icon { font-size: 22px; width: 32px; text-align: center; }
.wallet-option .wo-meta { display: flex; flex-direction: column; }
.wallet-option .wo-sub { font-size: 12px; color: var(--muted); font-weight: 400; }
.wallet-option[disabled] { opacity: .5; cursor: not-allowed; }
.wallet-hint { margin-top: 12px; font-size: 12px; }
.wallet-badge { margin-left: auto; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--primary); color: #0b1220; font-weight: 700; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(1200px, 92%); margin: 0 auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,18,32,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 40px; height: 40px; object-fit: contain; display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
}
.logo-text { font-weight: 600; font-size: 14px; }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); font-size: 14px; font-weight: 500; transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--text); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.lang-select {
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13px; cursor: pointer;
}
.menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; cursor: pointer; transition: all .2s;
  background: var(--surface-2); color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #04231a; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-lg { padding: 14px 22px; font-size: 16px; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--surface); }
.section h2 { font-size: 32px; margin-bottom: 8px; }
.section-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 30px; }

/* Hero */
.hero { padding: 80px 0 60px; }
.hero-inner {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center;
}
.hero-text h1 { font-size: 48px; line-height: 1.15; margin: 12px 0 16px; }
.hero-text .accent { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-text p { color: var(--muted); font-size: 18px; margin-bottom: 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 40px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 24px; color: var(--primary); }
.hero-stats span { font-size: 13px; color: var(--muted); }
.badge-halal {
  display: inline-block; padding: 6px 12px; border-radius: 20px;
  background: rgba(16,185,129,.15); color: var(--primary);
  font-size: 13px; font-weight: 600; border: 1px solid rgba(16,185,129,.3);
}
.hero-card {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  padding: 40px; border-radius: var(--radius); border: 1px solid var(--border);
  text-align: center; box-shadow: var(--shadow);
}
.coin {
  width: 120px; height: 120px; margin: 0 auto 20px;
  border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: #0b1220;
  box-shadow: 0 0 40px rgba(16,185,129,.4);
}
.hero-card ul { list-style: none; margin-top: 20px; text-align: left; }
.hero-card li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.hero-card li:before { content: "✓ "; color: var(--primary); font-weight: 700; }

/* Filters */
.filters { display: flex; gap: 10px; }
.filters input, .filters select {
  padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 14px;
}

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, border-color .2s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.product-image {
  aspect-ratio: 4/3; background: linear-gradient(135deg, var(--surface-2), var(--surface));
  display: flex; align-items: center; justify-content: center; font-size: 48px; color: var(--muted);
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-title { font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.product-desc { font-size: 13px; color: var(--muted); flex: 1; }
.product-price { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid var(--border); }
.product-price strong { color: var(--primary); }
.product-price span { font-size: 12px; color: var(--muted); }
.product-seller { font-size: 12px; color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-green { background: rgba(16,185,129,.2); color: var(--primary); }
.badge-purple { background: rgba(139,92,246,.2); color: var(--purple); }
.badge-kyc { background: rgba(245,158,11,.15); color: var(--accent); }

/* Cards & forms */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
.form input, .form select, .form textarea {
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 14px; font-family: inherit;
}
.form textarea { min-height: 90px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--primary); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--text) !important; }
.check input { width: auto; }
.gate { text-align: center; padding: 40px; background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--border); }

.kyc-banner { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; border: 1px solid; }
.kyc-warning { background: rgba(245,158,11,.1); border-color: var(--accent); color: var(--accent); }
.kyc-ok { background: rgba(16,185,129,.1); border-color: var(--primary); color: var(--primary); }
.kyc-banner button { margin-left: 12px; }

/* Premium */
.premium-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 30px; }
.premium-card { text-align: center; position: relative; }
.premium-card .badge { margin-bottom: 12px; }
.premium-card .price { font-size: 32px; font-weight: 800; margin: 12px 0; color: var(--primary); }
.premium-card .price span { font-size: 14px; color: var(--muted); font-weight: 400; }
.premium-card ul { list-style: none; margin: 16px 0; text-align: left; }
.premium-card li { padding: 6px 0; }
.premium-card li:before { content: "✓ "; color: var(--primary); }
.premium-card.featured { border-color: var(--purple); box-shadow: 0 0 30px rgba(139,92,246,.15); }
.premium-card.featured .price { color: var(--purple); }
.premium-card.featured li:before { color: var(--purple); }

/* Support */
.support-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-top: 30px; }
.support-grid .card p { margin: 8px 0; }

/* Footer */
.footer { padding: 24px 0; border-top: 1px solid var(--border); text-align: center; color: var(--muted); font-size: 13px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal.open { display: flex; }
.modal-content { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; color: var(--muted); font-size: 28px; cursor: pointer; }
.tabs, .pay-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.tab, .pay-tab { flex: 1; padding: 10px; background: none; border: none; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; }
.tab.active, .pay-tab.active { color: var(--primary); border-color: var(--primary); }
.tab-panel, .pay-panel { display: none; }
.tab-panel.active, .pay-panel.active { display: flex; }
.wallet-info { padding: 12px; background: var(--bg); border-radius: 8px; font-family: monospace; font-size: 13px; word-break: break-all; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--surface-2); color: var(--text); padding: 12px 20px; border-radius: 10px;
  border: 1px solid var(--border); z-index: 200; opacity: 0; transition: all .3s;
  box-shadow: var(--shadow); max-width: 90%; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { border-color: var(--primary); }
.toast.error { border-color: var(--danger); }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 36px; }
  .support-grid { grid-template-columns: 1fr; }
  .logo-text { display: none; }
}
@media (max-width: 700px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border); }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
  .hero-text h1 { font-size: 28px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
  .row { grid-template-columns: 1fr; }
  .section { padding: 50px 0; }
  #walletBtn { display: none; }
}
/* Admin */
.admin-link { color: var(--primary); font-size: 13px; }
.admin-link:hover { text-decoration: underline; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.admin-tab { background: transparent; color: var(--muted); border: none; padding: 10px 16px; cursor: pointer; font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.admin-panel { display: none; }
.admin-panel.active { display: block; }
.admin-stats { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.admin-stats > div { background: var(--surface-2); padding: 12px 18px; border-radius: var(--radius); border: 1px solid var(--border); min-width: 140px; }
.admin-stats strong { display: block; font-size: 22px; color: var(--primary); }
.admin-stats span { font-size: 12px; color: var(--muted); }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.admin-table code { font-size: 12px; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }

/* ---------- Pages d'authentification ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.auth-wrap { width: 100%; max-width: 460px; padding: 32px 18px; }
.auth-back { display: inline-block; margin-bottom: 14px; font-size: .9rem; opacity: .8; }
.auth-card { padding: 26px 22px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; margin-top: 12px; }
.link-btn { background: none; border: 0; color: inherit; opacity: .85; cursor: pointer; font-size: .9rem; text-decoration: underline; padding: 0; }
.link-btn:hover { opacity: 1; }
.small { font-size: .82rem; }

/* ---------- Accueil immersif : catalogue ---------- */
body.locked .gated { display: none; }
body.signed-out #discover { display: none; }

.cat-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 26px; }
.cat-tab {
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04);
  color: inherit; padding: 9px 15px; border-radius: 999px; cursor: pointer;
  font-size: .9rem; transition: .2s; white-space: nowrap;
}
.cat-tab:hover { border-color: var(--accent, #10b981); }
.cat-tab.active { background: var(--accent, #10b981); border-color: transparent; color: #04150f; font-weight: 600; }

.discover-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.disc-card {
  border-radius: 18px; overflow: hidden; background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09); display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.disc-card:hover { transform: translateY(-6px); box-shadow: 0 22px 48px rgba(0,0,0,.45); border-color: rgba(16,185,129,.45); }
.disc-media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; }
.disc-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.disc-card:hover .disc-media img { transform: scale(1.06); }
.disc-cat {
  position: absolute; left: 12px; top: 12px; padding: 5px 11px; border-radius: 999px;
  background: rgba(8,14,24,.72); backdrop-filter: blur(6px); font-size: .76rem;
}
.disc-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.disc-body h3 { margin: 0; font-size: 1.12rem; }
.disc-body p { margin: 0; font-size: .9rem; line-height: 1.45; }
.disc-origin, .disc-count { font-size: .82rem; opacity: .75; }
.disc-body .btn { margin-top: auto; }

/* ---------- Choix du profil ---------- */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.role-grid.compact .role-card { padding: 14px 10px; }
.role-card {
  display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center;
  padding: 22px 14px; border-radius: 16px; cursor: pointer; color: inherit;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); transition: .2s;
}
.role-card:hover, .role-card.selected { border-color: var(--accent, #10b981); background: rgba(16,185,129,.10); }
.role-emoji { font-size: 1.9rem; }

/* ---------- Vérification KYC ---------- */
.kyc-gate { max-width: 560px; margin: 0 auto; text-align: center; padding: 30px 24px; }
.kyc-gate-icon { font-size: 2.4rem; }
.kyc-form { text-align: left; margin-top: 18px; }
.kyc-price { font-size: 1.15rem; font-weight: 700; text-align: center; }
.kyc-status-line { margin: 12px 0; }
.kyc-badge { font-size: .82rem; }
.kyc-none { background: rgba(255,255,255,.12); }
.kyc-pending { background: rgba(234,179,8,.22); color: #facc15; }
.kyc-review { background: rgba(59,130,246,.22); color: #93c5fd; }
.kyc-validated { background: rgba(16,185,129,.22); color: #34d399; }
.kyc-rejected { background: rgba(239,68,68,.22); color: #fca5a5; }

@media (max-width: 640px) {
  .discover-grid { grid-template-columns: 1fr; }
}

/* ===== Espaces Acheteur / Vendeur ===== */
.tab-panel.active { flex-direction: column; }
.filters-panel { padding: 16px; margin-bottom: 20px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.filters input, .filters select { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.scope-tabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.scope-tab { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; }
.scope-tab.active { border-color: var(--primary); color: var(--primary); background: rgba(16,185,129,.1); }
.region-input { display: none; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); min-width: 200px; }
.region-input.show { display: inline-block; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.product-image { position: relative; }
.fav-btn { position: absolute; top: 10px; right: 10px; border: none; background: rgba(0,0,0,.5); color: #fff; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.product-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: .78rem; color: var(--muted); margin: 6px 0; }
.product-meta .ok { color: var(--primary); }
.product-meta .ko { color: #ef4444; }
.owner-actions { display: flex; gap: 6px; }

.detail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-bottom: 14px; }
.detail-gallery img { width: 100%; height: 90px; object-fit: cover; border-radius: 10px; }
.detail-gallery img.main { grid-column: 1 / -1; height: 240px; }
.detail-gallery.empty { display: flex; align-items: center; justify-content: center; height: 180px; font-size: 3rem; background: var(--card); border-radius: 12px; }
.detail-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.detail-meta .ok { color: var(--primary); }
.detail-meta .ko { color: #ef4444; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.list { display: flex; flex-direction: column; gap: 12px; }
.list-item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.list-item.thread { cursor: pointer; }
.list-item.thread:hover { border-color: var(--primary); }
.li-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.li-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: var(--muted); margin-top: 6px; }
.li-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.li-actions select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.ostatus { font-size: .75rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); }
.o-pending { color: #f59e0b; } .o-confirmed { color: #3b82f6; } .o-shipped { color: #8b5cf6; }
.o-delivered { color: var(--primary); } .o-cancelled { color: #ef4444; }
.tracker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: .75rem; color: var(--muted); }
.tracker .step.done { color: var(--primary); font-weight: 700; }

.chat-thread { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 0; }
.bubble { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: .9rem; display: flex; flex-direction: column; }
.bubble.mine { align-self: flex-end; background: rgba(16,185,129,.18); }
.bubble.theirs { align-self: flex-start; background: var(--card); border: 1px solid var(--border); }
.bubble-prod { font-size: .7rem; color: var(--muted); margin-bottom: 3px; }
.bubble-time { font-size: .65rem; color: var(--muted); margin-top: 4px; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; text-align: center; }
.stat-card strong { display: block; font-size: 1.4rem; color: var(--primary); }
.stat-card span { font-size: .8rem; color: var(--muted); }
.bar-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 10px; align-items: center; font-size: .85rem; margin: 6px 0; }
.bar { background: var(--border); border-radius: 999px; height: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--primary); }

.photo-preview { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-preview .thumb { position: relative; }
.photo-preview img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.photo-preview button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: none; background: #ef4444; color: #fff; cursor: pointer; line-height: 1; }

/* ===== Notifications ===== */
.notif-wrap { position: relative; }
.icon-btn {
  background: var(--surface-2, rgba(255,255,255,.06)); border: 1px solid var(--border, rgba(255,255,255,.12));
  color: inherit; border-radius: 12px; padding: 8px 10px; font-size: 1.05rem; cursor: pointer; position: relative;
  transition: transform .15s ease, background .2s ease;
}
.icon-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.1); }
.notif-count {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: #ef4444; color: #fff; font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(360px, 88vw); max-height: 420px; overflow: auto;
  background: var(--card, #131a26); border: 1px solid var(--border, rgba(255,255,255,.12)); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5); padding: 8px; display: none; z-index: 60;
}
.notif-panel.open { display: block; }
.notif-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; }
.link-btn { background: none; border: 0; color: var(--primary, #22c55e); cursor: pointer; font-size: .8rem; }
.notif-list { display: flex; flex-direction: column; gap: 4px; }
.notif-item { display: flex; gap: 10px; padding: 10px; border-radius: 12px; cursor: pointer; text-decoration: none; color: inherit; }
.notif-item:hover { background: rgba(255,255,255,.06); }
.notif-item.unread { background: rgba(34,197,94,.08); }
.notif-item .notif-ic { font-size: 1.1rem; }
.notif-item .notif-body { display: grid; gap: 2px; }
.notif-item { text-align: left; background: none; border: 0; width: 100%; font: inherit; }
.notif-item strong { font-size: .9rem; display: block; }
.notif-item .notif-body span { font-size: .82rem; opacity: .8; display: block; }
.notif-item .notif-body em { font-size: .72rem; opacity: .55; font-style: normal; }
.notif-empty { padding: 14px; text-align: center; }

/* ===== Console d'administration ===== */
.console-body main { min-height: 70vh; }
.console-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.console-tab {
  background: rgba(255,255,255,.04); border: 1px solid var(--border, rgba(255,255,255,.12)); color: inherit;
  padding: 9px 14px; border-radius: 999px; cursor: pointer; font-size: .88rem; transition: all .2s ease;
}
.console-tab:hover { background: rgba(255,255,255,.09); }
.console-tab.active { background: var(--primary, #22c55e); color: #06210f; border-color: transparent; font-weight: 600; }
.console-panel { display: none; animation: fadeUp .3s ease; }
.console-panel.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.console-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; font-size: .85rem; }
.bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #a855f7); border-radius: 999px; }
.list { display: grid; gap: 8px; }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--border, rgba(255,255,255,.1)); border-radius: 14px; background: rgba(255,255,255,.03); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .72rem;
  background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-danger { background: #ef4444; color: #fff; border: 1px solid transparent; }
.btn-danger:hover { filter: brightness(1.08); }
.center { text-align: center; padding: 22px; }
.small { font-size: .8rem; }
.denied { max-width: 460px; margin: 60px auto; text-align: center; display: grid; gap: 12px; justify-items: center; }
.denied-icon { font-size: 2.4rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } .bar-row { grid-template-columns: 90px 1fr auto; } }

.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.admin-card { border: 1px solid var(--border, rgba(255,255,255,.1)); border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.03); }
.admin-card.blocked { opacity: .6; border-color: #ef4444; }
.admin-card img { width: 100%; height: 140px; object-fit: cover; }
.admin-card-body { padding: 12px; display: grid; gap: 6px; }

.modal-content.wide { max-width: 880px; width: 94vw; max-height: 88vh; overflow: auto; }
.kyc-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0; }
.kyc-compare p { margin: 6px 0; font-size: .88rem; }
.kyc-docs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.kyc-docs img { width: 200px; height: 140px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border, rgba(255,255,255,.12)); }
.kyc-row { flex-wrap: wrap; }
.kyc-history { display: grid; gap: 10px; margin-top: 14px; }
.kyc-review { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--border, rgba(255,255,255,.1)); }
.kyc-review p { margin: 6px 0; font-size: .88rem; }
@media (max-width: 720px) { .kyc-compare { grid-template-columns: 1fr; } }
