/* ============================================================================
 * THÈMES SAISONNIERS — généré, ne pas éditer à la main.
 * Régénérer : node tools/gen_theme.js css/tailwind-public.css css/themes.css
 *
 * S'active quand <html> porte la classe `theme-halloween`, posée par
 * components/theme_head.php selon `globalTheme` (réglé dans /admin > Paramètres).
 * Thème inactif = fichier sans effet : aucun sélecteur ne matche.
 * ========================================================================== */

/* --- Accent : bleu -> citrouille (56 règles) --- */
html.theme-halloween .border-blue-100{--tw-border-opacity:1;border-color:rgb(255 237 213/var(--tw-border-opacity,1))}
html.theme-halloween .border-blue-100\/50{border-color:rgba(255,237,213,.5)}
html.theme-halloween .border-blue-200{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}
html.theme-halloween .border-blue-500{--tw-border-opacity:1;border-color:rgb(249 115 22/var(--tw-border-opacity,1))}
html.theme-halloween .border-blue-500\/30{border-color:rgba(249,115,22,.3)}
html.theme-halloween .border-blue-600{--tw-border-opacity:1;border-color:rgb(234 88 12/var(--tw-border-opacity,1))}
html.theme-halloween .border-blue-800\/50{border-color:rgba(154,52,18,.5)}
html.theme-halloween .bg-blue-100{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}
html.theme-halloween .bg-blue-50{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}
html.theme-halloween .bg-blue-50\/50{background-color:rgba(255,247,237,.5)}
html.theme-halloween .bg-blue-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}
html.theme-halloween .bg-blue-500\/10{background-color:rgba(249,115,22,.1)}
html.theme-halloween .bg-blue-500\/20{background-color:rgba(249,115,22,.2)}
html.theme-halloween .bg-blue-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}
html.theme-halloween .bg-blue-600\/50{background-color:rgba(234,88,12,.5)}
html.theme-halloween .bg-blue-900\/30{background-color:rgba(124,45,18,.3)}
html.theme-halloween .bg-blue-950{--tw-bg-opacity:1;background-color:rgb(67 20 7/var(--tw-bg-opacity,1))}
html.theme-halloween .from-blue-200{--tw-gradient-from:#fed7aa var(--tw-gradient-from-position);--tw-gradient-to:rgba(254,215,170,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
html.theme-halloween .from-blue-500{--tw-gradient-from:#f97316 var(--tw-gradient-from-position);--tw-gradient-to:rgba(249,115,22,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
html.theme-halloween .from-blue-600{--tw-gradient-from:#ea580c var(--tw-gradient-from-position);--tw-gradient-to:rgba(234,88,12,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}
html.theme-halloween .via-blue-100{--tw-gradient-to:rgba(255,237,213,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),#ffedd5 var(--tw-gradient-via-position),var(--tw-gradient-to)}
html.theme-halloween .to-blue-700{--tw-gradient-to:#c2410c var(--tw-gradient-to-position)}
html.theme-halloween .to-blue-800{--tw-gradient-to:#9a3412 var(--tw-gradient-to-position)}
html.theme-halloween .text-blue-100{--tw-text-opacity:1;color:rgb(255 237 213/var(--tw-text-opacity,1))}
html.theme-halloween .text-blue-200{--tw-text-opacity:1;color:rgb(254 215 170/var(--tw-text-opacity,1))}
html.theme-halloween .text-blue-300{--tw-text-opacity:1;color:rgb(253 186 116/var(--tw-text-opacity,1))}
html.theme-halloween .text-blue-400{--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}
html.theme-halloween .text-blue-500{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}
html.theme-halloween .text-blue-600{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}
html.theme-halloween .text-blue-700{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}
html.theme-halloween .accent-blue-500{accent-color:#f97316}
html.theme-halloween .accent-blue-600{accent-color:#ea580c}
html.theme-halloween .shadow-blue-500\/20{--tw-shadow-color:rgba(249,115,22,.2);--tw-shadow:var(--tw-shadow-colored)}
html.theme-halloween .shadow-blue-500\/30{--tw-shadow-color:rgba(249,115,22,.3);--tw-shadow:var(--tw-shadow-colored)}
html.theme-halloween .file\:bg-blue-100::file-selector-button{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}
html.theme-halloween .file\:text-blue-700::file-selector-button{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}
html.theme-halloween .hover\:border-blue-200:hover{--tw-border-opacity:1;border-color:rgb(254 215 170/var(--tw-border-opacity,1))}
html.theme-halloween .hover\:border-blue-300:hover{--tw-border-opacity:1;border-color:rgb(253 186 116/var(--tw-border-opacity,1))}
html.theme-halloween .hover\:bg-blue-100:hover{--tw-bg-opacity:1;background-color:rgb(255 237 213/var(--tw-bg-opacity,1))}
html.theme-halloween .hover\:bg-blue-200:hover{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}
html.theme-halloween .hover\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgb(255 247 237/var(--tw-bg-opacity,1))}
html.theme-halloween .hover\:bg-blue-500:hover{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}
html.theme-halloween .hover\:bg-blue-600:hover{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}
html.theme-halloween .hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(194 65 12/var(--tw-bg-opacity,1))}
html.theme-halloween .hover\:text-blue-500:hover{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity,1))}
html.theme-halloween .hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(234 88 12/var(--tw-text-opacity,1))}
html.theme-halloween .hover\:text-blue-700:hover{--tw-text-opacity:1;color:rgb(194 65 12/var(--tw-text-opacity,1))}
html.theme-halloween .hover\:file\:bg-blue-200::file-selector-button:hover{--tw-bg-opacity:1;background-color:rgb(254 215 170/var(--tw-bg-opacity,1))}
html.theme-halloween .focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(249 115 22/var(--tw-ring-opacity,1))}
html.theme-halloween .dark\:border-blue-800\/50:is(.dark *){border-color:rgba(154,52,18,.5)}
html.theme-halloween .dark\:border-blue-900:is(.dark *){--tw-border-opacity:1;border-color:rgb(124 45 18/var(--tw-border-opacity,1))}
html.theme-halloween .dark\:bg-blue-900\/20:is(.dark *){background-color:rgba(124,45,18,.2)}
html.theme-halloween .dark\:bg-blue-900\/30:is(.dark *){background-color:rgba(124,45,18,.3)}
html.theme-halloween .dark\:text-blue-400:is(.dark *){--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}
html.theme-halloween .dark\:hover\:bg-blue-900\/50:hover:is(.dark *){background-color:rgba(124,45,18,.5)}
html.theme-halloween .dark\:hover\:text-blue-400:hover:is(.dark *){--tw-text-opacity:1;color:rgb(251 146 60/var(--tw-text-opacity,1))}

/* --- Surfaces sombres : ardoise -> noir-violet (19 règles) --- */
html.theme-halloween .bg-slate-800{--tw-bg-opacity:1;background-color:rgb(38 28 51/var(--tw-bg-opacity,1))}
html.theme-halloween .bg-slate-900{--tw-bg-opacity:1;background-color:rgb(23 16 31/var(--tw-bg-opacity,1))}
html.theme-halloween .bg-slate-900\/40{background-color:rgba(23,16,31,.4)}
html.theme-halloween .bg-slate-900\/50{background-color:rgba(23,16,31,.5)}
html.theme-halloween .bg-slate-900\/70{background-color:rgba(23,16,31,.7)}
html.theme-halloween .bg-slate-900\/80{background-color:rgba(23,16,31,.8)}
html.theme-halloween .bg-slate-900\/90{background-color:rgba(23,16,31,.9)}
html.theme-halloween .bg-slate-950{--tw-bg-opacity:1;background-color:rgb(10 4 16/var(--tw-bg-opacity,1))}
html.theme-halloween .hover\:bg-slate-800:hover{--tw-bg-opacity:1;background-color:rgb(38 28 51/var(--tw-bg-opacity,1))}
html.theme-halloween .dark\:bg-slate-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(38 28 51/var(--tw-bg-opacity,1))}
html.theme-halloween .dark\:bg-slate-800\/20:is(.dark *){background-color:rgba(38,28,51,.2)}
html.theme-halloween .dark\:bg-slate-800\/40:is(.dark *){background-color:rgba(38,28,51,.4)}
html.theme-halloween .dark\:bg-slate-800\/50:is(.dark *){background-color:rgba(38,28,51,.5)}
html.theme-halloween .dark\:bg-slate-800\/60:is(.dark *){background-color:rgba(38,28,51,.6)}
html.theme-halloween .dark\:bg-slate-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(23 16 31/var(--tw-bg-opacity,1))}
html.theme-halloween .dark\:bg-slate-900\/50:is(.dark *){background-color:rgba(23,16,31,.5)}
html.theme-halloween .dark\:bg-slate-950:is(.dark *){--tw-bg-opacity:1;background-color:rgb(10 4 16/var(--tw-bg-opacity,1))}
html.theme-halloween .dark\:bg-slate-950\/90:is(.dark *){background-color:rgba(10,4,16,.9)}
html.theme-halloween .dark\:hover\:bg-slate-800\/30:hover:is(.dark *){background-color:rgba(38,28,51,.3)}

/* --- Dégradé signature : citrouille -> violet ---------------------------------
 * Le remap mécanique ci-dessus rend les dégradés orange->orange, ce qui lit
 * "automne" plutôt qu'"Halloween". On force la fin des dégradés vers le violet :
 * c'est le seul endroit où la bascule se voit vraiment comme un thème. */
html.theme-halloween .to-blue-700{--tw-gradient-to:#6b21a8 var(--tw-gradient-to-position)}
html.theme-halloween .to-blue-800{--tw-gradient-to:#581c87 var(--tw-gradient-to-position)}

/* --- Décor : toiles d'araignée dans les deux coins hauts ----------------------
 * Purement décoratif : `pointer-events:none` pour ne jamais intercepter un clic,
 * `aria-hidden` implicite (pseudo-éléments, donc absent de l'arbre d'accessibilité),
 * et masqué sous 768px où l'espace en haut d'écran est déjà disputé. */
@media (min-width: 768px) {
  html.theme-halloween body::before,
  html.theme-halloween body::after {
    content: "";
    position: fixed;
    top: 0;
    width: 120px;
    height: 120px;
    z-index: 60;
    pointer-events: none;
    opacity: .22;
    background-repeat: no-repeat;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%23e2cfff' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M0 0 L100 0 M0 0 L92 38 M0 0 L70 70 M0 0 L38 92 M0 0 L0 100'/%3E%3Cpath d='M22 0 A22 22 0 0 1 0 22'/%3E%3Cpath d='M44 0 A44 44 0 0 1 0 44'/%3E%3Cpath d='M66 0 A66 66 0 0 1 0 66'/%3E%3Cpath d='M88 0 A88 88 0 0 1 0 88'/%3E%3C/g%3E%3C/svg%3E");
  }
  html.theme-halloween body::before { left: 0; }
  html.theme-halloween body::after  { right: 0; transform: scaleX(-1); }
}

/* En thème clair les toiles doivent être sombres pour rester lisibles sur fond blanc. */
@media (min-width: 768px) {
  html.theme-halloween:not(.dark) body::before,
  html.theme-halloween:not(.dark) body::after {
    opacity: .16;
    filter: invert(1) hue-rotate(180deg);
  }
}

/* --- Lueur de braise sur les appels à l'action principaux --------------------- */
html.theme-halloween .bg-blue-600,
html.theme-halloween .bg-blue-700 {
  box-shadow: 0 0 0 1px rgba(249, 115, 22, .25), 0 6px 20px -6px rgba(249, 115, 22, .55);
}

/* --- Respect de prefers-reduced-motion ---------------------------------------
 * Le thème n'anime rien aujourd'hui ; cette règle est un filet pour toute
 * décoration animée ajoutée plus tard dans ce fichier. */
@media (prefers-reduced-motion: reduce) {
  html.theme-halloween body::before,
  html.theme-halloween body::after { animation: none !important; }
}

/* --- Impression : pas de décor ------------------------------------------------ */
@media print {
  html.theme-halloween body::before,
  html.theme-halloween body::after { display: none; }
}
