:root {
  --bg: #f4f4f6; --surface: #ffffff; --surface-2: #f0f0f3; --border: #ececef;
  --text: #111114; --muted: #6b7280; --accent: #e11d2e; --nav-h: 76px;
}
[data-theme="dark"] {
  --accent: #ff4757;
  --bg: #121214; --surface: #1c1c20; --surface-2: #26262c; --border: #2c2c33;
  --text: #f3f3f5; --muted: #9a9aa5;
}
body { background: var(--bg); color: var(--text); padding-bottom: calc(var(--nav-h) + 16px);
  font-family: "Poppins", system-ui, sans-serif; }
a { color: inherit; }
.btn-accent { background: var(--accent); color: #fff; font-weight: 700; border: 0; }
.btn-accent:hover { background: #b3121f; color: #fff; }

/* ---------- Header ---------- */
.app-header { position: sticky; top: 0; z-index: 1020; background: var(--surface);
  border-bottom: 1px solid var(--border); }
.app-header .inner { max-width: 1100px; margin: 0 auto; padding: .6rem 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand { font-weight: 800; font-size: 1.6rem; font-style: italic; text-decoration: none; letter-spacing: -1px; }
.pill-btn { border: 0; background: var(--surface-2); color: var(--text); font-weight: 700;
  border-radius: 2rem; padding: .5rem 1rem; display: inline-flex; align-items: center; gap: .4rem; }
.pill-btn i { color: var(--accent); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--surface-2);
  color: var(--text); display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Bottom nav ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; height: var(--nav-h); z-index: 1060;
  background: var(--surface); border-top: 1px solid var(--border);
  display: flex; align-items: flex-end; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0); }
.bottom-nav a, .bottom-nav button { flex: 1; text-align: center; text-decoration: none; background: none; border: 0;
  color: var(--text); font-size: .72rem; font-weight: 700; padding: .55rem 0 .6rem; }
.bottom-nav i { display: block; font-size: 1.4rem; line-height: 1.2; }
.bottom-nav .active { color: var(--accent); }
.bottom-nav .home-btn { position: relative; }
.bottom-nav .home-btn .circle { width: 64px; height: 64px; border-radius: 50%; background: var(--accent);
  border: 5px solid var(--surface); box-shadow: 0 6px 16px rgba(225,29,46,.4);
  display: flex; align-items: center; justify-content: center; margin: -34px auto 2px; }
.bottom-nav .home-btn .circle i { color: #fff; font-size: 1.6rem; }

/* ---------- Bottom sheet menu ---------- */
.offcanvas.sheet { height: auto; max-height: 85vh; background: var(--surface); color: var(--text);
  border-radius: 1.75rem 1.75rem 0 0; border: 0; padding-bottom: var(--nav-h); }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border); }
.sheet .sheet-link { display: flex; align-items: center; gap: 1rem; padding: .95rem 1.5rem;
  text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.sheet .sheet-link i { color: var(--accent); font-size: 1.4rem; width: 28px; text-align: center; }
.sheet .sheet-foot { border-top: 1px solid var(--border); padding: 1rem 1.5rem 0; color: var(--muted); font-size: .9rem; }
.offcanvas-backdrop { z-index: 1050; }
.offcanvas.sheet { z-index: 1055; }

/* ---------- Modal ---------- */
.modal-content { background: var(--surface); color: var(--text); border-radius: 1.25rem; }
.form-control { background: var(--bg); border-color: var(--border); color: var(--text); }
.form-control:focus { background: var(--bg); color: var(--text); border-color: var(--accent); box-shadow: none; }

/* ---------- Page content ---------- */
.page { max-width: 1100px; margin: 0 auto; padding: 1rem; }
.hero-box { height: 220px; border-radius: 1.25rem; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #240a0e, #e11d2e); color: #fff; font-weight: 800; font-size: 1.6rem; }
.tile { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem;
  padding: 1.25rem; text-align: center; text-decoration: none; font-weight: 700; height: 100%; }
.tile i { display: block; font-size: 2.2rem; color: var(--accent); margin-bottom: .4rem; }

.leagues { overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.leagues::-webkit-scrollbar { display: none; }
.league-btn { display: inline-flex; align-items: center; gap: .4rem; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 2rem; padding: .4rem .9rem; margin-right: .4rem; font-weight: 600; font-size: .9rem; }
.league-btn:hover, .league-btn.active { border-color: var(--accent); color: var(--accent); }
.league-btn img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; }
.range-btn { flex: 1; background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: .9rem; padding: .5rem; text-align: center; font-weight: 700; }
.range-btn small { display: block; color: var(--muted); font-weight: 600; }
.range-btn.active { border-color: var(--accent); color: var(--accent); }
#sportsbook { background: var(--surface); border-radius: 1.25rem; overflow: hidden; }

/* Slider images */
.hero-slider { border-radius: 1.25rem; overflow: hidden; }
.hero-slider img { width: 100%; height: auto; object-fit: cover; }
#heroCarousel .carousel-indicators { margin-bottom: .5rem; }
#heroCarousel .carousel-indicators [data-bs-target] { width: 8px; height: 8px; border-radius: 50%; border: 0; }

/* Jackpot avec image de fond (card-jackpot.webp dans le même dossier) */
.jackpot { position: relative; height: 100%; min-height: 200px; aspect-ratio: 16 / 9; border-radius: 1.25rem; overflow: hidden;
  background: #1a1020 url("../images/card-jackpot.webp") center / cover no-repeat;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; padding-top: 14%; text-align: center; color: #fff; }
.jackpot .amount { font-size: clamp(1.6rem, 6vw, 2.4rem); font-weight: 800; color: #ffd54a;
  text-shadow: 0 2px 0 #3a0a10, 0 4px 10px rgba(0,0,0,.5); }

/* ---------- Logo Playwins216 ---------- */
.brand { display: inline-flex; align-items: center; line-height: 1; font-weight: 800; font-style: italic;
  font-size: 1.5rem; letter-spacing: -1px; text-transform: uppercase; }
.brand .bet { background: var(--accent); color: #fff; transform: skewX(-12deg); padding: .15rem .55rem; margin-left: .35rem; display: inline-block; }
.brand .bet b { display: inline-block; transform: skewX(12deg); font-weight: 800; }

/* ---------- Utilisateur connecté (header) ---------- */
.user-chip { display: flex; align-items: center; gap: .55rem; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 2rem; padding: .25rem .9rem .25rem .3rem; min-width: 0; }
.user-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; }
.user-info { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.user-name { font-size: .72rem; font-weight: 600; color: var(--muted); max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-balance { font-weight: 800; font-size: 1rem; color: var(--text); white-space: nowrap; }
.user-balance small { font-size: .7rem; font-weight: 700; color: var(--accent); }
@media (max-width: 380px) { .user-name { max-width: 64px; } .user-balance { font-size: .92rem; } }

/* Bouton déconnexion (menu) */
.sheet button.sheet-link { width: 100%; background: none; border: 0; text-align: left; color: var(--text); font-family: inherit; }
.sheet .sheet-logout, .sheet .sheet-logout i { color: #e5484d; }

/* ---------- Logo image Playwins216 ---------- */
.brand-logo { height: 44px; width: auto; display: block; box-sizing: border-box; padding: 5px 12px; background: #17171c; border-radius: .9rem; }
.brand-txt { font-weight: 800; font-style: italic; letter-spacing: -1px; color: var(--accent); font-size: 1.3rem; }
