/* --- Le décor de Noël alsacien (28 octobre 2026) ---
   Même mise en scène que le décor d'Halloween (decor.css) : tout est
   décoratif, aucun clic n'est capté, rien n'est lu par les lecteurs d'écran.
   Les flocons et le Mannele ne vivent que dans les marges des
   grands écrans ; l'étoile de paille, dans l'espace libre de l'en-tête. */
.ksp-noel, .ksp-noel *, .ksp-noel__fil, .ksp-noel__fil * { pointer-events:none; }
.ksp-noel { position:fixed; inset:0; z-index:5; display:none; --ksp-p:clamp(64px, calc(((100vw - 1180px) / 2 - 8px) / 1.35), 140px); --ksp-m:calc((100vw - 1180px) / 2);
	/* La largeur de la scène du bas : toute la marge, jusqu'à 300 px (plus grande qu'à Halloween, Kevin, 28 octobre 2026). */
	--ksp-g:min(calc(var(--ksp-m) - 10px), 265px); }
.ksp-noel svg { display:block; width:100%; height:auto; overflow:visible !important; }
@media (min-width:1360px) { .ksp-noel { display:block; } }

/* --- L'étoile de paille, dans l'en-tête --- */
.ksp-et__barre { position:relative; }
.ksp-noel__fil { position:absolute; top:0; bottom:0; width:100px; overflow:hidden; z-index:0; }
.ksp-noel__fil svg { display:block; width:100%; height:auto; overflow:visible !important; }
.ksp-noel__etoile { position:absolute; top:-2px; left:26px; width:48px; transform-origin:50% -60px; will-change:transform; animation:ksp-noel-balance 5.5s ease-in-out infinite; }
.ksp-noel__paille { transform-box:fill-box; transform-origin:50% 50%; animation:ksp-noel-scintille 4s ease-in-out infinite; }
/* Les boules de Noël de l'en-tête, sur ordinateur seulement. */
.ksp-noel__boule { position:absolute; top:0; bottom:0; overflow:hidden; z-index:0; pointer-events:none; }
.ksp-noel__boule * { pointer-events:none; }
.ksp-noel__balance { display:block; transform-origin:50% 0; will-change:transform; animation:ksp-noel-boule 5s ease-in-out infinite; }
.ksp-noel__boule svg { display:block; overflow:visible; filter:drop-shadow(0 2px 2px rgba(0,40,50,.18)); }
@keyframes ksp-noel-boule { 0%, 100% { transform:rotate(-6deg); } 50% { transform:rotate(6deg); } }
@media (max-width:1359px) { .ksp-noel__boule { display:none; } }
@keyframes ksp-noel-balance { 0%, 100% { transform:rotate(-5deg); } 50% { transform:rotate(5deg); } }
@keyframes ksp-noel-scintille { 0%, 100% { filter:drop-shadow(0 0 0 rgba(246,212,122,0)); } 50% { filter:drop-shadow(0 0 3px rgba(246,212,122,.9)); } }

/* --- Les flocons, dans les marges --- */
.ksp-noel__flocon { position:absolute; top:-40px; color:#7FA3D1; opacity:0; will-change:transform, opacity; animation:ksp-noel-tombe 16s linear infinite; }
.ksp-noel__flocon svg { filter:drop-shadow(0 0 1px rgba(255,255,255,.9)) drop-shadow(0 1px 2px rgba(60,90,140,.3)); }
.ksp-noel__flocon--1 { left:calc(var(--ksp-m) * .22); width:18px; animation-delay:-2s; }
.ksp-noel__flocon--2 { left:calc(var(--ksp-m) * .58); width:13px; animation-duration:19s; animation-delay:-9s; }
.ksp-noel__flocon--3 { left:calc(var(--ksp-m) * .38); width:22px; animation-duration:22s; animation-delay:-15s; }
.ksp-noel__flocon--4 { left:calc(var(--ksp-m) * .72); width:15px; animation-duration:17s; animation-delay:-5s; }
.ksp-noel__flocon--5 { left:calc(var(--ksp-m) * .12); width:12px; animation-duration:21s; animation-delay:-12s; }
.ksp-noel__flocon--6 { right:calc(var(--ksp-m) * .25); width:20px; animation-duration:18s; animation-delay:-4s; }
.ksp-noel__flocon--7 { right:calc(var(--ksp-m) * .6); width:14px; animation-duration:23s; animation-delay:-11s; }
.ksp-noel__flocon--8 { right:calc(var(--ksp-m) * .42); width:17px; animation-duration:16s; animation-delay:-7s; }
.ksp-noel__flocon--9 { right:calc(var(--ksp-m) * .14); width:12px; animation-duration:20s; animation-delay:-16s; }
.ksp-noel__flocon--10 { right:calc(var(--ksp-m) * .78); width:16px; animation-duration:25s; animation-delay:-1s; }
@keyframes ksp-noel-tombe {
	0% { opacity:0; transform:translate(0, 0) rotate(0deg); }
	8% { opacity:.95; }
	30% { transform:translate(14px, 30vh) rotate(90deg); }
	55% { transform:translate(-10px, 55vh) rotate(170deg); }
	80% { transform:translate(12px, 80vh) rotate(260deg); }
	90% { opacity:.8; }
	100% { opacity:0; transform:translate(0, 104vh) rotate(330deg); }
}

/* --- La neige au bas de l'écran, entre les deux décors --- */
.ksp-noel__neige-bas { position:absolute; left:0; right:0; bottom:-1px; height:46px; line-height:0; z-index:0; filter:drop-shadow(0 -1px 2px rgba(60, 90, 130, .14)); }
.ksp-noel__neige-bas svg { width:100%; height:100%; }
.ksp-noel__scint { opacity:.2; animation:ksp-noel-scint 3.6s ease-in-out infinite; }
.ksp-noel__scint--2 { animation-delay:-1.2s; }
.ksp-noel__scint--3 { animation-delay:-2.4s; }
.ksp-noel__scint--4 { animation-delay:-3s; animation-duration:4.4s; }
@keyframes ksp-noel-scint { 0%, 70%, 100% { opacity:.2; } 82% { opacity:1; } }

/* --- À droite : le grand sapin et la maison alsacienne (image de Kevin) --- */
.ksp-noel__maison { position:absolute; z-index:1; right:0; bottom:-1px; width:min(calc(var(--ksp-m) * .74), 290px); line-height:0; }
.ksp-noel__maison img { display:block; width:100%; height:auto; }

/* --- Le tapis de neige, le sapin et les bredele, en bas à gauche --- */
.ksp-noel__sol { position:absolute; left:0; bottom:-1px; width:var(--ksp-g); line-height:0; z-index:1; }
.ksp-noel__flamme { transform-box:fill-box; transform-origin:50% 100%; animation:ksp-noel-flamme .9s ease-in-out infinite alternate; filter:drop-shadow(0 0 1.2px rgba(255,190,90,.95)); }
.ksp-noel__flamme--2 { animation-duration:1.1s; animation-delay:-.4s; }
.ksp-noel__flamme--3 { animation-duration:.8s; animation-delay:-.2s; }
@keyframes ksp-noel-flamme { from { transform:scale(1, 1) rotate(-3deg); } to { transform:scale(.88, 1.12) rotate(3deg); } }
.ksp-noel__lueur { animation:ksp-noel-lueur 2.4s ease-in-out infinite; }
@keyframes ksp-noel-lueur { 0%, 100% { opacity:.75; } 50% { opacity:1; } }
.ksp-noel__eclat { transform-box:fill-box; transform-origin:50% 50%; opacity:0; animation:ksp-noel-eclat 3.8s ease-in-out infinite; }
.ksp-noel__eclat--2 { animation-delay:-1.3s; }
.ksp-noel__eclat--3 { animation-delay:-2.5s; }
@keyframes ksp-noel-eclat { 0%, 70%, 100% { opacity:0; transform:scale(.4); } 80% { opacity:1; transform:scale(1.2); } }
.ksp-noel__cime { transform-box:fill-box; transform-origin:50% 50%; animation:ksp-noel-cime 2.8s ease-in-out infinite; }
@keyframes ksp-noel-cime { 0%, 100% { transform:scale(1); } 50% { transform:scale(1.25); filter:drop-shadow(0 0 2px rgba(246,212,122,1)); } }

/* --- Le Mannele : l'image fournie par Kevin, qui respire doucement --- */
/* Il se tient sur la neige du bas de l'écran. */
.ksp-noel__mannele { position:absolute; z-index:2; width:calc(var(--ksp-g) * .74); left:calc(var(--ksp-g) * .13); bottom:14px; }
.ksp-noel__mannele::before { content:""; position:absolute; left:16%; right:10%; bottom:-2.5%; height:7%; border-radius:50%; background:radial-gradient(closest-side, rgba(78, 103, 136, .38), rgba(143, 165, 194, 0)); }
.ksp-noel__souffle { position:relative; display:block; transform-origin:50% 100%; animation:ksp-noel-souffle 3.4s ease-in-out infinite; }
.ksp-noel__souffle img { display:block; width:100%; height:auto; }
.ksp-noel .ksp-noel__mannele-neige { position:absolute; inset:0; width:100%; height:100%; }
@keyframes ksp-noel-souffle { 0%, 100% { transform:scale(1, 1); } 50% { transform:scale(1.008, 1.018); } }

/* --- La mascotte StylArtis, en bonnet de Noël, à gauche de la maison ;
   le moteur est celui d'Halloween (ksprod-decor.php, mascotte_js). --- */
.ksp-noel__masc { position:absolute; z-index:2; bottom:0; right:calc(min(calc(var(--ksp-m) * .62), 240px) * .8); width:min(calc(var(--ksp-m) * .44), 125px); aspect-ratio:1145 / 1374; }
.ksp-noel .ksp-masc { position:absolute; inset:0; pointer-events:auto; cursor:default; }
.ksp-noel__masc.est-partie .ksp-masc { visibility:hidden; pointer-events:none; }
.ksp-noel .ksp-masc__g { position:absolute; inset:0; will-change:transform; }
.ksp-noel .ksp-masc__c { position:absolute; display:block; max-width:none; user-select:none; -webkit-user-drag:none; }
.ksp-noel .ksp-masc__oeil { position:absolute; overflow:hidden; -webkit-mask-size:100% 100%; mask-size:100% 100%; }
.ksp-noel .ksp-masc__oeil img { position:absolute; display:block; max-width:none; will-change:transform; }
.ksp-noel .ksp-masc__paupiere { transform-origin:50% 0; transform:scaleY(0); }
.ksp-noel .ksp-masc__ombre { position:absolute; left:22%; width:66%; top:95%; height:5%; border-radius:50%; background:radial-gradient(closest-side, rgba(78, 103, 136, .4), rgba(143, 165, 194, 0)); }
.ksp-noel .ksp-masc__chapeau { position:absolute; inset:0; }
.ksp-noel .ksp-masc__pointe { transform-box:view-box; transform-origin:300px 20px; }
/* Les pieds dans la neige : un petit tas devant chaque chaussure. */
.ksp-noel__masc-neige { position:absolute; z-index:1; left:0; right:0; bottom:-1px; height:8%; line-height:0; }
.ksp-noel__masc-neige svg { height:100%; }
/* Le « pouf » d'Halloween ne sert pas ici ; l'atterrissage soulève de la neige. */
.ksp-noel .ksp-masc__pouf { display:none; }
.ksp-noel .ksp-masc__poussiere { position:absolute; left:50%; top:95%; width:0; height:0; z-index:3; }
.ksp-noel .ksp-masc__grain { position:absolute; display:block; width:calc(var(--ksp-p) * .22); height:calc(var(--ksp-p) * .12); margin:calc(var(--ksp-p) * -.06) 0 0 calc(var(--ksp-p) * -.11); border-radius:50%; background:radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(220, 232, 246, 0)); opacity:0; }
.ksp-noel .ksp-masc__poussiere.joue .ksp-masc__grain { animation:ksp-noel-grain .7s ease-out forwards; }
.ksp-noel .ksp-masc__grain--0 { --gx:-.42; --gy:-.04; }
.ksp-noel .ksp-masc__grain--1 { --gx:-.24; --gy:-.1; animation-delay:.03s !important; }
.ksp-noel .ksp-masc__grain--2 { --gx:.26; --gy:-.1; animation-delay:.03s !important; }
.ksp-noel .ksp-masc__grain--3 { --gx:.44; --gy:-.04; }
@keyframes ksp-noel-grain {
	0% { opacity:0; transform:translate(0, 0) scale(.3); }
	25% { opacity:1; }
	100% { opacity:0; transform:translate(calc(var(--ksp-p) * var(--gx)), calc(var(--ksp-p) * var(--gy))) scale(1.4, 1); }
}

@media (prefers-reduced-motion:reduce) {
	.ksp-noel *, .ksp-noel__etoile, .ksp-noel__paille, .ksp-noel__balance { animation:none !important; }
	.ksp-noel__flocon { opacity:.6; top:auto; }
	.ksp-noel__flocon--1, .ksp-noel__flocon--6 { top:30%; }
	.ksp-noel__flocon--2, .ksp-noel__flocon--7 { top:55%; }
}
