/* Retouches de l'interface sur ordinateur (30/10, analyse de l'interface). Le téléphone (body.is-touch) a ses propres règles. */

/* Bulles de message : en haut au centre, plus jamais devant les boutons du bas (tirage, boutique, fiche). */
body:not(.is-touch) #toast { top: 8px; bottom: auto; transform-origin: 50% 0; }
body:not(.is-touch).in-donjon #toast { top: 60px; }
body:not(.is-touch) #toast div { animation: toastHaut .25s ease-out; box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
@keyframes toastHaut { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Porte-monnaie : les puces ont un nom, on garde une seule ligne lisible */
body:not(.is-touch) .wallet .chip { cursor: help; }
/* Réglage « Textes gris plus clairs » (activé par défaut depuis le playtest du 30/10) ; la taille passe par l'échelle de l'interface (js/echelle.js) */
body.grand-texte { --dim: #c4cde6; }
body.grand-texte .muted { color: #c4cde6; }

/* Bulles d'aide du donjon (client/js/tuto.js, refaites le 5/11) : en haut, sous le bandeau « Donjon · Étage », jamais sur le joueur */
.tuto-bulle { position: fixed; left: 50%; top: calc(48px * var(--hud, 1)); transform: translateX(-50%) scale(var(--hud, 1)); transform-origin: 50% 0; z-index: 40;
  max-width: min(560px, 80vw); display: flex; align-items: center; gap: 10px; padding: 6px 12px; pointer-events: auto;
  font-size: 16px; line-height: 1.3; color: #fff; text-shadow: 0 2px 0 #000; border: 10px solid transparent;
  border-image: url('assets/ui/cadres/cadre1_blue.png') 8 fill / 10px stretch; image-rendering: pixelated; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.tuto-bulle::before { content: '!'; flex: none; width: 14px; font: 22px/1 'PMD Font', monospace; color: #ffe14a; text-align: center;
  text-shadow: 2px 0 #5a3a00, -2px 0 #5a3a00, 0 2px #5a3a00, 0 -2px #5a3a00; animation: tutoBob .8s ease-in-out infinite; }
.tuto-bulle.tuto-in { animation: tutoIn .3s cubic-bezier(.2, 1.4, .4, 1); }
.tuto-bulle.tuto-out { animation: tutoOut .25s ease-in forwards; }
@keyframes tutoIn { from { transform: translate(-50%, -12px) scale(var(--hud, 1)); opacity: 0; } to { transform: translateX(-50%) scale(var(--hud, 1)); opacity: 1; } }
@keyframes tutoOut { to { transform: translate(-50%, -10px) scale(var(--hud, 1)); opacity: 0; } }
@keyframes tutoBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
.tuto-txt { flex: 1; }
.tuto-n { color: #ffd35c; margin-right: 6px; }
.tuto-x { flex: none; font: inherit; font-size: 14px; color: #c4cde6; background: rgba(10, 20, 60, .6); border: 2px solid rgba(127, 166, 239, .6); border-radius: 4px; padding: 0 8px; cursor: pointer; }
.tuto-x:hover { border-color: #ffd35c; color: #fff; }
/* Boutique Kecleon en grille (30/10) */
.pc-shop .shop-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 8px; margin-top: 6px; }
.pc-shop .shop-carte { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 8px; margin: 0; }
.pc-shop .shop-carte > img, .pc-shop .shop-carte > .ico16, .pc-shop .shop-carte > .ico16t { width: 48px; height: 48px; image-rendering: pixelated; font-size: 32px; }
.pc-shop .shop-carte .grow { flex: 1; font-size: 16px; }
.pc-shop .shop-carte.epuise { opacity: .5; }
/* Défis des donjons repliables */
.pc-def { margin: 6px 0; border: 2px solid rgba(255, 255, 255, .14); border-radius: 4px; background: rgba(10, 16, 40, .55); }
.pc-def > summary { cursor: pointer; padding: 6px 10px; font-size: 18px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pc-def > summary .muted { font-size: 16px; }
.pc-def[open] > summary { border-bottom: 1px solid rgba(255, 255, 255, .12); }
.pc-def > .ach-grid { padding: 6px; }
/* Menu du camp regroupé (30/10) : Partir · Mes Pokémon · Au bourg, puis une ligne de petits boutons */
body:not(.is-touch) .hub-mini .menu { gap: 2px; }
body:not(.is-touch) .hub-mini .menu-t { font-size: 16px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; margin: 6px 0 0 8px; }
body:not(.is-touch) .hub-mini .menu-t:first-child { margin-top: 2px; }
/* 31/10 : quatre boutons (Nouveautés, Amis, Compte, Réglages) sur deux colonnes. */
body:not(.is-touch) .hub-mini .menu-plus { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 6px; }
body:not(.is-touch) .hub-mini .menu-plus .btn { flex: 1; font-size: 20px; padding: 4px 4px; justify-content: center; }
body:not(.is-touch) .hub-mini .menu-plus .btn .ico { width: auto; margin-right: 4px; }
body:not(.is-touch) .hub-mini .menu-plus .btn .ico .pxi { max-height: 16px; width: auto; }
/* HUD du donjon sur ordinateur (30/10) : journal plus petit qui s'efface, mini-carte plus discrète (M pour l'agrandir), ping caché sauf s'il est lent */
body:not(.is-touch) .hud-log { width: min(440px, calc(100vw - 420px)); min-height: 0; transition: opacity .6s; }
body:not(.is-touch) .hud-log.calme { opacity: .35; }
body:not(.is-touch) .hud-log:empty { display: none; }
body:not(.is-touch) .minimap { width: min(170px, 15vw); }
body:not(.is-touch).mm-grande .minimap { width: min(380px, 34vw); }
body:not(.is-touch) .mm-box::after { content: attr(data-aide); display: block; font-size: 12px; color: var(--dim); text-align: right; }
body:not(.is-touch).mm-grande .mm-box::after { content: 'M : réduire'; }
body:not(.is-touch) .ping { display: none; }
body:not(.is-touch) .ping.lent { display: block; color: #ffb36b; }
/* Vote d'arrêt (04/11/2026) : la fenêtre passe devant la bulle du tutoriel, et apparaît en glissant. */
body:has(.arret-vote) .tuto-bulle { display: none; }
.arret-vote { animation: arret-in .28s cubic-bezier(.2,1.4,.5,1) both; }
@keyframes arret-in { from { opacity: 0; margin-top: -18px; } to { opacity: 1; margin-top: 0; } }
#rejouer.pret { box-shadow: 0 0 0 2px var(--ok, #9dffb8) inset; }
