/* ============================================================
   Ma réserve — design inspiré des sites de live cam
   Anthracite (pas noir), rouge vif, barre de navigation en haut,
   actions présentées comme un menu de tips.
   ============================================================ */

@font-face { font-family: "Inter"; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Mono"; src: url(fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #2a2b30;          /* fond de page */
  --bar: #1e1f23;         /* barre du haut */
  --card: #34353b;        /* cartes */
  --card-2: #3d3e45;      /* survol, champs */
  --card-3: #47484f;
  --line: #45464d;
  --line-2: #55565e;
  --text: #ffffff;
  --text-2: #d5d6da;
  --muted: #a3a5ab;
  --dim: #7d7f86;
  --red: #e8303a;
  --red-2: #ff4a53;
  --red-dark: #b81f28;
  --red-soft: rgba(232, 48, 58, .14);
  --gold: #ffb400;
  --gold-soft: rgba(255, 180, 0, .14);
  --green: #22b573;
  --green-soft: rgba(34, 181, 115, .15);
  --blue: #3d8bfd;
  --r: 8px;
  --r-sm: 6px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --ui: "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: "Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
::selection { background: var(--red); color: #fff; }

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: 56px;
  display: flex; align-items: center; gap: 18px; padding: 0 20px;
  background: var(--bar); border-bottom: 1px solid #111214;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; color: #fff; background: var(--red); }
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { font: 700 18px/1 var(--ui); letter-spacing: -.02em; }
.brand-name b { color: var(--red-2); font-weight: 700; }
.brand--big .brand-mark { width: 44px; height: 44px; border-radius: 10px; }
.brand--big .brand-mark svg { width: 26px; height: 26px; }
.brand--big .brand-name { font-size: 24px; }

.room-switch:empty { display: none; }
.room-switch select {
  appearance: none; cursor: pointer; max-width: 240px; height: 34px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23a3a5ab' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center / 16px;
  border: 1px solid var(--line); border-radius: 17px; padding: 0 30px 0 14px; color: var(--text); font: 600 13px var(--ui);
}
.room-label { display: none; }

.nav { display: flex; align-items: stretch; height: 56px; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 7px; padding: 0 12px; white-space: nowrap;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.5px; transition: color .15s;
}
.nav a svg { width: 17px; height: 17px; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); }
.nav a.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--red); }
.nav .sep { width: 1px; background: var(--line); margin: 16px 6px; }
.nav-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; font: 700 11px var(--ui); background: var(--red); color: #fff; }

.me { display: flex; align-items: center; gap: 10px; flex: none; }
.me-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--ui); background: var(--card-3); }
.me-info { display: flex; flex-direction: column; line-height: 1.2; }
.me-info strong { font-size: 13px; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 32px; height: 32px; border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); border: 0; background: transparent; cursor: pointer; transition: .15s; flex: none; }
.icon-btn:hover { background: var(--card-2); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }

.role-tag { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.role-tag[data-r="modele"] { color: var(--red-2); }
.role-tag[data-r="chevalier"] { color: var(--gold); }
.role-tag[data-r="admin"] { color: #9d8cff; }
.role-tag[data-r="joueur"] { color: var(--green); }

.view { max-width: 1320px; margin: 0 auto; padding: 22px 20px 60px; outline: none; }

/* ---------- Bandeau de room (façon page de modèle) ---------- */
.roombar {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 18px;
  background: var(--card); border-radius: var(--r); flex-wrap: wrap;
}
.roombar .rav { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 18px var(--ui); color: #fff; flex: none; box-shadow: 0 0 0 2px var(--red); }
.roombar h1 { font-size: 19px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.roombar .sub { color: var(--muted); font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.roombar .sub a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.roombar .sub a:hover { color: var(--text); }
.roombar .sub svg { width: 12px; height: 12px; }
.roombar .grow { flex: 1; min-width: 200px; }
.live-tag { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 4px; background: var(--red); color: #fff; font: 700 11px var(--ui); letter-spacing: .04em; text-transform: uppercase; }
.live-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }

/* ---------- En-têtes de page ---------- */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.head h1 { font-size: 24px; }
.head p { color: var(--muted); margin: 6px 0 0; max-width: 640px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 0;
  background: var(--card-2); color: var(--text); font-weight: 600; font-size: 13.5px;
  cursor: pointer; text-decoration: none; transition: background .15s, transform .08s; white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { background: var(--card-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-2); }
.btn--gold { background: var(--gold); color: #1d1500; }
.btn--gold:hover { background: #ffc633; }
.btn--green, .btn--take { background: var(--green); color: #fff; }
.btn--green:hover, .btn--take:hover { background: #2bc982; }
.btn--ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { background: var(--card-2); }
.btn--danger { color: #ff7a81; }
.btn--danger:hover { background: var(--red-soft); }
.btn--sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn--block { width: 100%; height: 44px; font-size: 15px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { padding: 14px 16px; border-radius: var(--r); background: var(--card); }
.stat span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat strong { display: block; font: 700 24px/1.2 var(--ui); margin-top: 3px; }
.stat small { color: var(--dim); font-size: 12px; }
.stat--gold strong { color: var(--gold); }
.stat--mint strong { color: var(--green); }
.stat--red strong { color: var(--red-2); }

/* ---------- Jetons ---------- */
.tk { display: inline-flex; align-items: center; gap: 4px; font: 700 13px var(--ui); color: var(--gold); white-space: nowrap; }
.tk::after { content: "tk"; font-weight: 600; font-size: 11px; opacity: .85; }
.tk::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe08a, var(--gold) 60%, #c98700); }

/* ---------- Mise en page « live » ---------- */
.live { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.panel { background: var(--card); border-radius: var(--r); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { font-size: 14.5px; }
.panel-head em { font-style: normal; color: var(--dim); font-size: 12px; font-weight: 500; }

.players { position: sticky; top: 72px; display: flex; flex-direction: column; max-height: calc(100vh - 90px); }
.players-head { padding: 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.players-head h2 { font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; }
.players-head h2 em { font-style: normal; font: 500 12px var(--ui); color: var(--dim); }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--dim); }
.search input { padding-left: 32px !important; }
.players-list { overflow: auto; padding: 6px; flex: 1; }
.player-row {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm);
  border: 0; background: transparent; text-align: left; cursor: pointer;
}
.player-row:hover { background: var(--card-2); }
.player-row.active { background: var(--card-3); box-shadow: inset 3px 0 0 var(--red); }
.player-row .av { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--ui); color: #fff; }
.player-row .pinfo { flex: 1; min-width: 0; }
.player-row .pinfo strong { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-row .pinfo small { color: var(--dim); font-size: 11.5px; }
.count { min-width: 26px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; font: 700 12px var(--ui); background: var(--red); color: #fff; }
.count.zero { background: var(--card-3); color: var(--dim); }
.add-player { padding: 10px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.add-player input { flex: 1; }
.add-player .btn { width: 38px; padding: 0; }

/* ---------- Fiche joueur ---------- */
.pcard { padding: 18px; }
.pcard-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pcard-top .av { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font: 700 20px var(--ui); color: #fff; }
.pcard-top h2 { font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard-top .meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 12px; margin-top: 3px; flex-wrap: wrap; }
.pcard-top .meta a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.pcard-top .meta a:hover { color: var(--text); }
.pcard-top .meta svg { width: 12px; height: 12px; }
.pcard-top .grow { flex: 1; min-width: 200px; }
.pstats { display: flex; gap: 8px; margin: 16px 0 0; flex-wrap: wrap; }
.pstat { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: var(--r-sm); background: var(--card-2); color: var(--muted); font-size: 12.5px; }
.pstat b { color: var(--text); font-size: 16px; }
.pstat.g b { color: var(--gold); }
.pstat.v b { color: var(--green); }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 4px; font: 600 11px var(--ui); white-space: nowrap; }
.badge--mint { background: var(--green-soft); color: #4fd99a; }
.badge--dim { background: var(--card-3); color: var(--text-2); }
.badge--gold { background: var(--gold-soft); color: var(--gold); }
.badge--ruby { background: var(--red-soft); color: #ff7a81; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.section-title h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.section-title h3 .n { font: 500 12px var(--ui); color: var(--dim); }

/* ---------- Cartes d'actions (menu de tips) ---------- */
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ticket {
  --c: var(--red);
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px;
  border-radius: var(--r); background: var(--card-2); border-top: 3px solid var(--c);
  transition: background .15s, transform .15s; animation: rise .25s ease both;
}
.ticket:hover { background: var(--card-3); }
.ticket-stub { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--c) 22%, var(--card)); }
.ticket .qty-badge { position: absolute; top: 12px; right: 12px; min-width: 30px; height: 24px; padding: 0 8px; border-radius: 12px; display: grid; place-items: center; background: var(--red); color: #fff; font: 700 13px var(--ui); }
.ticket-title { font-weight: 700; font-size: 14.5px; line-height: 1.3; }
.ticket-meta { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12px; flex-wrap: wrap; }
.ticket-btns { display: flex; gap: 6px; margin-top: auto; }
.ticket-btns .btn--take { flex: 1; }
.ticket.archived .ticket-stub { filter: grayscale(.8); }
.ticket.stamp { animation: stamp .45s ease; }
@keyframes stamp { 30% { transform: scale(.96); } }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }

/* Menu de tips (ajout rapide) */
.tipmenu { border-radius: var(--r); overflow: hidden; background: var(--card-2); }
.tipmenu-row { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tipmenu-row:last-child { border-bottom: 0; }
.tipmenu-row:hover { background: var(--card-3); }
.tipmenu-row .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; background: color-mix(in srgb, var(--c, var(--red)) 22%, var(--card)); }
.tipmenu-row .nm { font-weight: 600; min-width: 0; }
.tipmenu-row .nm small { display: block; color: var(--dim); font-weight: 400; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tipmenu-row.off { opacity: .45; }
.quick { display: none; }

/* ---------- Historique ---------- */
.timeline { display: flex; flex-direction: column; background: var(--card-2); border-radius: var(--r); overflow: hidden; }
.tl-item { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tl-item:last-child { border-bottom: 0; }
.tl-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; background: var(--card-3); }
.tl-main strong { font-weight: 600; }
.tl-main .x { font-weight: 700; color: var(--muted); }
.tl-main small { display: block; color: var(--dim); font-size: 12px; }
.tl-item.st-prise .tl-ic { background: var(--green-soft) !important; color: var(--green); font-weight: 700; }
.tl-item.st-annulee { opacity: .55; }
.tl-item.st-annulee strong { text-decoration: line-through; }

/* ---------- Catalogue (éditeur de menu) ---------- */
.catalog { display: block; }
.cat-table .ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; background: color-mix(in srgb, var(--c, var(--red)) 22%, var(--card-2)); }
.cat-table tr.off td { opacity: .5; }
.cat-table tr.dragging { opacity: .35; }
.cat-table .handle { cursor: grab; color: var(--dim); width: 28px; }
.cat-table .desc { color: var(--dim); font-size: 12px; }
.cat-table .colorbar { width: 4px; height: 34px; border-radius: 2px; background: var(--c); }

/* ---------- Tableaux ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.08); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255,255,255,.025); }
.table .r { text-align: right; }
.who { display: flex; align-items: center; gap: 10px; }
.who .av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--ui); color: #fff; flex: none; }
.who small { display: block; color: var(--dim); font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12.5px; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field small { color: var(--dim); font-size: 12px; }
input, select, textarea {
  width: 100%; height: 38px; background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 0 11px;
  color: var(--text); font: 500 14px var(--ui); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 9px 11px; resize: vertical; min-height: 70px; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
input[type="color"] { padding: 3px; width: 46px; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form { display: flex; flex-direction: column; gap: 13px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; }
.switch input { display: none; }
.switch i { width: 36px; height: 20px; border-radius: 10px; background: var(--card-3); position: relative; transition: .2s; flex: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { left: 19px; }
.emoji-pick { display: flex; flex-wrap: wrap; gap: 5px; }
.emoji-pick button { width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--card-2); font-size: 17px; cursor: pointer; }
.emoji-pick button.on { border-color: var(--red); background: var(--red-soft); }
.swatches { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.swatches button.on { border-color: #fff; }

/* ---------- Modale ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10,10,12,.7); display: grid; place-items: center; z-index: 50; padding: 20px; animation: fade .15s; }
.modal { width: min(500px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border-radius: 10px; box-shadow: var(--shadow); animation: pop .18s ease; }
.modal-head { padding: 16px 18px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 18px; }
.modal-foot { padding: 0 18px 18px; display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.secret { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--card-2); border: 1px dashed var(--gold); }
.secret code { font: 500 15px var(--mono); flex: 1; color: var(--gold); word-break: break-all; }
.preview-ticket .ticket { max-width: 220px; }

/* ---------- Notifications ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 11px 12px; border-radius: var(--r); background: #3a3b42; box-shadow: var(--shadow); border-left: 4px solid var(--green); animation: toastIn .25s ease; }
.toast .ti { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 800; font-size: 13px; }
.toast.ok .ti { background: var(--green-soft); color: var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.err .ti { background: var(--red-soft); color: var(--red-2); }
.toast.info { border-left-color: var(--gold); }
.toast.info .ti { background: var(--gold-soft); color: var(--gold); }
.toast .tx { flex: 1; font-weight: 500; }
.toast button { background: none; border: 0; color: var(--gold); font-weight: 700; cursor: pointer; padding: 4px 6px; }
.toast.out { animation: toastOut .2s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- États vides ---------- */
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .big { font-size: 34px; margin-bottom: 8px; }
.empty h3 { color: var(--text); font-size: 16px; margin-bottom: 4px; }
.empty p { margin: 0 auto; max-width: 400px; }
.empty-inline { padding: 18px; text-align: center; color: var(--dim); background: var(--card-2); border-radius: var(--r); }
.empty-inline a { color: var(--red-2); }

/* ---------- Vue joueur ---------- */
.hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: var(--r); margin-bottom: 18px;
  background: linear-gradient(100deg, #4a1f25 0%, #3a2a2f 40%, var(--card) 100%);
}
.hero h1 { font-size: 24px; }
.hero .rav { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 700 26px var(--ui); color: #fff; box-shadow: 0 0 0 3px var(--red); flex: none; }
.hero .pseudo { display: inline-flex; align-items: center; gap: 7px; margin-top: 8px; font-weight: 600; color: var(--text-2); }
.hero .pseudo i { width: 20px; height: 20px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font: 700 9px var(--ui); color: #fff; font-style: normal; }
.hero-figs { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.hero-figs div { padding: 10px 16px; border-radius: var(--r); background: rgba(0,0,0,.22); min-width: 120px; }
.hero-figs div span { display: block; font-size: 12px; color: var(--muted); }
.hero-figs div strong { font: 700 24px/1.2 var(--ui); }
.hero-figs .g strong { color: var(--gold); }
.hero-art { display: none; }

.room-block { margin-bottom: 22px; background: var(--card); border-radius: var(--r); padding: 14px; }
.room-block-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.room-block-head .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 700 16px var(--ui); color: #fff; box-shadow: 0 0 0 2px var(--red); }
.room-block-head h2 { font-size: 17px; }
.room-block-head small { color: var(--muted); }
.room-block-head .btn { margin-left: auto; }
.taken-title { font-size: 12px; font-weight: 600; color: var(--muted); margin: 14px 0 0; }
.taken-strip { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.taken-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 12px; background: var(--card-2); color: var(--muted); font-size: 12.5px; }
.taken-pill b { color: var(--text); font-weight: 600; }

/* ---------- Logs ---------- */
.log-ev { font: 600 11.5px var(--ui); padding: 3px 7px; border-radius: 4px; background: var(--card-3); color: var(--text-2); white-space: nowrap; }
.log-ev[data-k="reserve.prise"] { background: var(--green-soft); color: #4fd99a; }
.log-ev[data-k="reserve.ajout"] { background: var(--gold-soft); color: var(--gold); }
.log-ev[data-k^="action"] { background: var(--red-soft); color: #ff7a81; }
.log-ev[data-k^="modele"] { background: rgba(157,140,255,.15); color: #b3a7ff; }

/* ---------- Onglets ---------- */
.tabs { display: inline-flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs button, .tabs a {
  position: relative; height: 38px; padding: 0 14px; border: 0; background: transparent; color: var(--muted);
  font-weight: 600; font-size: 13.5px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
}
.tabs button:hover, .tabs a:hover { color: var(--text); }
.tabs .on { color: var(--text); }
.tabs .on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--red); }
.tabs .n { font-size: 11px; color: var(--dim); }
.admin-tabs { display: flex; margin-bottom: 18px; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.foot-ver { color: var(--dim); font-size: 12px; margin-top: 16px; }
.danger-zone { margin-top: 4px; padding: 12px; border-radius: var(--r-sm); background: var(--red-soft); }
.danger-zone p { margin: 4px 0 10px; color: var(--text-2); font-size: 13px; }

.alert { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px; border-radius: var(--r); text-decoration: none; background: var(--gold-soft); border-left: 4px solid var(--gold); }
.alert:hover { background: rgba(255,180,0,.2); }
.alert-ic { font-size: 18px; }
.alert-go { margin-left: auto; color: var(--gold); font-weight: 700; }

.skeleton { border-radius: var(--r); background: linear-gradient(90deg, var(--card) 0%, var(--card-2) 50%, var(--card) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Validations ---------- */
.claims { display: flex; flex-direction: column; gap: 10px; }
.claim { display: grid; grid-template-columns: minmax(220px, 1.2fr) auto 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: var(--r); background: var(--card); }
.claim-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.claim-who .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--ui); color: #fff; flex: none; }
.claim-who strong { font-size: 15px; }
.claim-who small { display: block; color: var(--dim); font-size: 12px; }
.claim-code span { display: block; font-size: 11.5px; color: var(--dim); font-weight: 600; margin-bottom: 3px; }
.claim-code code { font: 500 19px var(--mono); color: var(--gold); padding: 3px 10px; border-radius: var(--r-sm); background: var(--gold-soft); letter-spacing: .05em; }
.claim-flags { display: flex; gap: 5px; flex-wrap: wrap; }
.claim-btns { display: flex; gap: 6px; align-items: center; }
@media (max-width: 1200px) { .claim { grid-template-columns: 1fr auto; } .claim-flags { grid-column: 1 / -1; order: 3; } .claim-btns { grid-column: 1 / -1; order: 4; justify-content: flex-end; } }

/* ---------- Vérification (joueur / modèle) ---------- */
.verify { display: block; }
.verify-lead { color: var(--text-2); max-width: 660px; margin: 10px 0 0; font-size: 14.5px; }
.verify-lead b { color: #fff; }
.code-big { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.code-big code { font: 500 36px/1 var(--mono); letter-spacing: .06em; color: var(--gold); padding: 14px 22px; border-radius: var(--r); background: rgba(0,0,0,.28); border: 2px dashed rgba(255,180,0,.55); }
.verify-foot { color: var(--muted); font-size: 12.5px; margin: 14px 0 0; }
.steps { list-style: none; counter-reset: st; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.steps li { counter-increment: st; position: relative; padding: 2px 0 0 34px; color: var(--muted); font-size: 13.5px; min-height: 24px; line-height: 1.45; }
.steps li b { color: var(--text); font-weight: 600; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--ui); background: var(--red); color: #fff; }
.steps--row { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 820px; }
.steps--row li b { display: block; }

/* ---------- Connexion / inscription ---------- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; }
.login-page .topbar { position: static; }
.login-wrap { flex: 1; display: grid; place-items: center; padding: 30px 16px; }
.login-glow { display: none; }
.login-card { width: min(420px, 100%); padding: 0; border-radius: 10px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.login-card--wide { width: min(500px, 100%); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.auth-tabs a { height: 48px; display: grid; place-items: center; text-decoration: none; color: var(--muted); font-weight: 600; position: relative; }
.auth-tabs a.on { color: #fff; }
.auth-tabs a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--red); }
.login-body { padding: 22px 24px 24px; }
.login-card form { display: flex; flex-direction: column; gap: 13px; margin-top: 16px; }
.login-sub { color: var(--muted); margin: 0; }
.login-error { margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--red-soft); color: #ff9aa0; font-weight: 500; border-left: 3px solid var(--red); }
.login-ok { margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--green-soft); color: #7ee6b5; font-weight: 500; border-left: 3px solid var(--green); }
.login-alt { text-align: center; color: var(--muted); margin: 16px 0 0; font-size: 13.5px; }
.login-alt a { color: var(--red-2); font-weight: 600; text-decoration: none; }
.login-ver { text-align: center; color: var(--dim); font-size: 11.5px; margin: 14px 0 0; }
.who-am-i { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.who-am-i a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--card-2); text-decoration: none; color: var(--muted); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.who-am-i a span { font-size: 20px; }
.who-am-i a.on { color: #fff; background: var(--red-soft); box-shadow: inset 0 0 0 2px var(--red); }
.room-check { font-size: 12.5px; min-height: 18px; }
.room-check.ok { color: #4fd99a; }
.room-check.ko { color: #ff7a81; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } .me-info { display: none; } }
@media (max-width: 900px) {
  .topbar { height: auto; flex-wrap: wrap; padding: 8px 12px 0; gap: 10px; }
  .nav { order: 3; width: 100%; flex: none; height: 44px; }
  .room-switch { flex: 1; }
  .me { margin-left: auto; }
  .room-switch select { max-width: none; width: 100%; }
  .live { grid-template-columns: 1fr; }
  .players { position: static; max-height: 380px; }
  .hero-figs { margin-left: 0; }
}
@media (max-width: 560px) {
  .view { padding: 14px 12px 50px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .grid2, .who-am-i { grid-template-columns: 1fr; }
  .tickets { grid-template-columns: 1fr 1fr; }
  .steps--row { grid-template-columns: 1fr; }
  .code-big code { font-size: 28px; }
  .brand-name { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
