/* ============================================================
   festif.css - Modes festifs Halloween et Noël
   Chargé par header.php quand le mode est actif, avec la classe
   festif-halloween ou festif-noel sur <html>.
   Chargé après style.css : la palette festive remplace le thème
   choisi par le visiteur (rose, menthe, nuit).
   ============================================================ */

/* ── Palettes ── */
html.festif-halloween {
    --vert:        #ff7a1a;
    --vert-clair:  #ff9a4d;
    --menthe:      #8e5cd9;
    --creme:       #120d1a;
    --sable:       #1d1528;
    --terre:       #ffb070;
    --safran:      #ffb52e;
    --rouge-epice: #e0413b;
    --texte:       #f3eaff;
    --texte-doux:  #b9a7d6;
    --blanc:       #1d1528; /* comme le thème nuit : sert de fond aux cartes et champs */
    --nav-bg:      rgba(18, 13, 26, .92);
    --nav-border:  rgba(255, 122, 26, .25);
    --input-bg:    #1d1528;
    --input-border:#4a3566;
    --card-bg:     #1d1528;
    --footer-bg:   #09060d;
    --bg-blob-1:   rgba(255, 122, 26, .10);
    --bg-blob-2:   rgba(142, 92, 217, .16);
}
html.festif-noel {
    --vert:        #e0475b;
    --vert-clair:  #ec6b7c;
    --menthe:      #2f7d55;
    --creme:       #0f1f18;
    --sable:       #16291f;
    --terre:       #e3b65c;
    --safran:      #e3b65c;
    --rouge-epice: #e0475b;
    --texte:       #f6efe4;
    --texte-doux:  #b8c7b6;
    --blanc:       #1a3026; /* comme le thème nuit : sert de fond aux cartes et champs */
    --nav-bg:      rgba(15, 31, 24, .92);
    --nav-border:  rgba(227, 182, 92, .22);
    --input-bg:    #16291f;
    --input-border:#35503f;
    --card-bg:     #1a3026;
    --footer-bg:   #0a1610;
    --bg-blob-1:   rgba(224, 71, 91, .10);
    --bg-blob-2:   rgba(227, 182, 92, .08);
}

/* Le sélecteur de thème ne servirait à rien pendant le mode festif */
html.festif-halloween .theme-switcher,
html.festif-noel .theme-switcher { display: none; }

/* ── Canvas des particules ── */
.festif-canvas {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 90; /* sous le header collant (100) */
}

/* ── Chapeau sur le logo ── */
html.festif-halloween .logo,
html.festif-noel .logo { position: relative; }
.festif-chapeau {
    position: absolute; pointer-events: none;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.logo:hover .festif-chapeau { transform: rotate(-14deg) translateY(-3px); }

/* ============================================================
   HALLOWEEN
   ============================================================ */
html.festif-halloween .festif-chapeau {
    width: 44px; top: -12px; left: -8px; transform: rotate(-12deg);
    filter: drop-shadow(0 0 3px rgba(255,170,90,.45));
}

/* Toile d'araignée dans le coin du header */
.hw-toile {
    position: absolute; top: 0; right: 0; width: 110px; height: 110px;
    pointer-events: none; opacity: .55; z-index: 0;
}
html.festif-halloween .nav-inner { position: relative; z-index: 1; }

/* En défilant, les toiles du header s'effacent (classe posée par festif.js) */
.hw-toile, .hw-voile { transition: opacity .5s ease; }
html.festif-defile .hw-toile { opacity: 0; }
html.festif-defile .hw-voile { opacity: 0; }

/* Araignée qui pend sous le header */
.hw-araignee {
    position: absolute; right: 14%; top: 100%;
    width: 30px; cursor: pointer; z-index: 95;
    transform-origin: top center;
    animation: hwBalance 4s ease-in-out infinite;
}
.hw-fil {
    width: 1px; margin: 0 auto;
    background: linear-gradient(to bottom, rgba(255,255,255,.1), rgba(255,255,255,.55));
    height: 70px;
    transition: height 1.2s cubic-bezier(.5, 0, .3, 1);
}
.hw-araignee.remonte .hw-fil,
.hw-araignee.cachee .hw-fil { height: 0; }
.hw-araignee svg {
    display: block; width: 30px; margin-top: -2px;
    filter: drop-shadow(0 0 3px rgba(255,122,26,.55));
    animation: hwPattes .6s ease-in-out infinite alternate;
    transition: opacity .3s;
}
/* Elle remonte puis disparaît dans le header (au clic ou dès qu'on scrolle) */
.hw-araignee.remonte svg,
.hw-araignee.cachee svg { opacity: 0; transition: opacity .3s .9s; }
@keyframes hwBalance { 0%,100% { transform: rotate(4deg); } 50% { transform: rotate(-4deg); } }
@keyframes hwPattes  { to { transform: scaleX(.92); } }

/* Lune derrière la carte à la une */
html.festif-halloween .hero::before {
    top: 10px; right: -30px; width: 380px; height: 380px;
    background:
        radial-gradient(circle at 38% 36%, rgba(255, 244, 222, .30) 0%, rgba(255, 214, 160, .16) 26%, rgba(255, 190, 120, .06) 33%, transparent 36%),
        radial-gradient(circle, rgba(255, 150, 70, .16) 0%, transparent 62%);
    filter: blur(1px);
    display: block;
}
html.festif-halloween .hero-visual { position: relative; z-index: 1; }

/* Lueur de bougie au survol des cartes */
html.festif-halloween .recipe-card:hover {
    box-shadow: 0 18px 50px rgba(255, 122, 26, .22), 0 0 0 1px rgba(255,122,26,.35);
}
html.festif-halloween .recipe-thumb img { filter: saturate(.9) contrast(1.05); }
/* Cartes catégories : violet nuit, liseré, petite toile dans le coin */
html.festif-halloween .cat-card {
    background: linear-gradient(160deg, #2c1f42 0%, #1d1528 100%);
    border: 1px solid rgba(142, 92, 217, .35);
    overflow: hidden;
}
html.festif-halloween .cat-card::after {
    content: ''; position: absolute; top: 0; right: 0;
    width: 52px; height: 52px; opacity: .3; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 110 110' fill='none' stroke='white' stroke-width='1.6'%3E%3Cpath d='M110 0 L110 110 M110 0 L68 102 M110 0 L32 78 M110 0 L8 42 M110 0 L0 0'/%3E%3Cpath d='M110 55 Q101.1 45 88.9 50.8 Q84.5 38.2 71.1 38.9 Q71.9 25.5 59.2 21.1 Q65 9 55 0'/%3E%3Cpath d='M110 85 Q96.1 69.5 77.4 78.5 Q70.6 58.9 49.9 60.1 Q51.1 39.4 31.5 32.6 Q40.5 13.9 25 0'/%3E%3C/svg%3E") no-repeat top right / contain;
    transition: opacity .25s;
}
html.festif-halloween .cat-card .cat-icon { filter: drop-shadow(0 0 6px rgba(255,122,26,.35)); }
html.festif-halloween .cat-card:hover {
    background: linear-gradient(160deg, #36264f 0%, #231a31 100%);
    border-color: rgba(255, 122, 26, .6);
    box-shadow: 0 14px 36px rgba(255,122,26,.25), inset 0 0 24px rgba(255,122,26,.08);
}
html.festif-halloween .cat-card:hover::after { opacity: .55; }
html.festif-halloween .cat-name,
html.festif-noel .cat-name { color: #fff; } /* --blanc est sombre dans ces deux modes */

/* Dortoir sous le header : toiles en lambeaux + chauves-souris endormies (posées par festif.js) */
.hw-dortoir {
    position: absolute; left: 0; right: 0; top: 100%;
    height: 40px; pointer-events: none; z-index: 94;
}
.hw-voile {
    position: absolute; left: 0; right: 0; top: 0; height: 26px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='26'%3E%3Cg fill='none' stroke='rgba(230,220,245,0.32)' stroke-width='0.8'%3E%3Cpath d='M0 1 Q30 18 60 3 Q85 14 110 2 Q150 22 185 4 Q215 15 240 1'/%3E%3Cpath d='M0 1 Q20 8 40 6 M60 3 Q70 12 82 9 M110 2 Q125 10 140 12 M185 4 Q200 9 214 10'/%3E%3Cpath d='M30 12 L31 22 M150 14 L149 24 M95 9 L96 15'/%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 240px 26px;
}
.hw-chauve {
    position: absolute; top: -1px;
    width: 22px; margin-left: -11px;
    pointer-events: auto; cursor: pointer;
    transform-origin: top center;
    animation: hwDort 5s ease-in-out infinite;
}
.hw-chauve svg { display: block; width: 100%; filter: drop-shadow(0 0 2px rgba(255,122,26,.7)) drop-shadow(0 0 6px rgba(255,122,26,.25)); }
.hw-chauve .yeux { opacity: 0; transition: opacity .15s; }
.hw-chauve:hover .yeux, .hw-chauve.envol .yeux { opacity: 1; }
.hw-chauve.envol  { animation: hwEnvol 1.4s ease-in forwards; pointer-events: none; }
.hw-chauve.partie { opacity: 0; pointer-events: none; transition: opacity .1s; }
.hw-chauve.retour { animation: hwRetour .9s ease-out; }
@keyframes hwDort   { 0%,100% { transform: rotate(3deg); } 50% { transform: rotate(-3deg); } }
@keyframes hwEnvol  {
    0%   { transform: rotate(0); }
    15%  { transform: translateY(3px) rotate(0); }
    35%  { transform: translateY(6px) rotate(180deg); opacity: 1; }
    100% { transform: translate(var(--dx), -160px) rotate(180deg) scale(.6); opacity: 0; }
}
@keyframes hwRetour { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }

/* Menu : trait de cire qui coule + lueur de bougie au survol */
html.festif-halloween .nav-links a::after {
    height: 7px; bottom: -7px; background: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 7' preserveAspectRatio='none'%3E%3Cpath fill='%23ff7a1a' d='M0 0 H60 V2 H52 Q51 7 49.5 7 Q48 7 48 2 H36 Q35.5 5 34.5 5 Q33.5 5 33 2 H15 Q14.5 6.5 13 6.5 Q11.5 6.5 11 2 H0 Z'/%3E%3C/svg%3E");
    background-size: 100% 100%;
}
html.festif-halloween .nav-links a:hover { text-shadow: 0 0 10px rgba(255,122,26,.65); }

/* Toile d'araignée sur la carte à la une */
.hw-toile-carte {
    position: absolute; top: 0; right: 0; z-index: 3;
    width: 120px; height: 120px; pointer-events: none; opacity: .7;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,.5));
}

/* ============================================================
   PAYSAGE AU-DESSUS DU FOOTER (commun Halloween / Noël)
   Calques : colline du fond < décors < colline de devant < premier plan.
   Les collines s'étirent en largeur ; les décors gardent leur taille
   et sont plantés derrière la colline de devant (jamais coupés).
   ============================================================ */
.festif-sol {
    position: relative; height: 140px;
    margin-bottom: -1px; pointer-events: none; overflow: hidden;
}
.festif-sol .sol-calque { position: absolute; inset: 0; width: 100%; height: 100%; }
.festif-sol .sol-deco   { position: absolute; inset: 0; }
/* --base : placement de chaque décor, repris par les animations de clic */
.festif-sol .sol-deco > svg {
    --base: translateX(-50%);
    position: absolute; overflow: visible;
    transform: var(--base); transform-origin: 50% 100%;
}
.festif-sol .sol-deco > svg.miroir { --base: translateX(-50%) scaleX(-1); }

/* ── Décor interactif (façon plateau Hearthstone) : halo au survol, réaction au clic ── */
.festif-sol [data-clic] { pointer-events: auto; cursor: pointer; }
.festif-sol [data-clic="yeux"] { padding: 8px; margin-bottom: -8px; box-sizing: content-box; }
@media (hover: hover) {
    html.festif-halloween .festif-sol [data-clic]:hover { filter: drop-shadow(0 0 6px rgba(255, 150, 60, .8)); }
    html.festif-noel .festif-sol [data-clic]:hover      { filter: drop-shadow(0 0 6px rgba(244, 213, 141, .8)); }
}

@keyframes fsSaut {
    0%, 100% { transform: var(--base); }
    30% { transform: var(--base) translateY(-14px); }
    55% { transform: var(--base) scale(1.06, .92); }
    75% { transform: var(--base) translateY(-4px); }
}
@keyframes fsSecoue {
    0%, 100% { transform: var(--base); }
    15% { transform: var(--base) rotate(-7deg); }
    30% { transform: var(--base) rotate(6deg); }
    45% { transform: var(--base) rotate(-5deg); }
    60% { transform: var(--base) rotate(4deg); }
    75% { transform: var(--base) rotate(-2deg); }
}
.festif-sol .joue-saut    { animation: fsSaut .7s ease-out; }
.festif-sol .joue-secoue  { animation: fsSecoue .6s ease-in-out; }

/* Citrouille qui s'embrase */
.festif-sol .joue-embrase { animation: fsSaut .7s ease-out, fsEmbrase 1.2s ease-out; }
@keyframes fsEmbrase {
    0%   { filter: none; }
    20%  { filter: drop-shadow(0 0 16px #ffb347) brightness(1.5); }
    100% { filter: none; }
}

/* Manoir : les fenêtres s'éteignent puis se rallument d'un coup */
.festif-sol .joue-manoir .hw-fenetres { animation: fsFenetres 1.3s ease-out; }
@keyframes fsFenetres {
    0% { opacity: 1; } 10%, 45% { opacity: 0; }
    50% { opacity: 1; filter: drop-shadow(0 0 10px #ffb347) brightness(1.7); }
    100% { opacity: 1; }
}

/* Main de squelette qui s'enfonce sous terre puis ressort */
.festif-sol .joue-main { animation: fsMain 3.4s ease-in-out; }
@keyframes fsMain {
    0%, 100% { transform: var(--base); }
    12% { transform: var(--base) scaleY(.88); }
    35%, 80% { transform: var(--base) translateY(36px); }
}

/* Chat qui bondit, les yeux grands ouverts */
.festif-sol .joue-chat { animation: fsChat .8s ease-out; }
.festif-sol .joue-chat .hw-yeux { animation: none; transform: scale(1.8); fill: #fff3a0; }
@keyframes fsChat {
    0%, 100% { transform: var(--base); }
    35% { transform: var(--base) translateY(-20px) rotate(-8deg); }
    60% { transform: var(--base) translateY(0) scale(1.08, .9); }
}

/* Lune rouge sang */
.hw-lune circle { transition: fill .8s ease; }
.festif-sol .hw-lune.joue-sang { filter: drop-shadow(0 0 18px rgba(220, 40, 40, .85)) !important; }
.festif-sol .hw-lune.joue-sang circle { fill: #b3261e; }
.festif-sol .hw-lune.joue-sang circle + circle { fill: #8e1b15; }

/* Yeux dans le noir qui disparaissent */
.festif-sol [data-clic="yeux"] { transition: opacity .3s ease; }
.festif-sol .joue-cache { opacity: 0; }

/* Bonhomme de neige : le chapeau saute en tournoyant */
.nl-chapeau { transform-box: fill-box; transform-origin: center; }
.festif-sol .joue-chapeau .nl-chapeau { animation: fsChapeau 1s ease-in-out; }
@keyframes fsChapeau {
    0%   { transform: none; }
    40%  { transform: translateY(-22px) rotate(200deg); }
    70%  { transform: translateY(-8px) rotate(330deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

/* Chalet : interrupteur de la fenêtre */
.nl-fenetre { transition: fill .3s ease, filter .3s ease; }
.festif-sol .eteint .nl-fenetre { fill: #2a1a10; filter: none; }

/* Sapin décoré : les boules s'affolent, l'étoile fait un tour */
.festif-sol .joue-fete { animation: fsSaut .7s ease-out; }
.festif-sol .joue-fete .nl-boule { animation: nlClignote .25s ease-in-out 8; }
.nl-etoile-sapin { transform-box: fill-box; transform-origin: center; }
.festif-sol .joue-fete .nl-etoile-sapin { animation: fsTour 1s ease-in-out; }
@keyframes fsTour { 50% { transform: rotate(180deg) scale(1.5); } 100% { transform: rotate(360deg); } }

/* Renne qui bondit, Rudolph qui s'emballe */
.festif-sol .joue-saut .nl-nez { animation-duration: .25s; }

/* Éléments créés au clic (fantômes, étincelles, neige, cadeaux) */
.fs-effet { position: absolute; pointer-events: none; z-index: 5; }
.fs-point { width: 4px; height: 4px; border-radius: 50%; }

/* Silhouettes du cimetière */
.hw-pierre { fill: var(--footer-bg); stroke: rgba(142,92,217,.45); stroke-width: 1.2; }
.hw-gravure { fill: none; stroke: rgba(142,92,217,.3); stroke-width: 1; }

/* Lune, fenêtres du manoir, main de squelette, fantôme, sorcière */
.hw-lune { filter: drop-shadow(0 0 14px rgba(255, 210, 140, .55)); opacity: .9; }
.hw-fenetres { filter: drop-shadow(0 0 4px rgba(255, 170, 60, .9)); animation: hwLueur 4.5s infinite; }
.hw-main {
    transform-box: fill-box; transform-origin: 50% 100%;
    animation: hwMain 3.5s ease-in-out infinite;
}
@keyframes hwMain {
    0%, 55%, 100% { transform: rotate(0); }
    65% { transform: rotate(-12deg); } 75% { transform: rotate(10deg); } 85% { transform: rotate(-8deg); }
}
.festif-sol .sol-deco > svg.hw-fantome { animation: hwFantome 5s ease-in-out infinite; }
@keyframes hwFantome {
    0%, 100% { transform: var(--base);                  opacity: .55; }
    50%      { transform: var(--base) translateY(-9px); opacity: .9; }
}
.hw-sorciere {
    position: absolute; top: 6px; left: 0; z-index: 1;
    width: 90px; height: auto;
    filter: drop-shadow(0 0 4px rgba(255, 140, 50, .55));
    animation: hwVol 34s linear infinite;
    animation-delay: -8s;
}
@keyframes hwVol {
    0%   { transform: translate(-120px, 18px) rotate(-4deg); }
    15%  { transform: translate(calc(25vw - 45px), 6px) rotate(-2deg); }
    30%  { transform: translate(calc(50vw - 45px), 16px) rotate(-5deg); }
    45%  { transform: translate(calc(75vw - 45px), 4px) rotate(-2deg); }
    60%  { transform: translate(calc(100vw + 20px), 12px) rotate(-4deg); }
    100% { transform: translate(calc(100vw + 20px), 12px) rotate(-4deg); }
}

.hw-lueur {
    filter: drop-shadow(0 0 4px rgba(255,190,80,.9));
    animation: hwLueur 3.2s infinite;
}
@keyframes hwLueur {
    0%, 100% { opacity: 1; }
    12% { opacity: .75; } 15% { opacity: 1; } 47% { opacity: .85; } 52% { opacity: .6; } 55% { opacity: 1; }
}
.hw-yeux {
    transform-box: fill-box; transform-origin: center;
    animation: hwCligne 5s infinite;
}
.hw-yeux.bis { animation-duration: 7s; animation-delay: -2s; }
@keyframes hwCligne { 0%, 90%, 96%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.1); } }

/* Section catégories : pas de découpes en ellipse en mode festif, juste un fondu */
html.festif-halloween .section-categories::before,
html.festif-halloween .section-categories::after,
html.festif-noel .section-categories::before,
html.festif-noel .section-categories::after { display: none; }
html.festif-halloween .section-categories {
    background-color: transparent;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(to bottom, transparent, rgba(29,21,40,.8) 22%, rgba(29,21,40,.8) 78%, transparent);
    background-size: 28px 28px, 100% 100%;
}

/* ============================================================
   NOËL
   ============================================================ */
html.festif-noel .festif-chapeau { width: 46px; top: -10px; left: -10px; transform: rotate(-16deg); }

/* Guirlande lumineuse sous le header */
.nl-guirlande {
    position: absolute; left: 0; right: 0; top: 100%;
    height: 30px; pointer-events: none; z-index: 95;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='20'%3E%3Cpath d='M0 2 Q36 18 72 2' fill='none' stroke='%236f8f74' stroke-width='1.6'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 72px 20px;
}
.nl-ampoule {
    position: absolute; top: 9px;
    width: 9px; height: 15px; margin-left: -4.5px;
    border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
    background: var(--c);
    box-shadow: 0 0 6px 2px var(--c), 0 0 16px 4px color-mix(in srgb, var(--c) 45%, transparent);
    animation: nlClignote 2.8s ease-in-out infinite;
}
.nl-ampoule::before {
    content: ''; position: absolute; top: -4px; left: 1.5px;
    width: 6px; height: 5px; border-radius: 1px; background: #3d4a3f;
}
@keyframes nlClignote {
    0%, 100% { opacity: 1; filter: brightness(1.15); }
    50%      { opacity: .35; filter: brightness(.7); box-shadow: none; }
}

/* Neige posée sur la carte à la une */
.nl-neige-carte {
    position: absolute; top: -2px; left: 0; right: 0; z-index: 3;
    width: 100%; height: 34px; pointer-events: none;
    filter: drop-shadow(0 3px 3px rgba(0,0,0,.12));
}

/* Cartes : petite lueur dorée */
html.festif-noel .recipe-card:hover {
    box-shadow: 0 18px 50px rgba(227, 182, 92, .16), 0 0 0 1px rgba(227,182,92,.45);
}
/* Cartes catégories : vert sapin, liseré doré, neige posée dessus */
html.festif-noel .cat-card {
    background: linear-gradient(160deg, #1f3d2e 0%, #16291f 100%);
    border: 1px solid rgba(227, 182, 92, .3);
    overflow: hidden;
    padding-top: 1.9rem;
}
html.festif-noel .cat-card::before {
    content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 14px; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath fill='white' d='M0 0 H200 V5 Q190 9 180 6 Q172 13 164 6 Q150 10 136 5 Q128 8 120 5 Q112 12 104 6 Q90 10 76 5 Q66 9 56 5 Q48 11 40 6 Q26 10 14 5 Q7 8 0 5 Z'/%3E%3C/svg%3E") no-repeat top / 100% 100%;
    opacity: .9;
}
html.festif-noel .cat-card:hover {
    background: linear-gradient(160deg, #26493a 0%, #1a3026 100%);
    border-color: rgba(227, 182, 92, .65);
    box-shadow: 0 14px 36px rgba(227,182,92,.18), inset 0 0 24px rgba(227,182,92,.06);
}
/* Menu : sucre d'orge + petite étoile dorée au survol */
html.festif-noel .nav-links a::after {
    height: 3px; border-radius: 2px;
    background: repeating-linear-gradient(-45deg, #e0475b 0 4px, #fff 4px 8px);
}
html.festif-noel .nav-links a::before {
    content: '✦'; position: absolute; top: -.85rem; right: -.7rem;
    font-size: .7rem; color: #f4d58d;
    opacity: 0; transform: scale(.3) rotate(-30deg);
    transition: opacity .25s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
html.festif-noel .nav-links a:hover::before { opacity: 1; transform: scale(1) rotate(0); }
html.festif-noel .nav-links a:hover { text-shadow: 0 0 10px rgba(227,182,92,.45); }

html.festif-noel .section-categories {
    background-color: transparent;
    background-image:
        radial-gradient(circle, rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(to bottom, transparent, rgba(22,41,31,.85) 22%, rgba(22,41,31,.85) 78%, transparent);
    background-size: 28px 28px, 100% 100%;
}

/* Paysage enneigé : fenêtre du chalet, fumée, nez de renne, traîneau */
.nl-fenetre { filter: drop-shadow(0 0 5px rgba(255, 200, 100, .8)); }
.nl-fumee {
    fill: rgba(220, 225, 230, .35);
    transform-box: fill-box; transform-origin: center;
    animation: nlFumee 4s ease-out infinite;
}
.nl-fumee:nth-of-type(2) { animation-delay: -1.3s; }
.nl-fumee:nth-of-type(3) { animation-delay: -2.6s; }
@keyframes nlFumee {
    0%   { transform: translate(0, 10px) scale(.5); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translate(8px, -16px) scale(1.6); opacity: 0; }
}
.nl-nez { filter: drop-shadow(0 0 3px #ff4d4d); animation: nlNez 2s ease-in-out infinite; }
@keyframes nlNez { 50% { opacity: .55; } }
.nl-boule { animation: nlClignote 2.8s ease-in-out infinite; }
.nl-boule:nth-of-type(2n) { animation-delay: -1.4s; }

/* Traîneau qui traverse le ciel de temps en temps */
.nl-traineau {
    position: absolute; top: 4px; left: 0; z-index: 1;
    width: 190px; height: auto;
    filter: drop-shadow(0 0 6px rgba(244, 213, 141, .5));
    animation: nlVol 30s linear infinite;
}
@keyframes nlVol {
    0%   { transform: translate(-220px, 14px); }
    15%  { transform: translate(calc(25vw - 110px), 4px); }
    30%  { transform: translate(calc(50vw - 110px), 12px); }
    45%  { transform: translate(calc(75vw - 110px), 2px); }
    60%  { transform: translate(calc(100vw + 20px), 10px); }
    100% { transform: translate(calc(100vw + 20px), 10px); }
}

/* ============================================================
   ACCUEIL : titres et citation dans une police festive
   (classe festif-accueil posée par header.php)
   ============================================================ */
html.festif-halloween.festif-accueil .hero h1,
html.festif-halloween.festif-accueil .hero h1 em,
html.festif-halloween.festif-accueil main h2,
html.festif-halloween.festif-accueil .citation-accueil {
    font-family: 'Grenze Gotisch', serif !important;
    font-style: normal !important; font-weight: 600 !important;
    color: #ffc58a !important;
    text-shadow: 0 0 18px rgba(255, 140, 50, .3);
}
html.festif-halloween.festif-accueil .hero h1 em { color: #ff9a4d !important; }

html.festif-noel.festif-accueil .hero h1,
html.festif-noel.festif-accueil .hero h1 em,
html.festif-noel.festif-accueil main h2,
html.festif-noel.festif-accueil .citation-accueil {
    font-family: 'Berkshire Swash', serif !important;
    font-style: normal !important; font-weight: 400 !important;
    color: #f4d58d !important;
    text-shadow: 0 0 18px rgba(244, 213, 141, .25);
}
html.festif-noel.festif-accueil .hero h1 em { color: #f2a0aa !important; }

/* Paragraphe de présentation : police d'accompagnement, plus lisible que celle des titres */
html.festif-halloween.festif-accueil .hero-desc {
    font-family: 'IM Fell English', serif;
    font-size: 1.15rem; line-height: 1.7;
    color: #e3d3f3;
}
html.festif-noel.festif-accueil .hero-desc {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic; font-weight: 500;
    font-size: 1.22rem; line-height: 1.65;
    color: #efe3c8;
}

/* Petites étiquettes ("✦ Explorer par univers"), badge du haut, auteur de la citation */
html.festif-halloween.festif-accueil .section-label {
    font-family: 'Grenze Gotisch', serif; font-weight: 600;
    font-size: 1.2rem; letter-spacing: .02em;
    color: #ff9a4d;
}
html.festif-halloween.festif-accueil .hero-badge {
    font-family: 'IM Fell English', serif;
    font-size: .85rem; letter-spacing: .08em;
}
html.festif-halloween.festif-accueil .citation-auteur {
    font-family: 'IM Fell English', serif;
    font-size: .95rem !important; color: #b9a7d6 !important;
}

html.festif-noel.festif-accueil .section-label {
    font-family: 'Berkshire Swash', serif;
    font-size: 1.15rem; letter-spacing: .01em;
    color: #f2a0aa;
}
html.festif-noel.festif-accueil .hero-badge {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic; font-weight: 600;
    font-size: .95rem; letter-spacing: .06em;
}
html.festif-noel.festif-accueil .citation-auteur {
    font-family: 'Cormorant Garamond', serif; font-weight: 500;
    font-size: 1.05rem !important; color: #cdbb95 !important;
}

/* ── Accessibilité : pas d'animation si le visiteur l'a demandé ── */
@media (prefers-reduced-motion: reduce) {
    .festif-canvas { display: none; }
    .hw-araignee, .hw-araignee svg, .hw-chauve, .hw-lueur, .hw-yeux,
    .nl-ampoule, .nl-fumee, .nl-nez, .nl-boule,
    .hw-fenetres, .hw-main, .festif-sol .sol-deco > svg.hw-fantome { animation: none !important; }
    .nl-traineau, .hw-sorciere { display: none; }
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .hw-toile { width: 70px; height: 70px; }
    .hw-araignee { right: 8%; }
    .hw-fil { height: 46px; }
    html.festif-halloween .hero::before { width: 260px; height: 260px; right: -60px; }
    .festif-sol .loin { display: none; }   /* décors secondaires masqués sur petit écran */
    .nl-traineau { width: 140px; }
    .hw-sorciere { width: 70px; }
}
