/* ============================================================
   CoinsBase — style7 : refonte complète du site
   Même langage que l'écran de connexion : fond très sombre,
   panneaux en verre, images de jeux mises en avant, peu de bordures.
   ============================================================ */
:root {
  --glass: color-mix(in srgb, var(--panel) 72%, transparent);
  --glass2: color-mix(in srgb, var(--panel2) 70%, transparent);
  --line: color-mix(in srgb, var(--text) 7%, transparent);
  --line2: color-mix(in srgb, var(--text) 11%, transparent);
  --r-lg: 22px; --r-md: 16px;
}
body { background: color-mix(in srgb, var(--bg) 80%, #000); }
body::before {
  background:
    radial-gradient(1200px 700px at 75% -25%, color-mix(in srgb, var(--accent2) 14%, transparent), transparent 65%),
    radial-gradient(900px 600px at 0% 110%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%);
}

/* ---------- Menu de gauche ---------- */
.sidebar { background: color-mix(in srgb, var(--bg) 55%, transparent); border-right: 1px solid var(--line); }
.brand { border-bottom: none; padding: 18px 20px; }
.brand-name { font-size: 18px; }
.nav { padding: 6px 12px 16px; gap: 3px; }
.nav-title { padding: 18px 12px 8px !important; font-size: 10.5px !important; letter-spacing: .14em; opacity: .55; }
.nav a { padding: 10px 12px; border-radius: 12px; font-weight: 650; color: color-mix(in srgb, var(--text) 70%, var(--muted)); position: relative; }
.nav a:hover { background: var(--line); color: var(--text); }
.nav a.active { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent) 4%, transparent)); color: var(--text); }
.nav a.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.nav a.active svg { color: var(--accent); opacity: 1; }
.nav a .nav-count, .nav a .tag { background: var(--line) !important; color: var(--muted) !important; }

/* ---------- Barre du haut ---------- */
.topbar { background: color-mix(in srgb, var(--bg) 60%, transparent) !important; border-bottom: 1px solid var(--line); backdrop-filter: blur(16px) !important; -webkit-backdrop-filter: blur(16px) !important; }
.wallet { background: var(--glass); border: 1px solid var(--line2); border-radius: 999px; padding: 4px; gap: 4px; box-shadow: 0 0 0 1px #0003, 0 10px 30px #0005; }
.wallet .bal { padding: 0 12px 0 10px; font-size: 15.5px; }
.wallet a { border-radius: 999px; padding: 8px 16px; box-shadow: 0 4px 18px color-mix(in srgb, var(--accent) 35%, transparent); }
.user-chip { background: transparent; border: 1px solid transparent; border-radius: 999px; transition: .15s; }
.user-chip:hover { background: var(--line); }
.icon-btn { background: transparent; border-color: var(--line); border-radius: 12px; }
.icon-btn:hover { background: var(--line); }

/* ---------- Composants communs ---------- */
.page { max-width: 1320px; margin: 0 auto; }
.card, .stat, .game-panel, .game-stage, .challenge-box {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 4%, transparent);
}
.card h3 { font-size: 15px; letter-spacing: -.01em; }
.card h3 svg { color: var(--accent); }
.stat { border-radius: var(--r-md); padding: 16px 18px; }
.stat small { text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; font-weight: 700; }
.stat b { font-size: 22px; font-family: var(--display); letter-spacing: -.03em; }
.title { font-size: 34px !important; letter-spacing: -.04em; }
.title svg { color: var(--accent); }
.subtitle { color: var(--muted); margin-top: -4px; }
.btn { border-radius: 12px; border-color: var(--line2); background: var(--line); }
.btn:hover:not(:disabled) { background: var(--line2); }
.btn.primary { background: var(--accent); border-color: transparent; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 28%, transparent), inset 0 1px 0 #fff5; }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn.violet { background: var(--accent2); border-color: transparent; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent2) 28%, transparent); }
.btn:disabled { opacity: .45; box-shadow: none; }
.field input, .field select, .field textarea, .search input, input.inp {
  background: color-mix(in srgb, var(--bg) 70%, transparent); border-color: var(--line2); border-radius: 12px;
}
.field input:focus, .search input:focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent); }
.pill { background: var(--line); border-color: var(--line); }
.chip-btn { background: var(--line); border: 1px solid var(--line); border-radius: 999px; }
.chip-btn:hover { background: var(--line2); }
.chip-btn.on { background: var(--text); color: var(--bg); border-color: transparent; }
.chip-btn.on svg { color: var(--bg); }
.seg, .tabs { background: color-mix(in srgb, var(--bg) 60%, transparent); border-color: var(--line); border-radius: 12px; }
.seg button.on, .tabs button.on { background: var(--line2); box-shadow: 0 1px 0 #fff1 inset; }
.progress { background: var(--line); height: 6px; border-radius: 6px; }
.progress i { background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #fff)); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 50%, transparent); }
.announce { justify-content: center; background: color-mix(in srgb, var(--accent2) 8%, transparent); border-bottom: 1px solid var(--line); }
.footer, .site-foot { opacity: .6; }

/* ---------- Accueil : jeu à la une ---------- */
.home-top { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.feature { position: relative; display: block; min-height: 300px; border-radius: 26px; overflow: hidden; isolation: isolate;
  background: color-mix(in srgb, var(--gc, var(--accent2)) 30%, var(--bg)); border: 1px solid var(--line2);
  box-shadow: 0 30px 80px #0008; transition: background .6s; }
.ft-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.ft-slide.in { opacity: 1; }
.ft-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(40px) saturate(1.4); opacity: .55; transform: scale(1.1); }
.ft-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 92%, transparent) 0%, color-mix(in srgb, var(--bg) 60%, transparent) 45%, transparent 75%); }
.ft-art { position: absolute; right: 6%; top: 50%; height: 118%; aspect-ratio: 5/6; object-fit: cover; border-radius: 26px; transform: translateY(-50%) rotate(6deg); box-shadow: 0 30px 70px #000a; z-index: 1; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.ft-slide.in .ft-art { animation: ftIn .8s cubic-bezier(.2,.8,.2,1); }
.feature:hover .ft-art { transform: translateY(-50%) rotate(3deg) scale(1.03); }
@keyframes ftIn { from { transform: translateY(-46%) rotate(12deg) scale(.92); opacity: 0; } }
.ft-copy { position: relative; z-index: 2; padding: 40px 44px; max-width: 460px; display: flex; flex-direction: column; align-items: flex-start; height: 100%; justify-content: center; min-height: 300px; }
.ft-kicker { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.ft-copy h1 { font-family: var(--display); font-size: 52px; line-height: 1; letter-spacing: -.045em; margin: 0 0 12px; }
.ft-copy p { color: color-mix(in srgb, var(--text) 75%, var(--muted)); font-size: 16px; margin: 0 0 22px; }
.ft-copy .btn { padding: 13px 22px; font-size: 15px; }
.ft-dots { position: absolute; left: 44px; bottom: 22px; z-index: 3; display: flex; gap: 6px; }
.ft-dots i { width: 6px; height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--text) 30%, transparent); transition: width .3s; }
.ft-dots i.on { width: 22px; background: var(--accent); }

.home-side { display: flex; flex-direction: column; gap: 12px; }
.hs-card { background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; align-items: center; gap: 14px; transition: .2s; }
a.hs-card:hover { background: var(--glass2); border-color: var(--line2); transform: translateY(-2px); }
.hs-me { flex-direction: column; align-items: stretch; gap: 14px; flex: 1; justify-content: space-between; }
.hs-hi { font-size: 14px; color: color-mix(in srgb, var(--text) 80%, var(--muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-hi b { color: var(--text); display: inline !important; font-size: inherit !important; }
.hs-rank { font-size: 12px; font-weight: 800; margin-top: 2px; }
.hs-bal small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.hs-bal b { font-family: var(--display); font-size: 30px; letter-spacing: -.04em; color: var(--accent); }
.hs-ico { width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.hs-ico svg { width: 21px; height: 21px; }
.hs-banner .hs-ico { background: color-mix(in srgb, var(--accent2) 20%, transparent); color: color-mix(in srgb, var(--accent2) 60%, #fff); }
.hs-card > div:not(.row) { flex: 1; min-width: 0; }
.hs-card b { display: block; font-size: 14.5px; }
.hs-card small { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-go { color: var(--muted); font-size: 22px; line-height: 1; }
.hs-bonus { background: linear-gradient(110deg, color-mix(in srgb, var(--accent) 16%, var(--panel)), var(--glass) 70%); }
.hs-banner { background-size: cover; background-position: center; }

/* ---------- Cartes de jeux : nom sur l'image ---------- */
.grow-row { margin-top: 34px; }
.row-head h2 { font-size: 19px; letter-spacing: -.03em; }
.row-head h2 svg { color: var(--accent); }
.see-all { font-weight: 700; font-size: 13px; color: var(--muted); padding: 6px 12px; border-radius: 999px; background: var(--line); }
.see-all:hover { color: var(--text); background: var(--line2); }
.gcard { position: relative; gap: 0 !important; }
.gcard .gimg { border-radius: 18px; box-shadow: 0 10px 30px #0006; }
.gcard .gimg::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, transparent 50%, #000c 100%); box-shadow: inset 0 0 0 1px #ffffff14; pointer-events: none; }
.gcard b { position: absolute; left: 14px; right: 14px; bottom: 30px; z-index: 2; font-size: 15px !important; font-weight: 800; text-shadow: 0 2px 8px #000a; padding: 0 !important; }
.gcard small { position: absolute; left: 14px; right: 14px; bottom: 13px; z-index: 2; font-size: 11.5px; color: #ffffffb3 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 !important; }
.gcard .gtag { z-index: 3; }
.gcard:hover .gimg { transform: translateY(-5px); box-shadow: 0 22px 40px #000a, 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }

/* ---------- Page catégorie ---------- */
.cat-head { margin-bottom: 18px; }
.search input { border-radius: 999px; }

/* ---------- Pages de jeu ---------- */
.game-head { margin-bottom: 16px; }
.game-head h1 { font-size: 26px !important; letter-spacing: -.035em; gap: 14px; }
.ghead-img { width: 44px !important; height: 44px !important; border-radius: 12px !important; box-shadow: 0 6px 18px #0007; }
.game { gap: 14px !important; border: none !important; background: none !important; }
.game-panel { border-radius: var(--r-lg) !important; padding: 18px !important; background: var(--glass) !important; }
.game-stage { border-radius: var(--r-lg) !important; overflow: hidden; isolation: isolate; min-height: 480px;
  background:
    radial-gradient(60% 55% at 50% 45%, color-mix(in srgb, var(--gc, var(--accent2)) 22%, transparent), transparent 75%),
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 6%, transparent) 1px, transparent 0) 0 0 / 24px 24px,
    color-mix(in srgb, var(--gc, var(--panel)) 6%, color-mix(in srgb, var(--bg) 85%, #000)) !important;
  box-shadow: inset 0 0 120px #0008 !important; }
.quickbar .btn.primary, .game-panel .btn.primary.big { font-size: 16px; height: 54px; border-radius: 14px; }
.game-panel .field input { height: 44px; }

.game-stage::before { content: ''; position: absolute; inset: 0; background: var(--gimg) center / 70% auto no-repeat; opacity: .045; filter: blur(3px) saturate(1.3); pointer-events: none; z-index: -1; }
@media (max-width: 900px) {
  .game-head { flex-wrap: nowrap !important; align-items: center; gap: 10px; }
  .game-head h1 { font-size: 21px !important; gap: 10px; min-width: 0; }
  .ghead-img { width: 36px !important; height: 36px !important; }
  .game-head .row { flex-wrap: nowrap; gap: 6px; }
  .game-head .pill { display: none; }
}

/* ---------- Récompenses ---------- */
#rw .grid.g3 > .card { position: relative; overflow: hidden; }
#rw .grid.g3 > .card:first-child { background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 18%, var(--panel)), var(--glass) 60%); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
#rw .grid.g3 > .card:nth-child(2) { background: linear-gradient(150deg, color-mix(in srgb, var(--accent2) 18%, var(--panel)), var(--glass) 60%); }
#rw .big-mult { font-family: var(--display); letter-spacing: -.04em; }
.challenge { border-color: var(--line) !important; }
.ch-ico { background: color-mix(in srgb, var(--accent2) 16%, transparent) !important; border-radius: 12px !important; }

/* ---------- Profil ---------- */
.avatar.lg, .av.lg { box-shadow: 0 10px 30px #0008, 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }

/* ---------- Téléphone / tablette ---------- */
@media (max-width: 1100px) {
  .home-top { grid-template-columns: 1fr; }
  .home-side { display: grid; grid-template-columns: 1.2fr 1fr 1fr; }
  .hs-me { gap: 10px; }
}
@media (max-width: 900px) {
  .feature { min-height: 230px; border-radius: 22px; }
  .ft-copy { padding: 24px 22px 40px; min-height: 230px; max-width: 62%; }
  .ft-copy h1 { font-size: 32px; }
  .ft-copy p { font-size: 13.5px; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .ft-copy .btn { padding: 10px 16px; font-size: 14px; }
  .ft-art { right: -8%; height: 100%; }
  .ft-dots { left: 22px; bottom: 16px; }
  .home-side { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hs-me { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
  .hs-me .row { min-width: 0; }
  .hs-me .progress { grid-column: 1 / -1; }
  .hs-bal { text-align: right; } .hs-bal small { margin-bottom: 2px; } .hs-bal b { font-size: 22px; }
  .hs-rank { white-space: nowrap; }
  .hs-card { padding: 14px; gap: 10px; border-radius: 18px; }
  .hs-ico { width: 36px; height: 36px; border-radius: 11px; }
  .hs-go { display: none; }
  .hs-card small { white-space: normal; font-size: 11.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hs-card b { font-size: 13.5px; }
  .grow-row { margin-top: 26px; }
  .gcard b { font-size: 13.5px !important; bottom: 26px; left: 11px; }
  .gcard small { left: 11px; bottom: 10px; font-size: 10.5px; }
  .gcard .gimg { border-radius: 15px; }
  .title { font-size: 26px !important; }
  .game-stage { min-height: 340px; }
}

/* ---------- Boutique ---------- */
.shop-item { background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 20px 16px; transition: .2s; }
.shop-item:hover { border-color: var(--line2); transform: translateY(-3px); }
.shop-item .preview { height: auto; min-height: 64px; padding: 6px 0; }
.shop-item.own { border-color: color-mix(in srgb, var(--win) 35%, transparent); }

/* ---------- Classement / tableaux ---------- */
table.tbl tr, .lb-row { border-color: var(--line) !important; }
