/* Mode Noël — voir christmas.js */

html.cathub-xmas {
  --primary-color: #c9343f;
  --secondary-color: #f0b7a4;
  --primary-accent-color: #a5262f;
  --primary-active-color: #8d1f27;
  --accent: #c9343f;
  --accent-soft: #f0b7a4;
  --gradient: linear-gradient(90deg, #c9343f, #c9343f);
}
html.cathub-xmas[data-theme="light"] {
  --primary-color: #b02a35;
  --secondary-color: #8d1f27;
  --primary-accent-color: #8d1f27;
  --primary-active-color: #721920;
  --accent: #b02a35;
  --accent-soft: #8d1f27;
}

/* Même bouton que .theme-toggle, posé juste au-dessus. */
.xmas-toggle {
  position: fixed; right: 18px; bottom: calc(max(18px, env(safe-area-inset-bottom)) + 50px);
  z-index: 60;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: var(--pill, 999px);
  background: var(--card); color: var(--muted);
  box-shadow: var(--shadow-md); cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.xmas-toggle:hover { color: var(--ink); border-color: var(--accent); transform: translateY(-1px); }
.xmas-toggle:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }
.xmas-toggle[aria-pressed="true"] { color: var(--accent); }
.xmas-toggle[hidden] { display: none; }
@media (max-width: 760px) {
  .xmas-toggle { right: 12px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 46px); width: 38px; height: 38px; }
}

.xmas-snow {
  position: fixed; inset: 0; z-index: 55;
  width: 100%; height: 100%;
  pointer-events: none;
}

/* Guirlande : un fil qui pend entre les attaches, ampoules blanc chaud. */
.xmas-lights {
  position: fixed; top: 0; left: 0; z-index: 70;
  width: 100%; height: 26px;
  pointer-events: none; overflow: visible;
}
.xmas-lights .wire { fill: none; stroke: #4a4038; stroke-width: 1.2; }
html[data-theme="light"] .xmas-lights .wire { stroke: #5a524a; }
.xmas-lights .cap { fill: #2b2620; }
.xmas-lights .bulb {
  fill: var(--c);
  filter: drop-shadow(0 0 3px var(--c)) drop-shadow(0 0 7px var(--c));
  animation: xmas-twinkle var(--t) ease-in-out infinite;
  animation-delay: var(--d);
}
@keyframes xmas-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* Bonnet sur le logo */
.xmas-hat-host { position: relative; }
.xmas-hat-host::after {
  content: ""; position: absolute; pointer-events: none;
  left: -6px; top: -10px; width: 22px; height: 18px;
  transform: rotate(-18deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 36'%3E%3Cpath d='M5 27c3-11 11-19 21-20 6 0 10 4 12 10 1 3 1 6 0 8-1-3-3-6-6-7-5-1-10 3-13 9z' fill='%23b8222c'/%3E%3Cpath d='M5 27c3-11 11-19 21-20' fill='none' stroke='%23d63a44' stroke-width='2' stroke-linecap='round' opacity='.6'/%3E%3Cpath d='M3 26.5c7-2 15-3 22-2 2 .3 2.5 5 .5 5.5-7 1-14 1.5-21 2.5-2 .3-3.5-5.5-1.5-6z' fill='%23f3efe9'/%3E%3Ccircle cx='38' cy='27' r='4' fill='%23f3efe9'/%3E%3C/svg%3E") no-repeat center / contain;
}

@media (prefers-reduced-motion: reduce) {
  .xmas-lights .bulb { animation: none; }
}
