/* Letopweb.org — Noël : décor de saison (classe .noel sur <body>) et calendrier de l'Avent */
:root {
  --noel-rouge: #C8102E;
  --noel-rouge-fonce: #8E0B20;
  --noel-vert: #1F7A4D;
  --noel-or: #FFC83D;
}

/* ---------- Bandeau du haut ---------- */
.noel-bandeau { background: var(--noel-rouge); color: #fff; font-size: 16px; }
.noel-bandeau .enveloppe { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; }
.noel-bandeau p { margin: 6px 0; }
.noel-bandeau a { color: #fff; font-weight: 700; }
.noel-neige {
  font: inherit; font-size: 14px; font-weight: 700; color: #fff; background: transparent; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, .8); border-radius: 999px; padding: 2px 12px; margin: 4px 0;
}
.noel-neige[aria-pressed="false"] { opacity: .7; text-decoration: line-through; }
.noel-neige:focus-visible { outline-color: #fff; }

/* ---------- Guirlande sous le menu ---------- */
.noel .entete { position: relative; padding-bottom: 22px; }
.noel .entete::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 16px; pointer-events: none;
  background:
    radial-gradient(circle at 12px 9px, #E8505B 4px, transparent 5px) 0 0 / 96px 16px,
    radial-gradient(circle at 36px 11px, var(--noel-or) 4px, transparent 5px) 0 0 / 96px 16px,
    radial-gradient(circle at 60px 9px, #3BA55C 4px, transparent 5px) 0 0 / 96px 16px,
    radial-gradient(circle at 84px 11px, #5B8DEF 4px, transparent 5px) 0 0 / 96px 16px,
    linear-gradient(transparent 8px, rgba(79, 93, 124, .45) 8px 9px, transparent 9px);
  animation: noel-scintille 2.4s ease-in-out infinite alternate;
}
@keyframes noel-scintille { from { opacity: 1; } to { opacity: .55; } }

/* ---------- Bonnet de Madame Luma ----------
   Réglage de la position : modifier les 4 variables ci-dessous si le bonnet tombe mal sur la photo. */
.noel .luma-carte {
  --bonnet-x: 47%;    /* centre horizontal du bonnet (% de la largeur de la photo) */
  --bonnet-y: -22%;   /* haut du bonnet (% de la hauteur de la photo ; négatif = au-dessus) */
  --bonnet-l: 82%;    /* largeur du bonnet (% de la largeur de la photo) */
  --bonnet-r: -4deg;  /* inclinaison */
  padding-top: 60px;  /* place pour le haut du bonnet, à l'intérieur de la carte */
}
.noel .luma-carte > a { position: relative; display: block; }
.noel .luma-carte > a::after {
  content: ""; position: absolute; pointer-events: none;
  left: var(--bonnet-x); top: var(--bonnet-y); width: var(--bonnet-l); aspect-ratio: 240 / 180;
  transform: translateX(-50%) rotate(var(--bonnet-r));
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 180'%3E%3Cpath d='M22 150C22 92 70 40 130 36c50-3 84 24 92 68l-14 4c-8-22-22-32-40-30 18 20 36 44 50 72z' fill='%23D7263D' stroke='%238E0B20' stroke-width='3' stroke-linejoin='round'/%3E%3Cpath d='M58 132C64 92 96 62 138 56' fill='none' stroke='%23F06A7D' stroke-width='7' stroke-linecap='round' opacity='.55'/%3E%3Cpath d='M18 154Q120 126 222 154' fill='none' stroke='%23C9D3E6' stroke-width='36' stroke-linecap='round'/%3E%3Cpath d='M18 154Q120 126 222 154' fill='none' stroke='%23fff' stroke-width='30' stroke-linecap='round'/%3E%3Ccircle cx='215' cy='106' r='17' fill='%23fff' stroke='%23C9D3E6' stroke-width='3'/%3E%3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .18));
}
@media (max-width: 900px) { .noel .luma-carte { padding-top: 28px; } }

/* ---------- Neige ---------- */
canvas.neige { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }

/* ---------- Calendrier de l'Avent ---------- */
.avent-classes { margin: 0 0 18px; }
.avent-attente { border-left: 5px solid var(--noel-rouge); background: var(--couverture-pale); padding: 12px 18px; border-radius: 0 14px 14px 0; max-width: 70ch; }
.avent-grille { list-style: none; margin: 22px 0 36px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.porte > a, .porte > span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center;
  aspect-ratio: 1 / 1; padding: 8px; border-radius: 16px; text-decoration: none; position: relative; overflow: hidden;
}
.porte b { font-family: var(--manuscrite); font-weight: 400; font-size: 30px; line-height: 1.3; }
/* cases fermées : des paquets cadeaux */
.porte.fermee > span { color: #fff; background: var(--porte); border: 2px solid rgba(0, 0, 0, .15); }
.porte.fermee > span::before, .porte.fermee > span::after { content: ""; position: absolute; background: rgba(255, 255, 255, .35); }
.porte.fermee > span::before { left: calc(50% - 5px); top: 0; bottom: 0; width: 10px; }
.porte.fermee > span::after { top: calc(50% - 5px); left: 0; right: 0; height: 10px; }
.porte.fermee b, .porte.fermee small { position: relative; z-index: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.porte.fermee small { font-size: 12px; line-height: 1.2; }
.porte.c0 { --porte: var(--noel-rouge); } .porte.c1 { --porte: var(--noel-vert); }
.porte.c2 { --porte: #B8860B; } .porte.c3 { --porte: #2346B5; }
/* cases ouvertes : la fiche apparaît */
.porte.ouverte > a { background: var(--papier); color: var(--encre); border: 3px solid var(--porte); }
.porte.ouverte > a:hover { transform: translateY(-2px); background: var(--couverture-pale); }
.porte.ouverte b { color: var(--porte); }
.porte-icone { font-size: 24px; line-height: 1.2; }
.porte-nom { font-size: 13px; line-height: 1.2; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.porte.aujourdhui > a { box-shadow: 0 0 0 4px var(--noel-or); animation: noel-pulse 1.6s ease-in-out infinite alternate; }
.porte.aujourdhui > a::before { content: "Aujourd’hui"; position: absolute; top: 4px; font-size: 11px; font-weight: 700; color: var(--noel-rouge); }
.porte.choisie > a { outline: 3px solid var(--encre); outline-offset: 3px; }
@keyframes noel-pulse { from { box-shadow: 0 0 0 3px var(--noel-or); } to { box-shadow: 0 0 0 7px rgba(255, 200, 61, .45); } }

.avent-fiche h2 .classe { vertical-align: middle; font-family: var(--lisible); font-size: 14px; }
.avent-mot { display: flex; gap: 14px; align-items: center; background: var(--couverture-pale); border-radius: 18px; padding: 12px 16px; margin: 0 0 20px; max-width: 760px; }
.avent-mot img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; object-position: center top; flex: none; background: #fff; }
.avent-mot p { margin: 0; }
.avent-mot strong { display: block; font-family: var(--manuscrite); font-weight: 400; font-size: 18px; }

@media (max-width: 760px) {
  .avent-grille { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 440px) {
  .avent-grille { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .porte-nom { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .noel .entete::after, .porte.aujourdhui > a { animation: none; }
  .porte.ouverte > a:hover { transform: none; }
}
@media print {
  .noel-bandeau, canvas.neige { display: none !important; }
  .noel .entete::after, .noel .luma-carte > a::after { display: none; }
}
