/* ============================================================================
 * GO — guide pas à pas (guide.js) + animations communes (anim.js)   build guide-2026-11-22-1
 * Couleurs propres (s'affiche par-dessus n'importe quelle app), sombre géré, mouvements réduits respectés.
 * ========================================================================== */
.mg-voile { position: fixed; inset: 0; z-index: 2147483000; background: transparent; }
.mg-voile.plein { background: rgba(8, 20, 14, .62); animation: mg-fondu .25s ease-out both; }
.mg-spot { position: fixed; z-index: 2147483001; border-radius: 14px; pointer-events: none; box-shadow: 0 0 0 4px #FFD34D, 0 0 0 9999px rgba(8, 20, 14, .62); transition: left .35s cubic-bezier(.2,.8,.2,1), top .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1), height .35s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.mg-spot::after { content: ''; position: absolute; inset: -4px; border-radius: 16px; border: 3px solid #FFD34D; animation: mg-pulse 1.6s ease-out infinite; }
.mg-bulle { position: fixed; z-index: 2147483002; width: min(360px, calc(100vw - 20px)); background: #fff; color: #13261B; border-radius: 18px; padding: 14px 16px 12px; box-shadow: 0 18px 50px rgba(0,0,0,.35); font: 400 15px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; outline: none; }
.mg-bulle.mg-anim { animation: mg-pop .32s cubic-bezier(.2,.9,.3,1.3) both; }
.mg-bulle::before { content: ''; position: absolute; left: var(--fleche, 50%); width: 16px; height: 16px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.mg-bulle[data-cote="bas"]::before { top: -7px; } .mg-bulle[data-cote="haut"]::before { bottom: -7px; } .mg-bulle[data-cote="centre"]::before, .mg-bulle[data-cote="dessus"]::before { display: none; }
.mg-haut { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.mg-mascotte { font-size: 30px; line-height: 1; display: inline-block; animation: mg-saut 2.4s ease-in-out infinite; }
.mg-num { flex: 1; font-size: 12px; font-weight: 800; color: #5B6B61; letter-spacing: .04em; }
.mg-voix, .mg-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #EEF3EF; font-size: 17px; cursor: pointer; color: inherit; }
.mg-voix[aria-pressed="true"] { background: #1E8A5A; color: #fff; }
.mg-bulle h2 { margin: 2px 0 4px; font-size: 18px; line-height: 1.25; }
.mg-bulle p { margin: 0 0 8px; }
.mg-points { display: flex; gap: 5px; margin: 6px 0 10px; } .mg-points i { width: 7px; height: 7px; border-radius: 4px; background: #D7E0DA; transition: width .25s, background .25s; }
.mg-points i.fait { background: #9CC9B1; } .mg-points i.on { width: 20px; background: #1E8A5A; }
.mg-bts { display: flex; gap: 8px; } .mg-bts button { min-height: 44px; border-radius: 12px; border: 1.5px solid #D7E0DA; background: #fff; font: 800 15px system-ui, sans-serif; cursor: pointer; padding: 0 14px; color: #13261B; }
.mg-bts button:disabled { opacity: .35; cursor: default; } .mg-bts .mg-suiv { flex: 1; background: #1E8A5A; border-color: #1E8A5A; color: #fff; } .mg-bts .mg-ecouter { flex: none; }
.mg-bts button:active { transform: scale(.96); }
.mg-note { font-size: 13px; color: #8A4B00; }
.mg-invite { position: fixed; z-index: 2147482000; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(440px, calc(100vw - 20px)); display: flex; align-items: center; gap: 10px; background: #13261B; color: #fff; border-radius: 18px; padding: 10px 10px 10px 14px; box-shadow: 0 12px 34px rgba(0,0,0,.35); font: 400 14px/1.35 system-ui, sans-serif; animation: mg-monte .45s cubic-bezier(.2,.9,.3,1.2) both; }
.mg-invite > div:not(.mg-inv-bts) { flex: 1; } .mg-invite small { display: block; opacity: .8; font-size: 12.5px; }
.mg-inv-bts { display: flex; gap: 6px; } .mg-invite .mg-go { min-height: 42px; border: 0; border-radius: 12px; background: #FFD34D; color: #13261B; font-weight: 900; padding: 0 12px; cursor: pointer; }
.mg-invite .mg-non { width: 38px; min-height: 42px; border: 0; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.mg-invite.mg-part { animation: mg-descend .3s ease-in both; }
.mg-aide { position: fixed; z-index: 2147481000; left: 12px; bottom: calc(96px + env(safe-area-inset-bottom)); width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #1E8A5A; font: 900 20px system-ui, sans-serif; box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer; opacity: .92; transition: transform .15s; }
.mg-aide { touch-action: none; user-select: none; -webkit-user-select: none; }
.mg-aide.mg-libre { transition: left .2s ease-out, top .2s ease-out; }
.mg-aide.mg-glisse { transition: none; transform: scale(1.15); box-shadow: 0 10px 28px rgba(0,0,0,.35); cursor: grabbing; }
.mg-aide:hover { transform: scale(1.08); } .mg-aide:active { transform: scale(.92); }
.mg-aide[data-place="haut-droite"] { left: auto; right: 12px; bottom: auto; top: calc(12px + env(safe-area-inset-top)); }
.mg-aide[data-place="bas-droite"] { left: auto; right: 12px; bottom: calc(124px + env(safe-area-inset-bottom)); }
.mg-aide[data-place="haut-gauche"] { bottom: auto; top: calc(70px + env(safe-area-inset-top)); }
@keyframes mg-pop { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes mg-pulse { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.12); } }
@keyframes mg-saut { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-6deg); } }
@keyframes mg-monte { from { opacity: 0; transform: translate(-50%, 30px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes mg-descend { to { opacity: 0; transform: translate(-50%, 30px); } }
@keyframes mg-fondu { from { opacity: 0; } to { opacity: 1; } }

/* ─── Animations communes (anim.js) : entrée douce des cartes et listes, appui des boutons ─── */
.mg-in { animation: mg-entree .48s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: var(--mg-d, 0ms); }
@keyframes mg-entree { from { opacity: 0; transform: translateY(14px) scale(.985); } }
/* Retour au toucher : l'éclat .mg-eclat (anim.js). Pas de « transform » global sur les boutons :
   beaucoup sont centrés par translate(-50 %) et sauteraient de place à l'appui. */
.mg-eclat { position: fixed; z-index: 2147482500; pointer-events: none; width: 10px; height: 10px; border-radius: 50%; animation: mg-eclat .55s ease-out forwards; }
@keyframes mg-eclat { from { opacity: .7; transform: translate(-50%, -50%) scale(.4); } to { opacity: 0; transform: translate(-50%, -50%) scale(4.5); } }

@media (prefers-color-scheme: dark) {
  .mg-bulle, .mg-bulle::before { background: #18241D; color: #EAF2EC; }
  .mg-num { color: #9DB2A5; } .mg-voix, .mg-x { background: #24352B; }
  .mg-bts button { background: #18241D; color: #EAF2EC; border-color: #2E4537; } .mg-points i { background: #2E4537; }
  .mg-aide { background: #18241D; color: #7CD3A6; }
}
@media (prefers-reduced-motion: reduce) {
  .mg-spot, .mg-bulle.mg-anim, .mg-mascotte, .mg-invite, .mg-in, .mg-spot::after { animation: none !important; transition: none !important; }
}
@media print { .mg-aide, .mg-invite, .mg-voile, .mg-spot, .mg-bulle { display: none !important; } }
