:root {
  --bg: #08111f;
  --bg-soft: #111c2e;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.13);
  --text: #f4f7fb;
  --muted: #9ba8ba;
  --green: #46f2a6;
  --blue: #5ea7ff;
  --yellow: #ffd166;
  --red: #ff6b6b;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(70, 242, 166, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(94, 167, 255, 0.18), transparent 32%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.hidden { display: none !important; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(8, 17, 31, 0.72);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-logo {
  width: 72px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(70, 242, 166, 0.18));
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo h1 { margin: 0; font-size: 1.2rem; letter-spacing: -0.04em; }
.logo p { margin: 2px 0 0; font-size: 0.75rem; color: var(--muted); }

.user-area { display: flex; align-items: center; gap: 10px; }

.user-badge {
  color: #06101d;
  background: var(--green);
  border-radius: 999px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 900;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 100px;
}

.hero {
  min-height: 78vh;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 32px;
  padding: 64px 0 36px;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(70, 242, 166, 0.1);
  border: 1px solid rgba(70, 242, 166, 0.25);
  font-weight: 700;
  font-size: 0.78rem;
}

.hero h2 {
  margin: 20px 0;
  max-width: 720px;
  font-size: clamp(2.5rem, 8vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.primary-button, .secondary-button, .ghost-button {
  border: 0;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #06101d;
  background: linear-gradient(135deg, var(--green), var(--yellow));
  box-shadow: 0 12px 35px rgba(70, 242, 166, 0.25);
}

.secondary-button, .ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.primary-button:hover, .secondary-button:hover, .ghost-button:hover { transform: translateY(-2px); }
.primary-button.full { width: 100%; }
.primary-button.small, .ghost-button.small { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }

button:disabled, select:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.hero-card, .panel, .bet-card, .new-bet-card {
  background: linear-gradient(180deg, var(--card-strong), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card { padding: 24px; transform: rotate(2deg); }
.live-label { color: var(--yellow); font-weight: 800; margin: 0 0 10px; }

.hero-card h3 {
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 24px;
}

.odds-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.odds-row > div { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, 0.08); }
.small-label { display: block; color: var(--muted); font-size: 0.75rem; margin-bottom: 6px; }
.odds-row strong { font-size: 1.8rem; }

.vote-preview, .progress {
  height: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  margin-top: 18px;
}

.vote-preview span, .progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 0.25s ease;
}

.micro-text { color: var(--muted); font-size: 0.82rem; }

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.form-message.success { color: var(--green); }
.form-message.error { color: var(--red); }

.bets-section, .winners-section, .admin-section { margin-top: 38px; }

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 20px;
}

.section-header h2 {
  margin: 0 0 10px;
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.section-header p { color: var(--muted); margin: 0; }

.tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.tabs button {
  white-space: nowrap;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 15px;
  font-weight: 800;
}

.tabs .active { color: #06101d; background: var(--green); }

.bets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.bet-card, .new-bet-card { padding: 20px; }
.new-bet-card { margin-top: 18px; }

.bet-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 18px; }

.tag, .status {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.official-tag { color: #07101d; background: var(--blue); }
.stupid-tag { color: #07101d; background: var(--yellow); }
.status { color: var(--muted); background: rgba(255, 255, 255, 0.08); }
.status.hot { color: #07101d; background: var(--red); }

.bet-card h3, .new-bet-card h3 {
  margin: 0 0 10px;
  line-height: 1.15;
  font-size: 1.24rem;
  letter-spacing: -0.03em;
}

.bet-card p, .new-bet-card p { color: var(--muted); line-height: 1.5; }

.options, .new-bet-card form, .login-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.options button, .vote-choice {
  display: flex;
  justify-content: space-between;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.options button:hover, .vote-choice:hover {
  transform: translateY(-2px);
  border-color: rgba(70, 242, 166, 0.55);
}

.options button.voted, .vote-choice.voted {
  color: #06101d;
  background: var(--green);
  border-color: transparent;
}

.options button strong { color: var(--green); }
.options button.voted strong, .vote-choice.voted strong { color: #06101d; }

.vote-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.vote-choice { display: block; text-align: left; }
.vote-card span { display: block; color: var(--muted); font-size: 0.8rem; margin-bottom: 4px; }
.vote-choice.voted span { color: #06101d; }
.vote-card strong { font-size: 1.4rem; }

input, textarea, select {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 15px;
  outline: none;
}

textarea { resize: vertical; min-height: 96px; }
select { appearance: none; }
input:focus, textarea:focus, select:focus {
  border-color: rgba(70, 242, 166, 0.7);
  box-shadow: 0 0 0 4px rgba(70, 242, 166, 0.08);
}

.new-bet-card {
  background:
    linear-gradient(135deg, rgba(70, 242, 166, 0.12), rgba(94, 167, 255, 0.1)),
    rgba(255, 255, 255, 0.06);
}

.bet-resolved { opacity: 0.9; }
.bet-resolved .status { color: #06101d; background: var(--green); }

.vote-choice.winning-option, .options button.winning-option {
  color: #06101d;
  background: var(--green);
  border-color: transparent;
}

.vote-choice.winning-option span,
.vote-choice.winning-option strong,
.options button.winning-option strong {
  color: #06101d;
}

.jersey-prize, .admin-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 9px 13px;
  border-radius: 999px;
  color: #06101d;
  background: var(--yellow);
  font-weight: 900;
  font-size: 0.82rem;
}

.winners-panel, .admin-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(255, 209, 102, 0.12), rgba(94, 167, 255, 0.08)),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.leader-card {
  padding: 20px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(255, 209, 102, 0.22), transparent 40%),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 209, 102, 0.28);
}

.leader-label {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--yellow);
  font-weight: 900;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.leader-card strong {
  display: block;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

.leader-card p { margin: 10px 0 0; color: var(--muted); }
.table-wrap { overflow-x: auto; }

.winners-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.winners-table th, .winners-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.winners-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.winners-table td { font-weight: 800; }
.winners-table tr:first-child td { color: var(--green); }

.rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #06101d;
  background: var(--green);
  font-weight: 950;
}

.winners-table tr:not(:first-child) .rank {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

.admin-info h3 { margin: 0 0 8px; font-size: 1.35rem; letter-spacing: -0.03em; }
.admin-info p { margin: 0; color: var(--muted); line-height: 1.5; }

.admin-bet-list { display: grid; gap: 14px; margin-top: 20px; }

.admin-bet-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
}

.admin-bet-item.resolved {
  border-color: rgba(70, 242, 166, 0.38);
  background: rgba(70, 242, 166, 0.08);
}

.admin-bet-item h3 { margin: 0 0 6px; font-size: 1rem; letter-spacing: -0.02em; }
.admin-bet-item p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.admin-actions { display: flex; align-items: center; gap: 10px; }
.admin-actions select { min-width: 140px; }

.result-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #06101d;
  background: var(--green);
  font-size: 0.78rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  width: min(100%, 440px);
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(70, 242, 166, 0.18), transparent 32%),
    #101b2d;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: modalIn 0.2s ease both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.4rem;
}

.modal-emoji {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(70, 242, 166, 0.12);
  font-size: 1.8rem;
}

.modal-card h2 { margin: 18px 0 8px; font-size: 2rem; letter-spacing: -0.05em; }
.modal-card p { color: var(--muted); line-height: 1.5; }

.mobile-nav { display: none; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 42px; }
  .hero-card { transform: none; }
  .bets-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at top, rgba(70, 242, 166, 0.18), transparent 28%),
      var(--bg);
  }

  main { width: min(100% - 24px, 1180px); padding-bottom: 90px; }
  .topbar { padding: 12px; }
  .site-logo { width: 54px; }
  .logo h1 { font-size: 1rem; }
  .logo p { display: none; }
  .user-area { gap: 6px; }
  .user-badge { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 8px 10px; }
  .ghost-button { min-height: 38px; padding: 0 12px; font-size: 0.8rem; }
  .hero h2 { font-size: 3.2rem; }
  .hero p { font-size: 1rem; }
  .hero-actions { display: grid; }
  .primary-button, .secondary-button { width: 100%; }
  .section-header { display: grid; align-items: start; }
  .bets-grid { grid-template-columns: 1fr; }

  .bet-card, .new-bet-card, .hero-card, .winners-panel, .admin-panel {
    border-radius: 20px;
    padding: 18px;
  }

  .modal-card { padding: 22px; border-radius: 24px; }
  .admin-bet-item { grid-template-columns: 1fr; }
  .admin-actions { display: grid; grid-template-columns: 1fr; }
  .admin-actions select, .admin-actions button { width: 100%; }

  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(8, 17, 31, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
  }

  .mobile-nav a {
    text-align: center;
    padding: 12px 8px;
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
  }

  .mobile-nav a:first-child {
    color: #06101d;
    background: var(--green);
  }
}


.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 20px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
}

.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 900;
}

.auth-tab.active {
  color: #06101d;
  background: var(--green);
}


/* V14 — Rollback propre : suppression totale du background hero */
.hero {
  width: auto !important;
  margin-left: 0 !important;
  min-height: 78vh !important;
  display: grid !important;
  grid-template-columns: 1.2fr 0.8fr !important;
  align-items: center !important;
  gap: 32px !important;
  padding: 64px 0 36px !important;
  overflow: visible !important;
  background: transparent !important;
  border-bottom: 0 !important;
}

.hero-bg,
.hero-bg-blur,
.hero-poster,
.hero-with-background::before,
.hero-with-background::after {
  display: none !important;
}

.hero .hero-content {
  position: static !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.hero .hero-content::before {
  display: none !important;
}

.hero h2 {
  margin: 20px 0 !important;
  max-width: 720px !important;
  font-size: clamp(2.5rem, 8vw, 5.8rem) !important;
  line-height: 0.92 !important;
  letter-spacing: -0.08em !important;
  text-shadow: none !important;
}

.hero p {
  max-width: 620px !important;
  color: var(--muted) !important;
  font-size: 1.08rem !important;
  line-height: 1.6 !important;
  text-shadow: none !important;
}

.hero .hero-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin-top: 28px !important;
}

.hero .primary-button,
.hero .secondary-button {
  width: auto !important;
}

.hero-card {
  max-width: none !important;
  margin: 0 !important;
  padding: 24px !important;
  transform: rotate(2deg) !important;
  background: linear-gradient(180deg, var(--card-strong), var(--card)) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  backdrop-filter: none !important;
}

.site-logo {
  width: 72px;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(70, 242, 166, 0.18));
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    padding-top: 42px !important;
  }

  .hero-card {
    transform: none !important;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 42px 0 36px !important;
  }

  .hero h2 {
    font-size: 3.2rem !important;
  }

  .hero p {
    font-size: 1rem !important;
  }

  .hero .hero-actions {
    display: grid !important;
  }

  .hero .primary-button,
  .hero .secondary-button {
    width: 100% !important;
  }

  .site-logo {
    width: 54px !important;
  }
}


/* V15 — Toolbar mobile-first avec menu utilisateur */
.topbar {
  gap: 12px;
  overflow: visible !important;
}

.logo {
  min-width: 0;
  flex: 1;
}

.toolbar-logo {
  width: clamp(112px, 34vw, 178px) !important;
  max-width: 178px !important;
  height: auto !important;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(70, 242, 166, 0.14));
}

.logo-text,
.logo h1,
.logo p {
  display: none !important;
}

.user-area {
  position: relative;
  flex: 0 0 auto;
}

.menu-button {
  min-height: 44px;
  max-width: 176px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #06101d;
  background: linear-gradient(135deg, var(--green), var(--yellow));
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 12px 35px rgba(70, 242, 166, 0.18);
}

.menu-button.is-connected {
  color: #06101d;
  background: var(--green);
}

.menu-button.is-admin {
  color: #06101d;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(260px, calc(100vw - 24px));
  padding: 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(12, 22, 38, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.user-dropdown button {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  color: var(--text);
  background: transparent;
  text-align: left;
  font-weight: 850;
}

.user-dropdown button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-dropdown button + button {
  margin-top: 4px;
}

#userBadge,
#adminButton,
#logoutButton,
#loginButton {
  display: none !important;
}

@media (max-width: 640px) {
  .topbar {
    padding: 10px 12px;
  }

  .toolbar-logo {
    width: clamp(108px, 38vw, 152px) !important;
  }

  .menu-button {
    max-width: 166px;
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.88rem;
  }
}

@media (max-width: 380px) {
  .toolbar-logo {
    width: 104px !important;
  }

  .menu-button {
    max-width: 142px;
    padding: 0 12px;
    font-size: 0.82rem;
  }
}


/* V16 — Fix toolbar + particules + pari chaud */
.background-particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.background-particles span {
  position: absolute;
  left: calc((var(--i) * 8.1%) - 8%);
  bottom: -80px;
  width: calc(3px + (var(--i) % 4) * 2px);
  height: calc(3px + (var(--i) % 4) * 2px);
  border-radius: 999px;
  background: rgba(70, 242, 166, 0.72);
  box-shadow:
    0 0 14px rgba(70, 242, 166, 0.48),
    0 0 34px rgba(94, 167, 255, 0.26);
  opacity: 0;
  animation: particleFloat calc(10s + (var(--i) * 1.35s)) linear infinite;
  animation-delay: calc(var(--i) * -1.4s);
}

.background-particles span:nth-child(3n) {
  background: rgba(94, 167, 255, 0.68);
}

.background-particles span:nth-child(4n) {
  background: rgba(255, 209, 102, 0.60);
}

@keyframes particleFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(0.7);
    opacity: 0;
  }
  12% {
    opacity: 0.72;
  }
  52% {
    transform: translate3d(calc((var(--i) - 6) * 7px), -52vh, 0) scale(1);
    opacity: 0.48;
  }
  100% {
    transform: translate3d(calc((var(--i) - 6) * 14px), -110vh, 0) scale(0.45);
    opacity: 0;
  }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(70, 242, 166, 0.10), transparent 28%),
    radial-gradient(circle at 82% 38%, rgba(94, 167, 255, 0.10), transparent 30%),
    radial-gradient(circle at 52% 82%, rgba(255, 209, 102, 0.05), transparent 26%);
  animation: ambientPulse 9s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
  from {
    opacity: 0.62;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

body.is-authenticated #heroLoginButton {
  display: none !important;
}

body.is-authenticated .hero-actions {
  grid-template-columns: 1fr;
}

body.is-authenticated .hero-actions .secondary-button {
  width: fit-content;
}

.hero-card {
  position: relative;
  overflow: hidden;
  animation: hotBetFloat 4.8s ease-in-out infinite;
  will-change: transform;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 107, 107, 0.18), transparent 28%),
    radial-gradient(circle at 90% 22%, rgba(255, 209, 102, 0.18), transparent 24%),
    linear-gradient(120deg, transparent 0%, rgba(255, 209, 102, 0.10) 48%, transparent 64%);
  opacity: 0.85;
  animation: heatWave 3.2s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-card::after {
  content: "";
  position: absolute;
  left: -30%;
  right: -30%;
  bottom: -45%;
  height: 72%;
  z-index: 0;
  background:
    radial-gradient(ellipse at center, rgba(255, 107, 107, 0.18), transparent 62%),
    radial-gradient(ellipse at 40% 60%, rgba(255, 209, 102, 0.12), transparent 52%);
  filter: blur(18px);
  opacity: 0.70;
  animation: heatGlow 2.7s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.live-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@keyframes hotBetFloat {
  0%, 100% {
    transform: rotate(2deg) translate3d(0, 0, 0);
  }
  35% {
    transform: rotate(1.4deg) translate3d(0, -4px, 0);
  }
  70% {
    transform: rotate(2.4deg) translate3d(2px, 2px, 0);
  }
}

@keyframes heatWave {
  from {
    transform: translateX(-5%) skewX(-4deg);
    opacity: 0.48;
  }
  to {
    transform: translateX(5%) skewX(4deg);
    opacity: 0.92;
  }
}

@keyframes heatGlow {
  from {
    transform: translateY(8px) scale(0.96);
    opacity: 0.36;
  }
  to {
    transform: translateY(-8px) scale(1.06);
    opacity: 0.78;
  }
}

@media (max-width: 900px) {
  @keyframes hotBetFloat {
    0%, 100% {
      transform: translate3d(0, 0, 0);
    }
    45% {
      transform: translate3d(0, -4px, 0);
    }
    75% {
      transform: translate3d(1px, 2px, 0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .background-particles span,
  body::before,
  .hero-card,
  .hero-card::before,
  .hero-card::after {
    animation: none !important;
  }
}


/* V17 — Fixes auth, particules visibles, pari chaud animé, boutons holographiques */

/* Le contenu passe au-dessus des particules */
.topbar,
main,
.mobile-nav {
  position: relative;
}

.topbar,
main,
.mobile-nav {
  z-index: 2;
}

.background-particles {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  mix-blend-mode: screen;
}

.background-particles span {
  position: absolute !important;
  left: calc((var(--i) * 5.35%) - 4%) !important;
  bottom: -40px !important;
  width: calc(4px + (var(--i) % 5) * 2px) !important;
  height: calc(4px + (var(--i) % 5) * 2px) !important;
  border-radius: 999px !important;
  background:
    radial-gradient(circle, rgba(255,255,255,0.95), rgba(70, 242, 166, 0.74) 42%, transparent 72%) !important;
  box-shadow:
    0 0 14px rgba(70, 242, 166, 0.92),
    0 0 32px rgba(94, 167, 255, 0.56),
    0 0 56px rgba(255, 209, 102, 0.18) !important;
  opacity: 0;
  animation: particleDrift calc(7s + (var(--i) * 0.45s)) linear infinite !important;
  animation-delay: calc(var(--i) * -0.62s) !important;
}

.background-particles span:nth-child(2n) {
  background:
    radial-gradient(circle, rgba(255,255,255,0.95), rgba(94, 167, 255, 0.74) 42%, transparent 72%) !important;
}

.background-particles span:nth-child(3n) {
  width: 2px !important;
  height: 34px !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, transparent, rgba(70, 242, 166, 0.82), transparent) !important;
}

@keyframes particleDrift {
  0% {
    opacity: 0;
    translate: 0 0;
    scale: 0.75;
  }
  8% {
    opacity: 0.9;
  }
  48% {
    opacity: 0.62;
    translate: calc((var(--i) - 10) * 10px) -48vh;
    scale: 1.12;
  }
  100% {
    opacity: 0;
    translate: calc((var(--i) - 10) * 18px) -112vh;
    scale: 0.42;
  }
}

/* Auth : bouton hero vraiment masqué quand connecté, y compris admin */
body.is-authenticated #heroLoginButton,
#heroLoginButton.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.is-authenticated .hero-actions {
  display: flex !important;
}

body.is-authenticated .hero-actions .secondary-button {
  width: auto !important;
}

/* Boutons holographiques */
.primary-button,
.secondary-button,
.ghost-button,
.menu-button,
.options button,
.vote-choice,
.tabs button,
.user-dropdown button {
  position: relative;
  overflow: hidden;
}

.primary-button,
.menu-button,
.options button.voted,
.vote-choice.voted,
.tabs .active {
  color: #06101d !important;
  border: 1px solid rgba(255, 255, 255, 0.34) !important;
  background:
    linear-gradient(115deg,
      rgba(70, 242, 166, 0.98) 0%,
      rgba(134, 240, 255, 0.92) 26%,
      rgba(255, 209, 102, 0.95) 52%,
      rgba(126, 255, 187, 0.98) 78%,
      rgba(94, 167, 255, 0.92) 100%
    ) !important;
  background-size: 260% 260% !important;
  animation: holoShift 4.8s ease-in-out infinite !important;
  box-shadow:
    0 12px 34px rgba(70, 242, 166, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

.secondary-button,
.ghost-button,
.options button,
.vote-choice,
.tabs button {
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.085), rgba(255,255,255,0.035)),
    linear-gradient(115deg, rgba(70,242,166,0.00), rgba(94,167,255,0.12), rgba(255,209,102,0.08), rgba(70,242,166,0.00)) !important;
  background-size: 100% 100%, 240% 240% !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 10px 28px rgba(0, 0, 0, 0.12) !important;
}

.primary-button::before,
.secondary-button::before,
.ghost-button::before,
.menu-button::before,
.options button::before,
.vote-choice::before,
.tabs button::before {
  content: "";
  position: absolute;
  inset: -45%;
  background:
    linear-gradient(110deg,
      transparent 35%,
      rgba(255,255,255,0.58) 47%,
      rgba(255,255,255,0.12) 53%,
      transparent 65%
    );
  translate: -60% 0;
  rotate: 8deg;
  animation: holoSweep 4.2s ease-in-out infinite;
  pointer-events: none;
}

.secondary-button::before,
.ghost-button::before,
.options button::before,
.vote-choice::before,
.tabs button::before {
  opacity: 0.55;
}

.primary-button > *,
.secondary-button > *,
.ghost-button > *,
.menu-button > *,
.options button > *,
.vote-choice > *,
.tabs button > * {
  position: relative;
  z-index: 1;
}

@keyframes holoShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes holoSweep {
  0%, 30% {
    translate: -72% 0;
    opacity: 0;
  }
  46% {
    opacity: 0.8;
  }
  68%, 100% {
    translate: 72% 0;
    opacity: 0;
  }
}

/* Pari chaud : utiliser translate/rotate au lieu de transform pour éviter les anciens !important */
.hero-card {
  overflow: hidden !important;
  translate: 0 0;
  rotate: 2deg;
  animation: hotCardMove 3.6s ease-in-out infinite !important;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    0 0 34px rgba(255, 107, 107, 0.16),
    0 0 58px rgba(255, 209, 102, 0.10) !important;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: 0;
  background:
    radial-gradient(circle at 22% 80%, rgba(255, 107, 107, 0.28), transparent 26%),
    radial-gradient(circle at 72% 18%, rgba(255, 209, 102, 0.22), transparent 24%),
    linear-gradient(90deg, transparent, rgba(255, 162, 72, 0.13), transparent);
  filter: blur(10px);
  opacity: 0.82;
  animation: heatLayerMove 2.3s ease-in-out infinite alternate !important;
  pointer-events: none;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -42% -20%;
  height: 78%;
  z-index: 0;
  background:
    radial-gradient(ellipse at center, rgba(255, 107, 107, 0.34), transparent 58%),
    radial-gradient(ellipse at 55% 45%, rgba(255, 209, 102, 0.20), transparent 54%);
  filter: blur(20px);
  opacity: 0.78;
  animation: heatPulse 1.55s ease-in-out infinite alternate !important;
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.live-label {
  color: #ffd166 !important;
  text-shadow:
    0 0 12px rgba(255, 209, 102, 0.42),
    0 0 24px rgba(255, 107, 107, 0.22);
  animation: flameText 1.2s ease-in-out infinite alternate;
}

@keyframes hotCardMove {
  0%, 100% {
    translate: 0 0;
    rotate: 2deg;
  }
  25% {
    translate: 0 -5px;
    rotate: 1.45deg;
  }
  52% {
    translate: 3px -2px;
    rotate: 2.35deg;
  }
  76% {
    translate: -2px 3px;
    rotate: 1.8deg;
  }
}

@keyframes heatLayerMove {
  from {
    translate: -5% 3%;
    opacity: 0.48;
  }
  to {
    translate: 5% -4%;
    opacity: 0.92;
  }
}

@keyframes heatPulse {
  from {
    translate: 0 8px;
    scale: 0.96;
    opacity: 0.42;
  }
  to {
    translate: 0 -8px;
    scale: 1.08;
    opacity: 0.88;
  }
}

@keyframes flameText {
  from {
    filter: saturate(1);
  }
  to {
    filter: saturate(1.35) brightness(1.08);
  }
}

@media (max-width: 900px) {
  .hero-card {
    rotate: 0deg;
  }

  @keyframes hotCardMove {
    0%, 100% {
      translate: 0 0;
      rotate: 0deg;
    }
    45% {
      translate: 0 -5px;
      rotate: 0deg;
    }
    75% {
      translate: 2px 2px;
      rotate: 0deg;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .background-particles span,
  .primary-button,
  .menu-button,
  .primary-button::before,
  .secondary-button::before,
  .ghost-button::before,
  .menu-button::before,
  .options button::before,
  .vote-choice::before,
  .tabs button::before,
  .hero-card,
  .hero-card::before,
  .hero-card::after,
  .live-label {
    animation: none !important;
  }
}


/* V19 — Correctif stable depuis les fichiers uploadés */
/* La popin DOIT rester fixed, jamais relative. */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: grid !important;
  place-items: center !important;
  padding: 20px !important;
  background: rgba(2, 6, 12, 0.78) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  position: relative !important;
  z-index: 100000 !important;
  width: min(100%, 440px) !important;
  max-height: calc(100dvh - 40px) !important;
  overflow-y: auto !important;
}

body.modal-open {
  overflow: hidden !important;
}

/* Les particules restent derrière l'interface, pas au-dessus de la popin. */
.background-particles {
  z-index: 0 !important;
  filter: blur(1.8px) saturate(1.15);
}

.topbar,
main,
.mobile-nav {
  position: relative !important;
  z-index: 2 !important;
}

.user-dropdown {
  z-index: 1000 !important;
}

/* Sécurité : bouton hero masqué connecté, admin inclus. */
body.is-authenticated #heroLoginButton,
#heroLoginButton.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Mobile : éviter que la popin soit coincée sous la nav. */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 14px !important;
    align-items: center !important;
  }

  .modal-card {
    max-height: calc(100dvh - 28px) !important;
  }
}


/* V20 — évolutions propres */

/* Particules plus floues et plus profondes */
.background-particles {
  filter: blur(2.6px) saturate(1.28) !important;
  opacity: 0.92;
}

.background-particles span {
  filter: blur(2.2px) !important;
  box-shadow:
    0 0 18px rgba(70, 242, 166, 0.72),
    0 0 42px rgba(94, 167, 255, 0.42),
    0 0 72px rgba(255, 209, 102, 0.16) !important;
}

.background-particles span:nth-child(3n) {
  filter: blur(4.2px) !important;
  opacity: 0.78;
}

.background-particles span:nth-child(5n) {
  width: 18px !important;
  height: 18px !important;
  filter: blur(7px) !important;
}

/* Builder de réponses */
.bet-options-builder {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.055);
}

.builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.builder-header strong {
  letter-spacing: -0.02em;
}

.custom-options-list {
  display: grid;
  gap: 10px;
}

.custom-option-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.remove-option-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 950;
}

/* Cagnotte */
.pot-section {
  margin-top: 38px;
}

.pot-panel {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top left, rgba(70, 242, 166, 0.18), transparent 34%),
    linear-gradient(180deg, var(--card-strong), var(--card));
  box-shadow: var(--shadow);
}

.pot-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.pot-head strong {
  font-size: clamp(2.2rem, 9vw, 4.2rem);
  letter-spacing: -0.07em;
}

.pot-head span {
  color: var(--muted);
  font-weight: 850;
}

.pot-progress {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--border);
}

.pot-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(115deg,
      rgba(70, 242, 166, 0.98),
      rgba(94, 167, 255, 0.96),
      rgba(255, 209, 102, 0.98)
    );
  background-size: 220% 220%;
  animation: holoShift 4.8s ease-in-out infinite;
  box-shadow: 0 0 24px rgba(70, 242, 166, 0.28);
  transition: width 0.35s ease;
}

/* Admin cagnotte */
.admin-pot-control {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
}

.admin-pot-control h3 {
  margin: 0 0 6px;
}

.admin-pot-control p {
  margin: 0 0 12px;
  color: var(--muted);
}

.admin-pot-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

/* Admin actions */
.admin-actions {
  flex-wrap: wrap;
}

.admin-danger-button {
  color: #fff !important;
  background:
    linear-gradient(135deg, rgba(255, 107, 107, 0.95), rgba(210, 40, 40, 0.88)) !important;
  border-color: rgba(255, 107, 107, 0.48) !important;
}

/* Pari boosté */
.boost-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  margin-left: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #ff2d2d);
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: 0 0 24px rgba(255, 107, 107, 0.26);
}

.bet-boosted {
  border-color: rgba(255, 107, 107, 0.72) !important;
  background:
    radial-gradient(circle at top left, rgba(255, 107, 107, 0.22), transparent 36%),
    linear-gradient(180deg, rgba(255, 107, 107, 0.14), var(--card)) !important;
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(255, 107, 107, 0.20),
    0 0 42px rgba(255, 107, 107, 0.16) !important;
}

.bet-boosted .tag::after {
  content: " 🔥";
}

.boosted-title-prefix {
  margin-right: 6px;
}

@media (max-width: 640px) {
  .admin-pot-form {
    grid-template-columns: 1fr;
  }

  .builder-header {
    display: grid;
  }

  .builder-header button {
    width: 100%;
  }

  .custom-option-row {
    grid-template-columns: 1fr 42px;
  }
}


/* V21 — Image Titouan en parallax entre background et particules */
.parallax-player {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.92;
  transform: translate3d(0, 0, 0);
}

.parallax-player::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 18%, transparent 0%, transparent 24%, rgba(8, 17, 31, 0.18) 52%, rgba(8, 17, 31, 0.72) 100%),
    linear-gradient(180deg, rgba(8, 17, 31, 0.03), rgba(8, 17, 31, 0.42) 62%, rgba(8, 17, 31, 0.92) 100%);
}

.parallax-player::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(8, 17, 31, 0.76), transparent 30%, transparent 68%, rgba(8, 17, 31, 0.74));
}

.parallax-player img {
  position: absolute;
  left: 50%;
  top: -12vh;
  width: min(94vw, 820px);
  max-width: none;
  height: auto;
  transform:
    translate3d(calc(-50% + var(--player-x, 0px)), var(--player-y, 0px), 0)
    scale(var(--player-scale, 1));
  filter:
    blur(var(--player-blur, 0px))
    brightness(var(--player-brightness, 0.76))
    saturate(1.08);
  opacity: var(--player-opacity, 0.84);
  transition: filter 0.12s linear, opacity 0.12s linear;
  will-change: transform, filter, opacity;
}

/* Les particules passent au-dessus du joueur, mais restent derrière le contenu */
.background-particles {
  z-index: 1 !important;
}

/* Le contenu doit bien passer au-dessus */
.topbar,
main,
.mobile-nav {
  position: relative !important;
  z-index: 3 !important;
}

/* Effet blur quand le texte passe devant l'image */
.hero-content,
.hero-card,
.bet-card,
.new-bet-card,
.winners-panel,
.admin-panel,
.pot-panel {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.hero-content {
  position: relative;
}

.hero-content::before {
  content: "";
  position: absolute;
  inset: -18px -16px;
  z-index: -1;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(8, 17, 31, 0.28), rgba(8, 17, 31, 0.08));
  backdrop-filter: blur(var(--content-blur, 0px));
  -webkit-backdrop-filter: blur(var(--content-blur, 0px));
  opacity: var(--content-blur-opacity, 0);
  pointer-events: none;
  transition: opacity 0.12s linear;
}

/* Mobile : on voit le haut du joueur à l'ouverture */
@media (max-width: 640px) {
  .parallax-player img {
    top: -6vh;
    width: min(118vw, 560px);
    transform:
      translate3d(calc(-50% + var(--player-x, 0px)), var(--player-y, 0px), 0)
      scale(var(--player-scale, 1));
    opacity: var(--player-opacity, 0.72);
  }

  .parallax-player::after {
    background:
      linear-gradient(90deg, rgba(8, 17, 31, 0.66), transparent 24%, transparent 76%, rgba(8, 17, 31, 0.66));
  }

  .hero {
    position: relative;
    min-height: 88vh !important;
  }

  .hero-content::before {
    inset: -14px -10px;
    border-radius: 22px;
  }
}

@media (min-width: 900px) {
  .parallax-player img {
    left: 68%;
    top: -16vh;
    width: min(54vw, 760px);
  }
}

/* Respect accessibilité */
@media (prefers-reduced-motion: reduce) {
  .parallax-player img {
    transform: translate3d(-50%, 0, 0) !important;
    filter: blur(2px) brightness(0.72) saturate(1.05) !important;
  }
}


/* V22 — Titouan placé dans le hero, sous la toolbar, derrière le texte */
.parallax-player {
  display: none !important;
}

.hero-with-player {
  position: relative !important;
  isolation: isolate;
  overflow: hidden !important;
  min-height: 88vh !important;
  padding-top: clamp(34px, 7vh, 72px) !important;
}

.hero-player-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.hero-player-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(circle at 72% 20%, transparent 0%, transparent 24%, rgba(8, 17, 31, 0.16) 46%, rgba(8, 17, 31, 0.78) 100%),
    linear-gradient(90deg, rgba(8, 17, 31, 0.88) 0%, rgba(8, 17, 31, 0.28) 42%, rgba(8, 17, 31, 0.68) 100%),
    linear-gradient(180deg, rgba(8, 17, 31, 0.04) 0%, rgba(8, 17, 31, 0.20) 48%, rgba(8, 17, 31, 0.88) 100%);
}

.hero-player-layer img {
  position: absolute;
  z-index: 1;
  top: -42px;
  right: -92px;
  width: min(78vw, 720px);
  max-width: none;
  height: auto;
  transform:
    translate3d(var(--hero-player-x, 0px), var(--hero-player-y, 0px), 0)
    scale(var(--hero-player-scale, 1));
  filter:
    blur(var(--hero-player-blur, 0px))
    brightness(var(--hero-player-brightness, 0.82))
    saturate(1.10);
  opacity: var(--hero-player-opacity, 0.82);
  will-change: transform, filter, opacity;
}

.hero-with-player .hero-content,
.hero-with-player .hero-card {
  position: relative !important;
  z-index: 3 !important;
}

.hero-with-player .hero-content::before {
  content: "";
  position: absolute;
  inset: -18px -16px;
  z-index: -1;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(8, 17, 31, 0.22), rgba(8, 17, 31, 0.04));
  backdrop-filter: blur(var(--content-blur, 0px));
  -webkit-backdrop-filter: blur(var(--content-blur, 0px));
  opacity: var(--content-blur-opacity, 0);
  pointer-events: none;
}

.background-particles {
  z-index: 1 !important;
}

.topbar,
main,
.mobile-nav {
  z-index: 3 !important;
}

@media (max-width: 640px) {
  .hero-with-player {
    min-height: 86vh !important;
    padding-top: 34px !important;
  }

  .hero-player-layer img {
    top: 4px;
    right: -168px;
    width: min(154vw, 680px);
    opacity: var(--hero-player-opacity, 0.54);
  }

  .hero-player-layer::before {
    background:
      radial-gradient(circle at 72% 18%, transparent 0%, transparent 18%, rgba(8, 17, 31, 0.18) 48%, rgba(8, 17, 31, 0.86) 100%),
      linear-gradient(90deg, rgba(8, 17, 31, 0.88) 0%, rgba(8, 17, 31, 0.30) 48%, rgba(8, 17, 31, 0.68) 100%),
      linear-gradient(180deg, rgba(8, 17, 31, 0.08) 0%, rgba(8, 17, 31, 0.18) 42%, rgba(8, 17, 31, 0.90) 100%);
  }

  .hero-with-player .hero-content::before {
    inset: -14px -10px;
    border-radius: 22px;
  }
}

@media (min-width: 900px) {
  .hero-player-layer img {
    top: -80px;
    right: -80px;
    width: min(48vw, 720px);
  }
}


/* V23 — Titouan grand calque libre, sans cadre, parallax full page */

/* On désactive les anciennes versions qui enfermaient l'image dans le hero */
.hero-player-layer,
.parallax-player {
  display: none !important;
}

.hero-with-player {
  isolation: auto !important;
  overflow: visible !important;
}

/* Calque libre : pas de cadre, pas de conteneur visible */
.fullpage-player-layer {
  position: fixed;
  left: 0;
  right: 0;
  top: 62px;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
  opacity: 1;
}

.fullpage-player-layer::before {
  content: "";
  position: fixed;
  inset: 62px 0 0 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 56% 18%, transparent 0%, transparent 28%, rgba(8, 17, 31, 0.12) 52%, rgba(8, 17, 31, 0.62) 100%),
    linear-gradient(90deg, rgba(8, 17, 31, 0.78) 0%, rgba(8, 17, 31, 0.16) 46%, rgba(8, 17, 31, 0.58) 100%),
    linear-gradient(180deg, rgba(8, 17, 31, 0.00) 0%, rgba(8, 17, 31, 0.18) 58%, rgba(8, 17, 31, 0.78) 100%);
}

.fullpage-player-layer img {
  position: fixed;
  z-index: 0;
  top: 62px;
  right: clamp(-190px, -10vw, -72px);
  height: calc(100dvh - 62px);
  width: auto;
  max-width: none;
  transform:
    translate3d(var(--player-x, 0px), var(--player-y, 0px), 0)
    scale(var(--player-scale, 1));
  transform-origin: top center;
  filter:
    blur(var(--player-blur, 0px))
    brightness(var(--player-brightness, 0.76))
    saturate(1.12);
  opacity: var(--player-opacity, 0.78);
  will-change: transform, filter, opacity;
}

/* Les particules passent au-dessus de l'image, le contenu au-dessus des deux */
.background-particles {
  z-index: 1 !important;
}

.topbar,
main,
.mobile-nav {
  position: relative !important;
  z-index: 3 !important;
}

/* Le hero n'a plus de cadre interne autour de l'image */
.hero {
  overflow: visible !important;
}

.hero-content::before {
  display: none !important;
}

/* Pour que le texte reste lisible en passant au-dessus */
.hero-content,
.hero-card,
.bet-card,
.new-bet-card,
.winners-panel,
.admin-panel,
.pot-panel {
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

/* Mobile : tête sous toolbar, pieds bas écran */
@media (max-width: 640px) {
  .fullpage-player-layer {
    top: 58px;
  }

  .fullpage-player-layer::before {
    inset: 58px 0 0 0;
    background:
      radial-gradient(circle at 58% 16%, transparent 0%, transparent 24%, rgba(8, 17, 31, 0.10) 52%, rgba(8, 17, 31, 0.68) 100%),
      linear-gradient(90deg, rgba(8, 17, 31, 0.84) 0%, rgba(8, 17, 31, 0.14) 50%, rgba(8, 17, 31, 0.50) 100%),
      linear-gradient(180deg, rgba(8, 17, 31, 0.00) 0%, rgba(8, 17, 31, 0.16) 58%, rgba(8, 17, 31, 0.82) 100%);
  }

  .fullpage-player-layer img {
    top: 58px;
    right: clamp(-270px, -62vw, -210px);
    height: calc(100dvh - 58px);
    opacity: var(--player-opacity, 0.58);
  }

  .hero {
    min-height: 88vh !important;
  }
}

/* Desktop : joueur plus à droite, grand mais pas envahissant */
@media (min-width: 900px) {
  .fullpage-player-layer img {
    right: clamp(-130px, -5vw, -40px);
    height: calc(100dvh - 62px);
    opacity: var(--player-opacity, 0.74);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fullpage-player-layer img {
    transform: translate3d(0, 0, 0) scale(1) !important;
    filter: blur(1px) brightness(0.72) saturate(1.08) !important;
  }
}


/* V24 — Ajustement mobile Titouan : plus centré, mouvement simple droite/gauche */
@media (max-width: 640px) {
  .fullpage-player-layer img {
    right: clamp(-235px, -54vw, -178px) !important;
    height: calc(100dvh - 58px) !important;
    opacity: var(--player-opacity, 0.60) !important;
  }
}

@media (max-width: 390px) {
  .fullpage-player-layer img {
    right: clamp(-248px, -60vw, -198px) !important;
  }
}

@media (min-width: 641px) and (max-width: 899px) {
  .fullpage-player-layer img {
    right: clamp(-165px, -18vw, -95px) !important;
  }
}


/* V25 — Maillot holographique dans la box Leader actuel */
.leader-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.leader-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(115deg,
      rgba(70, 242, 166, 0.12),
      rgba(94, 167, 255, 0.16),
      rgba(255, 209, 102, 0.12),
      rgba(255, 255, 255, 0.06)
    ),
    url("images/maillot.png");
  background-size: 260% 260%, cover;
  background-position: 0% 50%, center;
  background-repeat: no-repeat;
  opacity: 0.34;
  filter: saturate(1.15) contrast(1.05) brightness(0.72);
  animation: leaderHoloBg 7s ease-in-out infinite;
}

.leader-card::after {
  content: "";
  position: absolute;
  inset: -40%;
  z-index: -1;
  background:
    linear-gradient(
      115deg,
      transparent 32%,
      rgba(255, 255, 255, 0.18) 44%,
      rgba(134, 240, 255, 0.18) 50%,
      rgba(255, 209, 102, 0.12) 56%,
      transparent 68%
    );
  transform: translateX(-34%) rotate(8deg);
  animation: leaderHoloSweep 5.4s ease-in-out infinite;
  pointer-events: none;
}

.leader-card .leader-label,
.leader-card strong,
.leader-card p {
  position: relative;
  z-index: 1;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.62),
    0 12px 34px rgba(0, 0, 0, 0.28);
}

.leader-card {
  background:
    linear-gradient(135deg, rgba(8, 17, 31, 0.56), rgba(8, 17, 31, 0.28)),
    radial-gradient(circle at top left, rgba(255, 209, 102, 0.18), transparent 42%),
    rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 209, 102, 0.36) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@keyframes leaderHoloBg {
  0%, 100% {
    background-position: 0% 50%, center;
    filter: saturate(1.05) contrast(1.02) brightness(0.68);
  }
  50% {
    background-position: 100% 50%, center;
    filter: saturate(1.35) contrast(1.08) brightness(0.82);
  }
}

@keyframes leaderHoloSweep {
  0%, 28% {
    transform: translateX(-42%) rotate(8deg);
    opacity: 0;
  }
  46% {
    opacity: 0.84;
  }
  72%, 100% {
    transform: translateX(42%) rotate(8deg);
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .leader-card::before {
    background-size: 260% 260%, cover;
    background-position: 0% 50%, center;
    opacity: 0.30;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leader-card::before,
  .leader-card::after {
    animation: none !important;
  }
}


/* V27 — Ajustements sûrs depuis les fichiers uploadés */

/* Titouan plus visible sur mobile : décalage léger vers la gauche */
@media (max-width: 640px) {
  .fullpage-player-layer img {
    right: clamp(-205px, -48vw, -150px) !important;
  }
}

@media (max-width: 390px) {
  .fullpage-player-layer img {
    right: clamp(-218px, -54vw, -172px) !important;
  }
}

/* Footer mobile : seulement Paris + Classement */
@media (max-width: 640px) {
  .mobile-nav {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Couleurs de catégories */
.tag.category-caliente {
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #ff2d2d);
}

.tag.category-serieux {
  color: #06101d;
  background: var(--green);
}

.tag.category-rien-a-voir {
  color: #06101d;
  background: var(--yellow);
}

.tag.category-match-precis {
  color: #06101d;
  background: var(--blue);
}

.tag.category-officiel,
.official-tag {
  color: #06101d;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.tag.category-debile,
.stupid-tag {
  color: #06101d;
  background: var(--yellow);
}


/* V28.1 — Correctifs sans toucher à la logique admin */

/* Titouan encore plus visible sur mobile : légèrement vers la gauche */
@media (max-width: 640px) {
  .fullpage-player-layer img {
    right: clamp(-176px, -42vw, -118px) !important;
  }
}

@media (max-width: 390px) {
  .fullpage-player-layer img {
    right: clamp(-192px, -48vw, -142px) !important;
  }
}

/* Alias d’ancre pour #bet */
.anchor-alias {
  display: block;
  position: relative;
  top: -90px;
  visibility: hidden;
  height: 0;
}

/* Selects lisibles */
select,
select option {
  color: #f4f7fb !important;
  background-color: #101b2d !important;
}

select option:disabled {
  color: rgba(244, 247, 251, 0.38) !important;
}

/* Popin login toujours au-dessus, même après navigation par ancre */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: grid !important;
  place-items: center !important;
}

.modal-overlay.hidden {
  display: none !important;
}

.modal-card {
  position: relative !important;
  z-index: 100000 !important;
}

/* Footer mobile 2 entrées uniquement */
@media (max-width: 640px) {
  .mobile-nav {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Classement aux points */
.winners-table {
  min-width: 680px;
}

.points-cell {
  color: var(--green);
  font-weight: 950;
}


/* V29 — Paris terminés, icônes filtres, votes décliquer, admin edit */

/* Leaderboard : points toujours visibles en 0,00 */
.points-cell {
  color: var(--green);
  font-weight: 950;
  white-space: nowrap;
}

/* Filtres icônes blancs */
.icon-tabs {
  gap: 12px;
}

.icon-tabs .tab-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0 !important;
  display: grid;
  place-items: center;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  border-radius: 999px;
}

.icon-tabs .tab-button.active {
  color: #fff !important;
  background:
    linear-gradient(135deg, rgba(70, 242, 166, 0.28), rgba(94, 167, 255, 0.26)),
    rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(70, 242, 166, 0.58) !important;
  box-shadow: 0 0 24px rgba(70, 242, 166, 0.22);
}

.filter-icon {
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 950;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.32);
}

/* Les paris terminés descendent en bas */
.finished-bets-section {
  margin-top: 58px;
  opacity: 0.96;
}

.finished-bets-section .section-header h2 {
  color: var(--muted);
}

.finished-bets-grid .bet-card {
  opacity: 0.78;
}

.finished-bets-grid .bet-card:hover {
  opacity: 1;
}

/* Dévote */
.vote-choice.voted {
  position: relative;
}

.vote-choice.voted::after {
  content: "Cliquer pour retirer";
  display: block;
  margin-top: 6px;
  color: rgba(6, 16, 29, 0.72);
  font-size: 0.72rem;
  font-weight: 900;
}

/* Admin edit */
.admin-edit-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.admin-edit-form.hidden {
  display: none !important;
}

.admin-edit-form textarea {
  min-height: 72px;
}

.admin-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-edit-options {
  display: grid;
  gap: 8px;
}

.admin-edit-option-row {
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: 8px;
}

@media (max-width: 640px) {
  .icon-tabs .tab-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .admin-edit-option-row {
    grid-template-columns: 1fr;
  }
}


/* V30 — Corrections front safe */

/* Titouan : blur réduit de 30% sans toucher au script principal */
.fullpage-player-layer img {
  filter:
    blur(calc(var(--player-blur, 0px) * 0.7))
    brightness(var(--player-brightness, 0.76))
    saturate(1.12) !important;
  transform:
    translate3d(var(--player-x-smooth, var(--player-x, 0px)), 0, 0)
    scale(var(--player-scale, 1)) !important;
  transition: none !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Mobile : rendu plus fluide, moins de jitter */
@media (max-width: 640px) {
  .fullpage-player-layer img {
    will-change: transform, filter, opacity;
    transform:
      translate3d(var(--player-x-smooth, var(--player-x, 0px)), 0, 0)
      scale(var(--player-scale, 1)) !important;
  }
}

/* Filtres icônes */
.icon-tabs {
  gap: 10px !important;
  align-items: center;
}

.icon-tabs .tab-button {
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
}

.filter-icon {
  color: #fff !important;
  font-size: 1.16rem;
  line-height: 1;
  filter: grayscale(0.04) brightness(1.08);
}

@media (max-width: 640px) {
  .icon-tabs {
    gap: 8px !important;
    padding-bottom: 14px;
  }

  .icon-tabs .tab-button {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
  }

  .filter-icon {
    font-size: 1.08rem;
  }
}

/* Si le pari est terminé, ne plus afficher "Cliquer pour retirer" */
.bet-resolved .vote-choice.voted::after,
.finished-bets-grid .vote-choice.voted::after {
  display: none !important;
  content: none !important;
}

.bets-grid.showing-resolved .bet-card {
  opacity: 0.88;
}


/* V31 — Nettoyage catégories, slider paris terminés, tableau score */

/* Retrait visuel catégorie Match précis si de vieux paris existent encore */
.tag.category-match-precis {
  display: none;
}

/* Paris terminés en slider horizontal pour ne pas prendre trop de hauteur */
.finished-bets-section {
  overflow: hidden;
}

.finished-bets-grid {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  grid-template-columns: none !important;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.finished-bets-grid .bet-card {
  scroll-snap-align: start;
  min-width: 0;
}

.finished-bets-grid::-webkit-scrollbar {
  height: 8px;
}

.finished-bets-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.finished-bets-grid::-webkit-scrollbar-thumb {
  background: rgba(70, 242, 166, 0.42);
  border-radius: 999px;
}

@media (max-width: 640px) {
  .finished-bets-grid {
    grid-auto-columns: minmax(82vw, 82vw);
    padding-bottom: 16px;
  }
}

/* Tableau scores : colonnes remises proprement */
.winners-table {
  min-width: 720px;
}

.winners-table th:nth-child(3),
.winners-table td:nth-child(3) {
  color: var(--green);
  font-weight: 950;
  white-space: nowrap;
}


/* V32 — Admin slider terminés + Titouan plus net et plus à gauche */

/* Titouan encore légèrement vers la gauche sur mobile */
@media (max-width: 640px) {
  .fullpage-player-layer img {
    right: clamp(-148px, -36vw, -92px) !important;
  }
}

@media (max-width: 390px) {
  .fullpage-player-layer img {
    right: clamp(-162px, -42vw, -112px) !important;
  }
}

/* Réduction supplémentaire du blur, surtout en haut de page */
.fullpage-player-layer img {
  filter:
    blur(calc(var(--player-blur, 0px) * 0.45))
    brightness(var(--player-brightness, 0.78))
    saturate(1.12) !important;
}

/* Administration : séparer les paris ouverts et terminés */
.admin-list-title {
  margin: 26px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-finished-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 420px);
  grid-template-columns: none !important;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.admin-finished-slider .admin-bet-item {
  min-width: 0;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  opacity: 0.86;
}

.admin-finished-slider .admin-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.admin-finished-slider::-webkit-scrollbar {
  height: 8px;
}

.admin-finished-slider::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.admin-finished-slider::-webkit-scrollbar-thumb {
  background: rgba(255, 209, 102, 0.45);
  border-radius: 999px;
}

@media (max-width: 640px) {
  .admin-finished-slider {
    grid-auto-columns: minmax(84vw, 84vw);
  }
}


/* V33 — Titouan net en haut + bouton terminés = navigation */

/* Titouan doit être net à l'ouverture.
   Le blur vient uniquement de --player-blur, qui vaut 0 en haut de page. */
.fullpage-player-layer img {
  filter:
    blur(var(--player-blur, 0px))
    brightness(var(--player-brightness, 0.80))
    saturate(1.12) !important;
}

/* Ancre propre vers la section Paris terminés */
#finishedBets {
  scroll-margin-top: 96px;
}

/* Le bouton 🤝 sert de raccourci visuel vers le slider */
.tab-button[data-filter="resolved"] {
  scroll-margin-inline: 12px;
}


/* V34 — bouton terminés = scroll uniquement */
.tab-button[data-scroll-target="finishedBets"] {
  color: #fff !important;
}

#finishedBets {
  scroll-margin-top: 96px;
}


/* V39 — Restauration UI récente : filtres, sliders, admin, mobile prudent */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.icon-tabs {
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.icon-tabs::-webkit-scrollbar {
  display: none;
}

.icon-tabs .tab-button {
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px;
}

.filter-icon {
  color: #fff !important;
  font-size: 1.08rem;
  line-height: 1;
}

#finishedBets {
  scroll-margin-top: 96px;
}

/* Slider utilisateur Paris terminés */
.finished-bets-section {
  margin-top: 58px;
  overflow: hidden;
}

.finished-bets-grid {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 360px);
  grid-template-columns: none !important;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.finished-bets-grid .bet-card {
  scroll-snap-align: start;
  min-width: 0;
  opacity: 0.86;
}

.finished-bets-grid::-webkit-scrollbar {
  height: 8px;
}

.finished-bets-grid::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
}

.finished-bets-grid::-webkit-scrollbar-thumb {
  background: rgba(70,242,166,0.42);
  border-radius: 999px;
}

/* Admin : paris terminés en slider */
.admin-list-title {
  margin: 26px 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-finished-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 420px);
  grid-template-columns: none !important;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.admin-finished-slider .admin-bet-item {
  min-width: 0;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
}

.admin-finished-slider .admin-actions {
  display: grid;
  grid-template-columns: 1fr;
}

/* Admin edit form */
.admin-edit-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}

.admin-edit-form.hidden {
  display: none !important;
}

.admin-edit-form textarea {
  min-height: 72px;
}

.admin-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-edit-options {
  display: grid;
  gap: 8px;
}

.admin-edit-option-row {
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: 8px;
}

@media (max-width: 720px) {
  main,
  section,
  .hero,
  .bets-section,
  .my-bets-section,
  .leaderboard-section,
  .pot-section,
  .admin-panel {
    max-width: 100vw;
  }

  .finished-bets-grid {
    grid-auto-columns: minmax(82vw, 82vw);
  }

  .admin-finished-slider {
    grid-auto-columns: minmax(84vw, 84vw);
  }

  .admin-edit-option-row {
    grid-template-columns: 1fr;
  }

  .mobile-footer,
  .bottom-nav,
  .mobile-nav {
    left: max(10px, env(safe-area-inset-left)) !important;
    right: max(10px, env(safe-area-inset-right)) !important;
    width: auto !important;
    max-width: calc(100vw - 20px) !important;
    margin: 0 auto !important;
    box-sizing: border-box;
  }

  .mobile-footer a,
  .mobile-footer button,
  .bottom-nav a,
  .bottom-nav button,
  .mobile-nav a,
  .mobile-nav button {
    min-width: 0;
    flex: 1 1 0;
    text-align: center;
    justify-content: center;
  }
}


/* V39.1 — Fix formulaire modification admin */
.admin-edit-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}

.admin-edit-form.hidden {
  display: none !important;
}

.admin-edit-form textarea {
  min-height: 72px;
  resize: vertical;
}

.admin-edit-options {
  display: grid;
  gap: 8px;
}

.admin-edit-option-row {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 8px;
}

.admin-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .admin-edit-option-row,
  .admin-edit-actions {
    grid-template-columns: 1fr;
  }
}


/* V40 — Admin edit stable depuis fichiers uploadés */
.admin-edit-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}

.admin-edit-form.hidden {
  display: none !important;
}

.admin-edit-form textarea {
  min-height: 72px;
  resize: vertical;
}

.admin-edit-options {
  display: grid;
  gap: 8px;
}

.admin-edit-option-row {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 8px;
}

.admin-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .admin-edit-option-row,
  .admin-edit-actions {
    grid-template-columns: 1fr;
  }
}



/* V46 — Correctif strict burger menu uniquement */
.topbar {
  z-index: 300000 !important;
  isolation: isolate !important;
  overflow: visible !important;
}

.user-area {
  position: relative !important;
  z-index: 300010 !important;
  isolation: isolate !important;
}

.user-dropdown {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  z-index: 300020 !important;
  pointer-events: auto !important;
  transform: translateZ(0) !important;
}

.user-dropdown.hidden {
  display: none !important;
}

.user-dropdown button {
  position: relative !important;
  z-index: 300021 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
}

.fullpage-player-layer,
.background-particles,
#backgroundParticles,
#parallaxPlayer {
  pointer-events: none !important;
}

.hero,
.hero *,
main,
main * {
  pointer-events: auto;
}

@media (max-width: 640px) {
  .user-dropdown {
    right: 0 !important;
    width: min(258px, calc(100vw - 24px)) !important;
  }
}



/* V47 — Proposer bas + Mes paris compact */
.propose-section,
.my-stats-section {
  margin-top: 64px;
  scroll-margin-top: 96px;
}

#proposerPari {
  margin-bottom: 22px;
}

.propose-section .new-bet-card {
  max-width: 760px;
  margin: 0 auto;
}

.my-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.my-stat-card {
  min-width: 0;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.04)),
    rgba(4, 12, 23, 0.72);
  box-shadow: var(--shadow);
}

.my-stat-card > strong {
  display: block;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.06em;
  color: var(--green);
}

.my-stat-card > span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 900;
}

.my-stat-card.compact > small {
  display: block;
  margin-top: 18px;
  color: var(--muted);
  line-height: 1.35;
}

.my-stat-card.wide {
  grid-column: 1 / -1;
}

.my-stat-card.won {
  border-color: rgba(70, 242, 166, 0.32);
}

.my-stat-card.lost {
  border-color: rgba(255, 107, 107, 0.26);
}

.my-stat-card.pending {
  border-color: rgba(255, 209, 102, 0.25);
}

.my-stat-last {
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 15px;
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
}

.my-stat-last span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
}

.my-stat-last strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.25;
}

.my-stat-last em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
}

@media (max-width: 720px) {
  .my-stats-grid {
    grid-template-columns: 1fr;
  }

  .propose-section .new-bet-card {
    max-width: 100%;
  }

  #proposerPari {
    padding-bottom: 82px;
  }

  .mobile-nav {
    grid-template-columns: repeat(4, 1fr) !important;
    border-radius: 24px !important;
  }

  .mobile-nav a {
    min-width: 0;
    padding: 10px 5px !important;
    font-size: 0.72rem !important;
    white-space: nowrap;
  }
}



/* V48 — Admin : formulaire de modification */
.admin-edit-form {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
}

.admin-edit-form.hidden {
  display: none !important;
}

.admin-edit-form textarea {
  min-height: 72px;
  resize: vertical;
}

.admin-edit-options {
  display: grid;
  gap: 8px;
}

.admin-edit-option-row {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 8px;
}

.admin-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.admin-edit-message {
  margin: 0;
}

@media (max-width: 640px) {
  .admin-edit-option-row,
  .admin-edit-actions {
    grid-template-columns: 1fr;
  }
}



/* V49 — Nettoyage UX */

/* Les filtres emoji sont retirés du HTML ; ce bloc évite tout résidu visuel si une ancienne version est en cache. */
.tabs.icon-tabs {
  display: none !important;
}

/* Header : disparition progressive sur les 20 premiers % de scroll. */
.topbar {
  --header-hide-progress: 0;
  opacity: calc(1 - var(--header-hide-progress)) !important;
  transform: translateY(calc(var(--header-hide-progress) * -110%)) !important;
  transition: opacity 0.08s linear, transform 0.08s linear !important;
  will-change: opacity, transform;
  background: rgba(8, 17, 31, calc(0.72 * (1 - var(--header-hide-progress)))) !important;
  border-bottom-color: rgba(255, 255, 255, calc(0.12 * (1 - var(--header-hide-progress)))) !important;
}

.topbar.is-header-hidden {
  pointer-events: none !important;
}

/* Mes paris : couleurs des chiffres selon le statut. */
.my-stat-card.pending > strong {
  color: var(--yellow) !important;
}

.my-stat-card.won > strong {
  color: var(--green) !important;
}

.my-stat-card.lost > strong {
  color: var(--red) !important;
}

/* Footer mobile parfaitement centré. */
.mobile-nav {
  left: 50% !important;
  right: auto !important;
  width: min(430px, calc(100vw - 24px)) !important;
  transform: translateX(-50%) !important;
  margin: 0 auto !important;
  justify-self: center !important;
}

/* On garde les liens bien répartis dans la barre centrée. */
.mobile-nav a {
  min-width: 0;
}

@media (max-width: 640px) {
  .mobile-nav {
    left: 50% !important;
    right: auto !important;
    width: min(430px, calc(100vw - 24px)) !important;
    transform: translateX(-50%) !important;
  }
}



/* V50 — Header : fade-out complet à 3% du scroll */
.topbar {
  --header-hide-progress: 0;
  opacity: calc(1 - var(--header-hide-progress)) !important;
  transform: translate3d(0, calc(var(--header-hide-progress) * -120%), 0) !important;
  transition: opacity 0.05s linear, transform 0.05s linear, visibility 0s linear 0.05s !important;
  will-change: opacity, transform;
  background: rgba(8, 17, 31, calc(0.72 * (1 - var(--header-hide-progress)))) !important;
  border-bottom-color: rgba(255, 255, 255, calc(0.12 * (1 - var(--header-hide-progress)))) !important;
}

.topbar.is-header-hidden,
.topbar.is-header-gone {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate3d(0, -130%, 0) !important;
  background: transparent !important;
  border-bottom-color: transparent !important;
  box-shadow: none !important;
}

/* Sécurité anti-barre verte résiduelle : aucun enfant du header ne reste visible quand le header est caché. */
.topbar.is-header-hidden *,
.topbar.is-header-gone * {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* V50 — Footer mobile parfaitement centré par rapport au viewport, pas au conteneur. */
.mobile-nav {
  position: fixed !important;
  left: 50vw !important;
  right: auto !important;
  bottom: max(12px, env(safe-area-inset-bottom)) !important;
  width: min(430px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 640px) {
  .mobile-nav {
    left: 50vw !important;
    right: auto !important;
    width: min(430px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    transform: translateX(-50%) !important;
  }
}



/* V51 — Header caché dès le premier scroll */
.topbar.is-header-instant-hidden,
.topbar.is-header-instant-hidden * {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.topbar.is-header-instant-hidden {
  transform: translate3d(0, -140%, 0) !important;
  background: transparent !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

/* Neutralise les anciens états V49/V50 si encore présents. */
.topbar.is-header-hidden,
.topbar.is-header-gone {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate3d(0, -140%, 0) !important;
  background: transparent !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

/* V51 — Footer : état actif vert sur le bouton de la section courante */
.mobile-nav a {
  color: var(--muted) !important;
  background: transparent !important;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.mobile-nav a.is-active {
  color: #06101d !important;
  background: var(--green) !important;
  box-shadow: 0 10px 26px rgba(70, 242, 166, 0.22);
}

/* L’ancien CSS mettait toujours le premier lien en vert : on l’annule. */
.mobile-nav a:first-child {
  color: var(--muted) !important;
  background: transparent !important;
}

.mobile-nav a:first-child.is-active {
  color: #06101d !important;
  background: var(--green) !important;
}



/* V52 — Header : disparition dure dès le premier pixel de scroll */
.topbar.is-header-hard-hidden,
body.has-scrolled-past-header .topbar {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate3d(0, -160%, 0) !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: hidden !important;
  max-height: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
}

.topbar.is-header-hard-hidden *,
body.has-scrolled-past-header .topbar * {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  display: none !important;
}

/* Au cas où le bouton connecté laisse une trace verte via un ancien style. */
body.has-scrolled-past-header .menu-button,
body.has-scrolled-past-header .user-area,
body.has-scrolled-past-header .logo,
body.has-scrolled-past-header .toolbar-logo {
  opacity: 0 !important;
  visibility: hidden !important;
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Proposer : la navigation ne doit pas activer visuellement le champ texte. */
#proposerPari input:focus,
#proposerPari textarea:focus,
#proposerPari select:focus {
  scroll-margin-top: 0;
}



/* V53 — Header toujours visible, ancré en haut */
.topbar,
.topbar.is-header-hidden,
.topbar.is-header-gone,
.topbar.is-header-instant-hidden,
.topbar.is-header-hard-hidden,
body.has-scrolled-past-header .topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 300000 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  padding: 14px 18px !important;
  margin: 0 !important;
  overflow: visible !important;
  background: rgba(8, 17, 31, 0.82) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}

.topbar *,
.topbar.is-header-hidden *,
.topbar.is-header-gone *,
.topbar.is-header-instant-hidden *,
.topbar.is-header-hard-hidden *,
body.has-scrolled-past-header .topbar * {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  display: revert !important;
}

.topbar .hidden,
.topbar .user-dropdown.hidden,
.topbar button.hidden,
.topbar span.hidden {
  display: none !important;
}

/* Préserve le layout du header malgré le display: revert précédent. */
.topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.topbar .logo,
.topbar .user-area {
  display: flex !important;
}

.topbar .site-logo,
.topbar .toolbar-logo {
  display: block !important;
}

/* V53 — Footer : invisible avant Paris ouverts, puis visible */
.mobile-nav {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateX(-50%) translateY(18px) !important;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
}

.mobile-nav.is-visible {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateX(-50%) translateY(0) !important;
}

/* V53 — Footer actif : un seul bouton vert, celui de la section demandée */
.mobile-nav a,
.mobile-nav a:first-child {
  color: var(--muted) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.mobile-nav a.is-active,
.mobile-nav a:first-child.is-active {
  color: #06101d !important;
  background: var(--green) !important;
  box-shadow: 0 10px 26px rgba(70, 242, 166, 0.22) !important;
}

@media (max-width: 640px) {
  .topbar,
  .topbar.is-header-hidden,
  .topbar.is-header-gone,
  .topbar.is-header-instant-hidden,
  .topbar.is-header-hard-hidden,
  body.has-scrolled-past-header .topbar {
    padding: 10px 12px !important;
  }
}



/* V54 — Header/menu vraiment bloqué en haut du viewport */
:root {
  --fixed-header-height: 72px;
}

body {
  padding-top: var(--fixed-header-height) !important;
}

.topbar,
.topbar.is-fixed-header,
.topbar.is-header-hidden,
.topbar.is-header-gone,
.topbar.is-header-instant-hidden,
.topbar.is-header-hard-hidden,
body.has-scrolled-past-header .topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 400000 !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  padding: 14px 18px !important;
  margin: 0 !important;
  overflow: visible !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: rgba(8, 17, 31, 0.86) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 12px 34px rgba(0,0,0,0.18) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
}

.topbar *,
.topbar.is-fixed-header *,
.topbar.is-header-hidden *,
.topbar.is-header-gone *,
.topbar.is-header-instant-hidden *,
.topbar.is-header-hard-hidden *,
body.has-scrolled-past-header .topbar * {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.topbar .hidden,
.topbar .user-dropdown.hidden,
.topbar button.hidden,
.topbar span.hidden {
  display: none !important;
}

.topbar .logo,
.topbar .user-area {
  display: flex !important;
}

.topbar .site-logo,
.topbar .toolbar-logo {
  display: block !important;
}

.user-dropdown {
  z-index: 400010 !important;
}

/* Les ancres ne doivent pas passer sous le header fixe. */
section,
.anchor-alias {
  scroll-margin-top: calc(var(--fixed-header-height) + 16px) !important;
}

@media (max-width: 640px) {
  body {
    padding-top: var(--fixed-header-height) !important;
  }

  .topbar,
  .topbar.is-fixed-header,
  .topbar.is-header-hidden,
  .topbar.is-header-gone,
  .topbar.is-header-instant-hidden,
  .topbar.is-header-hard-hidden,
  body.has-scrolled-past-header .topbar {
    padding: 10px 12px !important;
  }
}



/* V55 — Suppression pastille hero sans déplacer le titre */
.hero-title-spacer {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}



/* V58 — Animation victoire ballons */
.victory-balls-layer {
  position: fixed;
  inset: 0;
  z-index: 500000;
  pointer-events: none;
  overflow: hidden;
  contain: layout paint;
}

.victory-ball {
  position: absolute;
  top: calc(-1 * var(--ball-size));
  left: 0;
  width: var(--ball-size);
  height: var(--ball-size);
  object-fit: contain;
  transform: translate3d(var(--ball-x), -120px, 0) rotate(0deg);
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.28));
  animation:
    victoryBallFall var(--ball-duration) cubic-bezier(.19,.78,.34,1) var(--ball-delay) forwards,
    victoryBallSquash var(--ball-duration) ease-in-out var(--ball-delay) forwards;
  will-change: transform;
}

@keyframes victoryBallFall {
  0% {
    transform: translate3d(var(--ball-x), -120px, 0) rotate(0deg);
  }

  54% {
    transform: translate3d(calc(var(--ball-x) + var(--ball-drift)), calc(100vh - var(--ball-size) - var(--ball-bounce)), 0) rotate(calc(var(--ball-spin) * .55));
  }

  68% {
    transform: translate3d(calc(var(--ball-x) + var(--ball-drift) * .92), calc(100vh - var(--ball-size) - 6px), 0) rotate(calc(var(--ball-spin) * .72));
  }

  78% {
    transform: translate3d(calc(var(--ball-x) + var(--ball-drift) * .75), calc(100vh - var(--ball-size) - var(--ball-bounce) * .52), 0) rotate(calc(var(--ball-spin) * .84));
  }

  88% {
    transform: translate3d(calc(var(--ball-x) + var(--ball-drift) * .6), calc(100vh - var(--ball-size) - 7px), 0) rotate(calc(var(--ball-spin) * .93));
  }

  95% {
    transform: translate3d(calc(var(--ball-x) + var(--ball-drift) * .5), calc(100vh - var(--ball-size) - var(--ball-bounce) * .22), 0) rotate(calc(var(--ball-spin) * .98));
  }

  100% {
    transform: translate3d(calc(var(--ball-x) + var(--ball-drift) * .45), calc(100vh - var(--ball-size) - 8px), 0) rotate(var(--ball-spin));
  }
}

@keyframes victoryBallSquash {
  0%, 52%, 76%, 94% {
    opacity: 1;
  }

  68%, 88%, 100% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .victory-balls-layer {
    display: none !important;
  }
}



/* V59 — Ballons smooth : on neutralise l'ancienne animation CSS */
.victory-balls-layer-smooth .victory-ball {
  display: none !important;
}

.victory-ball-physics {
  position: absolute;
  left: 0;
  top: 0;
  object-fit: contain;
  will-change: transform, opacity;
  transform-origin: center center;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.24));
  transition: opacity 0.18s linear;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.victory-balls-layer-smooth {
  background:
    radial-gradient(circle at 20% 10%, rgba(70, 242, 166, 0.06), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(255, 209, 102, 0.05), transparent 26%);
}

@media (prefers-reduced-motion: reduce) {
  .victory-ball-physics {
    display: none !important;
  }
}



/* V62 — Fade plus propre des ballons sur 7s */
.victory-ball-physics {
  transition: opacity 0.28s linear;
}



/* V63 — Badge Maillot en jeu retiré */
.jersey-prize {
  display: none !important;
}

/* V63 — Fade des ballons plus court et invisible avant suppression */
.victory-ball-physics {
  transition: opacity 0.12s linear;
}



/* V64 — Progress bar gauche/droite */
.progress-v64 {
  position: relative;
  display: flex !important;
  height: 12px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
}

.progress-v64 .progress-side {
  position: absolute;
  top: 0;
  bottom: 0;
  height: 100%;
  transition: width 0.25s ease;
}

.progress-v64 .progress-left {
  right: 50%;
  transform-origin: right center;
  background: linear-gradient(90deg, rgba(70, 242, 166, 0.38), var(--green));
}

.progress-v64 .progress-right {
  left: 50%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--blue), rgba(94, 167, 255, 0.38));
}

.progress-v64 .progress-center-line {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 10px rgba(255,255,255,0.32);
  z-index: 3;
}

.progress-labels-v64 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.progress-labels-v64 span {
  min-width: 0;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-labels-v64 span:last-child {
  text-align: right;
}
