/* Jocus V42 — animations de jeu (sobres, sur les moments qui comptent) et mode « Plateau seul ».
   Toutes les animations sont coupées si l'appareil demande moins de mouvement. */

/* ---------- points et manches ---------- */
.fx-float{position:fixed;z-index:80;transform:translate(-50%,0);font:800 19px/1 Figtree,system-ui,sans-serif;color:#f4e2c4;text-shadow:0 2px 8px #000c;pointer-events:none;animation:fxFloat 1.25s ease-out forwards}
.fx-float.me{color:#ffd77e}
@keyframes fxFloat{0%{opacity:0;transform:translate(-50%,8px) scale(.6)}16%{opacity:1;transform:translate(-50%,-6px) scale(1.18)}100%{opacity:0;transform:translate(-50%,-48px) scale(1)}}
html #app .vchip.fx-gain{animation:fxGain .9s ease-out}
@keyframes fxGain{0%{box-shadow:0 0 0 0 #ffd77eb0}30%{transform:scale(1.06);box-shadow:0 0 0 7px #ffd77e40}100%{transform:none;box-shadow:0 0 0 14px #ffd77e00}}
.fx-banner{position:fixed;left:50%;top:42%;z-index:70;transform:translate(-50%,-50%);pointer-events:none;padding:12px 26px;border-radius:999px;background:linear-gradient(160deg,#2e231cf0,#1b1410f0);border:1px solid #d9b77a;box-shadow:0 16px 44px #000a;animation:fxBanner 1.85s cubic-bezier(.2,.9,.3,1.2) forwards}
.fx-banner span{font:400 26px/1.1 Georgia,serif;color:#f1e3c8;white-space:nowrap}
.fx-banner.me{background:linear-gradient(160deg,#6b4515f2,#2b2312f0);border-color:#f3c977}
.fx-banner.me span{color:#ffd77e}
.fx-banner .cf{top:50%}
@keyframes fxBanner{0%{opacity:0;transform:translate(-50%,-50%) scale(.6)}14%{opacity:1;transform:translate(-50%,-50%) scale(1.07)}22%{transform:translate(-50%,-50%) scale(1)}80%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-64%) scale(.98)}}

/* ---------- fin de partie : la carte de résultat ---------- */
html #app .rcard.in.is-win{animation:fxWinCard .9s cubic-bezier(.2,.9,.3,1.25) both}
html #app .rcard.is-win{box-shadow:0 0 0 1px #f3c97799,0 18px 50px #0007,0 0 60px #f3c97733}
html #app .rcard.is-win .rt{animation:fxWinTitle 1.2s ease-out .15s both;color:#f6c560}
html #app .rcard.is-win .rres .rside.w{animation:fxWinner 1.6s ease-in-out .3s 2}
html #app .rcard.in.is-loss{animation:fxLossCard .7s ease-out both}
html #app .rcard.in.is-draw{animation:fxDrawCard .7s ease-out both}
@keyframes fxWinCard{0%{opacity:0;transform:translateY(24px) scale(.88)}60%{opacity:1;transform:translateY(-4px) scale(1.03)}100%{transform:none}}
@keyframes fxWinTitle{0%{letter-spacing:.3em;opacity:0;filter:blur(4px)}60%{opacity:1;filter:none}100%{letter-spacing:normal}}
@keyframes fxWinner{0%,100%{transform:none}50%{transform:translateY(-5px) scale(1.06)}}
@keyframes fxLossCard{0%{opacity:0;transform:translateY(14px)}100%{opacity:1;transform:none}}
@keyframes fxDrawCard{0%{opacity:0;transform:scale(.94)}100%{opacity:1;transform:none}}

/* ---------- pendant la partie : seules les cases qui changent ---------- */
html #app #v-play .fx-place .ot-d{animation:fxDropIn .38s cubic-bezier(.2,.9,.3,1.4) both}
html #app #v-play .fx-flip .ot-d{animation:fxFlip .5s ease-in-out both}
@keyframes fxDropIn{0%{transform:scale(.2);opacity:0}70%{transform:scale(1.12);opacity:1}100%{transform:scale(1)}}
@keyframes fxFlip{0%{transform:rotateY(0)}50%{transform:rotateY(90deg) scale(1.1)}100%{transform:rotateY(0)}}
html #app #v-play .dt-e.dt-h.fx-line{animation:fxLineH .35s ease-out both}
html #app #v-play .dt-e.dt-v.fx-line{animation:fxLineV .35s ease-out both}
html #app #v-play .dt-b.fx-box{animation:fxBox .7s ease-out both}
@keyframes fxLineH{0%{transform:scaleX(.1)}100%{transform:scaleX(1)}}
@keyframes fxLineV{0%{transform:scaleY(.1)}100%{transform:scaleY(1)}}
@keyframes fxBox{0%{transform:scale(.3);opacity:0}55%{transform:scale(1.12);opacity:1}100%{transform:scale(1)}}
html #app #v-play .bt-c.fx-hit,html #app #v-play .bt-c.fx-sunk{animation:fxHit .6s ease-out both;position:relative;z-index:2}
html #app #v-play .bt-c.fx-sunk{animation:fxSunk .9s ease-out both}
html #app #v-play .bt-c.fx-miss{animation:fxMiss .7s ease-out both}
@keyframes fxHit{0%{transform:scale(.4);box-shadow:0 0 0 0 #ff8a4dcc}40%{transform:scale(1.3);box-shadow:0 0 0 8px #ff8a4d55}100%{transform:none;box-shadow:0 0 0 14px #ff8a4d00}}
@keyframes fxSunk{0%{transform:scale(.4)}25%{transform:scale(1.35) rotate(-8deg);box-shadow:0 0 0 10px #ff5a3d66}50%{transform:scale(1.1) rotate(6deg)}100%{transform:none;box-shadow:0 0 0 18px #ff5a3d00}}
@keyframes fxMiss{0%{box-shadow:0 0 0 0 #8fc2ddcc;transform:scale(.7)}50%{transform:scale(1.05)}100%{box-shadow:0 0 0 12px #8fc2dd00;transform:none}}
html #app #v-play .mm-row.fx-row>*{animation:fxDropIn .4s cubic-bezier(.2,.9,.3,1.4) both}
html #app #v-play .mm-row.fx-row>:nth-child(2){animation-delay:.08s}html #app #v-play .mm-row.fx-row>:nth-child(3){animation-delay:.16s}html #app #v-play .mm-row.fx-row>:nth-child(4){animation-delay:.24s}html #app #v-play .mm-row.fx-row>:nth-child(5){animation-delay:.32s}html #app #v-play .mm-row.fx-row>:nth-child(n+6){animation-delay:.42s}
html #app #v-play .wm-row.fx-reveal .wm-c{animation:fxTile .5s ease-in-out both}
html #app #v-play .wm-row.fx-reveal .wm-c:nth-child(2){animation-delay:.1s}html #app #v-play .wm-row.fx-reveal .wm-c:nth-child(3){animation-delay:.2s}html #app #v-play .wm-row.fx-reveal .wm-c:nth-child(4){animation-delay:.3s}html #app #v-play .wm-row.fx-reveal .wm-c:nth-child(5){animation-delay:.4s}html #app #v-play .wm-row.fx-reveal .wm-c:nth-child(6){animation-delay:.5s}html #app #v-play .wm-row.fx-reveal .wm-c:nth-child(7){animation-delay:.6s}
@keyframes fxTile{0%{transform:rotateX(0)}50%{transform:rotateX(90deg)}100%{transform:rotateX(0)}}
html #app #v-play .mem-card.fx-pair{animation:fxPair .8s ease-out both}
@keyframes fxPair{0%{transform:scale(1)}35%{transform:scale(1.12);box-shadow:0 0 0 4px #ffd77e,0 0 24px #ffd77e88}100%{transform:scale(1);box-shadow:0 0 0 0 #ffd77e00}}
html #app #v-play .ch-sq.fx-move .ch-p,html #app #v-play .sq.fx-move .pc{animation:fxPiece .4s cubic-bezier(.2,.9,.3,1.3) both}
html #app #v-play .ch-sq.fx-cap{animation:fxCap .6s ease-out both}
html #app #v-play .ch-sq.fx-cap .ch-p{animation:fxPiece .45s cubic-bezier(.2,.9,.3,1.3) both}
@keyframes fxPiece{0%{transform:translateY(-10px) scale(1.25);opacity:.4}100%{transform:none;opacity:1}}
@keyframes fxCap{0%{box-shadow:inset 0 0 0 40px #e2573e88}100%{box-shadow:inset 0 0 0 40px #e2573e00}}
html #app #v-play .rank-tile.fx-drop{animation:fxDropIn .35s cubic-bezier(.2,.9,.3,1.4) both}
html #app #v-play .bl-slot.fx-fill,html #app #v-play .ya-c.fx-fill{animation:fxFill .6s ease-out both}
@keyframes fxFill{0%{transform:scale(.92);box-shadow:0 0 0 0 #ffd77e99}40%{transform:scale(1.04)}100%{transform:none;box-shadow:0 0 0 10px #ffd77e00}}

/* ---------- « Plateau seul » ---------- */
.jx-focus-btn{display:grid;place-items:center;padding:0}
.jx-focus-btn .lu{width:19px;height:19px}
.jx-focus-btn:focus-visible{outline:2px solid #ffe5ac;outline-offset:2px}
/* V42b : le décor reste derrière, flouté (on le reconnaît, mais il ne gêne plus) ; plus de cadre autour du jeu : tout l'écran sert */
#v-play>.jx-focus-bg{display:none}
html #app #v-play.jx-focus{isolation:isolate}
html #app #v-play.jx-focus>.jx-focus-bg{display:block;position:absolute;inset:-48px;z-index:-1;background:inherit;filter:blur(18px) brightness(.62) saturate(1.15);transform:scale(1.04);pointer-events:none}
html #app #v-play.jx-focus :is(#pVs,#pStatus,#pDraw,#pDock,.dscrim){display:none!important}
html #app #v-play.jx-focus .ghead{background:transparent!important;border-bottom-color:transparent!important;box-shadow:none!important}
html #app #v-play.jx-focus .stagew{padding:6px 8px max(10px,env(safe-area-inset-bottom))!important;max-width:none!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important;row-gap:0!important;gap:0!important;background:none!important}
html #app #v-play.jx-focus .pbody{grid-column:1/-1!important;grid-row:1/-1!important;max-width:none!important;width:100%!important;padding:0!important;background:none!important;border:0!important;box-shadow:none!important}
html #app #v-play.jx-focus .pbody>.wy{max-width:none!important;width:100%!important;min-height:100%;padding:4px 0 0!important;margin:0!important;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;color:#fbf1df!important;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;gap:10px}
html #app #v-play.jx-focus .pbody>.wy :is(.tr-theme,.wy-title,h2,h3,.tr-co-info,.bl-duo-info,.lc-who,.ya-hd,.ya-tot,.ya-sub,.dt-clock,.ch-cap){color:#fbf1df!important;text-shadow:0 1px 3px #000a}
html #app #v-play.jx-focus .pbody :is(.wy-meta,.mm-legend,.rank-help,.tr-co-lead,.bt-sethint){display:none!important}
html #app #v-play.jx-focus .pbody>.wy>.sub{display:none!important}
/* boutons d'action : répartis en bas, sur toute la largeur, faciles à toucher */
html #app #v-play.jx-focus .pbody>.wy>:is(.g7-go,.tl-send,.wy-skip){width:min(100%,520px);min-height:48px;margin:0 auto}
html #app #v-play.jx-focus .pbody>.wy .lc-controls{width:100%;max-width:820px;display:flex;justify-content:space-between;gap:10px}
html #app #v-play.jx-focus .pbody>.wy .lc-controls .g7-go{flex:1;min-height:48px}
html #app #v-play.jx-focus .pbody>.wy .bt-tools{width:100%;display:flex;justify-content:center;gap:10px}
/* bouton « Plateau seul » : discret, dans le coin, sans réserver de bande vide */
html #app #v-play.jx-focus .jx-focus-btn{background:#d9bc8a!important;color:#241d13!important;border-color:#f0d8ad!important}
html #app #v-play .jx-focus-btn[hidden]{display:none!important}
html #app #v-play.jx-focus .pbody>.wy{padding-top:6px!important}
/* tailles des plateaux en « Plateau seul » : la hauteur libérée sert enfin au plateau (sans limite de tablette) */
html #app #v-play.jx-focus[data-game=ludo] .lc-board{width:min(100%,calc(var(--play-h,480px) - 110px))!important;max-width:820px!important}
html #app #v-play.jx-focus[data-game=memory] .mem-grid{width:min(100%,calc((var(--play-h,480px) - 40px)*.66667))!important;max-width:720px!important}
html #app #v-play.jx-focus[data-game=memory] .mem-grid:has(>:nth-child(25)){width:min(100%,calc((var(--play-h,480px) - 40px)*1.5))!important}
html #app #v-play.jx-focus[data-game=dobble] .dob-card{width:min(100%,calc((var(--play-h,480px) - 60px)/2))!important;max-width:480px!important}
html #app #v-play.jx-focus[data-game=checkers] .ckb{max-width:min(100%,calc(var(--play-h,480px) - 30px))!important;width:100%!important}
html #app #v-play.jx-focus[data-game=checkers] .pbody:has(.ckb){max-width:none!important}
html #app #v-play.jx-focus[data-game=tier] .tr-co .rank-level{height:clamp(46px,calc((var(--play-h,480px) - 200px)/5),130px)!important;min-height:0!important}
html #app #v-play.jx-focus[data-game=tier] .tr-co .rank-zone .rank-tile{height:calc(100% - 4px)!important;width:auto!important;min-width:0!important;flex:0 0 auto!important;aspect-ratio:1}
html #app #v-play.jx-focus[data-game=tier] .tr-co .rank-label{min-width:44px}
html #app #v-play .dob-card.fx-deal{animation:fxDeal .5s cubic-bezier(.2,.9,.3,1.25) both}
@keyframes fxDeal{0%{opacity:0;transform:translateY(-30px) rotate(-14deg) scale(.7)}100%{opacity:1;transform:none}}
/* petits téléphones : l'en-tête garde tous ses boutons sur une ligne */
@media (max-width:360px){
  html #app #v-play .ghead{gap:4px!important;padding-inline:6px!important}
  html #app #v-play .ghead .back{width:36px!important;height:36px!important;min-width:36px!important;flex:0 0 36px!important}
  html #app #v-play .ghead .jx-turnbar.in-head{min-width:0;flex:1 1 auto}
  html #app #v-play.jx-focus .ghead .j-audio-button{display:none!important}
}
html #app #v-play.jx-focus .pbody:has(>.ckb){display:flex!important;align-items:center;justify-content:center;height:100%}
