/* ============================================================
   SUMO ; habillage de Noël (19/11/2026)
   ------------------------------------------------------------
   Actif seulement quand noel.js pose la classe « is-noel » sur
   <html> : du 15 novembre au 6 janvier (ou ?noel=1 pour essayer).
   Le reste de l'année, aucune de ces règles ne s'applique.
   Tout ce qui bouge s'arrête avec « réduire les animations ».
============================================================ */

/* ---------- neige dorée (canvas posés par noel.js) ---------- */
.noel-snow {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
  opacity: 0; transition: opacity 2.4s ease;
}
.noel-snow.is-on { opacity: 1; }
.is-noel .shead { position: relative; overflow: hidden; }
.is-noel .shead > :not(.noel-snow) { position: relative; z-index: 1; }
.is-noel .sbuy { overflow: hidden; }
.is-noel .gc-page { position: relative; overflow: hidden; }
.is-noel .gc-page > :not(.noel-snow) { position: relative; z-index: 1; }

/* ---------- guirlande lumineuse en haut du bloc d'achat ---------- */
.noel-garland {
  position: absolute; left: 0; right: 0; top: 0; height: 74px;
  pointer-events: none; z-index: 1;
}
.noel-garland svg { display: block; width: 100%; height: 100%; overflow: visible; }
.noel-garland__wire { fill: none; stroke: rgba(200,154,75,.55); stroke-width: 1; }
.noel-garland__cap { fill: #6F5530; }
.noel-garland__halo { fill: url(#noelHalo); opacity: .35; animation: noelTwinkle var(--d, 3s) ease-in-out var(--dl, 0s) infinite; }
.noel-garland__bulb { animation: noelBulb var(--d, 3s) ease-in-out var(--dl, 0s) infinite; }
@keyframes noelTwinkle { 0%, 100% { opacity: .18; } 50% { opacity: .75; } }
@keyframes noelBulb    { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* ---------- l'étoile du sur-titre ---------- */
.noel-star {
  display: inline-block; width: 1.25em; height: 1.25em; margin-right: .55em; vertical-align: -0.28em;
  color: var(--accent);
  animation: noelStar 4.5s ease-in-out infinite;
}
.noel-star svg { display: block; width: 100%; height: 100%; }
@keyframes noelStar {
  0%, 100% { transform: scale(.82) rotate(0deg); opacity: .55; }
  45%      { transform: scale(1.08) rotate(18deg); opacity: 1; }
}

/* ---------- la carte, emballée : ruban, nœud, reflet ---------- */
.gc-wrap { position: relative; width: min(100%, 460px); container-type: inline-size; }
.gc-page .gc-wrap { width: min(100%, 520px); margin-top: clamp(30px, 9vw, 48px); }   /* place pour le nœud */
.gc-wrap > .gcard { width: 100%; }
.gc-wrap:has(> .gcard[hidden]) { display: none; }

.gcard__ribbon {
  position: absolute; z-index: 0; top: 0; bottom: 0; left: 83%; width: 7.5%;
  background:
    linear-gradient(90deg, rgba(0,0,0,.28), transparent 22%, transparent 78%, rgba(0,0,0,.28)),
    linear-gradient(180deg, #F2D592 0%, #C89A4B 38%, #E7C27E 62%, #A67A35 100%);
  box-shadow: 0 0 0 1px rgba(255,236,190,.12);
}
.is-noel .gcard > :not(.gcard__ribbon):not(.gcard__shine) { position: relative; z-index: 1; }
.is-noel .gcard__kind { margin-right: 15%; }
.is-noel .gcard__foot { margin-right: 15%; }

.gcard__shine {
  position: absolute; z-index: 3; inset: -20% auto -20% -60%; width: 38%;
  background: linear-gradient(100deg, transparent, rgba(255,245,220,.10) 45%, rgba(255,245,220,.18) 50%, rgba(255,245,220,.10) 55%, transparent);
  transform: skewX(-18deg);
  animation: noelShine 7.5s ease-in-out 1.5s infinite;
  pointer-events: none;
}
@keyframes noelShine {
  0%, 62% { left: -60%; }
  86%, 100% { left: 125%; }
}

.noel-bow {
  position: absolute; z-index: 4; width: 28%; left: 72.75%; top: -12cqi;
  transform-origin: 50% 55%;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.45));
  animation: noelBow 6s ease-in-out infinite;
}
.noel-bow svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes noelBow {
  0%, 100% { transform: rotate(-3deg); }
  50%      { transform: rotate(3deg) translateY(1px); }
}

/* ---------- mouvement réduit : décor fixe ---------- */
@media (prefers-reduced-motion: reduce) {
  .noel-snow { display: none; }
  .noel-garland__halo, .noel-garland__bulb, .noel-star, .gcard__shine, .noel-bow { animation: none; }
  .gcard__shine { display: none; }
}

/* ---------- impression : la carte garde son ruban et son nœud ---------- */
@media print {
  .noel-snow, .noel-garland { display: none !important; }
  .gc-wrap { width: 150mm; }
  .gc-wrap > .gcard { width: 100%; }
  .gcard__shine { display: none; }
  .noel-bow { animation: none; transform: none; filter: none; }
  .gcard__ribbon, .noel-bow { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
