/* Calendrier de l'Avent de Noël (21/11/2026) : client/js/avent.js. Cadres Donjon Mystère, police du jeu, neige en gros pixels. */
.avent-modal { z-index: 46; }
/* (25/11, Kiko) le calendrier tient TOUJOURS dans l'écran (la fenêtre du jeu est agrandie par --ui) : seule la liste des cases défile */
.av-box { position: relative; width: min(980px, calc(96vw / var(--ui, 1))); max-height: calc(94vh / var(--ui, 1)); display: flex; flex-direction: column; overflow: hidden; padding-bottom: 8px;
  animation: pop .35s cubic-bezier(.2,1.4,.4,1); box-shadow: 0 0 40px rgba(170, 210, 255, .35);
  background: linear-gradient(180deg, #0a1534 0%, #12244e 70%, #1a3060 100%) !important; }
.av-neige { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; pointer-events: none; z-index: 0; }
.av-haut, .av-scroll, .av-bas { position: relative; z-index: 1; }
.av-titre { margin: 0 !important; text-align: center; color: var(--gold); text-shadow: 0 3px 0 #5a2b00; }
.av-flo { display: inline-block; animation: avTourne 6s linear infinite; }
@keyframes avTourne { to { transform: rotate(360deg); } }
.av-sous { margin: 2px 0 6px; text-align: center; font-size: 20px; color: var(--txt); }
.av-sous .muted { display: block; font-size: 16px; }
.av-scroll { overflow: auto; flex: 1; padding: 6px 0 4px; }
.av-chemin { position: relative; margin: 0 auto; }
.av-svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.av-case { position: absolute; width: 92px; height: 92px; display: flex; align-items: center; justify-content: center;
  border: 8px solid transparent; border-image: url('assets/ui/cadres/cadre1_blue_translucide.png') 8 fill / 8px stretch; image-rendering: pixelated; }
.av-case.noel { width: 140px; height: 120px; border-image-source: url('assets/ui/cadres/cadre1_yellow_translucide.png'); }
.av-num { position: absolute; left: 0; top: -6px; font-size: 20px; color: var(--dim); text-shadow: 0 2px 0 #000; z-index: 2; }
.av-toit { position: absolute; left: -6px; right: -6px; top: -12px; height: 10px; pointer-events: none;
  background: radial-gradient(circle at 10% 100%, #fff 6px, transparent 7px), radial-gradient(circle at 35% 100%, #eaf3ff 8px, transparent 9px),
    radial-gradient(circle at 62% 100%, #fff 7px, transparent 8px), radial-gradient(circle at 88% 100%, #eaf3ff 6px, transparent 7px); }
.av-cadeau { position: relative; width: 72px; height: 60px; }
.av-boite, .av-couv { position: absolute; left: 50%; background-size: 100% 100%; image-rendering: pixelated; transform-origin: 50% 100%; }
.av-boite { bottom: 0; width: 56px; height: 42px; margin-left: -28px; }
.av-couv { bottom: 35px; width: 63px; height: 32px; margin-left: -31px; }
.av-case.rouge .av-boite { width: 63px; margin-left: -31px; } .av-case.rouge .av-couv { width: 70px; margin-left: -35px; }
.av-case.noel .av-cadeau { width: 96px; height: 76px; } .av-case.noel .av-boite { width: 80px; height: 48px; margin-left: -40px; } .av-case.noel .av-couv { width: 88px; height: 36px; margin-left: -44px; bottom: 40px; }
.av-lot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; opacity: 0; pointer-events: none; }
.av-lot span { font-size: 16px; line-height: 1; text-shadow: 0 2px 0 #000; }
.av-coche { position: absolute; right: -10px; bottom: -12px; filter: drop-shadow(0 2px 0 #000); }
.av-case.futur .av-cadeau { filter: grayscale(1) brightness(.55) sepia(.3) hue-rotate(180deg); }
.av-case.futur .av-num::after { content: ' ?'; color: #6b7fb3; }
.av-case.passe { filter: saturate(.75) brightness(.88); }
.av-case.passe .av-lot { opacity: 1; }
.av-case.auj, .av-case.retard { cursor: pointer; border-image-source: url('assets/ui/cadres/cadre1_yellow_translucide.png'); }
.av-case.auj { animation: avSaute 1.1s steps(2, end) infinite; box-shadow: 0 0 22px rgba(255, 211, 92, .55); }
.av-case.auj .av-num { color: var(--gold); }
.av-case.auj:hover, .av-case.auj:focus-visible, .av-case.retard:hover, .av-case.retard:focus-visible { transform: scale(1.06); outline: none; }
/* (2/12) manette / clavier : la case choisie par le curseur */
.av-case.focus { outline: 4px solid #fff; outline-offset: 3px; z-index: 3; filter: brightness(1.18); }
.av-case.auj.focus, .av-case.retard.focus { outline-color: var(--gold); transform: scale(1.06); }
.av-case.retard::after { content: '!'; position: absolute; right: -6px; top: -16px; color: #ffb35a; font-size: 32px; text-shadow: 0 3px 0 #000; animation: avSaute 1s steps(2) infinite; }
@keyframes avSaute { 50% { transform: translateY(-4px); } }
.av-case.rouge:not(.futur):not(.passe) .av-cadeau, .av-case.noel:not(.passe) .av-cadeau { animation: avAgite 2.4s ease-in-out infinite; }
@keyframes avAgite { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-7deg); } 88% { transform: rotate(7deg); } 92% { transform: rotate(-4deg); } 96% { transform: rotate(3deg); } }
/* ouverture : tremble, couvercle éjecté, boîte écrasée qui tombe, récompense derrière */
.av-case.tremble .av-cadeau { animation: avTremble .09s steps(2) infinite; }
@keyframes avTremble { 0% { transform: translate(-2px, 0) rotate(-3deg); } 100% { transform: translate(2px, -1px) rotate(3deg); } }
.av-case.ouvre .av-couv { animation: avEjecte .8s cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes avEjecte { 0% { transform: translate(0, 0) rotate(0); } 35% { transform: translate(var(--dx), -140px) rotate(var(--rot)); } 100% { transform: translate(calc(var(--dx) * 2.2), 240px) rotate(calc(var(--rot) * 2.5)); opacity: 0; } }
.av-case.ouvre .av-boite { animation: avTombe .55s .25s ease-in forwards; }
@keyframes avTombe { 0% { transform: scaleY(1); } 30% { transform: scale(1.15, .7); } 100% { transform: translateY(56px) scale(.6, .4); opacity: 0; } }
.av-case.ouvre .av-lot { animation: avSort .6s .35s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes avSort { 0% { opacity: 0; transform: scale(.2) translateY(20px); } 100% { opacity: 1; transform: scale(1); } }
.av-rayons { position: absolute; left: 50%; top: 50%; width: 200px; height: 200px; margin: -100px 0 0 -100px; pointer-events: none; opacity: 0; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 220, 110, .38) 0 10deg, transparent 10deg 30deg);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%); mask: radial-gradient(circle, #000 25%, transparent 70%); }
.av-case.ouvre .av-rayons { animation: avRayons 1.6s .3s ease-out forwards; }
.av-case.rouge.ouvre .av-rayons { background: repeating-conic-gradient(rgba(255, 90, 100, .45) 0 10deg, transparent 10deg 30deg); }
@keyframes avRayons { 0% { opacity: 0; transform: rotate(0) scale(.4); } 25% { opacity: 1; } 100% { opacity: 0; transform: rotate(90deg) scale(1.2); } }
.av-pail { position: absolute; width: 6px; height: 6px; background: var(--gold); box-shadow: 0 0 0 2px rgba(255, 211, 92, .35); pointer-events: none; z-index: 5; }
.av-pail.r { background: #ff5a6a; box-shadow: 0 0 0 2px rgba(255, 90, 106, .35); }
.av-pail.b { background: #fff; }
.av-marcheur { position: absolute; z-index: 4; image-rendering: pixelated; pointer-events: none; background-repeat: no-repeat; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .35)); }
.av-bas { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: center; font-size: 16px; color: var(--dim); padding-top: 4px; }
.av-leg i { display: inline-block; width: 12px; height: 12px; margin-right: 5px; border: 2px solid #000; vertical-align: -1px; }
.av-leg i.v { background: #40b058; } .av-leg i.r { background: #de3440; } .av-leg i.o { background: #ffce40; }
/* fenêtre des gains, par-dessus le calendrier */
.av-gains[hidden] { display: none !important; }
.av-gains { position: absolute; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(2, 4, 16, .55); } /* (25/11) au milieu, sans défilement */
.av-box.attend .av-case.auj, .av-box.attend .av-case.retard { cursor: wait; filter: saturate(.6); } /* une case à la fois */
.av-case.suivante { animation: avSuivante .9s steps(6) 3; }
@keyframes avSuivante { 50% { transform: translateY(-6px) scale(1.06); filter: brightness(1.3); } }
.av-g-fen { min-width: 320px; max-width: 92%; text-align: center; padding: 12px 16px 14px; border: 8px solid transparent;
  border-image: url('assets/ui/cadres/cadre1_yellow_translucide.png') 8 fill / 8px stretch; image-rendering: pixelated; animation: pop .35s cubic-bezier(.2,1.4,.4,1); }
.av-g-fen h3 { margin: 0 0 6px; font-size: 28px; color: var(--gold); font-weight: normal; }
.av-gains.rouge .av-g-fen h3 { color: #ff6f7d; }
.av-g-l { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-bottom: 10px; }
.av-g { display: inline-flex; align-items: center; gap: 6px; font-size: 22px; opacity: 0; transform: translateY(10px); }
.av-g.vu { animation: avG .35s cubic-bezier(.2,1.6,.4,1) forwards; }
@keyframes avG { to { opacity: 1; transform: none; } }
/* versions de Noël : invocation, fiche */
.noel-t { color: #ff8a8a; }
.evt-tab-noel .nm { color: #ffd6d6; }
.noel-nv { color: #ff7d8a !important; text-shadow: 0 0 8px rgba(255, 90, 100, .6); }
.rcard.noel-card, .reveal-card.noel-card { box-shadow: 0 0 18px rgba(255, 90, 100, .55), 0 0 30px rgba(255, 211, 92, .35); }
.noel-bar i { background: linear-gradient(90deg, #ff5a6a, #ffd35c) !important; }
.zs-cell.noel { box-shadow: 0 0 10px rgba(255, 211, 92, .6); }
/* (24/11 soir, Kiko) portail de Noël : légendaires en cadre doré (même en ombre), séparation, compteurs bien visibles */
.noel-gacha .zs-cell.leg { border: 2px solid #ffd24a; box-shadow: 0 0 0 1px #5a3c00, 0 0 9px rgba(255, 210, 74, .55); background: linear-gradient(160deg, rgba(120, 84, 10, .55), rgba(30, 20, 4, .45)); }
.noel-gacha .zs-cell.leg.noel { box-shadow: 0 0 0 1px #5a3c00, 0 0 14px rgba(255, 220, 100, .9); }
.noel-gacha .zs-sep { flex-basis: 100%; font-size: 15px; color: #ffd76a; margin: 4px 2px 0; text-shadow: 0 1px 0 #000; }
.noel-gacha .zone-strip { max-height: 260px; }
.noel-compteurs { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.noel-compteurs .nc { padding: 3px 10px; border-radius: 8px; font-size: 17px; background: rgba(10, 18, 40, .75); border: 2px solid #8fd1ff; color: #e8f4ff; }
.noel-compteurs .nc b { font-size: 19px; }
.noel-compteurs .nc-noel { border-color: #ff7b7b; } .noel-compteurs .nc-noel b { color: #ffd0d0; }
.noel-compteurs .nc-leg { border-color: #ffd24a; } .noel-compteurs .nc-leg b { color: #ffe27a; }
.noel-tog.on { border-color: #ff7b7b; }
.noel-skin-btn.on { background: linear-gradient(90deg, #8a1c2a, #2c6a3a); }
.cad-noel b { color: #ff9a9a; }
.cad-evt-noel { color: #ff9a9a !important; background: linear-gradient(90deg, rgba(220, 40, 60, 0), rgba(220, 40, 60, .22), rgba(220, 40, 60, 0)) !important; }
@media (max-width: 640px) { .av-case { transform: scale(.85); } .av-titre { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { .av-case.auj, .av-case.retard::after, .av-flo, .av-case.rouge .av-cadeau, .av-case.noel .av-cadeau { animation: none !important; } }
/* (24/11 soir) deux garanties dans le portail de Noël : versions à bonnet (rouge-or) et légendaires (or) */
.noel-garanties { display: flex; flex-direction: column; gap: 2px; }
.noel-garanties .bar { margin: 1px 0 4px; }
.noel-bar-leg i { background: linear-gradient(90deg, #ffd35c, #fff3b0) !important; box-shadow: 0 0 6px rgba(255, 211, 92, .7); }
