/* =========================================================================
   Tutoriels animés du briefing des mini-jeux (js/minigame-tutos.js)
   Vignettes 84 × 112 dans .mg-tuto-item, comme les affiches et l esquive.
   ========================================================================= */
.mgx-tuto { position: relative; width: 84px; height: 112px; border-radius: 10px; overflow: hidden; background: #232a52; }
.mgx-tuto .mgxt-f { position: absolute; left: 50%; top: 66px; margin-left: -11px; font-size: 22px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
/* poignée de main */
.mgxt-hs { position: absolute; left: 0; right: 0; top: 10px; text-align: center; font-size: 40px; }
.mgxt-g { position: absolute; left: 8px; right: 8px; top: 58px; height: 10px; border-radius: 5px; background: rgba(255,255,255,.12); }
.mgxt-g .z { position: absolute; top: 0; bottom: 0; left: 46%; width: 30%; border-radius: 5px; background: rgba(74,222,128,.35); box-shadow: inset 0 0 0 1.5px #4ade80; }
.mgxt-g .c { position: absolute; top: -3px; bottom: -3px; left: 4%; width: 4px; margin-left: -2px; border-radius: 2px; background: #fff; }
.mgx-tuto.press .mgxt-g .c { animation: mgxtPress 2.6s ease-in-out infinite; }
.mgx-tuto.press .mgxt-f { animation: mgxtFinger 2.6s ease-in-out infinite; }
@keyframes mgxtPress { 0%,15% { left: 4%; } 55%,85% { left: 60%; } 100% { left: 4%; } }
@keyframes mgxtFinger { 0%,12% { transform: translateY(-6px); opacity: .6; } 18%,85% { transform: translateY(0) scale(.88); opacity: 1; } 92%,100% { transform: translateY(-6px); opacity: .6; } }
.mgx-tuto.zone .mgxt-g .z { animation: mgxtZone 2.6s ease-in-out infinite; }
.mgx-tuto.zone .mgxt-g .c { animation: mgxtFollow 2.6s ease-in-out infinite; }
.mgx-tuto.zone .mgxt-f { transform: scale(.88); }
@keyframes mgxtZone { 0%,100% { left: 20%; } 50% { left: 56%; } }
@keyframes mgxtFollow { 0%,100% { left: 34%; } 50% { left: 70%; } }
.mgx-tuto.release .mgxt-g .z { display: none; }
.mgx-tuto.release .mgxt-g .c { animation: mgxtRel 2.6s ease-in-out infinite; }
.mgx-tuto.release .mgxt-f { animation: mgxtLift 2.6s ease-in-out infinite; }
.mgxt-open { position: absolute; right: 8px; top: 8px; font-size: 20px; animation: mgxtOpen 2.6s ease-in-out infinite; }
@keyframes mgxtRel { 0%,40% { left: 60%; } 60%,100% { left: 4%; } }
@keyframes mgxtLift { 0%,40% { transform: scale(.88); opacity: 1; } 50%,100% { transform: translateY(-10px); opacity: .5; } }
@keyframes mgxtOpen { 0%,30% { opacity: 0; transform: scale(.6); } 40%,90% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
/* la fuite */
.mgxt-folder { position: absolute; left: 14px; top: 18px; width: 56px; height: 42px; border-radius: 4px 8px 8px 8px; background: #d9b26a; box-shadow: inset 0 -4px 0 #9c7a3c; }
.mgxt-folder::before { content: ""; position: absolute; left: 0; top: -7px; width: 22px; height: 9px; border-radius: 4px 4px 0 0; background: #d9b26a; }
.mgxt-folder i { position: absolute; left: 6px; right: 6px; top: 6px; height: 28px; border-radius: 3px; background: #f3efe4; transform-origin: 50% 100%; animation: mgxtPaper 2.6s ease-in-out infinite; }
.mgxt-folder b { position: absolute; left: 0; right: 0; top: 10px; text-align: center; font-weight: 900; color: #2a1e08; font-size: 16px; animation: mgxtQ 2.6s ease-in-out infinite; }
@keyframes mgxtPaper { 0%,30% { transform: translateY(0); } 50%,90% { transform: translateY(-16px); } 100% { transform: translateY(0); } }
@keyframes mgxtQ { 0%,30% { opacity: 1; } 45%,100% { opacity: 0; } }
.mgx-tuto.folder .mgxt-f { top: 56px; animation: mgxtFinger 2.6s ease-in-out infinite; }
.mgxt-card { position: absolute; left: 10px; right: 10px; top: 14px; height: 50px; border-radius: 10px; background: rgba(255,255,255,.1); }
.mgxt-card .av { position: absolute; left: 7px; top: 9px; width: 18px; height: 18px; border-radius: 5px; background: #7c5cff; }
.mgxt-card .l1 { position: absolute; left: 7px; right: 10px; top: 32px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.75); }
.mgxt-card .l2 { position: absolute; left: 7px; right: 26px; top: 41px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); }
.mgxt-card .st { position: absolute; left: 4px; right: 6px; top: 34px; height: 2px; background: #4ade80; transform-origin: 0 50%; animation: mgxtStrike 2.6s ease-in-out infinite; }
@keyframes mgxtStrike { 0%,30% { transform: scaleX(0); } 50%,90% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
.mgx-tuto.strike .mgxt-f { animation: mgxtFinger 2.6s ease-in-out infinite; }
.mgxt-stamp { position: absolute; left: 8px; right: 8px; top: 72px; padding: 3px 0; border: 2px solid #ff6b81; border-radius: 6px; color: #ff6b81; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-align: center; animation: mgxtStamp 2.6s ease-in infinite; }
@keyframes mgxtStamp { 0%,25% { opacity: 0; transform: scale(2.2) rotate(-8deg); } 40%,90% { opacity: 1; transform: scale(1) rotate(-8deg); } 100% { opacity: 0; transform: scale(1) rotate(-8deg); } }
/* l'agenda */
.mgxt-cal { position: absolute; left: 8px; top: 10px; width: 40px; display: flex; flex-direction: column; gap: 3px; }
.mgxt-cal i { height: 14px; border-radius: 3px; background: rgba(255,255,255,.1); }
.mgxt-cal i.ok { background: rgba(74,222,128,.3); box-shadow: inset 2px 0 0 #4ade80; }
.mgxt-blk { position: absolute; left: 52px; top: 22px; width: 26px; height: 30px; border-radius: 5px; background: #6aa8ff; box-shadow: 0 0 0 2px #ffd54f; }
.mgx-tuto.tap .mgxt-f { left: 66px; top: 44px; animation: mgxtFinger 2.6s ease-in-out infinite; }
.mgx-tuto.place .mgxt-blk { animation: mgxtMove 2.6s ease-in-out infinite; }
.mgx-tuto.place .mgxt-f { left: 28px; top: 74px; animation: mgxtFinger 2.6s ease-in-out infinite; }
@keyframes mgxtMove { 0%,35% { left: 52px; top: 22px; width: 26px; height: 30px; } 60%,90% { left: 8px; top: 78px; width: 40px; height: 14px; box-shadow: none; } 100% { left: 52px; top: 22px; } }
.mgx-tuto.urgent .mgxt-blk { background: #ef4f5e; box-shadow: 0 0 0 2px #fff; animation: mgxtShake 1.3s ease-in-out infinite; }
.mgxt-urg { position: absolute; left: 50px; top: 62px; font-size: 26px; animation: mgxtShake 1.3s ease-in-out infinite; }
@keyframes mgxtShake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-4deg); } }

/* ---------- Bourrage d'urne ---------- */
.mgx-tuto.urne { background: linear-gradient(180deg, #2b3157 0 62%, #3a2a22 62%); }
.mgxt-asse { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; background: #f3c9a6; display: grid; place-items: center; font-size: 15px; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.mgx-tuto.urne.warn .mgxt-asse { animation: mgxtShake 1.3s ease-in-out infinite; }
.mgx-tuto.urne.caught .mgxt-asse { background: #ff6b81; }
.mgxt-urn { position: absolute; left: 22px; top: 58px; width: 40px; height: 34px; border-radius: 4px; background: rgba(160,200,255,.35); box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.mgxt-urn .slot { position: absolute; left: 10px; right: 10px; top: 3px; height: 3px; border-radius: 2px; background: #10142c; }
.mgxt-ballot { position: absolute; left: 30px; top: 30px; width: 24px; height: 16px; border-radius: 2px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.25); }
.mgx-tuto.urne.stuff .mgxt-ballot { animation: mgxtBallot 1.3s ease-in infinite; }
@keyframes mgxtBallot { 0%,20% { transform: translateY(0) scaleY(1); opacity: 1; } 70% { transform: translateY(26px) scaleY(.4); opacity: 1; } 75%,100% { transform: translateY(28px) scaleY(.2); opacity: 0; } }
.mgx-tuto.urne.stuff .mgxt-f { left: 50px; top: 34px; animation: mgxtFinger 1.3s ease-in-out infinite; }
.mgxt-stop { position: absolute; left: 50px; top: 34px; font-size: 22px; animation: mgxtPop 2.6s ease-in-out infinite; }
@keyframes mgxtPop { 0%,15% { transform: scale(.4); opacity: 0; } 30%,90% { transform: scale(1); opacity: 1; } 100% { opacity: 0; } }
.mgx-tuto.urne .mgxt-stamp { top: 40px; }

/* ---------- Discours ---------- */
.mgx-tuto.discours { background: linear-gradient(180deg, #2a1f5c, #3b2470); }
.mgxt-opts { position: absolute; left: 8px; right: 8px; top: 12px; display: flex; flex-direction: column; gap: 6px; }
.mgxt-opts i { height: 18px; border-radius: 6px; background: rgba(255,255,255,.14); }
.mgxt-opts i.good { animation: mgxtPick 2.6s ease-in-out infinite; }
@keyframes mgxtPick { 0%,35% { background: rgba(255,255,255,.14); } 45%,90% { background: #ffd54f; box-shadow: 0 0 0 2px #fff; } 100% { background: rgba(255,255,255,.14); } }
.mgx-tuto.discours.pick .mgxt-f { left: 60px; top: 36px; animation: mgxtFinger 2.6s ease-in-out infinite; }
.mgxt-paper { position: absolute; left: 12px; right: 12px; top: 10px; height: 64px; padding: 8px 6px; border-radius: 4px; background: #f3efe4; display: flex; flex-direction: column; gap: 6px; }
.mgxt-paper i { height: 5px; border-radius: 3px; background: #2a2a40; transform-origin: 0 50%; animation: mgxtLine 2.8s ease-out infinite; }
.mgxt-paper i:nth-child(2) { animation-delay: .35s; width: 85%; } .mgxt-paper i:nth-child(3) { animation-delay: .7s; width: 92%; } .mgxt-paper i:nth-child(4) { animation-delay: 1.05s; width: 60%; }
@keyframes mgxtLine { 0% { transform: scaleX(0); } 20%,85% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
.mgxt-desk, .mgxt-stagep { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 26px; }
.mgxt-clap, .mgxt-tom { position: absolute; top: 18px; font-size: 26px; }
.mgxt-clap { left: 12px; animation: mgxtAlt 2.6s ease-in-out infinite; }
.mgxt-tom { right: 12px; animation: mgxtAlt 2.6s ease-in-out infinite 1.3s; }
@keyframes mgxtAlt { 0%,45% { transform: translateY(0) scale(1); opacity: 1; } 15% { transform: translateY(-6px) scale(1.15); } 50%,100% { opacity: .25; transform: none; } }

/* ---------- ClashApp ---------- */
.mgx-tuto.twitter { background: #15202b; }
.mgxt-post { position: absolute; left: 7px; right: 7px; top: 12px; height: 48px; border-radius: 10px; background: rgba(255,255,255,.08); box-shadow: inset 3px 0 0 #3aa0e0; }
.mgxt-post.rival { box-shadow: inset 3px 0 0 #ff6b81; animation: mgxtIn 2.6s ease-out infinite; }
.mgxt-post.small { height: 32px; animation: none; }
.mgxt-post .av { position: absolute; left: 7px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: #ff6b81; }
.mgxt-post.me .av { background: #3aa0e0; }
.mgxt-post .l1 { position: absolute; left: 26px; right: 8px; top: 10px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.75); }
.mgxt-post .l2 { position: absolute; left: 26px; right: 22px; top: 22px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.45); }
@keyframes mgxtIn { 0% { transform: translateY(-12px); opacity: 0; } 15%,90% { transform: none; opacity: 1; } 100% { opacity: 0; } }
.mgxt-reply { position: absolute; left: 7px; right: 7px; top: 54px; height: 34px; border-radius: 10px; background: #fff; }
.mgxt-reply .txt { position: absolute; left: 7px; top: 10px; height: 5px; border-radius: 3px; background: #15202b; width: 0; animation: mgxtType 2.6s steps(8) infinite; }
.mgxt-reply .caret { position: absolute; top: 7px; width: 2px; height: 11px; background: #3aa0e0; animation: mgxtCaret 2.6s steps(8) infinite; }
.mgxt-reply b { position: absolute; right: 6px; bottom: 4px; font-size: 9px; font-weight: 900; color: #3aa0e0; }
@keyframes mgxtType { 0% { width: 0; } 80%,100% { width: 50px; } }
@keyframes mgxtCaret { 0% { left: 8px; } 80%,100% { left: 58px; } }
.mgxt-likes { position: absolute; left: 0; right: 0; top: 70px; text-align: center; font-size: 15px; font-weight: 900; color: #fff; }
.mgxt-likes span::after { content: "12"; animation: mgxtCount 2.6s steps(1) infinite; }
@keyframes mgxtCount { 0% { content: "12"; } 25% { content: "87"; } 50% { content: "340"; } 75% { content: "1,2k"; } }
.mgx-tuto.twitter.likes .mgxt-likes { animation: mgxtBeat 1.3s ease-in-out infinite; }
@keyframes mgxtBeat { 50% { transform: scale(1.15); } }

/* ---------- La manif ---------- */
.mgx-tuto.manif { background: linear-gradient(180deg, #3b4a6b 0 60%, #555 60%); }
.mgxt-sides { position: absolute; left: 6px; right: 6px; top: 22px; display: flex; flex-direction: column; gap: 8px; }
.mgxt-sides i { height: 22px; border-radius: 8px; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 900; color: #fff; }
.mgxt-sides .pour { background: #2f9e5b; animation: mgxtPickG 2.6s ease-in-out infinite; }
.mgxt-sides .contre { background: #d64545; }
@keyframes mgxtPickG { 0%,35% { box-shadow: none; } 45%,90% { box-shadow: 0 0 0 2px #fff; transform: scale(1.05); } 100% { box-shadow: none; } }
.mgx-tuto.manif.side .mgxt-f { left: 54px; top: 34px; animation: mgxtFinger 2.6s ease-in-out infinite; }
.mgxt-sign { position: absolute; left: 10px; right: 10px; top: 12px; height: 46px; border-radius: 3px; background: #c8a165; box-shadow: inset 0 0 0 2px #9c7a3c; }
.mgxt-sign::after { content: ""; position: absolute; left: 50%; top: 46px; width: 4px; height: 36px; margin-left: -2px; background: #7a5a2a; }
.mgxt-sign i { position: absolute; left: 8px; height: 5px; border-radius: 3px; background: #1d1d1d; transform-origin: 0 50%; }
.mgxt-sign .w1 { top: 14px; right: 8px; animation: mgxtLine 2.6s ease-out infinite; }
.mgxt-sign .w2 { top: 26px; right: 22px; animation: mgxtLine 2.6s ease-out infinite .5s; }
.mgxt-sign i.done { animation: none; }
.mgxt-pen { position: absolute; left: 50px; top: 18px; font-size: 18px; animation: mgxtPen 2.6s ease-in-out infinite; }
@keyframes mgxtPen { 0% { transform: translate(-36px, 0); } 30% { transform: translate(0, 0); } 45% { transform: translate(-36px, 12px); } 70%,100% { transform: translate(-14px, 12px); } }
.mgxt-sign .stk { position: absolute; right: 2px; top: -8px; font-size: 20px; animation: mgxtStick 2.6s ease-in infinite; }
@keyframes mgxtStick { 0%,20% { transform: scale(2) rotate(-20deg); opacity: 0; } 35%,90% { transform: scale(1) rotate(10deg); opacity: 1; } 100% { opacity: 0; } }
.mgxt-crowd { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 15px; animation: mgxtBeat 1s ease-in-out infinite; }

/* ---------- Le budget ---------- */
.mgx-tuto.budget { background: linear-gradient(180deg, #1d3557, #14243f); }
.mgxt-bill { position: absolute; left: 6px; right: 6px; top: 18px; padding: 6px 0; border-radius: 8px; background: #fff; color: #c8102e; text-align: center; font-size: 14px; font-weight: 900; animation: mgxtBeat 1.3s ease-in-out infinite; }
.mgx-tuto.budget .mgxt-g { top: 70px; }
.mgxt-g .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: #4ade80; width: 0; animation: mgxtFill 2.6s ease-out infinite; }
@keyframes mgxtFill { 0% { width: 0; } 75%,100% { width: 100%; } }
.mgxt-checks { position: absolute; left: 8px; right: 8px; top: 12px; display: flex; flex-direction: column; gap: 7px; }
.mgxt-checks i { position: relative; height: 16px; border-radius: 5px; background: rgba(255,255,255,.12); }
.mgxt-checks b { position: absolute; left: 3px; top: 3px; width: 10px; height: 10px; border-radius: 3px; background: rgba(255,255,255,.3); }
.mgxt-checks i:nth-child(1) b { animation: mgxtTick 2.6s steps(1) infinite; }
.mgxt-checks i:nth-child(3) b { animation: mgxtTick 2.6s steps(1) infinite .7s; }
@keyframes mgxtTick { 0% { background: rgba(255,255,255,.3); } 30%,100% { background: #4ade80; box-shadow: 0 0 0 2px #fff; } }
.mgx-tuto.budget.check .mgxt-f { left: 8px; top: 34px; animation: mgxtFinger 1.3s ease-in-out infinite; }
.mgxt-chart { position: absolute; left: 12px; right: 12px; top: 10px; bottom: 12px; border-left: 2px solid rgba(255,255,255,.4); border-bottom: 2px solid rgba(255,255,255,.4); }
.mgxt-chart .lim { position: absolute; left: 0; right: 0; bottom: 30%; height: 0; border-top: 2px dashed #4ade80; }
.mgxt-chart span { position: absolute; right: 0; bottom: 31%; font-size: 9px; font-weight: 900; color: #4ade80; }
.mgxt-chart .bar { position: absolute; left: 14px; width: 18px; bottom: 0; border-radius: 3px 3px 0 0; animation: mgxtDeficit 2.6s ease-in-out infinite; }
@keyframes mgxtDeficit { 0%,15% { height: 85%; background: #ff6b81; } 70%,100% { height: 22%; background: #4ade80; } }

/* ---------- Coup de fil ---------- */
.mgx-tuto.appel { background: linear-gradient(180deg, #102a43, #0b1a2c); }
.mgxt-phone { position: absolute; left: 0; right: 0; top: 30px; text-align: center; font-size: 40px; animation: mgxtRing 1.2s ease-in-out infinite; }
@keyframes mgxtRing { 0%,50%,100% { transform: rotate(0); } 10%,30% { transform: rotate(-14deg); } 20%,40% { transform: rotate(14deg); } }
.mgxt-mic { position: absolute; left: 0; right: 0; top: 18px; text-align: center; font-size: 34px; }
.mgxt-waves { position: absolute; left: 0; right: 0; top: 70px; display: flex; justify-content: center; gap: 5px; }
.mgxt-waves i { width: 6px; height: 22px; border-radius: 3px; background: #4ade80; animation: mgxtWave .9s ease-in-out infinite; }
.mgxt-waves i:nth-child(2) { animation-delay: .2s; } .mgxt-waves i:nth-child(3) { animation-delay: .4s; }
@keyframes mgxtWave { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.mgxt-score { position: absolute; left: 0; right: 0; top: 22px; display: flex; justify-content: center; gap: 2px; font-size: 18px; }
.mgxt-score i { font-style: normal; opacity: .25; animation: mgxtStar 2.6s steps(1) infinite; }
.mgxt-score i:nth-child(2) { animation-delay: .4s; } .mgxt-score i:nth-child(3) { animation-delay: .8s; }
@keyframes mgxtStar { 0% { opacity: .25; } 20%,100% { opacity: 1; } }
.mgxt-verdict { position: absolute; left: 0; right: 0; top: 62px; text-align: center; font-size: 22px; font-weight: 900; color: #4ade80; animation: mgxtPop 2.6s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .mgx-tuto *, .mgx-tuto *::after { animation: none !important; }
}
