/* ============================================================================
   Concours / roue quotidienne — World-Debrid
   Thème aurora / glassmorphism, autonome (couleurs en dur, ne dépend pas des
   variables du site). Le markup associé vit dans concours.php.
   ========================================================================== */

.concours-main {
  --c-violet: #7c5cff;
  --c-cyan: #22d3ee;
  --c-teal: #2dd4bf;
  --c-gold: #fbbf24;
  --c-pink: #f472b6;
  --c-ink: #eaf0ff;
  --c-muted: #8a9ac5;
  --font-d: "Space Grotesk", system-ui, sans-serif;
  --font-b: "DM Sans", system-ui, sans-serif;
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 16px 72px;
  text-align: center;
  font-family: var(--font-b);
}
/* le hero + la roue restent visuellement resserrés dans le conteneur élargi */
.concours-hero { max-width: 660px; margin: 0 auto; }
.concours-cta-note { margin-top: 12px; color: var(--c-muted); font-size: 13px; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.concours-hero h1 {
  font-family: var(--font-d);
  font-weight: 800;
  font-size: clamp(26px, 5.4vw, 42px);
  line-height: 1.06;
  letter-spacing: -.01em;
  margin: 0 0 10px;
  background: linear-gradient(115deg, #fff 8%, #cbb8ff 42%, #7fe9ff 88%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-flex;
  align-items: center;
  gap: .35em;
  flex-wrap: wrap;
  justify-content: center;
}
.concours-hero h1 .gift-inline {
  width: .92em;
  height: .92em;
  flex: 0 0 auto;
  transform: translateY(.04em);
}
.concours-sub {
  color: var(--c-muted);
  font-size: 15px;
  margin: 0 0 30px;
  font-weight: 400;
}

/* ── Wheel ────────────────────────────────────────────────────────────── */
.wheel-wrap {
  position: relative;
  width: min(420px, 86vw);
  aspect-ratio: 1;
  margin: 8px auto 0;
}
/* ambient colored glow cast onto the bg (slow rotation = living light) */
.wheel-wrap::before {
  content: "";
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
    rgba(124,92,255,.72), rgba(34,211,238,.62), rgba(45,212,191,.62),
    rgba(244,114,182,.62), rgba(251,191,36,.62), rgba(124,92,255,.72));
  filter: blur(58px);
  opacity: .40;
  z-index: 0;
  animation: cw-ambient 20s linear infinite;
}
.wheel-wrap::after {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,92,255,.28) 0%, transparent 70%);
  filter: blur(22px);
  z-index: 0;
  pointer-events: none;
}
@keyframes cw-ambient { to { transform: rotate(360deg); } }

svg.wheel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 26px 46px rgba(0,0,0,.55)) drop-shadow(0 8px 16px rgba(0,0,0,.38));
}
#rotor {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 5.2s cubic-bezier(.08,.58,.12,1);
}

/* confetti layer (above the wheel, never blocks clicks) */
.cw-fx {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  overflow: visible;
}
.cw-fx i { position: absolute; display: block; border-radius: 2px; }

/* pointer */
.cw-pointer {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: -4.5%;
  transform: translateX(-50%);
  width: 44px;
  height: 58px;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.7)) drop-shadow(0 3px 5px rgba(124,92,255,.55));
}
.cw-pointer svg { width: 100%; height: 100%; }

/* domed glass hub */
.cw-hub {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 23.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(115% 115% at 36% 28%,
    rgba(176,186,255,.95) 0%, rgba(96,106,200,.92) 30%,
    rgba(34,40,92,.98) 62%, rgba(8,10,26,1) 100%);
  border: 1.5px solid rgba(255,255,255,.34);
  box-shadow:
    0 14px 40px rgba(0,0,0,.7), 0 4px 12px rgba(0,0,0,.5),
    inset 0 2px 1px rgba(255,255,255,.6), inset 0 -3px 8px rgba(0,0,0,.62),
    inset 0 0 34px rgba(124,92,255,.32), inset 0 0 0 4px rgba(255,255,255,.05);
}
.cw-hub::before {
  content: "";
  position: absolute;
  width: 42%;
  height: 36%;
  border-radius: 50%;
  top: 9%;
  left: 15%;
  transform: rotate(-18deg);
  background: radial-gradient(closest-side, rgba(255,255,255,.85) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
  filter: blur(.3px);
}
.cw-hub::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.10);
  box-shadow: 0 0 0 2px rgba(124,92,255,.24), 0 0 16px 2px rgba(124,92,255,.26),
    inset 0 0 10px rgba(180,200,255,.18);
  pointer-events: none;
}
.cw-hub-ico {
  width: 56%;
  height: 56%;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.5));
  transition: transform .3s;
}

/* ── Spin button ──────────────────────────────────────────────────────── */
.concours-game #spinBtn {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 16px;
  color: #080a20;
  border: 0;
  border-radius: 999px;
  padding: 16px 44px;
  margin-top: 34px;
  cursor: pointer;
  letter-spacing: .01em;
  background: linear-gradient(105deg, #7afcff 0%, #7c5cff 52%, #ff7ad9 100%);
  box-shadow: 0 12px 32px rgba(124,92,255,.5), 0 4px 12px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.25);
  transition: transform .15s, box-shadow .2s, filter .2s;
  position: relative;
  overflow: hidden;
  animation: cw-pulse 2.8s ease-in-out infinite;
}
@keyframes cw-pulse {
  0%, 100% { box-shadow: 0 12px 32px rgba(124,92,255,.5), 0 4px 12px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.25); }
  50%      { box-shadow: 0 16px 40px rgba(124,92,255,.72), 0 4px 12px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(0,0,0,.25); }
}
.concours-game #spinBtn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 55%);
  pointer-events: none;
}
.concours-game #spinBtn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 20px 44px rgba(124,92,255,.65), 0 6px 16px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.5);
}
.concours-game #spinBtn:active:not(:disabled) { transform: translateY(-1px); }
.concours-game #spinBtn:disabled {
  filter: grayscale(.5) brightness(.62);
  cursor: default;
  transform: none;
  box-shadow: none;
  animation: none;
}

/* ── Result pill ──────────────────────────────────────────────────────── */
.spin-result {
  min-height: 36px;
  margin-top: 22px;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 18px;
  color: var(--c-ink);
  opacity: 0;
  transform: translateY(8px) scale(.96);
  transition: opacity .45s, transform .45s;
}
.spin-result.show { opacity: 1; transform: translateY(0) scale(1); }
.spin-result .pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.2);
}
.spin-result .pill svg { width: 22px; height: 22px; flex: 0 0 auto; }

/* ── Tickets / stats ──────────────────────────────────────────────────── */
.concours-stats {
  margin-top: 16px;
  color: var(--c-muted);
  font-size: 14px;
}
.concours-stats b { color: #fff; }

/* ── CTA / closed states ──────────────────────────────────────────────── */
.concours-cta,
.concours-closed { margin: 36px 0; color: var(--c-muted); }
.concours-cta .btn-primary { margin-top: 16px; display: inline-block; }

/* winning-segment flash */
.seg-win-flash { animation: cw-segpulse .7s ease forwards; }
@keyframes cw-segpulse {
  0%   { filter: brightness(1); }
  40%  { filter: brightness(1.55) saturate(1.4); }
  100% { filter: brightness(1.22) saturate(1.2); }
}

/* ============================================================================
   Sections de présentation / SEO (rendues pour tous, sous la roue/CTA)
   ========================================================================== */
.cc-section { padding: 54px 4px 0; text-align: center; }
.cc-kicker { font-family: var(--font-d); font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; font-size: 11px; color: var(--c-cyan); opacity: .85; margin: 0 0 8px; }
.cc-section h2 { font-family: var(--font-d); font-weight: 700; font-size: clamp(22px, 3.4vw, 30px);
  margin: 0 0 10px; color: #fff; }
.cc-concept .cc-lead { max-width: 760px; margin: 0 auto; color: #cdd6f5; font-size: 17px; line-height: 1.7; }

.cc-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.cc-card { position: relative; border-radius: 18px; padding: 24px 22px; text-align: left;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cc-card-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 14px;
  background: radial-gradient(120% 120% at 30% 25%, rgba(124,92,255,.5), rgba(34,211,238,.18));
  border: 1px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.cc-card-ico.cc-round { border-radius: 50%; }
.cc-card-ico svg { width: 26px; height: 26px; }
.cc-card h3 { font-family: var(--font-d); font-weight: 700; font-size: 17px; margin: 0 0 6px; color: #fff; }
.cc-card p { margin: 0; color: var(--c-muted); font-size: 14px; line-height: 1.55; }
.cc-num { position: absolute; top: 16px; right: 18px; font-family: var(--font-d); font-weight: 800;
  font-size: 30px; color: rgba(255,255,255,.10); line-height: 1; }

.cc-faq { max-width: 760px; margin: 8px auto 0; text-align: left; }
.cc-faq details { border: 1px solid rgba(255,255,255,.10); border-radius: 14px; margin-bottom: 12px;
  background: rgba(255,255,255,.035); overflow: hidden; }
.cc-faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-family: var(--font-d);
  font-weight: 600; font-size: 16px; color: #fff; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; }
.cc-faq summary::-webkit-details-marker { display: none; }
.cc-faq summary .cc-chev { flex: 0 0 auto; width: 20px; height: 20px; transition: transform .25s; color: var(--c-cyan); }
.cc-faq details[open] summary .cc-chev { transform: rotate(180deg); }
.cc-faq .cc-ans { padding: 0 20px 18px; color: var(--c-muted); font-size: 15px; line-height: 1.6; }

.cc-cta-band { margin: 64px auto 0; max-width: 760px; padding: 38px 24px; border-radius: 22px; text-align: center;
  background: radial-gradient(120% 140% at 50% 0%, rgba(124,92,255,.22), rgba(34,211,238,.06) 60%, transparent);
  border: 1px solid rgba(255,255,255,.12); }
.cc-cta-band h2 { font-family: var(--font-d); font-weight: 700; font-size: clamp(20px,3vw,28px); margin: 0 0 8px; color: #fff; }
.cc-cta-band p { color: var(--c-muted); margin: 0 0 22px; }

@media (max-width: 760px) { .cc-grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 430px) { .cc-grid4 { grid-template-columns: 1fr; } }

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #rotor { transition: transform 2.4s ease-out !important; }
  .wheel-wrap::before { animation: none; }
  .concours-game #spinBtn { animation: none; }
  .cc-faq summary .cc-chev { transition: none; }
}

/* ============================================================================
   Light theme (body[data-theme="arc"]) — le widget est volontairement
   autonome (voir en-tête de fichier) mais la page bascule quand même en
   fond clair via le thème global : sans ces overrides, le texte blanc et
   les glass-cards (pensés pour un fond sombre) deviennent illisibles.
   ========================================================================== */
body[data-theme="arc"] .concours-main {
  --c-ink: #0a0e27;
  --c-muted: rgba(10, 14, 39, 0.62);
  --c-cyan: #0e7490;
}

body[data-theme="arc"] .concours-hero h1 {
  background: linear-gradient(115deg, #0a0e27 8%, #6d28d9 42%, #0e7490 88%);
  -webkit-background-clip: text;
  background-clip: text;
}

body[data-theme="arc"] .concours-stats b,
body[data-theme="arc"] .cc-section h2,
body[data-theme="arc"] .cc-card h3,
body[data-theme="arc"] .cc-faq summary,
body[data-theme="arc"] .cc-cta-band h2 {
  color: #0a0e27;
}

body[data-theme="arc"] .spin-result .pill {
  background: rgba(10, 14, 39, 0.05);
  border-color: rgba(10, 14, 39, 0.12);
}

body[data-theme="arc"] .cc-card {
  background: linear-gradient(180deg, rgba(10, 14, 39, 0.05), rgba(10, 14, 39, 0.02));
  border-color: rgba(10, 14, 39, 0.1);
}

body[data-theme="arc"] .cc-faq details {
  background: rgba(10, 14, 39, 0.03);
  border-color: rgba(10, 14, 39, 0.1);
}

body[data-theme="arc"] .cc-cta-band {
  background: radial-gradient(120% 140% at 50% 0%, rgba(124, 92, 255, 0.12), rgba(34, 211, 238, 0.05) 60%, transparent);
  border-color: rgba(10, 14, 39, 0.1);
}
