/* (25/11) Minuteurs du HUD, style « carrés » validé par Kiko : à droite du cadre de mon Pokémon (client/js/minuteurs.js).
   Les coins dorés et l'anneau sont dessinés en pixels dans le canvas (19×19 affiché ×2). */
#h-mt { position: absolute; left: 324px; top: 12px; width: calc(var(--col, 4) * 52px); height: 0; pointer-events: none; z-index: 2; }
#h-mt .mt-c { position: absolute; left: 0; top: 0; width: 38px; display: flex; flex-direction: column; align-items: center; pointer-events: auto;
  transition: left .25s ease-out, top .25s ease-out; transform-origin: 19px 19px; }
#h-mt .mt-cad { position: relative; width: 38px; height: 38px; }
#h-mt canvas { position: absolute; inset: 0; width: 38px; height: 38px; image-rendering: pixelated; }
#h-mt .mt-ic { position: absolute; left: 7px; top: 7px; width: 24px; height: 24px; image-rendering: pixelated; filter: drop-shadow(0 1px 0 #000); }
#h-mt .mt-t { margin-top: 2px; min-width: 30px; padding: 0 3px; font-size: 16px; line-height: 15px; text-align: center; color: #fff; border-radius: 2px;
  background: rgba(2,5,15,.82); border: 1px solid var(--c); text-shadow: 0 1px 0 #000; white-space: nowrap; }
#h-mt .mt-pc { position: absolute; right: -12px; top: -9px; padding: 0 3px; font-size: 16px; line-height: 14px; color: #fff; border-radius: 2px;
  background: #b02a2a; box-shadow: 0 0 0 1px #02050f; text-shadow: 0 1px 0 #000; white-space: nowrap; z-index: 2; }
#h-mt .mt-pc:empty { display: none; }
#h-mt .mt-pc.haut { background: #b02a2a; } #h-mt .mt-pc.bas { background: #5a2ca0; }
#h-mt .mt-c[style*="#4adc6a"] .mt-pc.haut { background: #1f7a3a; } /* vitesse : badge vert */
#h-mt .mt-c[style*="#4a9cff"] .mt-pc.haut { background: #2a5ab0; } /* défense : badge bleu */
/* arrivée : un peu plus gros avec un flash blanc */
#h-mt .mt-c.entre { animation: mt-entre .25s ease-out both; }
#h-mt .mt-c.entre .mt-cad::after { content: ''; position: absolute; inset: 0; background: #fff; animation: mt-flash .25s ease-out both; pointer-events: none; }
@keyframes mt-entre { from { transform: scale(1.5); opacity: 0; } 40% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes mt-flash { from { opacity: .8; } to { opacity: 0; } }
/* 3 dernières secondes : chrono rouge et petit battement (2 par seconde, en paliers) */
#h-mt .mt-c.urgent .mt-t { color: #ff8a8a; border-color: #ff4a4a; }
#h-mt .mt-c.urgent .mt-cad { animation: mt-bat .5s steps(1) infinite; }
@keyframes mt-bat { 50% { filter: brightness(1.35); } }
/* fin : il rétrécit, des étincelles partent en étoile */
#h-mt .mt-c.sort { animation: mt-sort .32s ease-in both; pointer-events: none; }
@keyframes mt-sort { to { transform: scale(.4); opacity: 0; } }
#h-mt .mt-et { position: absolute; left: 17px; top: 17px; width: 4px; height: 4px; background: var(--c); box-shadow: 0 0 0 1px #02050f;
  animation: mt-et .32s ease-out both; }
@keyframes mt-et { from { transform: rotate(var(--a)) translateX(8px); } to { transform: rotate(var(--a)) translateX(40px); opacity: 0; } }
/* téléphone : carrés plus petits, 3 par rangée */
body.is-touch #h-mt { width: calc(var(--col, 3) * 40px); }
body.is-touch #h-mt .mt-c { width: 28px; transform-origin: 14px 14px; }
body.is-touch #h-mt .mt-cad, body.is-touch #h-mt canvas { width: 28px; height: 28px; }
body.is-touch #h-mt .mt-ic { left: 5px; top: 5px; width: 18px; height: 18px; }
body.is-touch #h-mt .mt-t { min-width: 24px; padding: 0 1px; line-height: 12px; }
body.is-touch #h-mt .mt-pc { right: -8px; top: -7px; line-height: 11px; padding: 0 2px; }
body.is-touch #h-mt .mt-et { left: 12px; top: 12px; }
@media (prefers-reduced-motion: reduce) { #h-mt .mt-c { transition: none; } #h-mt .mt-c.urgent .mt-cad { animation: none; } }
