/* ===== Calendrier de l'Avent (js/avent.js, préfixe av-) : fenêtre crème à taille fixe, 25 portes, chronos ===== */
#avent-dialog { width: min(96vw, 1120px); height: min(92dvh, 860px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 22px;
  background: transparent; color: #3a2414; overflow: visible; }
/* Fond : village sous la neige (img/noel/fond_avent.webp, illustration fournie par l'utilisateur) derrière la fenêtre, légèrement voilé */
#avent-dialog::backdrop { background: linear-gradient(rgba(20, 40, 70, .28), rgba(20, 40, 70, .28)), url("../img/noel/fond_avent.webp") center / cover no-repeat, #cfe3f6; }
html.tel #avent-dialog::backdrop { background: url("../img/noel/fond_avent_petit.webp") center / cover no-repeat, #cfe3f6; }
.av-box { position: relative; height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 16px 18px 18px; box-sizing: border-box; isolation: isolate;
  border-radius: 22px; overflow: hidden; box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
  /* Fond d'hiver : ciel bleu glacier vers le blanc, congères en bas */
  background: radial-gradient(120% 16% at 18% 104%, #fff 60%, transparent 61%), radial-gradient(110% 14% at 85% 104%, #f4f9ff 60%, transparent 61%),
    linear-gradient(rgba(255, 255, 255, .25), rgba(255, 255, 255, .45)), url("../img/noel/fond_avent.webp") center 30% / 260% auto no-repeat, linear-gradient(#b8d9f7, #dcedfd 38%, #f6fbff 72%, #fff); }
/* Neige qui tombe : points blancs irréguliers (trois tailles, trois trames décalées) */
.av-box::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, #fff 0 2px, transparent 2.6px), radial-gradient(circle, rgba(255, 255, 255, .85) 0 1.4px, transparent 2px), radial-gradient(circle, #fff 0 3.2px, transparent 3.8px);
  background-size: 97px 89px, 61px 73px, 163px 141px; background-position: 0 0, 31px 43px, 77px 19px;
  -webkit-mask: linear-gradient(#000 0 85%, transparent); mask: linear-gradient(#000 0 85%, transparent); }
/* Décor : Melina et Mila en tenue de Noël de part et d'autre de la fenêtre, seulement s'il y a la place */
/* Ailes : héros en tenue de Noël sur le fond de la page, derrière la fenêtre (positions de tools/avent_ailes.py, pour une aile de 400 px) */
.av-wings { display: none; position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
@media (min-width: 1760px) and (min-height: 760px) { html:not(.tel) .av-wings { display: block; } }
#avent-dialog > .av-box { z-index: 2; }
.av-hero { position: absolute; height: calc(100% * var(--h) * var(--b)); bottom: calc(100% * (.988 - var(--p))); transform: translateX(-50%); }
.av-hero.l { left: calc(var(--k) * (100% - min(96%, 1120px)) / 800); }
.av-hero.r { left: calc(100% - var(--k) * (100% - min(96%, 1120px)) / 800); }
.av-hero.loin { --h: .16; --p: .55; } .av-hero.fond { --h: .22; --p: .67; } .av-hero.milieu { --h: .30; --p: .80; } .av-hero.devant { --h: .45; --p: 1.05; }
.av-hero img { display: block; height: 100%; width: auto; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)); }
.av-hero.loin img { filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)) saturate(.9); }
.av-hero.new img { animation: avArrive 1.2s cubic-bezier(.2, 1.4, .4, 1) both; transform-origin: 50% 100%; }
@keyframes avArrive { 0% { opacity: 0; transform: translateY(18%) scale(.85); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
.av-head, .av-grid, .av-chrs, .av-skins { position: relative; z-index: 1; }
/* En-tête : banderole rouge de Noël (ruban du jeu img/ui/ruban.png teinté, reflet qui passe), houx et étoiles */
.av-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 48px; }
.av-banner { position: relative; width: min(500px, calc(100% - 96px)); /* jamais sous la croix de fermeture */ aspect-ratio: 512 / 94; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 5px 4px rgba(70, 20, 5, .4)); }
.av-banner::before, .av-banner::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url("../img/ui/ruban.png") center / 100% 100% no-repeat; mask: url("../img/ui/ruban.png") center / 100% 100% no-repeat; }
.av-banner::before { background: url("../img/ui/ruban.png") center / 100% 100% no-repeat, linear-gradient(#e8333a, #b31d26 55%, #8e1219); background-blend-mode: multiply; }
.av-banner::after { background: linear-gradient(105deg, transparent 40%, rgba(255, 240, 210, .45) 50%, transparent 60%) -200% 0 / 200% 100% no-repeat; animation: avShine 6s ease-in-out 1s infinite; }
@keyframes avShine { 0% { background-position: -200% 0; } 35%, 100% { background-position: 200% 0; } }
.av-banner h2 { position: absolute; z-index: 1; left: 50%; top: 42%; transform: translate(-50%, calc(-50% + var(--av-dy, 0px))); margin: 0; font: 28px/1 var(--font-title); color: #fff6dc; white-space: nowrap;
  -webkit-text-stroke: 5px #4a0c0a; paint-order: stroke fill; text-shadow: 0 3px 0 #4a0c0a; letter-spacing: .5px; }
.av-holly { position: absolute; top: 2%; width: 13%; max-width: 70px; height: auto; z-index: 2; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }
.av-holly.l { left: 9%; transform: rotate(-18deg); }
.av-holly.r { right: 9%; transform: scaleX(-1) rotate(-18deg); }
.av-star { position: absolute; width: 20px; height: 20px; z-index: 2; pointer-events: none; animation: nlTwinkle 2.6s ease-in-out infinite; }
.av-star.s1 { left: 30%; top: -4%; } .av-star.s2 { right: 28%; top: -10%; width: 16px; height: 16px; animation-delay: -1s; } .av-star.s3 { left: 52%; top: 66%; width: 14px; height: 14px; animation-delay: -1.8s; }
.av-head p { margin: 0; font-size: 16px; color: #2f4a6b; text-align: center; }
.av-head .btn.close { position: absolute; top: 0; right: 0; }

/* Grille : 7 colonnes, la case 25 occupe 2 × 2 */
.av-grid { flex: 1; min-height: 0; overflow: auto; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(104px, 1fr); gap: 10px; padding: 4px; }
.av-door { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: 16px 6px 30px;
  border: 0; border-radius: 14px; cursor: pointer; color: #fff6dc; font: inherit; text-align: center; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .16), transparent 65%), linear-gradient(160deg, #b0262a, #7d1418);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), 0 3px 8px rgba(70, 30, 10, .3); transition: transform .15s, filter .15s; }
.av-door:nth-child(2n) { background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .14), transparent 65%), linear-gradient(160deg, #23704a, #124a2f); }
.av-door:nth-child(3n) { background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .16), transparent 65%), linear-gradient(160deg, #2b5aa0, #1a3768); }
.av-door::before { content: ''; position: absolute; inset: 6px; border-radius: 10px; border: 2px dashed rgba(255, 236, 180, .35); pointer-events: none; }
.av-door.big { grid-column: 6 / 8; grid-row: 3 / 5; background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .3), transparent 60%), linear-gradient(160deg, #e2a92c, #a8641a); }
.av-door:hover:not(.lock) { transform: translateY(-2px); filter: brightness(1.08); }
.av-door:focus-visible { outline: 3px solid #ffd76a; outline-offset: 2px; }
.av-num { position: absolute; top: 6px; left: 10px; font: 24px/1 var(--font-title); color: #ffe7a0; -webkit-text-stroke: 4px #3a1608; paint-order: stroke fill; }
.av-door.big .av-num { font-size: 40px; top: 10px; left: 14px; }
.av-mys { font: 46px/1 var(--font-title); color: rgba(255, 240, 200, .9); -webkit-text-stroke: 4px rgba(40, 10, 4, .6); paint-order: stroke fill; }
.av-ico { display: flex; justify-content: center; align-items: center; gap: 4px; min-height: 48px; }
.av-ico img, .av-ico .ii { width: 46px; height: 46px; object-fit: contain; }
.av-door.big .av-ico img, .av-door.big .av-ico .ii { width: 76px; height: 76px; }
.av-ico .ui-ico { width: 40px; height: 40px; }
.av-lbl { flex: none; font-size: 14px; line-height: 1.2; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); }
.av-lbl .qname { text-shadow: 0 1px 2px #000; }
.av-door.big .av-lbl { font-size: 18px; }
.av-tag { position: absolute; left: 50%; bottom: 7px; transform: translateX(-50%); padding: 2px 10px; border-radius: 999px; font-size: 13px; line-height: 18px; white-space: nowrap;
  background: rgba(0, 0, 0, .35); color: #fff2d0; }
.av-tag.go { background: #ffd76a; color: #5a2a06; font-weight: 700; }
.av-tag.ok { background: rgba(255, 255, 255, .85); color: #2f6b3a; font-weight: 700; }
.av-door.lock { cursor: default; filter: saturate(.55) brightness(.82); }
.av-door.lock.tease { filter: saturate(.8) brightness(.92); }
.av-door.ready { animation: avGlow 1.8s ease-in-out infinite; }
.av-door.got { filter: saturate(.75); }
.av-door.got::after { content: ''; position: absolute; inset: 0; background: rgba(255, 246, 220, .14); pointer-events: none; }
@keyframes avGlow { 0%, 100% { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), 0 0 0 0 rgba(255, 215, 106, .0); } 50% { box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), 0 0 0 5px rgba(255, 215, 106, .85), 0 0 22px rgba(255, 200, 80, .8); } }
.av-q img { filter: drop-shadow(0 0 6px var(--q)); }
.av-pk { width: 54px; height: 54px; object-fit: contain; }

/* Chronos */
/* Chronos et Tenues : même grille (titre de largeur fixe + 3 colonnes égales), pastilles de même largeur d'une ligne à l'autre */
.av-chrs, .av-skins { display: grid; grid-template-columns: 112px repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 10px; }
.av-chrs h3 { margin: 0; align-self: center; font: 20px/1 var(--font-title); color: #b31d26; -webkit-text-stroke: 3px #fff; paint-order: stroke fill; }
.av-chr { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 8px; row-gap: 2px;
  padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .78); box-shadow: 0 2px 6px rgba(40, 80, 130, .15); min-height: 56px; }
.av-chr.on { background: #fff3cf; }
.av-ci { width: 32px; height: 32px; }
.av-chr .av-ci { grid-row: span 2; }
.av-chn { font-weight: 700; font-size: 15px; line-height: 1.2; }
.av-chs { grid-column: 2; font-size: 14px; color: #4a5f78; display: flex; flex-wrap: wrap; gap: 0 8px; }
.av-chs small { font-size: 13px; }
.av-clock { color: #2f6b3a; font-variant-numeric: tabular-nums; }
.av-chr .btn { grid-column: 3; grid-row: 1 / span 2; white-space: nowrap; }

/* Choix d'un objet et case ouverte : par-dessus la grille (la fenêtre garde sa taille) */
.av-over { position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 30, 60, .5); border-radius: 22px; }
.av-pop { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; max-height: 100%; overflow-y: auto; box-sizing: border-box;
  padding: 22px 24px; border-radius: 18px; background: linear-gradient(#eaf4fe, #fff 45%); box-shadow: 0 12px 40px rgba(0, 0, 0, .5); text-align: center; animation: avPop .35s cubic-bezier(.2, 1.5, .4, 1) both; }
.av-pop h3 { margin: 0; font: 26px/1.15 var(--font-title); color: #ffe7a0; -webkit-text-stroke: 5px #7a1414; paint-order: stroke fill; }
.av-pop p { margin: 0; font-size: 16px; }
@keyframes avPop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.av-cards { display: grid; grid-template-columns: repeat(3, minmax(150px, 210px)); gap: 12px; }
.av-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border: 0; border-radius: 14px; cursor: pointer; font: inherit; color: #3a2414;
  background: rgba(70, 130, 200, .12); transition: transform .15s, background .15s; }
.av-card:hover, .av-card:focus-visible { transform: translateY(-3px); background: #fff3cf; outline: none; }
.av-card .qname, .av-got .qname { font-size: 17px; line-height: 1.2; -webkit-text-stroke: 3px #3a1608; paint-order: stroke fill; text-shadow: none; }
.av-card small { font-size: 14px; color: #4a5f78; }
.av-it { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 10px; border: 3px solid var(--q, transparent); background: rgba(0, 0, 0, .25); }
.av-it .ii { width: 42px; height: 42px; object-fit: contain; }
.av-it.big { width: 84px; height: 84px; }
.av-it.big .ii { width: 70px; height: 70px; }
.av-win { min-width: min(460px, 100%); flex-direction: row; align-items: flex-end; gap: 18px; text-align: center; }
.av-wc { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.av-pal { height: min(52vh, 420px); width: auto; flex: none; margin: -6px 0 -22px -6px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.av-sk { width: 46px; height: 46px; object-fit: contain; }
/* Tenues de Noël (calendrier et Options › Profil) */
.av-skins h3 { margin: 0; align-self: center; font: 20px/1 var(--font-title); color: #b31d26; -webkit-text-stroke: 3px #fff; paint-order: stroke fill; }
.av-skin { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 56px; box-sizing: border-box; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .78); box-shadow: 0 2px 6px rgba(40, 80, 130, .15); }
.av-skin.on { background: #fff3cf; }
.av-skin img { width: 44px; height: 44px; object-fit: contain; }
.av-skin span { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.av-skin .btn { white-space: nowrap; }
.av-skin small { font-size: 14px; opacity: .8; }
.av-skins.op { display: flex; flex-wrap: wrap; }
.av-skins.mini { grid-template-columns: 112px minmax(0, 1fr); }
.av-skl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.av-skc { width: 46px; height: 46px; padding: 3px; border: 2px solid transparent; border-radius: 12px; background: rgba(255, 255, 255, .6); cursor: pointer; box-shadow: 0 2px 5px rgba(40, 80, 130, .15); display: flex; align-items: center; justify-content: center; }
.av-skc img { width: 100%; height: 100%; object-fit: contain; filter: saturate(.5); opacity: .75; }
.av-skc.on { background: #fff3cf; border-color: #d9a43a; }
.av-skc.on img { filter: none; opacity: 1; }
.av-skc:hover { transform: translateY(-1px); }
.av-skc:focus-visible { outline: 3px solid #ffd76a; outline-offset: 2px; }
html.dark-win .av-skc { background: var(--dw-card); }
.av-skins.op .av-skin { background: rgba(255, 226, 170, .1); }
.av-got { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: min(380px, 100%); }
.av-got li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(70, 130, 200, .12); text-align: left; font-size: 16px; }
.av-got li > img, .av-got li > .ii, .av-got .ui-ico { width: 40px; height: 40px; object-fit: contain; flex: none; }
.av-alt { color: #4a5f78; max-width: 440px; }

/* En-tête : bouton et chronos actifs */
.av-btn { position: relative; }
.av-hud { display: flex; gap: 8px; align-items: center; }
.av-hud[hidden] { display: none; }
.av-hc { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.av-hc .av-ci { width: 22px; height: 22px; }

/* Fenêtres étroites et téléphone */
@media (max-width: 900px) {
  .av-chrs, .av-skins { grid-template-columns: 1fr; }
  .av-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .av-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(92px, auto); }
  .av-door.big { grid-column: 3 / 5; grid-row: 6 / 8; }
}
@media (max-width: 600px), (max-height: 520px) {
  #avent-dialog, .av-box { width: 100vw; height: 100dvh; border-radius: 0; }
  .av-over { border-radius: 0; }
  .av-box { padding: 12px 10px; gap: 8px; }
  .av-banner h2 { font-size: 19px; -webkit-text-stroke: 4px #4a0c0a; }
  .av-holly { width: 11%; top: 6%; }
  .av-holly.l { left: 0; } .av-holly.r { right: 0; }
  .av-head { padding: 0 40px; }
  .av-head p { font-size: 14px; }
  .av-grid { gap: 8px; }
  .av-ico img, .av-ico .ii { width: 38px; height: 38px; }
  .av-door.big .av-ico img, .av-door.big .av-ico .ii { width: 44px; height: 44px; }
  .av-door.big .av-num { font-size: 30px; }
  .av-door.big .av-lbl { font-size: 15px; }
  .av-chrs h3, .av-skins h3 { font-size: 17px; }
  .av-chn { font-size: 14px; }
  .av-lbl { font-size: 13px; }
  .av-cards { grid-template-columns: 1fr; }
  .av-pal { display: none; }
  .av-card { flex-direction: row; text-align: left; flex-wrap: wrap; }
  .av-chr { min-height: 48px; padding: 6px 8px; }
}
html.tel #avent-dialog, html.tel .av-box { width: 100vw; height: 100dvh; border-radius: 0; }
html.tel .av-pal { display: none; }
/* Téléphone et petites fenêtres : toute la fenêtre défile, la grille garde sa taille */
@media (max-width: 900px), (max-height: 800px) { .av-box { overflow-y: auto; } .av-head { position: sticky; top: -12px; z-index: 3; background: linear-gradient(#b8d9f7, #c3dff8); box-shadow: 0 6px 8px -6px rgba(40, 80, 130, .35); padding: 6px 0; } .av-grid { flex: none; overflow: visible; } .av-over { position: fixed; } }
html.tel .av-box { overflow-y: auto; } html.tel .av-head { position: sticky; top: -12px; z-index: 3; background: linear-gradient(#b8d9f7, #c3dff8); box-shadow: 0 6px 8px -6px rgba(40, 80, 130, .35); padding: 6px 0; } html.tel.dark-win .av-head { background: var(--dw-bg); } html.tel .av-grid { flex: none; overflow: visible; } html.tel .av-over { position: fixed; }
html.tel .av-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(92px, auto); }
html.tel .av-door.big { grid-column: 3 / 5; grid-row: 6 / 8; }
html.tel .av-door.big .av-ico img, html.tel .av-door.big .av-ico .ii { width: 44px; height: 44px; }
@media (prefers-reduced-motion: reduce) { .av-door.ready, .av-pop, .av-banner::after, .av-star { animation: none; } }
html.reduce-motion .av-door.ready, html.reduce-motion .av-pop, html.reduce-motion .av-banner::after, html.reduce-motion .av-star { animation: none; }
/* Fenêtres sombres (option darkWin) */
html.dark-win .av-box, html.dark-win .av-pop { background: linear-gradient(#1c2a3d, #24364d); color: var(--dw-ink); color-scheme: dark; }
html.dark-win .av-head p, html.dark-win .av-chs, html.dark-win .av-card small, html.dark-win .av-alt { color: var(--dw-ink-3); }
html.dark-win .av-chrs h3, html.dark-win .av-skins h3 { color: var(--dw-accent); }
html.dark-win .av-chr, html.dark-win .av-card, html.dark-win .av-got li { background: var(--dw-card); color: var(--dw-ink); }
html.dark-win .av-skin { background: var(--dw-card); }
html.dark-win .av-chr.on { background: var(--dw-sel); }
html.dark-win .av-clock { color: var(--dw-ok); }
/* Case 25 : ses trois icônes rétrécissent avec la case (jamais de débordement) */
.av-door.big .av-ico { width: 100%; gap: 6px; }
.av-door.big .av-ico > *, .av-door.big .av-ico > img, .av-door.big .av-ico > .ii { flex: 0 1 76px; min-width: 0; width: auto; height: auto; aspect-ratio: 1; object-fit: contain; box-sizing: border-box; }
.av-door.big .av-ico > .av-it .ii { width: 80%; height: 80%; }
.av-door.big .av-ico > span img { width: 100%; height: 100%; object-fit: contain; }

/* Neige qui tombe sur toute la scène (devant le décor, derrière la fenêtre) */
.av-snowfall { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.av-snowfall .nl-flake { filter: drop-shadow(0 0 3px rgba(150, 190, 240, .9)); }
#avent-dialog > .av-box { z-index: 2; }
/* Boule de neige de Melina vers Mila : X linéaire, Y en cloche (monte puis retombe), flocon qui tourne */
.av-ball { position: absolute; z-index: 4; width: 0; height: 0; pointer-events: none; animation: avBallX 1.5s linear forwards; }
.av-ball i { position: absolute; display: block; animation: avBallY 1.5s forwards; }
.av-ball i::before { content: ""; position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 45%, #dcefff 70%, rgba(190, 225, 255, 0) 72%); box-shadow: 0 0 18px 6px rgba(200, 230, 255, .85); }
.av-ball img { position: relative; display: block; width: 58px; height: 58px; margin: -29px 0 0 -29px; filter: drop-shadow(0 0 6px #9fd0ff); animation: avSpin .6s linear infinite; }
@keyframes avBallX { to { transform: translateX(var(--dx)); } }
@keyframes avBallY { 0% { transform: translateY(0); animation-timing-function: cubic-bezier(.2, .7, .4, 1); } 45% { transform: translateY(var(--up)); animation-timing-function: cubic-bezier(.6, 0, .8, .3); } 100% { transform: translateY(var(--dy)); } }
@keyframes avSpin { to { transform: rotate(360deg); } }
.av-puff { position: absolute; z-index: 4; width: 0; height: 0; pointer-events: none; }
.av-puff img { position: absolute; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); animation: avPuff .9s ease-out forwards; filter: drop-shadow(0 0 3px #bfe0ff); }
@keyframes avPuff { from { transform: rotate(var(--a)) translateX(0); opacity: 1; } to { transform: rotate(var(--a)) translateX(var(--d)) translateY(20px); opacity: 0; } }
.av-deco.r.hit { animation: avHit .6s ease-out; transform-origin: 50% 100%; }
@keyframes avHit { 0%, 100% { transform: none; } 25% { transform: rotate(3deg) translateX(6px); } 55% { transform: rotate(-2deg); } 80% { transform: rotate(1deg); } }
.av-deco.l.cast { animation: avCast .5s ease-out; transform-origin: 50% 100%; }
@keyframes avCast { 0%, 100% { transform: none; } 40% { transform: rotate(-2deg) translateY(-4px); } }
/* Tenues du calendrier au téléphone : titre au-dessus, têtes sur toute la largeur (comme les chronos) */
@media (max-width: 600px) { .av-skins.mini { grid-template-columns: 1fr; } }
html.tel .av-skins.mini { grid-template-columns: 1fr; }
.av-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
