/* ============================================================================
   Theme Halloween temporaire — Uranium Community
   Charge uniquement quand <body> porte la classe "theme-halloween" (ajoutee
   par le header via le flag isHalloweenTheme, actif du 8 octobre au 4 novembre).
   Fichier 100% independant du build Tailwind (public/css/main.css) : il ne
   sera jamais ecrase par `npm run css2`, et il suffit de retirer son <link>
   (ou la classe body) pour revenir au visuel normal sans rien casser.
   Tout est scope sous .theme-halloween : sans cette classe, ce fichier ne
   fait strictement rien.
   ========================================================================== */

/* --- Recolorisation de l'accent principal (bleu -> orange citrouille) --- */
.theme-halloween .text-blue-uranium { color: #ff8a1e !important; }
.theme-halloween .bg-blue-uranium { background-color: #ff6a00 !important; }
.theme-halloween .hover\:bg-blue-ura-hover:hover { background-color: #e55a00 !important; }
.theme-halloween .border-blue-uranium { border-color: #ff6a00 !important; }
.theme-halloween .fill-blue-uranium { fill: #ff6a00 !important; }
.theme-halloween .shadow-uranium { box-shadow: 0 0 10px #ff6a00, 0 0 18px rgba(123, 47, 247, 0.55) !important; }
.theme-halloween .hover\:shadow-shop-hover:hover { box-shadow: 0 0 18px #ff8a1e !important; }

/* Le logo recolore (uranium-halloween.svg, meme bleu #0093ff remplace par
   #ff8a1e — exactement la couleur de .text-blue-uranium — gris #7e7e7e
   intact) est servi directement par les templates via un src conditionnel
   sur isHalloweenTheme (voir navbar.ejs, footer.ejs, MobileMenu.ejs,
   index.ejs, reglements/template.ejs), pas par un hack CSS : plus fiable
   et couvre chaque occurrence sans dependre du support de `content: url()`
   sur les <img>. */

/* --- Ambiance generale : vignette violette discrete, ne gene pas la lecture --- */
.theme-halloween body {
   position: relative;
}
.theme-halloween body::before {
   content: "";
   position: fixed;
   inset: 0;
   pointer-events: none;
   z-index: 1;
   background:
      radial-gradient(ellipse at top, rgba(123, 47, 247, 0.16), transparent 55%),
      radial-gradient(ellipse at bottom, rgba(255, 106, 0, 0.10), transparent 60%);
}

/* --- Petit liseré "candy corn" en haut de page --- */
.theme-halloween body::after {
   content: "";
   position: fixed;
   top: 0;
   left: 0;
   right: 0;
   height: 4px;
   z-index: 100;
   pointer-events: none;
   background: repeating-linear-gradient(
      90deg,
      #ff6a00 0 24px,
      #ffd23f 24px 48px,
      #7b2ff7 48px 72px
   );
}

/* --- Curseur fantome : remplace la fleche habituelle partout sur le site --- */
/* Hotspot (4 2) cale la "pointe" du fantome sur la position reelle du curseur. */
.theme-halloween,
.theme-halloween * {
   cursor: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='32' viewBox='0 0 28 32'%3E%3Cpath d='M14 2C20.6 2 26 7.4 26 14V30L21.5 26L17.5 30L14 26L10.5 30L6.5 26L2 30V14C2 7.4 7.4 2 14 2Z' fill='%23f2f2f6' stroke='%231b1b22' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cellipse cx='9.5' cy='14.5' rx='2' ry='2.6' fill='%231b1b22'/%3E%3Cellipse cx='18.5' cy='14.5' rx='2' ry='2.6' fill='%231b1b22'/%3E%3Cellipse cx='14' cy='20' rx='1.5' ry='1.9' fill='%231b1b22'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* --- Araignee qui descend de temps en temps (position, delai et longueur du
   fil tires au hasard par le script dans header.ejs) ---
   Le fil "se deroule" puis se retracte via clip-path, sans animer deux
   proprietes differentes pour le fil et le pion. */
.theme-halloween .uc-halloween-spider {
   position: fixed;
   top: 0;
   z-index: 250;
   pointer-events: none;
   text-align: center;
   clip-path: inset(0 0 100% 0);
   animation: ucSpiderDrop 9s cubic-bezier(.33, 0, .2, 1) forwards;
}
.theme-halloween .uc-halloween-spider .uc-spider-thread {
   display: block;
   width: 1px;
   margin: 0 auto;
   background: rgba(255, 255, 255, 0.45);
   height: var(--uc-spider-drop, 220px);
}
.theme-halloween .uc-halloween-spider .uc-spider-body {
   display: block;
   font-size: 22px;
   line-height: 1;
   transform: translateY(-4px);
   filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}
@keyframes ucSpiderDrop {
   0% { clip-path: inset(0 0 100% 0); }
   40% { clip-path: inset(0 0 0% 0); }
   70% { clip-path: inset(0 0 0% 0); }
   100% { clip-path: inset(0 0 100% 0); }
}
@media (prefers-reduced-motion: reduce) {
   .theme-halloween .uc-halloween-spider {
      display: none;
   }
}
