/* Tri des objets par catégorie (24/11/2026, js/tri-objets.js) : encyclopédie des objets et fenêtre « Objet tenu » */
.to-barre { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 8px; }
.to-puces { display: flex; flex-direction: column; gap: 4px; }
.to-cats, .to-rars { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.to-lab { font-size: 14px; margin-right: 2px; white-space: nowrap; }

/* puce de catégorie : l'icône d'un vrai objet, le nom, le compteur dans une pastille */
.btn.mini.to-cat { font-size: 15px; gap: 5px; padding: 0 6px 0 8px; border-width: 8px; }
.btn.mini.to-cat img, .btn.mini.to-cat .ico { width: 20px; height: 20px; image-rendering: pixelated; filter: drop-shadow(0 1px 0 rgba(0,0,0,.6)); transition: transform .15s; }
.btn.mini.to-cat.on img { transform: translateY(-2px) scale(1.15); }
.to-n { display: inline-block; min-width: 20px; padding: 0 4px; font-size: 13px; line-height: 16px; text-align: center; color: #fff;
  background: rgba(0, 0, 0, .45); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset; }
.btn.mini.to-cat.on .to-n { background: #ffd35c; color: #2a1a00; box-shadow: none; }
.btn.mini.vide { opacity: .45; }
.btn.mini.vide.on, .btn.mini.vide:hover, .btn.mini.vide.focus { opacity: .8; }

/* puce de rareté : un point de sa couleur, le nom dans sa couleur */
.btn.mini.to-rar { font-size: 13px; gap: 4px; padding: 0 5px 0 7px; border-width: 7px; color: var(--rc); }
.to-pt { width: 8px; height: 8px; background: var(--rc); box-shadow: 0 0 0 1px #101018, 0 0 4px var(--rc); }
.btn.mini.to-rar.on { border-image-source: url('assets/ui/cadres/cadre1_yellow_fin.png'); text-shadow: 0 0 6px var(--rc); }
.btn.mini.to-rar.on .to-n { background: var(--rc); color: #101018; }

.to-flash { animation: toFlash .32s steps(4, end); }
@keyframes toFlash { 0% { filter: brightness(1.9); transform: scale(1.08); } 100% { filter: none; transform: none; } }

/* recherche */
.to-cherche .field { font-size: 18px; padding-top: 2px; padding-bottom: 2px; }

/* titre d'un groupe : nom (ou étiquette du type), compteur, trait de sa couleur */
.to-groupe { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px; color: var(--gc); font-size: 17px; }
.to-groupe:first-child { margin-top: 0; }
.to-groupe b { color: var(--gc); text-shadow: 0 2px 0 #101018; }
.to-groupe-n { font-size: 14px; color: #c8c8dc; }
.to-groupe-l { flex: 1; height: 2px; background: linear-gradient(90deg, var(--gc), transparent); opacity: .7; }
.to-groupe.prio b, .to-groupe.prio .to-son-type { animation: toBrille 2.4s steps(12, end) infinite; }
.to-son-type { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: #ffd35c; }
.to-groupe.grise { filter: saturate(.2); }
@keyframes toBrille { 0%, 100% { text-shadow: 0 2px 0 #101018; } 50% { text-shadow: 0 2px 0 #101018, 0 0 8px currentColor; } }

/* objet unique d'un autre Pokémon : grisé, non équipable */
.row.box.to-grise { filter: grayscale(1) brightness(.72); opacity: .8; }
.row.box.to-grise:hover, .row.box.to-grise:focus-within { filter: grayscale(.6) brightness(.85); opacity: 1; }
.btn.to-pour { gap: 4px; font-size: 14px; white-space: nowrap; }
.btn.to-pour .bd-tete { width: 28px; height: 28px; }

/* la liste arrive en fondu à chaque changement de filtre */
.to-entre > * { animation: toEntre .22s ease-out both; }
.to-entre > *:nth-child(2) { animation-delay: .02s; } .to-entre > *:nth-child(3) { animation-delay: .04s; } .to-entre > *:nth-child(n+4) { animation-delay: .06s; }
@keyframes toEntre { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.to-rien { text-align: center; padding: 16px 0; }

/* encyclopédie : cartes des objets uniques */
.ob-card.r-myth { border-color: rgba(255, 122, 217, .85); box-shadow: 0 0 8px rgba(255, 122, 217, .35) inset; }

/* téléphone : les puces défilent sur une ligne au lieu de prendre la moitié de l'écran */
@media (max-width: 760px), (max-height: 500px) {
  .to-cats, .to-rars { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .to-cats::-webkit-scrollbar, .to-rars::-webkit-scrollbar { display: none; }
  .btn.mini.to-cat, .btn.mini.to-rar { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .to-entre > *, .to-flash, .to-groupe.prio b, .to-groupe.prio .to-son-type { animation: none; } }
