/* Fond animé nordique pour les pages runes */

body.runes-theme {
    background: linear-gradient(to bottom, #2c3e50 0%, #34495e 40%, #3d5a75 70%, #2c3e50 100%);
    position: relative;
    overflow-x: hidden;
}

/* Aurore boréale */
body.runes-theme::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background:
        linear-gradient(135deg,
            transparent 0%,
            rgba(52, 235, 143, 0.15) 20%,
            rgba(52, 168, 235, 0.2) 40%,
            rgba(142, 68, 235, 0.15) 60%,
            rgba(52, 235, 143, 0.1) 80%,
            transparent 100%
        );
    animation: aurora 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 1;
}

/* Flocons de neige */
body.runes-theme::after {
    content: '';
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.8) 0%, transparent 1%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.6) 0%, transparent 1%),
        radial-gradient(circle at 50% 80%, rgba(255, 255, 255, 0.7) 0%, transparent 1%),
        radial-gradient(circle at 30% 60%, rgba(255, 255, 255, 0.5) 0%, transparent 0.8%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.9) 0%, transparent 1%);
    background-size: 100% 100%;
    animation: snowfall 25s linear infinite;
    pointer-events: none;
    z-index: 3;
    opacity: 0.7;
}

/* Montagnes enneigées */
.nordic-mountains {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 350px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 350"><defs><linearGradient id="mountainGrad" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" style="stop-color:rgb(240,248,255);stop-opacity:0.9" /><stop offset="100%" style="stop-color:rgb(180,200,220);stop-opacity:0.95" /></linearGradient></defs><polygon points="0,350 200,100 400,350" fill="url(%23mountainGrad)" opacity="0.6"/><polygon points="250,350 500,50 750,350" fill="url(%23mountainGrad)" opacity="0.7"/><polygon points="600,350 850,120 1100,350" fill="url(%23mountainGrad)" opacity="0.65"/><polygon points="900,350 1050,180 1200,350" fill="url(%23mountainGrad)" opacity="0.6"/></svg>');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: bottom;
    pointer-events: none;
    z-index: 2;
}

/* Pins / sapins nordiques */
.nordic-trees {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 250"><g opacity="0.7"><polygon points="100,250 120,180 105,190 125,140 110,150 130,100 150,100 170,150 155,140 175,190 160,180 180,250" fill="rgba(20,60,40,0.8)"/><polygon points="300,250 320,190 305,200 325,150 310,160 330,110 350,110 370,160 355,150 375,200 360,190 380,250" fill="rgba(20,60,40,0.85)"/><polygon points="700,250 720,200 705,210 725,160 710,170 730,120 750,120 770,170 755,160 775,210 760,200 780,250" fill="rgba(20,60,40,0.75)"/><polygon points="950,250 970,195 955,205 975,155 960,165 980,115 1000,115 1020,165 1005,155 1025,205 1010,195 1030,250" fill="rgba(20,60,40,0.8)"/></g></svg>');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: bottom;
    pointer-events: none;
    z-index: 4;
}

/* Étoiles nordiques */
.nordic-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(1px 1px at 15% 25%, white, transparent),
        radial-gradient(2px 2px at 75% 15%, white, transparent),
        radial-gradient(1px 1px at 45% 35%, white, transparent),
        radial-gradient(1px 1px at 85% 45%, white, transparent),
        radial-gradient(2px 2px at 25% 65%, white, transparent),
        radial-gradient(1px 1px at 65% 75%, white, transparent),
        radial-gradient(1px 1px at 35% 85%, white, transparent);
    background-size: 100% 100%;
    animation: star-twinkle 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

/* Runes mystiques flottantes */
.floating-runes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.12;
}

.floating-rune {
    position: absolute;
    font-size: 50px;
    color: rgba(200, 220, 255, 0.5);
    font-family: 'Segoe UI Symbol', serif;
    animation: rune-float 50s linear infinite;
}

.floating-rune:nth-child(1) {
    content: 'ᚠ';
    top: 10%;
    left: 15%;
    animation-duration: 45s;
}

.floating-rune:nth-child(2) {
    content: 'ᚢ';
    top: 60%;
    left: 70%;
    animation-duration: 55s;
    animation-delay: 10s;
}

.floating-rune:nth-child(3) {
    content: 'ᚦ';
    top: 35%;
    left: 85%;
    animation-duration: 50s;
    animation-delay: 20s;
}

/* Brume glacée */
.icy-mist {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top,
        rgba(200, 220, 240, 0.2) 0%,
        rgba(180, 200, 230, 0.1) 40%,
        transparent 100%
    );
    animation: mist-flow 18s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 3;
}

/* Lune nordique */
.nordic-moon {
    position: fixed;
    top: 12%;
    right: 18%;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        #ffffff 0%,
        #e8f4f8 40%,
        #d0e8f2 100%
    );
    box-shadow:
        0 0 40px rgba(255, 255, 255, 0.6),
        0 0 80px rgba(200, 220, 255, 0.4),
        inset -12px -12px 25px rgba(0, 0, 0, 0.1);
    animation: moon-glow 7s ease-in-out infinite;
    z-index: 2;
    pointer-events: none;
}

/* Animations */
@keyframes aurora {
    0% {
        opacity: 0.6;
        transform: translateX(0) scaleX(1);
    }
    50% {
        opacity: 0.9;
        transform: translateX(10%) scaleX(1.1);
    }
    100% {
        opacity: 0.7;
        transform: translateX(-5%) scaleX(1.05);
    }
}

@keyframes snowfall {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(50%);
    }
}

@keyframes star-twinkle {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

@keyframes rune-float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(-120px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes mist-flow {
    0% {
        transform: translateX(0);
        opacity: 0.5;
    }
    100% {
        transform: translateX(-20px);
        opacity: 0.7;
    }
}

@keyframes moon-glow {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 40px rgba(255, 255, 255, 0.6),
            0 0 80px rgba(200, 220, 255, 0.4),
            inset -12px -12px 25px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.06);
        box-shadow:
            0 0 60px rgba(255, 255, 255, 0.8),
            0 0 120px rgba(200, 220, 255, 0.6),
            inset -12px -12px 25px rgba(0, 0, 0, 0.08);
    }
}

/* Container doit avoir un z-index plus élevé */
body.runes-theme .container {
    position: relative;
    z-index: 10;
}
