/* ===== La Roue des Surprises ===== */
.roue-page { position: relative; overflow: clip; isolation: isolate; padding: calc(var(--hauteur-nav) + 24px) var(--gouttiere) 0; background: radial-gradient(circle at 50% 42%, rgba(191, 145, 73, .2), transparent 44%), var(--noir); }
/* Habillage saisonnier retirable : ROUE_SAISON dans .env. Aucune règle du tirage n'en dépend. */
.roue-saison-noel { background: radial-gradient(circle at 50% 42%, rgba(191, 145, 73, .2), transparent 44%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84'%3E%3Cg stroke='%236e1520' stroke-width='1.2' stroke-linecap='round' opacity='.26'%3E%3Cpath d='M42 31v22M32.5 36.5l19 11M32.5 47.5l19-11M42 35l-3-3M42 35l3-3M42 49l-3 3M42 49l3 3'/%3E%3C/g%3E%3C/svg%3E"), var(--noir); }
.roue-neige { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.roue-branches { position: absolute; left: 0; top: var(--hauteur-nav); z-index: 1; width: 100%; height: clamp(120px, 22vh, 220px); pointer-events: none; -webkit-mask: linear-gradient(90deg, #000 20%, transparent 36%, transparent 64%, #000 80%); mask: linear-gradient(90deg, #000 20%, transparent 36%, transparent 64%, #000 80%); }
.roue-boule { position: absolute; top: var(--hauteur-nav); z-index: 1; width: 30px; height: calc(var(--fil) + 30px); transform-origin: 50% 0; pointer-events: none; background: linear-gradient(#d8b061, #d8b061) center top / 1px var(--fil) no-repeat; animation: roue-balance 5s ease-in-out infinite; filter: drop-shadow(0 8px 8px rgba(0, 0, 0, .6)); }
.roue-boule::after { content: ''; position: absolute; left: 0; bottom: 0; width: 30px; height: 30px; border-radius: 50%; }
.roue-boule-or::after { background: radial-gradient(circle at 34% 30%, #fffaf0, #f4dfae 16%, #c99a4a 62%, #4f3512); }
.roue-boule-bordeaux::after { background: radial-gradient(circle at 34% 30%, #fffaf0, #c9545c 16%, #7a1620 62%, #2a0509); }
.roue-boule-creme::after { background: radial-gradient(circle at 34% 30%, #fffaf0, #fff1cf 16%, #e8d3a0 62%, #7c6132); }

.roue-tete { position: relative; z-index: 2; text-align: center; }
.roue-titre-affiche { margin: 0; font: 500 clamp(22px, 3vw, 46px)/1.15 var(--police-titre); letter-spacing: .14em; text-transform: uppercase; color: var(--creme); text-shadow: 0 0 22px rgba(255, 214, 140, .35); }
.roue-sous-titre { margin: 4px 0 0; font: italic 500 clamp(20px, 1.8vw, 27px) var(--police-accent); color: var(--or-pale); }

.roue-echeance { margin: 2px 0 0; font-size: 13px; color: var(--or-pale); }
.roue-jeu { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(28px, 4vw, 80px); margin-top: 8px; }
.roue-col { width: min(100%, 340px); }
.roue-col-g { justify-self: end; }
.roue-col-d { justify-self: start; }
.roue-col h2 { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--ligne-forte); font: italic 500 clamp(28px, 2.4vw, 36px)/1.1 var(--police-accent); color: var(--or-clair); }
.roue-gains, .roue-etapes { margin: 0; padding: 0; list-style: none; }
.roue-gains li { padding: 11px 0; border-bottom: 1px solid var(--ligne-forte); font: italic 500 clamp(21px, 1.7vw, 26px)/1.2 var(--police-accent); color: var(--creme); }
.roue-etapes { counter-reset: e; }
.roue-etapes li { counter-increment: e; display: grid; grid-template-columns: 38px 1fr; padding: 12px 0; border-bottom: 1px solid var(--ligne-forte); color: var(--creme); }
.roue-etapes li::before { content: counter(e); display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--or-clair); border-radius: 50%; font: italic 500 18px/1 var(--police-accent); color: var(--or-clair); }

.roue-cadre { position: relative; width: min(62vh, 42vw, 640px); aspect-ratio: 1; margin: 10% 8% 7%; }
.roue { position: relative; display: block; width: 100%; height: 100%; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .8)); }
.roue-couronne { position: absolute; inset: -14%; width: 128%; height: 128%; pointer-events: none; }
.roue-jante { fill: #d6ad66; }
.roue-case { stroke: #bf9149; transition: opacity .35s; }
.roue-fond-noir { fill: #0b0806; }
.roue-fond-bordeaux { fill: #6e1520; }
.roue-fond-or { fill: #e0b465; }
.roue-fond-creme { fill: #f2e6c8; }
.roue-posee .roue-case:not(.roue-case-gagnante) { opacity: .45; }
.roue-case-gagnante { stroke: #fff3cf; stroke-width: 2.5; }
.roue-texte { font: 600 14px var(--police-titre); fill: #1a1409; }
.roue-texte-clair { fill: #f7ecd2; }
.roue-flocon { fill: none; stroke: #6d4f1e; stroke-linecap: round; animation: roue-scintille 2.8s ease-in-out infinite; animation-delay: var(--i); }
.roue-flocon-clair { stroke: #e0b465; }
/* Ampoules de la jante : chenillard doux au repos, rapide pendant le tirage, toutes allumées à l'arrêt */
.roue-ampoule { fill: #fff4d6; filter: drop-shadow(0 0 2.5px #ffd98a) drop-shadow(0 0 5px rgba(255, 196, 90, .7)); animation: roue-clignote 1.6s steps(1) infinite; }
.roue-ampoule-b { animation-delay: -.8s; }
.roue-en-cours .roue-ampoule { animation-duration: .3s; }
.roue-en-cours .roue-ampoule-b { animation-delay: -.15s; }
.roue-posee .roue-ampoule { animation: none; }
.roue-pointeur { position: absolute; left: 50%; top: -3%; z-index: 3; width: 7%; transform: translateX(-50%); transform-origin: 50% 16%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .8)); }
.roue-pointeur path { fill: #e0b465; }
.roue-pointeur circle { fill: #120e08; }
.roue-noeud { position: absolute; left: 50%; top: -10.5%; z-index: 4; width: 15%; transform: translateX(-50%); pointer-events: none; }
.roue-noeud svg, .roue-noeud-paquet svg { display: block; width: 100%; }
.roue-velours { fill: #7a1620; }
.roue-bouton { position: absolute; z-index: 3; left: 50%; top: 50%; width: 28%; aspect-ratio: 1; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; border: 1px solid var(--or-clair); border-radius: 50%; background: radial-gradient(circle at 38% 28%, #241a0e, #060403 72%); color: var(--creme); font: 600 clamp(10px, .95vw, 13px)/1.2 var(--police-titre); letter-spacing: .05em; text-align: center; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .8); transition: transform .2s var(--courbe); }
.roue-bouton img { width: 40%; height: auto; }
button.roue-bouton:hover:not(:disabled) { transform: translate(-50%, -50%) scale(1.04); }
.roue-bouton:focus-visible { outline: 3px solid var(--creme); outline-offset: 3px; }
.roue-bouton:disabled { cursor: default; }
.roue-bouton-inactif { cursor: default; opacity: .8; }
.roue-erreur { margin: 0 0 10px; text-align: center; color: #f2c4b8; }
.roue-annonce { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.roue-acces { position: relative; z-index: 2; max-width: 460px; margin: 10px auto 22px; text-align: center; }
.roue-fin { position: relative; z-index: 2; margin: 28px auto; }
p.roue-fin { margin-block: 48px 56px; text-align: center; }
.roue-bandeau { position: relative; z-index: 2; overflow: hidden; margin: 8px calc(var(--gouttiere) * -1) 0; padding: 11px 0; white-space: nowrap; border-block: 1px solid var(--ligne-forte); background: rgba(8, 6, 5, .85); }
.roue-bandeau div { display: inline-block; animation: roue-defile 70s linear infinite; font: italic 500 21px var(--police-accent); color: var(--or-pale); }
.roue-bandeau span { margin: 0 24px; }
.roue-mentions { position: relative; z-index: 2; margin: 18px auto 34px; text-align: center; }
.roue-mentions p { margin: 0; font-size: 13px; color: var(--or-pale); }
.roue-mentions a { color: inherit; text-underline-offset: 3px; }
.roue-mentions a:hover { color: var(--creme); }
.roue-mentions form { margin-top: 6px; }

/* Fenêtres d'invitation et de résultat */
.roue-modale { max-width: none; max-height: 100dvh; margin: auto; padding: 0; overflow: auto; border: 0; background: none; color: var(--creme); }
.roue-modale::backdrop { background: rgba(3, 2, 1, .72); backdrop-filter: blur(3px); }
.roue-resultat { position: relative; overflow: hidden; width: min(92vw, 540px); margin-inline: auto; padding: 66px clamp(20px, 5vw, 48px) 28px; text-align: center; border: 1px solid var(--or-clair); border-radius: 20px; background: radial-gradient(circle at 50% 22%, rgba(191, 145, 73, .2), transparent 54%), radial-gradient(ellipse at 50% 118%, rgba(122, 22, 32, .62), transparent 62%), var(--noir-veine); box-shadow: 0 40px 90px rgba(0, 0, 0, .8); }
.roue-resultat:focus { outline: none; }
.roue-resultat-contenu { position: relative; z-index: 1; }
.roue-modale .roue-resultat-gain .roue-resultat-contenu { animation: roue-monte .6s 1.15s var(--courbe) backwards; }
.roue-resultat-logo { width: 92px; height: auto; margin: 0 auto 12px; }
.roue-resultat h2:not(.roue-titre-affiche) { margin: 6px 0 14px; font: italic 500 clamp(34px, 6vw, 50px)/1.08 var(--police-accent); color: var(--creme); }
.roue-resultat .roue-titre-affiche { font-size: clamp(21px, 3.6vw, 29px); letter-spacing: .1em; margin-bottom: 10px; }
.roue-note { margin: 4px 0 18px; color: var(--creme); }
.roue-plus-tard { display: block; min-height: 44px; margin: 4px auto 0; padding: 0 12px; background: none; border: 0; color: var(--or-pale); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.roue-fermer { position: absolute; top: 6px; right: 6px; z-index: 6; width: 44px; height: 44px; background: none; border: 0; color: var(--creme); font-size: 22px; line-height: 1; cursor: pointer; }
.roue-lot-image { width: 120px; height: 120px; margin: 0 auto 12px; object-fit: cover; border-radius: 50%; }
.roue-branches-carte { position: absolute; left: 0; top: -4px; width: 100%; height: 96px; pointer-events: none; -webkit-mask: linear-gradient(90deg, #000 22%, transparent 40%, transparent 60%, #000 78%); mask: linear-gradient(90deg, #000 22%, transparent 40%, transparent 60%, #000 78%); }
.roue-resultat .roue-boule { top: 0; width: 24px; height: calc(var(--fil) + 24px); }
.roue-resultat .roue-boule::after { width: 24px; height: 24px; }
/* Le paquet ne s'ouvre qu'en fenêtre ; au rechargement, le résultat s'affiche directement */
.roue-porte, .roue-ruban, .roue-noeud-paquet { display: none; pointer-events: none; }
.roue-modale .roue-porte, .roue-modale .roue-ruban, .roue-modale .roue-noeud-paquet { display: block; position: absolute; }
.roue-modale .roue-porte { z-index: 7; top: 0; bottom: 0; width: 50.5%; background: linear-gradient(rgba(14, 10, 6, .5), rgba(14, 10, 6, .5)), url("../images/marbre-vip-QxB5gSA.webp") center/cover; }
.roue-modale .roue-porte-g { left: 0; animation: roue-ouvre-g .8s .55s cubic-bezier(.7, 0, .2, 1) forwards; }
.roue-modale .roue-porte-d { right: 0; animation: roue-ouvre-d .8s .55s cubic-bezier(.7, 0, .2, 1) forwards; }
.roue-modale .roue-ruban { z-index: 8; background: #7a1620; box-shadow: 0 0 0 1px rgba(224, 180, 101, .55); animation: roue-efface .25s .45s forwards; }
.roue-modale .roue-ruban-v { left: calc(50% - 9px); top: 0; bottom: 0; width: 18px; }
.roue-modale .roue-ruban-h { left: 0; right: 0; top: calc(50% - 9px); height: 18px; }
.roue-modale .roue-noeud-paquet { z-index: 9; left: 50%; top: 50%; width: 130px; margin: -46px 0 0 -65px; animation: roue-denoue .5s .1s ease-in forwards; }

.roue-resultat .client-aide { margin: 0 0 18px; }

/* Sections de Mon compte */
.roue-code { margin: 14px 0; font: 700 clamp(18px, 4.6vw, 24px)/1.2 ui-monospace, Consolas, monospace; letter-spacing: .05em; color: var(--or-clair); overflow-wrap: anywhere; }
.roue-tableau { overflow-x: auto; }
.roue-tableau table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.roue-tableau caption { text-align: left; font-weight: 600; color: var(--creme); padding-bottom: 8px; }
.roue-tableau th, .roue-tableau td { padding: 8px 6px; border-bottom: 1px solid var(--ligne); text-align: left; color: var(--or-pale); }
.roue-cta { margin-top: 14px; display: inline-flex; min-height: 48px; align-items: center; max-width: 100%; }
.roue-historique { margin: 16px 0 0; padding: 0; list-style: none; }
.roue-historique li { padding: 10px 0; border-bottom: 1px solid var(--ligne); color: var(--or-pale); overflow-wrap: anywhere; }
.roue-historique a { color: var(--or-clair); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .roue-branches { height: 92px; -webkit-mask: linear-gradient(90deg, #000 14%, transparent 32%, transparent 68%, #000 86%); mask: linear-gradient(90deg, #000 14%, transparent 32%, transparent 68%, #000 86%); }
  .roue-page > .roue-boule { display: none; }
  .roue-jeu { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; }
  .roue-scene { order: 0; }
  .roue-col-d { order: 1; margin-bottom: 26px; }
  .roue-col-g { order: 2; margin-bottom: 26px; }
  .roue-col { width: min(100%, 460px); justify-self: center; }
  .roue-titre-affiche { letter-spacing: .06em; }
  .roue-cadre { --taille: min(84vw, max(46vh, 300px), 560px); width: var(--taille); margin: calc(var(--taille) * .14) 0 calc(var(--taille) * .12); }
  .roue-bouton { font-size: clamp(9px, 2.6vw, 12px); }
}
@keyframes roue-balance { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes roue-scintille { 50% { opacity: .35; } }
@keyframes roue-clignote { 50% { fill: #5a4320; filter: none; } }
@keyframes roue-defile { to { transform: translateX(-50%); } }
@keyframes roue-monte { from { opacity: 0; transform: translateY(16px); } }
@keyframes roue-ouvre-g { to { transform: translateX(-101%); visibility: hidden; } }
@keyframes roue-ouvre-d { to { transform: translateX(101%); visibility: hidden; } }
@keyframes roue-efface { to { opacity: 0; visibility: hidden; } }
@keyframes roue-denoue { 40% { transform: scale(1.08); } 100% { transform: scale(.55) rotate(16deg); opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .roue-page *, .roue-modale * { animation: none !important; transition: none !important; }
  .roue-modale .roue-porte, .roue-modale .roue-ruban, .roue-modale .roue-noeud-paquet { display: none; }
}

/* QR code du cadeau : plaque crème cernée d'or, assez claire pour tout lecteur */
.roue-qr { display: grid; justify-items: center; gap: 10px; margin: 6px auto 14px; }
.roue-qr-plaque { position: relative; width: min(190px, 56vw); padding: 16px; background: #fffaf0; border-radius: 4px; box-shadow: 0 0 0 1px #b98f45, 0 0 0 5px #fffaf0, 0 0 0 6px #e0b465, 0 14px 34px rgba(0, 0, 0, .55); }
.roue-qr-plaque svg { display: block; width: 100%; height: auto; }
.roue-qr figcaption { display: grid; gap: 2px; margin-top: 8px; text-align: center; font-size: 12px; color: var(--or-pale); }
.roue-qr .roue-code, .roue-qr-inactif .roue-code { margin: 0; font-size: 15px; letter-spacing: .08em; }
.roue-qr-inactif { display: grid; gap: 4px; margin: 8px 0; color: var(--or-pale); }
.roue-qr-inactif .roue-code { color: var(--or-pale); text-decoration: line-through; }
.roue-resultat-contenu:has(.roue-qr) .roue-resultat-logo { width: 56px; margin-bottom: 6px; }
.roue-modale .roue-fermer { z-index: 6; }

/* Tablette : la roue seule en haut, les deux colonnes dessous, pour éviter le texte serré */
@media (min-width: 901px) and (max-width: 1180px) {
  .roue-jeu { grid-template-columns: 1fr 1fr; }
  .roue-scene { grid-column: 1 / -1; order: -1; justify-self: center; }
  .roue-cadre { width: min(62vh, 60vw, 600px); }
  .roue-col { justify-self: center; }
}
@media (max-width: 480px) {
  .roue-texte { font-size: 15px; }
}
/* Téléphone en paysage : en-tête resserré, roue à la hauteur de l'écran */
@media (max-width: 900px) and (max-height: 500px) {
  .roue-page { padding-top: calc(var(--hauteur-nav) + 8px); }
  .roue-titre-affiche { font-size: 20px; }
  .roue-sous-titre, .roue-echeance { display: inline; margin: 0 4px; font-size: 13px; }
  .roue-cadre { --taille: min(84vw, calc(100dvh - 36px)); }
}
