/* ==========================================================================
   Pirouette Éditions : déco de Noël 2026 (LIJE)
   --------------------------------------------------------------------------
   - 100 % CSS + SVG inline (data URI) : aucune image, aucun JavaScript,
     aucune requête HTTP en plus de ce fichier (~6 Ko).
   - Aucun élément HTML ajouté : uniquement des pseudo-éléments (::before /
     ::after) décoratifs, ignorés par Google et les lecteurs d'écran.
   - pointer-events:none partout : rien ne gêne les clics.
   - Animations coupées si l'utilisateur a demandé « réduire les animations ».
   - Chargé uniquement par _partials/noel.tpl (voir ce fichier pour
     l'activation / désactivation).

   SÉLECTEURS À VÉRIFIER SUR LE SITE (inspecteur du navigateur) :
     .ets_mm_megamenu   barre de menu jaune (module Mega Menu Pro, ets_megamenu)
     #header a:has(> img[src*="pirouette_full"])  lien du logo (en-tête Creative Elements)
     #footer            pied de page (thème classic)
   ========================================================================== */

:root {
  --noel-rouge: #c8102e;
  --noel-vert: #1e7b3c;
  --noel-or: #f2b705;
  /* position du bonnet sur le logo, à ajuster à l'œil */
  --noel-bonnet-x: -6px;
  --noel-bonnet-y: -14px;
  --noel-bonnet-taille: 58px;
}

/* --------------------------------------------------------------------------
   1. Guirlande lumineuse sous la barre de menu jaune (toutes les pages)
   -------------------------------------------------------------------------- */
.ets_mm_megamenu {
  position: relative;
  z-index: 20; /* la guirlande passe au-dessus du slider */
}
.ets_mm_megamenu::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;          /* accrochée sous la barre jaune, ampoules entières */
  margin-top: -1px;
  height: 28px;
  z-index: 5;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='28' viewBox='0 0 120 28'%3E%3Cpath d='M0 1 Q15 15 30 1 T60 1 T90 1 T120 1' fill='none' stroke='%232d4a30' stroke-width='1.6'/%3E%3Crect x='12.5' y='6' width='5' height='4' rx='1' fill='%23394a3a'/%3E%3Cpath d='M10.5 12 Q10.5 9 15 9 Q19.5 9 19.5 12 L18 20 Q15 24 12 20 Z' fill='%23e8202e'/%3E%3Cellipse cx='13.4' cy='14' rx='1.2' ry='2.6' fill='%23fff' opacity='.55'/%3E%3Crect x='42.5' y='6' width='5' height='4' rx='1' fill='%23394a3a'/%3E%3Cpath d='M40.5 12 Q40.5 9 45 9 Q49.5 9 49.5 12 L48 20 Q45 24 42 20 Z' fill='%23f5c400'/%3E%3Cellipse cx='43.4' cy='14' rx='1.2' ry='2.6' fill='%23fff' opacity='.55'/%3E%3Crect x='72.5' y='6' width='5' height='4' rx='1' fill='%23394a3a'/%3E%3Cpath d='M70.5 12 Q70.5 9 75 9 Q79.5 9 79.5 12 L78 20 Q75 24 72 20 Z' fill='%2322a04b'/%3E%3Cellipse cx='73.4' cy='14' rx='1.2' ry='2.6' fill='%23fff' opacity='.55'/%3E%3Crect x='102.5' y='6' width='5' height='4' rx='1' fill='%23394a3a'/%3E%3Cpath d='M100.5 12 Q100.5 9 105 9 Q109.5 9 109.5 12 L108 20 Q105 24 102 20 Z' fill='%232f86e0'/%3E%3Cellipse cx='103.4' cy='14' rx='1.2' ry='2.6' fill='%23fff' opacity='.55'/%3E%3C/svg%3E") repeat-x 0 0 / 120px 28px;
  animation: noel-scintille 2.4s ease-in-out infinite alternate;
}
/* le menu déroulant doit rester au-dessus de la guirlande */
.ets_mm_megamenu .mm_columns_ul,
.ets_mm_megamenu .ets_mm_block,
.ets_mm_megamenu ul ul {
  z-index: 10;
}

@keyframes noel-scintille {
  /* opacité seulement : animée par la carte graphique, sans recalcul */
  from { opacity: 0.7; }
  to   { opacity: 1; }
}

/* --------------------------------------------------------------------------
   2. Bonnet de Noël sur le logo (toutes les pages)
   -------------------------------------------------------------------------- */
#header a:has(> img[src*="pirouette_full"]) {
  position: relative;
  display: inline-block;
}
#header a:has(> img[src*="pirouette_full"])::before {
  content: "";
  position: absolute;
  left: var(--noel-bonnet-x);
  top: var(--noel-bonnet-y);
  width: var(--noel-bonnet-taille);
  height: var(--noel-bonnet-taille);
  z-index: 2;
  pointer-events: none;
  transform: rotate(-18deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M8 46 C14 22 30 8 48 10 C54 11 58 16 56 24 C52 18 46 18 42 22 C36 30 36 40 38 46 Z' fill='%23c8102e'/%3E%3Cpath d='M8 46 C14 22 30 8 48 10 C40 14 30 26 26 46 Z' fill='%23a00d25' opacity='.5'/%3E%3Crect x='4' y='42' width='40' height='12' rx='6' fill='%23fff' stroke='%23e6e6e6'/%3E%3Ccircle cx='56' cy='26' r='6' fill='%23fff' stroke='%23e6e6e6'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* sur mobile le lien du logo prend toute la largeur et l'image (200px) est
   centrée : on cale le bonnet sur le bord gauche de l'image */
@media (max-width: 767px) {
  #header a:has(> img[src*="pirouette_full"])::before {
    left: calc(50% - 100px + var(--noel-bonnet-x));
    --noel-bonnet-taille: 44px;
    top: -10px;
  }
}

/* --------------------------------------------------------------------------
   3. Frise de sapins en haut du pied de page (toutes les pages)
   -------------------------------------------------------------------------- */
#footer {
  position: relative;
}
#footer::before {
  content: "";
  display: block;
  height: 34px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='34' viewBox='0 0 90 34'%3E%3Cpath d='M15 4 L25 18 L20 18 L28 30 L2 30 L10 18 L5 18 Z' fill='%231e7b3c'/%3E%3Cpath d='M15 1 l1.2 2.4 2.6.4-1.9 1.8.5 2.6-2.4-1.2-2.4 1.2.5-2.6-1.9-1.8 2.6-.4z' fill='%23f2b705'/%3E%3Ccircle cx='12' cy='22' r='1.6' fill='%23c8102e'/%3E%3Ccircle cx='19' cy='26' r='1.6' fill='%23f2b705'/%3E%3Ccircle cx='17' cy='14' r='1.4' fill='%23c8102e'/%3E%3Crect x='13' y='30' width='4' height='4' fill='%236b4423'/%3E%3Cpath d='M60 12 L67 22 L64 22 L70 30 L50 30 L56 22 L53 22 Z' fill='%232e8b4a'/%3E%3Crect x='58' y='30' width='4' height='4' fill='%236b4423'/%3E%3Ccircle cx='40' cy='26' r='1.3' fill='%23c0c0c0'/%3E%3Ccircle cx='82' cy='20' r='1.3' fill='%23c0c0c0'/%3E%3C/svg%3E") repeat-x left bottom / 90px 34px;
}

/* --------------------------------------------------------------------------
   Accessibilité : pas d'animation si l'utilisateur l'a demandé
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ets_mm_megamenu::after { animation: none; }
}

/* Pas de déco à l'impression */
@media print {
  .ets_mm_megamenu::after,
  #header a:has(> img[src*="pirouette_full"])::before,
  #footer::before { display: none !important; }
}
