/* ══════════════ ROUE DE LA CHANCE — popup ══════════════ */

#rw-overlay {
  --rw-green-dark: #1C453F;
  --rw-green-light: #78A584;
  --rw-orange: #CD7728;
  --rw-orange-light: #FCC189;
  --rw-cream: #FBEFE3;
  --rw-cream-2: #FFF4E6;

  position: fixed;
  inset: 0;
  z-index: 2500; /* sous le coming-soon (3000), au-dessus du reste */
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
#rw-overlay.rw-open { display: flex; }

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

.rw-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: auto;
  background: #FFF;
  border-radius: 24px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  animation: rw-pop 0.25s ease-out;
}
@keyframes rw-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.rw-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #333;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 12px;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.rw-close:hover { background: #F2F2F2; }
.rw-close:focus,
.rw-close:focus-visible {
  outline: none;
  box-shadow: none;
}

.rw-title {
  font-size: 22px;
  font-weight: 700;
  color: #000;
  margin: 12px 0 8px;
}
.rw-subtitle {
  font-size: 15px;
  line-height: 1.45;
  color: #444;
  margin: 0 0 20px;
}

/* ---- Roue ---- */
.rw-wheel-wrap {
  position: relative;
  width: 260px;
  height: 260px;
  margin: 0 auto 20px;
}
.rw-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: var(--rw-orange);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.25));
}
.rw-wheel {
  width: 260px;
  height: 260px;
  transform: rotate(0deg);
}
.rw-wheel.rw-spinning {
  transition: transform 3.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/* ---- Boutons ---- */
.rw-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #FFF;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.05s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.rw-btn:focus,
.rw-btn:focus-visible {
  outline: none;
  box-shadow: none;
}
.rw-btn:active { transform: scale(0.99); }
.rw-btn:disabled { opacity: 0.7; cursor: default; }
.rw-btn-spin {
  background: linear-gradient(90deg, var(--rw-orange), var(--rw-orange-light));
}
.rw-btn-confirm {
  background: linear-gradient(90deg, var(--rw-green-dark), var(--rw-green-light));
}

.rw-disclaimer {
  font-size: 11px;
  line-height: 1.45;
  color: #666;
  margin-top: 16px;
}

/* ---- Formulaire ---- */
.rw-field { width: 100%; margin-bottom: 14px; text-align: left; }
.rw-row { display: flex; gap: 12px; }
.rw-row .rw-field { flex: 1; }
.rw-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
}
.rw-input {
  width: 100%;
  min-height: 52px;
  padding: 14px;
  font-size: 17px;
  color: #000;
  border: 1.5px solid #BBB;
  border-radius: 12px;
  background: #FFF;
  font-family: inherit;
}
.rw-input:focus {
  outline: none;
  border-color: var(--rw-green-dark);
  box-shadow: 0 0 0 3px rgba(28, 69, 63, 0.12);
}
.rw-input::placeholder { color: #8A8A8A; }

.rw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rw-chip {
  padding: 10px 14px;
  border: 1.5px solid #BBB;
  border-radius: 20px;
  background: #FFF;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  font-family: inherit;
}
.rw-chip[aria-pressed="true"] {
  background: var(--rw-green-dark);
  border-color: var(--rw-green-dark);
  color: #FFF;
  font-weight: 700;
}
.rw-chip:focus-visible {
  outline: 2px solid var(--rw-green-dark);
  outline-offset: 2px;
}

.rw-error {
  font-size: 14px;
  font-weight: 600;
  color: #B0291C;
  margin: 0 0 10px;
}

.rw-consent {
  font-size: 12px;
  line-height: 1.5;
  color: #666;
  text-align: left;
  margin: 0 0 14px;
}
.rw-consent a {
  color: var(--rw-green-dark);
  font-weight: 600;
}

.rw-email-strong { font-weight: 600; color: var(--rw-green-dark); }

/* spinner */
.rw-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #FFF;
  border-radius: 50%;
  animation: rw-rotate 0.7s linear infinite;
}
@keyframes rw-rotate { to { transform: rotate(360deg); } }

/* confetti canvas */
#rw-confetti {
  position: fixed;
  inset: 0;
  z-index: 2600;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .rw-wheel.rw-spinning { transition-duration: 0.8s; }
  .rw-card { animation: none; }
}

/* Bouton flottant cadeau */
.rw-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2400;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(135deg, #CD7728, #FCC189);
  box-shadow: 0 6px 20px rgba(205, 119, 40, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.rw-fab-icon {
  font-size: 28px;
  line-height: 1;
  display: block;
}
.rw-fab-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 12px;
  height: 12px;
  background: #E53935;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.rw-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 28px rgba(205, 119, 40, 0.55);
}
.rw-fab:active {
  transform: scale(0.97);
  outline: none;
  border: none;
  box-shadow: 0 6px 20px rgba(205, 119, 40, 0.45);
}
.rw-fab:focus,
.rw-fab:focus-visible {
  outline: none;
  border: none;
  box-shadow: 0 6px 20px rgba(205, 119, 40, 0.45);
}

@media (max-width: 768px) {
  .rw-fab {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
  }
}
