/* ───── Thème neige (discret) ─────
   La classe html.theme-neige n'est posée par js/neige.js que si
   « réduire les animations » est désactivé : sinon, rien ne s'affiche. */

/* Couche des flocons : un seul canvas, jamais cliquable,
   sous le header (1000), les menus et les modales (z-50 Tailwind, 2000…). */
.neige-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 40;
}

/* Petits stalactites de glace (avec un peu de neige) sous le header */
html.theme-neige .main-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 16px;
    pointer-events: none;
    opacity: 0.6;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='16'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23f1f5f9'/%3E%3Cstop offset='1' stop-color='%23bae6fd' stop-opacity='0.15'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='url(%23g)'%3E%3Cpath d='M5 0h6l-3 11z'/%3E%3Cpath d='M19 0h4l-2 6z'/%3E%3Cpath d='M33 0h7l-3.5 15z'/%3E%3Cpath d='M50 0h4l-2 5z'/%3E%3Cpath d='M62 0h6l-3 10z'/%3E%3Cpath d='M80 0h5l-2.5 7z'/%3E%3C/g%3E%3Cpath d='M0 0h96v1.6c-8 1.4-16 0-24 1-8 1-16-.6-24 .4s-16-.8-24 .2S8 2.6 0 1.8z' fill='%23f8fafc'/%3E%3C/svg%3E") repeat-x 0 0 / 96px 16px;
}

/* Guirlande discrète, qui pend en festons sous le header */
html.theme-neige .main-header::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 1px);
    height: 14px;
    pointer-events: none;
    opacity: 0.5;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='14'%3E%3Cpath d='M0 1Q60 13 120 1T240 1' fill='none' stroke='%2322c55e' stroke-width='1.2' stroke-opacity='0.7'/%3E%3Ccircle cx='30' cy='6.4' r='2' fill='%23fbbf24'/%3E%3Ccircle cx='60' cy='7.8' r='2' fill='%23ef4444'/%3E%3Ccircle cx='90' cy='6.4' r='2' fill='%2360a5fa'/%3E%3Ccircle cx='150' cy='6.4' r='2' fill='%23fbbf24'/%3E%3Ccircle cx='180' cy='7.8' r='2' fill='%23ef4444'/%3E%3Ccircle cx='210' cy='6.4' r='2' fill='%2360a5fa'/%3E%3C/svg%3E") repeat-x 0 0 / 240px 14px;
    animation: neige-guirlande 3.5s ease-in-out infinite;
}

@keyframes neige-guirlande {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.65; }
}

@media (prefers-reduced-motion: reduce) {
    .neige-canvas { display: none; }
    html.theme-neige .main-header::before { animation: none; }
}
