/* Tableau des quêtes : option « Affiches » (l'ancien tableau en liège, avec des récompenses lisibles) et barre de tri (30/10). */
.q-tri { gap: 4px; margin: 6px 0; align-items: center; flex-wrap: wrap; }
.q-tri .q-aff { margin-left: auto; font-size: 16px; display: flex; align-items: center; gap: 4px; cursor: pointer; }
/* « Affiches » = l'ancien tableau, comme avant la refonte (31/10, demande de Kiko) : planches de bois dans le cadre en bois,
   vraies feuilles de mission de la ROM, boutons sur chaque affiche. Seules les récompenses sont plus grandes et plus lisibles. */
.qb.qb-ancien { display: block; }
.af-tableau { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 26px 16px; padding: 30px 12px 18px; image-rendering: pixelated;
  background: #8a4c1c url('assets/ui/tableau/planches.png') 0 0 / 192px 96px repeat;
  border: 16px solid transparent; border-image: url('assets/ui/cadres/cadre1_bois_fin.png') 8 / 16px stretch; }
.af-tableau .cork-empty { grid-column: 1 / -1; color: #fff0d0; text-shadow: 0 2px 0 #3a1c08; }
.af-note { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; color: #3a2410; text-shadow: none;
  border-style: solid; border-color: transparent; border-width: 40px 22px 44px 22px;
  border-image: url('assets/ui/tableau/feuille.png') 44 26 46 26 fill / 44px 26px 46px 26px stretch; image-rendering: pixelated;
  filter: drop-shadow(4px 4px 0 rgba(46, 22, 6, .55)); animation: afArrive .45s steps(5, end) backwards; animation-delay: calc(var(--i, 0) * 40ms);
  transition: transform .12s steps(2, end); }
@keyframes afArrive { from { transform: translateY(-24px); opacity: 0; } }
.af-note:hover, .af-note:focus-within { transform: translateY(-3px); filter: drop-shadow(4px 7px 0 rgba(46, 22, 6, .55)); z-index: 2; }
.af-note.taken { animation: afPrise .32s steps(4, end) forwards; }
@keyframes afPrise { to { transform: translateY(-30px); opacity: 0; } }
.af-note.flip-out { animation: afRetourne .22s steps(3, end) forwards; }
@keyframes afRetourne { to { transform: scaleX(0); } }
.af-note.rerolled { animation: afArrive .45s steps(5, end) backwards; animation-delay: 0s; }
.af-tableau.calme .af-note:not(.rerolled) { animation: none; }
.af-note .pin { position: absolute; left: 50%; top: -34px; width: 8px; height: 8px; margin-left: -4px; background: #d83020;
  box-shadow: inset 2px 2px 0 #ff9a80, inset -2px -2px 0 #801010, 0 2px 0 rgba(40, 16, 4, .6); }
.af-note .n-tag { align-self: center; margin-top: -26px; padding: 0 10px; font-size: 16px; letter-spacing: 1px; color: #fff; background: var(--kc);
  border: 2px solid #3a2410; box-shadow: inset 0 2px 0 rgba(255,255,255,.35); }
.af-note.k-wanted .n-tag { background: #b01a10; border-color: #3a0a04; letter-spacing: 2px; }
.af-note .n-body { display: flex; gap: 10px; align-items: center; }
.af-note .n-pics { position: relative; flex: none; }
.af-note .n-pt { width: 80px; height: 80px; display: block; image-rendering: pixelated; border: 2px solid #5a3a1a; background: #f0dcb0; }
.af-note .n-pt2 { position: absolute; right: -14px; bottom: -8px; width: 40px; height: 40px; image-rendering: pixelated; border: 2px solid #5a3a1a; background: #f0dcb0; }
.af-note .n-item { position: absolute; right: -10px; bottom: -8px; width: 32px; height: 32px; image-rendering: pixelated; filter: drop-shadow(0 2px 0 rgba(0,0,0,.4)); }
.af-note.k-wanted .n-pt { border: 3px solid #6b1a10; filter: sepia(.3) contrast(1.1); }
.af-note .n-info { min-width: 0; }
.af-note .n-title { display: block; font-size: 24px; font-weight: normal; line-height: 1.05; color: #2a1606; }
.af-note .n-where { font-size: 16px; color: #6b4422; }
.af-note .n-stars { display: flex; gap: 1px; margin-top: 4px; }
.af-note .n-stars .pxi { margin: 0; filter: drop-shadow(0 1px 0 rgba(58, 36, 16, .6)); }
.af-note .n-txt { margin: 0; font-size: 16px; line-height: 1.15; color: #4a2e14; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.af-note .n-rew { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 20px; color: #3a2410; }
.af-note.k-wanted .n-rew-t { color: #8a1010; letter-spacing: 1px; }
.af-note .n-rew-t { font-size: 16px; color: #6b4422; }
.af-note .rw { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; color: #6a3400; }
.af-note .rw b { font-weight: normal; font-size: 20px; }
.af-note .rw .pxi { margin: -4px 0; }
.af-note .rw .gel-ico { width: 32px; height: 32px; margin: -6px -2px; }
.af-note .rw .rw-img { width: 32px; height: 32px; margin: -6px -2px; image-rendering: pixelated; }
.af-note .rw-poke b { color: #8a4a00; }
.af-note .rw-obj { padding: 0 6px 0 2px; outline: 2px solid var(--rc); outline-offset: -1px; background: rgba(255, 255, 255, .3); }
.af-note .rw-obj .rw-nom { font-size: 17px; color: #3a2410; }
.af-note .n-btns { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 2px 0 -18px; }
.af-note .n-rr { margin-right: auto; padding: 2px 8px; }
.af-note .n-rr .de-px { width: 24px; height: 24px; margin: 0; }
.af-note .n-proposed { font-size: 15px; color: #6a3400; }
/* Pas de barre de défilement sur le côté (31/10, demande de Kiko) : on fait défiler à la molette ou au doigt. */
.screen.tableau-ecran, .tableau-ecran .board-body, .tableau-ecran .qb-liste, .tableau-ecran .qb-fiche, .tableau-ecran .rw-liste { scrollbar-width: none; }
.screen.tableau-ecran::-webkit-scrollbar, .tableau-ecran ::-webkit-scrollbar { display: none; width: 0; height: 0; }
/* Téléphone à l'horizontale : filtres et tri sur une seule ligne qui défile, et la liste garde de la place (30/10) */
@media (max-height: 520px) {
  body.is-touch .board-wrap .board-filtre { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px; margin: 2px 0; }
  body.is-touch .board-wrap .board-filtre > * { flex: none; }
  body.is-touch .q-tri-tel { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; }
  body.is-touch .q-tri-tel select { font-size: 14px; padding: 2px 4px; height: 28px; }
  body.is-touch .q-tri-tel .q-aff { font-size: 14px; margin: 0; white-space: nowrap; }
  body.is-touch .af-tableau { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 8px; padding: 24px 6px 10px; }
  body.is-touch .af-note .n-pt { width: 56px; height: 56px; }
  body.is-touch .af-note .n-title { font-size: 20px; }
  body.is-touch .af-note .n-txt { -webkit-line-clamp: 2; }
  body.is-touch .board-body .qb.qb-ancien { display: block; flex: none; }
  body.is-touch .board-wrap .board-body > * { flex-shrink: 0; } /* la ligne des filtres ne doit pas être écrasée (elle défile en largeur) */
}
/* Téléphone à l'horizontale : le tableau prend toute la hauteur, la liste et la fiche côte à côte défilent chacune (idée de la Cinquième, 30/10) */
@media (max-height: 520px) {
  body.is-touch .screen.tableau-ecran { height: calc(100dvh - 8px); margin: 4px auto; }
  body.is-touch .tableau-ecran > .board-wrap { height: 100%; max-height: none; display: flex; flex-direction: column; box-sizing: border-box; }
  body.is-touch .board-wrap .board-body { flex: 1; min-height: 0; max-height: none; display: flex; flex-direction: column; overflow: auto; }
  body.is-touch .board-body .qb { flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: stretch; gap: 6px; margin: 0; }
  body.is-touch .board-body .qb-liste { max-height: none; min-height: 0; height: 100%; overflow: auto; box-sizing: border-box; }
  body.is-touch .board-body .qb-fiche { order: 0; position: static; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
}
