body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: url("fondbg.jpg") repeat;
  font-family: Arial, sans-serif;
  display: block;
}

.container {
  text-align: center;
  padding: 20px;
  max-width: 700px;
  margin: auto;
}

.bandeau {
  display: block;
  max-width: 100%;
  height: auto;
  margin: auto;
  border: 5px solid #fff;
  border-radius: 5px;
}

.btn-participer {
  display: inline-block;
  padding: 15px 30px;
  font-size: 20px;
  background-color: #e31323;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: transform 0.3s ease;
  text-decoration: none;
  margin-top: 20px;
}

.btn-participer:hover {
  transform: scale(1.05);
  background-color: #b80f1a;
}

/* Styles pour la page de la roue */
.wheel-game {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.wheel-canvas-container {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 20px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#wheel-pointer,
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(180deg);
  width: 0;
  height: 0;
  border-left: 24px solid transparent;
  border-right: 24px solid transparent;
  border-bottom: 40px solid #f9cc6c;
  z-index: 2;
}

canvas#fortuneWheel {
  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  background: #fff;
  border: 8px solid #fff;
  display: block;
}

.btn-spin {
  padding: 15px 40px;
  font-size: 24px;
  background-color: #e31323;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-spin:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background-color: #b80f1a;
}

/* Overlay pour les résultats */
.result-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.result-content {
  background: white;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  max-width: 500px;
  width: 90%;
}

.result-message {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: bold;
}

.chances-message {
  font-size: 24px;
  margin-bottom: 30px;
  color: #333;
}

.share-message {
  font-size: 20px;
  margin: 20px 0;
  color: #666;
}

.daily-message {
  font-size: 18px;
  color: #888;
  margin-bottom: 30px;
}

.btn-close {
  padding: 12px 30px;
  font-size: 18px;
  background-color: #e31323;
  color: white;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-close:hover {
  transform: scale(1.05);
  background-color: #b80f1a;
}

.toggle-leaderboard-rect {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4000;
  background: #e31323;
  color: #fff;
  border: none;
  border-radius: 18px 0 0 18px;
  width: 45px;
  height: 190px;
  font-size: 1.5em;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: background 0.2s, right 0.5s, opacity 0.3s;
  padding: 5px;
  opacity: 1;
}

.toggle-leaderboard-rect .icon {
  font-size: 1.2em;
  line-height: 1;
  margin-bottom: 2px;
}

.toggle-leaderboard-rect .label {
  font-size: 18px;
  font-weight: bold;
  margin-top: 0;
  letter-spacing: 0.02em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-transform: uppercase;
  line-height: 1.1;
  user-select: none;
}

.toggle-leaderboard-rect.hide {
  opacity: 0;
  pointer-events: none;
}

.leaderboard {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 300px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  padding: 32px 20px 20px 20px;
  z-index: 3000;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.18, 1);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.leaderboard.visible {
  transform: translateX(0);
}

.close-leaderboard {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #333;
  font-size: 1.7em;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.close-leaderboard:hover {
  opacity: 1;
}

.leaderboard h3 {
  margin-top: 0;
  margin-bottom: 18px;
  font-size: 1.5em;
  color: #e31323;
  text-align: center;
}

.leaderboard table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}

.leaderboard th,
.leaderboard td {
  padding: 8px 4px;
  text-align: left;
  border-bottom: 1px solid #eee;
  font-size: 1.1em;
}

.leaderboard th {
  color: #888;
  font-weight: bold;
  background: none;
}

.leaderboard tbody tr:nth-child(odd) {
  background: #f8f8f8;
}

.leaderboard tbody tr:nth-child(even) {
  background: #fff;
}

.leaderboard-total {
  margin-top: 10px;
  text-align: center;
  color: #888;
  font-size: 1em;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

@media (max-width: 900px) {
  .leaderboard {
    width: 100vw;
    max-width: 100vw;
    padding: 18px 6vw 18px 6vw;
  }
  .toggle-leaderboard-rect {
    right: 0;
  }
}

.logo-jeu-rotate {
  display: block;
  position: fixed;
  top: 20px;
  left: 20px;
  max-width: 140px;
  width: 100%;
  transform: rotate(-7deg);
  transition: transform 0.3s;
}

/* --- Menu Jeu Navigation --- */
.jeu-nav {
  width: 100%;
  padding: 20px 0 10px 0;
  text-align: center;
  background: none;
  margin-top: 20px;
}
.jeu-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-block;
}
.jeu-nav ul li {
  display: inline-block;
  margin: 0 5px;
}
.jeu-nav-btn {
  display: inline-block;
  background: #cfd6e6;
  color: #fff;
  font-weight: 400;
  font-size: 18px;
  padding: 12px 32px;
  border-radius: 4px 4px 0 0;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 1px;
}
.jeu-nav-btn.active,
.jeu-nav-btn:hover {
  background: #1a3354;
  color: #fff;
}
