/**
 * TOUCHE D'HIVER DU SITE — 15/11/2026 (vague 10).
 *
 * Chargée par inc/avent.php SEULEMENT quand l'option `btv_saison` vaut 'hiver' (la même
 * que celle de l'app, par /config). Option absente : ce fichier n'est pas demandé.
 * Hors build vite : servi tel quel.
 *
 *  - La neige : un <canvas> fixe posé par assets/js/neige.js, DERRIÈRE le contenu
 *    (z-index: -1 : le fond de <body> se propage à la page, et les flocons passent
 *    au-dessus de ce fond mais sous les blocs, les cartes et les textes). Aucun clic capté.
 *    Coupée en prefers-reduced-motion (le script ne la pose même pas).
 *  - La guirlande d'ampoules de stade, sous l'en-tête (template-parts/header/guirlande.php).
 *
 * Aucun flou, aucun effet de verre : le halo des ampoules est un anneau plein et
 * translucide (box-shadow sans rayon de flou), comme dans les maquettes de l'app.
 */

/* ── Neige ──────────────────────────────────────────────────────────────── */
.btv-neige {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
	.btv-neige { display: none; }
}

/* ── Guirlande ──────────────────────────────────────────────────────────── */
.btv-guirlande {
	position: relative;
	display: flex;
	height: 26px;
	overflow: hidden;
	pointer-events: none;
	/* Le câble : une feston de 192 px (six ampoules), de (0,3) à (192,3), creux à 14 px. */
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='26' viewBox='0 0 192 26'%3E%3Cpath d='M0 3Q96 25 192 3' fill='none' stroke='%233a4766' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x 0 0 / 192px 26px;
}
.btv-guirlande i {
	--y: 6px;
	--c: #fff3c4;
	--halo: rgba(255, 243, 196, 0.2);
	position: relative;
	flex: 0 0 32px;
	height: 26px;
}
/* La douille, posée sur le câble. */
.btv-guirlande i::before {
	content: "";
	position: absolute;
	left: 14.4px;
	top: var(--y);
	width: 3.2px;
	height: 3px;
	border-radius: 0.6px;
	background: #3a4766;
}
/* L'ampoule et son halo. */
.btv-guirlande i::after {
	content: "";
	position: absolute;
	left: 12.6px;
	top: calc(var(--y) + 3.4px);
	width: 6.8px;
	height: 6.8px;
	border-radius: 50%;
	background: var(--c);
	box-shadow: 0 0 0 3px var(--halo);
	animation: btv-scintille 2.6s ease-in-out infinite;
}
/* Hauteur sur le câble : y = 3 + 44 t (1 - t), au centre de chaque ampoule. */
.btv-guirlande i:nth-child(6n + 1),
.btv-guirlande i:nth-child(6n + 6) { --y: 5.4px; }
.btv-guirlande i:nth-child(6n + 2),
.btv-guirlande i:nth-child(6n + 5) { --y: 10.2px; }
.btv-guirlande i:nth-child(6n + 3),
.btv-guirlande i:nth-child(6n + 4) { --y: 12.7px; }
/* Quatre teintes, comme dans l'app : blanc chaud, or, rouge, blanc froid. */
.btv-guirlande i:nth-child(4n + 2) { --c: #c8a24b; --halo: rgba(200, 162, 75, 0.22); }
.btv-guirlande i:nth-child(4n + 3) { --c: #ea0822; --halo: rgba(234, 8, 34, 0.22); }
.btv-guirlande i:nth-child(4n + 4) { --c: #dceaf8; --halo: rgba(220, 234, 248, 0.18); }
/* Un scintillement décalé, jamais à l'unisson. */
.btv-guirlande i:nth-child(5n + 2)::after { animation-delay: -0.5s; }
.btv-guirlande i:nth-child(5n + 3)::after { animation-delay: -1.1s; }
.btv-guirlande i:nth-child(5n + 4)::after { animation-delay: -1.7s; }
.btv-guirlande i:nth-child(5n + 5)::after { animation-delay: -2.2s; }
@keyframes btv-scintille {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
	.btv-guirlande i::after { animation: none; }
}
