/* Généré par scripts/roue-vitrine.mjs depuis src/web/jeu/jeu.css : ne pas modifier à la main. */
.wheel__label,
.wheel__hub-text {
  font-family: var(--font-display);
  font-weight: var(--fw-display);
  font-synthesis: none;
}
/* ---------- Roue ---------- */

.wheel {
  position: relative;
  flex: none;
  width: var(--wheel);
  height: var(--wheel);
  z-index: 1;
  --label-k: 0.29;
}

.wheel__base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 calc(10 * var(--u)) calc(26 * var(--u)) var(--shadow-1), 0 calc(2 * var(--u)) calc(5 * var(--u)) var(--shadow-2);
}

.wheel__disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  will-change: transform;
}

.wheel__svg {
  width: 100%;
  height: 100%;
}

.wheel__labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.wheel__label {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: calc(var(--wheel) * 0.077 * var(--fit, 1));
  line-height: 1;
  letter-spacing: 0.012em;
  white-space: nowrap;
  text-transform: uppercase;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  /* Fixé sur sa part et couché sur le rayon : se lit du centre vers le bord, comme une vraie roue. */
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(-1 * var(--wheel) * var(--c, var(--label-k)))) rotate(var(--turn, -90deg));
}
.wheel__label--two {
  line-height: 0.92;
  text-align: center;
}
.wheel__label--dark {
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Surbrillance du lot gagnant : calque à part, seule son opacité s'anime. */
.wheel__hl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.wheel__hl path {
  fill: var(--hl, #ffffff);
  fill-opacity: 0.18;
  stroke: var(--hl, #ffffff);
  stroke-width: 4;
  stroke-linejoin: round;
}
.wheel__hl.is-win {
  animation: win-glow 1.5s var(--ease-out) both;
}
@keyframes win-glow {
  0% {
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  45% {
    opacity: 0.35;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0.85;
  }
}

/* Pointeur : pivote autour de son ergot quand un picot le pousse. */
.wheel__pointer {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: calc(var(--wheel) * -0.056);
  width: calc(var(--wheel) * 0.112);
  margin-left: calc(var(--wheel) * -0.056);
  pointer-events: none;
}
.wheel__pointer svg {
  width: 100%;
  height: auto;
  overflow: visible;
  transform-origin: 50% 27%;
  will-change: transform;
}

/* Bouton central (texte du restaurant, « Lancer » par défaut) */
.wheel__hub {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: calc(var(--wheel) * 0.278);
  height: calc(var(--wheel) * 0.278);
  margin: calc(var(--wheel) * -0.139) 0 0 calc(var(--wheel) * -0.139);
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--p-on);
  background-color: var(--p);
  background-image: radial-gradient(circle at 50% 28%, var(--p-light) 0%, var(--p) 50%, var(--p-dark) 100%);
  box-shadow: 0 0 0 calc(var(--wheel) * 0.0135) var(--frame, #ffffff), 0 0 0 calc(var(--wheel) * 0.0135 + 1px) var(--frame-line, var(--line)), 0 calc(var(--wheel) * 0.016) calc(var(--wheel) * 0.04) var(--shadow-3),
    inset 0 2px 2px rgba(255, 255, 255, 0.16), inset 0 -6px 12px rgba(0, 0, 0, 0.28);
  transition: transform 140ms var(--ease-out), filter 140ms var(--ease-out);
}
.wheel__hub:active {
  transform: scale(0.95);
  filter: brightness(0.94);
}
.wheel__hub:focus {
  outline: none;
}
.wheel__hub:focus-visible {
  outline: 3px solid var(--a);
  outline-offset: calc(var(--wheel) * 0.0135 + 4px);
}
.wheel__hub[aria-disabled='true'] {
  cursor: default;
}
.wheel__hub[aria-disabled='true']:active {
  transform: none;
  filter: none;
}

.wheel__hub-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: calc(var(--wheel) * 0.08 * var(--hub-fit, 1));
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 1px 2px var(--on-p-shadow);
  padding-top: calc(var(--wheel) * 0.012);
}
.wheel__hub-label {
  display: block;
  white-space: nowrap;
  text-align: center;
}
.wheel__hub-text--two .wheel__hub-label {
  line-height: 0.95;
}
.wheel__hub-text::after {
  content: '';
  display: block;
  width: calc(var(--wheel) * 0.098);
  height: max(2px, calc(var(--wheel) * 0.0066));
  margin-top: calc(var(--wheel) * 0.024);
  border-radius: 2px;
  background: currentColor;
  opacity: 0.95;
}

/* Halo d'invitation, seulement quand la roue attend un lancer. */
.wheel__hub::before {
  content: '';
  position: absolute;
  top: calc(var(--wheel) * -0.0135);
  left: calc(var(--wheel) * -0.0135);
  right: calc(var(--wheel) * -0.0135);
  bottom: calc(var(--wheel) * -0.0135);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  opacity: 0;
  pointer-events: none;
}
.is-idle .wheel__hub::before {
  animation: hub-call 2.8s var(--ease-out) 0.6s infinite;
}
@keyframes hub-call {
  0% {
    transform: scale(1);
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  55%,
  100% {
    transform: scale(1.42);
    opacity: 0;
  }
}

/* Attente de la réponse du serveur avant le lancer */
.is-waiting .wheel__hub-text {
  opacity: 0.6;
}
.is-waiting .wheel__hub::before {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
  animation: hub-wait 800ms linear infinite;
}
@keyframes hub-wait {
  to {
    transform: rotate(360deg);
  }
}

.wu-confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 60;
}
