/*
 * STYLES DE LA ROUE DE LA FORTUNE — portable, pas spécifique à Prospecto.
 *
 * ⭐ TOUT PASSE PAR DES VARIABLES CSS SCOPÉES SUR `.roue-widget`, PAS SUR
 *    `:root`. Un fichier qui pose ses couleurs sur `:root` écraserait celles
 *    du site hôte (Prospecto a déjà `--blue`, `--accent`…) ; les scoper sur
 *    la racine du composant permet à Lumsolar de reprendre ce fichier à
 *    l'identique et de changer juste ses couleurs avec une règle `.roue-widget{...}`
 *    ajoutée APRÈS cet import, sans toucher au fichier lui-même.
 */
.roue-widget {
  --roue-ink: #0f1b2d;
  --roue-dim: #5a6678;
  --roue-line: #e6ebf2;
  --roue-accent: #1e9e6a;
  --roue-blue: #1d4ed8;
  --roue-rouge: #9b2c2c;
  --roue-bg: #fff;
  font-family: Inter, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* ⚠️ À MI-HAUTEUR, PAS EN BAS À DROITE. Le coin bas-droit est déjà occupé par
   la bulle de discussion : deux pastilles rondes empilées au même endroit se
   confondent, et l'une masque l'autre sur un téléphone. On remonte donc au
   milieu du bord droit, où rien ne se dispute la place. */
/* ⛔ LE BOUTON N'EST PLUS POSITIONNÉ LUI-MÊME. C'est son enveloppe qui est
   fixée et centrée ; laisser `position: fixed` ici le placerait DEUX FOIS et
   le sortirait de la rangée qui porte l'étiquette. Il redevient un simple
   élément de flux dans son conteneur flex. */
.roue-fab {
  position: static;
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 0;
  background: var(--roue-accent, #1e9e6a);
  color: #fff;
  font-size: 38px;
  line-height: 84px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 27, 45, 0.28);
  animation: roue-respire 2.6s ease-in-out infinite;
}
.roue-fab:hover { filter: brightness(1.08); }
/* ⛔ LA PULSATION DOIT COMPOSER AVEC LE CENTRAGE. `transform: scale()` seul
   remplacerait le `translateY(-50%)` qui centre le bouton : il sauterait d'une
   demi-hauteur à chaque battement. Les deux transformations sont donc écrites
   ensemble, dans le bon ordre. */
@keyframes roue-respire {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}
/* ⚠️ Respecte la préférence système : une pulsation continue dérange
   davantage qu'elle n'attire chez qui a demandé moins de mouvement. */
@media (prefers-reduced-motion: reduce) {
  .roue-fab { animation: none; }
}

.roue-fond {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(10, 18, 30, 0.72);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.roue-fond[hidden] { display: none; }

.roue-boite {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 94vh;
  overflow-y: auto;
  background: var(--roue-bg, #fff);
  border-radius: 20px;
  padding: 30px 24px 26px;
  text-align: center;
  color: var(--roue-ink);
}

.roue-x {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  color: var(--roue-dim);
  cursor: pointer;
}

.roue-titre { margin: 0 0 4px; font-size: 23px; font-weight: 900; }
.roue-sous-titre { margin: 0 0 16px; color: var(--roue-dim); font-size: 14.5px; }

.roue-zone {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 6px auto 18px;
}
.roue-canvas {
  width: 300px;
  height: 300px;
  /* ⚠️ `transform` est posé/animé en JS (voir roue.js) : il ne faut RIEN
     mettre ici qui entre en conflit avec la rotation calculée. */
  will-change: transform;
}
.roue-pointeur {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 22px solid var(--roue-rouge, #9b2c2c);
  z-index: 2;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.roue-btn {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  background: var(--roue-blue, #1d4ed8);
  color: #fff;
  font-weight: 800;
  font-size: 15.5px;
  cursor: pointer;
}
.roue-btn:disabled { opacity: 0.55; cursor: wait; }
.roue-btn:hover:not(:disabled) { filter: brightness(1.06); }

.roue-annonce {
  min-height: 20px;
  margin: 12px 0 0;
  font-weight: 700;
  color: var(--roue-accent, #1e9e6a);
}

.roue-bloc { margin-top: 16px; text-align: left; border-top: 1px solid var(--roue-line); padding-top: 16px; }
.roue-bloc p { color: var(--roue-dim); font-size: 14px; margin: 0 0 10px; }
.roue-bloc h3 { margin: 0 0 10px; font-size: 17px; font-weight: 800; text-align: center; }

.roue-form-email { display: flex; gap: 8px; }
.roue-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--roue-line);
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 16px; /* ⚠️ 16px mini : sous ce seuil Safari iOS zoome seul au focus */
}
.roue-form-email .roue-btn { width: auto; white-space: nowrap; }

.roue-msg { min-height: 18px; margin: 8px 0 0; font-size: 13.5px; }
.roue-msg.ok { color: var(--roue-accent, #1e9e6a); font-weight: 700; }
.roue-msg.ko { color: var(--roue-rouge, #9b2c2c); font-weight: 700; }

.roue-liste-gains { list-style: none; margin: 0 0 14px; padding: 0; }
.roue-liste-gains li {
  padding: 9px 12px;
  border: 1px solid var(--roue-line);
  border-radius: 10px;
  margin-bottom: 7px;
  font-weight: 700;
  font-size: 14.5px;
  text-align: center;
}

/* ─── ÉTIQUETTE AU SURVOL ─────────────────────────────────────────────────────
   ⚠️ Elle sort VERS LA GAUCHE : à droite il n'y a pas de place, elle sortirait
      de l'écran. Et elle n'intercepte jamais le clic (`pointer-events: none`),
      sinon elle volerait le survol au bouton qu'elle décrit.
   ⚠️ Masquée sous 900 px : sur un téléphone il n'y a ni survol ni largeur. */
.roue-fab-enveloppe {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
}
.roue-bulle {
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity .18s ease, transform .18s ease;
  max-width: 230px;
  background: #0f1b2d;
  color: #fff;
  font: 600 13.5px/1.45 Inter, -apple-system, 'Segoe UI', Arial, sans-serif;
  padding: 10px 13px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(10, 18, 30, .28);
}
.roue-bulle b { color: #9ff0dd; display: block; font-size: 14px; margin-bottom: 2px; }
.roue-fab-enveloppe:hover .roue-bulle,
.roue-fab-enveloppe:focus-within .roue-bulle { opacity: 1; transform: translateX(0); }
@media (max-width: 900px) { .roue-bulle { display: none; } }
