/**
 * Thème Festif Noël & Nouvel An
 * Animations et décorations pour les fêtes de fin d'année
 */

/* ========================================
   FLOCONS DE NEIGE ANIMÉS
======================================== */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: #fff;
    font-size: 1em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: fall linear infinite;
    opacity: 0.8;
}

@keyframes fall {
    0% {
        top: -10%;
        transform: translateX(0) rotate(0deg);
    }
    100% {
        top: 110%;
        transform: translateX(100px) rotate(360deg);
    }
}

/* ========================================
   GUIRLANDE FESTIVE EN HAUT
======================================== */
.festive-garland {
    position: fixed;
    top: 45px;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(135deg, #d4af37 0%, #f1c40f 25%, #e74c3c 50%, #27ae60 75%, #d4af37 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    z-index: 9998;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.festive-garland::before {
    content: '🎄 ❄️ 🎅 ⭐ 🎁 🔔 ❄️ 🎄 ⭐ 🎅 🎁 ❄️ 🔔 🎄 ⭐ 🎅 ❄️ 🎁 🔔 🎄 ❄️ 🎅 ⭐ 🎁 🔔 ❄️ 🎄 ⭐ 🎅 🎁 ❄️ 🔔 🎄 ⭐ 🎅 ❄️ 🎁 🔔 🎄❄️ 🎁 🔔 🎄 ❄️ 🎅 ⭐ 🎁 🔔 ❄️ 🎄 ⭐ 🎅 🎁 ❄️ 🔔 🎄 ⭐ 🎅 ❄️ 🎁 🔔 🎄❄️ 🎁 🔔 🎄 ❄️ 🎅 ⭐ 🎁 🔔 ❄️ 🎄 ⭐ 🎅 🎁 ❄️ 🔔 🎄 ⭐ 🎅 ❄️ 🎁 🔔 🎄❄️ 🎁 🔔 🎄 ❄️ 🎅 ⭐ 🎁 🔔 ❄️ 🎄 ⭐ 🎅 🎁 ❄️ 🔔 🎄 ⭐ 🎅 ❄️ 🎁 🔔 🎄❄️ 🎁 🔔 🎄 ❄️ 🎅 ⭐ 🎁 🔔 ❄️ 🎄 ⭐ 🎅 🎁 ❄️ 🔔 🎄 ⭐ 🎅 ❄️ 🎁 🔔 🎄';
    position: absolute;
    width: 200%;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 16px;
    animation: scroll-garland 20s linear infinite;
    padding: 0 20px;
    white-space: nowrap;
}

@keyframes shimmer {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 200% 0%;
    }
}

@keyframes scroll-garland {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ========================================
   BADGE FESTIF "JOYEUX NOËL"
======================================== */
.festive-badge {
    position: fixed;
    bottom: 130px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
    z-index: 9997;
    animation: pulse-festive 2s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
}

.festive-badge:hover {
    transform: translateX(-50%) scale(1.1) rotate(5deg);
}

.festive-badge i {
    margin-right: 8px;
    animation: rotate-icon 2s linear infinite;
}

@keyframes pulse-festive {
    0%, 100% {
        box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
    }
    50% {
        box-shadow: 0 5px 25px rgba(231, 76, 60, 0.8);
    }
}

@keyframes rotate-icon {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ========================================
   EFFETS FESTIFS SUR LES CARTES
======================================== */
.card-medical {
    position: relative;
    overflow: visible !important;
}

.card-medical::before {
    content: '⭐';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 24px;
    animation: twinkle 2s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ========================================
   COMPTE À REBOURS NOUVEL AN
======================================== */
.countdown-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 9997;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    animation: bounce-countdown 3s ease-in-out infinite;
}

.countdown-banner .countdown-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.countdown-banner .countdown-time {
    font-size: 24px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.countdown-banner .time-unit {
    text-align: center;
}

.countdown-banner .time-value {
    font-size: 32px;
    color: #f39c12;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.countdown-banner .time-label {
    font-size: 10px;
    opacity: 0.7;
    text-transform: uppercase;
}

@keyframes bounce-countdown {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .festive-garland {
        height: 25px;
        top: 38px;
    }
    
    .festive-garland::before {
        font-size: 14px;
    }
    
    .festive-badge {
        bottom: 110px;
        left: 50%;
        padding: 8px 15px;
        font-size: 12px;
    }
    
    .countdown-banner {
        bottom: 10px;
        padding: 10px 20px;
    }
    
    .countdown-banner .countdown-time {
        font-size: 18px;
        gap: 10px;
    }
    
    .countdown-banner .time-value {
        font-size: 24px;
    }
    
    .snowflake {
        font-size: 0.8em;
    }
}

/* ========================================
   THÈME FESTIF - AJUSTEMENTS HEADER
======================================== */
#header {
    margin-top: 30px;
    transition: all 0.3s ease;
}

#header.header-scrolled ~ .festive-garland {
    top: 0;
    transition: top 0.3s ease;
}

@media (max-width: 768px) {
    #header {
        margin-top: 25px;
    }
    
    #header.header-scrolled ~ .festive-garland {
        top: 0;
    }
}
