/* DANS LA FILE — v15.11 : 🌙 compte à rebours WebGL de la Nocturne + tout le site en mode nuit pendant la Nocturne */

/* ============================================================ 🎬 L'ÉCRAN DU COMPTE À REBOURS */
.nq-ov { position: fixed; inset: 0; z-index: 100000; overflow: hidden; color: #fff; background: #05031a;
  font-family: var(--font, system-ui); opacity: 0; transition: opacity .8s ease; display: grid; grid-template-rows: auto 1fr auto;
  padding: max(14px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); touch-action: none; user-select: none; -webkit-user-select: none; }
.nq-ov.in { opacity: 1; }
.nq-ov.out { opacity: 0; transition: opacity .6s ease; }
.nq-gl, .nq-fallback, .nq-grain { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.nq-gl { display: block; }
.nq-fallback { display: none; background: radial-gradient(60% 40% at 75% 25%, rgba(255, 196, 80, .35), transparent 60%),
  radial-gradient(80% 50% at 20% 30%, rgba(51, 225, 255, .18), transparent 70%), linear-gradient(180deg, #05031a, #170a3c 60%, #4a1240); }
.nq-ov.nogl .nq-gl { display: none; } .nq-ov.nogl .nq-fallback { display: block; }
.nq-grain { opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E"); }
.nq-top, .nq-mid, .nq-bot, .nq-big, .nq-open { position: relative; z-index: 2; }
.nq-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nq-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 99px; font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  background: rgba(10, 6, 40, .55); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.nq-pill i { width: 8px; height: 8px; border-radius: 50%; background: #ff4f7a; box-shadow: 0 0 10px #ff4f7a; animation: nqBlink 1.2s infinite; }
.nq-mute { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(10, 6, 40, .55); color: #fff; font-size: 1.1rem; cursor: pointer; }
.nq-mute:focus-visible, .nq-skip:focus-visible, .nq-go:focus-visible { outline: 3px solid #ffd84a; outline-offset: 3px; }

.nq-mid { align-self: center; text-align: center; transition: transform .8s cubic-bezier(.2, .8, .2, 1), opacity .5s; }
.nq-kicker { margin: 0 0 6px; font-size: clamp(.72rem, 2.6vw, .9rem); letter-spacing: .38em; text-transform: uppercase; color: #ffe08a; text-shadow: 0 0 14px rgba(255, 196, 80, .6); }
.nq-title { margin: 0; font-family: var(--font-title, 'Russo One', system-ui); font-weight: 400; line-height: .95; font-size: clamp(2.6rem, 13vw, 7.5rem); letter-spacing: .04em; white-space: nowrap; }
.nq-title span { display: inline-block; opacity: 0; color: #fff; transform: translateY(.4em) scale(.8); filter: blur(10px);
  text-shadow: 0 0 6px #fff, 0 0 18px #33e1ff, 0 0 42px #9b6bff, 0 0 80px #ff4fb3;
  animation: nqLetter 1.1s cubic-bezier(.2, .9, .2, 1) forwards, nqFlicker 6s 2s infinite; animation-delay: calc(.6s + var(--i) * .09s), calc(2.2s + var(--i) * .37s); }
.nq-line { min-height: 4.2em; margin-top: clamp(14px, 3vh, 26px); opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
.nq-line.show { opacity: 1; transform: none; }
.nq-line b { display: block; font-family: var(--font-title, system-ui); font-weight: 400; font-size: clamp(1.25rem, 5.4vw, 2.3rem); color: #ffe08a; text-shadow: 0 0 22px rgba(255, 196, 80, .55); }
.nq-line span { display: block; margin-top: 4px; font-size: clamp(.95rem, 3.6vw, 1.2rem); color: #d9dcff; }

.nq-big { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; z-index: 3; }
.nq-big span { font-family: var(--font-title, system-ui); font-size: min(62vw, 58vh); line-height: 1; color: #fff;
  text-shadow: 0 0 20px #fff, 0 0 60px #33e1ff, 0 0 120px #ff4fb3; animation: nqNum 1s cubic-bezier(.15, .9, .2, 1) forwards; }
.nq-ov.final .nq-mid { opacity: .0; transform: scale(.85); }

.nq-bot { display: grid; gap: 10px; justify-items: center; text-align: center; padding-bottom: 4px; }
.nq-clock { display: grid; justify-items: center; }
.nq-clock small { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: #b9c2ea; }
.nq-clock b { font-family: var(--font-title, system-ui); font-weight: 400; font-variant-numeric: tabular-nums; font-size: clamp(2.6rem, 12vw, 4.6rem); line-height: 1.05;
  color: #fff; text-shadow: 0 0 18px rgba(51, 225, 255, .8), 0 0 40px rgba(155, 107, 255, .6); transition: color .3s, transform .3s; }
.nq-ov.hot .nq-clock b { color: #ffe08a; text-shadow: 0 0 18px rgba(255, 196, 80, .9), 0 0 50px rgba(255, 79, 179, .7); animation: nqPulse 1s infinite; }
.nq-here { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 99px; background: rgba(10, 6, 40, .6);
  border: 1px solid rgba(255, 216, 74, .35); box-shadow: 0 0 calc(10px + var(--here, 0) * 30px) rgba(255, 196, 80, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 1rem; }
.nq-here b { font-family: var(--font-title, system-ui); font-weight: 400; font-size: 1.35rem; color: #ffe08a; font-variant-numeric: tabular-nums; }
.nq-here em { font-style: normal; color: #eef2ff; }
.nq-dots { position: relative; width: 26px; height: 26px; }
.nq-dots::before, .nq-dots::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #3ee39b; animation: nqRing 1.8s infinite; }
.nq-dots::after { animation-delay: .9s; }
.nq-bar { width: min(520px, 86vw); height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.nq-bar i { display: block; height: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #33e1ff, #9b6bff, #ff4fb3, #ffd84a); box-shadow: 0 0 12px #9b6bff; }
.nq-pause { margin: 0; font-size: .85rem; color: #c9ccf2; max-width: 34em; }
.nq-skip { min-height: 40px; padding: 8px 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(10, 6, 40, .6); color: #fff; cursor: pointer; font: inherit; }

.nq-ov.zero .nq-bot, .nq-ov.zero .nq-mid { opacity: 0; transition: opacity .4s; }
.nq-open { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; padding: 24px; z-index: 4; }
.nq-open[hidden] { display: none; }
.nq-open h2 { margin: 0; font-family: var(--font-title, system-ui); font-weight: 400; font-size: clamp(2.2rem, 10vw, 5.6rem); line-height: 1; color: #fff;
  text-shadow: 0 0 10px #fff, 0 0 40px #ffd84a, 0 0 90px #ff4fb3; animation: nqOpen 1s cubic-bezier(.15, .9, .2, 1) both; }
.nq-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; animation: nqUp .7s .35s both; }
.nq-chips span { padding: 8px 14px; border-radius: 99px; background: rgba(10, 6, 40, .65); border: 1px solid rgba(255, 216, 74, .4); font-weight: 700; }
.nq-go { animation: nqUp .7s .6s both; min-height: 52px; font-size: 1.1rem; }

.nq-ov.calm .nq-title span { animation: nqFade .6s forwards; animation-delay: .2s; filter: none; transform: none; }
.nq-ov.calm .nq-big span, .nq-ov.calm .nq-open h2 { animation: nqFade .3s forwards; }
.nq-ov.calm .nq-clock b, .nq-ov.calm .nq-pill i, .nq-ov.calm .nq-dots::before, .nq-ov.calm .nq-dots::after { animation: none; }

@keyframes nqLetter { to { opacity: 1; transform: none; filter: none; } }
@keyframes nqFlicker { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .35; } 94% { opacity: 1; } 96% { opacity: .55; } 97% { opacity: 1; } }
@keyframes nqNum { 0% { opacity: 0; transform: scale(2.4); filter: blur(18px); } 25% { opacity: 1; transform: scale(1); filter: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.55); filter: blur(6px); } }
@keyframes nqPulse { 50% { transform: scale(1.06); } }
@keyframes nqBlink { 50% { opacity: .25; } }
@keyframes nqRing { 0% { transform: scale(.35); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes nqOpen { 0% { opacity: 0; transform: scale(1.8); letter-spacing: .4em; filter: blur(16px); } 100% { opacity: 1; transform: none; letter-spacing: .02em; filter: none; } }
@keyframes nqUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes nqFade { to { opacity: 1; } }

/* ============================================================ 🌌 TOUT LE SITE EN MODE NUIT (pendant la Nocturne) */
html.noct-on {
  --bg: #05031a; --bg2: #120838; --surface: #150c3a; --surface2: #21134f; --surface3: #2c1a66;
  --ink: #f3efff; --ink2: #cdc4f2; --ink3: #a49ad6;
  --line: rgba(190, 150, 255, .22);
  --primary: #b07bff; --primary2: #d4b6ff; --neon: #33e1ff; --pink: #ff4fb3; --violet: #b07bff; --gold: #ffd25a; --gold2: #ffe9a8;
  --shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(190, 150, 255, .14);
  --glow-blue: 0 0 18px rgba(176, 123, 255, .5); --glow-gold: 0 0 26px rgba(255, 210, 90, .6);
  background: radial-gradient(700px 420px at 85% -6%, rgba(255, 205, 90, .16), transparent 60%),
    radial-gradient(900px 600px at 10% 0%, rgba(51, 225, 255, .10), transparent 60%),
    radial-gradient(1000px 700px at 50% 115%, rgba(255, 79, 179, .16), transparent 60%),
    linear-gradient(180deg, #05031a, #120838 70%, #1c0a3a) #05031a;
  background-attachment: fixed;
}
/* le fond passe sur <html> pour que le ciel étoilé (z-index -1) se voie derrière le contenu */
html.noct-on body { background: transparent; }
html.noct-on body::before { opacity: .18; }
#noct-sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
#noct-sky i { position: absolute; display: block; }
.ns-stars { inset: -50%; background-repeat: repeat;
  background-image: radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 120px 80px, #fff, transparent),
    radial-gradient(1.2px 1.2px at 200px 160px, #dfe6ff, transparent), radial-gradient(1px 1px at 60px 190px, #fff, transparent),
    radial-gradient(1.6px 1.6px at 240px 40px, #ffe9a8, transparent), radial-gradient(1px 1px at 160px 230px, #fff, transparent);
  background-size: 260px 260px; opacity: .55; animation: nsDrift 160s linear infinite; }
.ns-stars.b { background-size: 410px 410px; opacity: .35; animation-duration: 260s; animation-direction: reverse; }
.ns-aurora { left: -20%; right: -20%; top: -10%; height: 55%; filter: blur(40px); opacity: .32;
  background: linear-gradient(100deg, transparent 10%, rgba(51, 225, 255, .55) 30%, rgba(176, 123, 255, .5) 50%, rgba(255, 79, 179, .45) 70%, transparent 90%);
  animation: nsAurora 22s ease-in-out infinite alternate; }
.ns-moon { width: 120px; height: 120px; right: 6vw; top: calc(70px + env(safe-area-inset-top)); border-radius: 50%; opacity: .85;
  background: radial-gradient(circle at 38% 35%, #fff6d6, #ffd98a 55%, #e8a94a);
  box-shadow: 0 0 40px rgba(255, 210, 90, .55), 0 0 120px rgba(255, 190, 60, .3), inset -14px -10px 30px rgba(160, 90, 30, .35); }
html.noct-on .topbar { background: rgba(8, 4, 30, .78); border-bottom-color: rgba(255, 210, 90, .25); box-shadow: 0 6px 30px rgba(176, 123, 255, .18); }
html.noct-on .bottomnav { background: rgba(8, 4, 30, .9); border-top-color: rgba(255, 210, 90, .25); }
html.noct-on .logo .alt { color: #ffd25a; text-shadow: 0 0 14px rgba(255, 210, 90, .7); }
html.noct-on h1 { text-shadow: 0 0 26px rgba(176, 123, 255, .55); }
html.noct-on .panel { background: linear-gradient(180deg, rgba(36, 20, 84, .72), rgba(18, 10, 50, .84)); border-color: rgba(190, 150, 255, .22); }
html.noct-on .btn.gold { background: linear-gradient(135deg, #ffd25a, #fff0b8); box-shadow: 0 0 22px rgba(255, 210, 90, .55), 0 0 0 1px rgba(255, 255, 255, .25) inset; }
html.noct-on .tcg { box-shadow: 0 10px 28px rgba(0, 0, 0, .55), 0 0 18px rgba(176, 123, 255, .18); }
html.noct-on .nx-strip.live { box-shadow: 0 0 24px rgba(255, 210, 90, .35); }
@media (max-width: 640px) { .ns-moon { width: 70px; height: 70px; right: 14px; } }
@keyframes nsDrift { to { transform: translate3d(260px, 130px, 0); } }
@keyframes nsAurora { 0% { transform: translateX(-6%) skewY(-3deg); } 100% { transform: translateX(6%) skewY(3deg); } }
@media (prefers-reduced-motion: reduce) { .ns-stars, .ns-aurora { animation: none; } }
