/* ============================================================
   THE ASHTRAY KING — Salle de jeux, ligues et prestiges
   ============================================================ */

/* ─── Écran ───────────────────────────────────────────────── */
#game-content #page-multi.active { display: flex !important; flex-direction: column; overflow: hidden; }
#page-multi > .page-inner { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px 12px !important; gap: 8px; max-width: 760px !important; margin: 0 auto; width: 100%; }
#multi-content { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; max-width: none !important; }
#page-multi:has(.mg-screen) .inventory-header { display: none; }

/* ─── Écusson de rang ────────────────────────────────────── */
.rank-badge { display: inline-flex; flex-shrink: 0; }
.rank-badge-shape {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 34px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--rk) 70%, #fff) 0%, var(--rk) 45%, color-mix(in srgb, var(--rk) 60%, #000) 100%);
  clip-path: polygon(50% 0, 100% 18%, 100% 62%, 50% 100%, 0 62%, 0 18%);
  filter: drop-shadow(0 2px 0 var(--outline));
}
.rank-badge-shape::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--outline);
  clip-path: polygon(50% 0, 100% 18%, 100% 62%, 50% 100%, 0 62%, 0 18%, 0 18%, 8% 22%, 8% 59%, 50% 91%, 92% 59%, 92% 22%, 50% 8%, 8% 22%, 0 18%);
}
.rank-badge-div { position: relative; font-family: var(--font-title); font-size: 0.7rem; color: #fff; text-shadow: 0 1px 0 var(--outline), 0 -1px 0 var(--outline), 1px 0 0 var(--outline), -1px 0 0 var(--outline); margin-top: -3px; }
.rank-sm .rank-badge-shape { width: 24px; height: 28px; }
.rank-sm .rank-badge-div { font-size: 0.58rem; }
.rank-lg .rank-badge-shape { width: 64px; height: 72px; }
.rank-lg .rank-badge-div { font-size: 1.4rem; margin-top: -6px; }

/* ─── Hub ─────────────────────────────────────────────────── */
.hub { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.hub-week {
  display: flex; flex-direction: column; gap: 7px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 90% 0%, rgba(159,231,255,0.18), transparent 60%),
    linear-gradient(180deg, #2c3a44 0%, #1c252c 100%);
  border: 3px solid var(--outline);
  border-radius: 16px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.1), 0 5px 0 var(--outline);
  cursor: pointer;
}
.hub-week:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--outline); }
.hub-week-top, .hub-week-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hub-week-title { font-family: var(--font-title); font-size: 1.1rem; color: #9fe7ff; text-shadow: 0 2px 0 var(--outline); }
.hub-week-reset { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.hub-week-bar { height: 12px; background: #0d1216; border: 2px solid var(--outline); border-radius: 7px; overflow: hidden; }
.hub-week-bar > div { height: 100%; background: linear-gradient(180deg, #d8f6ff, #6fd2f0); border-radius: 4px; transition: width 0.4s; }
.hub-week-bottom { font-size: 0.8rem; }
.hub-trophy-counts { display: flex; gap: 10px; }
.hub-trophy-counts span { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; }

.hub-games { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 700px) { .hub-games { grid-template-columns: 1fr 1fr; } }
.hub-game {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  text-align: left;
  color: var(--cream);
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 3px solid var(--outline);
  border-radius: 16px;
  box-shadow: var(--panel-shadow);
  cursor: pointer;
  transition: transform 0.1s, filter 0.15s;
}
.hub-game:hover { filter: brightness(1.1); }
.hub-game:active { transform: translateY(3px); }
.hub-game-art {
  flex-shrink: 0;
  width: 76px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #fffaf0, var(--cream) 60%, var(--cream-2));
  border: 3px solid var(--outline);
  border-radius: 12px;
}
.hub-game-art svg { width: 90%; height: 90%; }
.hub-game-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hub-game-info strong { font-family: var(--font-title); font-weight: 400; font-size: 1.05rem; color: var(--gold); text-shadow: 0 2px 0 var(--outline); }
.hub-game-desc { font-size: 0.74rem; color: var(--text-muted); line-height: 1.3; }
.hub-game-rank { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; }
.hub-game-rank em { margin-left: auto; font-style: normal; font-size: 0.7rem; color: var(--text-dim); }
.hub-game-lp { height: 7px; background: #140c07; border: 2px solid var(--outline); border-radius: 5px; overflow: hidden; }
.hub-game-lp > span { display: block; height: 100%; background: linear-gradient(180deg, #ffe07a, var(--gold)); }
.hub-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hub-footer .btn-empire { font-size: 0.78rem !important; padding: 9px 8px !important; }
.hub-note { text-align: center; font-size: 0.72rem; color: var(--text-dim); }
.hub-legacy-back { align-self: flex-start; margin-bottom: 8px; padding: 6px 12px !important; font-size: 0.8rem !important; }
.hub-tabs { margin: 0; }

/* ─── Prestiges ───────────────────────────────────────────── */
.pr-list { display: flex; flex-direction: column; gap: 6px; }
.pr-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: #1a110a;
  border: 2px solid var(--outline);
  border-left: 6px solid var(--pr, #c57b3a);
  border-radius: 10px;
}
.pr-bronze { --pr: #c57b3a; } .pr-argent { --pr: #c9d2dc; } .pr-or { --pr: #ffc43a; } .pr-platine { --pr: #9fe7ff; }
.pr-item.is-done { background: linear-gradient(90deg, color-mix(in srgb, var(--pr) 18%, #1a110a), #1a110a 70%); }
.pr-item:not(.is-done) .trophy-icon { filter: grayscale(0.85) brightness(0.7); }
.pr-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pr-item-body strong { font-size: 0.86rem; color: var(--cream); line-height: 1.25; }
.pr-bar { height: 7px; background: #0b0703; border-radius: 4px; overflow: hidden; }
.pr-bar > div { height: 100%; background: var(--pr); }
.pr-meta { font-size: 0.7rem; color: var(--text-muted); }
.pr-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pr-count { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; background: #1a110a; border: 2px solid var(--outline); border-radius: 10px; }
.pr-count strong { font-family: var(--font-title); font-size: 1.3rem; color: var(--pr); text-shadow: 0 2px 0 var(--outline); }
.pr-count span { font-size: 0.68rem; color: var(--text-muted); }

/* Notification de trophée (coin haut, façon console) */
.trophy-popup {
  position: fixed;
  top: 72px; right: 12px;
  z-index: 5000;
  display: flex; align-items: center; gap: 10px;
  max-width: min(360px, calc(100vw - 24px));
  padding: 10px 14px 10px 10px;
  background: linear-gradient(180deg, #2b2119, #1a110a);
  border: 3px solid var(--outline);
  border-left: 6px solid var(--pr, #c57b3a);
  border-radius: 12px;
  box-shadow: 0 5px 0 var(--outline), 0 16px 30px rgba(0,0,0,0.5);
  transform: translateX(120%);
  transition: transform 0.45s cubic-bezier(.2,1.3,.4,1);
}
.trophy-popup.is-in { transform: none; }
.trophy-popup.trophy-bronze { --pr: #c57b3a; } .trophy-popup.trophy-argent { --pr: #c9d2dc; } .trophy-popup.trophy-or { --pr: #ffc43a; } .trophy-popup.trophy-platine { --pr: #9fe7ff; }
.trophy-popup-text { display: flex; flex-direction: column; min-width: 0; }
.trophy-popup-kicker { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--pr); }
.trophy-popup-text strong { font-size: 0.86rem; color: var(--cream); line-height: 1.2; }
.trophy-popup-reward { font-size: 0.7rem; color: var(--text-muted); }

/* Échelle des rangs */
.rk-ladder { display: flex; flex-direction: column; gap: 4px; }
.rk-row { display: flex; align-items: center; gap: 10px; padding: 5px 10px; background: #1a110a; border: 2px solid var(--outline); border-radius: 8px; }
.rk-name { font-weight: 700; font-size: 0.82rem; color: var(--cream); white-space: nowrap; }
.rk-games { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.rk-you { font-size: 0.62rem; font-weight: 800; color: var(--outline); background: var(--gold); border: 1.5px solid var(--outline); border-radius: 5px; padding: 1px 5px; }

/* ═══════════════════════════════════════════════════════════
   ÉCRAN DE PARTIE (commun)
   ═══════════════════════════════════════════════════════════ */
.mg-screen { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.mg-header { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.mg-back {
  width: 40px; height: 40px; flex-shrink: 0;
  font-family: var(--font-title); font-size: 1.6rem; line-height: 1;
  color: var(--cream);
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2));
  border: 3px solid var(--outline); border-radius: 10px;
  box-shadow: 0 3px 0 var(--outline);
  cursor: pointer; padding-bottom: 4px;
}
.mg-back:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
.mg-header-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mg-header-title strong { font-family: var(--font-title); font-weight: 400; font-size: 1.25rem; color: var(--gold); text-shadow: var(--small-shadow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mg-header-title span { font-size: 0.72rem; color: var(--text-muted); }
.mg-header-rank { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; color: var(--cream); white-space: nowrap; }
@media (max-width: 420px) { .mg-header-rank span { display: none; } }

.mg-scoreboard {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: #1a110a; border: 2px solid var(--outline); border-radius: 12px;
  flex-shrink: 0;
}
.mg-score-side { display: flex; align-items: baseline; gap: 8px; font-size: 0.78rem; color: var(--text-muted); font-weight: 700; }
.mg-score-side:last-child { justify-content: flex-end; flex-direction: row-reverse; }
.mg-score-side strong { font-family: var(--font-title); font-size: 1.6rem; color: var(--gold); text-shadow: 0 2px 0 var(--outline); }
.mg-round { font-family: var(--font-title); font-size: 0.85rem; color: var(--cream); }
.mg-hint { text-align: center; font-size: 0.76rem; color: var(--text-muted); min-height: 1.2em; flex-shrink: 0; }
.mg-actions { display: flex; gap: 8px; justify-content: center; flex-shrink: 0; }
.mg-actions .btn-empire { flex: 1; max-width: 220px; padding: 12px 10px !important; font-size: 0.95rem !important; }
.mg-wait { font-family: var(--font-title); color: var(--text-muted); padding: 12px; }

/* Résultat */
.mg-result {
  position: absolute; inset: -4px;
  z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,7,4,0.82);
  backdrop-filter: blur(2px);
  border-radius: 12px;
  animation: mg-fade 0.25s ease-out;
}
@keyframes mg-fade { from { opacity: 0; } }
.mg-result-card {
  width: min(380px, 94%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 3px solid var(--outline); border-radius: 18px;
  box-shadow: inset 0 0 0 2px var(--line-lit), 0 7px 0 var(--outline);
  animation: po-pop 0.4s cubic-bezier(.2,1.5,.4,1);
}
.mg-result-title { font-family: var(--font-title); font-size: 2.2rem; color: var(--gold); text-shadow: var(--title-shadow); }
.mg-result-loss .mg-result-title { color: #ff7a6e; }
.mg-result-draw .mg-result-title { color: var(--cream); }
.mg-result-detail { color: var(--text-muted); font-weight: 600; font-size: 0.88rem; }
.mg-result-rank { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 12px; background: #1a110a; border: 2px solid var(--outline); border-radius: 12px; }
.mg-result-rank-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.mg-result-rank-info strong { font-family: var(--font-title); font-weight: 400; font-size: 1.1rem; color: var(--cream); }
.mg-lp-delta { font-family: var(--font-title); font-size: 1rem; }
.mg-lp-delta.is-up { color: #5ef09a; } .mg-lp-delta.is-down { color: #ff7a6e; }
.mg-lp-bar { height: 10px; background: #0b0703; border: 2px solid var(--outline); border-radius: 6px; overflow: hidden; }
.mg-lp-fill { height: 100%; background: linear-gradient(180deg, #ffe07a, var(--gold)); animation: mg-grow 0.8s ease-out; }
@keyframes mg-grow { from { width: 0 !important; } }
.mg-lp-text { font-size: 0.7rem; color: var(--text-muted); }
.mg-promo, .mg-demo, .mg-streak { font-family: var(--font-title); font-size: 1rem; padding: 5px 12px; border: 2px solid var(--outline); border-radius: 8px; }
.mg-promo { color: var(--outline); background: linear-gradient(180deg, #ffe07a, var(--gold)); animation: po-pop 0.5s 0.3s cubic-bezier(.2,1.6,.4,1) both; }
.mg-demo { color: #fff; background: var(--tabac-dark); }
.mg-streak { color: var(--cream); background: var(--panel-3); }
.mg-result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.mg-result-actions .btn-empire { padding: 11px 8px !important; }

/* ═══════════════════════════════════════════════════════════
   421
   ═══════════════════════════════════════════════════════════ */
.d421-ai {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: #1a110a; border: 2px solid var(--outline); border-radius: 12px;
  flex-shrink: 0;
}
.d421-ai.is-waiting { opacity: 0.55; }
.d421-label { font-weight: 800; font-size: 0.8rem; color: var(--text-muted); }
.d421-table {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: var(--grain), radial-gradient(circle at 50% 40%, #1f8a50, #0f4229);
  border: 6px solid #5a3519; border-radius: 18px;
  box-shadow: 0 0 0 3px var(--outline), inset 0 0 0 2px var(--outline), inset 0 0 40px rgba(0,0,0,0.5);
  padding: 14px;
}
.d421-dice { display: flex; gap: clamp(10px, 4vw, 22px); }
.d421-dice-sm { gap: 6px; }
.d421-dice-sm .die-svg, .d421-dice-sm .die-empty { width: 34px; height: 34px; }
.die-btn { background: none; border: none; padding: 0; cursor: pointer; }
.die-btn:disabled { cursor: default; }
.die-svg, .die-empty-lg { width: clamp(64px, 20vw, 96px); height: clamp(64px, 20vw, 96px); display: block; }
.die-empty { border: 2px dashed rgba(255,255,255,0.25); border-radius: 8px; }
.die-body { fill: #fffaf0; stroke: #120a04; stroke-width: 2; }
.die-pip { fill: #120a04; }
.die-pip.pip-red { fill: #d62a22; }
.die-svg { filter: drop-shadow(0 4px 0 #120a04); transition: transform 0.15s; }
.die-svg.is-held { transform: translateY(-8px); filter: drop-shadow(0 0 0 transparent) drop-shadow(0 4px 0 #120a04) drop-shadow(0 0 10px rgba(255,196,58,0.9)); }
.die-svg.is-held .die-body { stroke: var(--gold); stroke-width: 3; }
.d421-combo { font-weight: 700; font-size: 0.85rem; color: var(--cream); margin-left: auto; }
.d421-combo-lg { margin: 0; font-family: var(--font-title); font-size: 1.5rem; color: var(--gold); text-shadow: var(--small-shadow); }

/* ═══════════════════════════════════════════════════════════
   PIERRE-BRIQUET-CLOPE
   ═══════════════════════════════════════════════════════════ */
.pbc-arena {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: space-evenly;
  background: var(--grain), linear-gradient(180deg, #3a2819, #24180f);
  border: 3px solid var(--outline); border-radius: 18px;
  box-shadow: inset 0 0 0 2px var(--line-lit);
  padding: 10px;
}
.pbc-hand {
  width: clamp(80px, 22vh, 130px); aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #fffaf0, var(--cream) 60%, var(--cream-2));
  border: 4px solid var(--outline); border-radius: 50%;
  box-shadow: 0 5px 0 var(--outline);
}
.pbc-hand svg { width: 70%; height: 70%; }
.pbc-hand.is-shown { animation: po-pop 0.35s cubic-bezier(.2,1.6,.4,1); }
.pbc-hand-ai { background: radial-gradient(circle at 50% 40%, #ffd2c2, #ff8f7a 70%, #d62a22); }
.pbc-q { font-family: var(--font-title); font-size: 2.6rem; color: var(--outline); opacity: 0.5; }
.pbc-verdict { font-family: var(--font-title); font-size: 1.15rem; color: var(--cream); text-shadow: 0 2px 0 var(--outline); text-align: center; min-height: 1.4em; }
.pbc-verdict.is-win { color: #5ef09a; } .pbc-verdict.is-loss { color: #ff7a6e; }
.pbc-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; flex-shrink: 0; }
.pbc-choice {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px 6px;
  font-family: var(--font-title); font-size: 0.9rem; color: var(--outline);
  background: linear-gradient(180deg, #ffe07a, var(--gold) 50%, var(--gold-2));
  border: 3px solid var(--outline); border-radius: 14px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.55), 0 5px 0 var(--outline);
  cursor: pointer;
}
.pbc-choice svg { width: clamp(44px, 12vh, 64px); height: clamp(44px, 12vh, 64px); }
.pbc-choice:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--outline); }
.pbc-choice:disabled { filter: grayscale(0.6) brightness(0.8); cursor: default; }

/* ═══════════════════════════════════════════════════════════
   BATAILLE DE COMPTOIR
   ═══════════════════════════════════════════════════════════ */
.bt-ai-hand { display: flex; justify-content: center; gap: 6px; flex-shrink: 0; }
.bt-back {
  width: 30px; height: 42px;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.08) 0 5px, transparent 5px 10px), linear-gradient(160deg, #c8261f, #7a0f0b);
  border: 2px solid var(--outline); border-radius: 5px;
  box-shadow: inset 0 0 0 2px var(--gold), 0 2px 0 var(--outline);
}
.bt-stat-banner { text-align: center; font-size: 0.85rem; color: var(--text-muted); flex-shrink: 0; }
.bt-stat-banner strong { font-family: var(--font-title); font-weight: 400; font-size: 1.15rem; color: var(--gold); text-shadow: 0 2px 0 var(--outline); }
.bt-board {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 10px;
  background: var(--grain), radial-gradient(circle at 50% 40%, #1f8a50, #0f4229);
  border: 6px solid #5a3519; border-radius: 18px;
  box-shadow: 0 0 0 3px var(--outline), inset 0 0 0 2px var(--outline);
}
.bt-slot { display: flex; justify-content: center; }
.bt-slot-empty { width: 96px; height: 130px; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; color: rgba(255,255,255,0.5); border: 2px dashed rgba(255,255,255,0.3); border-radius: 10px; }
.bt-vs { font-family: var(--font-title); font-size: 1.2rem; color: var(--cream); text-shadow: var(--small-shadow); }
.bt-vs.is-win { color: #5ef09a; } .bt-vs.is-loss { color: #ff7a6e; }
.bt-hand { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; flex-shrink: 0; }
.bt-card {
  position: relative;
  display: flex; flex-direction: column;
  width: 100%; max-width: 110px; margin: 0 auto;
  padding: 3px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--rc) 70%, #fff), var(--rc) 50%, color-mix(in srgb, var(--rc) 60%, #000));
  border: 2px solid var(--outline); border-radius: 9px;
  box-shadow: 0 3px 0 var(--outline);
  cursor: pointer; text-align: center;
  transition: transform 0.12s;
}
.bt-hand .bt-card:hover:not(:disabled) { transform: translateY(-5px); }
.bt-card:disabled { cursor: default; opacity: 0.75; }
.bt-card-art { display: block; aspect-ratio: 1; background: radial-gradient(circle, #fff, #e7e1d4); border: 1.5px solid var(--outline); border-radius: 6px 6px 0 0; overflow: hidden; }
.bt-card-art img { width: 100%; height: 100%; object-fit: contain; }
.bt-card-name { display: block; padding: 2px 2px 0; background: var(--cream); color: var(--paper-ink); font-size: 0.56rem; font-weight: 800; line-height: 1.15; height: 2.4em; overflow: hidden; border-left: 1.5px solid var(--outline); border-right: 1.5px solid var(--outline); }
.bt-card-stat { display: block; padding: 2px; background: var(--paper-ink); color: var(--gold); font-family: var(--font-title); font-size: 0.66rem; border-radius: 0 0 6px 6px; border: 1.5px solid var(--outline); border-top: none; }
.bt-lent { position: absolute; top: 4px; left: 4px; font-size: 0.5rem; font-weight: 800; color: #fff; background: var(--paper-ink); border-radius: 4px; padding: 0 4px; }
.bt-board .bt-card { width: clamp(90px, 26vw, 130px); max-width: none; cursor: default; }
.bt-board .bt-card-name { font-size: 0.66rem; }
.bt-board .bt-card-stat { font-size: 0.85rem; }
.bt-card.is-winner { box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(255,196,58,0.8), 0 3px 0 var(--outline); animation: po-pop 0.4s cubic-bezier(.2,1.6,.4,1); }

/* ═══════════════════════════════════════════════════════════
   COURSE CLANDESTINE
   ═══════════════════════════════════════════════════════════ */
.course-intro {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 12px;
  padding: 14px;
  background: var(--grain), linear-gradient(180deg, #1f7a4a, #0f4229);
  border: 6px solid #5a3519; border-radius: 18px;
  box-shadow: 0 0 0 3px var(--outline), inset 0 0 0 2px var(--outline);
}
.course-track { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.course-track-kicker { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.65); }
.course-track strong { font-family: var(--font-title); font-weight: 400; font-size: 1.6rem; color: var(--gold); text-shadow: var(--title-shadow); }
.course-track span { font-size: 0.8rem; color: var(--cream); }
.course-rules { list-style: none; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; background: rgba(0,0,0,0.3); border: 2px solid rgba(0,0,0,0.4); border-radius: 12px; }
.course-rules li { font-size: 0.8rem; color: var(--cream); line-height: 1.35; padding-left: 14px; position: relative; }
.course-rules li::before { content: ''; position: absolute; left: 0; top: 0.5em; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }
.course-go { align-self: center; padding: 13px 26px !important; font-size: 1.05rem !important; }
.bt-slot { flex-direction: column; align-items: center; gap: 4px; }
.bt-slot-label { font-family: var(--font-title); font-size: 0.8rem; color: var(--cream); text-shadow: 0 2px 0 var(--outline); }
.bt-card-art { display: flex; align-items: center; justify-content: center; }
.bt-card-initial { font-family: var(--font-title); font-size: 1.8rem; color: var(--rc, var(--paper-ink)); text-shadow: 0 2px 0 var(--outline); }
.bt-card-art:not(:has(img))::after { content: attr(data-initial); font-family: var(--font-title); font-size: 1.8rem; color: var(--paper-ink); }
.hub-tabs { flex-shrink: 0; flex-wrap: nowrap; overflow: visible; padding: 2px 0 6px !important; margin: 0 !important; }
.hub-tabs .cat-tab { padding: 7px 14px !important; }
.hub-prestiges, .hub-ranks { flex-shrink: 0; }
.pr-item:not(.is-done) .trophy-icon { filter: grayscale(0.5) brightness(0.9); opacity: 0.75; }

/* ═══════════════════════════════════════════════════════════
   ULTIMATE COMPTOIR
   ═══════════════════════════════════════════════════════════ */
.ut-stats { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 6px; flex-shrink: 0; }
.ut-stat { display: flex; flex-direction: column; align-items: center; padding: 4px 6px; background: #1a110a; border: 2px solid var(--outline); border-radius: 10px; }
.ut-stat span { font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); }
.ut-stat strong { font-family: var(--font-title); font-weight: 400; font-size: 1.35rem; color: var(--gold); text-shadow: 0 2px 0 var(--outline); }
.ut-stat strong.is-good { color: #5ef09a; } .ut-stat strong.is-mid { color: #ffb31a; } .ut-stat strong.is-bad { color: #ff7a6e; }
.ut-auto { padding: 6px 14px !important; font-size: 0.85rem !important; }

.ut-pitch {
  position: relative;
  flex: 1; min-height: 260px;
  background:
    repeating-linear-gradient(180deg, rgba(255,255,255,0.05) 0 10%, transparent 10% 20%),
    radial-gradient(ellipse at 50% 50%, #23935a, #126436 75%);
  border: 6px solid #5a3519; border-radius: 16px;
  box-shadow: 0 0 0 3px var(--outline), inset 0 0 0 2px rgba(255,255,255,0.35), inset 0 0 40px rgba(0,0,0,0.35);
  overflow: hidden;
}
.ut-pitch::before { content: ''; position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 2px solid rgba(255,255,255,0.35); border-radius: 50%; }
.ut-pitch::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid rgba(255,255,255,0.35); }
.ut-links { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.ut-link { stroke-width: 1.1; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.ut-link { stroke-width: 4px; }
.ut-link-green { stroke: #4fe08c; filter: drop-shadow(0 0 3px rgba(79,224,140,0.8)); }
.ut-link-orange { stroke: #ffb31a; }
.ut-link-red { stroke: #ff4d42; stroke-dasharray: 5 5; opacity: 0.75; }

.ut-chip {
  position: absolute; z-index: 2;
  transform: translate(-50%, -50%);
  width: clamp(54px, 15vw, 82px);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: none; border: none; padding: 0; cursor: pointer;
}
.ut-chip-photo {
  position: relative;
  width: clamp(40px, 11vw, 60px); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #fffaf0, var(--cream-2));
  border: 3px solid var(--outline);
  box-shadow: 0 0 0 2px var(--rc, var(--gold)), 0 3px 0 2px var(--outline);
  overflow: visible;
}
.ut-chip-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; border-radius: 50%; }
.ut-chip.is-quartier .ut-chip-photo { background: repeating-linear-gradient(45deg, #5a4a3a 0 4px, #4a3a2a 4px 8px); box-shadow: 0 0 0 2px #8a7358, 0 3px 0 2px var(--outline); }
.ut-chip-ovr {
  position: absolute; left: -6px; top: -6px;
  min-width: 24px; padding: 1px 4px 0;
  font-family: var(--font-title); font-size: 0.75rem; color: var(--outline);
  background: var(--gold); border: 2px solid var(--outline); border-radius: 6px;
}
.ut-chip-name {
  max-width: 100%;
  padding: 1px 5px 0;
  font-size: 0.6rem; font-weight: 800; color: var(--paper-ink);
  background: var(--cream); border: 2px solid var(--outline); border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ut-chip-meta { display: flex; gap: 3px; align-items: center; font-size: 0.55rem; font-weight: 800; }
.ut-pos { color: var(--cream); background: var(--outline); border-radius: 3px; padding: 0 3px; }
.ut-pos.is-out { background: #b8211b; }
.ut-chem { color: #5ef09a; letter-spacing: -1px; text-shadow: 0 1px 0 var(--outline); }
.ut-chip:active .ut-chip-photo { transform: scale(0.94); }

.ut-picker { position: absolute; inset: -4px; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgba(12,7,4,0.7); }
.ut-picker-card {
  width: min(560px, 100%); max-height: 82%;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 3px solid var(--outline); border-radius: 18px 18px 12px 12px;
  animation: po-pop 0.25s ease-out;
}
.ut-picker-head { display: flex; align-items: center; justify-content: space-between; }
.ut-picker-head strong { font-family: var(--font-title); font-weight: 400; font-size: 1.2rem; color: var(--gold); text-shadow: 0 2px 0 var(--outline); }
.ut-picker-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; }
.ut-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px; text-align: left; color: var(--cream);
  background: #1a110a; border: 2px solid var(--outline); border-left: 6px solid var(--rc, #8a7358); border-radius: 10px; cursor: pointer;
}
.ut-pick.is-current { box-shadow: inset 0 0 0 2px var(--gold); }
.ut-pick-ovr { font-family: var(--font-title); font-size: 1.2rem; color: var(--gold); min-width: 30px; text-align: center; }
.ut-pick-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ut-pick-info strong { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ut-pick-info span { font-size: 0.68rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ut-pick-chem { display: flex; flex-direction: column; align-items: flex-end; font-size: 0.7rem; }
.ut-pick-chem em { font-style: normal; font-weight: 800; }
.ut-pick-chem em.is-up { color: #5ef09a; } .ut-pick-chem em.is-down { color: #ff7a6e; }

/* Match */
.ut-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 8px 10px; background: #1a110a; border: 2px solid var(--outline); border-radius: 12px; flex-shrink: 0; }
.ut-team { display: flex; flex-direction: column; min-width: 0; }
.ut-team strong { font-family: var(--font-title); font-weight: 400; font-size: 0.95rem; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ut-team span { font-size: 0.65rem; color: var(--text-muted); }
.ut-team-ai { text-align: right; }
.ut-board { display: flex; align-items: center; gap: 8px; font-family: var(--font-title); font-size: 2rem; color: var(--gold); text-shadow: var(--small-shadow); }
.ut-board em { font-style: normal; font-size: 0.8rem; color: var(--cream); background: var(--tabac); border: 2px solid var(--outline); border-radius: 6px; padding: 2px 6px 0; text-shadow: none; }
.ut-feed { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding: 8px; background: var(--grain), radial-gradient(ellipse at 50% 30%, #1f8a50, #0f4229); border: 5px solid #5a3519; border-radius: 14px; box-shadow: 0 0 0 3px var(--outline); }
.ut-event { display: flex; gap: 8px; align-items: baseline; padding: 6px 8px; background: rgba(0,0,0,0.35); border-radius: 8px; font-size: 0.82rem; color: var(--cream); animation: po-pop 0.25s ease-out; }
.ut-event em { font-style: normal; font-family: var(--font-title); color: var(--gold); min-width: 28px; }
.ut-event.is-goal { background: rgba(63,207,122,0.35); box-shadow: inset 0 0 0 2px #4fe08c; }
.ut-event.is-goal-ai { background: rgba(226,50,43,0.35); box-shadow: inset 0 0 0 2px #ff5a4f; }
.mg-ut .ut-pitch { width: min(100%, 620px); align-self: center; }
.mg-ut .ut-stats, .mg-ut .ut-score { width: min(100%, 620px); align-self: center; }

/* Aide / règles */
.hub { padding-bottom: 12px; }
.hub-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-left: 8px; vertical-align: 2px;
  font-family: var(--font-title); font-size: 0.85rem; color: var(--outline); text-shadow: none;
  background: linear-gradient(180deg, #ffe07a, var(--gold)); border: 2px solid var(--outline); border-radius: 50%;
}
.mg-help {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  font-family: var(--font-title); font-size: 1.15rem; color: var(--outline);
  background: linear-gradient(180deg, #ffe07a, var(--gold)); border: 3px solid var(--outline);
  box-shadow: 0 3px 0 var(--outline); cursor: pointer;
}
.mg-rules { position: absolute; inset: -4px; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 10px; background: rgba(12,7,4,0.78); }
.mg-rules-card {
  width: min(460px, 100%); max-height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px; padding: 14px 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 3px solid var(--outline); border-radius: 16px;
  box-shadow: inset 0 0 0 2px var(--line-lit), 0 6px 0 var(--outline); animation: po-pop 0.25s ease-out;
}
.mg-rules-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mg-rules-head strong { font-family: var(--font-title); font-weight: 400; font-size: 1.1rem; color: var(--gold); text-shadow: 0 2px 0 var(--outline); }
.mg-rules ol { display: flex; flex-direction: column; gap: 8px; padding-left: 20px; }
.mg-rules li { font-size: 0.86rem; line-height: 1.45; color: var(--cream); }
.mg-rules li::marker { color: var(--gold); font-weight: 800; }
.mg-rules b { color: var(--gold); }
.mg-rules b.r-green { color: #4fe08c; } .mg-rules b.r-orange { color: #ffb31a; } .mg-rules b.r-red { color: #ff6a5c; }
#multi-content > .mg-rules { position: fixed; inset: 0; z-index: 3000; }

/* Quiz */
.qz-timer { height: 10px; flex-shrink: 0; background: #140c07; border: 2px solid var(--outline); border-radius: 6px; overflow: hidden; }
.qz-timer-fill { height: 100%; width: 100%; transform-origin: left; background: linear-gradient(90deg, #ff5a4f, var(--gold)); animation: qz-time linear forwards; }
@keyframes qz-time { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.qz-photo {
  position: relative; flex: 1; min-height: 140px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #fffaf0, var(--cream) 60%, var(--cream-2));
  border: 4px solid var(--outline); border-radius: 16px;
  box-shadow: inset 0 0 0 4px var(--rc, var(--gold)), 0 5px 0 var(--outline);
  overflow: hidden;
}
.qz-photo img { max-width: 92%; max-height: 92%; object-fit: contain; }
.qz-cat { position: absolute; top: 8px; left: 8px; font-family: var(--font-title); font-size: 0.75rem; color: #fff; background: var(--outline); border-radius: 6px; padding: 3px 8px 1px; }
.qz-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; flex-shrink: 0; }
.qz-choice {
  min-height: 52px; padding: 8px 10px;
  font-weight: 800; font-size: 0.85rem; line-height: 1.2; color: var(--cream);
  background: linear-gradient(180deg, var(--panel-3), var(--panel-2)); border: 3px solid var(--outline); border-radius: 12px;
  box-shadow: inset 0 2px 0 rgba(255,236,200,0.12), 0 4px 0 var(--outline); cursor: pointer;
}
.qz-choice:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--outline); }
.qz-choice.is-good { background: linear-gradient(180deg, #4fe08c, #1f9d55); color: var(--outline); }
.qz-choice.is-bad { background: linear-gradient(180deg, #ff5a4f, #b8211b); }
.qz-choice:disabled { cursor: default; }

/* Classements en ligne */
.hub-footer { grid-template-columns: repeat(3, 1fr) !important; }
@media (max-width: 520px) { .hub-footer { grid-template-columns: 1fr 1fr !important; } .hub-footer .btn-empire:first-child { grid-column: 1 / -1; } }
.bd-list { display: flex; flex-direction: column; gap: 5px; }
.bd-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: #1a110a; border: 2px solid var(--outline); border-radius: 10px; }
.bd-row.is-me { background: linear-gradient(90deg, rgba(255,196,58,0.22), #1a110a 70%); box-shadow: inset 0 0 0 2px var(--gold); }
.bd-pos { min-width: 28px; text-align: center; font-family: var(--font-title); font-size: 1rem; color: var(--text-muted); }
.bd-pos.bd-gold { color: #ffc43a; } .bd-pos.bd-silver { color: #d6dde5; } .bd-pos.bd-bronze { color: #cd8b4a; }
.bd-avatar { width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; background: var(--panel-3); border: 2px solid var(--outline); }
.bd-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bd-avatar b { font-family: var(--font-title); color: var(--gold); font-weight: 400; }
.bd-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bd-name strong { font-size: 0.88rem; color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-name em { font-style: normal; font-size: 0.68rem; color: var(--text-muted); }
.bd-val { display: flex; align-items: center; gap: 6px; font-family: var(--font-title); font-size: 0.9rem; color: var(--gold); white-space: nowrap; }
.mg-unranked { font-size: 0.78rem; line-height: 1.4; text-align: center; color: #ffb08a; background: rgba(226,50,43,0.15); border: 2px solid var(--outline); border-radius: 10px; padding: 8px 10px; }
.top-sync { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--outline); background: #4fe08c; align-self: center; flex-shrink: 0; }
.top-sync[data-state="offline"] { background: #ff9d1c; animation: po-pop 1s infinite alternate; }

/* ── Parties en ligne ── */
.on-modes { display: flex; flex-direction: column; gap: 12px; flex: 1; justify-content: center; max-width: 520px; width: 100%; margin: 0 auto; }
.on-mode {
  display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px;
  background: linear-gradient(180deg, var(--panel-2, #3a2514), var(--panel-3, #2b1a0e)); color: var(--cream);
  border: 3px solid var(--outline); border-radius: 14px; box-shadow: 0 4px 0 var(--outline); cursor: pointer;
}
.on-mode strong { font-family: var(--font-title); font-weight: 400; font-size: 1.15rem; color: var(--gold); }
.on-mode span { font-size: 0.82rem; color: var(--text-muted); }
.on-mode:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--outline); }
.on-mode:disabled { opacity: 0.5; cursor: not-allowed; }
.on-mode-resume { border-color: var(--gold); }
.on-searching { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.on-searching strong { font-family: var(--font-title); font-weight: 400; font-size: 1.2rem; color: var(--gold); }
.on-spinner { width: 54px; height: 54px; border: 6px solid var(--outline); border-top-color: var(--gold); border-radius: 50%; animation: on-spin 0.9s linear infinite; }
@keyframes on-spin { to { transform: rotate(360deg); } }
.on-board .mg-score-side { align-items: center; }
.on-board .bd-avatar { width: 30px; height: 30px; }
.on-time { font-family: var(--font-title); color: var(--cream); }
.qz-choice.is-picked { background: linear-gradient(180deg, #ffd45a, #d99a12); color: var(--outline); }
.on-search-hidden { display: none; }

/* ── Profil : onglets, amis, clans ── */
.prof-inner { display: flex; flex-direction: column; gap: 8px; }
.prof-tabs { flex-shrink: 0; }
.tab-badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 1px 5px; border-radius: 9px; background: var(--tabac, #e2322b); color: #fff; font-size: 0.7rem; line-height: 1.3; text-align: center; }
.soc-add { display: flex; gap: 6px; margin-bottom: 6px; }
.soc-add .game-input { flex: 1; min-width: 0; padding: 9px 10px; font-size: 16px; }
.soc-add .soc-tag { flex: 0 0 74px; text-transform: uppercase; text-align: center; }
.soc-add .btn-empire { flex-shrink: 0; padding: 8px 14px !important; }
.soc-msg { font-size: 0.8rem; color: #5ef09a; margin: 0 0 6px; }
.soc-msg.is-error { color: #ff7a6e; }
.soc-code { font-size: 0.82rem; color: var(--text-muted); margin: 0 0 6px; }
.soc-code strong { color: var(--gold); font-family: var(--font-title); font-weight: 400; letter-spacing: 1px; }
.soc-list h4 { font-family: var(--font-title); font-weight: 400; color: var(--cream); margin: 10px 0 6px; font-size: 0.95rem; }
.soc-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 6px; background: var(--panel-2, #3a2514); border: 2px solid var(--outline); border-radius: 12px; }
.soc-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.soc-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--cream); }
.soc-name em { font-style: normal; font-size: 0.75rem; color: var(--text-muted); }
.soc-btn { padding: 6px 10px !important; font-size: 0.8rem !important; flex-shrink: 0; }
.soc-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #6b5a48; }
.soc-dot.on { background: #4fe08c; }
.soc-empty { color: var(--text-muted); font-size: 0.85rem; text-align: center; padding: 8px; }
.soc-pos { width: 24px; text-align: center; font-family: var(--font-title); color: var(--gold); }
.soc-tagbadge { flex-shrink: 0; padding: 3px 8px 1px; border: 2px solid var(--outline); border-radius: 8px; background: var(--gold); color: var(--outline); font-family: var(--font-title); font-size: 0.85rem; }
.soc-tagbadge-lg { font-size: 1.3rem; padding: 6px 12px 3px; }
.soc-clan-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.soc-clan-head strong { display: block; font-family: var(--font-title); font-weight: 400; font-size: 1.15rem; color: var(--cream); }
.soc-clan-head em { font-style: normal; font-size: 0.78rem; color: var(--text-muted); }
.soc-descr { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 8px; }
.soc-wide { display: block; width: 100%; margin-top: 8px; }
.soc-modal { position: fixed; inset: 0; z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.7); }
.soc-modal-card { width: 100%; max-width: 340px; padding: 18px; text-align: center; background: var(--panel-2, #3a2514); border: 3px solid var(--outline); border-radius: 16px; box-shadow: 0 6px 0 var(--outline); }
.soc-modal-card h3 { font-family: var(--font-title); font-weight: 400; color: var(--gold); margin: 0 0 8px; }
.soc-modal-card .on-spinner { margin: 12px auto; }

/* ── Recadrage de la photo ── */
.crop-overlay { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0, 0, 0, 0.8); }
.crop-card { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px; background: var(--panel-2, #3a2514); border: 3px solid var(--outline); border-radius: 16px; }
.crop-card strong { font-family: var(--font-title); font-weight: 400; color: var(--gold); font-size: 1.2rem; }
.crop-card p { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.crop-stage { position: relative; width: 256px; height: 256px; max-width: 70vw; max-height: 70vw; }
.crop-stage canvas { width: 100%; height: 100%; display: block; border-radius: 50%; border: 3px solid var(--outline); touch-action: none; cursor: grab; background: #fff; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 3px var(--gold); pointer-events: none; }
.crop-zoom { width: 80%; }
.crop-actions { display: flex; gap: 8px; width: 100%; }
.crop-actions .btn-empire { flex: 1; }

/* ── Réglages ── */
.set-inner { display: flex; flex-direction: column; gap: 10px; max-width: 560px !important; }
.set-card, .set-inner .security-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: var(--panel-2, #3a2514); border: 2px solid var(--outline); border-radius: 12px; }
.set-card strong { color: var(--cream); }
.set-card .sec-desc { margin: 2px 0 0; font-size: 0.78rem; color: var(--text-muted); }
.set-danger { border-color: #7a2a22; }
.set-legal { font-size: 0.72rem; color: var(--text-muted); text-align: center; margin: 6px 0 0; }
.set-card > div { min-width: 0; flex: 1; }
.set-card button, .set-card .btn-danger { flex: 0 0 auto; width: auto; margin: 0; }

/* Case anti-robots */
.ts-box { display: flex; justify-content: center; min-height: 0; margin: 4px 0; }

/* ── Fenêtres de dialogue du jeu ── */
.dlg-modal { z-index: 9800; }
.dlg-card h3 { margin-bottom: 6px; }
.dlg-text { margin: 0 0 12px; font-size: 0.9rem; line-height: 1.4; color: var(--cream); }
.dlg-input { width: 100%; margin: 0 0 12px; font-size: 16px; }
.dlg-actions { display: flex; gap: 8px; }
.dlg-actions .btn-empire { flex: 1; padding: 10px 8px !important; }
.btn-empire-danger { background: linear-gradient(180deg, #ff6a5e, #c4271f) !important; color: #fff !important; }

.tab-block { z-index: 9900; background: rgba(10, 6, 2, 0.92); }

/* Bouton amis de la barre du haut */
.top-friends { position: relative; color: var(--cream); }
.top-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; padding: 1px 5px; border-radius: 9px; background: var(--tabac, #e2322b); border: 2px solid var(--outline); color: #fff; font-size: 0.68rem; line-height: 1.2; text-align: center; }
@media (max-width: 600px) { #top-bar .top-right { gap: 5px; } #top-bar .top-right .btn-icon { width: 36px; height: 36px; } }

.auth-hint { margin: 8px 0 0; font-size: 0.78rem; text-align: center; color: var(--text-muted); }
@media (max-width: 440px) {
  #top-bar { padding: 6px 6px; gap: 4px; }
  #top-bar .top-center { gap: 4px; min-width: 0; flex: 1; justify-content: center; }
  #top-bar .resource-pill { white-space: nowrap; font-size: 0.68rem; padding: 3px 6px 3px 5px; gap: 4px; min-width: 0; }
  #top-bar .top-profile-btn { flex-shrink: 0; }
  #top-bar .top-right { flex-shrink: 0; gap: 4px; }
  #top-bar .top-right .btn-icon { width: 34px; height: 34px; }
}

/* ── L'Empire : les emplacements des cartes étaient écrasés (hauteur de ligne trop petite) ── */
#page-empire > .empire-inventory-page { flex: 1; align-self: stretch; height: auto; display: flex; flex-direction: column; min-height: 0; padding-bottom: 8px !important; }
#page-empire .empire-level-display { flex-shrink: 0; }
#empire-rooms-container { grid-auto-rows: max-content; flex: 1 1 auto; min-height: 0; padding: 2px 12px 12px !important; }
.empire-location { min-height: min-content; }

/* ── Course en ligne : salon et pistes ── */
.cr-lobby { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; text-align: center; }
.cr-big { font-family: var(--font-title); font-weight: 400; font-size: 1.5rem; color: var(--gold); text-shadow: 0 2px 0 var(--outline); }
.cr-lane { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--cream); }
.cr-lane > span { width: 84px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-track { flex: 1; height: 14px; background: #140c07; border: 2px solid var(--outline); border-radius: 8px; overflow: hidden; }
.cr-track i { display: block; height: 100%; background: linear-gradient(90deg, #ff5a4f, var(--gold)); transition: width 0.5s linear; }

/* ── Course : l'écran tient dans la zone de jeu (entre la barre du haut et celle du bas), le bouton Sprint reste visible ── */
#page-race { position: absolute; inset: 0; z-index: 5; }
#page-race .pmu-arena { height: 100%; }

/* L'Empire : bandeau du revenu passif et du placement auto */
.empire-auto-bar { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 3px solid var(--outline); border-radius: 14px; }
.empire-auto-bar strong { display: block; font-family: var(--font-title); font-weight: 400; font-size: 1.25rem; color: var(--gold); }
.empire-auto-bar span { font-size: 0.75rem; color: var(--text-muted); }
.empire-auto-bar .btn-empire { flex-shrink: 0; padding: 8px 12px !important; font-size: 0.8rem !important; }
.empire-auto-bar > div { min-width: 0; }
.empire-auto-bar strong { font-size: 1.15rem; white-space: nowrap; }
@media (max-width: 480px) { .empire-auto-bar span { display: none; } .empire-auto-bar { padding: 8px 12px; } }

.clicker-income-pill.is-paused { opacity: 0.55; }

/* ── Chat ── */
.chat-modal { z-index: 9100; }
.chat-card { max-width: 440px; height: min(560px, 86vh); display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 12px; }
.chat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-title { font-family: var(--font-title); font-weight: 400; font-size: 1.15rem; color: var(--gold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-close { background: transparent; border: 0; color: var(--cream); font-size: 1.1rem; cursor: pointer; padding: 4px 8px; }
.chat-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: #140c07; border: 2px solid var(--outline); border-radius: 10px; overscroll-behavior: contain; }
.chat-empty { margin: auto; color: var(--text-muted); font-size: 0.85rem; text-align: center; }
.chat-msg { max-width: 88%; padding: 6px 10px; border-radius: 10px; background: var(--panel-3, #2b1a0e); align-self: flex-start; }
.chat-msg.is-mine { align-self: flex-end; background: #5a3a14; }
.chat-head { display: flex; gap: 8px; align-items: baseline; font-size: 0.7rem; color: var(--text-muted); }
.chat-head strong { color: var(--gold); font-weight: 500; }
.chat-report { margin-left: auto; background: transparent; border: 0; color: var(--text-muted); cursor: pointer; font-size: 0.75rem; opacity: 0.6; }
.chat-report:hover { opacity: 1; color: #ff7a6e; }
.chat-body { font-size: 0.9rem; line-height: 1.35; word-break: break-word; white-space: pre-wrap; color: var(--cream); }
.chat-note { min-height: 1em; margin: 0; font-size: 0.75rem; color: #ff7a6e; }
.chat-form { display: flex; gap: 6px; }
.chat-form .game-input { flex: 1; min-width: 0; font-size: 16px; padding: 9px 10px; }
.chat-form .btn-empire { flex-shrink: 0; padding: 8px 12px !important; }
.chat-dot { display: inline-block; min-width: 16px; margin-left: 4px; padding: 0 5px; border-radius: 8px; background: var(--tabac, #e2322b); color: #fff; font-size: 0.68rem; text-align: center; }

.auth-accept { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; font-size: 0.78rem; line-height: 1.35; color: var(--text-muted); text-align: left; cursor: pointer; }
.auth-accept input { margin-top: 2px; flex-shrink: 0; }
.auth-accept a, .auth-legal a, .set-legal a, .age-legal a { color: var(--gold); }

/* ── Casino sur téléphone : en-tête compact, mains lisibles, roulette sans coupure ── */
@media (max-width: 640px) {
  #page-casino .casino-header-dashboard { padding: 4px 8px !important; min-height: 0 !important; }
  #page-casino .casino-balance-val { font-size: 1rem !important; }
  #page-casino .casino-tabs-european .cas-tab { padding: 6px 4px !important; }
  .bj-hand-score.is-empty { display: none; }
  .bj-spot-pos { display: none; }
  /* avant la donne : mains compactes (pas de grande zone vide), on garde mises et side bets */
  #page-casino .bj-spots-container:not(.is-dealing) .bj-spot-cards-zone { display: none !important; }
  #page-casino .bj-spots-container:not(.is-dealing) { flex: 0 0 auto; align-content: start; margin-top: 8px !important; }
  #page-casino .bj-spots-container:not(.is-dealing) .bj-spot { min-height: 0; }
  #page-casino .bj-spot-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  #page-casino .bj-dealer-area .bj-cards-row { min-height: 56px; }
  /* pendant la donne : cartes plus grandes quand il y a peu de mains */
  #page-casino .bj-spots-container.is-dealing[style*="--n:1"] .bj-card { width: 54px !important; height: 78px !important; }
  #page-casino .bj-spots-container.is-dealing[style*="--n:1"] .bj-cards-row.bj-cards-fan .bj-card { margin-left: -26px; }
  /* roulette : roue plus petite, tapis qui occupe la place */
  #page-casino .roulette-wheel-box, #page-casino #roulette-wheel-canvas { width: 76px !important; height: 76px !important; }
  #page-casino .roulette-top-stage { gap: 10px; }
  #page-casino .roulette-special-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #page-casino .roulette-special-bar::-webkit-scrollbar { display: none; }
  #page-casino .roulette-special-bar .btn-empire { flex: 0 0 auto; padding: 4px 10px !important; font-size: 0.72rem !important; }
}
/* Petits téléphones (hauteur ≤ 700 px) : on gagne de la place pour voir tout le tapis / toute la table */
@media (max-width: 640px) and (max-height: 700px) {
  #page-casino .roulette-wheel-box, #page-casino #roulette-wheel-canvas { width: 46px !important; height: 46px !important; }
  #page-casino .roulette-wheel-box .wheel-pointer { transform: scale(0.6); }
  #page-casino .roulette-top-stage { min-height: 0 !important; }
  #page-casino .roulette-history .text-dim, #page-casino .roulette-history > span { display: none; }
  #page-casino .casino-chip { width: 34px !important; height: 34px !important; font-size: 0.55rem !important; }
  #page-casino .bj-dealer-area .bj-card-placeholder { display: none; }
  #page-casino .bj-dealer-area .bj-cards-row { min-height: 0; }
  #page-casino .bj-spots-container:not(.is-dealing) { margin-top: 2px !important; }
}
@media (max-width: 640px) {
  #page-casino .bj-spots-container:not(.is-dealing) { align-content: center; }
}

/* ── Profil public, vitrine, demandes de clan ── */
.soc-click{cursor:pointer}
.pp-card{max-height:86vh;overflow-y:auto;width:min(460px,94vw)}
.pp-head{display:flex;gap:12px;align-items:center;margin-bottom:8px}
.pp-avatar{width:64px;height:64px;border-radius:50%;border:3px solid var(--outline);object-fit:cover;flex:none;background:var(--cream)}
.pp-avatar-letter{display:flex;align-items:center;justify-content:center;font-family:'Cendrier',sans-serif;font-size:1.8rem;color:var(--outline)}
.pp-id h3{margin:0;font-family:'Cendrier',sans-serif}
.pp-id p{margin:2px 0;font-size:.85rem}
.pp-since{opacity:.7}
.pp-bio{font-style:italic;margin:6px 0;word-break:break-word}
.pp-ranks{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.pp-rank{display:flex;flex-direction:column;border:2px solid var(--outline);border-radius:8px;padding:5px 8px;background:var(--cream);color:var(--outline);font-size:.8rem}
.pp-rank em{opacity:.7;font-style:normal}
.pp-actions{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.sc-row{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.sc-tile{width:calc(33.3% - 4px);max-width:96px;border:2px solid var(--outline);border-radius:8px;background:var(--cream);overflow:hidden;display:flex;flex-direction:column}
.sc-tile.is-small{width:56px}
.sc-img{display:block;height:84px;background:#0002}
.sc-tile.is-small .sc-img{height:60px}
.sc-img img{width:100%;height:100%;object-fit:cover;display:block}
.sc-name{font-size:.62rem;line-height:1.1;padding:2px 3px;color:var(--outline);overflow:hidden;max-height:2.4em}
.sc-tile.is-small .sc-name{display:none}
.sc-head{display:flex;justify-content:space-between;align-items:center}
.sc-bio{font-style:italic;margin:4px 0;word-break:break-word}
.sc-list{max-height:30vh;overflow-y:auto;display:flex;flex-direction:column;gap:4px;margin:6px 0}
.sc-opt,.sc-pick{display:flex;gap:8px;align-items:center;text-align:left;background:transparent;border:2px solid var(--outline);border-radius:8px;padding:3px;cursor:pointer;color:inherit}
.sc-pick{padding:0;border:0}
.sc-opt.is-on{background:#e9c46a55;border-color:var(--gold)}
.sc-opt em{display:block;font-size:.7rem;opacity:.7;font-style:normal}
.sc-count{font-size:.8rem;opacity:.8}
.prof-showcase{border:3px solid var(--outline);border-radius:10px;background:var(--cream);color:var(--outline);padding:8px 10px;margin-bottom:8px}
@media (max-height:700px){.prof-showcase .sc-img{height:56px}.prof-showcase .sc-tile{max-width:64px}}

/* ── Rôles de clan et échanges ── */
.soc-role{font-family:var(--font-title);font-size:.72rem;padding:2px 7px;border-radius:8px;border:2px solid var(--outline);background:var(--cream);color:var(--outline);white-space:nowrap}
.soc-role-chef{background:var(--gold)}
.soc-role-colead{background:#e9a35b}
.soc-trade .soc-name em{white-space:normal}
.tr-pick{display:flex;gap:8px;margin:6px 0}
.tr-pick>div{flex:1;text-align:center;font-size:.8rem}
.tr-slot{min-height:76px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:2px dashed var(--outline);border-radius:8px;padding:4px}
.tr-name{font-size:.65rem;line-height:1.1}

/* Grille de cartes vide : le message prend toute la largeur */
.empty-state{grid-column:1/-1;width:100%;text-align:center;padding:24px 12px}

/* Historique du blackjack */
.bj-hist-list{max-height:55vh;overflow-y:auto;text-align:left;display:flex;flex-direction:column;gap:6px;margin:8px 0}
.bj-hist-row{border:2px solid var(--outline);border-radius:10px;padding:6px 8px;background:#0003;font-size:.78rem}
.bj-hist-row.win{border-color:#3fcf7a}.bj-hist-row.lose{border-color:#e2322b}
.bj-hist-top{display:flex;justify-content:space-between;gap:8px;margin-bottom:2px}
.bj-hist-cards{opacity:.9}.bj-hist-text{opacity:.65;font-size:.7rem;margin-top:2px}

/* Dernière manche affichée à la fin d'un match */
.lr-box{margin:10px auto 0;max-width:360px;border:2px solid var(--outline);border-radius:12px;padding:8px 10px;background:#0003}
.lr-title{font-family:var(--font-title);color:var(--gold);font-size:.9rem;text-align:center;margin-bottom:6px}
.lr-row{display:flex;gap:10px;justify-content:space-around}
.lr-side{display:flex;flex-direction:column;align-items:center;gap:3px;font-size:.8rem;text-align:center}
.lr-side em{opacity:.7;font-style:normal;font-size:.72rem}

/* Blackjack : 3 boutons secondaires sur une ligne */
.bj-secondary-actions { grid-template-columns: repeat(3, 1fr) !important; }

/* Collection : barre de recherche */
.inv-filter-bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.inv-filter-bar .inv-search{flex:1 1 140px;min-width:0;padding:8px 10px;border-radius:8px;font-size:.8rem}

/* Bourse : historique */
.hist-list{display:flex;flex-direction:column;gap:6px}
.hist-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 12px;border-radius:10px;border:2px solid var(--outline);background:#0003}
.hist-name{display:flex;flex-direction:column;min-width:0}
.hist-name strong{font-size:.85rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hist-name em{font-size:.7rem;opacity:.7;font-style:normal}
.hist-amt{font-family:var(--font-title);white-space:nowrap}
.hist-row.is-sold .hist-amt{color:#3fcf7a}.hist-row.is-bought .hist-amt{color:#ffb4a8}

/* Personnalisation : choix du rond de clic */
.pz-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:8px 0}
.pz-opt{display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px 4px;border:2px solid var(--outline);border-radius:10px;background:#0003;color:inherit;font-size:.68rem;line-height:1.1;cursor:pointer}
.pz-opt img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:8px;display:block;max-height:80px}
.pz-opt.is-on{border-color:var(--gold);background:#e9c46a33}
.pz-cards{max-height:26vh;overflow-y:auto}

.help-list{margin:4px 0 8px 18px;padding:0;font-size:.82rem;line-height:1.35}

/* Choix de cartes (Empire, cases de clic) : recherche + tri */
.pick-wrap{max-height:66vh;overflow-y:auto;overscroll-behavior:contain}
.pick-bar{display:flex;gap:6px;flex-wrap:wrap;position:sticky;top:0;z-index:2;padding:4px 0 6px;background:var(--panel-2,#3a2514)}
.pick-bar .pick-search{flex:1 1 140px;min-width:0;padding:8px 10px;border-radius:8px;font-size:.8rem}
.pick-bar select{flex:1 1 110px;min-width:0}
.pick-count{font-size:.72rem;opacity:.7;margin:0 0 6px}
.pick-more{width:100%;margin:10px 0 2px}

/* ── Poker (Ultimate Poker + tables) ── */
.casino-tabs-european{display:grid !important;grid-template-columns:repeat(4,1fr);gap:6px !important}
.casino-tabs-european .cas-tab{font-size:.74rem !important;padding:7px 3px !important;line-height:1.1}
@media (max-width:520px){.casino-tabs-european{grid-template-columns:repeat(2,1fr)}}
.pk-table{display:flex;flex-direction:column;gap:6px;padding:8px;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
.pk-table::-webkit-scrollbar{display:none}
.pk-zone{text-align:center}
.pk-label{font-size:.68rem;opacity:.8;text-transform:uppercase;letter-spacing:.04em;margin-bottom:2px}
.pk-row{display:flex;gap:5px;justify-content:center;flex-wrap:nowrap}
.pk-card{width:42px;height:60px;border-radius:6px;background:#fbf0d8;border:2px solid var(--outline);color:#111;display:flex;flex-direction:column;align-items:center;justify-content:center;font-family:var(--font-title);line-height:1;box-shadow:0 2px 0 var(--outline);flex:none}
.pk-card.is-red{color:#c0261a}
.pk-card .pk-r{font-size:1.05rem}.pk-card .pk-s{font-size:1.25rem}
.pk-card.pk-back{background:repeating-linear-gradient(45deg,#7a1f17,#7a1f17 5px,#a4362a 5px,#a4362a 10px);border-color:#120a04}
.pk-card.pk-empty{background:#0003;border:2px dashed #fff3;box-shadow:none}
.pk-card.pk-sm{width:26px;height:36px}
.pk-bets{display:flex;gap:10px;justify-content:center;font-size:.74rem;flex-wrap:wrap}
.pk-bets b{color:var(--gold)}
.pk-msg{min-height:1.3em;text-align:center;font-size:.82rem}
.pk-msg.win{color:#3fcf7a}.pk-msg.lose{color:#ff9b8f}.pk-msg.push{color:var(--gold)}
.pk-controls{display:flex;flex-direction:column;gap:6px;margin-top:2px}
.pk-actions{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.pk-actions .btn-primary,.pk-actions .btn-secondary{flex:1 1 90px;font-size:.8rem;padding:9px 6px}
.pk-main-btn{width:100%}
.pk-bets-row{display:flex;gap:6px}
.pk-mini{font-size:.7rem !important;padding:5px 8px !important}
.pk-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:.78rem}
.pk-pot{font-family:var(--font-title);color:var(--gold)}
.pk-seats{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.pk-seat{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;min-width:78px;padding:5px 6px;border:2px solid var(--outline);border-radius:10px;background:#0004;font-size:.7rem}
.pk-seat.is-turn,.pk-me.is-turn{border-color:var(--gold);box-shadow:0 0 0 2px #e9c46a66}
.pk-seat.is-folded{opacity:.45}
.pk-seat.pk-wait{font-style:italic;opacity:.8}
.pk-sname{font-weight:700;max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pk-sstack{opacity:.85}
.pk-scards{display:flex;gap:2px;min-height:36px}
.pk-sbet{position:absolute;top:-8px;right:-4px;background:var(--gold);color:var(--outline);border-radius:8px;padding:0 6px;font-size:.66rem;font-weight:800}
.pk-swin{color:#3fcf7a;font-weight:800}
.pk-btn{background:#fff;color:#111;border-radius:50%;font-style:normal;font-size:.6rem;padding:0 4px;margin-right:3px}
.pk-clock{font-family:var(--font-title);color:#ffb4a8;font-size:.72rem}
.pk-me{display:flex;align-items:center;justify-content:center;gap:12px;padding:6px;border:2px solid transparent;border-radius:12px}
.pk-mestack{position:relative;display:flex;flex-direction:column;gap:2px;font-size:.85rem}
.pk-raise{display:flex;flex-direction:column;gap:4px}
.pk-raise input[type=range]{width:100%}
.pk-presets{display:flex;gap:4px;justify-content:center}
.pk-wait-line,.pk-result{text-align:center;font-size:.8rem;opacity:.9}
.pk-result{color:var(--gold);font-weight:700}
.pk-lobby-head{display:flex;flex-direction:column;gap:2px;text-align:center}
.pk-lobby-head span{font-size:.72rem;opacity:.75}
.pk-create{display:flex;gap:6px;flex-wrap:wrap}
.pk-create input{flex:1 1 140px;min-width:0}
.pk-create select{flex:1 1 140px}
.pk-create .btn-primary{flex:1 1 100%}
.pk-list{display:flex;flex-direction:column;gap:6px;overflow-y:auto}
.pk-trow{display:flex;align-items:center;gap:8px;padding:7px 9px;border:2px solid var(--outline);border-radius:10px;background:#0004}
.pk-tname{display:flex;flex-direction:column;min-width:0;flex:1}
.pk-tname strong{font-size:.85rem}.pk-tname em{font-size:.66rem;opacity:.7;font-style:normal;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pk-tseats{font-size:.7rem;white-space:nowrap}
@media (min-width:700px){.pk-card{width:54px;height:76px}.pk-card .pk-r{font-size:1.25rem}.pk-card .pk-s{font-size:1.5rem}.pk-table{max-width:760px;margin:0 auto}}

/* ── Casino : menu des jeux ── */
#page-casino .casino-tabs-european{display:flex !important;align-items:center;gap:10px !important;grid-template-columns:none}
.cas-nav-title{font-family:var(--font-title);font-size:1rem;color:var(--gold)}
.cas-back{font-size:.8rem !important;padding:6px 10px !important}
.cas-lobby{display:flex;flex-direction:column;gap:12px;overflow-y:auto;overscroll-behavior:contain;max-height:100%;padding:2px 2px 10px;scrollbar-width:none}
.cas-lobby::-webkit-scrollbar{display:none}
.cas-group h3{font-family:var(--font-title);font-size:.95rem;color:var(--gold);margin:0 0 6px;text-transform:uppercase;letter-spacing:.04em}
.cas-tiles{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.cas-tile{display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 6px 9px;border:3px solid var(--outline);border-radius:14px;background:linear-gradient(180deg,#1f7a4a,#14532f);color:#fff;cursor:pointer;box-shadow:0 4px 0 var(--outline);text-align:center}
.cas-tile:active{transform:translateY(2px);box-shadow:0 2px 0 var(--outline)}
.cas-tile strong{font-family:var(--font-title);font-size:.88rem;line-height:1.1}
.cas-tile em{font-size:.66rem;opacity:.85;font-style:normal;line-height:1.15}
.cas-tile-art,.sl-tile-art{display:flex;justify-content:center;align-items:center;gap:2px;height:46px}
.cas-tile-art svg{height:46px;width:auto}
.sl-tile-art .sl-sym{width:34px;height:34px}
@media (min-width:700px){.cas-tiles{grid-template-columns:repeat(4,1fr)}.cas-lobby{max-width:900px;margin:0 auto}}

/* ── Machines à sous ── */
.sl-machine,.ig-table{display:flex;flex-direction:column;gap:8px;padding:8px;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
.sl-machine::-webkit-scrollbar,.ig-table::-webkit-scrollbar{display:none}
.sl-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.sl-head strong{font-family:var(--font-title);color:var(--gold);font-size:.95rem}
.ig-sub{font-size:.68rem;opacity:.8}
.sl-grid{display:flex;gap:4px;justify-content:center;padding:8px;border:3px solid var(--outline);border-radius:12px;background:#0a2a1a;box-shadow:inset 0 0 0 2px #ffc43a55}
.sl-col{display:flex;flex-direction:column;gap:4px}
.sl-grid{--cell:min(68px,calc((min(100vw,520px) - 74px) / var(--cols)))}
.sl-cell{width:var(--cell);height:var(--cell);border-radius:8px;background:#fbf0d8;border:2px solid var(--outline);display:flex;align-items:center;justify-content:center;padding:2px}
.sl-cascade .sl-grid{--cell:min(50px,calc((min(100vw,520px) - 74px) / var(--cols)))}
.sl-cascade .sl-cell{border-radius:6px}
.sl-sym{width:100%;height:100%;display:block}
.sl-col.is-spin .sl-cell{filter:blur(1.5px);background:#e8dcc0}
.sl-cell.is-win{background:#fff3b0;box-shadow:0 0 0 3px #ffc43a,0 0 12px #ffc43a;animation:slpulse .5s ease-in-out infinite alternate}
@keyframes slpulse{to{transform:scale(1.06)}}
.sl-win{min-height:1.4em;text-align:center;font-size:.85rem;opacity:.95}
.sl-win.is-ok{color:#3fcf7a;font-weight:700}
.sl-win.is-big{color:var(--gold);font-weight:800;font-size:1rem}
.sl-fs{padding:5px 8px;border:2px solid var(--gold);border-radius:10px;background:#ffc43a22;font-size:.74rem;text-align:center}
.sl-fs .sl-sym{display:inline-block;width:18px;height:18px;vertical-align:middle}
.sl-controls{display:flex;gap:8px;align-items:center;justify-content:space-between}
.sl-bet{display:flex;align-items:center;gap:6px}
.sl-bet .btn-secondary{padding:7px 12px;font-size:1rem}
.sl-bet span{display:flex;flex-direction:column;align-items:center;min-width:64px;line-height:1.1}
.sl-bet small{font-size:.6rem;opacity:.7;text-transform:uppercase}
.sl-bet b{font-family:var(--font-title);color:var(--gold);font-size:.9rem}
.sl-spin{flex:1;font-size:1rem;padding:12px 8px}
.sl-side{display:flex;flex-direction:column;gap:4px}
.sl-pt-row{display:flex;align-items:center;gap:10px;padding:4px 0;border-bottom:1px solid #fff2}
.sl-pt-row .sl-sym{width:34px;height:34px;flex:none}
.sl-pt-vals{display:flex;gap:10px;flex-wrap:wrap;font-size:.78rem}

/* ── Instantanés ── */
.ig-ticket{border:3px solid var(--outline);border-radius:14px;padding:10px;background:linear-gradient(160deg,#ffc43a,#e9a31f);color:var(--outline);text-align:center}
.ig-ticket-title{font-family:var(--font-title);font-size:1.1rem;margin-bottom:6px}
.ig-ticket-note{font-size:.8rem;opacity:.8;padding:22px 0}
.ig-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;max-width:260px;margin:0 auto}
.ig-cell{aspect-ratio:1;border:3px solid var(--outline);border-radius:10px;background:repeating-linear-gradient(45deg,#9b9b9b,#9b9b9b 6px,#bdbdbd 6px,#bdbdbd 12px);font-family:var(--font-title);font-size:.8rem;color:var(--outline);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:2px}
.ig-cell.is-open{background:#fbf0d8;cursor:default}
.ig-cell.is-hit{background:#fff3b0;box-shadow:0 0 0 3px #3fcf7a}
.ig-prices{display:flex;gap:6px;flex-wrap:wrap;justify-content:center}
.ig-prices .btn-secondary{padding:6px 10px;font-size:.78rem}.ig-prices .active{background:var(--gold);color:var(--outline)}
.ig-small{font-size:.68rem;opacity:.7;text-align:center;margin:0}
.ig-screen{position:relative;border:3px solid var(--outline);border-radius:12px;background:#0a2a1a;overflow:hidden}
.ig-screen canvas{width:100%;height:130px;display:block}
.ig-mult{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--font-title);font-size:2.6rem;color:#fff;text-shadow:0 3px 0 var(--outline)}
.ig-screen.crashed .ig-mult{color:#ff6a5c}.ig-screen.cashed .ig-mult{color:#3fcf7a}
.ig-hist{display:flex;gap:4px;flex-wrap:wrap;min-height:20px}
.ig-hist span{font-size:.66rem;padding:1px 6px;border-radius:8px;border:2px solid var(--outline)}
.ig-hist .hi{background:#3fcf7a;color:var(--outline)}.ig-hist .lo{background:#e2322b55}

/* ── Arbre de talents en cercle ── */
#talents-content .gow-tree-scroll{overflow:auto;overscroll-behavior:contain;border-radius:16px;border:2px solid #32261d;min-height:0;max-height:100%;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
#talents-content .gow-radial{width:1560px !important;height:1560px !important;max-width:none !important;flex:none;border:0 !important;border-radius:0 !important;
  background:radial-gradient(circle at 50% 50%,rgba(245,158,11,.16) 0%,rgba(239,68,68,.08) 18%,transparent 52%),linear-gradient(180deg,#130e0a,#0a0806) !important}
#talents-content .gow-radial .gow-diamond-outer{transform:rotate(45deg) scale(.78) !important}
#talents-content .gow-radial .gow-ribbon-banner{display:none}
#talents-content .gow-radial .gow-ring{fill:none;stroke:#ffffff10;stroke-width:.25;vector-effect:non-scaling-stroke;stroke-width:1px}
@media (max-width:600px){#talents-content .gow-radial{width:1400px !important;height:1400px !important}}
#talents-content .gow-radial .gow-line-channel{vector-effect:non-scaling-stroke;stroke-width:9px !important}
#talents-content .gow-radial .gow-line-lit{vector-effect:non-scaling-stroke;stroke-width:4px !important}
#talents-content .gow-tree-wrapper{grid-template-rows:auto minmax(150px,1fr) auto !important;height:100%;max-height:100%}
@media (max-width:600px){#talents-content .gow-inspector-panel{flex-wrap:wrap;gap:6px !important;padding:8px 10px !important}#talents-content .gow-inspect-lore{display:none}#talents-content .gow-inspector-left{display:none}}
@media (max-width:600px){
  #talents-content .gow-inspector-panel{display:grid !important;grid-template-columns:1fr auto;align-items:center}
  #talents-content .gow-inspector-center{grid-column:1}
  #talents-content .gow-inspector-right{grid-column:2;display:flex;flex-direction:column;gap:4px;align-items:stretch}
  #talents-content .gow-inspect-title{font-size:1rem !important;margin:0 !important}
  #talents-content .gow-inspect-desc{font-size:.74rem !important;margin:2px 0 0 !important}
  #talents-content .gow-inspect-tier{font-size:.6rem !important}
  #talents-content .gow-inspect-cost-label{font-size:.68rem !important;text-align:center}
  #talents-content .btn-gow-action{padding:7px 10px !important;font-size:.78rem !important;white-space:nowrap}
  #talents-content .gow-unlocked-title{display:none}
  #talents-content .gow-tree-top-bar{padding:6px 10px !important}
}
@media (max-width:600px){#talents-content .gow-inspector-panel{grid-template-columns:minmax(0,1fr) auto !important;overflow:hidden}#talents-content .btn-gow-action{font-size:.68rem !important;padding:6px 6px !important;letter-spacing:0 !important}}

/* ── Quêtes du jour ── */
.clicker-quest-btn{position:relative;font-family:var(--font-title);font-size:.8rem;padding:6px 10px;border:3px solid var(--outline);border-radius:12px;background:var(--gold);color:var(--outline);cursor:pointer;box-shadow:0 3px 0 var(--outline);align-self:center}
.quest-dot{position:absolute;top:-7px;right:-7px;min-width:18px;height:18px;border-radius:9px;background:#e2322b;color:#fff;font-style:normal;font-size:.68rem;display:flex;align-items:center;justify-content:center;border:2px solid var(--outline);padding:0 3px}
.quest-dot.hidden{display:none}
.quest-list{display:flex;flex-direction:column;gap:8px;margin:8px 0;text-align:left}
.quest-row{border:2px solid var(--outline);border-radius:12px;padding:8px 10px;background:#0003}
.quest-row.is-done{border-color:#3fcf7a}.quest-row.is-got{opacity:.55}
.quest-top{display:flex;gap:8px;align-items:center;font-size:.86rem}
.quest-tier{font-size:.6rem;font-family:var(--font-title);padding:2px 6px;border-radius:8px;border:2px solid var(--outline);color:var(--outline);flex:none}
.quest-facile{background:#9fe3a8}.quest-moyenne{background:#ffc43a}.quest-difficile{background:#ff8f7a}
.quest-bar{position:relative;height:16px;border-radius:8px;background:#0006;border:2px solid var(--outline);margin:6px 0;overflow:hidden}
.quest-bar i{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(90deg,#e9a31f,#ffc43a)}
.quest-bar span{position:relative;display:block;text-align:center;font-size:.64rem;line-height:12px}
.quest-foot{display:flex;justify-content:space-between;align-items:center;font-size:.74rem;gap:8px}
.quest-foot em{opacity:.75}
.quest-claim{padding:6px 12px !important;font-size:.76rem !important}

/* ── Succès et titres ── */
.profile-title{font-size:.8rem;color:var(--gold);font-style:italic;min-height:1em}
.pp-title{margin:0 0 2px;color:var(--gold);font-style:italic;font-size:.82rem}
.ach-title-sel{max-width:160px}
.ach-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:6px;margin-top:6px;max-height:34vh;overflow-y:auto}
.ach-card{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 4px;border:2px solid var(--outline);border-radius:10px;background:#0002;color:inherit;font-size:.68rem;line-height:1.1;text-align:center;cursor:pointer;opacity:.6}
.ach-card.is-on{opacity:1;background:#e9c46a22}
.ach-medal{width:26px;height:26px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;border:2px solid var(--outline);font-size:.8rem;color:var(--outline);background:#6b6256;flex:none}
.ach-medal.is-on.ach-t1{background:#c98a4b}.ach-medal.is-on.ach-t2{background:#cfd3d8}.ach-medal.is-on.ach-t3{background:#ffc43a}.ach-medal.is-on.ach-t4{background:#9fe3ef}.ach-medal.is-on.ach-t5{background:#ff9ad0}
.ach-name{font-weight:700}.ach-prog{opacity:.75;font-size:.62rem}
.ach-chips{display:flex;flex-wrap:wrap;gap:4px;margin:6px 0}
.ach-chip{display:inline-flex;align-items:center;gap:4px;font-size:.68rem;padding:2px 8px 2px 3px;border:2px solid var(--outline);border-radius:12px;background:#0003}
.ach-chip .ach-medal{width:16px;height:16px;font-size:.6rem}

.pk-sec{display:flex;flex-direction:column;gap:6px}
.pk-sec h4{margin:0;display:flex;justify-content:space-between;align-items:center;font-family:var(--font-title);font-size:.82rem;color:var(--gold);text-transform:uppercase}
.pk-tbanner{text-align:center;font-size:.74rem;padding:4px 8px;border:2px solid var(--gold);border-radius:10px;background:#ffc43a22}

/* ── Instantanés : La Cendre qui monte + Mégots Piégés ── */
.ig-table{display:flex;flex-direction:column;gap:8px;padding:10px;min-height:0;height:100%;overflow:hidden}
.ig-sub{font-size:.8rem;opacity:.8}
.ig-hist{display:flex;gap:6px;overflow:hidden;white-space:nowrap;font-family:Cendrier,sans-serif;font-size:.85rem}
.ig-hist .lo{color:#ff8a7a}.ig-hist .hi{color:#8fe3a5}.ig-hist .vh{color:var(--gold)}
.ig-screen{position:relative;flex:1;min-height:110px;border:3px solid var(--outline);border-radius:12px;background:#1b110a;overflow:hidden}
.ig-screen canvas{position:absolute;inset:0;width:100%;height:100%}
.ig-mult{position:absolute;left:50%;top:14%;transform:translateX(-50%);font-family:Cendrier,sans-serif;font-size:clamp(2rem,9vw,3.4rem);color:var(--gold);text-shadow:0 3px 0 var(--outline)}
.ig-screen.crashed .ig-mult{color:#ff5a4d}.ig-screen.cashed .ig-mult{color:#6fe39a}
.ig-cig{position:absolute;left:10px;right:10px;bottom:8px;height:12px;border:2px solid var(--outline);border-radius:6px;background:#fbf0d8;overflow:hidden;--burn:0}
.ig-cig-body{position:absolute;inset:0;background:linear-gradient(90deg,#3a2a1a calc(var(--burn)*100%),#fbf0d8 calc(var(--burn)*100%))}
.ig-cig-ember{position:absolute;top:0;bottom:0;left:calc(var(--burn)*100%);width:6px;background:#ff6a2b;box-shadow:0 0 8px #ff6a2b}
.ig-flake{position:absolute;top:-6px;width:6px;height:6px;border-radius:50%;background:#bdb7ae;animation:ig-fall 1.2s ease-in forwards}
@keyframes ig-fall{to{transform:translateY(190px) rotate(120deg);opacity:0}}
.mn-wrap{flex:1;min-height:0;container-type:size;display:flex;align-items:center;justify-content:center}
.mn-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;width:min(100cqw,100cqh);height:min(100cqw,100cqh)}
.mn-cell{min-width:0;min-height:0;border:3px solid var(--outline);border-radius:10px;background:var(--cream);box-shadow:0 3px 0 var(--outline);padding:4px;cursor:pointer}
.mn-cell:disabled{cursor:default}
.mn-cell.is-safe{background:#8fe3a5}.mn-cell.is-bomb{background:#ffb3a8}.mn-cell.is-hit{background:#ff5a4d}.mn-cell.is-dim{opacity:.45}
.mn-cell span,.mn-cell svg{display:block;width:100%;height:100%}

/* Choix de la carte à vendre */
.sell-picker{max-height:86vh;display:flex;flex-direction:column;gap:8px}
.sell-picker-grid{flex:1;min-height:0;overflow-y:auto;display:flex;flex-wrap:wrap;gap:8px;justify-content:center}

/* ── Le Grand Cendrier ── */
.sl-cendrier{overflow:hidden;height:100%}
.sl-board{position:relative;flex:1;min-height:0;container-type:size;display:flex;align-items:center;justify-content:center}
.sl-cendrier .sl-grid{--cell:min(calc((100cqw - 40px) / 6),calc((100cqh - 40px) / 5));gap:4px;padding:8px;width:auto;flex:none;overflow:hidden;background:radial-gradient(circle at 50% 30%,#14502f,#0a2a1a)}
.sl-cendrier .sl-cell{position:relative;border-radius:8px;transition:transform .15s}
.sl-bv{position:absolute;inset:auto 0 3px 0;text-align:center;font:normal 800 calc(var(--cell)*.3)/1 Cendrier,sans-serif;color:#ffc43a;text-shadow:0 2px 0 #120a04,0 0 6px #000;animation:slbv .5s ease-out}
@keyframes slbv{from{transform:scale(2.4);opacity:0}}
.sl-cell.is-pop{animation:slpop .26s ease-in forwards}
@keyframes slpop{to{transform:scale(0);opacity:0}}
.sl-cell.is-fall{animation:slfall .5s cubic-bezier(.3,.1,.5,1) both}
.sl-cell.is-shift{animation:slshift .4s ease-in both}
.sl-cell.d1{animation-delay:.03s}.sl-cell.d2{animation-delay:.06s}.sl-cell.d3{animation-delay:.09s}.sl-cell.d4{animation-delay:.12s}
@keyframes slfall{from{transform:translateY(-420%);opacity:.3}}
@keyframes slshift{from{transform:translateY(-90%)}}
.sl-grid.is-dropping .sl-col:nth-child(2) .sl-cell{animation-delay:.08s}.sl-grid.is-dropping .sl-col:nth-child(3) .sl-cell{animation-delay:.16s}.sl-grid.is-dropping .sl-col:nth-child(4) .sl-cell{animation-delay:.24s}.sl-grid.is-dropping .sl-col:nth-child(5) .sl-cell{animation-delay:.32s}.sl-grid.is-dropping .sl-col:nth-child(6) .sl-cell{animation-delay:.4s}
.sl-big{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:radial-gradient(circle,#000c,#000a);z-index:5;border-radius:12px;text-align:center;animation:slbig .3s ease-out}
.sl-big.hidden{display:none}
.sl-big small{font-family:Cendrier,sans-serif;color:#fff;letter-spacing:.06em;text-transform:uppercase;font-size:clamp(.9rem,4vw,1.4rem)}
.sl-big b{font-family:Cendrier,sans-serif;color:var(--gold);font-size:clamp(2rem,10vw,3.6rem);text-shadow:0 4px 0 #120a04}
.sl-big em{font-style:normal;color:#8fe3a5;font-weight:800}
@keyframes slbig{from{transform:scale(.6);opacity:0}}
.sl-fs{display:flex;justify-content:space-between;gap:6px;flex-wrap:wrap;font-size:.74rem}
.sl-fs b{font-family:Cendrier,sans-serif;color:var(--gold);font-size:.95rem}
.sl-fs-mult b{color:#ff9a4a}
.sl-buy{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.sl-buy-btn{display:flex;flex-direction:column;align-items:center;gap:1px;padding:6px 4px;line-height:1.15}
.sl-buy-btn b{font-family:Cendrier,sans-serif;font-size:.82rem}
.sl-buy-btn small{font-size:.62rem;opacity:.85;text-align:center}
.sl-buy-super{border-color:var(--gold)}
.pk-mini.is-on{background:var(--gold);color:var(--outline)}

/* Arbre de talents : coût sous chaque nœud, texte d'aide */
#talents-content .gow-cost{position:absolute;left:50%;bottom:-4px;transform:translateX(-50%);min-width:18px;padding:0 5px;border:2px solid var(--outline);border-radius:9px;background:var(--cream);color:var(--outline);font:normal 800 .62rem/1.5 Cendrier,sans-serif;text-align:center;z-index:2;pointer-events:none}
#talents-content .gow-node-unlocked .gow-cost{background:var(--gold)}
#talents-content .gow-node-king .gow-diamond-outer{transform:rotate(45deg) scale(1.15) !important}
#talents-content .gow-hint{font-size:.7rem;opacity:.85;text-align:right;max-width:150px}
.sl-cendrier .sl-controls{gap:6px}
.sl-cendrier .sl-spin{min-width:0;padding:10px 4px}
.sl-cendrier .sl-side{flex:none;width:78px}
.sl-cendrier .sl-side .btn-secondary,.sl-cendrier .sl-side select{width:100%;box-sizing:border-box;padding:5px 4px;font-size:.72rem}
.sl-cendrier .sl-bet span{min-width:54px}

.sell-picker-filters{display:flex;gap:6px;flex-wrap:wrap}
.sell-picker-filters select{flex:1 1 40%;min-width:0;padding:6px}
.sp-dbl{display:flex;align-items:center;gap:4px;font-size:.8rem}
.sell-picker-grid{gap:4px}
.sell-picker-grid .card,.sell-picker-grid > *{zoom:.72}

/* Le Grand Cendrier : look « vraie machine » */
.sl-cendrier{background:radial-gradient(120% 80% at 50% 0%,#5a1620 0%,#2a0a12 55%,#150609 100%) !important;border:4px solid #ffc43a !important;box-shadow:0 0 0 3px var(--outline),inset 0 0 40px #000a !important;border-radius:18px;gap:6px}
.sl-marquee{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border:3px solid var(--outline);border-radius:12px;background:linear-gradient(#ffd75e,#e09a1c);box-shadow:inset 0 2px 0 #fff8,0 3px 0 var(--outline);position:relative}
.sl-marquee::before,.sl-marquee::after{content:"";position:absolute;top:50%;width:6px;height:6px;border-radius:50%;background:#fff;box-shadow:0 0 6px 2px #fff9;transform:translateY(-50%);animation:slbulb 1s steps(2) infinite}
.sl-marquee::before{left:-1px}.sl-marquee::after{right:-1px;animation-delay:.5s}
@keyframes slbulb{50%{opacity:.25}}
.sl-marquee span{font-family:Cendrier,sans-serif;color:var(--outline);font-size:1.05rem;letter-spacing:.04em;text-shadow:0 1px 0 #fff7}
.sl-cendrier .sl-grid{background:linear-gradient(180deg,#1a0d2e,#0c0614) !important;border:4px solid #ffc43a !important;border-radius:14px;box-shadow:0 0 0 3px var(--outline),inset 0 0 24px #000,0 0 18px #ffc43a55 !important}
.sl-cendrier .sl-cell{background:linear-gradient(160deg,#fffaf0 0%,#f0dfb8 60%,#dcc590 100%);border:2px solid var(--outline);box-shadow:inset 0 -3px 0 #0002,inset 0 2px 0 #fff9}
.sl-cendrier .sl-sym{filter:drop-shadow(0 2px 1px #0006)}
.sl-cendrier .sl-cell.is-win{background:linear-gradient(160deg,#fff7c2,#ffd75e);box-shadow:0 0 0 3px #ffc43a,0 0 16px 4px #ffc43a}
.sl-cendrier .sl-win{color:#fff;font-weight:700;text-shadow:0 2px 0 #000}
.sl-cendrier .sl-win.is-ok{color:#7dffa8}.sl-cendrier .sl-win.is-big{color:var(--gold)}
.sl-cendrier .sl-spin{background:linear-gradient(#ff6a4d,#c4261b) !important;color:#fff !important;border:3px solid var(--outline) !important;box-shadow:inset 0 2px 0 #fff6,0 4px 0 var(--outline) !important;font-family:Cendrier,sans-serif;letter-spacing:.05em;font-size:1.15rem;border-radius:14px}
.sl-cendrier .sl-spin:disabled{filter:grayscale(.5) brightness(.8)}
.sl-cendrier .sl-fs{background:linear-gradient(#ffd75e,#e09a1c);color:var(--outline);border:3px solid var(--outline);font-weight:700}
.sl-cendrier .sl-fs b{color:#8a1010}
.sl-cendrier .sl-buy-btn{background:linear-gradient(#3b2a1a,#1f140a);color:#ffe9b0;border:2px solid #ffc43a}
.sl-cendrier .sl-buy-super{background:linear-gradient(#7a1a20,#3d0a10);box-shadow:0 0 10px #ff6a4d55}
.sl-cendrier .sl-bet b{color:#ffd75e}
.mn-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr))}
.mn-cell{overflow:hidden}
.ig-table .sl-controls{gap:6px}
.ig-table .sl-spin{min-width:0;padding:10px 4px}
.ig-table .sl-side{flex:none;width:92px}
.ig-table .sl-side .btn-secondary,.ig-table .sl-side select{width:100%;box-sizing:border-box;padding:5px 4px;font-size:.72rem}
.ig-table .sl-bet span{min-width:54px}
.ig-table .sl-spin{font-size:.9rem}

/* Grand Cendrier : effets */
.sl-cendrier .sl-cell{position:relative}
.sl-sp{position:absolute;left:50%;top:50%;width:7px;height:7px;margin:-3px;border-radius:50%;background:#ffd75e;box-shadow:0 0 6px 2px #ffc43a;animation:slsp .38s ease-out forwards;transform:rotate(var(--a)) translateX(0)}
@keyframes slsp{to{transform:rotate(var(--a)) translateX(calc(var(--cell)*.8));opacity:0}}
.sl-grid.is-tense{animation:sltense .35s ease-in-out infinite alternate}
@keyframes sltense{to{box-shadow:0 0 0 3px var(--outline),inset 0 0 24px #000,0 0 30px 8px #ffc43a}}
.sl-board.is-shake{animation:slshake .12s linear 5}
@keyframes slshake{25%{transform:translate(4px,-3px)}75%{transform:translate(-4px,3px)}}
.sl-float{position:absolute;left:50%;top:40%;transform:translateX(-50%);font:normal 800 1.3rem Cendrier,sans-serif;color:#fff;text-shadow:0 0 8px #ffc43a,0 3px 0 #000;animation:slfloat 1.1s ease-out forwards;pointer-events:none;z-index:4}
@keyframes slfloat{from{transform:translate(-50%,20px) scale(.6);opacity:0}20%{opacity:1;transform:translate(-50%,0) scale(1.2)}to{transform:translate(-50%,-50px);opacity:0}}
.sl-rays{position:absolute;left:50%;top:50%;width:260%;height:260%;margin:-130% 0 0 -130%;background:repeating-conic-gradient(#ffc43a33 0 8deg,transparent 8deg 24deg);animation:slrays 8s linear infinite;pointer-events:none;mask-image:radial-gradient(circle,#000 10%,transparent 60%);-webkit-mask-image:radial-gradient(circle,#000 10%,transparent 60%)}
@keyframes slrays{to{transform:rotate(360deg)}}
.sl-big{overflow:hidden}
.sl-big > *{position:relative}
.sl-big > .sl-rays{position:absolute}
.sl-coin{position:absolute !important;top:-30px;width:20px;height:20px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff4b0,#ffc43a 55%,#b5790e);border:2px solid var(--outline);animation:slcoin 1.5s linear infinite}
@keyframes slcoin{to{transform:translateY(520px) rotateY(540deg)}}
.sl-intro b{font-size:clamp(1.6rem,8vw,2.8rem);text-align:center}
.sl-intro em{color:#fff}
.sl-fs-mult b.bump{animation:slbump .35s ease-out}
@keyframes slbump{40%{transform:scale(1.7);color:#fff}}

/* Poker : bouton « Tout miser » */
.pk-allin{background:linear-gradient(#ff6a4d,#c4261b) !important;color:#fff !important}

.sl-side-row{display:flex;gap:4px}
.sl-side-row .btn-secondary{flex:1;padding-left:2px;padding-right:2px}
.sl-all.is-on{background:#e2322b !important;color:#fff !important}

.sl-bet{display:grid;grid-template-columns:auto auto auto;align-items:center;justify-items:center;gap:4px 6px}
.sl-bet .sl-all{grid-column:1 / -1;width:100%}
.sl-bet{flex:none}
.sl-bet .sl-all{padding:3px 6px;font-size:.7rem;min-width:0}

/* ── Rond du clic : léger sur iPhone ──
   Avant, chaque appui changeait une ombre très floue (50-60 px) et l'animait : Safari la redessinait à chaque tap (5 doigts = 5 fois).
   Maintenant les ombres sont fixes et nettes (pas de flou) ; seule la taille bouge, sur sa propre couche (rien à redessiner). */
#clicker-target,
#clicker-target:active,
#clicker-target.clicking,
#clicker-target.frenzy-active {
  box-shadow:
    inset 0 0 0 10px var(--tabac),
    inset 0 0 0 13px var(--outline),
    0 0 0 6px var(--gold),
    0 0 0 10px var(--outline),
    0 12px 0 10px var(--outline) !important;
  transition: transform 0.06s ease-out !important;
  will-change: transform;
  transform: translateZ(0);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
#clicker-target:active,
#clicker-target.clicking { transform: translateZ(0) scale(0.97) !important; }
#clicker-target.frenzy-active { animation: none !important; }

/* Historique des gains */
.gn-card{max-height:88vh;display:flex;flex-direction:column;gap:8px;width:min(480px,94vw)}
.gn-tabs{display:flex;gap:6px;flex-wrap:wrap}
.gn-tabs .is-on{background:var(--gold);color:var(--outline)}
.gn-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;text-align:center}
.gn-stats div{border:2px solid var(--outline);border-radius:10px;padding:6px 4px;background:#0000002b}
.gn-stats span{display:block;font-size:.66rem;opacity:.8;text-transform:uppercase}
.gn-stats b{font-family:var(--font-title);font-size:.95rem;color:var(--gold)}
.gn-stats b.pos{color:#3fcf7a}.gn-stats b.neg{color:#ff6a5c}
.gn-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:4px}
.gn-row{display:grid;grid-template-columns:auto 1fr auto auto;gap:6px;align-items:center;font-size:.78rem;border-left:4px solid #8a7a66;padding:4px 6px;border-radius:6px;background:#00000026}
.gn-row.is-win{border-left-color:#3fcf7a}.gn-row.is-lose{border-left-color:#e2322b}
.gn-when{opacity:.7;font-size:.68rem;white-space:nowrap}
.gn-what{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gn-amt{font-family:var(--font-title);white-space:nowrap}
.gn-row.is-win .gn-amt{color:#3fcf7a}.gn-row.is-lose .gn-amt{color:#ff6a5c}
.gn-open{margin-left:6px}
.hub-gains{margin:0 0 8px auto;display:block}
/* Bannière « dernier résultat » + bouton Historique : tient dans la largeur d'un téléphone */
.casino-last-result-badge{min-width:0 !important;max-width:100%;flex-wrap:wrap;justify-content:space-between}
.casino-last-result-badge .result-info{min-width:0;flex:1 1 auto}
.casino-last-result-badge .result-amount{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.casino-last-result-badge .gn-open{flex:none;margin-left:0}

/* Space KO : tokens */
.pk-token{font-style:normal;font-size:.62rem;margin-left:4px;padding:0 4px;border-radius:6px;border:1.5px solid var(--outline);background:#cfd3d8;color:var(--outline);font-weight:800}
.pk-token.is-gold{background:#ffc43a}.pk-token.is-legend{background:linear-gradient(#ff6a4d,#ffc43a);color:#fff;box-shadow:0 0 6px #ffc43a}
.pk-tbanner small{opacity:.9}
