/* ============================================================
   GROUPE CBL — Publicité de Noël : calendrier de l'Avent Canon et neige (js/noel.js)
   ============================================================ */

/* Neige : par-dessus la page, sans gêner les clics ; sous les fenêtres et le bandeau du haut */
.noel-neige { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 900; }
.noel-neige[hidden] { display: none; }

.noel {
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse at 50% 115%, #8f0a0a 0%, #3d0707 38%, #0f1524 78%, #0b0f1a 100%);
  color: #fff; padding: 74px 24px 34px;
  font-family: var(--font-body, 'Inter', sans-serif);
}
.noel[hidden] { display: none; }
.noel-inner { position: relative; max-width: 1200px; margin: 0 auto; }

/* Guirlande lumineuse */
.noel-guirlande {
  position: absolute; top: 0; left: 0; right: 0; height: 34px;
  display: flex; justify-content: space-around; align-items: flex-start;
  border-top: 2px solid #1f3d2b;
}
.noel-guirlande i {
  width: 11px; height: 16px; margin-top: 4px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: #ffd24a; box-shadow: 0 0 12px 2px rgba(255, 210, 74, 0.75);
  animation: noel-clignote 2.4s ease-in-out infinite;
}
.noel-guirlande i:nth-child(4n+1) { background: #ff4d4d; box-shadow: 0 0 12px 2px rgba(255, 77, 77, 0.75); animation-delay: 0.6s; margin-top: 9px; }
.noel-guirlande i:nth-child(4n+2) { background: #4ade80; box-shadow: 0 0 12px 2px rgba(74, 222, 128, 0.7); animation-delay: 1.2s; }
.noel-guirlande i:nth-child(4n+3) { background: #60a5fa; box-shadow: 0 0 12px 2px rgba(96, 165, 250, 0.7); animation-delay: 1.8s; margin-top: 11px; }
@keyframes noel-clignote { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* En-tête */
.noel-tete { text-align: center; margin-bottom: 34px; }
.noel-badge {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: #fff; color: #AA0000;
  font-family: var(--font-head, 'Montserrat', sans-serif); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  transform: rotate(-2deg);
}
.noel h2 {
  font-family: var(--font-head, 'Montserrat', sans-serif); font-weight: 800; line-height: 1.1; color: #fff;
  font-size: clamp(28px, 4.4vw, 52px); margin: 16px 0 10px;
}
.noel-sous-titre { font-size: 17px; color: rgba(255, 255, 255, 0.88); margin: 0 0 10px; }
.noel-blague { font-size: 14px; color: rgba(255, 255, 255, 0.7); margin: 0; }
.noel-neige-btn {
  margin-left: 6px; padding: 3px 10px; border-radius: 999px; cursor: pointer;
  background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.45);
  font: inherit; font-size: 12px;
}
.noel-neige-btn:hover { background: rgba(255, 255, 255, 0.14); }

/* Corps : l'idée du jour + les cases */
.noel-corps { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 34px; align-items: start; }

.noel-carte {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: #fff; color: #1A1A1A; text-decoration: none;
  border-radius: 18px; padding: 22px 22px 24px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  transform: rotate(-1.2deg); transition: transform 0.25s ease;
}
a.noel-carte:hover { transform: rotate(0deg) scale(1.02); }
.noel-carte-jour {
  align-self: flex-start; padding: 4px 10px; border-radius: 4px; background: #CC0000; color: #fff;
  font-family: var(--font-head, 'Montserrat', sans-serif); font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.noel-carte-photo { position: relative; display: block; width: 100%; max-width: 260px; margin: 8px 0 4px; }
.noel-carte-photo img { display: block; width: 100%; height: 210px; object-fit: contain; }
.noel-bonnet { position: absolute; top: -20px; left: -6px; width: 84px; transform: rotate(-18deg); filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25)); }
.noel-carte-titre { font-family: var(--font-head, 'Montserrat', sans-serif); font-weight: 800; font-size: 22px; line-height: 1.2; color: #1A1A1A; margin: 0; }
.noel-carte-nom { font-size: 13px; font-weight: 600; color: #4A4A4A; }
.noel-carte-accroche { font-size: 14px; line-height: 1.5; color: #4A4A4A; }
.noel-carte-prix { font-family: var(--font-head, 'Montserrat', sans-serif); font-weight: 800; font-size: 32px; color: #CC0000; line-height: 1.1; margin-top: 6px; }
.noel-carte-prix small { font-size: 13px; font-weight: 700; color: #4A4A4A; }
.noel-carte-cta {
  margin-top: 10px; padding: 13px 24px; border-radius: 999px; background: #CC0000; color: #fff;
  font-family: var(--font-head, 'Montserrat', sans-serif); font-weight: 700; font-size: 14px; transition: background 0.2s;
}
a.noel-carte:hover .noel-carte-cta { background: #E30000; }

.noel-grille { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.noel-case {
  position: relative; aspect-ratio: 1; border: 0; border-radius: 12px; cursor: pointer; padding: 0;
  font-family: var(--font-head, 'Montserrat', sans-serif); font-weight: 800; color: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.noel-case:focus-visible { outline: 3px solid #ffd24a; outline-offset: 2px; }
.noel-case--fermee { font-size: clamp(18px, 2.4vw, 30px); border: 2px dashed rgba(255, 255, 255, 0.45); }
.noel-case--fermee:hover { transform: rotate(-4deg) scale(1.05); }
.noel-case--c0 { background: #CC0000; }
.noel-case--c1 { background: #14532d; }
.noel-case--c2 { background: #b8860b; }
.noel-case--c3 { background: #1e3a5f; }
.noel-case--ouverte { background: #fff; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9); }
.noel-case--ouverte img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; }
.noel-case--ouverte span {
  position: absolute; top: 0; left: 0; min-width: 24px; padding: 3px 7px; border-radius: 0 0 10px 0;
  background: #CC0000; color: #fff; font-size: 12px; line-height: 1.3;
}
.noel-case--bonus span { background: #14532d; }
.noel-case--ouverte:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4); }
.noel-case--choisie { box-shadow: 0 0 0 3px #ffd24a, 0 10px 22px rgba(0, 0, 0, 0.4); }
.noel-case--secouee { animation: noel-secoue 0.45s ease; }
@keyframes noel-secoue {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); }
  60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); }
}
.noel-message { min-height: 22px; margin: 14px 0 0; text-align: center; font-size: 14px; font-weight: 600; color: #ffd24a; }
.noel-mention { margin: 26px auto 0; max-width: 900px; text-align: center; font-size: 11px; line-height: 1.5; color: rgba(255, 255, 255, 0.6); }

@media (max-width: 900px) {
  .noel { padding: 64px 16px 28px; }
  .noel-corps { grid-template-columns: 1fr; gap: 24px; }
  .noel-vedette { max-width: 400px; margin: 0 auto; width: 100%; }
  .noel-grille { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .noel-guirlande i:nth-child(n+14) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .noel-guirlande i, .noel-case--secouee { animation: none; }
  .noel-carte, .noel-case { transition: none; }
}
