/* ============================================================
   THÈME DE NOËL (chargé seulement pendant la période, si le visiteur ne l'a pas désactivé)
   Classe .theme-christmas sur <body> ; aucun JavaScript.
   Couleurs, guirlande sous le menu, bonnet sur le logo, neige, message du pied de page.
   ============================================================ */

/* ── Couleurs : rouge de Noël, en-tête et pied de page vert sapin ── */
.theme-christmas {
    --c-primary:       #b91c1c;
    --c-primary-dark:  #991b1b;
    --c-primary-light: #fef2f2;
    --c-primary-ring:  rgba(185, 28, 28, 0.18);
}
.theme-christmas .site-header,
.theme-christmas .site-footer {
    background: linear-gradient(180deg, #14532d 0%, #0f3d22 100%);
}

/* ── Guirlande lumineuse sous le menu ── */
.theme-christmas .site-header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 14px;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 75%, #ef4444 0 4px, transparent 4.5px) 0 0 / 64px 14px repeat-x,
        radial-gradient(circle at 50% 75%, #facc15 0 4px, transparent 4.5px) 16px 0 / 64px 14px repeat-x,
        radial-gradient(circle at 50% 75%, #22c55e 0 4px, transparent 4.5px) 32px 0 / 64px 14px repeat-x,
        radial-gradient(circle at 50% 75%, #60a5fa 0 4px, transparent 4.5px) 48px 0 / 64px 14px repeat-x,
        linear-gradient(#1f2937, #1f2937) 0 4px / 100% 1px no-repeat;
    filter: drop-shadow(0 0 3px rgba(250, 204, 21, .55));
    animation: xmas-twinkle 1.6s steps(2, jump-none) infinite;
}
@keyframes xmas-twinkle {
    from { opacity: 1; }
    to   { opacity: .6; }
}

/* ── Bonnet de Père Noël sur le logo ── */
.theme-christmas .site-logo { position: relative; }
.theme-christmas .site-logo::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -12px;
    width: 34px;
    height: 30px;
    pointer-events: none;
    transform: rotate(-24deg);
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 56'%3E%3Cpath d='M8 44C13 23 29 7 49 9c-6 6-8 16-4 27z' fill='%23dc2626'/%3E%3Cpath d='M8 44C13 23 29 7 49 9c-3 3-5 7-6 11-12 2-23 11-27 24z' fill='%23b91c1c'/%3E%3Crect x='3' y='39' width='50' height='13' rx='6.5' fill='%23f8fafc'/%3E%3Ccircle cx='51' cy='9' r='7' fill='%23f8fafc'/%3E%3C/svg%3E");
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35));
}
@media (max-width: 768px) {
    .theme-christmas .site-logo::before { width: 26px; height: 23px; left: -9px; top: -2px; }
}
@media (max-width: 480px) {
    .theme-christmas .site-logo::before { width: 22px; height: 19px; left: -8px; }
}

/* ── Neige : 36 flocons (balises <i> vides générées par header.php) ──
   Chaque flocon tombe (transform sur <i>) en se balançant (transform sur ::before) ; position,
   taille, vitesse et balancement varient par :nth-child (pas de style en ligne : la politique
   de sécurité du site, style-src 'self', les bloquerait). Délais négatifs : la neige est déjà
   répartie sur l'écran au chargement de la page. */
.christmas-snow {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    pointer-events: none;   /* les clics traversent la neige */
    z-index: 450;           /* sous l'en-tête (500) et les menus déroulants */
}
.christmas-snow i {
    position: absolute;
    top: -12px;
    display: block;
    will-change: transform;
    animation-name: xmas-fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
.christmas-snow i::before {
    content: '';
    display: block;
    border-radius: 50%;
    background: #fff;
    /* contour bleuté : flocons visibles sur le fond clair des pages */
    box-shadow: 0 0 2px 1px rgba(100, 149, 237, .45), 0 0 6px rgba(148, 163, 184, .5);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}
@keyframes xmas-fall {
    from { transform: translateY(0); }
    to   { transform: translateY(calc(100vh + 24px)); }
}
@keyframes xmas-sway-a { from { transform: translateX(-14px); } to { transform: translateX(14px); } }
@keyframes xmas-sway-b { from { transform: translateX(-26px); } to { transform: translateX(26px); } }
@keyframes xmas-sway-c { from { transform: translateX(-8px); }  to { transform: translateX(8px); } }

.christmas-snow i:nth-child(1) { left: 11.8%; animation-duration: 14.5s; animation-delay: -7.4s; }
.christmas-snow i:nth-child(1)::before { width: 4px; height: 4px; opacity: 0.89; animation-name: xmas-sway-a; animation-duration: 4.7s; }
.christmas-snow i:nth-child(2) { left: 41.6%; animation-duration: 15.3s; animation-delay: -12.9s; }
.christmas-snow i:nth-child(2)::before { width: 8px; height: 8px; opacity: 0.7; animation-name: xmas-sway-c; animation-duration: 3.6s; }
.christmas-snow i:nth-child(3) { left: 8.0%; animation-duration: 12.2s; animation-delay: -1.2s; }
.christmas-snow i:nth-child(3)::before { width: 3px; height: 3px; opacity: 0.79; animation-name: xmas-sway-c; animation-duration: 3.7s; }
.christmas-snow i:nth-child(4) { left: 39.3%; animation-duration: 12.8s; animation-delay: -12.8s; }
.christmas-snow i:nth-child(4)::before { width: 6px; height: 6px; opacity: 0.85; animation-name: xmas-sway-b; animation-duration: 5.0s; }
.christmas-snow i:nth-child(5) { left: 7.6%; animation-duration: 12.7s; animation-delay: -7.1s; }
.christmas-snow i:nth-child(5)::before { width: 5px; height: 5px; opacity: 0.96; animation-name: xmas-sway-b; animation-duration: 3.6s; }
.christmas-snow i:nth-child(6) { left: 69.7%; animation-duration: 15.4s; animation-delay: -0.4s; }
.christmas-snow i:nth-child(6)::before { width: 6px; height: 6px; opacity: 0.73; animation-name: xmas-sway-b; animation-duration: 3.7s; }
.christmas-snow i:nth-child(7) { left: 88.2%; animation-duration: 15.1s; animation-delay: -13.1s; }
.christmas-snow i:nth-child(7)::before { width: 7px; height: 7px; opacity: 0.96; animation-name: xmas-sway-c; animation-duration: 4.5s; }
.christmas-snow i:nth-child(8) { left: 86.7%; animation-duration: 13.4s; animation-delay: -7.0s; }
.christmas-snow i:nth-child(8)::before { width: 7px; height: 7px; opacity: 0.84; animation-name: xmas-sway-c; animation-duration: 4.8s; }
.christmas-snow i:nth-child(9) { left: 51.3%; animation-duration: 9.3s; animation-delay: -2.1s; }
.christmas-snow i:nth-child(9)::before { width: 4px; height: 4px; opacity: 0.86; animation-name: xmas-sway-a; animation-duration: 4.9s; }
.christmas-snow i:nth-child(10) { left: 66.4%; animation-duration: 16.9s; animation-delay: -7.3s; }
.christmas-snow i:nth-child(10)::before { width: 4px; height: 4px; opacity: 0.95; animation-name: xmas-sway-b; animation-duration: 4.7s; }
.christmas-snow i:nth-child(11) { left: 12.1%; animation-duration: 16.7s; animation-delay: -11.3s; }
.christmas-snow i:nth-child(11)::before { width: 5px; height: 5px; opacity: 1.0; animation-name: xmas-sway-c; animation-duration: 3.5s; }
.christmas-snow i:nth-child(12) { left: 54.3%; animation-duration: 16.1s; animation-delay: -11.2s; }
.christmas-snow i:nth-child(12)::before { width: 7px; height: 7px; opacity: 0.95; animation-name: xmas-sway-b; animation-duration: 3.0s; }
.christmas-snow i:nth-child(13) { left: 0.9%; animation-duration: 10.6s; animation-delay: -9.3s; }
.christmas-snow i:nth-child(13)::before { width: 8px; height: 8px; opacity: 0.81; animation-name: xmas-sway-c; animation-duration: 4.8s; }
.christmas-snow i:nth-child(14) { left: 19.8%; animation-duration: 16.6s; animation-delay: -7.7s; }
.christmas-snow i:nth-child(14)::before { width: 8px; height: 8px; opacity: 0.97; animation-name: xmas-sway-b; animation-duration: 3.9s; }
.christmas-snow i:nth-child(15) { left: 82.3%; animation-duration: 12.5s; animation-delay: -11.5s; }
.christmas-snow i:nth-child(15)::before { width: 4px; height: 4px; opacity: 0.94; animation-name: xmas-sway-b; animation-duration: 4.2s; }
.christmas-snow i:nth-child(16) { left: 51.0%; animation-duration: 14.0s; animation-delay: -13.5s; }
.christmas-snow i:nth-child(16)::before { width: 7px; height: 7px; opacity: 0.72; animation-name: xmas-sway-c; animation-duration: 3.7s; }
.christmas-snow i:nth-child(17) { left: 26.4%; animation-duration: 14.5s; animation-delay: -1.4s; }
.christmas-snow i:nth-child(17)::before { width: 7px; height: 7px; opacity: 0.7; animation-name: xmas-sway-a; animation-duration: 3.6s; }
.christmas-snow i:nth-child(18) { left: 0.0%; animation-duration: 15.4s; animation-delay: -14.4s; }
.christmas-snow i:nth-child(18)::before { width: 4px; height: 4px; opacity: 0.77; animation-name: xmas-sway-c; animation-duration: 4.5s; }
.christmas-snow i:nth-child(19) { left: 61.5%; animation-duration: 17.3s; animation-delay: -16.5s; }
.christmas-snow i:nth-child(19)::before { width: 6px; height: 6px; opacity: 0.9; animation-name: xmas-sway-a; animation-duration: 2.5s; }
.christmas-snow i:nth-child(20) { left: 56.9%; animation-duration: 19.2s; animation-delay: -16.5s; }
.christmas-snow i:nth-child(20)::before { width: 4px; height: 4px; opacity: 0.88; animation-name: xmas-sway-c; animation-duration: 3.1s; }
.christmas-snow i:nth-child(21) { left: 94.9%; animation-duration: 18.6s; animation-delay: -9.4s; }
.christmas-snow i:nth-child(21)::before { width: 4px; height: 4px; opacity: 0.98; animation-name: xmas-sway-b; animation-duration: 4.2s; }
.christmas-snow i:nth-child(22) { left: 77.6%; animation-duration: 19.1s; animation-delay: -5.8s; }
.christmas-snow i:nth-child(22)::before { width: 7px; height: 7px; opacity: 0.86; animation-name: xmas-sway-b; animation-duration: 4.5s; }
.christmas-snow i:nth-child(23) { left: 19.5%; animation-duration: 9.2s; animation-delay: -1.0s; }
.christmas-snow i:nth-child(23)::before { width: 4px; height: 4px; opacity: 0.89; animation-name: xmas-sway-a; animation-duration: 4.6s; }
.christmas-snow i:nth-child(24) { left: 92.5%; animation-duration: 19.4s; animation-delay: -0.5s; }
.christmas-snow i:nth-child(24)::before { width: 8px; height: 8px; opacity: 0.84; animation-name: xmas-sway-b; animation-duration: 4.2s; }
.christmas-snow i:nth-child(25) { left: 90.5%; animation-duration: 14.5s; animation-delay: -6.8s; }
.christmas-snow i:nth-child(25)::before { width: 4px; height: 4px; opacity: 0.76; animation-name: xmas-sway-a; animation-duration: 4.0s; }
.christmas-snow i:nth-child(26) { left: 61.7%; animation-duration: 14.0s; animation-delay: -3.3s; }
.christmas-snow i:nth-child(26)::before { width: 4px; height: 4px; opacity: 0.76; animation-name: xmas-sway-c; animation-duration: 3.5s; }
.christmas-snow i:nth-child(27) { left: 91.2%; animation-duration: 9.5s; animation-delay: -5.2s; }
.christmas-snow i:nth-child(27)::before { width: 3px; height: 3px; opacity: 0.89; animation-name: xmas-sway-b; animation-duration: 4.7s; }
.christmas-snow i:nth-child(28) { left: 47.9%; animation-duration: 16.5s; animation-delay: -0.3s; }
.christmas-snow i:nth-child(28)::before { width: 5px; height: 5px; opacity: 0.74; animation-name: xmas-sway-c; animation-duration: 4.7s; }
.christmas-snow i:nth-child(29) { left: 65.5%; animation-duration: 11.0s; animation-delay: -3.0s; }
.christmas-snow i:nth-child(29)::before { width: 7px; height: 7px; opacity: 0.76; animation-name: xmas-sway-a; animation-duration: 3.5s; }
.christmas-snow i:nth-child(30) { left: 17.3%; animation-duration: 14.1s; animation-delay: -14.1s; }
.christmas-snow i:nth-child(30)::before { width: 7px; height: 7px; opacity: 0.8; animation-name: xmas-sway-b; animation-duration: 3.7s; }
.christmas-snow i:nth-child(31) { left: 47.7%; animation-duration: 10.3s; animation-delay: -8.2s; }
.christmas-snow i:nth-child(31)::before { width: 5px; height: 5px; opacity: 0.77; animation-name: xmas-sway-a; animation-duration: 4.6s; }
.christmas-snow i:nth-child(32) { left: 94.4%; animation-duration: 18.7s; animation-delay: -12.1s; }
.christmas-snow i:nth-child(32)::before { width: 7px; height: 7px; opacity: 0.95; animation-name: xmas-sway-c; animation-duration: 4.5s; }
.christmas-snow i:nth-child(33) { left: 66.4%; animation-duration: 19.6s; animation-delay: -6.9s; }
.christmas-snow i:nth-child(33)::before { width: 4px; height: 4px; opacity: 0.87; animation-name: xmas-sway-b; animation-duration: 3.9s; }
.christmas-snow i:nth-child(34) { left: 53.3%; animation-duration: 10.2s; animation-delay: -7.3s; }
.christmas-snow i:nth-child(34)::before { width: 5px; height: 5px; opacity: 0.78; animation-name: xmas-sway-c; animation-duration: 3.2s; }
.christmas-snow i:nth-child(35) { left: 55.0%; animation-duration: 10.1s; animation-delay: -2.7s; }
.christmas-snow i:nth-child(35)::before { width: 7px; height: 7px; opacity: 0.72; animation-name: xmas-sway-a; animation-duration: 2.8s; }
.christmas-snow i:nth-child(36) { left: 35.3%; animation-duration: 17.8s; animation-delay: -11.5s; }
.christmas-snow i:nth-child(36)::before { width: 4px; height: 4px; opacity: 0.88; animation-name: xmas-sway-c; animation-duration: 3.3s; }

/* Mobile : moitié moins de flocons */
@media (max-width: 768px) {
    .christmas-snow i:nth-child(n+19) { display: none; }
}

/* ── Message du pied de page ── */
.christmas-message { color: #fca5a5; font-weight: 600; }

/* ── Animations réduites (réglage du système) : flocons immobiles, guirlande sans clignotement ──
   Animations en pause : grâce aux délais négatifs, chaque flocon reste figé à sa position de
   départ, répartie sur toute la hauteur de l'écran (décor visible, sans mouvement). */
@media (prefers-reduced-motion: reduce) {
    .christmas-snow i,
    .christmas-snow i::before { animation-play-state: paused; }
    .theme-christmas .site-header::after { animation: none; }
}
