/* Playtest 2, lot D (30/10) : objet déjà équipé (tête du Pokémon qui le tient), vente chez Kecleon, annonce du coffre scellé,
   fenêtre de l'escalier (coffre, faille). Tailles en multiples de 8, comme le reste du jeu. */

/* ---------- 4.1 : objet déjà équipé ---------- */
.bd-pris { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 50%; }
.bd-pris > .muted { font-size: 16px; }
.bd-tete-btn { position: relative; padding: 2px 6px !important; display: inline-flex; align-items: center; gap: 2px; min-height: 0; }
.bd-tete { width: 40px; height: 40px; image-rendering: pixelated; border-radius: 4px; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 2px #31508f; }
.bd-tete-btn .bd-fleche { font-size: 16px; color: var(--gold); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.bd-tete-btn:hover .bd-fleche, .bd-tete-btn:focus-visible .bd-fleche { opacity: 1; transform: none; }
.bd-tete-btn:hover .bd-tete, .bd-tete-btn:focus-visible .bd-tete { box-shadow: inset 0 0 0 2px var(--gold); animation: bd-hop .45s steps(4) infinite alternate; }
.bd-tete-btn.pris .bd-tete { animation: bd-lache .5s steps(6) forwards; }
.bd-transfert { animation: bd-recoit .5s steps(5); }
.bd-transfert .bd-ico { animation: bd-glisse .5s steps(5); }
@keyframes bd-hop { to { transform: translateY(-3px); } }
@keyframes bd-lache { 30% { transform: translateY(-6px) rotate(-8deg); } 100% { transform: translateY(0) rotate(0); filter: grayscale(1) brightness(.7); } }
@keyframes bd-recoit { 0% { filter: brightness(1); } 40% { filter: brightness(1.6) drop-shadow(0 0 6px var(--gold)); } 100% { filter: brightness(1); } }
@keyframes bd-glisse { 0% { transform: translateX(220px) scale(.6); opacity: .2; } 70% { transform: translateX(-4px) scale(1.15); opacity: 1; } 100% { transform: none; } }

/* ---------- 4.2 : vendre chez Kecleon ---------- */
.shop-onglets { margin: 4px 0 8px; gap: 8px; }
.vente-tete { gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.vente-carte { position: relative; }
.vente-tetes { display: flex; justify-content: center; gap: 2px; margin-top: 2px; }
.vente-tetes img { width: 32px; height: 32px; image-rendering: pixelated; border-radius: 4px; background: rgba(0,0,0,.3); }
.vente-gain { position: absolute; left: 50%; top: 8px; transform: translateX(-50%); pointer-events: none; white-space: nowrap;
  color: var(--gold); font-size: 24px; text-shadow: 0 2px 0 #000, 0 0 8px rgba(255,211,92,.6); animation: vente-monte 1.1s steps(11) forwards; z-index: 3; }
#sell-dbl { position: relative; overflow: visible; }
@keyframes vente-monte { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.8); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -40px); } }

/* ---------- 2.1 : coffre scellé à l'étage (annonce) ---------- */
#h-banner .banner.precieux .t { color: #ff8a8a; text-shadow: 0 2px 0 #000, 0 0 10px rgba(255,107,107,.7); animation: precieux-luit 1.2s steps(6) infinite alternate; }
#h-banner .banner.precieux .s { color: #ffd0d0; }
@keyframes precieux-luit { to { text-shadow: 0 2px 0 #000, 0 0 18px rgba(255,138,138,1); } }
.precieux-voile { position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(255,70,70,.28) 100%); animation: precieux-voile 2.4s ease-out forwards; }
@keyframes precieux-voile { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- 2.1 / 2.3 : fenêtre de l'escalier (coffre oublié, faille) ---------- */
.svote .sv-raison { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 4px 0; font-size: 24px; }
.svote .sv-raison img { width: 40px; height: 40px; image-rendering: pixelated; }
.svote .sv-raison.scelle { color: #ff8a8a; }
.svote .sv-raison.faille { color: #d9a8ff; }
.svote .sv-raison.coffre { color: var(--gold); }
.svote .sv-raison img { animation: bd-hop .5s steps(4) infinite alternate; }
/* Vote d'entrée dans la faille (5/11) : fenêtre violette, le légendaire en ombre qui palpite derrière. */
.fvote { background: radial-gradient(ellipse at center, rgba(60,20,110,.55), rgba(3,2,14,.7)); }
.fvote .fv-box { border-color: #b07cff; box-shadow: 0 0 0 2px #2a1050, 0 0 28px rgba(176,124,255,.55); background: linear-gradient(#1c0f38, #0d0820); animation: fv-in .35s steps(5); }
.fvote .fv-titre { color: #e4c8ff; text-shadow: 2px 2px 0 #3a1470; }
.fvote .fv-legende { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px 0 4px; font-size: 18px; text-align: left; }
.fvote .fv-leg { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: none; }
.fvote .fv-leg b { color: #e4c8ff; font-size: 16px; text-shadow: 1px 1px 0 #3a1470; }
.fvote .fv-ombre { width: 64px; height: 64px; image-rendering: pixelated; border: 2px solid #b07cff; animation: fv-ombre 1.4s steps(6) infinite alternate; }
.fvote .fv-danger { margin: 6px 0; text-align: center; font-size: 18px; color: #ff9a9a; }
.fvote .btn.primary { color: #e4c8ff; filter: hue-rotate(215deg) saturate(1.3); }
@keyframes fv-in { from { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } to { transform: scale(1); } }
@keyframes fv-ombre { from { transform: translateY(0); box-shadow: 0 0 4px #8a50ff; } to { transform: translateY(-3px); box-shadow: 0 0 14px #e4c8ff; } }
body:has(.fvote) #h-pause, body:has(.fvote) .tuto-bulle { display: none; } /* la fenêtre dit déjà que le jeu attend le vote */
/* (5/11) chaque joueur et sa réponse : prêt, attendu (le sien clignote), absent ou K.O. (grisé, ne compte pas) */
.fvote .fv-joueurs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.fvote .fv-j { padding: 2px 8px; border: 2px solid #4a2a80; background: #140a2a; font-size: 15px; white-space: nowrap; }
.fvote .fv-pret { border-color: #b07cff; color: #e4c8ff; }
.fvote .fv-neuf { animation: fv-pret .3s steps(3); }
.fvote .fv-att { color: #c9b8e8; }
.fvote .fv-moi { border-color: #ffe27a; animation: fv-moi 1s steps(2) infinite; }
.fvote .fv-hors { opacity: .6; border-style: dashed; color: #9a8cb8; }
.fvote .fv-note { font-size: 14px; margin-top: 4px; }
@keyframes fv-pret { from { transform: scale(1.25); } to { transform: scale(1); } }
@keyframes fv-moi { 50% { border-color: #b07cff; } }
/* (5/11) Qui l'équipe attend, et le rappel quand on veut ouvrir le menu pendant le vote */
.fvote .fv-attente { margin-top: 6px; font-size: 16px; color: #ffe27a; }
.fvote .fv-a-toi { animation: fv-moi 1s steps(2) infinite; }
.fvote .fv-rappel-txt { margin-top: 6px; font-size: 16px; color: #ffe27a; text-align: center; }
.fvote .fv-box.fv-rappel { animation: fv-rappel .4s steps(6); }
@keyframes fv-rappel { 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
/* (5/11, testeur de la faille) Téléphone couché : la fenêtre tient entre le joystick et la colonne des ronds de droite
   (pause, discussion, émotes) et entre les boutons d'attaque, sans texte coupé ; les touches du clavier (O), (N) se cachent au doigt.
   Pas de « body.is-touch » ici : le premier toucher remettait la fenêtre en page pendant le toucher, qui tombait à côté du bouton. */
@media (max-height: 520px) {
  .fvote .fv-box { width: min(470px, calc(100vw - 400px)) !important; max-height: calc(100vh - 12px); overflow: auto; margin-right: auto; margin-left: auto; }
  .fvote .fv-titre { font-size: 16px; line-height: 1.2; }
  .fvote .fv-legende { font-size: 14px; gap: 8px; margin: 4px 0 2px; line-height: 1.2; }
  .fvote .fv-ombre { width: 40px; height: 40px; }
  .fvote .fv-leg b { font-size: 13px; }
  .fvote .fv-danger { font-size: 14px; margin: 2px 0; line-height: 1.2; }
  .fvote .fv-danger + .muted { font-size: 13px !important; margin: 0 0 4px !important; line-height: 1.2; }
  .fvote .sv-act .btn { min-height: 36px; font-size: 15px; padding: 0 10px; }
  .fvote .sv-tally { margin-top: 4px !important; font-size: 14px !important; }
  .fvote .fv-attente, .fvote .fv-rappel-txt { font-size: 14px; margin-top: 3px; }
  .fvote .fv-j { font-size: 13px; padding: 1px 6px; }
}
@media (pointer: coarse) { .fvote .sv-act .muted { display: none; } }
@media (prefers-reduced-motion: reduce) { .fvote .fv-box.fv-rappel, .fvote .fv-a-toi { animation: none; } }
@media (prefers-reduced-motion: reduce) { .fvote .fv-box, .fvote .fv-ombre, .fvote .fv-neuf, .fvote .fv-moi { animation: none; } }
.bd-refus { opacity: .5; filter: grayscale(.6); cursor: not-allowed; }
.bd-refus-msg { font-size: 15px; color: #ff9a8a; margin-top: 2px; }
