/* Black Trading — espace membre. Noir, néon vert, or. */
:root {
  --bg: #050505;
  --panel: #0f0f0f;
  --panel-2: #151515;
  --line: #262626;
  --line-2: #333;
  --text: #e8e8e8;
  --muted: #8c8c8c;
  --gold: #d4af37;
  --gold-2: #f3d06b;
  --neon: #39ff14;
  --neon-dim: rgba(57, 255, 20, .14);
  --red: #ff4d4d;
  --red-dim: rgba(255, 77, 77, .14);
  --amber: #ffc94d;
  --amber-dim: rgba(255, 201, 77, .13);
  --input: #1a160a;
  --radius: 10px;
  --head: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 14px; }
body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(212, 175, 55, .08), transparent 60%),
    radial-gradient(900px 400px at -10% 110%, rgba(57, 255, 20, .06), transparent 60%),
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px) 0 0 / 100% 32px,
    var(--bg);
}
body.no-scroll { overflow: hidden; }
a { color: var(--gold-2); }
button, input, select, textarea { font: inherit; color: inherit; }
.num, td.n, .kpi .v { font-variant-numeric: tabular-nums; }
.pos { color: var(--neon) !important; }
.neg { color: var(--red) !important; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 12px 20px; background: rgba(0, 0, 0, .88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--neon), transparent); opacity: .7; }
.brand { font-family: var(--head); font-weight: 800; letter-spacing: .12em; color: var(--gold); font-size: 15px; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--neon); text-shadow: 0 0 10px rgba(57, 255, 20, .55); }
.topbar .spacer { flex: 1; }
.user { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.demo-banner { background: repeating-linear-gradient(45deg, #1d1806, #1d1806 12px, #141004 12px, #141004 24px);
  color: var(--amber); text-align: center; padding: 7px 12px; font-size: 12px; border-bottom: 1px solid #3a300c; }
.demo-banner button { margin-left: 8px; }

/* ---------- onglets ---------- */
.tabs { display: flex; gap: 4px; padding: 10px 20px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: none; border: 0; color: var(--muted); padding: 10px 14px; cursor: pointer; white-space: nowrap;
  font-family: var(--head); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--gold); border-bottom-color: var(--gold); text-shadow: 0 0 12px rgba(212, 175, 55, .45); }

main { padding: 20px; max-width: 1500px; margin: 0 auto; }
h2 { font-family: var(--head); font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--neon); margin: 0;
  text-shadow: 0 0 10px rgba(57, 255, 20, .35); }
h3 { font-family: var(--head); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin: 0; }
.section-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.section-head .spacer { flex: 1; }

/* ---------- boutons & champs ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 8px; padding: 8px 14px; cursor: pointer; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none; transition: .15s; }
.btn:hover { border-color: var(--gold); color: var(--gold-2); }
.btn.primary { background: linear-gradient(180deg, #e2bf4f, #b8932a); color: #0a0a0a; border-color: #e2bf4f; }
.btn.primary:hover { box-shadow: 0 0 18px rgba(212, 175, 55, .45); color: #000; }
.btn.neon { border-color: var(--neon); color: var(--neon); background: rgba(57, 255, 20, .06); }
.btn.neon:hover { box-shadow: 0 0 16px rgba(57, 255, 20, .35); }
.btn.danger { border-color: #5a1f1f; color: var(--red); }
.btn.danger:hover { border-color: var(--red); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: wait; }
.icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; padding: 4px 8px; }
.icon-btn:hover { color: var(--gold); }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
input, select, textarea {
  background: var(--input); border: 1px solid #3a3215; border-radius: 7px; padding: 8px 10px; color: var(--gold-2); width: 100%; min-width: 0;
  font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .15); }
input[type=checkbox] { width: auto; accent-color: var(--gold); }
select option { background: #111; color: var(--text); }
textarea { resize: vertical; min-height: 70px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters label.f { min-width: 150px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.grid-form .full { grid-column: 1 / -1; }
.calc-preview { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 20px; padding: 5px 11px; font-size: 12px; color: var(--muted); }
.chip b { color: var(--text); font-weight: 600; }

/* ---------- cartes & KPI ---------- */
.panel { background: linear-gradient(180deg, var(--panel), #0b0b0b); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.kpi { background: linear-gradient(180deg, #121212, #0b0b0b); border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: 8px; padding: 10px 12px; }
.kpi .l { font-size: 10px; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.kpi .v { font-size: 20px; font-weight: 800; margin-top: 4px; color: #fff; }
.kpi .s { font-size: 11px; color: var(--muted); margin-top: 2px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }

/* ---------- tableaux ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #0b0b0b; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { position: sticky; top: 0; background: #000; color: var(--gold); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em;
  text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--gold); white-space: nowrap; font-weight: 700; }
th.auto { color: var(--neon); border-bottom-color: var(--neon); }
td { padding: 8px 10px; border-bottom: 1px solid #1b1b1b; white-space: nowrap; }
td.n, th.n { text-align: right; }
td.c, th.c { text-align: center; }
tbody tr:hover td { background: rgba(212, 175, 55, .05); }
tr.click { cursor: pointer; }
tfoot td { background: #000; color: var(--gold); font-weight: 700; border-top: 1px solid var(--gold); }
.empty { text-align: center; color: var(--muted); padding: 30px !important; white-space: normal; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; border: 1px solid transparent; white-space: nowrap; }
.b-win { color: var(--neon); background: var(--neon-dim); border-color: rgba(57, 255, 20, .35); }
.b-loss { color: var(--red); background: var(--red-dim); border-color: rgba(255, 77, 77, .35); }
.b-be { color: #bbb; background: #222; border-color: #333; }
.b-open { color: var(--gold-2); background: rgba(212, 175, 55, .1); border-color: rgba(212, 175, 55, .35); }
.b-warn { color: var(--amber); background: var(--amber-dim); border-color: rgba(255, 201, 77, .3); }
.b-stop { color: var(--red); background: var(--red-dim); border-color: rgba(255, 77, 77, .45); }
.b-ok { color: var(--neon); background: var(--neon-dim); border-color: rgba(57, 255, 20, .3); }
.b-gold { color: var(--gold-2); background: rgba(212, 175, 55, .12); border-color: rgba(212, 175, 55, .4); }

/* ---------- comptes ---------- */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.acc { position: relative; overflow: hidden; }
.acc::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--gold), var(--neon)); }
.acc-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.acc-head .t { flex: 1; }
.acc-head .t b { font-size: 16px; display: block; }
.acc-head .t small { color: var(--muted); }
.acc-bal { font-size: 26px; font-weight: 800; font-family: var(--head); letter-spacing: .02em; }
.rows { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13px; margin-top: 10px; }
.rows span:nth-child(odd) { color: var(--muted); }
.rows span:nth-child(even) { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 7px; background: #1d1d1d; border-radius: 6px; overflow: hidden; margin-top: 4px; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--neon)); box-shadow: 0 0 10px rgba(57, 255, 20, .5); }
.bar.danger > i { background: linear-gradient(90deg, var(--amber), var(--red)); box-shadow: none; }
.meter-label { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 12px; }

/* ---------- calendrier ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(90px, .9fr); gap: 6px; }
.cal .h { font-family: var(--head); font-size: 10.5px; color: var(--gold); text-align: center; letter-spacing: .08em; padding: 6px 0; border-bottom: 1px solid var(--gold); }
.cal .d { min-height: 86px; background: #0d0d0d; border: 1px solid #1d1d1d; border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; }
.cal .d .dn { font-size: 11px; color: var(--muted); font-weight: 700; }
.cal .d .p { flex: 1; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; }
.cal .d .c { font-size: 10.5px; color: var(--muted); text-align: center; }
.cal .d.out { opacity: .25; }
.cal .d.win { background: linear-gradient(180deg, rgba(57, 255, 20, .16), rgba(57, 255, 20, .05)); border-color: rgba(57, 255, 20, .4); }
.cal .d.loss { background: linear-gradient(180deg, rgba(255, 77, 77, .17), rgba(255, 77, 77, .05)); border-color: rgba(255, 77, 77, .4); }
.cal .d.today { outline: 1px solid var(--gold); }
.cal .w { background: #000; border: 1px solid var(--line-2); border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--gold); }
.cal .w b { font-size: 15px; color: #fff; }
@media (max-width: 700px) {
  .cal { gap: 3px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal .w, .cal .h.wk { display: none; }
  .cal .d { min-height: 58px; padding: 4px; }
  .cal .d .p { font-size: 11px; }
  .cal .d .c { display: none; }
}

/* ---------- graphiques ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: #9a9a9a; font-size: 10px; font-family: var(--body); }
.chart .grid { stroke: #1f1f1f; }
.chart .zero { stroke: #444; }

/* ---------- calculateur ---------- */
.lots-big { font-family: var(--head); font-size: 44px; color: var(--neon); text-shadow: 0 0 22px rgba(57, 255, 20, .5); text-align: center; margin: 6px 0; }
.check { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #1b1b1b; gap: 10px; }

/* ---------- fenêtres ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .75); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; overflow-y: auto; }
.modal { width: min(760px, 100%); background: #0c0c0c; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 0 0 1px rgba(212, 175, 55, .15), 0 30px 80px rgba(0, 0, 0, .8); }
.modal.wide { width: min(1100px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 18px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.modal-foot .left { margin-right: auto; }
.form-section { font-family: var(--head); font-size: 10.5px; letter-spacing: .1em; color: var(--neon); margin: 18px 0 10px; border-bottom: 1px solid #1f2f1a; padding-bottom: 6px; text-transform: uppercase; }
.help { font-size: 12px; color: var(--muted); line-height: 1.5; }

#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #111; border: 1px solid var(--neon); color: var(--text); padding: 10px 14px; border-radius: 8px; box-shadow: 0 0 20px rgba(57, 255, 20, .2); transition: .4s; max-width: 340px; }
.toast.err { border-color: var(--red); box-shadow: 0 0 20px rgba(255, 77, 77, .25); }
.toast.out { opacity: 0; transform: translateY(8px); }

.loader { display: flex; align-items: center; justify-content: center; min-height: 50vh; font-family: var(--head); color: var(--gold); letter-spacing: .2em; font-size: 12px; }
.loader::before { content: ''; width: 16px; height: 16px; margin-right: 12px; border: 2px solid var(--gold); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- page de connexion ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px 14px; }
.auth-card { width: min(420px, 100%); background: rgba(10, 10, 10, .92); border: 1px solid var(--line-2); border-radius: 16px; padding: 30px 26px;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, .12), 0 0 60px rgba(57, 255, 20, .06); }
.auth-card .brand { display: block; text-align: center; font-size: 20px; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 22px; letter-spacing: .08em; text-transform: uppercase; }
.auth-tabs { display: flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; margin-bottom: 18px; }
.auth-tabs button { flex: 1; background: none; border: 0; padding: 9px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.auth-tabs button.active { background: rgba(212, 175, 55, .14); color: var(--gold-2); }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-card .btn { justify-content: center; padding: 11px; }
.msg { font-size: 13px; padding: 10px 12px; border-radius: 8px; line-height: 1.45; }
.msg.err { background: var(--red-dim); color: #ff9c9c; border: 1px solid rgba(255, 77, 77, .4); }
.msg.ok { background: var(--neon-dim); color: #b8ffa6; border: 1px solid rgba(57, 255, 20, .35); }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.4; }
.link-btn { background: none; border: 0; color: var(--gold-2); cursor: pointer; font-size: 12.5px; text-decoration: underline; padding: 0; }

@media (max-width: 640px) {
  main { padding: 14px 10px; }
  .topbar { padding: 10px 12px; gap: 10px; }
  .user { display: none; }
  .kpi .v { font-size: 17px; }
  .tabs { padding: 6px 8px 0; }
}

/* Langue : page cachée le temps de la traduction anglaise */
.i18n-wait body { visibility: hidden; }
