/* ============================================
   THEME DE NOEL - LAFORET CRM
   ============================================ */

/* Container pour les elements de Noel - cache par defaut */
#christmas-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}

/* Afficher le container uniquement en mode Noel */
body.christmas-mode #christmas-container {
    display: block;
}

/* Flocons de neige */
.snowflake {
    position: fixed;
    top: -20px;
    color: white;
    font-size: 1.5em;
    text-shadow: 0 0 5px rgba(255,255,255,0.8);
    animation: fall linear infinite;
    z-index: 9999;
    pointer-events: none;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0.3;
    }
}

/* Elements de Noel qui tombent */
.christmas-element {
    position: fixed;
    top: -60px;
    font-size: 2em;
    animation: fallElement linear infinite;
    z-index: 9997;
    pointer-events: none;
}

@keyframes fallElement {
    0% {
        transform: translateY(-60px) rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Sapins fixes en bas de page - AGRANDIS */
.christmas-tree-left,
.christmas-tree-right {
    position: fixed;
    bottom: 0;
    font-size: 7em;
    z-index: 9990;
    pointer-events: none;
    animation: treeSway 3s ease-in-out infinite;
}

.christmas-tree-left {
    left: 10px;
}

.christmas-tree-right {
    right: 10px;
}

@keyframes treeSway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* Guirlande sur le trait bleu sous la navbar - cache par defaut */
.christmas-garland,
#christmas-garland-fixed {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: relative;
    width: 100%;
    height: 0;
    pointer-events: none;
    margin: 0;
    padding: 0;
    background: none !important;
}

/* Afficher la guirlande uniquement quand le mode Noel est actif */
body.christmas-mode .christmas-garland,
body.christmas-mode #christmas-garland-fixed {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: 35px !important;
    background-image: url('/images/garland2.png') !important;
    background-size: auto 35px !important;
    background-repeat: repeat-x !important;
    background-position: center center !important;
    z-index: 100 !important;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.2));
    margin-top: -48px !important;
    margin-bottom: 0 !important;
}

/* Lumieres clignotantes - cache car deja sur la guirlande */
.christmas-lights {
    display: none;
}

.light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: blink 1s ease-in-out infinite alternate;
}

.light:nth-child(odd) {
    background: #ff0000;
    box-shadow: 0 0 10px #ff0000, 0 0 20px #ff0000;
    animation-delay: 0s;
}

.light:nth-child(even) {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00, 0 0 20px #00ff00;
    animation-delay: 0.5s;
}

.light:nth-child(3n) {
    background: #ffd700;
    box-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700;
    animation-delay: 0.25s;
}

.light:nth-child(4n) {
    background: #0000ff;
    box-shadow: 0 0 10px #0000ff, 0 0 20px #0000ff;
    animation-delay: 0.75s;
}

@keyframes blink {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

/* Effet neige sur les titres */
.snow-text {
    position: relative;
    text-shadow:
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 15px #fff,
        0 0 20px #b3e0ff,
        0 0 35px #b3e0ff;
}

.snow-text::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(180deg, white 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
    border-radius: 10px 10px 0 0;
}

/* Pere Noel dans le coin */
.santa-corner {
    position: fixed;
    bottom: 20px;
    right: 80px;
    font-size: 4em;
    z-index: 9993;
    animation: santaWave 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes santaWave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Bonhomme de neige - posé sur la bordure basse du bandeau Tableau de bord */
/* Cache par defaut, affiche uniquement en mode Noel */
.snowman-corner,
#snowman-fixed {
    display: none !important;
    position: absolute;
    font-size: 6em;
    z-index: 100;
    animation: snowmanBounce 2s ease-in-out infinite;
    pointer-events: none;
    transform-origin: bottom center;
    bottom: -30px;
    left: 450px;
}

/* Afficher le bonhomme de neige uniquement en mode Noel */
body.christmas-mode .snowman-corner,
body.christmas-mode #snowman-fixed {
    display: block !important;
}

@keyframes snowmanBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Message de Noel - cache */
.christmas-message {
    display: none;
}

@keyframes messageGlow {
    0% { box-shadow: 0 5px 20px rgba(196, 30, 58, 0.5); }
    100% { box-shadow: 0 5px 30px rgba(34, 139, 34, 0.8), 0 0 40px gold; }
}

/* Cadeau qui rebondit */
.gift-bounce {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3em;
    z-index: 9993;
    animation: giftBounce 1.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes giftBounce {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    50% { transform: translateX(-50%) translateY(-20px) scale(1.1); }
}

/* Decorations du header - seulement en mode Noel */
body.christmas-mode .header {
    position: relative;
    overflow: visible;
}

body.christmas-mode .header::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20'%3E%3Cpath fill='%23ffffff' d='M0,20 L10,10 L20,20 L30,10 L40,20 L50,10 L60,20 L70,10 L80,20 L90,10 L100,20 Z'/%3E%3C/svg%3E");
    background-size: 100px 15px;
    background-repeat: repeat-x;
    z-index: 10;
}

/* Bouton toggle Noel */
#christmas-toggle {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c41e3a, #228b22);
    border: 3px solid gold;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s;
    pointer-events: auto;
}

#christmas-toggle:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Pas de padding supplementaire en mode Noel */
body.christmas-mode {
    padding-top: 0;
}

/* Coins decoratifs - cache */
.corner-decoration {
    display: none;
}
