/* « Ma Team » (13/11) : équipes préparées. Écran, cartes d'équipe (mise en page A : portraits ; B : sprites animés),
   fiche d'un Pokémon dans l'équipe, choix par le « + », fenêtre « Mes teams » et barre du bas de l'onglet Expédition.
   Tailles en multiples entiers des images de la ROM : portraits 40 px (×3 = 120, ×2 = 80), icônes 16 px (×1, ×2). */
.mt-ecran { display: flex; flex-direction: column; }
.mt-haut { flex-wrap: nowrap; gap: 8px; }
.mt-haut h2 .pxi { margin-right: 6px; vertical-align: -2px; }
.mt-barre { margin: 4px 0 6px; gap: 10px; flex-wrap: nowrap; align-items: flex-end; }
.mt-aide { font-size: 16px; line-height: 1.2; }
.mt-vues { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; flex: none; }
.mt-vues .btn.mini { padding: 0 8px 0 14px; }
.mt-vues .btn.mini::before { width: 10px; height: 10px; margin-top: -5px; }
.mt-liste { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: calc((100vh - 24px) / var(--ui, 1) - 150px); padding: 2px 6px 6px 2px; overscroll-behavior: contain; }

/* ---------- Carte d'une équipe ---------- */
.mt-carte { padding: 2px 8px 6px; filter: none; animation: mtCarte .22s steps(4, end); }
.screen.still .mt-carte, .mt-fenetre .mt-carte { animation: none; }
.mt-carte.neuve { animation: mtNeuve .5s steps(6, end); }
@keyframes mtCarte { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@keyframes mtNeuve { 0% { scale: .96; filter: brightness(1.8); } 60% { scale: 1.01; } 100% { scale: 1; filter: none; } }
.mt-tete { gap: 8px; flex-wrap: nowrap; margin-bottom: 2px; min-height: 40px; }
.mt-num { flex: none; width: 28px; height: 28px; display: grid; place-items: center; background: #14245a; box-shadow: inset 0 0 0 2px var(--line-in), 0 2px 0 #030716; color: var(--gold); font-size: 20px; line-height: 1; }
.mt-carte.choisie .mt-num { background: #5a4310; box-shadow: inset 0 0 0 2px var(--gold), 0 2px 0 #030716; }
.btn.mt-nom { border-width: 8px; padding: 0 8px 0 18px; font-size: 24px; min-width: 0; max-width: 46%; }
.btn.mt-nom b { color: var(--gold); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.btn.mt-nom .pxi { opacity: .7; flex: none; }
.btn.mt-nom:hover .pxi, .btn.mt-nom.focus .pxi { opacity: 1; }
.mt-choisie { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--ok); font-size: 18px; animation: mtChoisie .35s steps(5, end); }
@keyframes mtChoisie { 0% { scale: .5; opacity: 0; } 70% { scale: 1.15; } 100% { scale: 1; opacity: 1; } }
.mt-types { display: flex; align-items: center; min-width: 0; overflow: hidden; }
.mt-types .types { gap: 4px; flex-wrap: nowrap; }
.mt-types .type { padding: 0 6px; font-size: 15px; line-height: 20px; white-space: nowrap; flex: none; }
.btn.mt-suppr { color: #ffb0c8; flex: none; }
.btn.mt-copier { flex: none; }
/* Échanger les places en glissant (souris) : le Pokémon attrapé pâlit, un fantôme suit le curseur, la case visée s'allume */
.mt-case img { -webkit-user-drag: none; user-select: none; }
body:not(.is-touch) .btn.mt-case[data-mt-case] { cursor: grab; }
body.mt-en-glisse, body.mt-en-glisse .btn { cursor: grabbing !important; }
body.mt-en-glisse #infobulle { display: none !important; } /* pas d'infobulle sous le Pokémon qu'on porte */
.btn.mt-case.mt-glisse { opacity: .35; filter: grayscale(.4); }
.btn.mt-case.mt-cible { filter: brightness(1.35); outline: 3px solid var(--gold); outline-offset: -3px; animation: mtCible .5s steps(2, end) infinite; }
@keyframes mtCible { 50% { outline-color: #fff3b0; } }
.mt-fantome { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; margin: -34px 0 0 -34px; line-height: 0; rotate: -6deg; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .45)); }
.mt-fantome img { width: 68px; height: 68px; image-rendering: pixelated; box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px #030716; background: #101c44; }
.btn.mt-en-leader { border-image-source: url('assets/ui/cadres/cadre1_yellow_fin.png'); color: #ffe27a; }
.btn.mt-en-leader .pxi { margin: 0; }
.btn.mt-partir { flex: none; }

/* La rangée : « Leader (vous) », un fin trait vertical léger, puis les 3 coéquipiers */
.mt-rang { position: relative; display: flex; align-items: stretch; gap: 10px; }
.mt-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mt-col.leader { flex: 1 1 0; }
.mt-col.robots { flex: 3 1 0; }
.mt-robots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; flex: 1; }
.mt-lab { height: 18px; line-height: 18px; font-size: 16px; color: var(--dim); text-align: center; letter-spacing: .5px; white-space: nowrap; overflow: hidden; }
.mt-lab.gold-t { color: var(--gold); }
.mt-trait { flex: none; width: 2px; align-self: stretch; margin: 20px 0 2px; background: linear-gradient(transparent, var(--line-in) 18%, var(--line-in) 82%, transparent); opacity: .4; }

/* Une place (grande case) */
.btn.mt-case { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; min-width: 0; min-height: 190px; padding: 4px 4px 2px; }
.btn.mt-case.leader { border-image-source: url('assets/ui/cadres/cadre1_yellow_fin.png'); }
.btn.mt-case::before { left: 2px; top: 16px; }
.btn.mt-case.vide { filter: brightness(.82) saturate(.8); gap: 8px; }
.btn.mt-case.vide:hover, .btn.mt-case.vide.focus { filter: brightness(1.2); }
.mt-plus { display: grid; place-items: center; width: 64px; height: 64px; background: rgba(127, 166, 239, .1); box-shadow: inset 0 0 0 2px rgba(127, 166, 239, .45); animation: mtPlus 1.6s steps(2, end) infinite; }
.mt-case.leader .mt-plus { background: rgba(255, 211, 92, .1); box-shadow: inset 0 0 0 2px rgba(255, 211, 92, .55); }
@keyframes mtPlus { 50% { box-shadow: inset 0 0 0 2px rgba(207, 224, 255, .9); } }
.mt-vide-t { font-size: 16px; color: var(--dim); }
.mt-pt { position: relative; display: inline-block; line-height: 0; flex: none; }
.mt-pt > img { width: 80px; height: 80px; image-rendering: pixelated; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 2px #31508f; }
.mt-case .mt-pt > img { width: 120px; height: 120px; }
.mt-case.leader .mt-pt > img { box-shadow: inset 0 0 0 2px var(--gold-line); }
.mt-niv { position: absolute; left: -4px; bottom: -3px; z-index: 2; padding: 0 4px; font-style: normal; font-size: 16px; line-height: 18px; color: #fff; background: rgba(4, 8, 22, .88); box-shadow: inset 0 0 0 1px var(--line-in); }
.mt-pt .shiny-logo, .mt-scene .shiny-logo { right: -5px; top: -5px; }
.mt-pk-nom { display: block; max-width: 100%; font-size: 20px; line-height: 1.15; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mt-ligne { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 20px; max-width: 100%; }
.mt-objs { display: inline-flex; align-items: center; gap: 3px; }
img.mt-bd { width: 16px; height: 16px; image-rendering: pixelated; flex: none; }
.mt-sans { font-size: 15px; color: var(--dim); white-space: nowrap; }
.mt-atts { display: inline-flex; gap: 3px; align-items: center; }
.mt-atts i { width: 10px; height: 10px; background: var(--tc); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .55), inset 0 -3px 0 rgba(0, 0, 0, .22); }
/* le Pokémon qu'on vient de choisir : il sautille (mise en page A ; en B c'est le sprite lui-même) */
.mt-case.arrive:not(.mt-sprite) .mt-pt { animation: mtArrive .7s steps(9, end); }
@keyframes mtArrive { 0% { transform: scale(.55); } 20% { transform: translateY(-14px) scale(1.06); } 40% { transform: none; } 60% { transform: translateY(-8px); } 80% { transform: none; } 90% { transform: translateY(-3px); } 100% { transform: none; } }

/* ---------- Mise en page B : sprites animés, tous tournés vers la gauche derrière le leader, le sol défile ---------- */
.mt-carte.vue-b .mt-rang { isolation: isolate; }
.btn.mt-sprite, .btn.mt-sprite.leader { border: 2px solid transparent; border-image: none; background: none; padding: 4px 2px 2px; min-height: 0; justify-content: flex-start; z-index: 1; }
.btn.mt-sprite::before { display: none; }
.btn.mt-sprite:hover, .btn.mt-sprite.focus, .btn.mt-sprite:focus-visible { border-color: rgba(255, 211, 92, .8); background: rgba(255, 211, 92, .06); filter: none; }
.btn.mt-sprite.vide { min-height: 164px; justify-content: center; border: 2px dashed rgba(127, 166, 239, .35); }
.btn.mt-sprite.vide.leader { border-color: rgba(255, 211, 92, .45); }
.mt-scene { position: relative; display: block; line-height: 0; }
canvas.mt-cv { display: block; width: 144px; height: 114px; image-rendering: pixelated; }
.mt-scene .mt-niv { left: 2px; bottom: 22px; }
.mt-scene .shiny-logo { right: 8px; top: 8px; }
.mt-sol { position: absolute; left: 0; right: 0; top: 117px; height: 20px; z-index: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(207, 224, 255, .2) 0 8px, transparent 8px 48px) 0 4px / 48px 2px repeat-x, linear-gradient(#1b2f6c, #0f1c47);
  box-shadow: inset 0 2px 0 rgba(127, 166, 239, .5), 0 2px 0 #030716; animation: mtSol 1.1s linear infinite; }
@keyframes mtSol { to { background-position: 48px 4px, 0 0; } }
.mt-sprite.vide .mt-plus { background: #111d47; }
.mt-carte.choisie .mt-sol { background: repeating-linear-gradient(90deg, rgba(255, 226, 122, .3) 0 8px, transparent 8px 48px) 0 4px / 48px 2px repeat-x, linear-gradient(#4a3a14, #2a2010); box-shadow: inset 0 2px 0 rgba(255, 211, 92, .55), 0 2px 0 #030716; }
@media (prefers-reduced-motion: reduce) { .mt-sol, .mt-plus { animation: none; } }

/* ---------- Bas de l'écran : nouvelle équipe ---------- */
.mt-neuve { justify-content: center; gap: 10px; padding: 6px 0 2px; }
.mt-nb { font-size: 16px; }
.mt-vide-ecran { display: flex; align-items: center; gap: 14px; padding: 14px 10px; }
.mt-vide-ecran p { margin: 0; }
.mt-vide-ico { flex: none; opacity: .85; }

/* ---------- Fenêtres : Mes teams, choix d'un Pokémon, fiche ---------- */
.modal.mt-modal { background: rgba(3, 6, 20, .84); } /* souvent ouverte par-dessus une autre fenêtre : fond plus sombre */
.modal.mt-modal > .box { max-height: calc(94vh / var(--ui, 1)); display: flex; flex-direction: column; }
.mt-fenetre .mt-liste { max-height: none; flex: 1; min-height: 0; }
.mt-petite .field { min-width: 0; width: 100%; }
/* Choisir un Pokémon : tous ses Pokémon, les favoris d'abord */
.mt-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 6px; overflow-y: auto; flex: 1; min-height: 0; margin-top: 6px; padding: 2px 6px 4px 2px; }
.btn.mt-pk { flex-direction: column; gap: 2px; padding: 2px 2px 0; min-width: 0; }
.btn.mt-pk::before { left: 0; top: 12px; }
.btn.mt-pk.fav { border-image-source: url('assets/ui/cadres/cadre1_yellow_fin.png'); }
.mt-fav { position: absolute; left: -4px; top: -5px; z-index: 2; line-height: 0; }
.btn.mt-pk .mt-pk-nom { font-size: 16px; }
/* Fiche d'un Pokémon dans l'équipe */
.mt-fi-haut { gap: 10px; align-items: center; }
.mt-fi-pt.mt-eclat { animation: mtArrive .6s steps(8, end); }
.mt-fi-id { min-width: 0; }
.mt-fi-role { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-fi-nom { font-size: 26px; }
.mt-shiny-non { opacity: .45; line-height: 0; padding: 0 12px; }
.mt-fi-onglets { flex: none; }
.mt-fi-onglets .btn .pxi { margin-right: 4px; }
.mt-fi-corps { flex: 1; min-height: 120px; overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 6px; }
.mt-fi-corps > * { flex: none; }
.mt-fi-corps .cap-list { max-height: none; }
.mt-fi-corps .cap-fiche { min-height: 150px; }
.mt-regle { font-size: 16px; margin: 0; }
.mt-main { padding: 2px 8px; gap: 10px; }
.mt-main.ouverte { filter: brightness(1.12); }
.mt-main-vide { display: grid; place-items: center; width: 32px; height: 32px; opacity: .5; flex: none; }
.mt-objets { padding-left: 14px; border-left: 2px solid rgba(127, 166, 239, .35); margin-left: 6px; }
.mt-compte { margin-left: 8px; font-size: 15px; color: var(--dim); white-space: nowrap; }
.mt-compte.plein { color: #ffb37a; }
.mt-tenu { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
/* Onglet « Améliorer » : les lignes de gelées et d'améliorations de Mon équipe, dans la fiche de l'équipe */
.mt-amel > h3:first-child { margin-top: 2px; }
.mt-amel .fi-up { margin: 0; }
.mt-amel .fi-up b { font-size: 20px; }
.mt-amel .fi-up .muted { font-size: 16px; }
.mt-fi-onglets .btn[data-tab="amel"]:not(.primary) { color: #b8ffc4; }
.mt-fi-bas { flex: none; gap: 8px; margin-top: 6px; padding-top: 6px; border-top: 2px solid rgba(127, 166, 239, .2); }
.mt-fi-bas { justify-content: flex-end; }
.mt-fi-note { flex: 1 0 100%; font-size: 15px; line-height: 1.2; } /* la note sur sa ligne, les 3 boutons côte à côte dessous */

/* ---------- Onglet Expédition : barre du bas (Mes teams, leader, coéquipiers) ---------- */
.mt-dep { gap: 6px; flex-wrap: wrap; row-gap: 4px; align-items: center; min-width: 0; } /* (26/11) passe à la ligne quand la place manque (zoom 200 %, petit écran) au lieu de glisser sous « Partir ! » */
.mt-dep .mt-trait { margin: 4px 2px; height: 36px; align-self: center; }
.btn.mt-mes { flex: none; flex-direction: column; gap: 0; padding: 0 8px 0 16px; font-size: 15px; line-height: 1.1; border-width: 8px; }
.btn.mt-mes .pxi { margin: 0; }
.mt-dep-team { display: inline-flex; align-items: center; gap: 4px; flex: none; max-width: 190px; padding: 0 2px 0 8px; font-size: 16px; color: var(--gold); background: rgba(255, 211, 92, .1); box-shadow: inset 0 0 0 2px rgba(255, 211, 92, .45); }
.mt-dep-team b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.btn.mt-dep-x { border: 0; border-image: none; padding: 0 6px; font-size: 18px; line-height: 1.2; color: #ffb0c8; }
.btn.mt-dep-x:hover, .btn.mt-dep-x.focus { color: #fff; }
.btn.mt-dep-x::before { display: none; }
/* La case du leader : mêmes mesures qu'une case de partenaire (.part-slot), mais sa propre classe, pour que « les cases
   des partenaires » restent exactement les 3 partenaires (essais et styles qui les comptent). */
.btn.mt-slot { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 2px 8px; font-size: 15px; }
.mt-slot .part-pt > img { width: 32px; height: 32px; image-rendering: pixelated; }
.mt-slot img.part-bd { width: 16px; height: 16px; }
.btn.mt-lead { border-image-source: url('assets/ui/cadres/cadre1_yellow_fin.png'); flex: none; }
.mt-lead-t { font-style: normal; font-size: 13px; line-height: 1; color: var(--gold); }

/* ---------- Écrans étroits (fenêtre réduite, téléphone debout) ---------- */
@media (max-width: 900px) {
  .mt-case .mt-pt > img { width: 80px; height: 80px; }
  .btn.mt-case { min-height: 146px; }
  .btn.mt-sprite.vide { min-height: 124px; }
  canvas.mt-cv { width: 96px; height: 76px; }
  .mt-sol { top: 86px; height: 14px; }
  .mt-scene .mt-niv { bottom: 12px; }
  .mt-pk-nom { font-size: 16px; }
  .btn.mt-suppr .tx, .btn.mt-copier .tx { display: none; }
  .mt-barre { flex-wrap: wrap; }
}
@media (max-width: 600px) and (orientation: portrait) {
  .mt-haut { flex-wrap: wrap; }
  .mt-rang { gap: 6px; }
  .mt-robots { gap: 4px; }
  /* A (portraits) : une grande ligne par Pokémon, le leader en haut, un fin trait, puis les 3 coéquipiers */
  .mt-carte.vue-a .mt-rang { flex-direction: column; gap: 4px; }
  .mt-carte.vue-a .mt-trait { width: auto; height: 2px; margin: 2px 12px; background: linear-gradient(90deg, transparent, var(--line-in) 18%, var(--line-in) 82%, transparent); }
  .mt-carte.vue-a .mt-robots { grid-template-columns: 1fr; gap: 4px; }
  .mt-carte.vue-a .mt-lab { text-align: left; padding-left: 4px; }
  .mt-carte.vue-a .btn.mt-case { flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 0; border-width: 8px; padding: 2px 6px 2px 4px; }
  .mt-carte.vue-a .btn.mt-case.vide { min-height: 64px; justify-content: center; }
  .mt-carte.vue-a .mt-case .mt-pt > img { width: 80px; height: 80px; }
  .mt-carte.vue-a .mt-pk-nom { flex: 1; min-width: 0; text-align: left; font-size: 18px; }
  .mt-carte.vue-a .mt-ligne { flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
  /* B (sprites) : les 4 restent en file sur une ligne, en plus petit */
  .mt-carte.vue-b .btn.mt-case { min-height: 0; padding: 2px 0 0; }
  .mt-carte.vue-b .btn.mt-sprite.vide { min-height: 104px; }
  .mt-col.leader { flex: 1.1 1 0; }
  .mt-col.robots { flex: 3 1 0; }
  .mt-lab { font-size: 13px; letter-spacing: 0; }
  .mt-tete { flex-wrap: wrap; row-gap: 2px; }
  .mt-types { order: 9; flex: 1 0 100%; }
  .mt-types .types { flex-wrap: wrap; }
  .mt-types .type { font-size: 13px; line-height: 17px; padding: 0 4px; }
  .btn.mt-nom { max-width: 60%; font-size: 20px; }
  .mt-choisie span { display: none; }
  canvas.mt-cv { width: 72px; height: 57px; }
  .mt-sol { top: 67px; height: 12px; }
  .mt-scene .mt-niv { bottom: 6px; left: -2px; font-size: 13px; line-height: 14px; }
  .mt-scene .shiny-logo { right: 0; top: 0; }
  .mt-plus { width: 44px; height: 44px; }
  .mt-vide-t { font-size: 13px; text-align: center; white-space: normal; line-height: 1.05; }
  .mt-ligne { gap: 4px; flex-wrap: wrap; row-gap: 2px; }
  .mt-sans { font-size: 12px; }
  .mt-grille { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .mt-fi-haut { gap: 6px; }
  .mt-fi-onglets { flex-wrap: nowrap; }
  .mt-fi-onglets .btn:not(.primary) .tx { display: none; } /* comme la fiche de Mon équipe : les onglets non choisis n'ont que leur icône */
  .mt-fi-onglets .btn:not(.primary) .pxi { margin-right: 0; }
  .mt-fi-haut .btn[data-close] { padding: 0 6px 0 16px; font-size: 18px; }
  .mt-fi-nom { font-size: 20px; }
  .mt-fi-id .row { gap: 2px 6px; }
  .mt-fi-pt > img { width: 80px; height: 80px; }
  .btn.shiny-bascule { min-width: 40px; padding: 2px 4px; }
  .mt-main { flex-wrap: wrap !important; justify-content: flex-end; }
  .mt-main > .grow { min-width: 60%; }
  .mt-objets { padding-left: 6px; margin-left: 2px; }
  .mt-objets .bd-pris { max-width: 42%; }
  .mt-fi-bas { flex-wrap: wrap; }
  .mt-fi-note { flex-basis: 100%; }
  .mt-dep { flex-wrap: wrap; }
}
/* Téléphone couché (peu de hauteur) : une carte à la fois, on fait défiler */
@media (max-height: 520px) {
  .mt-liste { max-height: calc(100vh - 118px); }
  body.is-touch .mt-aide { display: none; }
  body.is-touch .mt-barre { margin: 2px 0; }
  .mt-case .mt-pt > img { width: 80px; height: 80px; }
  .btn.mt-case { min-height: 138px; }
  .btn.mt-sprite.vide { min-height: 124px; }
  canvas.mt-cv { width: 96px; height: 76px; }
  .mt-sol { top: 86px; height: 14px; }
  .mt-scene .mt-niv { bottom: 12px; }
  .modal.mt-modal > .box { max-height: calc(100vh - 8px); }
  .mt-fi-corps { min-height: 90px; }
  .mt-fi-note { display: none; }
}
/* Au doigt : de vraies cibles */
body.is-touch .btn.mt-dep-x { min-height: 30px; min-width: 30px; }
body.is-touch .btn.mt-mes { min-height: 44px; }

/* ---------- (19/11, demande de Kiko) Recherche par nom, tri « Nouveaux », badge « Nouveau ! », clavier de la manette ---------- */
.mt-cherche { flex-wrap: nowrap; gap: 8px; margin: 4px 0 0; align-items: center; }
.mt-cherche-champ { position: relative; display: flex; align-items: center; min-width: 0; }
.mt-cherche-champ .field { flex: 1; min-width: 0; width: 100%; font-size: 22px; padding-left: 40px; padding-right: 44px; }
.mt-cherche-champ > .mt-loupe { position: absolute; left: 18px; margin: 0; top: 50%; transform: translateY(-50%); z-index: 1; pointer-events: none; opacity: .85; }
.mt-cherche-champ:focus-within > .mt-loupe { opacity: 1; animation: mtLoupe 1.6s steps(8, end) infinite; }
@keyframes mtLoupe { 0%, 100% { transform: translateY(-50%); } 50% { transform: translateY(-50%) rotate(-12deg) scale(1.12); } }
.btn.mini.mt-cherche-x { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 1; min-width: 0; padding: 0 4px; border-width: 6px; line-height: 0; }
.btn.mini.mt-cherche-x.vide { display: none; }
.mt-cherche-nb { flex: none; font-size: 17px; white-space: nowrap; }
.mt-cherche-nb.filtre b { color: var(--gold); }
.mt-cherche.rien .field { border-image-source: url('assets/ui/cadres/cadre1_pink_fin.png'); animation: mtNon .35s steps(6, end); }
@keyframes mtNon { 0%, 100% { transform: none; } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.mt-cherche-pad { display: none; flex: none; font-size: 15px; white-space: nowrap; align-items: center; gap: 4px; }
body.a-la-manette .mt-cherche-pad { display: inline-flex; }
.btn.mt-pk.mt-cache { display: none !important; }
.btn.mt-pk.mt-revient { animation: mtRevient .32s steps(5, end); }
@keyframes mtRevient { 0% { transform: scale(.7); opacity: .2; } 60% { transform: translateY(-5px) scale(1.04); opacity: 1; } 100% { transform: none; } }
.mt-rien { margin: 10px 4px; font-size: 18px; text-align: center; }
/* « Nouveau ! » : petit ruban doré en haut de la case, qui brille de temps en temps */
.btn.mt-pk { position: relative; }
.mt-neuf { position: absolute; top: -9px; left: 50%; z-index: 3; transform: translateX(-50%); padding: 0 5px; font-style: normal; font-size: 15px; line-height: 17px; white-space: nowrap;
  color: #3a2400; background: linear-gradient(#ffe98a, #ffc93a); box-shadow: 0 0 0 1px #6b3b00, 0 2px 0 #000; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); animation: mtNeuf 2.4s steps(12, end) infinite; pointer-events: none; }
@keyframes mtNeuf { 0%, 70%, 100% { filter: none; transform: translateX(-50%); } 78% { filter: brightness(1.35); transform: translateX(-50%) translateY(-2px); } 86% { filter: none; transform: translateX(-50%); } }
.mt-tri-neuf { margin-left: 5px; padding: 0 4px; font-style: normal; font-size: 13px; line-height: 15px; color: #3a2400; background: var(--gold); box-shadow: 0 1px 0 #000; }
@media (prefers-reduced-motion: reduce) { .mt-neuf, .mt-cherche-champ:focus-within > .mt-loupe, .btn.mt-pk.mt-revient { animation: none; } }
@media (max-width: 600px) and (orientation: portrait) {
  .mt-cherche { flex-wrap: wrap; }
  .mt-cherche-champ { flex-basis: 100%; }
  .mt-cherche-nb { margin-left: auto; }
}

/* Clavier de la manette (clavier-manette.js) : en bas de l'écran, la liste filtrée reste visible au-dessus */
.modal.clavier-pad { background: transparent; z-index: 80; } /* (24/11) au-dessus de toutes les fenêtres (coéquipiers en groupe : z-index 60) */
.modal.clavier-pad > .box { margin: auto auto 10px; box-shadow: 0 -6px 24px rgba(0, 0, 0, .6); }
.clavier-pad .cp-box { width: min(560px, calc(96vw / var(--ui, 1))); animation: cpMonte .22s steps(4, end); }
@keyframes cpMonte { 0% { transform: translateY(40px); opacity: 0; } 100% { transform: none; opacity: 1; } }
.cp-haut { flex-wrap: nowrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.cp-titre { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: 17px; color: var(--gold); }
.cp-ecran { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 34px; padding: 0 10px; background: #050a1e; box-shadow: inset 0 0 0 2px var(--gold-line); font-size: 24px; overflow: hidden; }
.cp-txt { white-space: pre; font-weight: normal; }
.cp-txt.cp-tape { animation: cpTape .18s steps(3, end); }
@keyframes cpTape { 0% { transform: translateY(-3px); } 100% { transform: none; } }
.cp-car { width: 12px; height: 4px; margin-left: 2px; align-self: flex-end; margin-bottom: 7px; background: var(--gold); animation: cpCar 1s steps(1, end) infinite; }
@keyframes cpCar { 50% { opacity: 0; } }
.cp-touches { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.btn.cp-t { justify-content: center; min-width: 0; padding: 0; font-size: 22px; height: 46px; }
.cp-bas { gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.cp-bas .btn { flex: 1; justify-content: center; font-size: 18px; white-space: nowrap; }

/* (21/11, demande de Kiko) Recherche de Mon équipe : tout à droite de la ligne « Trier » (logique de Ma Team) */
.tri-row .eq-cherche { margin-left: auto; flex: 0 1 300px; min-width: 190px; }
.eq-cherche .field { font-size: 19px; padding-top: 2px; padding-bottom: 2px; padding-right: 92px; }
.eq-cherche .btn.mini.mt-cherche-x { right: 56px; }
.eq-cherche-nb { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; white-space: nowrap; pointer-events: none; }
.eq-cherche-nb.filtre b { color: var(--gold); }
.eq-cherche.rien .field { border-image-source: url('assets/ui/cadres/cadre1_pink_fin.png'); animation: mtNon .35s steps(6, end); }
.eq-cell.eq-cache, .eq-titre.eq-cache { display: none !important; }
.eq-cell.eq-revient { animation: mtRevient .32s steps(5, end); }
.eq-rien { flex-basis: 100%; text-align: center; margin: 18px 0; font-size: 18px; }
@media (prefers-reduced-motion: reduce) { .eq-cell.eq-revient { animation: none; } }
/* téléphone : la ligne des tris défile de côté ; la recherche reste collée à droite, toujours visible */
body.is-touch .tri-row .eq-cherche { position: sticky; right: 0; flex: none; width: 170px; min-width: 0; z-index: 2; background: var(--panel); box-shadow: -10px 0 10px -4px rgba(0,0,0,.45); }
body.is-touch .eq-cherche .field { font-size: 17px; padding-right: 40px; }
body.is-touch .eq-cherche .btn.mini.mt-cherche-x { right: 8px; }
body.is-touch .eq-cherche-nb { display: none; }
/* (21/11, Kiko) la même recherche dans le Pokédex */
.px-cell.eq-cache { display: none !important; }
.px-cell.eq-revient { animation: mtRevient .32s steps(5, end); }
.dex-cherche-row { margin: 4px 0 2px; }
@media (prefers-reduced-motion: reduce) { .px-cell.eq-revient { animation: none; } }
/* (25/11) secours : les objets tenus de chaque Pokémon dans la fenêtre de choix */
.mt-pk-obj { position: absolute; right: -4px; bottom: -3px; z-index: 2; display: flex; gap: 1px; line-height: 0; padding: 1px; background: rgba(4, 8, 22, .88); box-shadow: inset 0 0 0 1px var(--gold-line); }
.mt-pk-obj img.mt-pk-bd { width: 20px; height: 20px; image-rendering: pixelated; }
/* (2/12, bug Discord de Redalia, téléphone couché) Au toucher, les boutons ont une hauteur minimale (telephone.css) : dans une
   grille qui défile, le navigateur donnait alors 40 px à chaque ligne et les portraits se chevauchaient. Lignes à la hauteur du contenu. */
.mt-grille { grid-auto-rows: max-content; align-content: start; }
