/* Glace8 Fêtes – reprend uniquement les variables du thème (--g8-*). N'anime que transform et opacity. */

/* =====================================================================
   1. Compte à rebours (sous le héros)
   ===================================================================== */
.g8f-cd {
  --g8f-navy: var(--g8-navy, #22314C);
  --g8f-text: var(--g8-text, #3C3C3C);
  --g8f-muted: var(--g8-muted, rgba(60, 60, 60, .68));
  --g8f-border: var(--g8-border, rgba(34, 49, 76, .14));
  padding: 0 20px;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  /* Bandeau pleine largeur, comme le héros. Fond très clair de la palette. */
  background: var(--g8-foam-soft, #F6FDFF);
  border-top: 1px solid var(--g8-border, rgba(34, 49, 76, .14));
  border-bottom: 1px solid var(--g8-border, rgba(34, 49, 76, .14));
  font-family: var(--g8-font-body, inherit);
  color: var(--g8f-text);
}
.g8f-cd__inner {
  max-width: var(--g8-max, 1180px);
  margin: 0 auto;
  min-height: 132px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 18px 0 16px;
}
.g8f-cd__art { width: 88px; height: 100px; align-self: end; margin-bottom: -6px; }
.g8f-cd__art svg { width: 100%; height: 100%; display: block; overflow: visible; }
.g8f-cd__title {
  margin: 0;
  font-family: var(--g8-font-heading, inherit);
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.2;
  font-weight: 700;
  color: var(--g8f-navy);
}
.g8f-cd__ast { color: var(--g8-coral-strong, #C87870); margin-left: 2px; }
.g8f-cd__sub { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--g8f-text); }
.g8f-cd__to { white-space: nowrap; }
.g8f-cd__select { display: inline-block; position: relative; }
.g8f-cd__select select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-weight: 600; color: var(--g8f-navy);
  background: var(--g8-white, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2322314C' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--g8f-border); border-radius: 6px;
  padding: 4px 28px 4px 10px; min-height: 32px; cursor: pointer; max-width: 100%;
}
.g8f-cd__select select:focus-visible { outline: 2px solid var(--g8f-navy); outline-offset: 2px; }
.g8f-cd__foot { grid-column: 1 / -1; margin: -6px 0 0; font-size: 12px; line-height: 1.4; color: var(--g8f-muted); }
.g8f-cd__link {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--g8f-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.g8f-cd__link:hover { text-decoration-thickness: 2px; }

.g8f-cd__clock { display: flex; gap: 10px; }
.g8f-cd__cell {
  width: 76px;
  box-sizing: border-box;
  padding: 10px 6px 8px;
  text-align: center;
  background: var(--g8-white, #fff);
  border: 1px solid var(--g8f-border);
  border-radius: var(--g8-radius, 8px);
}
.g8f-cd__num {
  position: relative;
  display: block;
  height: 38px;
  overflow: hidden;
  font-family: var(--g8-font-heading, inherit);
  font-size: 32px;
  line-height: 38px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--g8f-navy);
}
.g8f-cd__val { position: absolute; inset: 0; }
.g8f-cd__unit { display: block; margin-top: 2px; font-size: 12px; color: var(--g8f-muted); }

/* Défilement des chiffres (seulement si les animations sont actives) */
.g8f-cd__val.is-in  { animation: g8f-digit-in .45s cubic-bezier(.2, .8, .2, 1) both; }
.g8f-cd__val.is-out { animation: g8f-digit-out .45s cubic-bezier(.2, .8, .2, 1) both; }
html:not(.g8f-anim) .g8f-cd__val.is-in,
html:not(.g8f-anim) .g8f-cd__val.is-out { animation: none; }
html:not(.g8f-anim) .g8f-cd__val.is-out { opacity: 0; }
@keyframes g8f-digit-in  { from { transform: translateY(-70%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes g8f-digit-out { from { transform: none; opacity: 1; } to { transform: translateY(70%); opacity: 0; } }

/* Version compacte (pages sans héros) */
.g8f-cd--compact { }
.g8f-cd--compact .g8f-cd__inner { min-height: 0; grid-template-columns: 48px minmax(0, 1fr) auto; padding: 10px 0; gap: 16px; }
.g8f-cd--compact .g8f-cd__art { width: 48px; height: 56px; }
.g8f-cd--compact .g8f-cd__title { font-size: 17px; }
.g8f-cd--compact .g8f-cd__sub { font-size: 14px; margin-top: 2px; }
.g8f-cd--compact .g8f-cd__cell { width: 58px; padding: 6px 4px; }
.g8f-cd--compact .g8f-cd__num { height: 28px; font-size: 22px; line-height: 28px; }
.g8f-cd--compact .g8f-cd__unit { font-size: 11px; }

@media (max-width: 899px) {
  .g8f-cd__inner { grid-template-columns: 64px minmax(0, 1fr); gap: 12px 16px; padding: 16px 0; }
  .g8f-cd__art { width: 64px; height: 74px; }
  .g8f-cd__clock { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .g8f-cd__cell { width: auto; }
  .g8f-cd--compact .g8f-cd__inner { grid-template-columns: 40px minmax(0, 1fr); }
  .g8f-cd--compact .g8f-cd__art { width: 40px; height: 46px; }
}
@media (max-width: 380px) {
  .g8f-cd { padding: 0 12px; }
  .g8f-cd__num { font-size: 26px; }
  .g8f-cd__unit { font-size: 11px; }
}

/* =====================================================================
   2. Mention dans le tunnel : bloc pleine largeur, petit dessin animé de la fête
   ===================================================================== */
.g8f-note {
  display: flex;
  gap: 12px;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  grid-column: 1 / -1; /* si le conteneur est en grille */
  flex: 1 1 100%;      /* si le conteneur est en flex */
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--g8-border, rgba(34, 49, 76, .14));
  border-radius: var(--g8-radius, 8px);
  background: var(--g8-foam-soft, #F6FDFF);
  font-size: 13px;
  line-height: 1.45;
  color: var(--g8-text, #3C3C3C);
}
.g8f-note__art { flex: 0 0 34px; width: 34px; height: 40px; }
.g8f-note__art svg { display: block; width: 100%; height: 100%; overflow: visible; }
.g8f-note p { margin: 0; flex: 1 1 auto; min-width: 0; }
.g8f-note strong { display: block; font-weight: 600; color: var(--g8-navy, #22314C); }
.g8f-note small { display: block; font-size: 12px; color: var(--g8-muted, rgba(60, 60, 60, .68)); }

/* =====================================================================
   3. Zones décoratives : position absolue ou fixe, jamais cliquables
   ===================================================================== */
.g8f-zone, .g8f-zone * { pointer-events: none; }
.g8f-zone svg { display: block; width: 100%; height: auto; overflow: visible; }
.g8f-host { position: relative; }

/* Bande sous l'en-tête : dans la marge haute du héros (54 px sans texte) */
.g8f-zone--head {
  isolation: isolate;
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 48px;
  overflow: hidden;
  z-index: 1;
}

/* Marges latérales (grands écrans), derrière le contenu : jamais sur une photo ni un fond de section */
.g8f-zone--margin {
  position: fixed;
  top: 0; bottom: 0;
  width: calc((100vw - var(--g8-max, 1180px)) / 2 - 32px);
  max-width: 260px;
  overflow: hidden;
  z-index: -1;
  display: none;
}
.g8f-zone--left { left: 0; }
.g8f-zone--right { right: 0; }
@media (min-width: 1560px) { .g8f-zone--margin { display: block; } }

/* Scène du pied de page : posée sur le bord haut du footer (ligne de sol) */
.g8f-zone--foot { position: relative; height: 112px; overflow: hidden; }
.g8f-stage { position: relative; max-width: var(--g8-max, 1180px); height: 100%; margin: 0 auto; }
.g8f-prop, .g8f-actor { position: absolute; bottom: 0; }
.g8f-prop--mirror { transform: scaleX(-1); }
@media (max-width: 767px) { .g8f-zone--foot { height: 88px; } .g8f-prop { zoom: .8; } }

.g8f-toggle {
  pointer-events: auto !important;
  position: absolute;
  right: 20px; top: 8px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  color: var(--g8-muted, rgba(60, 60, 60, .68));
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  z-index: 2;
}
.g8f-toggle:hover { color: var(--g8-navy, #22314C); }
.g8f-toggle:focus-visible { outline: 2px solid var(--g8-navy, #22314C); outline-offset: 2px; }

/* =====================================================================
   4. Noël
   ===================================================================== */
/* Guirlande : fil festonné + ampoules qui scintillent au hasard */
.g8f-garland {
  position: absolute; left: 0; right: 0; top: 0; height: 30px;
  display: flex;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='20'%3E%3Cpath d='M0 3 Q28 19 56 3' fill='none' stroke='%2322314C' stroke-opacity='.45' stroke-width='1.4'/%3E%3C/svg%3E") repeat-x 0 0 / 56px 20px;
}
.g8f-bulb { position: relative; flex: 0 0 56px; height: 30px; }
.g8f-bulb::before { /* douille */
  content: ""; position: absolute; left: 24px; top: 9px; width: 8px; height: 5px; border-radius: 1px; background: var(--g8-navy, #22314C); opacity: .7;
}
.g8f-bulb::after {
  content: ""; position: absolute; left: 23px; top: 13px; width: 10px; height: 14px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--c); box-shadow: 0 0 10px 2px var(--c);
  opacity: .9;
}
.g8f-c0 { --c: #C87870; } .g8f-c1 { --c: #E2B44B; } .g8f-c2 { --c: #9FD0E0; } .g8f-c3 { --c: #FECDC0; }
.g8f-anim .g8f-bulb::after { animation: g8f-twinkle var(--d, 3s) ease-in-out var(--o, 0s) infinite; }
@keyframes g8f-twinkle { 0%, 100% { opacity: .95; transform: scale(1); } 45% { opacity: .35; transform: scale(.92); } 60% { opacity: 1; transform: scale(1.05); } }

/* Neige légère */
.g8f-flake { position: absolute; top: -14px; width: 10px; transform: scale(var(--s, 1)); opacity: 0; }
.g8f-zone--head .g8f-flake { opacity: .8; top: 8px; }
.g8f-zone--margin .g8f-flake { opacity: .8; top: 20%; }
.g8f-anim .g8f-flake { animation: g8f-fall var(--d, 12s) linear var(--o, 0s) infinite; top: -14px; }
.g8f-anim .g8f-zone--head .g8f-flake { animation-name: g8f-fall-short; }
@keyframes g8f-fall {
  0% { transform: translate3d(0, 0, 0) scale(var(--s)) rotate(0); opacity: 0; }
  10% { opacity: .85; }
  85% { opacity: .85; }
  100% { transform: translate3d(var(--x, 0), 100vh, 0) scale(var(--s)) rotate(180deg); opacity: 0; }
}
@keyframes g8f-fall-short {
  0% { transform: translate3d(0, 0, 0) scale(var(--s)); opacity: 0; }
  20% { opacity: .8; }
  100% { transform: translate3d(var(--x, 0), 60px, 0) scale(var(--s)); opacity: 0; }
}

/* Visiteur de l'en-tête : le traîneau passe toutes les 42 s */
.g8f-visitor { position: absolute; top: 12px; z-index: -1; left: 0; width: 150px; opacity: 0; }
.g8f-zone--head .g8f-visitor { opacity: 0; }
.g8f-anim .g8f-visitor--sleigh { animation: g8f-cross 42s linear 3s infinite; }
@keyframes g8f-cross {
  0% { transform: translate3d(-170px, 10px, 0); opacity: 0; }
  1% { opacity: 1; }
  30% { transform: translate3d(calc(100vw + 20px), -2px, 0); opacity: 1; }
  30.1%, 100% { transform: translate3d(calc(100vw + 20px), -2px, 0); opacity: 0; }
}
html:not(.g8f-anim) .g8f-visitor--sleigh { opacity: 1; transform: translate3d(calc(100vw - 260px), 0, 0); }
.g8f-anim .g8f-bob { animation: g8f-bob 1.2s ease-in-out infinite; transform-origin: center; }
@keyframes g8f-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.g8f-gallop { transform-box: fill-box; transform-origin: top center; }
.g8f-anim .g8f-gallop--a { animation: g8f-leg .5s ease-in-out infinite alternate; }
.g8f-anim .g8f-gallop--b { animation: g8f-leg .5s ease-in-out -.25s infinite alternate; }
@keyframes g8f-leg { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }

/* Sapins : léger balancement, boules et étoile qui scintillent */
.g8f-sway { transform-box: fill-box; transform-origin: 50% 100%; }
.g8f-anim .g8f-sway { animation: g8f-sway 5s ease-in-out infinite; }
@keyframes g8f-sway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
.g8f-tw { transform-box: fill-box; transform-origin: center; }
.g8f-anim .g8f-tw { animation: g8f-twinkle 3.1s ease-in-out infinite; }
.g8f-anim .g8f-tw--b { animation-duration: 2.3s; animation-delay: -1.1s; }
.g8f-anim .g8f-tw--c { animation-duration: 3.7s; animation-delay: -.4s; }
.g8f-anim .g8f-tw--d { animation-duration: 2.7s; animation-delay: -2s; }
.g8f-star { transform-box: fill-box; transform-origin: center; }
.g8f-anim .g8f-star { animation: g8f-star 2.8s ease-in-out infinite; }
@keyframes g8f-star { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.15) rotate(8deg); opacity: .8; } }
.g8f-anim .g8f-tree__snow circle { animation: g8f-twinkle 4s ease-in-out infinite; }

/* Scène du pied de page (cycle de 26 s) : un renne arrive, renifle le cadeau, le couvercle saute, il regarde derrière lui, repart */
.g8f-actor--reindeer { left: calc(8% + 170px); width: 64px; opacity: 0; }
.g8f-anim .g8f-actor--reindeer { animation: g8f-walk 26s linear infinite; }
@keyframes g8f-walk {
  0%    { transform: translateX(100vw) scaleX(-1); opacity: 0; }
  2%    { opacity: 1; }
  22%   { transform: translateX(0) scaleX(-1); }   /* arrive près du cadeau */
  40%   { transform: translateX(0) scaleX(-1); }   /* renifle, le couvercle saute */
  46%   { transform: translateX(0) scaleX(1); }    /* regarde derrière lui */
  52%   { transform: translateX(0) scaleX(-1); }
  56%   { transform: translateX(0) scaleX(1); }    /* fait demi-tour */
  78%   { transform: translateX(100vw) scaleX(1); opacity: 1; }
  79%, 100% { transform: translateX(100vw) scaleX(1); opacity: 0; }
}
.g8f-head { transform-box: fill-box; transform-origin: 20% 90%; }
.g8f-anim .g8f-head { animation: g8f-sniff 26s ease-in-out infinite; }
@keyframes g8f-sniff { 0%, 24% { transform: none; } 27% { transform: rotate(16deg); } 30% { transform: none; } 33% { transform: rotate(16deg); } 36%, 100% { transform: none; } }
.g8f-leg { transform-box: fill-box; transform-origin: top center; }
.g8f-anim .g8f-leg--a { animation: g8f-step 26s linear infinite; }
.g8f-anim .g8f-leg--b { animation: g8f-step-b 26s linear infinite; }
@keyframes g8f-step {
  0%, 4%, 8%, 12%, 16%, 20%, 58%, 62%, 66%, 70%, 74% { transform: rotate(-14deg); }
  2%, 6%, 10%, 14%, 18%, 60%, 64%, 68%, 72%, 76% { transform: rotate(14deg); }
  22%, 56%, 78%, 100% { transform: none; }
}
@keyframes g8f-step-b {
  0%, 4%, 8%, 12%, 16%, 20%, 58%, 62%, 66%, 70%, 74% { transform: rotate(14deg); }
  2%, 6%, 10%, 14%, 18%, 60%, 64%, 68%, 72%, 76% { transform: rotate(-14deg); }
  22%, 56%, 78%, 100% { transform: none; }
}
/* Couvercle du cadeau : saute quand le renne renifle */
.g8f-lid { transform-box: fill-box; transform-origin: 20% 100%; }
.g8f-pop { opacity: 0; transform-box: fill-box; transform-origin: center bottom; }
.g8f-anim .g8f-lid { animation: g8f-lid 26s ease-in-out infinite; }
.g8f-anim .g8f-pop { animation: g8f-pop 26s ease-out infinite; }
@keyframes g8f-lid { 0%, 33% { transform: none; } 35% { transform: translateY(-14px) rotate(-14deg); } 38% { transform: translateY(-6px) rotate(-6deg); } 41%, 100% { transform: none; } }
@keyframes g8f-pop { 0%, 34% { opacity: 0; transform: none; } 36% { opacity: 1; } 40% { opacity: 0; transform: translateY(-10px) scale(1.3); } 100% { opacity: 0; } }
/* Sans mouvement : le renne reste posé près du cadeau */
html:not(.g8f-anim) .g8f-actor--reindeer { opacity: 1; transform: scaleX(-1); }

/* =====================================================================
   5. Nouvel An
   ===================================================================== */
.g8f-fw { position: absolute; top: 2px; width: 44px; margin-left: -22px; opacity: 0; transform: scale(.2); }
.g8f-anim .g8f-fw { animation: g8f-burst 7s ease-out var(--o, 0s) infinite; }
@keyframes g8f-burst { 0% { opacity: 0; transform: scale(.2); } 6% { opacity: 1; } 22% { opacity: .9; transform: scale(1); } 34%, 100% { opacity: 0; transform: scale(1.1); } }
html:not(.g8f-anim) .g8f-fw { opacity: .8; transform: scale(.9); }

.g8f-confetti { position: absolute; top: -12px; width: 6px; height: 10px; border-radius: 1px; opacity: 0; }
.g8f-anim .g8f-confetti { animation: g8f-confetti var(--d, 12s) linear var(--o, 0s) infinite; }
html:not(.g8f-anim) .g8f-confetti { top: 30%; opacity: .7; }
@keyframes g8f-confetti {
  0% { transform: translate3d(0, 0, 0) rotate(0); opacity: 0; }
  10%, 85% { opacity: .8; }
  100% { transform: translate3d(30px, 100vh, 0) rotate(540deg); opacity: 0; }
}

/* Serpentin qui ondule (de bas en haut, il ne glisse pas le long de la ligne) */
.g8f-streamer { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; opacity: .9; transform-origin: center; }
.g8f-streamer svg { flex: 1 1 0; }
.g8f-anim .g8f-streamer { animation: g8f-wave 3.4s ease-in-out infinite; }
@keyframes g8f-wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(-1); } }

.g8f-cork { transform-box: fill-box; transform-origin: center; }
.g8f-anim .g8f-cork { animation: g8f-cork 9s ease-out infinite; }
@keyframes g8f-cork { 0%, 60% { transform: none; opacity: 1; } 66% { transform: translate(14px, -40px) rotate(160deg); opacity: 1; } 72% { transform: translate(22px, -46px) rotate(220deg); opacity: 0; } 73%, 92% { opacity: 0; transform: none; } 100% { opacity: 1; transform: none; } }
.g8f-prop--mirror .g8f-cork { animation-delay: -4.5s; }
.g8f-bubble { transform-box: fill-box; transform-origin: center; }
.g8f-anim .g8f-bubble { animation: g8f-bubble 2.4s ease-in infinite; }
.g8f-anim .g8f-bubble--b { animation-delay: -.8s; animation-duration: 2s; }
.g8f-anim .g8f-bubble--c { animation-delay: -1.6s; animation-duration: 2.8s; }
@keyframes g8f-bubble { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-18px); opacity: 0; } }

/* =====================================================================
   5 bis. Autres fêtes (Saint-Valentin, Pâques, fêtes des mères et des pères,
   14 Juillet, Halloween, Bonfire Night) : mêmes règles, dessins différents
   ===================================================================== */
/* Particules qui montent (cœurs, étincelles) */
.g8f-rise { position: absolute; bottom: -16px; opacity: 0; transform: scale(var(--s, 1)); }
.g8f-anim .g8f-rise { animation: g8f-rise var(--d, 12s) linear var(--o, 0s) infinite; }
.g8f-anim .g8f-zone--head .g8f-rise { animation-name: g8f-rise-short; }
html:not(.g8f-anim) .g8f-rise { opacity: .7; bottom: 40%; }
.g8f-zone--head .g8f-rise { bottom: -6px; }
@keyframes g8f-rise {
  0% { transform: translate3d(0, 0, 0) scale(var(--s)); opacity: 0; }
  10%, 85% { opacity: .85; }
  100% { transform: translate3d(var(--x, 0), -100vh, 0) scale(var(--s)); opacity: 0; }
}
@keyframes g8f-rise-short {
  0% { transform: translate3d(0, 0, 0) scale(var(--s)); opacity: 0; }
  25% { opacity: .8; }
  100% { transform: translate3d(var(--x, 0), -46px, 0) scale(var(--s)); opacity: 0; }
}
/* Étoiles qui scintillent sur place (fête des pères) */
.g8f-tstar { position: absolute; top: 18%; opacity: .75; }
.g8f-tstar:nth-child(2) { top: 32%; } .g8f-tstar:nth-child(3) { top: 47%; } .g8f-tstar:nth-child(4) { top: 61%; } .g8f-tstar:nth-child(5) { top: 74%; } .g8f-tstar:nth-child(6) { top: 86%; }
.g8f-anim .g8f-tstar { animation: g8f-twinkle 3.4s ease-in-out var(--o, 0s) infinite; }

/* Visiteurs de l'en-tête (ballon, papillon, avion en papier, chauve-souris) : un passage toutes les 38 s */
.g8f-anim .g8f-visitor--fly { animation: g8f-cross 38s linear 4s infinite; }
.g8f-anim .g8f-visitor--fly > svg { animation: g8f-bob 1.8s ease-in-out infinite; }
html:not(.g8f-anim) .g8f-visitor--fly { opacity: 1; transform: translate3d(calc(100vw - 220px), 0, 0); }
.g8f-wing { transform-box: fill-box; }
.g8f-wing--l { transform-origin: 100% 50%; } .g8f-wing--r { transform-origin: 0 50%; }
.g8f-anim .g8f-wing { animation: g8f-flap .4s ease-in-out infinite alternate; }
@keyframes g8f-flap { from { transform: scaleX(1); } to { transform: scaleX(.4); } }

/* Fanions tricolores */
.g8f-bunting { position: absolute; left: 0; top: 0; display: flex; }
.g8f-zone .g8f-bunting svg { flex: 0 0 400px; width: 400px; }
.g8f-pennant { transform-box: fill-box; transform-origin: 50% 0; }
.g8f-anim .g8f-pennant { animation: g8f-pennant 3.2s ease-in-out infinite; }
.g8f-anim .g8f-pennant:nth-child(odd) { animation-delay: -1.6s; }
@keyframes g8f-pennant { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }

/* Décalage pour que deux objets voisins ne bougent jamais ensemble */
.g8f-anim .g8f-prop--late * { animation-delay: -1.7s; }
.g8f-prop--hang { top: 0; bottom: auto; }

/* Personnages et objets */
.g8f-arm { transform-box: fill-box; transform-origin: 50% 100%; }
.g8f-anim .g8f-arm { animation: g8f-arm 1.1s ease-in-out infinite alternate; }
@keyframes g8f-arm { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
.g8f-ear { transform-box: fill-box; transform-origin: 50% 100%; }
.g8f-anim .g8f-ear { animation: g8f-ear 5s ease-in-out infinite; }
.g8f-anim .g8f-ear--b { animation-delay: -2.4s; }
@keyframes g8f-ear { 0%, 88%, 100% { transform: none; } 92% { transform: rotate(-12deg); } 96% { transform: rotate(4deg); } }
.g8f-chick { transform: translateY(14px); }
.g8f-anim .g8f-chick { animation: g8f-chick 9s ease-in-out infinite; }
.g8f-sp .g8f-chick { animation-delay: -2.2s; }
@keyframes g8f-chick { 0%, 25%, 85%, 100% { transform: translateY(14px); } 35%, 75% { transform: translateY(0); } 50% { transform: translateY(0) rotate(-8deg); } 60% { transform: translateY(0) rotate(6deg); } }
html:not(.g8f-anim) .g8f-chick { transform: translateY(4px); }
.g8f-prop--wobble svg { transform-origin: 50% 100%; }
.g8f-anim .g8f-prop--wobble svg { animation: g8f-wobble 4s ease-in-out infinite; }
@keyframes g8f-wobble { 0%, 70%, 100% { transform: none; } 76% { transform: rotate(-7deg); } 82% { transform: rotate(6deg); } 88% { transform: rotate(-3deg); } }
.g8f-flap { transform-box: fill-box; transform-origin: 50% 0; }
.g8f-letter { transform: translateY(16px); }
.g8f-anim .g8f-flap { animation: g8f-flap-open 10s ease-in-out infinite; }
.g8f-anim .g8f-letter { animation: g8f-letter 10s ease-in-out infinite; }
.g8f-sp .g8f-flap, .g8f-sp .g8f-letter { animation-delay: -3s; }
@keyframes g8f-flap-open { 0%, 38%, 86%, 100% { transform: none; } 46%, 78% { transform: scaleY(-1); } }
@keyframes g8f-letter { 0%, 46%, 84%, 100% { transform: translateY(16px); } 54%, 76% { transform: translateY(-10px); } }
.g8f-anim .g8f-prop--glide svg { animation: g8f-bob 2.4s ease-in-out infinite; }
.g8f-anim .g8f-prop--beat svg { animation: g8f-beat 1.6s ease-in-out infinite; }
@keyframes g8f-beat { 0%, 40%, 100% { transform: scale(1); } 15% { transform: scale(1.14); } 28% { transform: scale(1.06); } }
.g8f-sway--top { transform-origin: 50% 0; }
.g8f-dangle { transform-box: fill-box; }
.g8f-anim .g8f-dangle { animation: g8f-dangle 3s ease-in-out infinite alternate; }
@keyframes g8f-dangle { from { transform: translateY(0); } to { transform: translateY(7px); } }
.g8f-anim .g8f-prop--twinkle svg { animation: g8f-twinkle 2.6s ease-in-out infinite; }
.g8f-anim .g8f-prop--fw svg { animation: g8f-burst 7s ease-out infinite; }
.g8f-anim .g8f-prop--late.g8f-prop--fw svg { animation-delay: -3.5s; }
.g8f-flagwave { transform-box: fill-box; transform-origin: 0 50%; }
.g8f-anim .g8f-flagwave { animation: g8f-flagwave 2.4s ease-in-out infinite alternate; }
@keyframes g8f-flagwave { from { transform: skewY(-4deg); } to { transform: skewY(4deg) scaleX(.96); } }
.g8f-anim .g8f-glow { animation: g8f-glow 2.6s ease-in-out infinite; }
@keyframes g8f-glow { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.g8f-hover { transform-box: fill-box; }
.g8f-anim .g8f-hover { animation: g8f-dangle 2.4s ease-in-out infinite alternate-reverse; }
.g8f-steam { opacity: .7; }
.g8f-anim .g8f-steam { animation: g8f-steam 2.8s ease-out infinite; opacity: 0; }
.g8f-anim .g8f-steam--b { animation-delay: -.9s; } .g8f-anim .g8f-steam--c { animation-delay: -1.8s; }
@keyframes g8f-steam { 0% { transform: translateY(4px); opacity: 0; } 30% { opacity: .9; } 100% { transform: translateY(-8px); opacity: 0; } }
.g8f-flame { transform-box: fill-box; transform-origin: 50% 100%; }
.g8f-anim .g8f-flame { animation: g8f-flicker .9s ease-in-out infinite alternate; }
.g8f-anim .g8f-flame--b { animation-duration: .6s; animation-delay: -.3s; }
@keyframes g8f-flicker { from { transform: scale(1, 1); } to { transform: scale(1.05, .86); } }
.g8f-spark { transform-box: fill-box; transform-origin: center; }
.g8f-anim .g8f-spark { animation: g8f-spark .45s ease-in-out infinite alternate; }
@keyframes g8f-spark { from { transform: rotate(0) scale(.8); opacity: .7; } to { transform: rotate(22deg) scale(1.12); opacity: 1; } }
.g8f-hand { transform-box: fill-box; transform-origin: 50% 100%; }
.g8f-anim .g8f-hand { animation: g8f-hand 6s ease-out infinite; }
@keyframes g8f-hand { 0% { transform: rotate(-90deg); } 40%, 100% { transform: rotate(0); } }
.g8f-chip { display: block; width: 9px; height: 13px; border-radius: 1px; }


/* Saisons (hors fêtes) */
.g8f-spin { transform-box: fill-box; transform-origin: center; }
.g8f-anim .g8f-spin { animation: g8f-spin 24s linear infinite; }
@keyframes g8f-spin { to { transform: rotate(360deg); } }
.g8f-claw { transform-box: fill-box; transform-origin: 50% 100%; }
.g8f-anim .g8f-claw { animation: g8f-arm 1.4s ease-in-out infinite alternate; }
.g8f-anim .g8f-claw--b { animation-delay: -.7s; }

/* Tunnel : micro-déco dans les parties vides de la barre d'en-tête */
.g8f-zone--hdr { position: absolute; overflow: hidden; }
.g8f-zone--hdr .g8f-flake { top: 10px; opacity: .8; }
.g8f-anim .g8f-zone--hdr .g8f-flake { top: -14px; animation-name: g8f-fall-short; }
@media (max-width: 767px) { .g8f-zone--hdr { display: none; } }


/* Tunnel : dessin près du titre d'étape et sur la pastille de l'étape en cours (calques absolus, jamais cliquables) */
.g8f-mark { position: absolute; z-index: 5; }
.g8f-mark--title svg { width: 100%; height: 100%; }
.g8f-mark--step { transform-origin: 30% 100%; transform: rotate(14deg); }
.g8f-anim .g8f-mark--step { animation: g8f-mark-bob 3.2s ease-in-out infinite; }
@keyframes g8f-mark-bob { 0%, 100% { transform: rotate(14deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-2px); } }
.g8f-anim .g8f-mark--title > svg { animation: g8f-mark-pop 6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes g8f-mark-pop { 0%, 80%, 100% { transform: none; } 86% { transform: translateY(-4px) rotate(-6deg); } 92% { transform: translateY(0) rotate(4deg); } }

/* =====================================================================
   5 ter. Apparitions surprises
   Placées par le script dans une zone vide, au-dessus du contenu mais jamais
   cliquables ; une seule à la fois, puis retirées. Rien ne s'affiche sans mouvement.
   ===================================================================== */
.g8f-sp { position: absolute; z-index: 3; overflow: hidden; contain: layout paint; }
.g8f-sp--float, .g8f-sp--burst, .g8f-sp--puff { overflow: visible; contain: layout; }
.g8f-sp__a { position: absolute; left: 0; bottom: 0; }
.g8f-sp--side.g8f-sp--r .g8f-sp__m { transform: scaleX(-1); }

.g8f-sp--peek .g8f-sp__a { transform: translateY(102%); animation: g8f-sp-peek 6.4s cubic-bezier(.3, .7, .3, 1) forwards; }
@keyframes g8f-sp-peek { 0% { transform: translateY(102%); } 16% { transform: translateY(10%); } 22%, 74% { transform: translateY(14%); } 46% { transform: translateY(12%) rotate(-2deg); } 100% { transform: translateY(102%); } }

.g8f-sp--side.g8f-sp--l .g8f-sp__a { transform-origin: 0 100%; transform: translateX(-100%); animation: g8f-sp-side-l 6s ease-in-out forwards; }
.g8f-sp--side.g8f-sp--r .g8f-sp__a { transform-origin: 100% 100%; transform: translateX(100%); animation: g8f-sp-side-r 6s ease-in-out forwards; }
@keyframes g8f-sp-side-l { 0% { transform: translateX(-100%); } 18%, 76% { transform: translateX(-28%) rotate(10deg); } 46% { transform: translateX(-24%) rotate(14deg); } 100% { transform: translateX(-100%); } }
@keyframes g8f-sp-side-r { 0% { transform: translateX(100%); } 18%, 76% { transform: translateX(28%) rotate(-10deg); } 46% { transform: translateX(24%) rotate(-14deg); } 100% { transform: translateX(100%); } }

.g8f-sp--drop .g8f-sp__a { top: 0; bottom: auto; transform: translateY(-100%); animation: g8f-sp-drop 7s ease-in-out forwards; }
@keyframes g8f-sp-drop { 0% { transform: translateY(-100%); } 22% { transform: translateY(-6%); } 28% { transform: translateY(-12%); } 34%, 76% { transform: translateY(-8%); } 100% { transform: translateY(-100%); } }

.g8f-sp--float .g8f-sp__a { opacity: 0; animation: g8f-sp-float 7.5s ease-in-out forwards; }
.g8f-sp--float .g8f-sp__m { animation: g8f-sp-sway 2.4s ease-in-out infinite alternate; }
@keyframes g8f-sp-float { 0% { transform: translateY(0); opacity: 0; } 14%, 80% { opacity: 1; } 100% { transform: translateY(-120%); opacity: 0; } }
@keyframes g8f-sp-sway { from { transform: translateX(-6px) rotate(-3deg); } to { transform: translateX(6px) rotate(3deg); } }

.g8f-sp--burst .g8f-sp__a { opacity: 0; transform-origin: 50% 50%; animation: g8f-sp-burst 2.8s ease-out forwards; }
@keyframes g8f-sp-burst { 0% { transform: scale(.2); opacity: 0; } 12% { opacity: 1; } 42% { transform: scale(1); opacity: .95; } 100% { transform: scale(1.06); opacity: 0; } }

.g8f-sp__p { position: absolute; left: 50%; top: 50%; width: 16px; margin: -8px 0 0 -8px; opacity: 0; animation: g8f-sp-puff 2.2s ease-out var(--t, 0s) forwards; }
@keyframes g8f-sp-puff {
  0% { transform: translate(0, 0) scale(.3) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translate(var(--x), calc(var(--y) + 14px)) scale(1) rotate(var(--r)); opacity: 0; }
}

/* =====================================================================
   6. Mobile : seulement le pied de page et un visiteur dans l'en-tête
   ===================================================================== */
@media (max-width: 767px) {
  .g8f-zone--margin, .g8f-garland, .g8f-zone--head .g8f-flake { display: none; }
  .g8f-visitor { width: 120px; }
}

/* Mouvement réduit demandé par le système : tout reste dessiné, rien ne bouge */
@media (prefers-reduced-motion: reduce) {
  .g8f-zone *, .g8f-cd *, .g8f-note * { animation: none !important; }
}

/* =====================================================================
   7. Correctif du thème glace8-custom (section « Dimensions »)
   Le titre et le sous-titre débordaient à droite du conteneur (colonne de grille
   dimensionnée sur le texte + sous-titre en nowrap). À reporter dans le thème
   puis à retirer d'ici.
   ===================================================================== */
.g8-dimensions .g8-dimensions__header { grid-template-columns: minmax(0, 1fr); }
.g8-dimensions .g8-dimensions__header > * { max-width: 100%; min-width: 0; }
.g8-dimensions .g8-dimensions__header > p { white-space: normal !important; }
.g8-dimensions .g8-dimensions__header > p:last-child { max-width: 720px; justify-self: end; }

/* ==========================================================================
   9. Écran de chargement : l'huître de la fête remplace le rond qui tourne
   Voiles du thème glace8-custom (inchangés : même fond, même durée) :
   - html.g8-language-transition       → ::before voile, ::after rond (navigation mobile, langue, ajout AJAX)
   - html.g8-checkout-hydrating / -navigating → body::before voile, body::after rond (panier, paiement)
   - .g8-pro-is-busy                   → body::after voile, body::before rond (actions Pro)
   Sans l'attribut data-g8f-load (extension coupée, interrupteur, saison dans le tunnel), le rond d'origine revient.
   ========================================================================== */
html[data-g8f-load].g8-language-transition::after,
html[data-g8f-load].g8-checkout-hydrating body::after,
html[data-g8f-load].g8-checkout-navigating body::after,
html[data-g8f-load].g8-pro-is-busy body::before {
  width: 76px;
  height: 74px;
  margin: -46px 0 0 -38px;
  border: 0;
  border-radius: 0;
  background: var(--g8f-load-art) center / contain no-repeat;
  transform-origin: 50% 90%;
  animation: g8f-oyster .9s ease-in-out infinite;
  will-change: transform;
}
/* Petit mot de la fête sous l'huître (dans le voile lui-même, rien n'est ajouté à la page). */
html[data-g8f-load].g8-language-transition::before,
html[data-g8f-load].g8-checkout-hydrating body::before,
html[data-g8f-load].g8-checkout-navigating body::before,
html[data-g8f-load].g8-pro-is-busy body::after {
  content: var(--g8f-load-text, "");
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 92px 16px 0;
  color: #22314C;
  font: 600 15px/1.3 var(--g8-font-heading, "Nobel", "Avenir Next", system-ui, sans-serif);
  letter-spacing: .02em;
  text-align: center;
}
@keyframes g8f-oyster {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%      { transform: translateY(-7px) rotate(4deg) scale(1.03); }
}
@media (max-width: 767px) {
  html[data-g8f-load].g8-language-transition::after,
  html[data-g8f-load].g8-checkout-hydrating body::after,
  html[data-g8f-load].g8-checkout-navigating body::after,
  html[data-g8f-load].g8-pro-is-busy body::before { width: 64px; height: 62px; margin: -40px 0 0 -32px; }
  html[data-g8f-load].g8-language-transition::before,
  html[data-g8f-load].g8-checkout-hydrating body::before,
  html[data-g8f-load].g8-checkout-navigating body::before,
  html[data-g8f-load].g8-pro-is-busy body::after { padding-top: 78px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-g8f-load].g8-language-transition::after,
  html[data-g8f-load].g8-checkout-hydrating body::after,
  html[data-g8f-load].g8-checkout-navigating body::after,
  html[data-g8f-load].g8-pro-is-busy body::before { animation: none; }
}
