/* css/combat-fx.css — animations et effets visuels du combat (degats, soin, esquive, vol de carte,
   danse, lunge, statuts, lueur de victoire, poussiere...).
   Sous-decoupe de combat.css (pur deplacement de code, V13.14). */































































































/* ================================================================ Game feel */
.hit img.sp { animation: hitFlash .4s ease-out; }
@keyframes hitFlash { 0% { filter: brightness(3) saturate(.1); translate: -5px 0; } 60% { translate: 4px 0; } 100% { filter: drop-shadow(0 8px 10px rgba(0,0,0,.6)); translate: 0 0; } }
.heal img.sp { animation: healFlash .5s ease-out; }
@keyframes healFlash { 0% { filter: drop-shadow(0 0 16px #7ccf7f) brightness(1.5); } }
.dodge img.sp { animation: dodgeFlash .35s ease-out; }
@keyframes dodgeFlash { 30% { translate: 16px 0; opacity: .5; } }
.shake { animation: shake .3s ease-in-out; }
@keyframes shake { 20% { transform: translate(-5px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, -1px); } }
.float {
  position: absolute; left: 50%; top: 30%; z-index: 5; pointer-events: none; white-space: nowrap;
  font-family: var(--font-title); font-size: clamp(1.4rem, 4dvh, 2.4rem); font-weight: 800; color: #ff6b6b;
  text-shadow: 0 2px 0 #000, 0 0 8px #000; animation: floatUp 1s ease-out forwards;
}
.float.crit { color: var(--gold-ink); font-size: clamp(1.8rem, 5dvh, 3rem); }
.float.soft { color: #cfe0ff; font-size: clamp(.9rem, 2.2dvh, 1.3rem); }
.float.heal { color: #8be08f; }
.float.dot { color: #c58bff; font-size: clamp(1rem, 3dvh, 1.6rem); }
@keyframes floatUp { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, -50px); opacity: 0; } }
@keyframes flight { from { opacity: 0; transform: translate(-50%, -30%) scale(.8); } 30% { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -80%) scale(1); } }
.near-miss::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: var(--z-screen-fx); box-shadow: inset 0 0 80px 14px rgba(163, 35, 51, .6); animation: nearMiss 1.2s ease-out; }
@keyframes nearMiss { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }





.budget.shake { animation: shake .3s ease-in-out; }




























/* Cartes posées : elles se retournent une à une au début de la révélation */
@keyframes dealIn { from { opacity: 0; transform: perspective(300px) rotateY(90deg) translateY(-8px); } to { opacity: 1; transform: none; } }







/* Légende : qui fait quoi, en clair */
.caption.on { animation: capIn .25s ease-out forwards; }
@keyframes logIn { from { opacity: 0; transform: translateY(-6px); background: color-mix(in srgb, var(--accent) 18%, transparent); } }









.mcard.flip { animation: mflip .6s cubic-bezier(.3, .7, .4, 1.2) both; animation-delay: calc(var(--i, 0) * 220ms + 350ms); }
@keyframes mflip { from { transform: rotateY(180deg); } to { transform: rotateY(0deg); } }






@keyframes capIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }



























































/* Petite vibration de temps en temps (personnage et monstres) : immobile la plupart du temps,
   un court frisson toutes les ~6 s, décalé selon l'élément pour ne pas tout faire bouger ensemble. */
@keyframes idleShiver {
  0%, 88%, 100% { translate: 0 0; rotate: 0deg; }
  89% { translate: -1.5px 0; rotate: -1.5deg; }
  90.5% { translate: 1.5px -1px; rotate: 1.5deg; }
  92% { translate: -1px 0; rotate: -1deg; }
  93.5% { translate: 1px 0; rotate: .8deg; }
  95% { translate: 0 0; rotate: 0deg; }
}



/* Entrée d'écran : cartes qui se retournent une à une, blocs qui glissent (très rapide) */
@keyframes cardFlipIn { from { opacity: 0; transform: perspective(600px) rotateY(80deg) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes blockIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.fighter.hit img.sp { animation: hitFlash .4s ease-out; }
.fighter.heal img.sp { animation: healFlash .5s ease-out; }
@keyframes fastPulse { 50% { filter: brightness(1.12); } }
.victory-glow .combat::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: var(--z-fx);
  box-shadow: inset 0 0 90px 18px rgba(243, 200, 80, .65), inset 0 0 220px 40px rgba(243, 200, 80, .25); animation: victoryGlow 2.6s ease-out both; }
@keyframes victoryGlow { 0% { opacity: 0; } 12% { opacity: 1; } 60% { opacity: .85; } 100% { opacity: 0; } }
.victory-glow .fighter.player img.sp { filter: drop-shadow(0 0 14px rgba(243, 200, 80, .9)); }


/* Saut quand on ramasse quelque chose : tout le corps décolle */
@keyframes jumpUp { 0% { transform: translateY(0); } 35% { transform: translateY(-38%); } 60% { transform: translateY(-38%); } 85% { transform: translateY(0) scaleY(.92); } 100% { transform: translateY(0); } }
/* Combat : pas en avant de profil pour frapper */
@keyframes lungeStep { 0% { translate: 0 0; } 35% { translate: 18% -2%; } 70% { translate: 18% 0; } 100% { translate: 0 0; } }
.fighter img.sp.lunge { animation: lungeStep .6s ease-in-out both !important; }



/* V12.13 : danse du personnage (touche B, victoire en combat) */
@keyframes danceHop {
  0%, 100% { transform: translateY(0) rotate(0); }
  12% { transform: translateY(-14%) rotate(-8deg); }
  25% { transform: translateY(0) rotate(0); }
  37% { transform: translateY(-14%) rotate(8deg); }
  50% { transform: translateY(0) rotate(0); }
  62% { transform: translateY(-18%) rotate(-6deg); }
  75% { transform: translateY(0) rotate(0); }
  87% { transform: translateY(-18%) rotate(6deg); }
}





/* V12.15 : le personnage danse sur la fenêtre de victoire */
.result.win img.dancer { animation: danceHop .8s ease-in-out infinite !important; transform-origin: 50% 90%; }


@keyframes relicGlow { 50% { box-shadow: 0 0 0 1px var(--gold), 0 0 36px color-mix(in srgb, var(--gold) 70%, transparent); } }



































.ent-dust { position: absolute; width: 16%; aspect-ratio: 1; margin: -8% 0 0 -8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(220, 210, 190, .55), rgba(220, 210, 190, 0)); pointer-events: none; z-index: 0; animation: dustPuff .4s ease-out forwards; }
@keyframes dustPuff { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: translateY(-40%) scale(1.6); } }
@keyframes landSquash { 0% { transform: scale(1.06, .9); } 55% { transform: scale(.97, 1.03); } 100% { transform: none; } }
#f-player img.sp.lunge { animation-duration: calc(.6s / var(--ptempo, 1)) !important; }










































































/* V12.38 : premier combat guidé (bandeau en trois étapes, halo des cartes jouables, bouton qui pulse) */
.combat .hand-zone > .ff-guide { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); background: color-mix(in srgb, var(--gold) 12%, var(--panel)); border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); box-shadow: var(--e-1); animation: ffIn .35s ease-out both; }































































/* V12.43 : les dégâts de poison ou de saignement s'affichent sous la barre de PV, plus sur le sprite. */
.float.dot { top: auto; bottom: -6px; font-family: var(--font-ui); font-size: var(--fs-md); padding: 1px 10px; border-radius: 99px; background: rgba(12, 10, 16, .78); text-shadow: none; animation: dotUnder 1s ease-out forwards; }



















/* V12.47 : survol des cartes (deck du Sanctuaire, main de combat, choix). La carte glisse de 10 px vers
   la gauche puis revient, une fois, en gardant sa levée ou son zoom de survol (animation, pas transition). */

@keyframes nudgeHand { 0% { transform: none; } 40% { transform: translate(-10px, -8px); } 100% { transform: translateY(-8px); } }
@keyframes nudgeDeck { 0% { transform: scale(1); } 40% { transform: translateX(-10px) scale(1.35); } 100% { transform: scale(1.35); } }
@keyframes nudgeChoice { 0% { transform: scale(1); } 40% { transform: translateX(-10px) scale(1.12); } 100% { transform: scale(1.12); } }
@keyframes nudgeChosen { 0% { transform: scale(1); } 40% { transform: translate(-10px, -6px) scale(1.12); } 100% { transform: translateY(-6px) scale(1.12); } }






















/* V12.50 : anneau d'or au point cliqué (souris), ajouté par main.js et retiré en fin d'animation. */
.click-ring { position: fixed; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid #E2A93B; border-radius: 50%;
  pointer-events: none; z-index: 9999; box-shadow: 0 0 6px rgba(226, 169, 59, .55); animation: clickRing .35s ease-out forwards; }
@keyframes clickRing { from { transform: scale(.4); opacity: .95; } to { transform: scale(1.6); opacity: 0; } }






















































/* T15 : éclair à la pose, case trop lointaine qui tremble. */
.pose-flash { animation: poseFlash .45s ease-out; }
@keyframes poseFlash { 0% { box-shadow: 0 0 0 0 rgba(226, 169, 59, .0); filter: brightness(1); } 30% { box-shadow: 0 0 0 3px rgba(226, 169, 59, .75), 0 0 24px rgba(226, 169, 59, .55); filter: brightness(1.25); } 100% { box-shadow: 0 0 0 0 rgba(226, 169, 59, 0); filter: brightness(1); } }























@keyframes numOut { from { opacity: .9; } to { opacity: 0; } }























@keyframes nudgeDeck58 { 0% { transform: none; } 40% { transform: translate(-4px, -4px); } 100% { transform: translateY(-4px); } }




























































































































































/* Monstre taquine : saut sec puis charge vers le joueur (il regarde a gauche : le pas va a gauche). */
@keyframes pokeHop { 0% { translate: 0 0; } 45% { translate: 0 -16%; } 70% { translate: 0 0; } 82% { translate: 0 -3%; } 100% { translate: 0 0; } }
@keyframes lungeBot { 0% { translate: 0 0; } 40% { translate: -26% -2%; } 60% { translate: -26% 0; } 100% { translate: 0 0; } }
.fighter img.sp.poke { animation: pokeHop .38s ease-out both !important; }
.fighter img.sp.lunge-bot { animation: lungeBot .5s ease-in both !important; }

















