/* Halloween — maquette locale (js/halloween-wink.js). Plus assumé. */

body:not(.season-halloween) .halloween-stage,
body:not(.season-halloween) .halloween-wink,
body:not(.season-halloween) .halloween-wink-line,
body:not(.season-halloween) .halloween-float,
body:not(.season-halloween) .halloween-bat,
body:not(.season-halloween) .halloween-ghost,
body:not(.season-halloween) .halloween-web,
body:not(.season-halloween) .halloween-preview-tag {
  display: none !important;
}

/* Bandeau : dégradé Halloween, contenu = Pré-hiver uniquement */
body.season-halloween .menofair-ticker {
  border-bottom-color: rgba(255, 170, 80, 0.35);
  background: linear-gradient(90deg, #140c08 0%, #6b2408 42%, #d46812 50%, #6b2408 58%, #140c08 100%);
  color: #fff8ef;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

body.season-halloween .menofair-ticker-seq {
  padding: 0.85rem 0;
}

body.season-halloween .menofair-ticker-tag--season {
  color: #1c1008;
  background: #ffc078;
  box-shadow: none;
}

body.season-halloween .menofair-ticker-hint {
  color: #ffe3b8;
}

/* Scène hero — légère teinte Halloween (sobre) */
body.season-halloween .hero.hero--v3 {
  isolation: isolate;
}

body.season-halloween .hero.hero--v3 .hero-bg::after {
  background: linear-gradient(
    155deg,
    rgba(26, 90, 130, 0.2) 0%,
    rgba(90, 48, 28, 0.28) 48%,
    rgba(120, 52, 18, 0.34) 100%
  ) !important;
}

body.season-halloween .hero.hero--v3::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    rgba(255, 140, 50, 0.08) 0%,
    rgba(255, 120, 40, 0.05) 40%,
    rgba(180, 70, 20, 0.12) 100%
  );
  mix-blend-mode: soft-light;
}

body.season-halloween .hero-v3-glow {
  width: min(52vw, 500px);
  height: min(52vw, 500px);
  right: -5%;
  top: -10%;
  background: radial-gradient(circle, rgba(255, 140, 60, 0.28), transparent 68%);
}

/* Toiles — trait clair + contraste */
.halloween-web {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  opacity: 0.85;
  width: min(260px, 32vw);
  height: min(260px, 32vw);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='1.4' stroke-linecap='round' opacity='0.9'%3E%3Cpath d='M0 0 L200 0 M0 0 L0 200 M0 0 L200 200 M0 0 L140 200 M0 0 L200 140 M0 0 L70 200 M0 0 L200 70'/%3E%3Cpath d='M28 0 Q40 40 0 28 M55 0 Q75 75 0 55 M90 0 Q110 110 0 90 M130 0 Q145 145 0 130'/%3E%3C/g%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

.halloween-web--tr {
  top: 0;
  right: 0;
  transform: scaleX(-1);
}

.halloween-web--tl {
  top: 0;
  left: 0;
  opacity: 0.7;
  width: min(170px, 22vw);
  height: min(170px, 22vw);
}

/* Pastille hero */
body.season-halloween .halloween-wink {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.75rem 0 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1c1008;
  background: linear-gradient(180deg, #ffd090 0%, #f08a28 100%);
  border: 1px solid rgba(255, 240, 200, 0.65);
  box-shadow:
    0 8px 22px rgba(160, 60, 8, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.season-halloween .halloween-wink-line {
  display: block;
  margin-top: 0.7rem;
  max-width: 34rem;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #ffe7c2;
  text-shadow:
    0 1px 12px rgba(0, 0, 0, 0.5),
    0 0 18px rgba(255, 140, 50, 0.25);
  transform-origin: left center;
  animation: halloween-text-vibrate 0.55s ease-in-out infinite;
}

@keyframes halloween-text-vibrate {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  20% {
    transform: translate(0.6px, -0.5px) rotate(-0.35deg);
  }
  40% {
    transform: translate(-0.7px, 0.4px) rotate(0.4deg);
  }
  60% {
    transform: translate(0.5px, 0.6px) rotate(-0.25deg);
  }
  80% {
    transform: translate(-0.4px, -0.3px) rotate(0.3deg);
  }
}

/* Flottants — contrastés sur la photo */
.halloween-float,
.halloween-bat,
.halloween-ghost {
  position: absolute;
  z-index: 5;
  pointer-events: none;
}

.halloween-float {
  opacity: 1;
  width: 40px;
  height: 40px;
  filter:
    drop-shadow(0 0 6px rgba(255, 170, 40, 0.55))
    drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
  animation: halloween-drift 7s ease-in-out infinite;
}

.halloween-float .halloween-wink-ico {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.halloween-float--1 { top: 10%; right: 6%; }
.halloween-float--2 { top: 26%; right: 2%; width: 35px; height: 35px; animation-delay: -2s; }
.halloween-float--3 { bottom: 22%; right: 11%; width: 38px; height: 38px; animation-delay: -3.8s; }
.halloween-float--4 { top: 46%; right: 20%; width: 32px; height: 32px; animation-delay: -1s; }
.halloween-float--5 { top: 14%; left: 46%; width: 30px; height: 30px; animation-delay: -5s; }

.halloween-bat {
  width: 120px;
  height: 70px;
  opacity: 1;
  color: #111;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  animation: halloween-fly 16s linear infinite;
}

.halloween-bat svg,
.halloween-ghost svg {
  width: 100%;
  height: 100%;
  display: block;
}

.halloween-bat--1 { top: 8%; left: -10%; animation-duration: 17s; }
.halloween-bat--2 { top: 16%; left: -14%; width: 100px; height: 58px; animation-duration: 21s; animation-delay: -8s; }
.halloween-bat--3 { top: 6%; left: -12%; width: 86px; height: 50px; animation-duration: 19s; animation-delay: -12s; }

.halloween-ghost {
  width: 52px;
  height: 66px;
  opacity: 0.92;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
  animation: halloween-bob 4.5s ease-in-out infinite;
}

.halloween-ghost--1 {
  top: 36%;
  right: 28%;
  width: 58px;
  height: 74px;
}

.halloween-ghost--2 {
  top: 58%;
  right: 6%;
  width: 44px;
  height: 56px;
  opacity: 0.85;
  animation-delay: -1.6s;
  animation-duration: 5.2s;
}

.halloween-ghost--3 {
  top: 24%;
  left: 52%;
  width: 40px;
  height: 52px;
  opacity: 0.8;
  animation-delay: -2.8s;
  animation-duration: 4.8s;
}

@keyframes halloween-drift {
  0%, 100% { transform: translateY(0) rotate(-8deg) scale(1); }
  50% { transform: translateY(-16px) rotate(12deg) scale(1.08); }
}

@keyframes halloween-bob {
  0%, 100% { transform: translateY(0) translateX(0); }
  40% { transform: translateY(-12px) translateX(4px); }
  70% { transform: translateY(-4px) translateX(-3px); }
}

@keyframes halloween-fly {
  0% { transform: translateX(0) translateY(0) scaleX(1); }
  45% { transform: translateX(70vw) translateY(18px) scaleX(1); }
  50% { transform: translateX(72vw) translateY(10px) scaleX(-1); }
  95% { transform: translateX(-5vw) translateY(-8px) scaleX(-1); }
  100% { transform: translateX(0) translateY(0) scaleX(1); }
}

.halloween-preview-tag {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font: 600 0.72rem/1.2 "Plus Jakarta Sans", system-ui, sans-serif;
  color: #fff7ed;
  background: rgba(28, 18, 12, 0.92);
  border: 1px solid rgba(232, 146, 58, 0.55);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.halloween-preview-tag button {
  margin: 0;
  padding: 0.15rem 0.45rem;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-size: 0.68rem;
  color: #1c120c;
  background: #f0a35a;
  cursor: pointer;
}

@media (max-width: 900px) {
  .halloween-float--4,
  .halloween-float--5,
  .halloween-bat--3,
  .halloween-ghost--3,
  .halloween-web--tl {
    display: none;
  }
}

@media (max-width: 720px) {
  .halloween-float--2,
  .halloween-float--3,
  .halloween-bat--2,
  .halloween-ghost--2 {
    display: none;
  }

  .halloween-float--1 {
    right: 4%;
    top: 9%;
    width: 34px;
    height: 34px;
  }

  body.season-halloween .halloween-wink-line {
    font-size: 1.08rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .halloween-float,
  .halloween-bat,
  .halloween-ghost,
  body.season-halloween .halloween-wink-line {
    animation: none;
  }
}
