/* Global theme and decorations styles - themes.css */
:root {
  --td-z: 0;
  --glass-blur: blur(16px);
}

/* Glassmorphism effect for cards */
.card,
.phenom-block,
.obs-card,
.popup-phenom-item {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

/* Container général EN ARRIÈRE-PLAN */
.td-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1 !important; /* Force en arrière-plan */
  overflow: hidden;
}
/* S'assure que tous les éléments de décoration sont aussi en arrière-plan */
.td-container > * {
    z-index: -1 !important;
}

/* --- THEME DEFINITIONS (High Quality Gradients) --- */

/* 1. FUTURISTE (Cyber-Fluid & Neon Glass) */
.theme-futuriste {
    --bg-start: #050511;
    --bg-end: #160a28;
    --card-bg: #0f0f2d; /* Opaque */
    --text-color: #e0f2fe;
    --accent-color: #00f3ff; /* Cyan Neon */
    --accent-color-light: #bc13fe; /* Purple Neon */
    --border-color: rgba(0, 243, 255, 0.2);
    --shadow-color-dark: rgba(0,0,0,0.8);
    
    /* Advanced Props */
    --glass-blur: 0px; /* Removed blur */
    --neon-glow: 0 0 10px rgba(0, 243, 255, 0.5), 0 0 20px rgba(188, 19, 254, 0.3);
}

/* Background Animation for Futuriste */
.theme-futuriste body {
    background: radial-gradient(circle at 50% 50%, #1a1a40 0%, #050511 100%);
    position: relative;
    overflow-x: hidden;
}

.theme-futuriste body::before, 
.theme-futuriste body::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    z-index: -1;
    filter: blur(100px);
    opacity: 0.6;
    animation: fluidFloat 15s infinite ease-in-out alternate;
    will-change: transform;
}

.theme-futuriste body::before {
    background: #4c1d95; /* Indigo */
    top: -100px;
    left: -100px;
}

.theme-futuriste body::after {
    background: #0891b2; /* Cyan */
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

/* Neon Text & Borders */
.theme-futuriste h1, 
.theme-futuriste h2, 
.theme-futuriste h3,
.theme-futuriste .visitor-count {
    text-shadow: 0 0 5px rgba(0, 243, 255, 0.6);
}

@keyframes fluidFloat {
    0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    33% { transform: translate(30px, 50px) scale(1.05); opacity: 0.5; }
    66% { transform: translate(-30px, 25px) scale(0.95); opacity: 0.7; }
    100% { transform: translate(0, 0) scale(1); opacity: 0.6; }
}


/* 2. NOËL (Midnight Magic) */
.theme-noel {
    --bg-start: #000428;
    --bg-end: #004e92;
    --card-bg: #00152b; /* Opaque */
    --accent-color: #d42e2e; /* Christmas Red */
    --accent-color-light: #f8b500; /* Gold */
    --text-color: #f0fdf4;
    --border-color: rgba(212, 46, 46, 0.4);
    --vigilance-none: #2dc937;
}

/* 3. NOUVEL AN (Platinum Night - Premium) */
.theme-nouvel-an {
    --bg-start: #020617;
    --bg-end: #1e1b4b;
    --card-bg: rgba(15, 23, 42, 0.7);
    --accent-color: #00f3ff;
    --accent-color-light: #f8fafc;
    --text-color: #ffffff;
    --text-secondary-color: #ffffff; /* On force le blanc pour la visibilité */
    --border-color: rgba(0, 243, 255, 0.3);
}

/* On change UNIQUEMENT la couleur du texte et on ajoute un contour pour la lisibilité */
.theme-nouvel-an .tab-button, 
.theme-nouvel-an .btn-account,
.theme-nouvel-an .btn-primary,
.theme-nouvel-an header h1,
.theme-nouvel-an .subtitle {
    color: rgba(255, 255, 255, 0.85) !important; /* Blanc légèrement transparent */
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.5) !important; /* Ombre plus douce et diffuse */
    font-weight: 600 !important;
    filter: blur(0.3px); /* Léger flou demandé */
}

.theme-nouvel-an .tab-button i,
.theme-nouvel-an .btn-account i,
.theme-nouvel-an .tab-button span {
    color: #00f3ff !important; /* Les icônes en Cyan néon pour le style */
    filter: drop-shadow(0 0 5px #000);
}

.theme-nouvel-an .tab-button.active {
    border-color: #00f3ff !important;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.4) !important;
}

/* 4. HALLOWEEN (Spooky Purple/Orange) */
.theme-halloween {
    --bg-start: #120118; 
    --bg-end: #38023b; 
    --card-bg: #2a0533; /* Opaque */
    --accent-color: #ff6a00; /* Pumpkin Orange */
    --accent-color-light: #ee0979; /* Deep Pink/Red */
    --text-color: #f3e5f5;
    --border-color: rgba(255, 106, 0, 0.4);
    --lvm-red: #800080;
}

/* 5. ÉTÉ (Tropical Paradise) */
.theme-ete {
    --bg-start: #002b47;
    --bg-end: #00607d;
    --card-bg: #003a5c; /* Opaque */
    --accent-color: #ffbd39; /* Sun Yellow */
    --accent-color-light: #ff7e5f; /* Sunset Orange */
    --text-color: #ffffff;
    --border-color: rgba(255, 189, 57, 0.3);
}

/* 6. PRINTEMPS (Fresh Jungle) */
.theme-printemps {
    --bg-start: #134E5E;
    --bg-end: #2a6358;
    --card-bg: #1a5f70; /* Opaque */
    --accent-color: #56ab2f; /* Fresh Green */
    --accent-color-light: #a8e063;
    --text-color: #f0fff4;
    --border-color: rgba(86, 171, 47, 0.3);
}

/* 7. AUTOMNE (Warm Woods) */
.theme-automne {
    --bg-start: #2b160b;
    --bg-end: #54311c;
    --card-bg: #3d2213; /* Opaque */
    --accent-color: #d35400; /* Pumpkin */
    --accent-color-light: #f39c12; /* Fall Leaf */
    --text-color: #fff6e5;
    --border-color: rgba(211, 84, 0, 0.4);
}

/* --- DECORATIONS SPECIFIC STYLES --- */

/* --- THEME BUTTON & INPUT OVERRIDES --- */
.theme-futuriste .tab-button, .theme-futuriste .quick-btn, .theme-futuriste .news-date-selector select,
.theme-noel .tab-button, .theme-noel .quick-btn, .theme-noel .news-date-selector select,
.theme-nouvel-an .tab-button, .theme-nouvel-an .quick-btn, .theme-nouvel-an .news-date-selector select,
.theme-halloween .tab-button, .theme-halloween .quick-btn, .theme-halloween .news-date-selector select,
.theme-ete .tab-button, .theme-ete .quick-btn, .theme-ete .news-date-selector select,
.theme-printemps .tab-button, .theme-printemps .quick-btn, .theme-printemps .news-date-selector select,
.theme-automne .tab-button, .theme-automne .quick-btn, .theme-automne .news-date-selector select,
.theme-newyear .tab-button, .theme-newyear .quick-btn, .theme-newyear .news-date-selector select {
    background-color: var(--card-bg) !important;
    backdrop-filter: none !important;
}

.theme-futuriste .tab-button.active, .theme-futuriste .quick-btn.active,
.theme-noel .tab-button.active, .theme-noel .quick-btn.active,
.theme-nouvel-an .tab-button.active, .theme-nouvel-an .quick-btn.active,
.theme-halloween .tab-button.active, .theme-halloween .quick-btn.active,
.theme-ete .tab-button.active, .theme-ete .quick-btn.active,
.theme-printemps .tab-button.active, .theme-printemps .quick-btn.active,
.theme-automne .tab-button.active, .theme-automne .quick-btn.active,
.theme-newyear .tab-button.active, .theme-newyear .quick-btn.active {
    background-color: var(--accent-color) !important;
    color: var(--card-bg) !important;
    box-shadow: 0 0 15px var(--accent-color) !important;
}

.theme-futuriste .tab-button.active i, .theme-futuriste .quick-btn.active i,
.theme-noel .tab-button.active i, .theme-noel .quick-btn.active i,
.theme-nouvel-an .tab-button.active i, .theme-nouvel-an .quick-btn.active i,
.theme-halloween .tab-button.active i, .theme-halloween .quick-btn.active i,
.theme-ete .tab-button.active i, .theme-ete .quick-btn.active i,
.theme-printemps .tab-button.active i, .theme-printemps .quick-btn.active i,
.theme-automne .tab-button.active i, .theme-automne .quick-btn.active i,
.theme-newyear .tab-button.active i, .theme-newyear .quick-btn.active i {
    color: var(--card-bg) !important;
}

/* PAYSAGE NOEL */
.td-landscape {
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 35vh; min-height: 200px; z-index: 0;
}

/* SAPIN */
.td-tree {
  position: absolute; bottom: 20px; left: 20px;
  width: 240px; max-width: 30vw; height: auto;
  pointer-events: none;
  filter: drop-shadow(0 10px 20px rgba(2,6,23,0.5));
  z-index: 10;
  transform-origin: bottom center; animation: td-tree-sway 6s ease-in-out infinite alternate;
}
@keyframes td-tree-sway { 0% { transform: rotate(0deg); } 100% { transform: rotate(1.5deg); } }
.td-tree svg { width: 100%; height: auto; display: block; }
.td-garland, .td-garland-strand { position: absolute; inset: 0; }
.td-garland-light { position: absolute; width: 5px; height: 5px; border-radius: 50%; animation: td-blink 2s ease-in-out infinite alternate; box-shadow: 0 0 5px currentColor; }
@keyframes td-blink { from { opacity: 0.6; transform: scale(0.9); } to { opacity: 1; transform: scale(1.4); } }
.td-ornament { position: absolute; border-radius: 50%; box-shadow: inset -1px -1px 3px rgba(0,0,0,0.4), 1px 1px 3px rgba(255,255,255,0.3); }

/* CADEAUX */
.td-gifts { position: absolute; bottom: 25px; left: 20px; width: 240px; height: 50px; pointer-events: none; z-index: -1; }
.td-gift { position: absolute; bottom: 0; border-radius: 2px; box-shadow: var(--shadow-1); }
.td-gift-ribbon { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.td-gift-ribbon::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); width: 15%; background: rgba(255,255,255,0.6); }
.td-gift-ribbon::after { content: ''; position: absolute; left: 0; right: 0; top: 40%; height: 15%; background: rgba(255,255,255,0.6); }

/* BONHOMME DE NEIGE */
.td-snowman {
  position: absolute; bottom: 80px; right: 90px;
  width: 140px; height: 200px;
  pointer-events: none; z-index: 11;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}
.td-snowman:hover { transform: scale(1.05); }
.td-snowman-shadow { position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 100px; height: 15px; background: var(--surface-inset); border-radius: 50%; filter: blur(4px); }
.td-snowman-body-bottom, .td-snowman-body-middle, .td-snowman-head { position: absolute; left: 50%; transform: translateX(-50%); background: radial-gradient(circle at 35% 35%, #ffffff 0%, #f3f4f6 40%, #d1d5db 100%); border-radius: 50%; box-shadow: inset -5px -5px 15px rgba(0,0,0,0.1); }
.td-snowman-body-bottom { bottom: 0; width: 100px; height: 100px; z-index: 0; }
.td-snowman-body-middle { bottom: 70px; width: 80px; height: 80px; z-index: 0; }
.td-snowman-head { bottom: 135px; width: 60px; height: 60px; z-index: 0; }
.td-snowman-eye { position: absolute; top: 22px; width: 6px; height: 6px; background: #1f2937; border-radius: 50%; transition: transform 0.1s ease-out; }
.td-snowman-eye.left { left: 18px; } .td-snowman-eye.right { right: 18px; }
.td-snowman-nose { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 18px solid #f97316; border-radius: 2px; filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.3)); }
.td-snowman-mouth { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); width: 24px; height: 6px; border-bottom: 2px solid #1f2937; border-radius: 50%; opacity: 0.8; }
.td-snowman-hat { position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-5deg); z-index: 0; }
.td-snowman-hat-brim { width: 70px; height: 8px; background: #111827; border-radius: var(--radius-xs); box-shadow: var(--shadow-1); }
.td-snowman-hat-top { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 40px; height: 45px; background: linear-gradient(to right, #1f2937, #111827, #1f2937); border-radius: 2px 2px 0 0; }
.td-snowman-hat-ribbon { position: absolute; bottom: 0; width: 100%; height: 10px; background: #dc2626; }
.td-snowman-scarf { position: absolute; bottom: 135px; left: 50%; transform: translateX(-50%); z-index: 0; width: 0; height: 0; }
.td-snowman-scarf-neck { position: absolute; left: -35px; top: 0; width: 70px; height: 16px; background: #ef4444; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.td-snowman-scarf-tail { position: absolute; left: 15px; top: 10px; width: 20px; height: 45px; background: #ef4444; border-radius: 4px; transform-origin: top center; animation: scarf-sway 3s ease-in-out infinite alternate; }

/* FLOCONS */
.td-snowflake { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,0.6) 100%); box-shadow: 0 0 5px rgba(255,255,255,0.8); animation-name: td-fall; animation-timing-function: linear; animation-iteration-count: infinite; z-index: 0; pointer-events: none; will-change: transform; }
.td-snowflake[data-variant="star"] { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); background: #fff; }
.td-snowflake--rotate { animation-name: td-fall-rotate; }
@keyframes td-fall { to { transform: translateY(110vh); } }
@keyframes td-fall-rotate { to { transform: translateY(110vh) rotate(360deg); } }

/* SUMMER SUN */
.td-summer-sun {
    position: absolute; top: -120px; right: -120px; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,200,50,0.4) 0%, rgba(255,100,0,0.1) 40%, transparent 70%);
    z-index: 0; pointer-events: none;
    animation: summer-pulse 8s ease-in-out infinite alternate;
}
@keyframes summer-pulse { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.1); opacity: 1; } }

/* FIREWORKS OVERLAY */
.td-fireworks-canvas {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .td-landscape { height: 20vh; min-height: 120px; }
  .td-tree { width: 100px; left: -15px; bottom: 5px; }
  .td-gifts { width: 100px; left: -15px; bottom: 5px; }
  .td-snowman { right: -10px; bottom: 50px; transform: scale(0.6); transform-origin: bottom right; }
  .td-newyear-text { font-size: 4vw; }
}

@media (prefers-reduced-motion: reduce) {
  .td-snowflake, .td-garland-light, .td-snowman-scarf-tail, .td-tree, .td-summer-sun, .td-newyear-text { animation: none !important; }
}

/* NOUVEL AN Theme */
.theme-newyear {
    --bg-start: #000a0f;
    --bg-end: #0a1628;
    --card-bg: #0d1c2a;
    --accent-color: #ffd700;
    --accent-color-light: #ffed4e;
    --text-color: #f0fdf4;
    --text-secondary-color: #cbd5e1;
    --border-color: rgba(255, 215, 0, 0.15);
    --shadow-color-dark: rgba(0,0,0,0.5);
}

.theme-newyear h1,
.theme-newyear h2,
.theme-newyear h3 {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* Texte 2026 Neon Géant en bas */
.td-neon-bottom-text-large {
  position: absolute;
  bottom: 80px; /* Adjusted to be higher */
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
  font-weight: 900;
  font-family: 'Inter', 'Roboto', sans-serif;
  font-size: 8vw; /* Responsive font size */
  color: #fff;
  opacity: 0.9;
  animation: neonFlicker 4s infinite alternate, neonColorShift 8s infinite linear;
  white-space: nowrap;
  text-align: center;
}
