/* Déco de Noël (30/11/2026, pour rire ; du 25 novembre au 6 janvier) — voir front/js/noel.ts. Rien n'intercepte les clics ; tout s'éteint si le visiteur réduit les animations.
   Les photos (public/img/noel-*.webp) sont générées pour Studio. Les décors sur les cartes et les fenêtres sont des couches de fond ajoutées
   AVANT la couleur : aucune position ni taille d'élément ne change. */
html.noel { --noel-rouge: #e5392c; --noel-vert: #3ce65f; --noel-or: #f5c518; --noel-bleu: #4a8cff; }

/* ── en haut de l'écran : guirlande et boules suspendues ── */
#noel-guirlande, #noel-neige, #noel-boules { position: fixed; left: 0; right: 0; pointer-events: none; z-index: 9990; }
#noel-guirlande { top: 0; height: 18px; display: flex; justify-content: space-around; align-items: flex-start; border-top: 2px solid rgba(34,35,57,.5); }
#noel-guirlande i { position: relative; width: 9px; height: 13px; margin-top: 2px; border-radius: 50% 50% 55% 55%;
  background: var(--c, #e5392c); box-shadow: 0 0 8px 2px var(--c, #e5392c); animation: noel-clignote 1.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.23s); }
#noel-guirlande i::before { content: ''; position: absolute; left: 50%; top: -4px; width: 4px; height: 4px; transform: translateX(-50%); background: #222339; border-radius: 1px; }
#noel-guirlande i:nth-child(4n+1) { --c: #e5392c; }
#noel-guirlande i:nth-child(4n+2) { --c: #3ce65f; }
#noel-guirlande i:nth-child(4n+3) { --c: #f5c518; }
#noel-guirlande i:nth-child(4n)   { --c: #4a8cff; }
@keyframes noel-clignote { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

#noel-boules { top: 2px; height: 0; z-index: 9991; }
#noel-boules b { position: absolute; top: 0; width: 0; height: 0; transform-origin: 50% 0; animation: noel-balance 4s ease-in-out infinite; }
#noel-boules b::before { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: var(--l, 20px); background: rgba(34,35,57,.45); }
#noel-boules b::after { content: ''; position: absolute; left: -10px; top: var(--l, 20px); width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #fff9 0 12%, transparent 13%), radial-gradient(circle at 40% 35%, var(--c, #e5392c), color-mix(in srgb, var(--c, #e5392c) 55%, #000) 100%);
  box-shadow: 0 3px 6px rgba(34,35,57,.35); }
@keyframes noel-balance { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }

#noel-neige { top: 0; bottom: 0; overflow: hidden; z-index: 9989; }
#noel-neige i { position: absolute; top: -30px; color: #fff; font-style: normal; opacity: .85; text-shadow: 0 0 3px rgba(34,35,57,.55), 0 0 1px rgba(34,35,57,.7);
  animation: noel-chute linear infinite; }
@keyframes noel-chute { 0% { transform: translate(0, -30px) rotate(0deg); } 50% { transform: translate(18px, 52vh) rotate(180deg); } 100% { transform: translate(-6px, 108vh) rotate(360deg); } }

/* ── la photo de fond : derrière les colonnes et les écrans, qui deviennent translucides ── */
.noel body { background: #e9eef6 url('/img/noel-fond.webp?v=2') center / cover fixed no-repeat !important; }
/* #app peint son propre fond (sélecteur par identifiant) : il faut le même poids pour laisser voir la photo */
.noel #app, .noel .app, .noel .panel.active, .noel .kanban-scroll { background: transparent !important; }
.noel .kol { background-color: rgba(255,255,255,.78) !important; }

/* ── la barre latérale : sapin et boules en bas, un sapin devant les titres de section ── */
.noel .sidebar { background-image: linear-gradient(rgba(255,255,255,.78), rgba(255,255,255,.78)), url('/img/noel-barre.webp?v=2') !important; background-repeat: no-repeat !important; background-position: left bottom !important; background-size: 100% auto !important; }
.noel .sidebar-logo { background-image: radial-gradient(circle 3px at 6px 50%, var(--noel-rouge) 98%, transparent), radial-gradient(circle 3px at 26px 50%, var(--noel-vert) 98%, transparent),
  radial-gradient(circle 3px at 46px 50%, var(--noel-or) 98%, transparent), radial-gradient(circle 3px at 66px 50%, var(--noel-bleu) 98%, transparent) !important;
  background-size: 80px 6px !important; background-repeat: repeat-x !important; background-position: 0 100% !important; }
.noel .nav-section::before { content: '🎄 '; }
.noel .nav-item:hover::after, .noel .nav-item.active::after { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 14px; pointer-events: none; }
.noel .nav-item:hover::after { content: '❄️'; }
.noel .nav-item.active::after { content: '🎁'; }

/* ── les cartes : petites lumières en haut, une décoration en bas à droite qui change d'une carte à l'autre ── */
.noel .kcard, .noel .modal {
  background-image: radial-gradient(circle 3px at 8px 4px, var(--noel-rouge) 98%, transparent), radial-gradient(circle 3px at 28px 4px, var(--noel-vert) 98%, transparent),
    radial-gradient(circle 3px at 48px 4px, var(--noel-or) 98%, transparent), radial-gradient(circle 3px at 68px 4px, var(--noel-bleu) 98%, transparent) !important;
  background-size: 80px 8px !important; background-repeat: repeat-x !important; }
.noel .kcard { background-position: 4px calc(100% - 1px) !important; }   /* en bas : une barre de couleur d'état occupe déjà le haut de la carte */
.noel .modal { background-position: 4px 0 !important; }
.noel .kcard::after { content: '🎄'; position: absolute; right: 6px; bottom: 9px; font-size: 12px; line-height: 1; pointer-events: none; opacity: .9; }
.noel .kcard:nth-child(5n+2)::after { content: '⭐'; }
.noel .kcard:nth-child(5n+3)::after { content: '🔔'; }
.noel .kcard:nth-child(5n+4)::after { content: '🎁'; }
.noel .kcard:nth-child(5n)::after   { content: '❄️'; }
.noel .kol-header::after, .noel .kol-head::after { content: ' ❄'; color: #7fb3ff; }

/* ── le bonnet de Père Noël sur le logo de la barre latérale ── */
.noel .sidebar-logo .logo-mark { position: relative; overflow: visible; }
.noel .sidebar-logo .logo-mark::after { content: ''; position: absolute; left: -8px; top: -15px; width: 36px; height: 29px; transform: rotate(-14deg); pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 48'><path d='M6 40 C8 18 24 6 44 8 C50 9 54 14 52 22 C50 30 52 36 54 40 Z' fill='%23e5392c'/><rect x='2' y='36' width='56' height='10' rx='5' fill='%23ffffff'/><circle cx='50' cy='10' r='7' fill='%23ffffff'/></svg>") center / contain no-repeat; }
.noel .sidebar-logo .logo-name::after { content: ' 🎄'; }

/* le sapin qui coupe ou remet la déco : en bas à DROITE, toujours là (grisé et barré quand la déco est coupée) */
#noel-bouton { position: fixed; right: 16px; bottom: 16px; z-index: 9992; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(34,35,57,.18);
  background: #fff; box-shadow: 0 4px 12px -4px rgba(34,35,57,.35); font-size: 17px; line-height: 1; cursor: pointer; padding: 0; transition: transform .15s, opacity .15s; }
#noel-bouton:hover, #noel-bouton:focus-visible { transform: scale(1.1); }
#noel-bouton.noel-bouton--off { opacity: .7; filter: grayscale(1); }
#noel-bouton.noel-bouton--off::after { content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: #e5392c; transform: rotate(-45deg); border-radius: 1px; }
html.noel-bouton .toasts { bottom: 60px; }   /* les notifications restent au-dessus du sapin */

@media (prefers-reduced-motion: reduce) {
  #noel-neige { display: none; }
  #noel-guirlande i, #noel-boules b { animation: none; }
}
@media (max-width: 900px) { .noel .kcard::after, .noel .nav-item::after { display: none; } .noel .sidebar { background-size: 70% auto !important; } #noel-bouton { bottom: 82px; } }   /* au-dessus de la barre mobile */
@media print { #noel-guirlande, #noel-neige, #noel-boules, #noel-bouton { display: none !important; } }
