/* ==========================================================================
   Solcaz — composants
   ========================================================================== */

/* --- boutons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--r-sm);
  font-weight: 650; font-size: 13.5px; white-space: nowrap;
  border: 1px solid transparent; position: relative;
  transition: transform .12s var(--ease), background .16s, box-shadow .16s,
              border-color .16s, opacity .16s;
  user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(.995); }
.btn:disabled { opacity: .42; cursor: not-allowed; }

.btn--primary {
  background: linear-gradient(180deg, #a894ff, var(--violet-2));
  color: #fff; font-weight: 750;
  box-shadow: 0 6px 20px -8px rgba(155,135,245,.9),
              inset 0 1px 0 rgba(255,255,255,.24);
}
.btn--primary:hover:not(:disabled) { filter: brightness(1.08);
  box-shadow: 0 10px 28px -10px rgba(155,135,245,1); }

/* Action forte : connexion, encaissement — le vert de la maison */
.btn--green {
  background: linear-gradient(180deg, #1ae2a0, var(--green-2));
  color: #04231a; font-weight: 800;
  box-shadow: 0 6px 20px -8px rgba(16,212,146,.85),
              inset 0 1px 0 rgba(255,255,255,.3);
}
.btn--green:hover:not(:disabled) { filter: brightness(1.07);
  box-shadow: 0 10px 28px -10px rgba(16,212,146,1); }

.btn--gold {
  background: linear-gradient(180deg, var(--gold), #d9a63a);
  color: #1a1204; font-weight: 750;
  box-shadow: 0 6px 18px -8px rgba(244,198,90,.75), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn--danger { background: linear-gradient(180deg, #ff6480, #e23a58); color: #fff;
  box-shadow: 0 6px 18px -8px rgba(255,79,110,.7); }
.btn--ghost { background: rgba(160,140,240,.07); border-color: var(--line-2);
  color: var(--text-2); }
.btn--ghost:hover:not(:disabled) { background: rgba(160,140,240,.14);
  color: var(--text); }
.btn--outline { border-color: var(--line-2); color: var(--text-2); }
.btn--outline:hover:not(:disabled) { border-color: var(--violet); color: var(--violet); }

.btn--sm { padding: 7px 13px; font-size: 12.5px; border-radius: 7px; }
.btn--lg { padding: 14px 26px; font-size: 15px; border-radius: var(--r); }
.btn--block { width: 100%; }
.btn--pill { border-radius: 99px; }

.btn__sub { font-size: 11px; opacity: .7; font-weight: 600; }

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-sm);
  display: grid; place-items: center; color: var(--text-2);
  transition: background .15s, color .15s;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: rgba(160,140,240,.10); color: var(--text); }
.icon-btn--send { background: var(--violet-dim); color: var(--violet); }
.icon-btn--send svg { fill: currentColor; stroke: none; }

/* --- surfaces --- */
.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-1));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}
.card--pad { padding: 20px; }
.card--glow { border-color: rgba(23,227,156,.22); }

.panel { background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px; }

.section { margin-bottom: 30px; }
.section__head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  flex-wrap: wrap;
}
.section__title { font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.section__sub { color: var(--muted); font-size: 12.5px; }
.section__spacer { flex: 1; }

.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800;
  letter-spacing: -.025em; margin-bottom: 6px; }
.page-head p { color: var(--muted); max-width: 62ch; font-size: 13.5px; }

.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }

/* --- formulaires --- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted); }
.field__hint { font-size: 11.5px; color: var(--muted); }
.field__err { font-size: 12px; color: var(--red); }

.input, .select, .textarea {
  width: 100%; background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: 11px 13px; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: rgba(155,135,245,.6);
  box-shadow: 0 0 0 3px rgba(155,135,245,.13);
}
.input--mono { font-family: var(--mono); font-size: 12.5px; }
.select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f8593' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  background-size: 16px; padding-right: 34px; }

/* Le champ de mise est une rangee, pas un empilement : le montant a gauche,
   l'unite et les boutons a droite, tous dans la meme boite.

   Ils etaient auparavant poses chacun a sa propre distance du bord droit --
   l'unite a 96 px, les boutons a 5 px -- et le montant reservait 118 px.
   Trois nombres ecrits en dur pour une rangee dont la largeur depend de la
   police, du libelle (SOL / JETONS) et de la taille des boutons : le jour
   ou la rangee ½ / 2x / max a grandi, elle est passee sous l'unite. Ici les
   trois se poussent l'un l'autre, et plus rien ne peut se superposer. */
.amount-field {
  position: relative;
  display: flex; align-items: center;
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding-right: 5px;
  transition: border-color .15s, box-shadow .15s;
}
/* L'encadrement appartient desormais a la boite : le champ n'est plus que le
   texte pose dedans, sinon on verrait deux bordures l'une dans l'autre. */
.amount-field:focus-within {
  border-color: rgba(155,135,245,.6);
  box-shadow: 0 0 0 3px rgba(155,135,245,.13);
}
.amount-field .input {
  flex: 1; min-width: 0; background: none; border: none;
  font-family: var(--mono); font-weight: 600;
}
.amount-field .input:focus { box-shadow: none; }
.amount-field__tail {
  display: flex; align-items: center; gap: 9px; flex: none;
  padding-left: 8px;
}
.amount-field__unit {
  font-size: 11px; font-weight: 700; color: var(--muted);
  pointer-events: none; white-space: nowrap;
}
.amount-field__ops { display: flex; gap: 3px; }
.chip-btn {
  /* 27 px de haut au doigt, c'etait trop juste : la rangee ½ / 2× / max et
     les montants rapides sont les boutons les plus utilises du panneau. */
  padding: 6px 10px; min-height: 30px; min-width: 30px; font-size: 11px;
  font-weight: 750; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(160,140,240,.10); color: var(--text-2);
  transition: background .14s, color .14s, transform .1s var(--ease);
}
.chip-btn:hover { background: var(--violet-dim); color: var(--violet); }
/* L'appui s'enfonce : un bouton qui ne bouge pas laisse douter du clic. */
.chip-btn:active { transform: translateY(1px); }

.quick-amounts { display: flex; gap: 6px; flex-wrap: wrap; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: 13px; }
.switch input { display: none; }
.switch__track {
  width: 36px; height: 20px; border-radius: 99px; background: rgba(160,140,240,.20);
  position: relative; transition: background .2s; flex: none;
}
.switch__track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--text-2); transition: .2s var(--ease);
}
.switch input:checked + .switch__track { background: var(--green); }
.switch input:checked + .switch__track::after { left: 18px; background: #04231a; }

/* --- onglets --- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg-1);
  border: 1px solid var(--line); border-radius: var(--r-sm); }
.tabs--block { width: 100%; }
.tab {
  flex: 1; padding: 8px 14px; border-radius: 7px; font-size: 12.5px;
  font-weight: 650; color: var(--muted); transition: .15s; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--panel-3); color: var(--text);
  box-shadow: var(--shadow-1); }

/* --- badges & pastilles --- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700;
  background: rgba(160,140,240,.09); color: var(--text-2);
}
.badge--violet { background: var(--violet-dim); color: #c0b0ff; }
.badge--green { background: var(--green-dim); color: var(--green); }
.badge--gold { background: var(--gold-dim); color: var(--gold); }
.badge--red  { background: var(--red-dim); color: var(--red); }
.badge--lvl  { background: linear-gradient(135deg, rgba(155,135,245,.26),
               rgba(115,88,230,.20)); color: #d7ccff; font-family: var(--mono); }

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* --- tuiles de stats --- */
.stat {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r); padding: 15px 16px;
}
.stat__label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); font-weight: 700; margin-bottom: 7px; }
.stat__value { font-size: 21px; font-weight: 750; font-family: var(--mono);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.stat--violet .stat__value { color: #b7a4ff; }
.stat--green .stat__value { color: var(--green); }
.stat--gold .stat__value { color: var(--gold); }
.stat--red  .stat__value { color: var(--red); }

/* --- tableaux --- */
.table-wrap { overflow-x: auto; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--panel); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px;
  min-width: 480px; }
.tbl th {
  text-align: left; padding: 11px 14px; font-size: 10.5px; font-weight: 750;
  text-transform: uppercase; letter-spacing: .09em; color: var(--muted);
  border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; background: var(--panel); z-index: 1;
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid rgba(160,140,240,.05);
  white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: rgba(160,140,240,.035); }
.tbl .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tbl .win { color: var(--green); }
.tbl .lose { color: var(--muted); }
.tbl__enter { animation: rowIn .35s var(--ease); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-7px); } }

/* --- avatars --- */
.avatar { display: inline-block; border-radius: 50%; flex: none;
  background: var(--panel-3); position: relative; overflow: hidden; }
.avatar::before {
  content: ""; position: absolute; inset: 0;
  background: var(--av-bg, linear-gradient(135deg, #17e39c, #0a8f66));
}
.avatar::after {
  content: var(--av-ch, "?"); position: absolute; inset: 0;
  display: grid; place-items: center; font-size: .52em; font-weight: 800;
  color: rgba(0,0,0,.72); font-family: var(--font);
}
.avatar--sm { width: 22px; height: 22px; font-size: 22px; }
.avatar--md { width: 32px; height: 32px; font-size: 32px; }
.avatar--lg { width: 54px; height: 54px; font-size: 54px; }

.user-cell { display: flex; align-items: center; gap: 8px; }
.user-cell__name { font-weight: 600; }

/* --- chat --- */
.chat-msg { padding: 6px 9px; border-radius: 9px; transition: background .12s; }
.chat-msg:hover { background: rgba(160,140,240,.035); }
.chat-msg__head { display: flex; align-items: center; gap: 6px; margin-bottom: 1px; }
.chat-msg__name { font-size: 12px; font-weight: 700; color: var(--text-2); }
.chat-msg__name--admin { color: var(--gold); }
.chat-msg__lvl { font-size: 9px; font-weight: 800; padding: 1px 5px;
  border-radius: 4px; background: rgba(155,139,255,.16); color: #b9adff; }
.chat-msg__time { font-size: 10px; color: var(--muted); margin-left: auto; }
.chat-msg__body { font-size: 13px; color: var(--text); word-break: break-word;
  line-height: 1.42; }
.chat-msg--system { background: rgba(160,140,240,.04); }
.chat-msg--system .chat-msg__body { color: var(--muted); font-size: 12px;
  font-style: italic; }
.chat-msg--mine { background: rgba(23,227,156,.055); }

/* --- modales --- */
.modal-root { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.modal-back {
  position: absolute; inset: 0; background: rgba(3,6,9,.7);
  backdrop-filter: blur(5px); pointer-events: auto;
  animation: fadeIn .2s var(--ease);
}
.modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(460px, calc(100vw - 28px)); max-height: 88dvh; overflow-y: auto;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.9); pointer-events: auto;
  animation: modalIn .26s var(--ease);
}
.modal--wide { width: min(720px, calc(100vw - 28px)); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translate(-50%,-46%) scale(.97); } }
.modal__head { display: flex; align-items: center; gap: 12px;
  padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.modal__title { font-size: 16px; font-weight: 750; flex: 1; }
.modal__body { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.modal__foot { padding: 0 20px 20px; display: flex; gap: 9px; }

/* --- notifications --- */
.toasts {
  position: fixed; bottom: 18px; right: 18px; z-index: 80;
  display: flex; flex-direction: column; gap: 9px; pointer-events: none;
  max-width: min(360px, calc(100vw - 28px));
}
.toast {
  display: flex; gap: 11px; align-items: flex-start;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-2); border-left: 3px solid var(--green);
  border-radius: var(--r); padding: 12px 15px; font-size: 13px;
  box-shadow: var(--shadow-2); pointer-events: auto;
  animation: toastIn .3s var(--ease);
}
.toast.is-out { animation: toastOut .25s var(--ease) forwards; }
.toast--err { border-left-color: var(--red); }
.toast--gold { border-left-color: var(--gold); }
.toast__title { font-weight: 700; margin-bottom: 2px; }
.toast__body { color: var(--text-2); font-size: 12.5px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px); } }

/* --- divers --- */
.empty { text-align: center; padding: 42px 20px; color: var(--muted);
  font-size: 13px; }
.empty__icon { width: 40px; height: 40px; margin: 0 auto 12px; opacity: .35; }

.skeleton { background: linear-gradient(90deg, rgba(160,140,240,.05),
  rgba(160,140,240,.12), rgba(160,140,240,.05));
  background-size: 220% 100%; animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm); }
@keyframes shimmer { to { background-position: -220% 0; } }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.violet { color: #b7a4ff; }
.green { color: var(--green); }
.gold { color: var(--gold); }
.red { color: var(--red); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row--wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

.copy-line {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--bg-1); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); font-family: var(--mono); font-size: 12px;
  word-break: break-all;
}
.copy-line span { flex: 1; min-width: 0; }

.progress { height: 6px; border-radius: 99px; background: rgba(160,140,240,.1);
  overflow: hidden; }
.progress__bar { height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--violet), var(--green));
  transition: width .5s var(--ease); }

.list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-bottom: 1px solid rgba(160,140,240,.05);
}
.list-item:last-child { border-bottom: 0; }

/* ==========================================================================
   Console operateur — file des retraits

   Chaque demande est une carte. Le liseré de gauche donne le verdict avant
   meme la lecture : vert on peut signer, or il y a un point a regarder,
   rouge on ne signe pas en l'etat.
   ========================================================================== */

.tab__count {
  margin-left: 6px; min-width: 17px; height: 17px; padding: 0 5px;
  display: inline-grid; place-items: center; border-radius: 99px;
  font-size: 10px; font-weight: 800; font-family: var(--mono);
  background: var(--red); color: #fff;
}

.bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.wcard {
  background: linear-gradient(180deg, var(--panel), var(--bg-1));
  border: 1px solid var(--line); border-left: 3px solid var(--line-2);
  border-radius: var(--r-lg); overflow: hidden;
}
.wcard--ok        { border-left-color: var(--green); }
.wcard--attention { border-left-color: var(--gold); }
.wcard--bloquant  { border-left-color: var(--red); }

.wcard__head {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.wcard__amount { font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.wcard__user { font-weight: 700; color: var(--violet); }
.wcard__user:hover { color: #c7b8ff; text-decoration: underline; }

/* Jauge de risque : elle ne decide rien, elle trie l'attention. */
.risk { width: 78px; height: 5px; border-radius: 99px; flex: none;
  background: rgba(160,140,240,.14); overflow: hidden; }
.risk__bar { height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--gold) 55%, var(--red)); }

.wcard__signals { padding: 12px 16px; display: flex; flex-direction: column;
  gap: 8px; }
.signal { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; }
.signal__dot { width: 7px; height: 7px; border-radius: 99px; flex: none;
  margin-top: 6px; background: var(--muted); }
.signal--ok .signal__dot        { background: var(--green); }
.signal--attention .signal__dot { background: var(--gold); }
.signal--bloquant .signal__dot  { background: var(--red);
  box-shadow: 0 0 8px var(--red); }
.signal__text { line-height: 1.4; }
.signal--bloquant .signal__text { font-weight: 650; }
.signal__detail { font-size: 11.5px; color: var(--muted); margin-top: 2px;
  white-space: pre-line; }

.wcard__facts {
  display: grid; gap: 1px; background: var(--line);
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  border-top: 1px solid var(--line);
}
.fact { background: var(--bg-1); padding: 10px 14px; }
.fact__label { font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); font-weight: 700; }
.fact__value { font-size: 14px; font-weight: 650; margin-top: 3px; }
.fact__sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; }

.wcard__foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--line); flex-wrap: wrap; }

/* --- alertes d'exploitation --- */
.alert {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px 15px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line);
  border-left: 3px solid var(--line-2); font-size: 13px;
}
.alert--bloquant  { border-left-color: var(--red); background: var(--red-dim); }
.alert--attention { border-left-color: var(--gold); background: var(--gold-dim); }
/* Une promesse tenue : le delai de paiement annonce au joueur. */
.alert--ok { border-left-color: var(--green); background: var(--green-dim); }
.alert__mark { width: 8px; height: 8px; border-radius: 99px; flex: none;
  margin-top: 6px; background: currentColor; opacity: .8; }
.alert--bloquant .alert__mark  { background: var(--red); }
.alert--attention .alert__mark { background: var(--gold); }
.alert--ok .alert__mark { background: var(--green); }
.alert__title { font-weight: 700; }
.alert__body { color: var(--text-2); margin-top: 2px; font-size: 12.5px;
  white-space: pre-line; }

/* ==========================================================================
   Bandeau de simulation
   Il doit se voir sans qu'on le cherche : le joueur ne doit jamais avoir a
   deviner si ce qu'il mise a une valeur.
   ========================================================================== */
.simbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 18px; font-size: 12.5px; color: #ffe6a8;
  background:
    repeating-linear-gradient(135deg,
      rgba(242,193,78,.13) 0 14px, rgba(242,193,78,.07) 14px 28px),
    rgba(60,44,10,.55);
  border-bottom: 1px solid rgba(242,193,78,.32);
}
.simbar svg { stroke: #f2c14e; flex: none; }
.simbar b { letter-spacing: .14em; font-size: 11px; color: var(--gold); }
.simbar span { color: rgba(255,230,168,.82); }
.simbar__spacer { flex: 1; }
.simbar__link {
  padding: 4px 12px; border-radius: 99px; font-weight: 650;
  border: 1px solid rgba(242,193,78,.45); color: #ffdf9b;
}
.simbar__link:hover { background: rgba(242,193,78,.16); }
@media (max-width: 700px) {
  .simbar span:not(.simbar__spacer) { display: none; }
}

/* ==========================================================================
   Verrou de la console operateur
   ========================================================================== */
.lockscreen {
  min-height: min(78vh, 720px);
  display: grid; place-items: center; padding: 26px 0;
}
.lockscreen__card {
  width: min(460px, 100%);
  display: flex; flex-direction: column; gap: 14px;
  padding: 30px 28px 26px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-2);
  background:
    radial-gradient(120% 80% at 50% -20%, rgba(155,135,245,.16), transparent 62%),
    linear-gradient(180deg, var(--panel), var(--bg-1));
  box-shadow: 0 40px 90px -46px #000, var(--shadow-glow);
}
.lockscreen__mark { width: 54px; height: 54px; margin: 0 auto 2px; }
.lockscreen__mark svg { width: 100%; height: 100%; }
.lockscreen__title {
  font-size: 21px; font-weight: 800; text-align: center;
  letter-spacing: -.015em;
}
.lockscreen__sub {
  font-size: 13px; line-height: 1.55; color: var(--text-2);
  text-align: center; margin-bottom: 4px;
}

.lock-steps {
  display: flex; flex-direction: column; gap: 8px;
  margin: 0 0 6px; padding-left: 20px;
  font-size: 12.5px; line-height: 1.5; color: var(--text-2);
}
.lock-steps li::marker { color: var(--violet); font-weight: 800; }

/* La saisie du code : large, monospace, chiffres bien separes. */
.lock-code {
  width: 100%; padding: 14px 16px;
  border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--bg-1); color: var(--text);
  font-family: var(--mono); font-size: 26px; font-weight: 700;
  letter-spacing: .34em; text-align: center;
}
.lock-code:focus {
  outline: none; border-color: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-dim);
}
.lock-code::placeholder { letter-spacing: .3em; color: var(--muted); }

.lock-secret {
  padding: 14px 16px; border-radius: var(--r);
  border: 1px dashed rgba(170,150,255,.35);
  background: rgba(155,135,245,.07); text-align: center;
}
.lock-secret__label {
  font-size: 10.5px; font-weight: 750; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.lock-secret__value {
  font-family: var(--mono); font-size: 16px; font-weight: 700;
  letter-spacing: .08em; word-break: break-all; color: #ddd4ff;
  user-select: all;
}
.lock-uri summary {
  font-size: 12.5px; color: var(--text-2); cursor: pointer; padding: 4px 0;
}
.lock-uri summary:hover { color: var(--text); }

.lock-codes {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  margin: 14px 0;
}
.lock-codes__item {
  padding: 9px 6px; border-radius: var(--r-sm); text-align: center;
  background: var(--bg-1); border: 1px solid var(--line-2);
  font-family: var(--mono); font-size: 13.5px; font-weight: 700;
  letter-spacing: .04em; color: #ddd4ff; user-select: all;
}
.lock-ack {
  display: flex; align-items: center; gap: 9px; margin: 12px 0 4px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer;
}
.lock-facts {
  display: flex; flex-direction: column; gap: 7px; margin-top: 6px;
  font-size: 11.5px; color: var(--muted);
}
.lock-facts span { display: flex; align-items: center; gap: 7px; }
.lock-facts svg { stroke: var(--muted); flex: none; }
.lock-alt {
  margin-top: 6px; font-size: 11.5px; color: var(--muted); text-align: center;
  line-height: 1.7;
}
.lock-alt code {
  font-family: var(--mono); font-size: 11px; color: #c9bcff;
  background: var(--bg-1); padding: 2px 7px; border-radius: 5px;
  border: 1px solid var(--line-2); white-space: nowrap;
}

/* --- bandeau de la console ouverte --- */
.lock-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px; margin-bottom: 16px;
  border-radius: var(--r); font-size: 12.5px;
  border: 1px solid rgba(16,212,146,.28); background: rgba(16,212,146,.07);
}
.lock-bar__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px rgba(16,212,146,.16);
}
.lock-bar__label { font-weight: 650; color: var(--green); }
.lock-bar__time {
  font-family: var(--mono); font-weight: 700; color: var(--text-2);
}
.lock-bar.is-soon {
  border-color: rgba(242,193,78,.4); background: rgba(242,193,78,.08);
}
.lock-bar.is-soon .lock-bar__dot { background: var(--gold);
  box-shadow: 0 0 0 4px rgba(242,193,78,.16); }
.lock-bar.is-soon .lock-bar__label { color: var(--gold); }

/* ==========================================================================
   Onglet « Mode » de la console
   ========================================================================== */
.mode-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 14px;
}
.mode-card {
  display: flex; flex-direction: column; gap: 12px; padding: 18px;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--bg-1));
}
.mode-card.is-active {
  border-color: rgba(155,135,245,.45);
  box-shadow: var(--shadow-glow);
}
.mode-card__head { display: flex; align-items: center; gap: 10px; }
.mode-card__head h3 { font-size: 16px; font-weight: 800; }
.mode-card__badge:not(:empty) {
  order: 2; padding: 2px 9px; border-radius: 99px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--green-dim); color: var(--green);
}
.mode-card__list {
  display: flex; flex-direction: column; gap: 7px; flex: 1;
  margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.5;
  color: var(--text-2);
}
.mode-card__list li::marker { color: var(--violet); }
.mode-card__note { font-size: 12px; color: var(--muted); }

.mode-outcomes { display: grid; gap: 8px; }
.mode-outcome {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 11px 14px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--bg-1);
  transition: border-color .16s, background .16s;
}
.mode-outcome:hover { border-color: rgba(160,140,240,.4); }
.mode-outcome b {
  font-family: var(--mono); font-size: 12px; color: #c9bcff;
  letter-spacing: .04em;
}
.mode-outcome span { font-size: 12px; color: var(--text-2); }
.mode-outcome.is-on {
  border-color: var(--violet); background: var(--violet-dim);
}
.mode-outcome.is-on b { color: #ddd4ff; }

/* ==========================================================================
   Figures dessinees (web/js/glyphs.js)
   Ce qui, ailleurs, serait un emoji. Aucune de ces formes ne change d'un
   systeme a l'autre, et toutes suivent la palette du site.
   ========================================================================== */

.suit { display: inline-block; vertical-align: -.12em; flex: none; }
.suit svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.suit--fit { width: 1em; height: 1em; }
.suit--inherit { color: inherit; }
.suit--red { color: #d92f4f; }
.suit--black { color: #14202b; }
.suit--soft { color: var(--text-2); }
.suit--violet { color: var(--violet); }

.glyph-lock { display: inline-block; flex: none; color: var(--muted); }
.glyph-lock svg { width: 100%; height: 100%; display: block; fill: currentColor; }

/* --- le coffre : trois etats, une seule figure --------------------------- */
.chest { display: block; margin: 0 auto; }
.chest svg { width: 100%; height: 100%; display: block; overflow: visible; }

.chest__lid {
  transform-origin: 24px 58px;          /* la charniere, a gauche */
  transition: transform .55s cubic-bezier(.2, 1.4, .4, 1);
}
.chest__coins, .chest__burst { opacity: 0; }
.chest__lock { transition: opacity .3s; }

.chest--locked { filter: grayscale(.55) brightness(.72); }
.chest--locked .chest__lid { transform: rotate(0); }

.chest--ready .chest__lid { animation: chestTease 2.6s ease-in-out infinite; }
@keyframes chestTease {
  0%, 86%, 100% { transform: rotate(0); }
  92%           { transform: rotate(-7deg); }
}

.chest.is-shaking { animation: chestShake .42s ease-in-out 3; }
@keyframes chestShake {
  0%, 100% { transform: rotate(0) scale(1); }
  25%      { transform: rotate(-6deg) scale(1.04); }
  75%      { transform: rotate(6deg) scale(1.04); }
}

.chest--open .chest__lid {
  transform: rotate(-108deg);
  animation: none;
}
.chest--open .chest__lock { opacity: 0; }
.chest--open .chest__burst {
  opacity: 1; animation: chestBurst .9s var(--ease) forwards;
}
@keyframes chestBurst {
  0%   { opacity: 0; transform: scale(.4); }
  40%  { opacity: 1; transform: scale(1.15); }
  100% { opacity: .55; transform: scale(1); }
}
.chest--open .chest__coins {
  opacity: 1; animation: chestCoins .8s cubic-bezier(.2,.9,.3,1) backwards;
}
@keyframes chestCoins {
  0%   { opacity: 0; transform: translateY(26px) scale(.5); }
  60%  { opacity: 1; transform: translateY(-6px) scale(1.06); }
  100% { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .chest--ready .chest__lid, .chest.is-shaking,
  .chest--open .chest__burst, .chest--open .chest__coins { animation: none; }
  .chest--open .chest__coins, .chest--open .chest__burst { opacity: 1; }
}

/* La rangee de cartes de la page Equite : le meme dessin que sur le tapis. */
.verify-cards {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 12px;
  border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--bg-1);
}

/* Pastille des conseils de la console : la couleur porte le niveau. */
.advice__ico { display: inline-flex; flex: none; }
.advice__ico--critique svg { stroke: var(--red); }
.advice__ico--attention svg { stroke: var(--gold); }
.advice__ico--info svg { stroke: var(--text-2); }

/* ==========================================================================
   Pari automatique + statistiques de session
   ========================================================================== */
.auto { display: flex; flex-direction: column; gap: 12px; }
.auto.is-running {
  padding: 12px; margin: -12px; border-radius: var(--r);
  background: rgba(155,135,245,.06);
  box-shadow: inset 0 0 0 1px rgba(155,135,245,.24);
}
.auto__counter {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; font-family: var(--mono); color: var(--muted);
  min-height: 18px;
}
.auto__sep { opacity: .5; }
.auto.is-running .auto__counter { color: var(--text-2); }
/* Un liseré qui court : on voit que ça tourne sans regarder le compteur. */
.auto.is-running::after {
  content: ""; display: block; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
  background-size: 60% 100%; background-repeat: no-repeat;
  animation: autoSweep 1.1s linear infinite;
}
@keyframes autoSweep {
  from { background-position: -60% 0; } to { background-position: 160% 0; }
}

.sstats {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
}
.sstat {
  display: flex; align-items: baseline; gap: 6px;
  padding: 3px 10px; border-radius: 99px;
  background: rgba(160,140,240,.05);
}
.sstat__label {
  font-size: 9.5px; font-weight: 750; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
}
.sstat__value {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  color: var(--text-2);
}
.sstat__value.win { color: var(--green); }
.sstat__value.lose { color: var(--red); }
.sstat__reset {
  margin-left: auto; display: inline-flex; align-items: center;
  justify-content: center; padding: 5px; border-radius: 7px;
  min-width: 28px; min-height: 28px;
  color: var(--muted); transition: color .15s, background .15s;
}
.sstat__reset:hover { color: var(--text); background: rgba(160,140,240,.10); }
.sstat__reset svg { stroke: currentColor; }
@media (prefers-reduced-motion: reduce) {
  .auto.is-running::after { animation: none; }
}

/* ==========================================================================
   Console : explorateur de la base
   ========================================================================== */
.dbhead {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.dbgrid {
  display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 16px;
  align-items: start;
}
.dbtables {
  display: flex; flex-direction: column; gap: 3px;
  padding: 8px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--panel);
  position: sticky; top: 0; max-height: 74vh; overflow-y: auto;
}
.dbtable {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 11px; border-radius: var(--r-sm); text-align: left;
  font-size: 12.5px; color: var(--text-2); background: transparent;
  border: 1px solid transparent; transition: .14s;
}
.dbtable:hover { background: rgba(160,140,240,.07); color: var(--text); }
.dbtable.is-on {
  background: var(--violet-dim); color: #ddd4ff;
  border-color: rgba(155,135,245,.3);
}
.dbtable__name { flex: 1; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.dbtable__count {
  font-family: var(--mono); font-size: 11px; color: var(--muted); flex: none;
}
.dbtable.is-on .dbtable__count { color: #b7a4ff; }

.dbpane { min-width: 0; }
.dbnote {
  display: flex; align-items: center; gap: 9px; margin: 10px 0 12px;
  padding: 9px 13px; border-radius: var(--r-sm); font-size: 12px;
  color: var(--text-2); background: rgba(160,140,240,.06);
  border: 1px solid var(--line);
}
.dbnote svg { stroke: var(--violet); flex: none; }

.table-wrap--tall { max-height: 62vh; overflow: auto; }
.tbl--dense th, .tbl--dense td {
  padding: 6px 10px; font-size: 12px; white-space: nowrap;
}
.tbl--dense th {
  position: sticky; top: 0; z-index: 1; background: var(--panel);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em;
}

@media (max-width: 900px) {
  .dbgrid { grid-template-columns: minmax(0, 1fr); }
  .dbtables { position: static; flex-direction: row; flex-wrap: wrap;
    max-height: none; }
  .dbtable { width: auto; }
}

/* ==========================================================================
   Console : qui gagne, qui perd
   ========================================================================== */
.splitbar {
  display: flex; height: 30px; border-radius: 99px; overflow: hidden;
  border: 1px solid var(--line-2); background: var(--bg-1);
}
.splitbar__seg {
  display: grid; place-items: center; min-width: 0;
  font-size: 11px; font-weight: 750; color: rgba(0,0,0,.7);
  transition: width .6s var(--ease); overflow: hidden; white-space: nowrap;
}
.splitbar__seg--win { background: linear-gradient(90deg, #0f9a6d, var(--green)); }
.splitbar__seg--even { background: rgba(160,140,240,.2); }
.splitbar__seg--lose { background: linear-gradient(90deg, #b8365a, var(--red)); }

.histo {
  display: flex; align-items: flex-end; gap: 6px; height: 132px;
  padding: 8px 4px 0; border-bottom: 1px solid var(--line);
}
.histo__col {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-end; height: 100%; gap: 4px; min-width: 0;
}
.histo__count {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  min-height: 13px;
}
.histo__bar {
  width: 100%; border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, var(--violet), var(--violet-2));
  transition: height .5s var(--ease);
}
.histo__bar--win { background: linear-gradient(180deg, var(--green), #0a7d55); }
.histo__bar--lose { background: linear-gradient(180deg, var(--red), #8d2440); }
.histo__tick {
  font-family: var(--mono); font-size: 9.5px; color: var(--muted);
  transform: translateY(14px); white-space: nowrap;
}

/* Barre d'actions d'une fiche joueur : tout ce qu'on peut faire, ensemble. */
.actionbar { display: flex; flex-wrap: wrap; gap: 7px; }
.actionbar .btn { flex: 0 1 auto; }

/* ==========================================================================
   Les deux soldes du portefeuille
   Celui qu'on possede, celui qu'on a mis en jeu. Ils ne se confondent pas.
   ========================================================================== */
.twobal {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px;
  align-items: stretch;
}
.twobal__side {
  padding: 16px 18px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: var(--panel);
}
.twobal__side--game {
  border-color: rgba(155,135,245,.4);
  background:
    radial-gradient(90% 80% at 50% 0%, rgba(155,135,245,.12), transparent 66%),
    var(--panel);
}
.twobal__label {
  display: flex; align-items: center; gap: 7px;
  font-size: 10.5px; font-weight: 750; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.twobal__label svg { stroke: currentColor; }
.twobal__value {
  font-family: var(--mono); font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 750; letter-spacing: -.03em;
}
.twobal__side--game .twobal__value { color: #c9bcff; }
.twobal__sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.twobal__arrow { display: grid; place-items: center; color: var(--muted); }
.twobal__arrow svg { stroke: currentColor; }
@media (max-width: 640px) {
  .twobal { grid-template-columns: 1fr; }
  .twobal__arrow { transform: rotate(90deg); }
}

/* Recherche et favoris du lobby */
.input--search { max-width: 210px; padding-left: 12px; }
.game-tile__fav {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  display: inline-flex; padding: 7px; border-radius: 9px;
  color: rgba(236,231,250,.55);
  background: rgba(10,7,20,.55); border: 1px solid transparent;
  backdrop-filter: blur(4px);
  transition: color .16s, background .16s, transform .16s var(--ease);
}
.game-tile__fav:hover { color: var(--gold); transform: scale(1.1); }
.game-tile__fav svg { stroke: currentColor; fill: none; }
.game-tile__fav.is-on { color: var(--gold); border-color: rgba(242,193,78,.4); }
.game-tile__fav.is-on svg { fill: currentColor; }

/* Palier du joueur, dans le pied de la barre laterale. */
.lvl {
  display: block; padding: 10px 12px; border-radius: var(--r-sm);
  background: rgba(160,140,240,.06); border: 1px solid transparent;
  transition: background .16s, border-color .16s;
}
.lvl:hover { background: var(--violet-dim); border-color: rgba(155,135,245,.28); }
.lvl__head {
  display: flex; align-items: center; gap: 7px; margin-bottom: 7px;
  font-size: 11.5px;
}
.lvl__num {
  font-family: var(--mono); font-size: 10px; font-weight: 800;
  padding: 2px 6px; border-radius: 5px;
  background: var(--violet-dim); color: #c9bcff; flex: none;
}
.lvl__name { flex: 1; color: var(--text-2); font-weight: 650; min-width: 0; }
.lvl__pct { font-family: var(--mono); color: var(--muted); flex: none; }
.progress--thin { height: 5px; }
/* Repliee, la barre laterale n'a la place que pour la pastille. */
.shell.rail .lvl__name, .shell.rail .lvl__pct { display: none; }

/* ==========================================================================
   Sélecteur de wallet — le premier écran du site
   ========================================================================== */

.wpick { display: grid; gap: 8px; }

.wpick__item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: var(--r); padding: 10px 12px;
  color: var(--text); font: inherit;
  transition: border-color .16s var(--ease), background .16s var(--ease),
              transform .16s var(--ease);
}
.wpick__item:hover {
  background: var(--panel-3); border-color: rgba(155, 135, 245, .45);
  transform: translateY(-1px);
}
.wpick__item:active { transform: none; }
.wpick__item--off { opacity: .62; }
.wpick__item--off:hover { opacity: 1; }

.wpick__mark {
  border-radius: 11px; flex: none; position: relative; overflow: hidden;
  display: grid; place-items: center;
  font-weight: 800; letter-spacing: -.02em;
}
/* Le logo recouvre le monogramme une fois charge. Tant qu'il ne l'est pas,
   c'est l'initiale qu'on voit : jamais de trou dans la liste. */
.wpick__logo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit;
}
/* Le logo apporte sa propre couleur de fond : la pastille s'efface. */
.wpick__mark.has-logo { background: transparent !important; }
.wpick__name { flex: 1; font-weight: 650; font-size: 14.5px; }

.wpick__tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 99px;
  color: var(--green); background: var(--green-dim);
}
.wpick__tag--off { color: var(--muted); background: var(--panel-3); }

.wpick__sep {
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  margin: 12px 0 2px;
}

/* L'étape en cours (connexion, signature) remplace la liste sur place :
   deux écrans qui se succèdent, pas une modale qui saute. */
.wpick__step {
  display: grid; place-items: center; gap: 14px;
  padding: 34px 10px; text-align: center;
}
.wpick__steptxt {
  font-size: 14px; color: var(--text-2); max-width: 30ch;
  white-space: pre-line; line-height: 1.5;
}

.spinner {
  width: 26px; height: 26px; border-radius: 50%; display: block;
  border: 2.5px solid var(--line-2); border-top-color: var(--violet);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Confirmation d'une mise dans le wallet
   ========================================================================== */

.stakebox { display: grid; gap: 16px; justify-items: center; text-align: center; }
.stakebox__amt {
  font-family: var(--mono); font-size: 30px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.stakebox__from {
  font-size: 12.5px; color: var(--muted);
  display: flex; align-items: center; gap: 7px;
}
.stakebox__note {
  font-size: 12.5px; color: var(--text-2); max-width: 34ch;
  line-height: 1.55; white-space: pre-line;
}
