/* Panel MW Casino : mêmes tokens que epsib1.fr (sombre, accent vert EPSI). Interface dense, sans animation décorative. */
:root {
  color-scheme: dark;
  --bg: #0c0a11; --bg-raise: #110e18; --surface: #16131e; --surface-2: #1d1927; --surface-3: #252031;
  --line: #29233a; --line-2: #3a3250;
  --text: #eeebf3; --text-2: #cdc7d9; --muted: #a49db4; --faint: #857d98;
  --accent: #9bd35f; --accent-2: #b8e48a; --accent-ink: #0b1308; --accent-soft: rgb(155 211 95 / .11);
  --danger: #e36a74; --danger-soft: rgb(227 106 116 / .12); --warn: #e9b74e;
  --r-lg: 18px; --r-md: 12px; --r-sm: 10px; --r-xs: 6px;
  --font: "Geist", ui-sans-serif, system-ui, sans-serif; --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --epsi-strip: linear-gradient(90deg, #8fc056 0 14.3%, #fad154 0 28.6%, #e58240 0 42.9%, #db4759 0 57.1%, #935a9e 0 71.4%, #4b4b99 0 85.7%, #38b8d6 0);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text-2); font: 400 .95rem/1.55 var(--font); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
h1, h2, h3 { color: var(--text); margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.strip { height: 3px; background: var(--epsi-strip); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.pos { color: var(--accent); } .neg { color: var(--danger); }

/* boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; background: var(--accent); color: var(--accent-ink); border: 1px solid transparent; border-radius: var(--r-sm); padding: 10px 16px; font: 600 .92rem var(--font); text-decoration: none; cursor: pointer; transition: background .2s, transform .15s var(--ease); }
.btn:hover { background: var(--accent-2); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-ghost { background: var(--surface-2); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: var(--danger-soft); color: #f3a3aa; border-color: rgb(227 106 116 / .4); }
.btn-danger:hover { background: rgb(227 106 116 / .22); }
.btn-discord { background: #5865f2; color: #fff; width: 100%; padding: 13px 16px; }
.btn-discord:hover { background: #6d78f5; }
.lien { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); text-decoration: none; font-weight: 500; font-size: .9rem; margin-top: 12px; }

/* connexion */
.connexion { min-height: calc(100dvh - 3px); display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(800px 400px at 50% 0%, rgb(155 211 95 / .08), transparent 70%); }
.carte-connexion { width: min(420px, 100%); display: grid; gap: 16px; justify-items: center; text-align: center; padding: 36px 28px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 40px 90px -40px rgb(6 3 14); }
.carte-connexion .logo { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.8rem; }
.carte-connexion h1 { font-size: 1.5rem; }
.carte-connexion p { color: var(--muted); }
.alerte { color: #f3a3aa !important; background: var(--danger-soft); border: 1px solid rgb(227 106 116 / .35); border-radius: var(--r-sm); padding: 10px 12px; font-size: .9rem; width: 100%; }
.retour { color: var(--faint); text-decoration: none; font-size: .88rem; display: inline-flex; gap: 6px; align-items: center; }
.retour:hover { color: var(--text); }

/* structure */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100dvh - 3px); }
.cote { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--bg-raise); }
.marque { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; padding: 4px 10px; font-size: 1.05rem; }
.marque i { color: var(--accent); font-size: 1.4rem; }
.serveur-choix { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); }
.serveur-choix label { flex: 1; min-width: 0; }
.serveur-choix select { width: 100%; background: none; border: 0; color: var(--text); font: 600 .92rem var(--font); cursor: pointer; text-overflow: ellipsis; outline: none; }
.serveur-choix select:disabled { cursor: default; appearance: none; }
.serveur-choix select option { background: var(--surface); }
.serveur-choix:focus-within { border-color: var(--accent); }
.serveur-icone { width: 32px; height: 32px; flex: none; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); font-size: 1.1rem; }
.serveur-icone img { width: 100%; height: 100%; object-fit: cover; }
.inviter { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: .9rem; border: 1px dashed var(--line-2); }
.inviter:hover { color: var(--text); border-color: var(--accent); }
.inviter i { color: var(--accent); font-size: 1.1rem; }
.menu { display: grid; gap: 2px; }
.menu a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-weight: 500; }
.menu a:hover { background: var(--surface); color: var(--text); }
.menu a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.menu a[aria-current="page"] i { color: var(--accent); }
.menu i { font-size: 1.15rem; }
.moi { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.moi b { color: var(--text); font-weight: 600; font-size: .9rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moi small { color: var(--faint); font-size: .78rem; }
.moi > div { min-width: 0; flex: 1; }
.moi button { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 1.2rem; padding: 4px; border-radius: var(--r-xs); }
.moi button:hover { color: var(--danger); }
.contenu { padding: clamp(18px, 3vw, 36px); min-width: 0; display: grid; align-content: start; }
.vue { display: grid; gap: 18px; max-width: 1180px; }
.vue-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.vue-tete h1 { font-size: 1.6rem; }
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .cote { position: sticky; top: 0; z-index: 10; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .menu { order: 3; width: 100%; display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .menu a { flex: none; padding: 8px 12px; }
  .moi { margin: 0 0 0 auto; padding: 4px 6px; border: 0; background: none; }
  .serveur-choix { order: 2; flex: 1 1 100%; }
  .inviter { display: none; }
  .moi > div { display: none; }
}

/* blocs */
.panneau { padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 14px; align-content: start; min-width: 0; }
.panneau h2 { font-size: 1.02rem; display: flex; align-items: center; gap: 9px; }
.panneau h2 i { color: var(--accent); }
.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .grille-2 { grid-template-columns: 1fr; } }
.bot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 16px 20px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg-raise); }
.bot img { width: 40px; height: 40px; border-radius: 50%; }
.bot .nom { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 600; }
.bot .meta { color: var(--muted); font-size: .88rem; display: flex; gap: 6px; align-items: center; }
.bot .meta i { color: var(--faint); }
.en-ligne::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 6px; box-shadow: 0 0 0 3px var(--accent-soft); }
.hors-ligne::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-right: 6px; }
.etat-casino { font-size: .85rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.etat-casino.ferme { background: var(--danger-soft); color: #f3a3aa; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.chiffre { padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 2px; }
.chiffre b { font: 600 1.55rem var(--mono); color: var(--text); letter-spacing: -.02em; }
.chiffre span { color: var(--muted); font-size: .86rem; }

/* listes */
.top { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.top li, .flux li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); }
.top li:hover { background: var(--surface-2); cursor: pointer; }
.top .rang { width: 22px; text-align: center; font: 500 .85rem var(--mono); color: var(--faint); }
.top li:nth-child(1) .rang { color: #f1c40f; } .top li:nth-child(2) .rang { color: #c9ced6; } .top li:nth-child(3) .rang { color: #d4915a; }
.top .solde, .flux .montant { margin-left: auto; font-family: var(--mono); color: var(--text); }
.flux { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.flux .quoi { color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flux li > div { min-width: 0; }
.qui { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qui b { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); flex: none; object-fit: cover; }
.vide { color: var(--faint); padding: 18px 8px; text-align: center; }

/* tables */
.table-defile { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 500; color: var(--faint); font-size: .8rem; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--bg-raise); }
.table td { padding: 9px 14px; border-bottom: 1px solid rgb(41 35 58 / .6); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }
.cliquable tbody tr { cursor: pointer; }
.cliquable tbody tr:hover { background: var(--surface-2); }
.type { font: 500 .78rem var(--mono); padding: 2px 7px; border-radius: var(--r-xs); background: var(--surface-3); color: var(--text-2); }
.type.admin { background: rgb(233 183 78 / .14); color: var(--warn); }
.details { color: var(--muted); max-width: 320px; overflow: hidden; text-overflow: ellipsis; }

/* formulaires */
.recherche, .choix { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--faint); }
.recherche input, .choix select { background: none; border: 0; color: var(--text); font: inherit; padding: 9px 0; outline: none; min-width: 220px; }
.choix select { min-width: 180px; cursor: pointer; }
.choix select option { background: var(--surface); }
.formulaire { gap: 20px; }
.champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.champ { display: grid; gap: 6px; }
.champ > span { color: var(--text); font-weight: 500; font-size: .9rem; }
.champ small { color: var(--faint); font-size: .8rem; }
.champ input, .champ select, .champ textarea { width: 100%; background: var(--bg-raise); border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--text); font: 400 .95rem var(--font); padding: 10px 12px; }
.champ input:focus, .champ select:focus, .champ textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.champ textarea { resize: vertical; min-height: 120px; }
.champ input::placeholder, .champ textarea::placeholder { color: var(--faint); }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.interrupteur-ligne { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.interrupteur-ligne p, .danger p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.interrupteur { position: relative; flex: none; width: 50px; height: 28px; cursor: pointer; }
.interrupteur input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.interrupteur span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .2s; }
.interrupteur span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .25s var(--ease), background .2s; }
.interrupteur input:checked + span { background: var(--accent-soft); border-color: var(--accent); }
.interrupteur input:checked + span::after { transform: translateX(22px); background: var(--accent); }
.interrupteur input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.danger { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; border-color: rgb(227 106 116 / .3); }
.plus { justify-self: center; }

/* fenêtres */
.fenetre { width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 40px); padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); display: none; gap: 16px; }
.fenetre[open] { display: grid; }
.fenetre::backdrop { background: rgb(6 3 14 / .7); backdrop-filter: blur(3px); }
.fenetre.petite { width: min(420px, calc(100% - 24px)); }
.fenetre.petite p { color: var(--muted); }
.fenetre h3 { font-size: .95rem; margin-top: 6px; }
.fenetre-tete { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.ident { display: flex; align-items: center; gap: 14px; }
.ident .av { width: 48px; height: 48px; }
.ident b { color: var(--text); font-size: 1.15rem; display: block; }
.ident small { color: var(--faint); font-family: var(--mono); font-size: .8rem; }
.ident .gros { font: 600 1.5rem var(--mono); color: var(--accent); margin-left: 8px; }
.fermer { background: var(--surface-2); border: 1px solid var(--line); color: var(--text); width: 36px; height: 36px; border-radius: var(--r-sm); cursor: pointer; font-size: 1.1rem; }
.solde-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 16px; border-radius: var(--r-md); background: var(--bg-raise); border: 1px solid var(--line); }
.solde-form .champ { flex: 1; min-width: 160px; }
.segments { display: flex; gap: 8px; flex-wrap: wrap; }
.fiche-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60; display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--r-md); background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text); font-weight: 500; box-shadow: 0 20px 50px -20px rgb(0 0 0 / .8); transition: opacity .2s, transform .3s var(--ease); max-width: calc(100% - 32px); }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast i { color: var(--accent); font-size: 1.2rem; }
.toast.erreur i { color: var(--danger); }
.squelette { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; border-radius: var(--r-sm); min-height: 18px; animation: brille 1.4s linear infinite; }
@keyframes brille { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
