/* Bourse de la bière — terminal de marché */
:root {
  --bg: #070b12; --panel: #0e1622; --panel2: #111c2c; --line: #1e2c42;
  --txt: #e8eef6; --muted: #7d8ea6;
  --up: #00e676; --down: #ff5252; --accent: #ffb300; --amber-dim: #8a6a1f;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--txt);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
header { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 20px; background: #0a101b; border-bottom: 2px solid var(--accent); }
.brand { font-size: 1.25em; font-weight: 800; letter-spacing: 1px; }
.brand-sub { font-weight: 300; color: var(--muted); letter-spacing: 0; }
.badge { font-size: .68em; padding: 3px 10px; border-radius: 12px; margin-left: 8px;
  letter-spacing: 1px; vertical-align: middle; }
.badge.open { background: #0a3d24; color: var(--up); }
.badge.closed { background: #3d0a0a; color: var(--down); }
nav .navbtn { background: none; border: 1px solid var(--line); color: var(--txt);
  padding: 8px 14px; margin-left: 6px; border-radius: 8px; cursor: pointer;
  text-decoration: none; display: inline-block; font-size: .92em; }
nav .navbtn.active { background: var(--accent); color: #111; border-color: var(--accent); font-weight: 700; }
.bar-name { color: var(--muted); font-weight: 400; font-size: .75em; letter-spacing: 0; }
.pin-input { background: var(--bg); color: var(--txt); border: 1px solid var(--accent);
  border-radius: 8px; padding: 10px; font-size: 1.4em; text-align: center; letter-spacing: 4px;
  font-family: var(--mono); width: 180px; }
.qr { width: 180px; height: 180px; background: #fff; border-radius: 8px; margin: 8px auto; display: block; }
.equipe-tools { display: flex; gap: 10px; align-items: center; margin: 10px 0; flex-wrap: wrap; }
#scan-video { max-height: 50vh; }
.place-badge { background: rgba(0,230,118,.12); border: 1px solid #00e676; color: #00e676;
  border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-weight: 700; }
.app-footer { display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 22px 0 30px; color: var(--muted); font-size: .85em; }
.app-footer strong { color: var(--txt); }
.drina-badge { display: inline-flex; background: #f5f1e8; border-radius: 8px; padding: 2px; }
.drina-badge img { width: 22px; height: 22px; display: block; border-radius: 6px; }
.tv-powered { text-align: right; color: var(--muted); font-size: .75em; padding: 6px 4px 0; opacity: .7; }
main { padding: 16px 20px 32px; max-width: 1200px; margin: 0 auto; }
.hidden { display: none !important; }
.hint { color: var(--muted); font-size: .9em; }

/* ---------- bandeau stats marché ---------- */
.market-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 16px; min-width: 130px; }
.stat-label { display: block; font-size: .68em; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1.5px; }
.stat-val { font-family: var(--mono); font-size: 1.35em; font-weight: 700; }

/* ---------- ticker défilant ---------- */
.ticker { overflow: hidden; background: #04070c; border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.ticker.big { margin: 0 -20px 16px; border-top: 2px solid var(--accent); }
.ticker-track { display: inline-flex; white-space: nowrap; padding: 9px 0;
  animation: tick 30s linear infinite; font-family: var(--mono); font-size: .95em; }
.ticker.big .ticker-track { font-size: 1.15em; padding: 12px 0; animation-duration: 38s; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk { padding: 0 .4em; }
.tk b { color: var(--txt); font-weight: 600; }
.tk-sep { color: var(--amber-dim); padding: 0 .4em; }
.tk.dim { color: var(--muted); }
.tk.alert { color: #ffb3b3; font-weight: 700; }

/* ---------- cartes bières ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.beer-card { background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  border-top: 3px solid var(--line); transition: transform .15s; }
.beer-card:hover { transform: translateY(-2px); }
.beer-card.up { border-top-color: var(--up); }
.beer-card.down { border-top-color: var(--down); }
.beer-card.delisted-card { opacity: .55; }
.bc-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.bc-name { font-weight: 700; font-size: 1.05em; }
.bc-trend { font-family: var(--mono); font-weight: 700; }
.bc-price { font-family: var(--mono); font-size: 2.1em; font-weight: 800; margin: 2px 0 6px; }
canvas.spark { width: 100%; height: 52px; display: block; margin: 4px 0 8px; }
.bc-foot { display: flex; align-items: center; gap: 10px; }
.bc-dispo { font-family: var(--mono); font-size: .85em; color: var(--muted); white-space: nowrap; }
.bar { flex: 1; height: 6px; background: var(--line); border-radius: 3px; }
.bar > div { height: 100%; background: var(--accent); border-radius: 3px; }
.delisted { color: var(--muted); font-style: italic; }

/* ---------- tuiles écran TV ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 16px; }
.tile { background: linear-gradient(160deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: 14px; padding: 20px; text-align: center;
  border-top: 4px solid var(--line); }
.tile.up { border-top-color: var(--up); } .tile.down { border-top-color: var(--down); }
.tile .tname { font-size: 1.25em; font-weight: 600; }
.tile .tprice { font-family: var(--mono); font-size: 3.2em; font-weight: 800; margin: 6px 0; }
.tile .ttrend { font-family: var(--mono); font-size: 1.25em; font-weight: 700; }
.tile canvas.spark { height: 60px; }
.ecran-foot { display: flex; gap: 14px; align-items: stretch; flex-wrap: wrap; }
.ecran-foot .market-stats { flex: 1; margin-bottom: 0; }

/* ---------- espace partenaire (pub) ---------- */
.ad-slot { border: 2px dashed var(--amber-dim); border-radius: 12px;
  min-width: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 18px 28px; background: rgba(255,179,0,.04); }
.ad-label { font-size: .68em; letter-spacing: 2px; color: var(--amber-dim); text-transform: uppercase; }
.ad-text { font-size: 1.3em; color: var(--muted); margin-top: 4px; }

/* ---------- tableaux / console ---------- */
table.board { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
table.board th, table.board td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
table.board th { color: var(--muted); font-weight: 600; font-size: .85em; text-transform: uppercase; }
table.board.small td, table.board.small th { padding: 6px 8px; font-size: .92em; }
.up { color: var(--up); } .down { color: var(--down); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.card h3 { margin: 0 0 8px; }
.card.danger { border-color: #7a1a1a; }
h3 { color: var(--txt); }

/* ---------- boutons / inputs ---------- */
.btn { background: var(--panel2); color: var(--txt); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: .95em; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #111; font-weight: 700; border: none; }
.btn.danger { background: #4a0d0d; border-color: #7a1a1a; color: #ffb3b3; font-weight: 700; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- identification équipe : choix du prénom ---------- */
.membres { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.membre-btn { background: var(--panel2); color: var(--txt); border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 1em; }
.membre-btn:hover { border-color: var(--accent); }
.membre-btn.sel { background: var(--accent); color: #111; font-weight: 700; border: none; }
input[type=number] { width: 70px; background: var(--bg); color: var(--txt);
  border: 1px solid var(--line); border-radius: 6px; padding: 6px; margin: 2px 4px;
  font-family: var(--mono); }
label { display: block; margin: 6px 0; color: var(--muted); }

/* ---------- modale ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.75);
  display: flex; align-items: center; justify-content: center; z-index: 10; }
.modal-box { background: var(--panel2); border: 1px solid var(--accent); border-radius: 14px;
  padding: 28px; min-width: 320px; text-align: center; }
.qty { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 14px 0; }
.qty span { font-family: var(--mono); font-size: 1.6em; font-weight: 700; min-width: 40px; }
.ok { color: var(--up); font-weight: 700; font-size: 1.2em; }
.code { font-family: var(--mono); font-size: 1.6em; letter-spacing: 2px; color: var(--accent); }

@media (max-width: 640px) {
  .market-stats { gap: 8px; }
  .stat { min-width: 0; flex: 1; padding: 6px 10px; }
  .stat-val { font-size: 1.1em; }
  main { padding: 12px; }
}
