/* ═══════════════════════════════════════════════════════════════════════════
   VYBZ — Panel de gestion · nightlife néon (charbon & or)
   Réécriture stylistique — mêmes sélecteurs que le HTML/app.js d'origine.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-0: #080705;
  --bg-1: #0c0a08;
  --bg-2: #161210;
  --bg-3: #1b1712;
  --bg-4: #241f18;
  --border: rgba(224, 165, 63, 0.14);
  --border-strong: rgba(224, 165, 63, 0.30);

  --gold: #e0a53f;
  --gold-bright: #f6d488;
  --gold-deep: #a06a1c;
  --gold-glow: rgba(224, 165, 63, 0.28);
  --glow: rgba(224, 165, 63, 0.55);

  --text: #f1e9da;
  --text-dim: #b0a48f;
  --text-muted: #766c5c;

  --red: #e5484d;
  --green: #46c98a;
  --blurple: #5865f2;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.85);
  --sidebar-w: 264px;
  --font: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Anton", "Bahnschrift", "Segoe UI Semibold", sans-serif;
  --font-mono: "Space Mono", "SFMono-Regular", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: #ffe9b8; }
::selection { background: var(--gold-glow); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: var(--bg-4) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #2a231b; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; }

.wordmark {
  font-family: var(--font-display);
  letter-spacing: 4px;
  color: var(--gold-bright);
  text-shadow: 0 0 12px rgba(246, 212, 136, 0.5), 0 0 34px rgba(224, 165, 63, 0.28);
}
.gold-text { color: var(--gold); }

/* ─── TEXTURE GLOBALE : grain + halos + scanlines ───────────────────────── */

body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(560px 400px at 14% -6%, rgba(224,165,63,0.12), transparent 60%),
    radial-gradient(520px 380px at 90% 4%, rgba(224,165,63,0.06), transparent 62%);
  animation: drift 22s ease-in-out infinite alternate;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(480px 360px at 80% 104%, rgba(224,165,63,0.07), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-blend-mode: overlay;
  opacity: .12;
  animation: drift2 26s ease-in-out infinite alternate;
}
/* Scanlines (élément .fx-scan ajouté dans le HTML) */
.fx-scan {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .1;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 2px, rgba(0,0,0,.35) 3px, rgba(0,0,0,0) 4px);
  animation: scan 8s linear infinite;
}
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(40px,30px); } }
@keyframes drift2 { from { transform: translate(0,0); } to { transform: translate(-36px,-26px); } }
@keyframes scan { from { background-position: 0 0; } to { background-position: 0 -420px; } }

.app, .login-wrap { position: relative; z-index: 2; }

/* ─── LOGIN ─────────────────────────────────────────────────────────────── */

.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(700px 380px at 50% -5%, rgba(224,165,63,0.20), transparent 62%), var(--bg-0);
}
.login-card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 48px 40px 40px;
  max-width: 440px; width: 100%; text-align: center;
  box-shadow: var(--shadow);
}
.login-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 20px 20px 0 0;
}
.emblem { display: inline-flex; filter: drop-shadow(0 0 14px var(--gold-glow)); }
.emblem-lg { margin-bottom: 10px; }
.login-card h1 { margin: 4px 0 0; font-size: 48px; letter-spacing: 7px; }
.tagline { margin: 6px 0 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 5px; color: var(--gold); font-weight: 700; }
.login-sub { color: var(--text-dim); margin: 20px 0 30px; font-size: 14px; }

.btn-discord {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; background: var(--blurple); color: #fff;
  padding: 12px 22px; border-radius: 10px; font-weight: 600;
  box-shadow: 0 6px 18px rgba(88, 101, 242, 0.35);
  transition: filter .15s, transform .1s;
}
.btn-discord:hover { filter: brightness(1.08); color: #fff; }
.btn-discord:active { transform: translateY(1px); }

/* ─── APP LAYOUT ────────────────────────────────────────────────────────── */

.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column; padding: 24px 16px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border-right: 1px solid var(--border);
  box-shadow: inset -24px 0 40px -30px rgba(224,165,63,.25);
  z-index: 30;
}

.side-brand { display: flex; align-items: center; gap: 13px; padding: 0 8px 22px; }
.side-brand .wordmark { font-size: 32px; text-shadow: 0 0 8px #f6d488, 0 0 20px rgba(246,212,136,.7), 0 0 44px rgba(224,165,63,.4); }
.side-brand .emblem { animation: breathe 4.5s ease-in-out infinite, beat 2s ease-in-out infinite; }

.side-server { padding: 0 8px 18px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.side-label { display: block; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); margin-bottom: 7px; }
#guildSelect {
  width: 100%; background: var(--bg-0); border: 1px solid var(--border-strong);
  border-radius: 9px; padding: 10px 12px; outline: none; cursor: pointer; font-weight: 500;
}
#guildSelect:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-glow); }

.side-nav { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  background: none; border: none; text-align: left; cursor: pointer;
  padding: 11px 14px; border-radius: 11px;
  color: var(--text-dim); font-weight: 600; font-size: 14.5px;
  transition: background .12s, color .12s;
}
.nav-item .ni-ico { width: 19px; height: 19px; transition: transform .18s ease; }
.nav-item:hover { background: var(--bg-3); color: var(--text); }
.nav-item:hover .ni-ico { transform: translateX(2px) scale(1.06); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(224,165,63,.22), transparent);
  color: var(--gold-bright);
  box-shadow: inset 3px 0 0 var(--gold), 0 0 22px -8px var(--glow);
  text-shadow: 0 0 12px rgba(224,165,63,.4);
}
.nav-item.active .ni-ico { transform: scale(1.05); }

svg.ic, svg.ni-ico {
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex: 0 0 auto; width: 18px; height: 18px;
}
.btn svg.ic { width: 16px; height: 16px; vertical-align: -3px; }
.btn { display: inline-flex; align-items: center; gap: 7px; justify-content: center; }
.icon-btn svg.ic { width: 16px; height: 16px; display: block; }

.tx-sign {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; font-weight: 800; font-size: 12px;
}
.tx-sign.pos { background: rgba(70,201,138,.2); color: #6fe0aa; }
.tx-sign.neg { background: rgba(229,72,77,.2); color: #f0898c; }

.side-foot { padding-top: 14px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 11px; padding: 4px; font-size: 14px; }
.user-chip img { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-strong); }
.btn.ghost { background: none; border: 1px solid var(--border); color: var(--text-dim); box-shadow: none; font-weight: 600; }
.btn.ghost:hover { background: var(--bg-3); color: var(--text); border-color: var(--border-strong); filter: none; }

/* ─── CONTENU ───────────────────────────────────────────────────────────── */

.content { min-width: 0; display: flex; flex-direction: column; }
.page-head {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 32px 18px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 9, 7, 0.82); backdrop-filter: blur(12px);
}
.page-head h1 { position: relative; margin: 0; font-size: 38px; letter-spacing: 2px; text-transform: uppercase; text-shadow: 0 0 22px rgba(224,165,63,.22); padding-bottom: 8px; }
.page-head h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--gold-bright), var(--gold-deep)); box-shadow: 0 0 14px -1px var(--glow); }
.page-guild { margin-left: auto; font-family: var(--font-mono); color: var(--text-muted); font-size: 12px; font-weight: 400; letter-spacing: .5px; }
.burger { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }

.panels { padding: 28px 32px; max-width: 1440px; width: 100%; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.scrim { display: none; }

.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card { border-radius: 13px; }
.card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(224,165,63,0.40), transparent);
  border-radius: 13px 13px 0 0;
}
/* Coins crochetés « bruts » (haut-gauche + bas-droite) */
.card::before {
  content: ""; position: absolute; top: 10px; left: 10px; width: 16px; height: 16px;
  border-top: 2px solid var(--border-strong); border-left: 2px solid var(--border-strong);
  border-radius: 4px 0 0 0; pointer-events: none;
}
/* Titre de section = étiquette oblique dorée */
.card h2 {
  display: inline-block; margin: 0 0 16px; padding: 5px 12px;
  font-family: var(--font); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px;
  color: #2a1c05; background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  border-radius: 6px; transform: rotate(-1.2deg); box-shadow: 0 6px 16px -6px var(--glow);
}
.card h2 + .hint { margin-top: -8px; }
.card .hint { color: var(--text-muted); font-size: 13px; margin: 0 0 20px; }
code { background: var(--bg-0); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-family: var(--font-mono); font-size: 13px; color: var(--gold-bright); }

/* ─── FORMULAIRES ───────────────────────────────────────────────────────── */

label { display: block; margin-bottom: 16px; }
label > span { display: block; font-family: var(--font-mono); font-size: 10px; font-weight: 400; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 6px; }

input[type=text], input[type=url], select, textarea {
  width: 100%; background: var(--bg-0); border: 1px solid var(--border);
  border-radius: 9px; padding: 11px 13px; 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 var(--gold-glow); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; min-height: 96px; }
input[type=color] { width: 54px; height: 42px; padding: 3px; background: var(--bg-0); border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }

.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row > label { flex: 1; min-width: 150px; }

.btn {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  border: none; border-radius: 9px; padding: 11px 20px; cursor: pointer;
  font-weight: 700; letter-spacing: .3px; color: #2a1c05;
  box-shadow: 0 6px 20px -6px var(--glow);
  transition: transform .12s, box-shadow .15s, filter .15s;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 6px 22px -4px var(--glow); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; filter: none; }
.btn.secondary { background: var(--bg-4); color: var(--text); box-shadow: none; border: 1px solid var(--border-strong); }
.btn.secondary:hover { border-color: var(--border-strong); filter: none; background: #302921; }
.btn.danger { background: linear-gradient(135deg, #f0686c, var(--red)); color: #fff; box-shadow: 0 6px 18px -6px rgba(229, 72, 77, 0.5); }
.btn.success { background: linear-gradient(135deg, #61d6a0, var(--green)); color: #05231a; box-shadow: 0 6px 18px -6px rgba(70, 201, 138, 0.5); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ─── APERÇU EMBED ──────────────────────────────────────────────────────── */

.discord-preview { background: #2b2d31; border-radius: var(--radius); padding: 16px; border: 1px solid rgba(0,0,0,0.3); }
.msg { display: flex; gap: 12px; }
.msg-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep)); flex-shrink: 0; }
.msg-body { min-width: 0; flex: 1; }
.msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.msg-name { font-weight: 600; color: #fff; }
.tag-bot { background: var(--blurple); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px; font-weight: 700; text-transform: uppercase; }
.msg-time { font-family: var(--font-mono); font-size: 11px; color: #a8a29a; }
.embed { border-left: 4px solid var(--gold); background: #232428; border-radius: 4px; padding: 12px 16px; max-width: 520px; }
.embed-title { font-weight: 700; margin-bottom: 6px; color: #fff; }
.embed-desc { color: #d6d3cc; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.embed-img { max-width: 100%; border-radius: 4px; margin-top: 12px; display: block; }
.embed-footer { color: #a8a29a; font-size: 12px; margin-top: 10px; }
.fake-btn { display: inline-block; margin-top: 10px; background: var(--blurple); color: #fff; padding: 8px 16px; border-radius: 4px; font-size: 14px; font-weight: 600; }

/* ─── CAISSE ────────────────────────────────────────────────────────────── */

#soldeBox {
  font-family: var(--font-mono); font-weight: 700; font-size: 48px; letter-spacing: -1px;
  color: var(--gold-bright); text-shadow: 0 0 26px var(--glow), 0 0 60px rgba(224,165,63,.2);
}

/* ─── TICKETS ───────────────────────────────────────────────────────────── */

.tickets-layout { display: grid; grid-template-columns: 340px minmax(0,1fr); gap: 24px; }
@media (max-width: 980px) { .tickets-layout { grid-template-columns: 1fr; } }

.filters { display: flex; gap: 6px; margin-bottom: 16px; }
.filters button { flex: 1; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px; cursor: pointer; font-size: 13px; color: var(--text-dim); font-weight: 600; transition: all .15s; }
.filters button:hover { color: var(--text); }
.filters button.active { background: linear-gradient(135deg, var(--gold-bright), var(--gold-deep)); border-color: transparent; color: #2a1c05; }

.ticket-list { display: flex; flex-direction: column; gap: 7px; max-height: 62vh; overflow-y: auto; }
.ticket-item { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid transparent; border-radius: 11px; padding: 10px 12px; cursor: pointer; transition: background .12s, border-color .12s; }
.ticket-item:hover { background: var(--bg-3); }
.ticket-item.active { border-color: var(--gold); background: var(--bg-4); box-shadow: inset 3px 0 0 var(--gold); }
.ticket-item img { width: 34px; height: 34px; border-radius: 50%; }
.ticket-item .meta { min-width: 0; }
.ticket-item .name { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ticket-item .sub { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

.badge { font-family: var(--font-mono); font-size: 9px; padding: 3px 8px; border-radius: 999px; margin-left: auto; text-transform: uppercase; font-weight: 700; letter-spacing: .5px; }
.badge.open { background: rgba(70, 201, 138, .16); color: #6fe0aa; border: 1px solid rgba(70,201,138,.3); }
.badge.closed { background: rgba(229, 72, 77, .14); color: #f0898c; border: 1px solid rgba(229,72,77,.3); }

.convo { display: flex; flex-direction: column; height: 62vh; }
.convo-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.convo-head h3 { margin: 0; font-family: var(--font); font-size: 16px; font-weight: 700; margin-right: auto; color: var(--gold-bright); }
.convo-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding-right: 8px; }
.convo-foot { display: flex; gap: 10px; margin-top: 14px; }
.convo-foot textarea { min-height: 46px; max-height: 140px; }

.empty { color: var(--text-muted); text-align: center; padding: 52px 16px; }

/* ─── CATALOGUE / STOCK ─────────────────────────────────────────────────── */

.add-cat { display: flex; gap: 8px; margin-bottom: 20px; }
.add-cat input { flex: 1; }
.cat-block { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; background: var(--bg-2); }
.cat-head { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.cat-name { font-weight: 700; flex: 1; letter-spacing: .3px; }
.stock-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.stock-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-row input { flex: 0 0 80px; text-align: right; font-family: var(--font-mono); font-weight: 700; }
.add-item { display: flex; gap: 8px; margin-top: 12px; }
.add-item input { flex: 1; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 15px; padding: 4px 8px; border-radius: 6px; transition: background .12s, color .12s; }
.icon-btn:hover { background: var(--bg-0); color: var(--text); }
.cat-del:hover { color: var(--red); }

/* ─── STATS ─────────────────────────────────────────────────────────────── */

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 760px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-tile { position: relative; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow); overflow: hidden; }
.stat-label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; }
.stat-value { font-family: var(--font-mono); font-weight: 700; font-size: 28px; letter-spacing: -.5px; color: var(--gold-bright); text-shadow: 0 0 18px var(--gold-glow); }
.stat-value.pos { color: #6fe0aa; text-shadow: 0 0 18px rgba(70,201,138,.3); }
.stat-value.neg { color: #f0898c; text-shadow: 0 0 18px rgba(229,72,77,.3); }
.spark { width: 100%; height: 170px; display: block; filter: drop-shadow(0 0 6px rgba(224,165,63,.4)); }
.spark-line { stroke: var(--gold-bright); }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar-name { flex: 0 0 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; }
.bar-track { flex: 1; height: 12px; background: var(--bg-0); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright)); box-shadow: 0 0 12px -2px var(--glow); }
.bar-val { flex: 0 0 auto; font-family: var(--font-mono); font-size: 13px; color: var(--gold-bright); font-weight: 700; }

/* ─── TOAST ─────────────────────────────────────────────────────────────── */

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: var(--bg-4); border: 1px solid var(--border-strong);
  padding: 12px 22px; border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; font-weight: 600;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: linear-gradient(135deg, #f0686c, var(--red)); border-color: transparent; color: #fff; }

/* ═══════════════════════════════════════════════════════════════════════════
   MOTION DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

.wordmark { animation: flicker 9s steps(1,end) infinite; }
@keyframes flicker {
  0%,19%,21%,23%,80%,100% { opacity: 1; }
  20%,22% { opacity: .5; }
  55% { opacity: .85; }
}
.emblem { animation: breathe 4.5s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { filter: drop-shadow(0 0 8px var(--gold-glow)); }
  50% { filter: drop-shadow(0 0 18px var(--gold-glow)); }
}
@keyframes beat { 0%,100% { transform: scale(1); } 8% { transform: scale(1.09); } 16% { transform: scale(1); } 26% { transform: scale(1.05); } 34% { transform: scale(1); } }

.page-head h1 { text-shadow: 0 0 18px rgba(224,165,63,0.25); }

.stat-grid .stat-tile { animation: rise .5s both cubic-bezier(.2,.7,.2,1); }
.stat-grid .stat-tile:nth-child(2) { animation-delay: .07s; }
.stat-grid .stat-tile:nth-child(3) { animation-delay: .14s; }
.stat-grid .stat-tile:nth-child(4) { animation-delay: .21s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.spark-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s .15s cubic-bezier(.3,.6,.3,1) forwards; }
.spark-area { opacity: 0; animation: fadein .7s .55s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }

.bar-fill { width: 0; transition: width .9s cubic-bezier(.2,.7,.2,1); }
.ticket-item { animation: rise .3s both; }
.btn:active, .icon-btn:active { transform: translateY(1px) scale(.98); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bar-fill { transition: none; }
}

/* ─── ÉGALISEUR AUDIO (signature) ───────────────────────────────────────── */

.equalizer {
  display: flex; align-items: flex-end; gap: 3px;
  height: 34px; padding: 12px 10px; margin-top: 6px;
  border-top: 1px solid var(--border);
}
.equalizer i {
  flex: 1; height: 30%; border-radius: 2px; transform-origin: bottom;
  background: linear-gradient(to top, var(--gold-deep), var(--gold) 55%, var(--gold-bright));
  box-shadow: 0 0 8px -2px var(--glow);
  animation: eq 1s ease-in-out infinite;
}
@keyframes eq { 0%, 100% { transform: scaleY(.22); } 50% { transform: scaleY(1); } }

.login-eq { justify-content: center; border: none; margin-top: 26px; height: 34px; gap: 4px; }
.login-eq i { flex: 0 0 4px; }

/* ─── ÉCRAN DE CHARGEMENT ────────────────────────────────────────────────── */

.loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: radial-gradient(600px 400px at 50% 42%, rgba(224,165,63,0.10), transparent 60%), var(--bg-0);
  transition: opacity .5s ease;
}
.loader.hidden { opacity: 0; pointer-events: none; }
.loader-mark { filter: drop-shadow(0 0 18px var(--gold-glow)); }
.loader-word { font-size: 32px; letter-spacing: 9px; opacity: 0; animation: loadword .5s .55s forwards; }
@keyframes loadword { to { opacity: 1; } }

.draw-circle { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1s .15s ease forwards; }
.draw-v { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s .5s cubic-bezier(.4,.6,.3,1) forwards; }
.draw-dot { opacity: 0; animation: loadword .3s 1s forwards; }

/* ─── RESPONSIVE : sidebar en tiroir ────────────────────────────────────── */

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; width: 264px;
    transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .sidebar.open { transform: translateX(0); }
  .burger { display: block; }
  .scrim.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 25; }
  .panels { padding: 20px 16px; }
  .page-head { padding: 16px 18px; }
}
