/* Halloween local theme. The catalog and purchase scripts remain unchanged. */
:root, :root[data-theme] {
  color-scheme: dark;
  --bg: #100D17; --white: #1C1626; --text: #F6F0E8; --muted: #BEB4CA;
  --border: #3B3049; --orange: #FF8A24; --orange2: #FFA54F;
  --orange-l: #FFB875; --orange-bg: #302015; --orange-text: #FFAA60;
  --orange-strong: #FFAA60; --violet: #A879ED; --violet-dim: #C5A3F4; --violet-ink: #C5A3F4;
}
html { scroll-padding-top: 90px; }
html body.halloween { background: #100D17; color: #F6F0E8; }
.halloween .nav { background: #100D17ed; border-color: #3B3049; }
.halloween :is(.mobile-menu,.nav-dropdown,.cart-drawer,.modal,.login-modal,.checkout-modal,.faq-item,.goal-strip,.section--alt,.footer,.page-info-note) { background: #1C1626; border-color: #3B3049; }
.halloween :is(input,select,textarea) { background-color: #100D17; color: #F6F0E8; border-color: #6B5A7D; }
.halloween :is(.nav-link,.category-desc,.category-perks,.category-meta,.faq-lead,.hero p) { color: #BEB4CA; }
.halloween :is(.category-card,.grade-card,.key-card,.bundle-card,.upgrade-card) { background: #1C1626; border-color: #3B3049; box-shadow: none; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.halloween :is(.category-card,.grade-card) { --aura: #A879ED; }
.halloween :is(.category-card--crates,.key-card) { --aura: #FF8A24; }
.halloween :is(.category-card--coins,.key-card--coins) { --aura: #EBC469; }
.halloween :is(.category-card--bundles,.bundle-card) { --aura: #B88CEB; background: linear-gradient(145deg,#261B30,#1C1626 55%,#302016); }
.halloween :is(.category-card,.grade-card,.key-card,.bundle-card):hover { background-color: #231B30; border-color: var(--aura); transform: translateY(-3px); box-shadow: 0 9px 30px color-mix(in srgb,var(--aura) 14%,transparent); }
.halloween .category-card::before { background: var(--aura); }
.halloween .category-card .category-icon { color: var(--aura); background: transparent; }
.halloween .category-card .category-cta { color: #1A1222; background: var(--aura); border: 1px solid var(--aura); box-shadow: 0 4px 16px color-mix(in srgb,var(--aura) 22%,transparent); }
.halloween .category-card:hover .category-cta { background: color-mix(in srgb,var(--aura) 82%,#fff); opacity: 1; }
.halloween .category-card .category-title { color: #F6F0E8; }
.halloween :is(.grade-header,.grade-header--silver,.grade-header--gold,.grade-header--rainbow,.key-card--featured) { background: #251B32; }
.halloween :is(.grade-name,.bundle-tier,.bundle-contents li,.coin-base) { color: #F6F0E8; }
.halloween :is(.cta-join,.btn-grade,.btn-key,.cart-checkout,.login-submit) { background: #FF8A24; color: #211309; border-color: #FF8A24; text-shadow: none; }
.halloween :is(.cta-join,.btn-grade,.btn-key,.cart-checkout,.login-submit):hover { background: #FFA54F; color: #211309; box-shadow: 0 0 24px #FF8A2438; }
.halloween :is(.btn-grade--owned,.btn-grade--owned:hover) { background: #3B3049; color: #D5CBDF; }
.halloween :is(a,button,input,select,textarea,[tabindex]):focus-visible { outline: 3px solid #C5A3F4; outline-offset: 4px; }
.halloween .hero { position: relative; isolation: isolate; overflow: hidden; width: calc(100% - 48px); max-width: 1280px; min-height: 630px; margin: 24px auto 32px; padding: 64px 64px 175px; grid-template-columns: 1.25fr .75fr; gap: 30px; border: 1px solid #3B3049; border-radius: 20px; background: #15101F; }
.halloween .hero::before,.halloween .hero::after { display: none; }
.halloween .hero-left { position: relative; z-index: 2; gap: 23px; align-items: flex-start; text-align: left; }
.halloween .hero h1 { font-family: 'Outfit','Plus Jakarta Sans',sans-serif; font-size: clamp(2.7rem,4.6vw,4.5rem); line-height: 1.06; letter-spacing: -.04em; color: #F6F0E8; text-wrap: balance; }
.halloween .hero p { font-size: 1.1rem; line-height: 1.65; margin: 0; }
.halloween .hero-pill { background: #21192D; border-color: #544064; color: #E7DCEF; }
.halloween .hero-dot { background: #A879ED; box-shadow: 0 0 8px #A879ED66; }
.halloween .hero-right { position: relative; z-index: 1; align-self: center; padding-top: 40px; }
.halloween .hero-logo-wrap { max-width: 285px; animation: none; transform: none !important; }
.halloween .hero-logo-wrap::before { background: radial-gradient(ellipse,#A879ED25,transparent 68%); }
.halloween .hero-logo { animation: none; filter: drop-shadow(0 16px 24px #0009); }
.halloween .hero-ctas-row { gap: 10px; justify-content: flex-start; }
.halloween .cta-join { background: #FF8A24; color: #211309; border: 1px solid #FF8A24; border-radius: 8px; min-height: 48px; padding: 14px 20px; font-weight: 800; box-shadow: 0 0 22px #FF8A2430; }
.halloween .cta-discord { min-height: 48px; color: #fff; background: #5865F2; border: 1px solid #7983F5; border-radius: 8px; box-shadow: 0 0 18px #5865F240; }
.halloween .cta-discord:hover { background: #4752C4; }
.halloween .hero-ip { background: #17111Fdd; border-color: #493754; box-shadow: none; }
.halloween .hero-ip-label { color: #211309; }
.halloween .hero-ip-label--bedrock { background: #A879ED; }
.halloween .hero-ip-text { color: #F6F0E8; }
.halloween .hero-ips { margin-top: 5px; }
.halloween-scene { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; user-select: none; }
.halloween-bat { position: absolute; width: 42px; height: 24px; background: #A18DB8; opacity: .6; clip-path: polygon(0 12%,24% 30%,35% 12%,43% 37%,50% 28%,57% 37%,65% 12%,76% 30%,100% 12%,88% 68%,65% 68%,50% 100%,35% 68%,12% 68%); animation: halloween-bat 9s ease-in-out infinite alternate; }
.halloween-bat--one { top: 18%; right: 31%; }
.halloween-bat--two { width: 25px; height: 15px; top: 29%; right: 8%; animation-delay: -4s; }
.halloween-ember { position: absolute; width: 3px; height: 3px; background: #FFB875; box-shadow: 0 0 9px #FF8A24; animation: halloween-ember 8s ease-in-out infinite alternate; }
.halloween-ember--one { left: 68%; bottom: 18%; }
.halloween-ember--two { left: 85%; bottom: 25%; animation-delay: -3s; }
@keyframes halloween-bat { to { transform: translate(16px,-10px); } }
@keyframes halloween-ember { to { transform: translate(8px,-28px); opacity: .2; } }
/* Existing global decorative animations are quiet outside the scene. */
.halloween :is(.reveal,.fade-in) { opacity: 1; transform: none; transition-delay: 0s !important; }
.halloween :is(.hero-dot,.goal-fill,.grade-card,.key-card,.bundle-card,.category-icon,.rainbow-price,.loading-pulse),.halloween .footer * { animation: none !important; }
.halloween .category-card { border-radius: 12px; }
@media (max-width: 800px) {
  .halloween .hero { width: calc(100% - 24px); min-height: 740px; margin: 12px auto 24px; padding: 38px 24px 245px; grid-template-columns: 1fr; gap: 0; }
  .halloween .hero-left { align-items: center; text-align: center; }
  .halloween .hero h1 { font-size: clamp(2.5rem,8vw,3.8rem); }
  .halloween .hero p { font-size: 1rem; }
  .halloween .hero-right { position: absolute; bottom: 76px; right: calc(50% - 65px); width: 130px; padding: 0; }
  .halloween .hero-logo-wrap { display: block; }
  .halloween .hero-ctas { align-items: center; width: 100%; }
  .halloween .hero-ctas-row { justify-content: center; gap: 8px; }
  .halloween .cta-join { padding: 12px 14px; font-size: .8rem; }
  .halloween .cta-discord { width: 100%; justify-content: center; }
  .halloween .hero-ips { width: 100%; align-items: center; }
  .halloween .hero-ip { max-width: 300px; }
  .halloween-bat--two,.halloween-ember { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html:not(.fx-force) .halloween *, html:not(.fx-force) .halloween *::before, html:not(.fx-force) .halloween *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .halloween :is(.category-card,.grade-card,.key-card,.bundle-card):hover { transform: none; }
}

/* Contrast and small-screen refinements after visual review. */
.halloween .nav-login-btn { background: #FF8A24; color: #211309; }
.halloween .dark-toggle { display: none; }
.halloween .goal-strip { border: 0; box-shadow: inset 0 4px #0A0614, inset 0 6px #2A2236, inset 0 -4px #0A0614, inset 0 -6px #2A2236; padding: 22px 0; }
.halloween .goal-bar-wrap { position: relative; height: 16px; border-radius: 0; background: #120D1A; border: 3px solid #0A0614; box-shadow: inset 2px 2px #00000099, inset -2px -2px #3B3049; margin-bottom: 8px; }
.halloween .goal-bar-wrap::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(5.555% - 3px), #0A0614 calc(5.555% - 3px) 5.555%); pointer-events: none; }
.halloween .goal-bar-fill { border-radius: 0; background: linear-gradient(#FFC27A 0 25%, #FF8A24 25% 70%, #B5520F 70%); }
.halloween .goal-strip--done .goal-bar-fill { background: linear-gradient(#B8F27A 0 25%, #7FD13B 25% 70%, #3E7A16 70%); }
.halloween .category-card::after { background: color-mix(in srgb,var(--aura) 7%,transparent); }
.halloween .category-card--coins .category-icon { color: #EBC469; }
@media (max-width: 600px) {
  .halloween .categories-grid { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .halloween .category-card { padding: 26px; }
  .halloween .category-card .category-desc { display: block; }
  .halloween .category-card .category-perks { display: flex; }
  .halloween .category-card .category-title { font-size: 1.5rem; }
}
.halloween :is(.cart-checkout-btn,.login-submit-btn) { background: #FF8A24; color: #211309; }
.halloween :is(.cart-checkout-btn,.login-submit-btn):hover { background: #FFA54F; box-shadow: 0 0 24px #FF8A2438; }
.halloween .upgrade-card { min-width: 0; width: 100%; }
.halloween .upgrade-card > * { min-width: 0; max-width: 100%; }
.halloween .upgrade-ranks { flex-wrap: wrap; }
.halloween :is(.cmp-table .cmp-col--featured,.cmp-table .cmp-col--rainbow) { background: #291E35; }
.halloween .cmp-section td { background: #251D30; color: #C5A3F4; }
.halloween :is(code,.grade-perks code,.cmp-table code) { background: #34283F; color: #E3D1FA; }
.halloween .cmp-grade-price { color: #F6F0E8; }
@media (max-width: 700px) {
 .halloween .cmp-wrap { overflow-x: auto; max-width: 100%; overscroll-behavior-x: contain; }
 .halloween .cmp-table { min-width: 680px; table-layout: fixed; }
 .halloween .cmp-badge { white-space: nowrap; }
 .halloween .upgrade-card { padding: 24px 16px; }
}
.halloween .upgrades-grid { min-width: 0; grid-template-columns: repeat(auto-fit,minmax(min(100%,320px),1fr)); }
.halloween .cmp-category td { background: #251D30; color: #C5A3F4; }
@media (max-width: 800px) {
 .halloween .hero-left { min-width: 0; width: 100%; }
 .halloween .hero h1 { font-size: clamp(2rem,8vw,3.8rem); max-width: 100%; }
 .halloween .hero-ip { max-width: 100%; min-width: 0; padding: 10px; gap: 6px; }
 .halloween .hero-ip-text { min-width: 0; overflow-wrap: anywhere; font-size: .8rem; }
 .halloween .hero-ip-label { padding: 2px 6px; }
 .halloween .hero-ctas-row { max-width: 100%; }
}

/* Block-shaped controls and lantern movement. */
.halloween .hero { border-radius: 8px; }
.halloween .cta-join { border-radius: 5px; }
@keyframes mc-lantern-sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }


/* Minecraft night scene, side view: block columns, pumpkins, lanterns. */
.halloween .hero { background: linear-gradient(180deg,#07070F 0%,#120E24 45%,#2A1A3A 78%,#3A2132 100%); }
.halloween .hero-logo-wrap::before { background: radial-gradient(ellipse,#FF8A2433,#A879ED18 45%,transparent 70%); }
.halloween-title-glow { color: #FF7A1A; text-shadow: 3px 3px #5A2410,0 0 28px #FF6A0055; }
.halloween .hero { container-type: inline-size; }
.mc-night { --b: calc((100cqw + 128px) / 20); }
.mc-stars { position: absolute; top: 40px; left: 6%; width: 4px; height: 4px; background: #E6E2F2; box-shadow: 90px 30px #E6E2F2,210px -14px #CFC8E6,330px 52px #E6E2F2,470px 8px #B9B0D4,560px 70px #E6E2F2,690px 24px #CFC8E6,800px 92px #E6E2F2,930px -6px #B9B0D4,1040px 60px #E6E2F2,1150px 18px #CFC8E6,140px 120px #B9B0D4,400px 150px #CFC8E6,640px 140px #B9B0D4,880px 170px #CFC8E6,1100px 140px #B9B0D4; animation: mc-twinkle 4s steps(2) infinite; }
.mc-moon { position: absolute; right: 9%; top: 46px; width: 80px; height: 80px; background: #EDEAD5; box-shadow: 0 0 0 8px #EDEAD512,0 0 60px #EDEAD522; image-rendering: pixelated; }
.mc-moon::before { content: ''; position: absolute; left: 10px; top: 10px; width: 20px; height: 10px; background: #C9C6B2; box-shadow: 40px 0 #C9C6B2,40px 10px #D9D6C2,10px 30px #D9D6C2,0 40px #C9C6B2,30px 50px #C9C6B2,50px 40px #D9D6C2; }
.mc-terrain { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end; }
.mc-terrain > i { position: relative; flex: 0 0 var(--b); height: calc(var(--h) * var(--b)); background: linear-gradient(#0A061499,#0A0614CC), url('img/blocks/grass_block_side.png') top / var(--b) var(--b) no-repeat, url('img/blocks/dirt.png') top / var(--b) var(--b) repeat; image-rendering: pixelated; box-shadow: inset 0 1px #ffffff14; }
.mc-terrain > i.mc-soul { background: linear-gradient(#0A061488,#0A0614BB), url('img/blocks/soul_soil.png') top / var(--b) var(--b) repeat; }
.mc-terrain > i.mc-stone { background: linear-gradient(#0A061499,#0A0614CC), url('img/blocks/grass_block_side.png') top / var(--b) var(--b) no-repeat, url('img/blocks/stone.png') top / var(--b) var(--b) repeat; }
.mc-on { position: absolute; bottom: 100%; left: 0; width: var(--b); height: var(--b); image-rendering: pixelated; }
.mc-block { background: linear-gradient(#0A061466,#0A061499), url('img/blocks/pumpkin_side.png') center / 100% 100%; }
.mc-block--carved { background: linear-gradient(#0A061455,#0A061488), url('img/blocks/carved_pumpkin.png') center / 100% 100%; }
.mc-block--jack { background: url('img/blocks/jack_o_lantern.png') center / 100% 100%; box-shadow: 0 0 34px 10px #FF8A2440; animation: mc-flicker 3s steps(3) infinite; }
.mc-block--stone { background: linear-gradient(#0A061477,#0A0614AA), url('img/blocks/cobblestone.png') top / var(--b) var(--b); height: calc(var(--b) * .5); }
.mc-block--jack::after { content: ''; position: absolute; left: 50%; bottom: -10px; width: calc(var(--b) * 4); height: calc(var(--b) * 2.4); transform: translateX(-50%); background: radial-gradient(ellipse at 50% 70%,#FF8A2433,transparent 65%); pointer-events: none; z-index: -1; }
.mc-post { position: absolute; bottom: 100%; left: calc(var(--b) * .375); width: calc(var(--b) * .25); height: calc(var(--b) * .875); background: linear-gradient(#0A061477,#0A0614AA), url('img/blocks/oak_planks.png') center / var(--b) var(--b); image-rendering: pixelated; }
.mc-post img, .mc-lamp { position: absolute; bottom: 100%; left: 50%; width: var(--b); max-width: none; height: var(--b); transform: translateX(-50%); image-rendering: pixelated; filter: drop-shadow(0 0 12px #FFAA4AAA); }
.mc-lamp { left: 50%; }
.mc-lamp--soul, .mc-post .mc-lamp--soul { filter: drop-shadow(0 0 12px #6DE0E6AA); }
.mc-candle { position: absolute; bottom: 100%; left: 50%; width: var(--b); max-width: none; height: var(--b); transform: translateX(-50%); image-rendering: pixelated; filter: drop-shadow(0 0 8px #FFB87599); }
.mc-eyes { position: absolute; width: 18px; height: 4px; border-left: 5px solid #E0242E; border-right: 5px solid #E0242E; box-sizing: border-box; animation: halloween-blink 6s steps(1) infinite; }
.mc-eyes--one { left: 46%; bottom: 74px; }
.mc-eyes--two { left: 3%; bottom: 140px; animation-delay: -2.5s; }
.halloween-bat { background: #2A2433; opacity: .9; }
@keyframes mc-twinkle { 50% { opacity: .6; } }
@keyframes mc-flicker { 0%,100% { filter: brightness(1); } 33% { filter: brightness(1.08); } 66% { filter: brightness(.94); } }
@keyframes halloween-blink { 0%,44%,52%,100% { opacity: 1; } 45%,51% { opacity: 0; } }
@media (max-width: 800px) {
 .mc-night { --b: calc((100cqw + 48px) / 10); }
 .mc-moon { right: 6%; top: 18px; width: 52px; height: 52px; }
 .mc-moon::before { left: 6px; top: 6px; width: 14px; height: 7px; box-shadow: 26px 0 #C9C6B2,26px 7px #D9D6C2,7px 20px #D9D6C2,0 26px #C9C6B2,20px 32px #C9C6B2; }
 .mc-eyes--two, .halloween-bat--two { display: none; }
 .halloween .hero-right { bottom: 150px; width: 110px; right: calc(50% - 55px); }
}
@media (prefers-reduced-motion: reduce) { html:not(.fx-force) :is(.mc-stars,.mc-block--jack,.mc-eyes) { animation: none; } }
.halloween .promo-bar { background: #281C33; border-bottom: 1px solid #70442A; color: #F6F0E8; text-shadow: none; }
.halloween .promo-label { background: #FF8A24; color: #211309; border-radius: 3px; }
.halloween .promo-timer { color: #FFB875; opacity: 1; }
.halloween .promo-price-new { color: #FFAA60; }
@media (max-width: 480px) {
 .halloween .promo-msg { display: block; width: 100%; text-align: center; font-size: .7rem; order: 2; }
 .halloween .promo-bar { padding: 7px 12px; gap: 4px 10px; }
}

.halloween .bundle-card { position: relative; }
.halloween .bundle-new .promo-price-old { font-size: .6em; margin-right: 8px; }

/* Promo Halloween : un seul badge, collé au prix */
.halloween .promo-inline-badge { display: block; width: fit-content; margin: 6px auto 0; padding: 3px 10px; border-radius: 999px; background: linear-gradient(90deg, #b8478f, #f4a261); color: #fff; -webkit-text-fill-color: #fff; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; line-height: 1.4; white-space: nowrap; }
.halloween .bundle-new .promo-inline-badge { display: inline-block; margin: 0 0 0 8px; vertical-align: middle; font-size: 0.7rem; }
.halloween .bundle-prices:has(.promo-price-new) > span:first-child,
.halloween .bundle-prices:has(.promo-price-new) > div > .bundle-save { display: none; }
.halloween .cart-promo-mini, .halloween .qty-promo-badge { white-space: nowrap; }
.halloween .cmp-grade-price .promo-price-new { font-size: 1em; font-weight: 900; color: #FFAA60; }
.halloween .cmp-grade-price .promo-price-old { font-size: .55em; margin-right: 6px; }
.halloween .cmp-grade-price .promo-inline-badge { font-size: 0.7rem; font-weight: 800; color: #fff; }

/* Crate Halloween */
.key-card--halloween,
.keys-grid--crates .key-card--halloween { border-color: rgba(246,108,49,0.4); }
.key-card--halloween:hover,
.keys-grid--crates .key-card--halloween:hover { border-color: #f66c31; box-shadow: 0 14px 32px rgba(246,108,49,0.28); }
.key-dot--halloween,
.keys-grid--crates .key-dot--halloween { background: rgba(246,108,49,0.18); }
.keys-grid--crates .key-card--halloween .key-name { color: #f66c31; }
[data-theme="dark"] .key-card--halloween { border-color: rgba(246,108,49,0.45); }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .key-card--halloween { border-color: rgba(246,108,49,0.45); }
}

/* Crates : les 5 cartes sur une seule ligne sur grand écran */
@media (min-width: 1100px) {
  .keys-grid--crates { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 1280px; gap: 16px; }
  .keys-grid--crates .key-card { padding: 30px 16px 24px; }
}
