/* Retours de validation : série validée, top set, exercice enregistré, fin de
   repos, fin de séance. Éléments décoratifs temporaires (aria-hidden) ajoutés
   par hexBurst/hexSetFeedback. Uniquement transform et opacity. Tout est
   coupé par prefers-reduced-motion (son et vibration restent). */

/* Gerbe d'étincelles positionnée sur le bouton validé */
.hx-burst{position:fixed;z-index:13000;left:0;top:0;width:0;height:0;pointer-events:none;--hx:var(--accent);--hx-rgb:var(--accent-rgb)}
.hx-burst-gold{--hx:#fbbf24;--hx-rgb:251,191,36}
.hx-burst .hx-ring{position:absolute;left:-40px;top:-40px;width:80px;height:80px;border-radius:50%;border:3px solid var(--hx);box-shadow:0 0 18px rgba(var(--hx-rgb),.7),inset 0 0 12px rgba(var(--hx-rgb),.5);opacity:0;animation:hxRing .6s cubic-bezier(.16,1,.3,1) both}
.hx-burst .hx-ring-2{border-width:1.5px;animation-delay:.08s;animation-duration:.75s}
.hx-burst-big .hx-ring{left:-80px;top:-80px;width:160px;height:160px}
.hx-burst b{position:absolute;left:-3px;top:-3px;width:6px;height:6px;border-radius:50%;background:#fff;box-shadow:0 0 8px 2px rgba(var(--hx-rgb),.9),0 0 2px #fff;opacity:0;animation:hxSpark .7s cubic-bezier(.12,.75,.25,1) both;animation-delay:var(--d,0ms)}
.hx-burst b.hx-spark-long{left:-2px;top:-7px;width:4px;height:14px;border-radius:3px;background:linear-gradient(180deg,#fff,var(--hx))}
.hx-burst-big b{width:8px;height:8px;left:-4px;top:-4px;animation-duration:1s}
.hx-burst .hx-float{position:absolute;left:0;top:0;transform:translate(-50%,-50%);font:900 30px/1 'Barlow Condensed',sans-serif;letter-spacing:.3px;color:#fff;text-shadow:0 0 18px rgba(var(--hx-rgb),.95),0 2px 6px rgba(0,0,0,.6);white-space:nowrap;opacity:0;animation:hxFloat 1.1s cubic-bezier(.16,1,.3,1) both .05s}
.hx-burst .hx-tag{position:absolute;left:0;top:-96px;transform:translate(-50%,0);padding:6px 12px;border-radius:999px;background:linear-gradient(135deg,#fff3c4,#fbbf24 55%,#f59e0b);color:#2a1a00;font:900 14px/1 'Barlow Condensed',sans-serif;letter-spacing:1.6px;text-transform:uppercase;white-space:nowrap;box-shadow:0 8px 22px rgba(251,191,36,.55);opacity:0;animation:hxTag 1.2s cubic-bezier(.16,1,.3,1) both .1s}

/* Le bouton « encaisse » la validation : rebond + voile vert avec coche */
body.session-logger-open .sx-validate.hx-validated:not(:disabled),.sx-validate.hx-validated{animation:hxPress .55s cubic-bezier(.34,1.56,.64,1) both}
.sx-validate.hx-validated>span{animation:hxLabelOut .65s ease-out both}
.sx-validate.hx-validated::before{content:'';position:absolute;inset:0;z-index:6;border-radius:inherit;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/36px 36px no-repeat,linear-gradient(135deg,#4ade80,#16a34a);animation:hxFlash .65s ease-out both;pointer-events:none}
.tplset-check.hx-validated{animation:hxPress .55s cubic-bezier(.34,1.56,.64,1) both}
.sx-serie.hx-bump{animation:hxBump .6s ease-out both}

/* Fin de repos : le bouton s'illumine */
#v-add #quick-add-wrap .sx-rest.hx-rest-done,.sx-rest.hx-rest-done{animation:hxRestDone 1.4s ease-out both}

/* Exercice enregistré : « +X pts » central plus généreux */
.pts-pop{text-shadow:none;background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--accent) 55%,#fff));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 6px 22px rgba(var(--accent-rgb),.6))}

/* Fin de séance : les points du résumé claquent */
.summary-points.hx-summary-pop b{display:inline-block;animation:hxSummary 1.1s cubic-bezier(.34,1.56,.64,1) both}

@keyframes hxRing{0%{opacity:.95;transform:scale(.35)}100%{opacity:0;transform:scale(1.6)}}
@keyframes hxSpark{0%{opacity:0;transform:translate(0,0) rotate(var(--r,0deg)) scale(.4)}15%{opacity:1}100%{opacity:0;transform:translate(var(--x),var(--y)) rotate(var(--r,0deg)) scale(.2)}}
@keyframes hxFloat{0%{opacity:0;transform:translate(-50%,-30%) scale(.6)}20%{opacity:1;transform:translate(-50%,-90%) scale(1.15)}100%{opacity:0;transform:translate(-50%,-260%) scale(1)}}
@keyframes hxTag{0%{opacity:0;transform:translate(-50%,10px) scale(.6)}25%{opacity:1;transform:translate(-50%,-6px) scale(1.08)}75%{opacity:1;transform:translate(-50%,-10px) scale(1)}100%{opacity:0;transform:translate(-50%,-24px) scale(.96)}}
@keyframes hxPress{0%{transform:scale(1)}25%{transform:scale(.93)}60%{transform:scale(1.04)}100%{transform:scale(1)}}
@keyframes hxFlash{0%{opacity:0;transform:scale(.96)}20%{opacity:1;transform:scale(1)}70%{opacity:1}100%{opacity:0}}
@keyframes hxLabelOut{0%,70%{opacity:0}100%{opacity:1}}
@keyframes hxBump{0%{filter:brightness(1)}30%{filter:brightness(1.6) saturate(1.2)}100%{filter:brightness(1)}}
@keyframes hxRestDone{0%{box-shadow:inset 0 0 0 2px #22c55e,0 0 0 0 rgba(34,197,94,.7)}40%{box-shadow:inset 0 0 0 2px #22c55e,0 0 0 10px rgba(34,197,94,0),0 0 26px rgba(34,197,94,.55)}100%{box-shadow:inset 0 0 0 2px rgba(34,197,94,0),0 0 0 0 rgba(34,197,94,0)}}
@keyframes hxSummary{0%{transform:scale(.4);opacity:0;filter:blur(4px)}55%{transform:scale(1.18);opacity:1;filter:blur(0)}100%{transform:scale(1)}}

@media(prefers-reduced-motion:reduce){
  .hx-burst{display:none}
  .sx-validate.hx-validated,.sx-validate.hx-validated>span,.sx-validate.hx-validated::before,.tplset-check.hx-validated,.sx-serie.hx-bump,.sx-rest.hx-rest-done,.summary-points.hx-summary-pop b{animation:none!important}
  .sx-validate.hx-validated::before{display:none}
}
