@font-face { font-family: 'Pixelify'; src: url('assets/fonts/PixelifySans.ttf') format('truetype'); font-weight: 400 700; font-display: block; }
/* Police d'Explorateurs du Ciel, tirée de la ROM de Kiko (1 pixel = 1 unité, nette à 16, 32 ou 48 px). */
@font-face { font-family: 'PMD Font'; src: url('assets/fonts/pmd-font.ttf') format('truetype'); font-display: block; }

:root {
  --ink: #070d24; --panel: #0d1838; --panel2: #091230; --line: #31508f; --line-in: #7fa6ef; --line-hi: #cfe0ff;
  --gold: #ffd35c; --gold2: #f0a830; --gold-line: #b88a2e; --txt: #eef3ff; --dim: #8ea3cf; --ok: #6ee27a; --bad: #ff6b6b;
  --hp: #4fe06b; --hp-mid: #ffd24a; --hp-low: #ff5a4a; --xp: #ffd35c; --name: #ffd35c; --move: #7fd0ff;
  --shadow: 0 2px 0 #030716;
  --diamond: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9'%3E%3Cpath d='M4.5 0L9 4.5 4.5 9 0 4.5z' fill='%23cfe0ff'/%3E%3Cpath d='M4.5 2.5L6.5 4.5 4.5 6.5 2.5 4.5z' fill='%23ffd35c'/%3E%3C/svg%3E");
  --stars: radial-gradient(rgba(170,200,255,.07) 1px, transparent 1.4px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #040816; color: var(--txt); font-family: 'PMD Font', 'Pixelify', system-ui, sans-serif; font-size: 24px; line-height: 1.25; user-select: none; -webkit-user-select: none; }
b, strong, h2, h3 { font-weight: normal; }
canvas#game { position: fixed; inset: 0; width: 100vw; height: 100vh; image-rendering: pixelated; display: block; }
.hidden { display: none !important; }
button { font-family: inherit; }
b, strong { font-weight: 600; }
.nm-poke { color: var(--name); } .nm-move { color: var(--move); }

/* ---------- Fenêtres façon Donjon Mystère (double liseré, losanges aux coins) ---------- */
.box { position: relative; padding: 6px 10px; text-shadow: 0 2px 0 #000;
  border: 16px solid transparent; border-image: url('assets/ui/cadres/cadre1_blue_translucide.png') 8 fill / 16px stretch;
  image-rendering: pixelated; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.box.gold { border-image-source: url('assets/ui/cadres/cadre1_yellow_translucide.png'); }
.box h2 { margin: 0 0 8px; color: var(--gold); font-size: 32px; line-height: 1.1; }
.box h3 { margin: 12px 0 4px; color: #8fd0ff; font-size: 24px; }
.box h3::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 6px; background: url('assets/ui/curseurs/curseur_menu.png') center / contain no-repeat; image-rendering: pixelated; }
.sep { height: 2px; margin: 10px 0; background: linear-gradient(90deg, transparent, var(--line-in), transparent); opacity: .5; }

#ui { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 10; }
#ui > * { pointer-events: auto; }
/* Échelle de l'interface (js/echelle.js, playtest 1.4) : transform: scale(--ui) plutôt que zoom (les cadres en 9 morceaux bavent avec zoom
   dans certains navigateurs, et Firefox ne le gère qu'à partir de la 126). La boîte de mise en page est divisée par --ui pour que tout tienne. */
.screen { transform: scale(var(--ui, 1)); transform-origin: 50% 50%; width: min(1100px, calc((100vw - 24px) / var(--ui, 1))); max-height: calc((100vh - 24px) / var(--ui, 1)); max-height: calc((100dvh - 24px) / var(--ui, 1)); overflow: auto; animation: pop .24s cubic-bezier(.2,1.25,.4,1); }
@keyframes pop { from { translate: 0 8px; scale: .97; opacity: 0; } to { translate: 0 0; scale: 1; opacity: 1; } }
/* Barres de défilement dans la DA du jeu (playtest 1.17), partout */
* { scrollbar-width: thin; scrollbar-color: #4a60b8 #0a1233; }
*::-webkit-scrollbar { width: 10px; height: 10px; } *::-webkit-scrollbar-track { background: #0a1233; box-shadow: inset 0 0 0 2px #1a2d63; }
*::-webkit-scrollbar-thumb { background: #4a60b8; border: 2px solid #0a1233; } *::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* Boutons : plaques bleu nuit, curseur ▶ au survol comme dans les menus du jeu */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 2px 12px 2px 22px; cursor: pointer;
  border: 12px solid transparent; border-image: url('assets/ui/cadres/cadre1_blue_fin.png') 8 fill / 12px stretch; image-rendering: pixelated;
  background: none; color: var(--txt); font-size: 24px; font-family: inherit; text-shadow: 0 2px 0 #000; transition: transform .08s, filter .12s; }
.btn::before { content: ''; position: absolute; left: 0; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: url('assets/ui/curseurs/curseur_menu.png') center / contain no-repeat; image-rendering: pixelated; opacity: 0; transition: .1s; }
.btn:hover, .btn.focus, .btn:focus-visible { outline: none; filter: brightness(1.25); }
.btn:hover::before, .btn.focus::before, .btn:focus-visible::before { opacity: 1; transform: none; animation: nudge .6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(3px); } }
.btn:active { transform: translateY(1px); }
.btn.primary { border-image-source: url('assets/ui/cadres/cadre1_yellow_fin.png'); color: #ffe27a; }
.btn.danger { border-image-source: url('assets/ui/cadres/cadre1_pink_fin.png'); color: #ffb0c8; }
.btn:disabled { filter: grayscale(.7) brightness(.6); cursor: not-allowed; transform: none; }
.btn .key { display: inline-block; min-width: 22px; padding: 0 5px; border-radius: 3px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.3); font-size: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; }
.muted { color: var(--dim); }
.gold-t { color: var(--gold); }
input.field { font-family: inherit; font-size: 24px; padding: 2px 8px; border: 12px solid transparent; border-image: url('assets/ui/cadres/cadre1_green_fin.png') 8 fill / 12px stretch; image-rendering: pixelated; background: none; color: var(--txt); outline: none; }
input.field:focus, input.field.focus { border-color: var(--gold-line); }
input[type=checkbox] { accent-color: var(--gold); width: 18px; height: 18px; }
input[type=range] { accent-color: var(--gold); width: 260px; }

/* ---------- Titre ---------- */
.title-screen { text-align: center; pointer-events: auto; }
.logo { font-size: clamp(48px, 9vw, 110px); line-height: .95; color: var(--gold); letter-spacing: 3px;
  text-shadow: 0 4px 0 #a35b00, 0 8px 0 #3a1b00, 0 0 40px rgba(255,200,80,.45); animation: float 3s ease-in-out infinite; }
.logo small { display: block; font-size: .32em; color: #bfe0ff; letter-spacing: 6px; text-shadow: 0 3px 0 #0b1a4a; margin-top: 10px; }
@keyframes float { 50% { transform: translateY(-8px); } }
.press { margin-top: 40px; font-size: 24px; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ---------- Camp ---------- */
.hub { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu .btn { justify-content: flex-start; font-size: 24px; padding: 12px 16px; }
.menu .btn .ico { width: 28px; text-align: center; }
.wallet { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.2); font-size: 16px; }
.hero { display: flex; gap: 18px; align-items: center; }
.hero canvas { image-rendering: pixelated; }
.portrait { width: 80px; height: 80px; image-rendering: pixelated; border: 3px solid var(--box-line); border-radius: 8px; background: #0a1233; }
.types { display: flex; gap: 6px; }
.type { padding: 2px 8px; border-radius: 6px; font-size: 16px; color: #111; text-shadow: none; font-weight: 700; }

/* ---------- Grilles de Pokémon ---------- */
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: calc(52vh / var(--ui, 1)); overflow: auto; padding: 4px; align-content: start; }
.dex-cell { position: relative; padding: 4px; border-radius: 10px; border: 2px solid rgba(159,195,255,.35); background: rgba(0,0,0,.25); cursor: pointer; text-align: center; font-size: 16px; transition: transform .08s, border-color .1s; }
.dex-cell img { width: 64px; height: 64px; image-rendering: pixelated; display: block; margin: 0 auto; }
.dex-cell:hover, .dex-cell.focus { border-color: var(--gold); transform: translateY(-2px); }
.dex-cell.sel { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 16px rgba(255,216,90,.5); }
.dex-cell.locked { filter: grayscale(1) brightness(.35); cursor: default; }
.dex-cell .badge { position: absolute; top: 2px; right: 4px; font-size: 16px; }
.stars { color: var(--gold); letter-spacing: -1px; }

/* ---------- Salon ---------- */
.code { font-size: 64px; letter-spacing: 10px; color: var(--gold); text-shadow: 0 4px 0 #6b3b00; }
.players { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pslot { min-height: 150px; border-radius: 10px; border: 2px dashed rgba(159,195,255,.35); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; background: rgba(0,0,0,.2); }
.pslot.filled { border-style: solid; }
.pslot.ready { border-color: var(--ok); box-shadow: 0 0 12px rgba(110,226,122,.35); }
.dungeons { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.dg { border-radius: 10px; border: 2px solid rgba(159,195,255,.35); padding: 10px; cursor: pointer; background: rgba(0,0,0,.25); }
.dg.sel { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.dg.locked { opacity: .45; cursor: not-allowed; }
.dg b { color: var(--gold); }

/* ---------- Interface en jeu ---------- */
#hud { position: fixed; left: 0; top: 0; width: calc(100% / var(--hud, 1)); height: calc(100% / var(--hud, 1)); transform: scale(var(--hud, 1)); transform-origin: 0 0; pointer-events: none; z-index: 5; text-shadow: var(--shadow); }
#hud .box { padding: 10px 12px; }
.hud-panel { position: absolute; left: 12px; top: 12px; width: 330px; }
.hud-me { display: grid; grid-template-columns: 58px 1fr; gap: 4px 10px; align-items: center; }
.hud-me img.pt { width: 58px; height: 58px; grid-row: span 3; image-rendering: pixelated; border: 2px solid var(--line-in); border-radius: 3px; background: #0a1233; box-shadow: 0 0 0 1px var(--ink); }
.hud-name { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.hud-name b { color: var(--txt); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* (7/11) Le nom n'est plus écrasé par les icônes (bandanas, couronne, Résugraine, rang) : il garde sa place, et les icônes
   passent à la ligne s'il n'y a pas assez de largeur. */
.hud-name { flex-wrap: wrap; row-gap: 2px; }
.hud-name > b { flex: 1 0 auto; min-width: 0; max-width: 100%; }
#h-seed { display: inline-flex; align-items: center; gap: 1px; }
.hud-graine { width: 24px; height: 24px; image-rendering: pixelated; filter: drop-shadow(0 0 3px rgba(255, 220, 120, .55)); animation: hudGraine 1.6s steps(2, end) infinite; }
.hud-graine-n { color: var(--gold); font-size: 14px; flex: none !important; }
@keyframes hudGraine { 50% { filter: drop-shadow(0 0 6px rgba(255, 230, 140, .9)); } }
.lvl { padding: 0 7px; border: 1px solid var(--gold-line); border-radius: 3px; color: var(--gold); font-size: 16px; background: rgba(0,0,0,.35); white-space: nowrap; }
.stat-row { display: grid; grid-template-columns: 16px 1fr auto; gap: 6px; align-items: center; font-size: 16px; }
.stat-row .ic { font-size: 16px; text-align: center; }
.bar { position: relative; height: 10px; background: #0b1128; border: 1px solid #02050f; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(127,166,239,.25); }
.bar > i { position: absolute; inset: 0; width: 100%; transform-origin: left; background: linear-gradient(180deg, #8dffa0, var(--hp) 45%, #2fae4c); transition: transform .15s; }
.bar > i.lag { background: #ff9d6b; transition: transform .6s .25s; }
.bar.xp { height: 6px; } .bar.xp > i { background: linear-gradient(180deg, #fff1a8, var(--xp) 50%, #d79a1d); }
.hud-sep { height: 1px; margin: 8px 0 6px; background: linear-gradient(90deg, transparent, var(--line-in), transparent); opacity: .6; }
.mate { display: grid; grid-template-columns: 30px 1fr auto; gap: 2px 8px; align-items: center; margin-top: 4px; font-size: 16px; }
.mate img { width: 30px; height: 30px; grid-row: span 2; image-rendering: pixelated; border-radius: 3px; border: 1px solid var(--line); background: #0a1233; }
.mate .bar { height: 7px; grid-column: 2 / 4; }
.mate.down img { filter: grayscale(1) brightness(.6); }
.mate.down .nmm::after { content: " — K.O."; color: var(--bad); animation: blink 1s steps(2) infinite; }
.hud-pill { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); padding: 4px 16px; border-radius: 999px; font-size: 16px; white-space: nowrap;
  background: rgba(8,15,40,.88); border: 1px solid var(--line); box-shadow: 0 0 0 1px var(--ink); }
.hud-pill b { color: var(--gold); }
.mm-box { position: absolute; right: 12px; top: 12px; padding: 6px !important; }
.minimap { display: block; width: min(210px, calc(18vw / var(--hud, 1))); image-rendering: pixelated; }
.ping { position: absolute; right: 16px; top: 2px; font-size: 16px; color: var(--dim); }
.actions { position: absolute; right: 12px; bottom: 14px; display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.mv { position: relative; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; width: 238px; min-height: 46px; padding: 5px 10px 5px 6px; border-radius: 4px; overflow: hidden;
  background: linear-gradient(180deg, rgba(26,45,99,.95), rgba(13,26,66,.95)); border: 2px solid var(--line); box-shadow: inset 0 0 0 1px #0a1230, inset 0 0 0 2px rgba(127,166,239,.3), 0 0 0 1px var(--ink); }
.mv .orb { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 42%), var(--tc); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 0 0 2px rgba(0,0,0,.4), 0 0 10px var(--tc); }
.mv .txt { line-height: 1.05; min-width: 0; }
.mv .nm { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv .sub { font-size: 16px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv .k { font-size: 16px; padding: 1px 6px; border-radius: 3px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.3); }
.mv .cd { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; padding-right: 48px; font-size: 24px; color: #fff; background: rgba(3,6,20,.6); }
.mv.ready { animation: readyflash .4s; }
@keyframes readyflash { 0% { box-shadow: inset 0 0 0 30px rgba(255,255,255,.35), 0 0 0 2px #fff; } 100% { box-shadow: inset 0 0 0 1px #0a1230, 0 0 0 1px var(--ink); } }
.mv.locked { opacity: .5; border-style: dashed; background: rgba(8,15,40,.7); }
.mv.linked { border-color: var(--gold-line); box-shadow: inset 0 0 0 1px #0a1230, inset 0 0 0 2px rgba(255,211,92,.35), 0 0 12px rgba(255,211,92,.25); }
.hud-log { position: absolute; left: 12px; bottom: 12px; width: min(620px, calc((100vw - 290px) / var(--hud, 1))); min-height: 44px; padding: 8px 14px !important; display: flex; flex-direction: column; gap: 2px; justify-content: flex-end; }
.hud-log div { font-size: 16px; animation: logIn .25s; }
.hud-log div::before { content: "▸ "; color: var(--gold); }
.hud-log div.old { opacity: .55; }
@keyframes logIn { from { transform: translateY(6px); opacity: 0; } }
.banner { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); text-align: center; white-space: nowrap; animation: bannerIn 2.8s forwards; }
.banner .t { font-size: 48px; color: var(--gold); letter-spacing: 2px; text-shadow: 0 3px 0 #6b3b00, 0 6px 0 rgba(0,0,0,.4), 0 0 28px rgba(255,200,80,.45); }
.banner .s { display: inline-block; margin-top: 6px; padding: 3px 18px; font-size: 24px; color: #dfe9ff; background: rgba(8,15,40,.8); border-top: 1px solid var(--line-in); border-bottom: 1px solid var(--line-in); }
.banner.small .t { font-size: 32px; }
.banner.small { top: 12%; }
@keyframes bannerIn { 0% { opacity: 0; transform: translate(-50%, 16px); } 10% { opacity: 1; transform: translate(-50%, 0); } 82% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -6px); } }
.picks { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -55%); display: flex; gap: 14px; pointer-events: auto; animation: pop .3s; }
.pick { position: relative; width: 220px; padding: 14px 12px 12px; border-radius: 5px; text-align: center; cursor: pointer;
  background: var(--stars) 0 0 / 23px 23px, linear-gradient(180deg, rgba(30,24,80,.97), rgba(12,10,40,.97)); border: 2px solid var(--gold-line);
  box-shadow: inset 0 0 0 2px #0a0820, inset 0 0 0 3px rgba(255,211,92,.4), 0 10px 30px rgba(0,0,0,.6); transition: transform .12s; }
.pick::before { content: ""; position: absolute; inset: 3px; pointer-events: none; background: var(--diamond) left top no-repeat, var(--diamond) right top no-repeat, var(--diamond) left bottom no-repeat, var(--diamond) right bottom no-repeat; }
.pick .ic { font-size: 32px; height: 40px; }
.pick b { display: block; color: var(--gold); font-size: 24px; margin-top: 2px; }
.pick p { margin: 6px 0 8px; font-size: 16px; color: #dfe6ff; min-height: 38px; }
.pick .k { font-size: 16px; padding: 1px 8px; border-radius: 3px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.3); }
.pick:hover { transform: translateY(-4px); }
.picks-title { position: absolute; left: 50%; top: calc(50% - 190px); transform: translateX(-50%); font-size: 32px; color: var(--gold); white-space: nowrap; text-shadow: 0 3px 0 #6b3b00; }
.bossbar { position: absolute; left: 50%; top: 46px; transform: translateX(-50%); width: min(560px, calc(50vw / var(--hud, 1))); text-align: center; padding: 6px 14px !important; }
.bossbar .bn { font-size: 16px; margin-bottom: 4px; } .bossbar .bn b { color: #ff9a8a; }
.bossbar .bar { height: 12px; } .bossbar .bar > i { background: linear-gradient(180deg, #ffb0a0, #ff4a4a 50%, #b02a2a); }
.stairs-bar { position: absolute; left: 50%; top: 64%; transform: translateX(-50%); width: 240px; text-align: center; padding: 6px 12px !important; font-size: 16px; }
.stairs-bar .bar { margin-top: 4px; } .stairs-bar .bar > i { background: linear-gradient(180deg, #fff1a8, var(--gold) 50%, #d79a1d); }

/* ---------- Gacha ---------- */
.gacha-stage { position: fixed; left: 0; top: 0; width: calc(100% / var(--ui, 1)); height: calc(100% / var(--ui, 1)); transform: scale(var(--ui, 1)); transform-origin: 0 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle, #1b1250, #04030f); }
.gacha-stage canvas { image-rendering: pixelated; }
.reveal-card { width: 240px; padding: 14px; border-radius: 14px; border: 3px solid var(--c); text-align: center; background: rgba(255,255,255,.06); box-shadow: 0 0 40px -6px var(--c); animation: grow .55s cubic-bezier(.2,1.5,.4,1); }
@keyframes grow { from { transform: scale(0) rotate(-14deg); } }
.results-grid { display: grid; grid-template-columns: repeat(5, 120px); gap: 10px; }
.rcard { padding: 8px; border-radius: 10px; border: 2px solid var(--c); text-align: center; font-size: 16px; background: rgba(255,255,255,.05); box-shadow: 0 0 14px -4px var(--c); animation: grow .4s both; }
.rcard img { width: 72px; height: 72px; image-rendering: pixelated; }
.rcard .nv { color: var(--ok); }
.shine { position: relative; overflow: hidden; }
.shine::before, .shine::after { content: ''; position: absolute; width: 18px; height: 18px; pointer-events: none; image-rendering: pixelated;
  background: url('assets/ui/icones/etincelle.png') no-repeat 0 0 / 400% 100%; animation: pxScint 1.5s steps(1, end) infinite; }
.shine::before { left: 6px; top: 8px; animation-delay: -.7s; } .shine::after { right: 6px; top: 40px; }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }

#toast { position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) scale(var(--ui, 1)); transform-origin: 50% 100%; z-index: 50; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
#toast div { padding: 8px 16px; border-radius: 10px; background: rgba(5,10,31,.92); border: 2px solid var(--box-line); animation: logIn .2s; }

@media (max-width: 760px) {
  .hub { grid-template-columns: 1fr; }
  .players { grid-template-columns: repeat(2, 1fr); }
  .mv { width: 92px; } .mv .nm { font-size: 16px; }
  .results-grid { grid-template-columns: repeat(3, 100px); }
}
.orb-big { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center; color: #fff; font-size: 24px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.6), transparent 42%), var(--tc); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 0 0 0 2px rgba(0,0,0,.4), 0 0 16px var(--tc); }

/* ---------- Téléphone et tablette ---------- */
#touch { position: fixed; inset: 0; z-index: 8; pointer-events: none; display: none; touch-action: none; }
#touch.ingame { display: block; }
#touch .t-zone { position: absolute; left: 0; top: 18%; bottom: 0; width: 50%; pointer-events: none; }
#touch .t-base { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; left: 110px; top: calc(100% - 110px);
  background: radial-gradient(circle, rgba(16,29,68,.35), rgba(16,29,68,.65)); border: 2px solid rgba(127,166,239,.6); box-shadow: 0 0 0 2px rgba(7,13,36,.6); opacity: .55; transition: opacity .15s; }
#touch .t-base.on { opacity: .95; }
#touch .t-knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #cfe0ff, #5a7fd0 60%, #2a3f80); box-shadow: 0 4px 0 rgba(0,0,0,.35), 0 0 0 2px #0a1230; }
#touch .t-btns { position: absolute; right: 18px; bottom: 18px; width: 230px; height: 230px; pointer-events: none; }
#touch .t-btn { position: absolute; width: 84px; height: 84px; border-radius: 50%; pointer-events: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.55), transparent 42%), var(--tc, #2a3a66); border: 3px solid rgba(255,255,255,.65);
  box-shadow: 0 5px 0 rgba(0,0,0,.35), 0 0 0 2px #0a1230, 0 0 14px var(--tc, transparent); color: #fff; text-shadow: 0 2px 0 #000; transition: transform .06s; }
#touch .t-btn b { font-size: 24px; line-height: 1; position: relative; }
#touch .t-btn small { font-size: 16px; max-width: 76px; text-align: center; line-height: 1.05; position: relative; }
#touch .t-btn .t-cd { position: absolute; inset: 0; border-radius: 50%; }
#touch .t-btn.down { transform: scale(.92); box-shadow: 0 2px 0 rgba(0,0,0,.35), 0 0 0 2px #fff; }
#touch .t-btn.empty { opacity: .35; }
#touch .t-b0 { right: 73px; bottom: 0; width: 96px; height: 96px; }
#touch .t-b1 { right: 0; bottom: 78px; }
#touch .t-b2 { right: 150px; bottom: 78px; }
#touch .t-b3 { right: 73px; bottom: 150px; }
#touch .t-pause { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); pointer-events: auto; padding: 4px 14px; border-radius: 4px; font-size: 16px;
  background: rgba(8,15,40,.85); border: 1px solid var(--line); color: var(--txt); }
#touch .t-rotate { display: none; }
@media (orientation: portrait) { #touch.ingame .t-rotate { display: flex; position: fixed; inset: 0; align-items: center; justify-content: center; text-align: center; padding: 30px; font-size: 24px; background: rgba(4,8,24,.92); color: var(--gold); pointer-events: auto; } }

/* Interface en jeu plus compacte sur téléphone */
body.is-touch #hud .actions { display: none; }
body.is-touch .hud-log { width: min(46vw, 420px); bottom: auto; top: 112px; left: 12px; min-height: 0; }
body.is-touch .hud-log div { font-size: 16px; }
@media (max-height: 520px) {
  .hud-panel { width: 250px; padding: 6px 8px !important; }
  .hud-me { grid-template-columns: 42px 1fr; }
  .hud-me img.pt { width: 42px; height: 42px; }
  .hud-name { font-size: 16px; }
  .mate { font-size: 16px; } .mate img { width: 22px; height: 22px; }
  .minimap { width: min(150px, 18vw); }
  .hud-pill { font-size: 16px; top: 8px; }
  .bossbar { top: 34px; width: min(360px, 44vw); }
  .banner .t { font-size: 32px; } .banner .s { font-size: 16px; }
  .picks { gap: 8px; } .pick { width: 30vw; max-width: 200px; padding: 8px; } .pick p { font-size: 16px; min-height: 0; } .pick b { font-size: 16px; } .picks-title { font-size: 24px; top: 6%; }
  .screen { max-height: calc((100vh - 12px) / var(--ui, 1)); max-height: calc((100dvh - 12px) / var(--ui, 1)); }
  .box { padding: 10px 12px; }
  body { font-size: 16px; }
  .btn { font-size: 16px; padding: 7px 14px 7px 20px; }
  .dex-grid { max-height: calc(44vh / var(--ui, 1)); }
}
@media (max-width: 760px) {
  .hub { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: flex-start; }
  .dungeons { grid-template-columns: 1fr 1fr; }
  .code { font-size: 32px; }
}

.code.copyable { cursor: pointer; padding: 0 10px; border-radius: 4px; transition: background .12s; }
.code.copyable:hover { background: rgba(255,211,92,.12); }
.code.copyable::after { content: '⧉'; font-size: 24px; margin-left: 8px; vertical-align: middle; color: var(--dim); }
.code-mini { cursor: pointer; color: var(--gold); letter-spacing: 3px; padding: 0 6px; border: 1px dashed var(--gold-line); border-radius: 3px; }
#toast div .btn { pointer-events: auto; }

/* ---------- Gelées, quêtes, fenêtres modales ---------- */
.gel-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50% 50% 45% 45%; margin-right: 4px; vertical-align: -2px;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.85), transparent 38%), var(--g); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.4); }
.gel-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; font-size: 16px; }
.gel-btn { padding: 2px 10px !important; min-width: 0; font-size: 16px; }
.gel-btn::before { display: none; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px; }
.modal { position: fixed; left: 0; top: 0; width: calc(100% / var(--ui, 1)); height: calc(100% / var(--ui, 1)); transform: scale(var(--ui, 1)); transform-origin: 0 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(3,6,20,.6); animation: pop .2s; overflow-y: auto; }
/* 31/10 : une fenêtre plus haute que l'écran (grande échelle) défile depuis son haut au lieu d'être coupée en haut et en bas. */
.modal > .box { margin: auto; max-width: calc(100vw / var(--ui, 1) - 16px); } /* et jamais plus large que l'écran */
.zbtn { padding: 2px 10px 2px 18px !important; font-size: 16px; }

/* ---------- Roulette de capture, dialogues, pause ---------- */
.roulette { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(3,6,20,.45); pointer-events: auto; animation: pop .25s; z-index: 6; }
.rl-box { padding: 16px 20px !important; text-align: center; }
.rl-title { font-size: 24px; color: var(--gold); margin-bottom: 8px; text-shadow: 0 3px 0 #6b3b00; }
.rl-wheel { position: relative; width: 220px; height: 220px; }
.rl-wheel canvas { width: 220px; height: 220px; }
.rl-pin { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); font-size: 24px; color: var(--gold); text-shadow: 0 2px 0 #000, 0 0 8px rgba(255,211,92,.8); }
.dialog { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); width: min(640px, calc(92vw / var(--hud, 1))); display: flex; gap: 12px; align-items: center; padding: 10px 14px !important; animation: pop .2s; z-index: 6; }
.dialog img { width: 64px; height: 64px; image-rendering: pixelated; border: 2px solid var(--line-in); border-radius: 3px; background: #0a1233; }
.dialog p { margin: 4px 0 0; font-size: 24px; min-height: 24px; }
.dialog.out { opacity: 0; transition: opacity .35s; }
.pause-tag { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); padding: 5px 16px; border-radius: 4px; background: rgba(8,15,40,.9); border: 1px solid var(--gold-line); color: var(--gold); font-size: 16px; white-space: nowrap; z-index: 6; }

/* Menus du camp : une liste de choix dans une seule fenêtre, avec la flèche du jeu */
.menu .btn { border: 0; border-image: none; padding: 6px 8px 6px 26px; justify-content: flex-start; filter: none; }
.menu .btn:hover, .menu .btn.focus { color: var(--gold); filter: none; }
.menu .btn.primary { color: var(--gold); }
.logo, .press, .code, .banner .t, .rl-title, .picks-title { font-family: 'PMD Font', 'Pixelify', sans-serif; }

/* Camp (Bourg Trésor) : petite fenêtre de menu en haut à gauche, le décor reste visible */
.screen.hubwrap { position: fixed; left: 12px; top: 12px; width: 330px; max-height: calc((100vh - 24px) / var(--ui, 1)); transform-origin: 0 0; }
.hub-mini .menu .btn { padding: 2px 8px 2px 26px; font-size: 24px; }
.hub-mini .wallet .chip { font-size: 16px; padding: 2px 8px; }
#camp-say { position: fixed; bottom: 24px; z-index: 20; transform: translateX(-50%) scale(var(--ui, 1)); transform-origin: 50% 100%; }
@media (max-width: 760px) { .screen.hubwrap { width: 250px; } .hub-mini .menu .btn { font-size: 16px; } }

body.in-camp #touch .t-b1, body.in-camp #touch .t-b2, body.in-camp #touch .t-b3 { display: none; }
body.is-touch .screen.hubwrap { width: 240px; }
body.is-touch .hub-mini .menu .btn { font-size: 16px; padding: 0 6px 0 22px; }
body.is-touch .hub-mini .muted, body.is-touch .hub-mini .wallet { display: none; }

/* ---------- Salon au Bourg Trésor, discussion ---------- */
.screen.lobbywrap { position: fixed; right: 12px; top: 12px; width: 360px; max-height: calc((100vh - 24px) / var(--ui, 1)); transform-origin: 100% 0; }
.lobby-mini .code { font-size: 32px; letter-spacing: 6px; }
.lobby-mini .btn { font-size: 16px; }
.ico16 { width: 32px; height: 32px; image-rendering: pixelated; }
.ico16t { width: 32px; text-align: center; font-size: 24px; }
#chat { position: fixed; left: 12px; bottom: 96px; z-index: 12; width: min(520px, 60vw); display: none; flex-direction: column; gap: 4px; pointer-events: none; }
#chat.on { display: flex; }
#chat .chat-log { display: flex; flex-direction: column; gap: 2px; }
#chat .chat-log div { align-self: flex-start; padding: 2px 10px; background: rgba(8,15,40,.82); border: 1px solid var(--line); border-radius: 3px; font-size: 16px; transition: opacity 1s; }
#chat .chat-log div.old { opacity: 0; }
#chat .chat-log b { color: #9ef0ff; font-weight: normal; }
#chat .chat-in { pointer-events: auto; font-family: inherit; font-size: 16px; padding: 6px 10px; border: 2px solid var(--gold-line); background: rgba(8,15,40,.95); color: var(--txt); outline: none; }
#chat .chat-btn { pointer-events: auto; position: fixed; left: 12px; bottom: 62px; width: 36px; height: 30px; padding: 0; border: 1px solid var(--line); background: rgba(8,15,40,.85); color: #fff; font-size: 16px; cursor: pointer; border-radius: 4px; }
body:not(.is-touch) #chat .chat-btn { display: none; }

/* ---------- Écran réaffiché sur place, gelées en sprites ---------- */
.screen.still { animation: none; }
.gel-ico { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: middle; flex: none; }
.chip .gel-ico { margin: -8px 0 -8px -6px; }
.gel-row { position: relative; }
.gel-row.gain .bar i { animation: gelGain .7s ease-out; }
.gel-row.gain > .gel-ico { animation: gelHop .45s ease-out; }
@keyframes gelGain { 0% { filter: brightness(2.4) saturate(1.6); } 100% { filter: none; } }
@keyframes gelHop { 0% { transform: scale(1); } 40% { transform: scale(1.35) translateY(-4px); } 100% { transform: scale(1); } }
.gel-fly { position: absolute; top: 0; left: calc(100% - 36px); width: 32px; height: 32px; image-rendering: pixelated; pointer-events: none; animation: gelFly .7s cubic-bezier(.3,.7,.4,1) forwards; }
@keyframes gelFly { 0% { left: calc(100% - 36px); top: 0; transform: scale(1.2); } 45% { top: -22px; } 100% { left: 96px; top: 2px; transform: scale(.5); opacity: 0; } }
.row.box.gain { animation: upGain .6s ease-out; }
@keyframes upGain { 0% { box-shadow: 0 0 0 2px var(--gold), 0 0 22px rgba(255,216,90,.8); } 100% { box-shadow: none; } }
/* Gelée Dorée (4/11) : au-delà de 150, une barre dorée se remplit par-dessus la barre colorée (de 150 à 200) */
.stat-bar > .bar-or { position: absolute; left: 0; right: 0; top: 2px; bottom: 2px; transform-origin: left; transition: transform .35s steps(6);
  background: linear-gradient(180deg, #fff6b8 0 34%, #ffd23a 34% 70%, #c88a10 70%); box-shadow: 0 0 0 1px #6b4600; }
.stat-bar > .bar-or::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0 40%, rgba(255,255,255,.85) 40% 46%, transparent 46%); background-size: 60px 100%; animation: orBrille 1.6s steps(12) infinite; }
@keyframes orBrille { from { background-position: -60px 0; } to { background-position: 120px 0; } }
.gel-row.dore > .gel-ico { filter: drop-shadow(0 0 3px rgba(255,210,58,.75)); }
.gel-btns { display: flex; gap: 4px; justify-content: flex-end; flex: none; width: 168px; }
@media (max-width: 700px) { .gel-btns { width: 132px; } }
.gel-or-btn { display: inline-flex; align-items: center; gap: 2px; color: #ffe27a !important; border-color: #c88a10 !important; }
.gel-or-btn .gel-ico { width: 24px; height: 24px; margin: -6px -2px; }
.gel-or-btn.off { filter: grayscale(1) brightness(.7); opacity: .65; cursor: help; }
.chip-or { color: #ffe27a; box-shadow: inset 0 0 0 1px #c88a10; }
.gel-or-ico { filter: drop-shadow(0 0 2px rgba(255,210,58,.8)); }
.gel-row.gain-or { animation: orRangee .8s ease-out; }
.gel-row.gain-or .bar-or { animation: gelGain .8s ease-out; }
@keyframes orRangee { 0% { box-shadow: 0 0 0 2px #ffd23a, 0 0 24px rgba(255,210,58,.9); background: rgba(255,210,58,.18); } 100% { box-shadow: none; background: transparent; } }
.or-etincelle { position: absolute; top: 4px; width: 4px; height: 4px; background: #fff6b8; box-shadow: 0 0 0 1px #ffd23a; pointer-events: none; animation: orEtincelle .7s steps(7) forwards; }
@keyframes orEtincelle { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-26px) scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .stat-bar > .bar-or::after, .or-etincelle { animation: none; } }

/* ---------- Bannières scellées, Pokédex shiny ---------- */
.bn-tabs { margin: 18px 0 10px; gap: 8px; }
.bn-tab { position: relative; }
.bn-tab.chained .nm { color: #7d89a6; }
.bn-tab.chained.primary .nm { color: #c9d3ea; }
.bn-tab.chained::before { content: ''; position: absolute; inset: 4px; pointer-events: none; border-radius: 2px;
  background: repeating-linear-gradient(135deg, rgba(0,0,0,.6) 0 5px, rgba(25,30,50,.3) 5px 10px); }
.bn-tab .lock { position: absolute; left: 50%; top: -15px; transform: translateX(-50%); font-size: 16px; z-index: 1; text-shadow: 0 2px 0 #000; }
.bn-tab.chained:hover .lock, .bn-tab.chained.focus .lock { animation: lockShake .45s; }
@keyframes lockShake { 0%,100% { transform: translateX(-50%) rotate(0); } 25% { transform: translateX(-50%) rotate(-14deg); } 75% { transform: translateX(-50%) rotate(12deg); } }
.banner-locked { background: rgba(0,0,0,.55); }
.banner-locked h2 { color: #8a96b3; }
.banner-locked .sil canvas, .zs-cell.shadow canvas { filter: brightness(0) drop-shadow(0 0 1px rgba(150,180,255,.75)); }
.lock-msg { margin: 8px 0; padding: 6px 10px; border: 1px dashed var(--gold-line); background: rgba(0,0,0,.45); font-size: 16px; }
.zone-strip { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; max-height: 172px; overflow: auto; }
.zs-cell { position: relative; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(0,0,0,.25); border: 1px solid rgba(159,195,255,.25); }
.zs-cell canvas { max-width: 100%; max-height: 100%; image-rendering: pixelated; }
.zs-cell.shiny { border-color: #dff6ff; box-shadow: 0 0 0 2px #0a1233, 0 0 0 4px #9ae6ff; }
.zs-cell.shiny::after, .dex-cell.shiny-cell::after { content: ''; position: absolute; right: 0; top: 0; width: 18px; height: 18px; image-rendering: pixelated;
  background: url('assets/ui/icones/etincelle.png') no-repeat 0 0 / 400% 100%; animation: pxScint 1.5s steps(1, end) infinite; }
@keyframes twinkle { 0%,100% { opacity: .4; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
.shiny-tog { color: #9ae6ff; }
.shiny-tog.on { color: #fff; text-shadow: 0 2px 0 #1a4a6a; }
.shiny-view { box-shadow: inset 0 0 0 2px rgba(154,230,255,.35); }
.dex-cell.shiny-cell { border-color: #dff6ff; }

/* ---------- Améliorations par Pokémon ---------- */
.up-strip { display: flex; flex-wrap: wrap; gap: 6px; max-height: 128px; overflow: auto; padding: 8px 4px 4px; margin-top: 6px; }
.up-pick { width: 56px; padding: 2px; }
.up-pick img { width: 48px; height: 48px; }
.up-lv { position: absolute; right: 2px; bottom: 0; font-size: 16px; color: #9ef0ff; text-shadow: 0 2px 0 #000; }
.up-row.full b { color: var(--gold); }
.up-row.full .up-pips { color: var(--gold); text-shadow: 0 0 6px rgba(255,216,90,.6); }
.crown { position: absolute; left: 50%; top: -8px; transform: translateX(-50%); z-index: 1; animation: crownBob 1.2s steps(1, end) infinite; pointer-events: none; }
.crown.pop { animation: crownPop .8s cubic-bezier(.2,1.6,.4,1); }
@keyframes crownBob { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-2px); } }
@keyframes crownBobIn { 50% { transform: translateY(-2px); } }
@keyframes crownPop { 0% { transform: translateX(-50%) scale(0) rotate(-30deg); } 100% { transform: translateX(-50%) scale(1) rotate(0); } }

/* Missions du jour */
.mission .m-ic { font-size: 32px; width: 40px; text-align: center; }
.mission .m-rew { white-space: nowrap; font-size: 16px; color: var(--gold); }
.mission.done b { color: var(--gold); }
.mission.gain { animation: upGain .6s ease-out; }
.job-chip { color: #ffe08a; }
/* Dans le donjon */
#h-jobs { margin-top: 6px; width: min(210px, calc(18vw / var(--hud, 1))); font-size: 16px; display: flex; flex-direction: column; gap: 1px; }
#h-jobs.hidden { display: none; }
#h-jobs .hj-title { color: var(--gold); }
#h-jobs .hj { display: flex; gap: 4px; align-items: center; line-height: 1.1; }
#h-jobs .hj span.grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#h-jobs .hj b { font-weight: normal; color: #9fc3ff; }
#h-jobs .hj.here b { color: #7dffb0; animation: hjBlink .8s steps(2) infinite; }
#h-jobs .hj.done { opacity: .7; } #h-jobs .hj.done b { color: #7dffb0; }
#h-jobs .hj.failed { opacity: .55; text-decoration: line-through; } #h-jobs .hj.failed b { color: #ff8a7a; }
@keyframes hjBlink { 50% { opacity: .3; } }
.jobs-all { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); text-align: center; pointer-events: none; animation: jaIn 3.6s forwards; white-space: nowrap; }
.jobs-all .ja-t { font-family: 'PMD Font', sans-serif; font-size: 32px; color: var(--gold); text-shadow: 0 3px 0 #6b3b00, 0 0 20px rgba(255,200,80,.5); }
.jobs-all .ja-s { display: inline-block; margin-top: 4px; padding: 2px 14px; font-size: 16px; background: rgba(8,15,40,.82); border-top: 1px solid var(--line-in); border-bottom: 1px solid var(--line-in); }
@keyframes jaIn { 0% { opacity: 0; transform: translateX(-50%) scale(.6); } 10% { opacity: 1; transform: translateX(-50%) scale(1.08); } 16% { transform: translateX(-50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; } }
@media (max-width: 760px) { .jobs-all .ja-t { font-size: 24px; } #h-jobs { width: min(150px, 30vw); } }

.log-gel { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: middle; margin: -9px 0 -8px -4px; }

/* ---------- Succès des Pokémon : gelée dorée, étoile dorée, clé dorée, couronne ---------- */
.pk-badges { position: absolute; left: 3px; top: 50px; display: flex; gap: 1px; pointer-events: none; }
.pk-badges > img, .pk-badges > i { width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; image-rendering: pixelated; filter: drop-shadow(0 1px 0 #000); }
.pk-badges.inline { position: static; display: inline-flex; vertical-align: -3px; margin-left: 6px; }
.up-pick .pk-badges { top: 36px; }
.crown .pxi { --k: 2px; display: block; margin: 0; filter: drop-shadow(0 2px 0 rgba(0,0,0,.6)); }
.crown-inline { display: inline-block; vertical-align: -2px; margin: 0 4px; }
.crown-inline .pxi { --k: 2px; display: block; margin: 0; animation: crownBobIn 1.2s steps(1, end) infinite; }
.svg16 { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; } .svg16 svg { width: 100%; height: 100%; display: block; }
.svg16.large { width: 22px; }
.succes-pk .chip { font-size: 16px; gap: 4px; }
.succes-pk .chip .gel-ico { width: 16px; height: 16px; margin: 0; }
.succes-pk .chip.off { opacity: .4; filter: grayscale(1); }
.succes-pk .chip.on { border-color: var(--gold-line); color: var(--gold); }
.shiny-t { margin-left: 4px; }

/* ---------- Bandanas, tri du Pokédex, événement ---------- */
.bd-ico { width: 32px; height: 32px; image-rendering: pixelated; vertical-align: middle; flex: none; }
.chip .bd-ico { margin: -8px 0 -8px -4px; }
.hud-bd { width: 16px; height: 16px; image-rendering: pixelated; vertical-align: -2px; margin-left: 4px; }
.dex-cell .cell-bd { position: absolute; right: 3px; top: 50px; width: 16px; height: 16px; margin: 0; image-rendering: pixelated; filter: drop-shadow(0 1px 0 #000); pointer-events: none; }
.dex-cell.up-pick .cell-bd { top: 36px; }
.zone-sel { font-family: inherit; font-size: 16px; padding: 4px 8px; background: rgba(8,15,40,.95); color: var(--txt); border: 2px solid var(--line); border-radius: 3px; max-width: 220px; }
.team-jobs { margin-top: 4px; padding: 4px 6px; border: 1px dashed rgba(255,216,90,.45); background: rgba(0,0,0,.25); }
.dg.event { border-color: #b070ff; background: linear-gradient(135deg, rgba(60,20,90,.6), rgba(120,50,10,.38)); }
.dg.event.sel { box-shadow: 0 0 0 2px #ff9a3a, 0 0 18px rgba(255,140,40,.5); }
.dg.event b { color: #ffb060; }
.ev-tab { color: #ffb060; }
.event-box { background: linear-gradient(135deg, rgba(60,20,90,.35), rgba(120,50,10,.25)); }

/* ---------- Nouveautés ---------- */
.news-l { margin: 4px 0 0; padding-left: 20px; font-size: 16px; line-height: 1.3; }
.news-l li { margin: 3px 0; }
.news-l li::marker { color: var(--gold); }

/* ---------- Salon : le menu du camp à gauche, le salon à droite ---------- */
#ui > .screen.lobbyduo { position: fixed; left: 12px; top: 12px; width: calc((100vw - 24px) / var(--ui, 1)); height: calc((100vh - 24px) / var(--ui, 1)); max-height: none; overflow: visible; pointer-events: none; animation: none; transform-origin: 0 0; }
.lobby-duo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; height: 100%; }
.lobby-duo > .box { pointer-events: auto; max-height: calc((100vh - 24px) / var(--ui, 1)); overflow: auto; }
.lobby-duo > .hub-mini { width: 330px; } .lobby-duo > .lobby-mini { width: 360px; }
@media (max-width: 760px) { .lobby-duo > .hub-mini { width: 230px; } .lobby-duo > .lobby-mini { width: 290px; } }
body.is-touch .lobby-duo > .hub-mini { width: 220px; }
.btn.mini { padding: 0 6px; min-width: 0; font-size: 16px; border-width: 8px; }
.prop-row { margin-top: 2px; }
.n-proposed { align-self: center; font-size: 16px; color: #8a4a00; }
.salon-avis { margin: 0 0 8px; padding: 6px 10px; font-size: 16px; border: 1px dashed var(--gold-line); background: rgba(0,0,0,.3); }
#chat .chat-log div.ping { border-color: var(--gold-line); color: #ffe9a0; box-shadow: 0 0 10px rgba(255,216,90,.35); }
.gel-btn.gel5 { font-size: 16px; padding: 0 6px; }

/* ---------- Partie à emporter ---------- */
.code-partie { width: 100%; height: 120px; resize: vertical; font-family: monospace; font-size: 12px; word-break: break-all; }
.aide-serveur { margin-top: 12px; font-size: 16px; border-color: var(--gold, #f8d048); }
.aide-serveur ul { margin: 6px 0 0; padding-left: 22px; }
.aide-serveur.pop { animation: aide-pop .45s ease-out; }
@keyframes aide-pop { 0% { transform: scale(.94); opacity: 0; } 60% { transform: scale(1.02); opacity: 1; } 100% { transform: scale(1); } }

/* ---------- Tableau des quêtes : filtre par donjon, relances, places en plus ---------- */
.board-filtre { gap: 6px; margin: 0 0 10px; align-items: center; }
.bf-chip { padding: 3px 10px; font-size: 16px; }
.bf-chip .bf-n { display: inline-block; min-width: 22px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: rgba(0,0,0,.4); color: var(--gold); text-align: center; }
.bf-chip[disabled] { opacity: .4; }
.bf-rr { margin-left: auto; font-size: 16px; white-space: nowrap; }
@media (max-width: 760px) { .bf-chip { padding: 2px 8px; } .bf-rr { width: 100%; text-align: right; } }

/* ---------- Objets à tenir : rareté ---------- */
.rar-tag { display: inline-block; font-size: 14px; line-height: 1.25; padding: 0 6px; margin-left: 4px; border: 1px solid currentColor; border-radius: 6px; vertical-align: middle; background: rgba(0,0,0,.25); }
.rar-tres { animation: rar-brille 1.2s steps(1, end) infinite; }
@keyframes rar-brille { 50% { box-shadow: 0 0 0 2px rgba(255,211,92,.6); } }

/* ---------- Invocation Spectrale (gacha d'Halloween) et tenues ---------- */
.evt-t { color: #ffa13a; text-shadow: 0 0 8px rgba(255,140,30,.45); }
.evt-chip { border-color: #c06a1a !important; color: #ffc27a; }
.bn-tab.evt-tab { background: linear-gradient(180deg, #4a1d6e, #2a0f40); border-color: #ff9a2e; color: #ffd0a0; box-shadow: 0 0 10px rgba(255,140,30,.35); }
.bn-tab.evt-tab:hover { box-shadow: 0 0 16px rgba(255,140,30,.6); }
.evt-gacha { background: radial-gradient(120% 80% at 50% 0%, rgba(120,40,160,.35), transparent 70%), var(--panel, rgba(10,14,40,.92)); }
.evt-prize { border-color: #ff9a2e; box-shadow: inset 0 0 24px rgba(255,140,30,.18), 0 0 14px rgba(160,70,220,.25); }
.evt-prize-pk { position: relative; min-width: 96px; display: flex; justify-content: center; filter: drop-shadow(2px 0 0 #ff9a2e) drop-shadow(-2px 0 0 #ff9a2e) drop-shadow(0 2px 0 #8a3ad0); animation: evt-flotte 2.6s steps(4) infinite; }
@keyframes evt-flotte { 50% { transform: translateY(-5px); } }
.evt-bar i { background: linear-gradient(90deg, #ff7a1a, #ffb04a, #c58bff) !important; }
.btn.evt-btn { border-color: #ff9a2e; }
/* Playtest 2, lot C (compte-profil.js) : avatar dans un cadre de rang, bannières, statistiques */
.avatar { display: inline-block; position: relative; box-sizing: border-box; border: 10px solid transparent; border-image: url('assets/ui/cadres/cadre1_blue_fin.png') 8 fill / 10px stretch; image-rendering: pixelated; background: #0a1233; vertical-align: middle; }
.avatar.rk-bronze { border-image-source: url('assets/ui/cadres/cadre1_bronze_fin.png'); }
.avatar.rk-argent { border-image-source: url('assets/ui/cadres/cadre1_argent_fin.png'); }
.avatar.rk-or { border-image-source: url('assets/ui/cadres/cadre1_or_fin.png'); }
.avatar.rk-diamant { border-image-source: url('assets/ui/cadres/cadre1_diamant_fin.png'); }
.avatar img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.btn.f-prof { padding: 0; border: 0; background: none; box-shadow: none; }
.profil-tete { position: relative; margin: 4px 0 10px; }
/* (24/11, bug Discord) l'avatar passe toujours devant la bannière : son décor animé (Ectoplasma du Manoir Spectral,
   lune, chauves-souris, étoiles, ruban) reste dans la bannière (isolation), l'avatar est au-dessus (z-index) */
.profil-tete .profil-av { position: absolute; left: 14px; bottom: -14px; z-index: 5; }
.profil-tete .banniere .bn-nom { left: 116px; }
.profil-tete .banniere .bn-type { left: 116px; }
.banniere { position: relative; isolation: isolate; height: 104px; border-radius: 6px; overflow: hidden; border: 2px solid rgba(255,255,255,.25); background-color: #141a3a; background-size: auto, 96px 48px; image-rendering: pixelated; box-sizing: border-box; }
.banniere .bn-sprite.ombre canvas { filter: brightness(0) opacity(.3); }   /* (G4) silhouette tant que le Pokémon n'a aucune médaille */
/* (G4, 11/11) bannière d'un Pokémon : cadre en pixels selon ses médailles (bronze, argent, or, diamant), les mêmes cadres que l'avatar */
.banniere.bn-rk { border: 8px solid transparent; border-image: url('assets/ui/cadres/cadre1_bronze_fin.png') 8 / 8px stretch; border-radius: 0; background-clip: padding-box; }
.banniere.bn-rk-argent { border-image-source: url('assets/ui/cadres/cadre1_argent_fin.png'); }
.banniere.bn-rk-or { border-image-source: url('assets/ui/cadres/cadre1_or_fin.png'); box-shadow: 0 0 10px rgba(255,214,90,.35); }
.banniere.bn-rk-diamant { border-image-source: url('assets/ui/cadres/cadre1_diamant_fin.png'); box-shadow: 0 0 14px rgba(160,230,255,.5); }
.banniere.bn-rk.petit { border-width: 6px; border-image-width: 6px; }
.banniere .bn-eclat { position: absolute; top: 0; bottom: 0; left: -30%; width: 18%; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); animation: bnEclat 3.6s steps(18) infinite; }
@keyframes bnEclat { 0%, 55% { left: -30%; } 100% { left: 120%; } }
.banniere.rare { border-color: var(--gold); box-shadow: 0 0 14px rgba(255,214,90,.45), inset 0 0 24px rgba(255,214,90,.15); }
.banniere .bn-nom { position: absolute; left: 12px; bottom: 26px; font-size: 24px; color: #fff; text-shadow: 0 2px 0 #000, 0 0 6px rgba(0,0,0,.6); white-space: nowrap; }
.banniere .bn-type { position: absolute; left: 12px; bottom: 6px; font-size: 16px; color: #eef2ff; text-shadow: 0 1px 0 #000, 0 0 5px rgba(0,0,0,.9); white-space: nowrap; }
.banniere .bn-crown { position: absolute; right: 10px; top: 6px; width: 28px; height: 28px; z-index: 1; filter: drop-shadow(0 0 4px rgba(255,214,90,.8)); }
.banniere .bn-crown .pxi { --k: 2px; }
.banniere.petit .bn-crown .pxi { --k: 1px; }
.banniere .bn-sprite { position: absolute; right: 18px; bottom: 0; width: 1px; height: 1px; }
.banniere .bn-sprite canvas { position: absolute; right: 0; image-rendering: pixelated; pointer-events: none; }
.banniere.petit { height: 66px; cursor: pointer; }
.banniere.petit .bn-nom { font-size: 18px; bottom: 22px; }
.banniere.petit .bn-type { font-size: 14px; bottom: 4px; }
.banniere.petit .bn-crown { width: 16px; height: 16px; }
.banniere.petit .bn-sprite { right: 30px; }
.banniere.sel { outline: 3px solid var(--gold); outline-offset: 1px; }
.banniere.verrou { filter: grayscale(.9) brightness(.55); cursor: not-allowed; }
.bn-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; padding: 2px; }
.av-choix { display: flex; flex-wrap: wrap; gap: 4px; max-height: 190px; overflow: auto; padding: 2px; }
.av-choix img { width: 40px; height: 40px; border: 2px solid transparent; border-radius: 4px; cursor: pointer; image-rendering: pixelated; background: rgba(0,0,0,.3); }
.av-choix img:hover { border-color: #9fc3ff; }
.av-choix img.sel { border-color: var(--gold); box-shadow: 0 0 8px rgba(255,214,90,.6); }
.stat-chips { gap: 6px; margin: 4px 0; }
.stat-chips .chip b { color: var(--gold); margin-right: 2px; }
.stat-titre { margin: 10px 0 4px; font-size: 18px; color: #cfe0ff; }
.stat-barres { display: flex; flex-direction: column; gap: 3px; }
.stat-barres .ligne { display: grid; grid-template-columns: 28px 150px 1fr 90px; align-items: center; gap: 8px; font-size: 16px; }
.stat-barres .ligne img { width: 28px; height: 28px; image-rendering: pixelated; }
.stat-barres .ligne .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-barres .ligne .bar { height: 12px; }
.stat-barres .ligne .bar i { background: linear-gradient(180deg, #ffe08a, var(--gold) 50%, #c89a20); }
.stat-barres .ligne .val { text-align: right; color: var(--gold); }
.stat-detail { margin-top: 6px; font-size: 16px; }
.stat-table { border-collapse: collapse; width: 100%; margin-top: 4px; }
.stat-table th, .stat-table td { padding: 2px 6px; text-align: right; border-bottom: 1px solid rgba(255,255,255,.08); }
.stat-table th:nth-child(2), .stat-table td:nth-child(2) { text-align: left; }
.stat-table img { width: 24px; height: 24px; image-rendering: pixelated; }
.modal.profil-ami .box { width: min(720px, 94vw); }
/* Playtest 1.21 : l'Invocation Spectrale reprend la bannière des zones (décor du Manoir en fond, grand prix en grand, taux en étiquettes). */
.inv-banniere.evt-banniere { grid-template-columns: 300px minmax(0, 1fr) auto; height: auto; min-height: 232px; border-color: #ff9a2e; box-shadow: inset 0 0 40px rgba(120,40,160,.35), 0 0 14px rgba(255,140,30,.25); }
.evt-banniere .inv-ban-pk { width: 300px; }
.evt-banniere .inv-ban-pk > figure:last-child { width: 142px; }
.evt-banniere .evt-prize-pk { min-width: 0; }
.evt-banniere .evt-prize-pk > canvas { width: auto; height: auto; max-width: 140px; max-height: 168px; }
/* (27/11, Kiko : « Cadoizo trop petit, trop vers le bas ») bannière de Noël : Cadoizo Père Noël plus grand, centré en hauteur, pixels nets */
.noel-banniere .inv-ban-pk { align-items: center; width: 300px; height: auto; min-height: 200px; }
.noel-banniere .inv-ban-pk > figure:last-child, .noel-banniere .inv-ban-pk > figure:first-child { width: 260px; }
.noel-banniere .evt-prize-pk > canvas { height: 240px !important; width: auto !important; max-width: none; max-height: none; image-rendering: pixelated; } /* (29/11, Kiko) 220 px était trop gros ; puis « encore étiré » : 160 de large ET 180 de haut déformaient le dessin (128 × 192) : seulement la hauteur (240 = 160 de large, proportions du dessin) */
.noel-banniere .inv-ban-pk figcaption { font-size: 18px; margin-top: 6px; }
@media (max-width: 640px) { .noel-banniere .inv-ban-pk { width: auto; } .noel-banniere .inv-ban-pk > figure:first-child, .noel-banniere .inv-ban-pk > figure:last-child { width: auto; } .noel-banniere .evt-prize-pk > canvas { height: 195px !important; width: auto !important; } }
.evt-banniere .inv-taux { font-size: 14px; gap: 6px 8px; }
.evt-banniere .inv-taux .evt-t { background: rgba(70,25,100,.75); }
.evt-banniere .bar.evt-bar { margin: 6px 0 2px; max-width: 420px; }
.skin-btn.on { border-color: #ff9a2e; color: #ffc27a; }
.skin-btn.locked { opacity: .75; }
.skin-btn.skin-histoire:disabled { filter: none; opacity: 1; display: inline-flex; align-items: center; gap: 6px; color: #d8e2ff; border-style: dashed; background: rgba(20,28,60,.85); white-space: nowrap; } /* (8/11, G) lisible : « Finis l'histoire » */
.skin-btn.skin-histoire .sk-t { color: #ffd35c; }
.lot-big { min-height: 120px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 64px; }
.lot-big .gel-ico, .lot-big .lot-bd, .lot-big .lot-pxi { width: 64px; height: 64px; image-rendering: pixelated; }
.lot-small { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 32px; }
.lot-small .gel-ico, .lot-small .lot-bd, .lot-small .lot-pxi { width: 32px; height: 32px; image-rendering: pixelated; }
.lot-pk { width: 120px; height: 120px; image-rendering: pixelated; }
.lot-small .lot-pk { width: 56px; height: 56px; }
.lot-skin { box-shadow: 0 0 0 3px #ff9a2e, 0 0 0 6px #8a3ad0 !important; }

/* ---------- Téléphone (28/10 au soir) : plein écran, outils en haut à droite, donjon compact ---------- */
/* Colonne d'outils (plein écran, pause, discussion) : coin haut droit, à gauche de la mini-carte en donjon. */
body { --tools-r: max(6px, env(safe-area-inset-right)); }
body.in-donjon { --tools-r: calc(min(210px * var(--hud, 1), 18vw) + 40px * var(--hud, 1)); }
.fs-btn { position: fixed; right: var(--tools-r); top: 6px; z-index: 13; min-width: 30px; height: 32px; padding: 0 10px; gap: 6px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--line); border-radius: 4px; background: rgba(8,15,40,.85); color: #e8f0ff; opacity: .9; cursor: pointer; transition: opacity .15s, transform .1s; font: inherit; font-size: 18px; text-shadow: 0 2px 0 #000; }
.fs-btn span { white-space: nowrap; } body.is-touch .fs-btn { padding: 0; width: 30px; height: 30px; border-width: 1px; opacity: .6; } body.is-touch .fs-btn span { display: none; }
.fs-btn:hover, .fs-btn:active { opacity: 1; }
.fs-btn:active { transform: scale(.9); }
.fs-btn.on { opacity: .55; } .fs-btn.on span { display: none; }
body.is-touch #touch .t-pause { left: auto; right: var(--tools-r); top: 42px; transform: none; width: 30px; height: 30px; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; }
body.is-touch #chat .chat-btn { left: auto; bottom: auto; right: var(--tools-r); top: 78px; width: 30px; height: 30px; }
/* Mini-carte agrandie au toucher (5/11) : la colonne de boutons (pause, discussion, émotes, signaux) passe à sa gauche.
   Avant, elle restait par-dessus la carte (le HUD est sous ces boutons) : toucher la carte ouvrait la discussion au lieu de la réduire. */
@media (max-height: 520px), (orientation: portrait) and (max-width: 600px) {
  body.in-donjon.is-touch.mm-grande { --tools-r: calc(min(300px, 40vw) + 30px); }
}
#chat .chat-row { display: flex; gap: 4px; }
#chat .chat-row .chat-in { flex: 1; min-width: 0; }
#chat .chat-send { pointer-events: auto; width: 40px; font-size: 16px; border: 2px solid var(--gold-line); background: rgba(8,15,40,.95); color: var(--gold); border-radius: 3px; }
#chat .chat-send.hidden, #chat .chat-in.hidden { display: none; }
body:not(.is-touch) #chat .chat-send { display: none; }

@media (max-height: 520px) {
  body.in-donjon.is-touch { --tools-r: calc(min(124px, 17vw) + 30px); }
  /* Joueur et équipe, en haut à gauche */
  body.is-touch #hud .box { border-width: 8px; border-image-width: 8px; }
  body.is-touch .hud-panel { left: max(6px, env(safe-area-inset-left)); top: 6px; width: 200px; padding: 2px 6px !important; }
  body.is-touch .hud-me { grid-template-columns: 30px 1fr; gap: 1px 6px; }
  body.is-touch .hud-me img.pt { width: 30px; height: 30px; border-width: 1px; }
  body.is-touch .hud-name { gap: 4px; }
  body.is-touch .hud-name .lvl { padding: 0 4px; }
  body.is-touch .stat-row { grid-template-columns: 12px 1fr auto; gap: 4px; }
  body.is-touch .stat-row .ic { font-size: 12px; }
  body.is-touch .stat-row .muted { display: none; }
  body.is-touch .bar { height: 7px; }
  body.is-touch .bar.xp { height: 4px; }
  body.is-touch .hud-sep { margin: 3px 0 1px; }
  body.is-touch .mate { grid-template-columns: 18px 1fr auto; gap: 0 5px; margin-top: 2px; }
  body.is-touch .mate img { width: 18px; height: 18px; }
  body.is-touch .mate .bar { height: 4px; }
  /* Étage, chef, escalier : petits, au centre */
  body.is-touch .hud-pill { top: 4px; padding: 1px 10px; max-width: 36vw; overflow: hidden; text-overflow: ellipsis; }
  body.is-touch .bossbar { top: 28px; width: min(300px, 40vw); padding: 2px 8px !important; }
  body.is-touch .bossbar .bn { margin-bottom: 1px; }
  body.is-touch .bossbar .bar { height: 7px; }
  body.is-touch .stairs-bar { top: 56%; width: 190px; padding: 2px 8px !important; }
  /* Mini-carte et quêtes, en haut à droite (les boutons ne la cachent plus) */
  body.is-touch .mm-box { right: max(6px, env(safe-area-inset-right)); top: 6px; padding: 2px !important; }
  body.is-touch .minimap { width: min(124px, 17vw); }
  body.is-touch #h-jobs { width: min(124px, 17vw); margin-top: 2px; }
  body.is-touch #h-jobs .hj:nth-child(n+5) { display: none; }
  body.is-touch .ping { right: var(--tools-r); top: 112px; width: 30px; text-align: center; font-size: 12px; }
  /* Journal : deux lignes au centre, sans cadre, qui s'effacent toutes seules */
  body.is-touch .hud-log { left: 50%; right: auto; top: 28px; bottom: auto; transform: translateX(-50%); width: min(50vw, 440px); min-height: 0; padding: 0 !important;
    border: 0 !important; border-image: none !important; background: none !important; filter: none; align-items: center; text-align: center; }
  body.is-touch .hud-log div { font-size: 16px; line-height: 1.15; text-shadow: 0 2px 0 #000, 0 0 6px #000, 0 0 2px #000; animation: logIn .25s, logOut .8s 6s forwards; }
  body.is-touch .hud-log div::before { content: ''; }
  body.is-touch .hud-log div:nth-last-child(n+3) { display: none; }
  body.is-touch #h-boss:not(.hidden) ~ .hud-log { top: 58px; }
  /* Discussion : au centre en haut (le clavier du téléphone ne la cache pas) */
  body.is-touch #chat { left: 0; right: 0; margin: 0 auto; bottom: auto; top: 74px; width: min(56vw, 470px); align-items: center; }
  body.is-touch #chat .chat-log div { align-self: center; font-size: 16px; }
  body.is-touch #chat.ecrit { top: 6px; z-index: 14; }
  body.is-touch #chat .chat-row { width: 100%; }
  /* Bannières, boîte de dialogue */
  body.is-touch .banner { top: 30%; }
  body.is-touch .banner.small { top: 24%; }
  body.is-touch .banner .t { font-size: 24px; letter-spacing: 1px; }
  body.is-touch .banner .s { font-size: 16px; padding: 1px 10px; margin-top: 2px; }
  body.is-touch .dialog { bottom: 8px; width: min(430px, 50vw); gap: 8px; padding: 4px 8px !important; }
  body.is-touch .dialog img { width: 40px; height: 40px; }
  body.is-touch .dialog p { font-size: 16px; min-height: 16px; margin-top: 1px; }
  /* Choix d'une compétence, roulette, vote, pause */
  body.is-touch .picks { top: 54%; gap: 6px; }
  body.is-touch .pick { width: 27vw; max-width: 180px; padding: 6px; }
  body.is-touch .picks-title { top: 3%; font-size: 24px; }
  body.is-touch .rl-box { padding: 4px 10px !important; max-height: 94vh; overflow: auto; }
  body.is-touch .rl-title { font-size: 16px; margin-bottom: 2px; }
  body.is-touch .rl-wheel, body.is-touch .rl-wheel canvas { width: 128px; height: 128px; }
  body.is-touch .rl-box .portrait { width: 44px !important; height: 44px !important; }
  body.is-touch .rl-box .nm-poke { font-size: 16px !important; }
  body.is-touch .rl-box .btn { padding: 4px 10px 4px 16px; }
  body.is-touch #h-menu .box { max-height: 92vh; overflow: auto; }
  /* Commandes tactiles : joystick plus petit, 4 capacités en arc, A plus grosse */
  body.is-touch #touch .t-base { width: 100px; height: 100px; margin: -50px 0 0 -50px; left: calc(max(6px, env(safe-area-inset-left)) + 72px); top: calc(100% - 72px); }
  body.is-touch #touch .t-knob { width: 44px; height: 44px; margin: -22px; }
  body.is-touch #touch .t-btns { right: max(8px, env(safe-area-inset-right)); bottom: 8px; width: 186px; height: 164px; }
  body.is-touch #touch .t-btn { width: 54px; height: 54px; border-width: 2px; }
  body.is-touch #touch .t-btn b { font-size: 16px; }
  body.is-touch #touch .t-btn small { font-size: 12px; max-width: 48px; line-height: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
  body.is-touch #touch .t-b0 { right: 58px; bottom: 0; width: 70px; height: 70px; }
  body.is-touch #touch .t-b0 small { max-width: 60px; }
  body.is-touch #touch .t-b1 { right: 0; bottom: 62px; }
  body.is-touch #touch .t-b2 { right: 132px; bottom: 30px; }
  body.is-touch #touch .t-b3 { right: 68px; bottom: 108px; }
  body.is-touch #touch .t-rotate { font-size: 16px; }
  .screen { max-height: calc((100dvh - 12px) / var(--ui, 1)); }
}
@keyframes logOut { to { opacity: 0; } }

/* Téléphone : menus plus compacts (vraie hauteur visible, cadres plus fins, en-têtes plus petits) */
@supports (height: 100dvh) {
  .screen { max-height: calc((100dvh - 24px) / var(--ui, 1)); }
  .screen.hubwrap { max-height: calc((100dvh - 24px) / var(--ui, 1)); }
}
@media (max-height: 520px) {
  body.is-touch .btn { border-width: 8px; border-image-width: 8px; padding: 1px 10px 1px 18px; }
  body.is-touch .box { border-width: 10px; border-image-width: 10px; }
  body.is-touch #hud .box { border-width: 8px; border-image-width: 8px; }
  body.is-touch .box h2 { font-size: 24px; margin-bottom: 4px; }
  body.is-touch .box h3 { font-size: 16px; margin: 6px 0 2px; }
  body.is-touch .wallet { gap: 4px; }
  body.is-touch .wallet .chip { padding: 1px 7px; }
  body.is-touch .screen { width: calc(100vw - 12px - env(safe-area-inset-left) - env(safe-area-inset-right)); max-height: calc(100dvh - 12px); }
  body.is-touch .screen.hubwrap { top: 6px; left: max(6px, env(safe-area-inset-left)); width: 230px; max-height: calc(100dvh - 12px); }
  body.is-touch .hub-mini .menu .btn { line-height: 1.15; padding: 0 6px 0 20px; }
  body.is-touch .hub-mini .menu .btn .ico { width: 20px; font-size: 16px; }
  body.is-touch .hub-mini .portrait { width: 34px !important; height: 34px !important; }
  body.is-touch .lobby-duo > .hub-mini { width: 210px; }
}

.imp-danger { margin-top: 6px; padding: 6px 8px; border: 2px solid var(--bad); border-radius: 4px; background: rgba(120,20,30,.35); color: #ffd0d0; }

/* ---------- Tour infinie ---------- */
.dg.tower { border-color: rgba(255,211,92,.55); background: linear-gradient(180deg, rgba(60,40,120,.35), rgba(0,0,0,.25)); }
.dg.tower b { color: #ffe9a0; }
.tb-list { display: flex; flex-direction: column; gap: 3px; }
.tb-row { gap: 8px; flex-wrap: nowrap; padding: 2px 6px; border-radius: 4px; background: rgba(0,0,0,.25); font-size: 16px; }
.tb-row.podium { background: rgba(255,211,92,.12); border: 1px solid rgba(255,211,92,.35); }
.tb-rank { min-width: 34px; text-align: center; }
.tb-team { display: flex; flex-wrap: wrap; gap: 2px 10px; }
.tb-mate { display: inline-flex; align-items: center; gap: 4px; }
.tb-mate img { width: 24px; height: 24px; }
.tb-time { min-width: 60px; text-align: right; }
.tb-rewards { display: flex; flex-direction: column; gap: 2px; font-size: 16px; }
.tour-res { margin: 6px 0; }
.tour-win { animation: pop .35s cubic-bezier(.2,1.4,.4,1); box-shadow: 0 0 40px rgba(255,211,92,.35); }

/* ---------- Icônes pixel art (à la place des emoji) : voir js/icones.js ---------- */
/* Taille = taille de l'icône dans la ROM × un nombre entier de pixels, choisi d'après la police (2 à 24 px, 1 à 16 px). */
img.pxi, i.pxi { --px: var(--k, max(1px, round(nearest, calc(1em / 12), 1px))); display: inline-block; flex: none; vertical-align: middle;
  width: calc(var(--w) * var(--px)); height: calc(var(--h) * var(--px)); margin: calc(var(--h) * var(--px) / -4) .08em;
  image-rendering: pixelated; pointer-events: none; }
.pxa { background: no-repeat 0 0 / calc(var(--n) * 100%) 100%; animation: pxScint 1.3s steps(1, end) infinite; }
/* (23/11 nuit, Kiko : le sapin du raccourci bougeait de droite a gauche et etait coupe) pxScint est faite pour 4 images ; une icone a 3 images (sapin-noel) passait ENTRE deux images. Ici : image fixe, seules ses boules changent. */
.pxa[style*="--n:3"] { animation: pxTrois 1.5s steps(1, end) infinite; }
@keyframes pxTrois { 0%, 100% { background-position-x: 0; } 33.33% { background-position-x: 50%; } 66.66% { background-position-x: 100%; } }
@keyframes pxScint { 0%, 100% { background-position-x: 33.34%; } 22% { background-position-x: 66.67%; } 40%, 52% { background-position-x: 100%; } 70% { background-position-x: 66.67%; } }
.menu .btn .ico { width: 44px; display: inline-flex; justify-content: center; align-items: center; }
.menu .btn .ico .pxi { margin: -6px 0; }
.menu .btn .ico .pxi[data-i="kecleon"], .menu .btn .ico .pxi[data-i="grodoudou"] { --k: 1px; margin: -6px 0; }
.btn .pxi { margin-top: -6px; margin-bottom: -6px; }
.chip .pxi { margin: -6px 0; }
body.is-touch .hub-mini .menu .btn .ico { width: 24px; }
body.is-touch .hub-mini .menu .btn .ico .pxi { --k: 1px; }
body.is-touch .hub-mini .menu .btn .ico .pxi[data-i="kecleon"] { width: 20px; height: 20px; border-width: 1px; }
/* Badges des Pokémon (étoile, Améliorator, couronne) : à l'échelle 1 dans les petites cases */
.bdg { --k: 1px; margin: 0; }
.svg16 .pxi, .pk-badges .pxi { --k: 1px; margin: 0; }
.svg16.large { width: auto; }

/* ---------- Mon équipe : tris, cadres de rang, badges sur le côté, nom aux couleurs du type ---------- */
.tri-row { gap: 4px; margin-top: 6px; }
.tri-row .btn.mini, .dex-filtres .btn.mini { padding: 0 8px 0 14px; font-size: 16px; }
.tri-row .btn.mini::before, .dex-filtres .btn.mini::before { width: 10px; height: 10px; margin-top: -5px; }
.eq-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
/* 31/10 (demande de Kiko) : la grille de Mon équipe prend toute la hauteur de la fenêtre ; contain: size l'empêche de pousser
   elle-même la page. Playtest (signalé par le chef d'équipe) : la fiche et l'onglet Défis dépassaient l'écran (boutons du bas
   invisibles) : la grille et le panneau de détail ont la même hauteur, celle qui reste sous l'en-tête, et défilent chacun dedans.
   176 px = en-tête de la fenêtre (titre, tris, gelées) + marges, mesuré en 1366×768 et 1920×1080. */
.eq-grid { contain: size; align-self: stretch; min-height: calc((100vh - 24px) / var(--ui, 1) - 176px); max-height: none; overflow-y: auto; align-content: start; }
.eq-grid ~ #detail { align-self: flex-start; }
body:not(.is-touch) .eq-grid ~ #detail { min-height: min(300px, calc((100vh - 24px) / var(--ui, 1) - 176px)); max-height: calc((100vh - 24px) / var(--ui, 1) - 176px); overflow-y: auto; }
.eq-cell { display: grid; grid-template-columns: minmax(0, 1fr) 18px; grid-template-rows: auto auto; align-items: start; padding: 14px 4px 4px; border-radius: 0; min-height: 112px; }
.eq-cell .eq-pt-cadre { grid-column: 1; grid-row: 1; position: relative; justify-self: center; width: min(64px, 100%); line-height: 0; }
.eq-cell .eq-pt { width: 100%; height: auto; aspect-ratio: 1; }
/* 31/10 (demande de Kiko) : l'étincelle shiny va dans le coin du portrait, plus sur la colonne des succès. */
.eq-cell .eq-pt-cadre .shiny-logo { right: -4px; top: -4px; }
.eq-cell .eq-nm { grid-column: 1 / -1; grid-row: 2; margin-top: 3px; min-width: 0; }
.eq-succes { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; gap: 2px; align-items: center; padding-top: 2px; }
.eq-succes > img, .eq-succes > i { width: 14px; height: 14px; max-width: 100%; display: flex; align-items: center; justify-content: center; image-rendering: pixelated; filter: drop-shadow(0 1px 0 #000); }
.eq-succes .cell-bd { position: static; margin: 0; }
.eq-lv { position: absolute; left: 4px; top: 1px; z-index: 2; font-size: 16px; line-height: 1; color: #9ef0ff; text-shadow: 0 2px 0 #000;
  background: rgba(5,10,31,.85); padding: 1px 3px 0; border-radius: 3px; } /* étiquette lisible même sur le portrait */
.eq-st { position: absolute; right: 4px; bottom: 26px; font-size: 16px; line-height: 1; color: var(--gold); text-shadow: 0 2px 0 #000; }
.eq-st .pxi { margin: 0 1px 0 0; vertical-align: -2px; }
.shiny-logo { position: absolute; right: 2px; top: 0; z-index: 2; line-height: 0; animation: shinyHop 1.6s steps(1, end) infinite; }
.shiny-logo .pxi { --k: 2px; margin: 0; }
.shiny-logo.inline { position: relative; right: auto; top: -4px; display: inline-block; margin-left: 4px; }
@keyframes shinyHop { 0%, 60%, 100% { transform: translateY(0); } 70% { transform: translateY(-2px); } 80% { transform: translateY(-3px); } 90% { transform: translateY(-1px); } }
.eq-titre { grid-column: 1 / -1; margin: 6px 0 0; }
.eq-titre .type { font-size: 16px; }
.eq-cell .crown { top: -10px; }
/* Cadres de rang : le cadre fin de la ROM, recoloré (1 succès = Bronze, 2 = Argent, 3 = Or, 4 = Diamant) */
.eq-cell[class*="rk-"] { border: 12px solid transparent; border-image: url('assets/ui/cadres/cadre1_bronze_fin.png') 8 fill / 12px stretch; image-rendering: pixelated; background: none; padding: 4px 0 0; }
.eq-cell.rk-argent { border-image-source: url('assets/ui/cadres/cadre1_argent_fin.png'); }
.eq-cell.rk-or { border-image-source: url('assets/ui/cadres/cadre1_or_fin.png'); }
.eq-cell.rk-diamant { border-image-source: url('assets/ui/cadres/cadre1_diamant_fin.png'); }
/* 31/10 (demande de Kiko) : niveau, shiny et étoiles restent à l'intérieur du cadre de rang. */
.eq-cell[class*="rk-"] .eq-lv { left: 0; top: -2px; }

.eq-cell[class*="rk-"] .eq-st { right: 0; bottom: 20px; }
.eq-cell.rk-diamant::after { content: ''; position: absolute; left: -10px; bottom: -10px; width: 18px; height: 18px; pointer-events: none; image-rendering: pixelated;
  background: url('assets/ui/icones/etincelle.png') no-repeat 0 0 / 400% 100%; animation: pxScint 1.8s steps(1, end) infinite; }
.eq-cell.sel { box-shadow: none; outline: 2px solid var(--gold); outline-offset: 2px; }
.eq-cell.rk-gain { animation: rkGain .7s steps(6, end); }
@keyframes rkGain { 0% { transform: scale(1.18); filter: brightness(2); } 100% { transform: none; filter: none; } }
/* Nom dans un petit cadre aux couleurs du type ; deux types = coupé en biais */
.nm-type { display: inline-flex; max-width: 100%; padding: 2px; vertical-align: middle; background: linear-gradient(110deg, var(--c1) 50%, var(--c2) 50%);
  clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px); }
.nm-type > span { display: block; min-width: 0; padding: 0 5px; background: #0d1838; color: var(--txt); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  clip-path: polygon(1px 0, calc(100% - 1px) 0, 100% 1px, 100% calc(100% - 1px), calc(100% - 1px) 100%, 1px 100%, 0 calc(100% - 1px), 0 1px); }
.eq-cell .nm-type { font-size: 16px; }
.eq-titre-nom .nm-type { padding: 3px; } .eq-titre-nom .nm-type > span { padding: 0 8px; color: var(--gold); }
.eq-titre-nom .stars .pxi { margin: 0; vertical-align: -4px; }
/* En-tête de la fiche (31/10) : types et rareté toujours à droite du portrait, même avec une tenue plus large. */
.fi-tete { flex-wrap: nowrap; align-items: center; }
.fi-tete > #dh { flex: none; }
.fi-tete > .col { min-width: 0; }
/* Ligne du rang dans la fiche, case pour montrer ou cacher la couronne */
.rang-ligne { gap: 8px; font-size: 16px; margin: 2px 0 4px; }
.rang-pastille { padding: 0 8px; border: 8px solid transparent; border-image: url('assets/ui/cadres/cadre1_blue_fin.png') 8 fill / 8px stretch; image-rendering: pixelated; }
.rang-pastille.rk-bronze { border-image-source: url('assets/ui/cadres/cadre1_bronze_fin.png'); color: #f8cc9a; }
.rang-pastille.rk-argent { border-image-source: url('assets/ui/cadres/cadre1_argent_fin.png'); color: #e2e8f0; }
.rang-pastille.rk-or { border-image-source: url('assets/ui/cadres/cadre1_or_fin.png'); color: #fce07a; }
.rang-pastille.rk-diamant { border-image-source: url('assets/ui/cadres/cadre1_diamant_fin.png'); color: #c8f0ff; }
.cour-case { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; cursor: pointer; }
.cour-case input { position: absolute; opacity: 0; pointer-events: none; }
.case-px { width: 16px; height: 16px; background: #0a1233; image-rendering: pixelated;
  box-shadow: 0 -2px 0 #101018, 0 2px 0 #101018, -2px 0 0 #101018, 2px 0 0 #101018, inset 0 0 0 2px #7fa6ef; }
.cour-case input:checked + .case-px { background: #f8d040 url('assets/ui/icones/coche.png') center / 12px no-repeat; box-shadow: 0 -2px 0 #101018, 0 2px 0 #101018, -2px 0 0 #101018, 2px 0 0 #101018, inset 0 0 0 2px #b88018; }
.cour-case:hover .case-px { filter: brightness(1.3); }
/* Étiquettes de type façon Donjon Mystère : couleur du type, coins en pixels, la Gelée du type */
.type { display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px 1px 4px; border-radius: 0; background: var(--c); color: #fff; text-shadow: 1px 0 0 #101018, -1px 0 0 #101018, 0 1px 0 #101018, 0 -1px 0 #101018, 0 2px 0 #101018; font-weight: normal;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.3);
  clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px); }
.type img { width: 16px; height: 16px; image-rendering: pixelated; filter: drop-shadow(0 1px 0 rgba(0,0,0,.5)); }

/* ---------- Pokédex en grand : zones et raretés en boutons, ombres des Pokémon pas encore découverts ---------- */
.box.pokedex { min-height: calc(70vh / var(--ui, 1)); }
.dex-filtres { gap: 4px; margin-top: 6px; }
.dex-filtres .zone-fermee { color: #7d89a6; }
.px-grid { max-height: calc((100vh - 230px) / var(--ui, 1)); grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); margin-top: 8px; align-content: start; }
.px-cell { padding: 14px 4px 4px; }
.px-cell .px-no { position: absolute; left: 4px; top: 1px; font-size: 16px; line-height: 1; color: var(--dim); }
.px-cell .px-nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-cell.pas-eu img { filter: grayscale(1) brightness(.55); }
.px-cell.pas-eu .px-nm { color: var(--dim); }
.px-cell.ombre { background: rgba(0,0,0,.45); }
.px-cell .px-ombre { display: flex; justify-content: center; height: 64px; }
/* (5/12) Mon équipe → Costumes : cases qui arrivent une à une, cadenas sur les costumes pas encore gagnés, petit refus au clic */
.cos-ecran .cos-aide { margin: 4px 0 2px; font-size: 18px; }
.cos-ecran .cos-titre { display: flex; gap: 8px; align-items: baseline; margin: 14px 0 6px; }
.cos-ecran .cos-titre .muted { font-size: 18px; }
.cos-grid .cos-cell { position: relative; animation: cos-arrive .32s steps(4) both; animation-delay: calc(var(--k, 0) * 35ms); }
.cos-grid .cos-cell.eu { box-shadow: inset 0 0 0 2px #ffd35c55; }
.cos-grid .cos-cell.eu:hover img { transform: translateY(-3px); }
.cos-grid .cos-cell img { transition: transform .12s steps(2); }
.cos-grid .cos-cell.ombre .px-nm { color: #8ea3cf; }
.cos-grid .cos-cadenas { position: absolute; right: 6px; top: 30px; opacity: .9; }
.cos-grid .cos-cell.cos-non { animation: cos-non .3s steps(6); }
@keyframes cos-arrive { from { opacity: 0; transform: translateY(8px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes cos-non { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.px-cell .px-ombre canvas, .px-cell .px-ombre img { width: 64px; height: 64px; image-rendering: pixelated; filter: brightness(0) drop-shadow(0 0 0 #000); opacity: .85; }
.px-cell.ombre .px-nm { color: #56628a; letter-spacing: 2px; }
@media (max-height: 520px) { .px-grid { max-height: calc(100dvh - 170px); } .eq-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } }

/* ---------- Langues (js/langue.js) ---------- */
.langue-btn { margin-top: 22px; font-size: 16px; }
.langue-btn b { color: var(--gold); font-weight: normal; }
.langue-box { max-width: 720px; margin: auto; }
.langue-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.langue-grille .btn { justify-content: flex-start; font-family: 'PMD Font', 'Pixelify', system-ui, sans-serif; }
.langue-grille .btn[data-anglais] { opacity: .6; }
.langue-auto { margin-left: auto; padding: 0 4px; font-size: 12px; color: var(--dim); border: 1px solid var(--line); }
.langue-note { font-size: 16px; }
.secours-code { margin: 6px 0; padding: 10px; text-align: center; font-size: 32px; letter-spacing: 4px; color: var(--gold); background: rgba(0,0,0,.35); border: 2px dashed var(--gold-line); user-select: all; -webkit-user-select: all; }
/* Récompenses des quêtes dans le bilan de fin d'expédition */
.rcard .rw, .col .rw { display: inline-flex; align-items: center; gap: 1px; margin-right: 6px; }
.rw-bon { width: 32px; height: 32px; margin: -8px -2px; image-rendering: pixelated; vertical-align: middle; }
/* Mode auto (playtest 2, 3.4) : au-dessus des attaques ; sur téléphone, en bas à gauche des boutons tactiles */
.auto-btn { font: inherit; font-size: 16px; padding: 3px 10px; border: 2px solid #3a4a80; border-radius: 6px; background: rgba(10,16,40,.85); color: #a8b4e0; cursor: pointer; pointer-events: auto; letter-spacing: 1px; }
.auto-btn .k { color: #6f7cae; font-size: 14px; }
.auto-btn.on { border-color: #49e36a; color: #c6ffd0; background: rgba(16,60,30,.9); box-shadow: 0 0 8px rgba(73,227,106,.55); animation: autoPulse 1.2s steps(4) infinite; }
.auto-btn.verrou { opacity: .6; }
@keyframes autoPulse { 50% { box-shadow: 0 0 14px rgba(73,227,106,.85); } }
.auto-tactile { display: none; }
body.is-touch #hud .auto-tactile { display: block; position: absolute; right: 240px; bottom: 10px; z-index: 3; } /* à gauche des boutons tactiles, sous le jeu */
#hud .mate.partenaire .nmm { color: #9fd8ff; }
/* Partenaires en solo (playtest 2, 3.6) : les 3 places de la fenêtre de départ, et la liste pour choisir */
.part-row { gap: 6px; align-items: center; flex-wrap: nowrap; }
.part-t { color: var(--gold); font-size: 16px; margin-right: 2px; }
.part-slot { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 2px 8px; font-size: 15px; }
.part-slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.part-slot.vide { min-width: 44px; justify-content: center; font-size: 20px; }
.part-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; max-height: 58vh; overflow: auto; }
.part-grille button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 14px; padding: 6px 4px; }
.part-grille img { width: 48px; height: 48px; image-rendering: pixelated; }

/* ---------- Guilde (lot E, compte-rendu n° 3) : client/js/guilde.js ---------- */
.gu-ecran { max-width: 980px; margin: auto; }
.gu-tete { align-items: center; gap: 10px; flex-wrap: nowrap; }
.gu-tete h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gu-tete .grow { min-width: 0; }
.gu-tete .chip { flex: none; }
.gu-grodoudou { width: 64px; height: 64px; display: flex; align-items: flex-end; justify-content: center; animation: guSaut 1.6s steps(4) infinite; }
.gu-grodoudou.petit { width: 48px; height: 48px; }
.gu-grodoudou canvas { image-rendering: pixelated; }
@keyframes guSaut { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.gu-devise { font-size: 16px; font-style: italic; }
.gu-pomme { width: 20px; height: 20px; image-rendering: pixelated; vertical-align: -4px; }
.gu-bourse { gap: 4px; }
.gu-onglets { gap: 6px; margin: 8px 0 4px; flex-wrap: wrap; }
.gu-onglets.petit { align-items: center; margin: 4px 0; }
.gu-petit { font-size: 16px; }
.gu-places { margin: -4px 0 8px; } .gu-places-plein { color: #ffb46b; } /* (26/11) places selon le grade */
.gu-sigle { color: #9fd0ff; font-size: 18px; letter-spacing: 1px; }
.gu-emb { width: 44px; height: 44px; image-rendering: pixelated; border: 2px solid var(--line-in, #3a4c8a); border-radius: 4px; background: rgba(0,0,0,.35); flex: none; }
.gu-emb.gros { width: 72px; height: 72px; }
.gu-grade-ico { width: 20px; height: 20px; image-rendering: pixelated; vertical-align: -4px; }
.gu-grade-ico.gros { width: 32px; height: 32px; }
.gu-ligne { gap: 10px; align-items: center; margin: 4px 0; padding: 8px 10px; }
.gu-liste, .gu-membres, .gu-defis, .gu-classement { display: flex; flex-direction: column; gap: 4px; }
.gu-desc { font-size: 16px; color: #dfe6ff; margin-top: 2px; word-break: break-word; }
.gu-mode { padding: 0 6px; border-radius: 3px; background: rgba(0,0,0,.35); }
.gu-mode.m-publique { color: #8dffa0; } .gu-mode.m-demande { color: #ffd76a; } .gu-mode.m-privee { color: #ff9ad0; }
.gu-attente { font-size: 16px; color: #ffcf7a; background: rgba(90,50,0,.35); border-left: 3px solid #ffb640; padding: 4px 8px; margin: 6px 0; }
.gu-invite p { margin: 4px 0; }
.gu-bandeau { gap: 12px; align-items: flex-start; margin: 6px 0; }
.gu-niveau { gap: 8px; align-items: center; }
.gu-niveau.monte { animation: guMonte 1.2s ease-out 2; }
@keyframes guMonte { 0% { filter: brightness(1); } 30% { filter: brightness(2.2) drop-shadow(0 0 8px #ffe27a); } 100% { filter: brightness(1); } }
.gu-xp { margin: 4px 0; max-width: 520px; }
.gu-membre { gap: 8px; align-items: center; padding: 3px 6px; border-radius: 4px; background: rgba(0,0,0,.2); }
/* (19/11) dernière connexion à côté du pseudo : pastille verte « en ligne », sinon la durée en gris */
.gu-vu { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px; font-size: 16px; color: var(--muted, #9aa6c8); white-space: nowrap; }
.gu-vu.on { color: var(--ok, #5fd35f); }
.gu-vu.on::before { content: ''; width: 8px; height: 8px; background: var(--ok, #5fd35f); box-shadow: 0 0 0 2px #0a1233; animation: guVu 2s steps(2, end) infinite; }
@keyframes guVu { 50% { filter: brightness(1.5); } }
@media (prefers-reduced-motion: reduce) { .gu-vu.on::before { animation: none; } }
.gu-membre.chef { background: rgba(120,90,0,.28); }
.gu-pt { position: relative; flex: none; }
.gu-pt img { width: 36px; height: 36px; image-rendering: pixelated; }
.gu-enligne { position: absolute; right: -2px; bottom: 0; width: 8px; height: 8px; background: var(--ok, #5fd35f); box-shadow: 0 0 0 2px #0a1233; }
.gu-role { font-size: 14px; padding: 0 5px; border-radius: 3px; background: rgba(0,0,0,.35); }
.gu-role.r-chef { color: var(--gold); } .gu-role.r-adjoint { color: #9fd0ff; } .gu-role.r-apprenti { color: #b9b9c9; }
/* (14/11, Kiko) Maître de guilde en JAUNE et Second en BLEU, bien visibles dans la liste des membres */
.gu-membre .gu-role.r-chef, .gu-membre .gu-role.r-adjoint { font-weight: bold; font-size: 16px; padding: 1px 8px; border: 2px solid #1a1030; box-shadow: 0 0 0 1px currentColor; text-shadow: none; }
.gu-membre .gu-role.r-chef { background: #ffd35c; color: #3a2400; box-shadow: 0 0 0 1px #fff3b0, 0 0 8px rgba(255,211,92,.55); }
.gu-membre .gu-role.r-adjoint { background: #5fb4ff; color: #06203d; box-shadow: 0 0 0 1px #cfe8ff, 0 0 8px rgba(95,180,255,.5); }
.gu-membre.chef { box-shadow: inset 3px 0 0 #ffd35c; } .gu-membre.adjoint { box-shadow: inset 3px 0 0 #5fb4ff; }
/* (24/11, Kiko) le NOM du Maître en jaune, celui des Seconds en bleu, un peu plus gros : liste des membres, et partout
   ailleurs avec la classe gu-nom-chef / gu-nom-adjoint (tableau et messages de guilde) */
.gu-membre.chef > .grow > b.notr, .gu-nom-chef { color: #ffd35c; font-size: 1.15em; text-shadow: 0 2px 0 #3a2400, 0 0 6px rgba(255,211,92,.45); }
.gu-membre.adjoint > .grow > b.notr, .gu-nom-adjoint { color: #7cc4ff; font-size: 1.08em; text-shadow: 0 2px 0 #06203d, 0 0 6px rgba(95,180,255,.4); }
.gu-contrib { color: #8dffa0; }
.btn.rouge { border-image-source: url('assets/ui/cadres/cadre1_bronze_fin.png'); color: #ffb0a0; }
.gu-amis { display: flex; flex-wrap: wrap; gap: 6px; }
.gu-ami { display: inline-flex; align-items: center; gap: 6px; }
.gu-ami img { width: 28px; height: 28px; image-rendering: pixelated; }
.gu-reglages label, .gu-fonder label { display: flex; flex-direction: column; gap: 2px; margin: 4px 0; font-size: 16px; }
.gu-champs { display: flex; gap: 10px; flex-wrap: wrap; }
.gu-champs label:first-child { flex: 1; min-width: 220px; }
.gu-titre { font-size: 16px; color: #cfe0ff; margin: 8px 0 2px; }
.gu-modes { gap: 6px; flex-wrap: wrap; }
.gu-mode-btn { display: flex; flex-direction: column; align-items: flex-start; text-align: left; max-width: 300px; white-space: normal; }
.gu-emblemes { max-height: 150px; }
.gu-journal { display: flex; flex-direction: column; gap: 2px; }
.gu-bas { justify-content: flex-end; gap: 8px; margin-top: 10px; }
.gu-quete { margin: 6px 0; }
.gu-etoiles { font-size: 22px; letter-spacing: 2px; }
.gu-etoile { color: #3a4060; text-shadow: 0 2px 0 #000; transition: color .3s; }
.gu-etoile.on { color: var(--gold); animation: guEtoile .6s steps(3); }
@keyframes guEtoile { 0% { transform: scale(1.8); } 100% { transform: scale(1); } }
.gu-barre { position: relative; height: 14px; margin: 4px 0; background: #0b1128; border: 1px solid #02050f; box-shadow: 0 0 0 1px rgba(127,166,239,.25); overflow: visible; }
.gu-barre > i { position: absolute; inset: 0; transform-origin: left; background: linear-gradient(180deg, #ffe9a0, var(--gold) 50%, #c88a10); transition: transform .5s; }
.gu-marque { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px #000; }
.gu-defi { gap: 8px; align-items: center; padding: 5px 10px; }
.gu-defi.fait { background-color: rgba(40,110,40,.25); }
.gu-coche { width: 20px; text-align: center; color: var(--gold); }
.gu-bout-tete { gap: 10px; align-items: center; }
.gu-boutique { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 6px; }
.gu-article { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 8px; }
.gu-article.ferme { filter: grayscale(.85) brightness(.7); }
.gu-art-ico { width: 40px; height: 40px; image-rendering: pixelated; object-fit: contain; }
.gu-ferme { font-size: 14px; color: #c9c9d9; }
.gu-rang { gap: 8px; align-items: center; padding: 3px 8px; background: rgba(0,0,0,.2); border-radius: 4px; }
.gu-rang.moi { background: rgba(120,90,0,.3); outline: 1px solid var(--gold); }
.gu-place { width: 28px; text-align: center; color: var(--gold); font-size: 20px; }
.gu-hist { display: flex; flex-direction: column; gap: 2px; }
/* Fête : fondation, montée de grade */
.gu-fete-box { position: relative; overflow: hidden; text-align: center; width: min(560px, 94vw); padding-top: 14px; }
.gu-fete-box h2, .gu-fete-box p, .gu-fete-box .row { position: relative; }
.gu-rayons { position: absolute; left: 50%; top: 70px; width: 600px; height: 600px; margin: -300px 0 0 -300px; background: repeating-conic-gradient(rgba(255,226,122,.22) 0 10deg, transparent 10deg 20deg); animation: guTourne 8s linear infinite; pointer-events: none; }
@keyframes guTourne { to { transform: rotate(360deg); } }
.gu-fete-embleme { position: relative; width: 96px; height: 96px; image-rendering: pixelated; animation: guZoom .9s steps(6) both; }
@keyframes guZoom { 0% { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.25) rotate(8deg); } 100% { transform: scale(1); } }
.gu-fete-grodoudou { position: relative; display: flex; justify-content: center; animation: guSaut .5s steps(2) infinite; }
.gu-pluie { position: fixed; inset: 0; pointer-events: none; z-index: 9000; overflow: hidden; }
.gu-pluie img { position: absolute; top: -40px; width: 32px; height: 32px; image-rendering: pixelated; animation: guTombe 2.2s ease-in forwards; }
@keyframes guTombe { 0% { transform: translateY(0) rotate(0); opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(105vh) rotate(var(--r, 180deg)); opacity: 0; } }
.gu-cadeau { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); z-index: 9001; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: rgba(10,18,51,.92); border: 2px solid var(--gold); font-size: 22px; color: var(--gold); pointer-events: none; animation: guPop 2.4s ease-out forwards; }
.gu-cadeau .gu-pomme { width: 36px; height: 36px; }
.gu-cadeau .gu-cadeau-ico { width: 40px; height: 40px; image-rendering: pixelated; object-fit: contain; animation: guCadeauSaut .5s .1s cubic-bezier(.2, 1.6, .4, 1) both; } /* (8/11) l'image du cadeau reçu */
@keyframes guCadeauSaut { from { transform: translateY(14px) scale(.5); } to { transform: none; } }
@keyframes guPop { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { transform: translate(-50%, -90%) scale(1); opacity: 0; } }
/* Guilde, interface allégée (4/11) : roue dentée des réglages, quêtes réduites à objectif + barre + récompense, sans compte */
.gu-bandeau { position: relative; padding-right: 50px; }
.gu-roue { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; background: #0b1128; border: 2px solid var(--line-in, #3a4c8a); box-shadow: inset 0 0 0 1px #02050f, 0 2px 0 #000; }
.gu-roue .pxi, .gu-roue-titre .pxi { --k: 2px; }
.gu-roue:hover, .gu-roue:focus-visible { border-color: var(--gold); outline: none; }
.gu-roue:hover .pxi { animation: guRoue 1s steps(4) infinite; }
.gu-roue.tourne .pxi { animation: guRoue .4s steps(4) 1; }
@keyframes guRoue { to { transform: rotate(90deg); } }
.gu-roue-titre { display: inline-flex; margin-right: 8px; animation: guRoue 1.2s steps(4) 1; }
.gu-reglages-box { width: min(620px, 94vw) !important; max-height: 92dvh; overflow-y: auto; animation: guOuvre .25s steps(4) both; }
@keyframes guOuvre { from { transform: scale(.85); opacity: 0; } }
.gu-renommer { margin-top: 10px; padding: 8px 10px; border-color: #c99a2e; }
.gu-renommer .row { gap: 8px; flex-wrap: wrap; }
.gu-renommer .field { min-width: 180px; }
.gu-q-tete { align-items: baseline; }
.gu-q-tete h3 { margin-bottom: 0; }
.gu-q-bas { gap: 8px; flex-wrap: wrap; align-items: center; }
.gu-recomp { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.gu-palier { display: inline-flex; align-items: center; gap: 3px; font-size: 16px; color: #8d93b8; white-space: nowrap; }
.gu-palier.on { color: var(--gold); }
.gu-palier .gu-pomme { width: 16px; height: 16px; vertical-align: 0; }
.gu-palier:not(.on) .gu-pomme { filter: grayscale(.6) brightness(.8); }
.gu-marque.on { background: var(--gold); }
.gu-barre.mini { height: 6px; margin: 4px 0 0; max-width: 360px; }
.gu-d-prog { white-space: nowrap; }
.gu-quetes.anime .gu-barre > i { animation: guRemplit .9s steps(10) both; }
.gu-quetes.anime .gu-quete, .gu-quetes.anime .gu-defi { animation: guOuvre .3s steps(3) both; }
@keyframes guRemplit { from { transform: scaleX(0); } }
.gu-sans-compte { gap: 12px; align-items: center; flex-wrap: nowrap; }
.gu-eclaire { animation: guEclaire .6s steps(3) 3; }
@keyframes guEclaire { 50% { box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(255, 226, 122, .6); } }
@media (max-width: 760px) {
  .gu-bandeau { padding-right: 44px; }
  .gu-roue { width: 34px; height: 34px; }
  .gu-reglages-box h2 { font-size: 20px; }
  .gu-defi { flex-wrap: wrap; }
  .gu-defi .grow { min-width: 60%; }
}
/* XP selon le cran à l'écran de fin (compte-rendu n° 3, 6.2) */
.xp-cran { font-size: 15px; color: #ffe27a; border-color: #c99a2e; vertical-align: middle; animation: xpCran 1.6s steps(4) 2; }
@keyframes xpCran { 50% { box-shadow: 0 0 10px rgba(255, 226, 122, .7); } }
/* ---------- Mon équipe : fiche du Pokémon refaite (04/11, demande de Kiko) ----------
   Plus large, un en-tête qui reste (sprite, nom, niveau, « Partir avec lui », logo shiny), une seule ligne d'onglets. */
/* (5/11) au téléphone en portrait, la fiche ne dépasse plus de l'écran (elle sortait à gauche et le toucher tombait à côté) */
#detail.fi-fenetre { width: min(580px, calc(100vw - 20px)); flex: none; display: flex; flex-direction: column; gap: 4px; }
.fi-haut { display: grid; grid-template-columns: auto 1fr; grid-template-areas: 'dh id' 'dh act'; gap: 4px 10px; align-items: center; flex: none; }
.fi-haut > #dh { grid-area: dh; } .fi-haut > .fi-id { grid-area: id; } .fi-haut > .fi-act, .fi-haut > .muted { grid-area: act; }
.fi-haut > #dh { flex: none; position: relative; min-width: 96px; display: flex; justify-content: center; }
.fi-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-right: 46px; }
/* (5/11, demande de Kiko) La croix « Fermer » en haut à droite de la fiche : ramène à la liste de Mon équipe. */
#detail.fi-fenetre { position: relative; }
#detail.fi-ferme { display: none !important; }
#detail .fi-fermer { position: absolute; top: 6px; right: 6px; z-index: 3; min-width: 40px; min-height: 40px; padding: 4px; justify-content: center; }
#detail .fi-fermer:hover .pxi, #detail .fi-fermer:focus-visible .pxi { animation: fiCroix .35s steps(3) 1; }
@keyframes fiCroix { 50% { transform: rotate(90deg) scale(1.15); } }
.fi-id .eq-titre-nom { margin: 0; }
.fi-types { gap: 6px; }
.fi-niv { color: var(--gold); font-size: 20px; }
.fi-act { gap: 6px; flex-wrap: nowrap; }
.fi-act #choose { font-size: 20px; padding: 2px 12px; white-space: nowrap; }
.btn.on { border-image-source: url('assets/ui/cadres/cadre1_green_fin.png'); color: #b8f5a0; }
/* Logo shiny : l'étoile pixel art de la ROM. Allumée = version shiny ; grisée = pas encore shiny (info-bulle). */
.shiny-bascule { padding: 2px 8px; min-width: 48px; line-height: 0; }
.shiny-bascule .pxi { margin: 0; }
.shiny-bascule::before { display: none; }
.shiny-bascule.on { border-image-source: url('assets/ui/cadres/cadre1_yellow_fin.png'); animation: shBrille 1.4s steps(2, end) infinite; }
.shiny-bascule:not(.on):not(.pret) .pxi { filter: grayscale(1) brightness(.75); }
.shiny-bascule.off { filter: grayscale(.8) brightness(.6); cursor: help; }
.shiny-bascule.pret { border-image-source: url('assets/ui/cadres/cadre1_yellow_fin.png'); animation: shPret .9s steps(2, end) infinite; }
@keyframes shBrille { 50% { filter: brightness(1.35); } }
@keyframes shPret { 50% { transform: translateY(-2px); filter: brightness(1.4); } }
/* Une seule ligne d'onglets ; si elle déborde, elle défile (jamais deux lignes). */
.row.fi-onglets { flex: none; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; gap: 3px; margin: 4px 0 2px; padding-bottom: 2px; }
.fi-onglets::-webkit-scrollbar { display: none; }
.fi-onglet-nom { display: none; } /* nom de l'onglet ouvert : seulement au téléphone debout (telephone.css) */
.fi-onglets .btn { flex: none; display: inline-flex; align-items: center; gap: 3px; font-size: 16px; padding: 1px 3px; white-space: nowrap; border-width: 9px; border-image-width: 9px; }
.fi-onglets .btn::before { display: none; }
.fi-onglets .btn .pxi { margin: 0; }
.fi-onglets .btn.primary { transform: translateY(-1px); }
.fi-onglets .btn.primary::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -3px; height: 2px; background: var(--gold); image-rendering: pixelated; }
.fi-corps { min-height: 0; }
.fi-corps h3 { margin: 8px 0 2px; }
.fi-corps.entre { animation: fiEntre .22s steps(4, end); }
@keyframes fiEntre { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.fi-aide { font-size: 16px; margin: 0 0 4px; }
.succes-pk { gap: 4px; margin: 2px 0; }
.fi-stat .fi-max { width: 20px; text-align: center; line-height: 0; }
.fi-resume { gap: 4px; margin-top: 6px; }
.fi-resume .chip { font-size: 16px; gap: 4px; }
.fi-resume .chip .pxi { margin: 0; }
.fi-tenues { margin-top: 6px; gap: 6px; }
.fi-amel-tete { margin-top: 6px; flex-wrap: nowrap; }
.fi-amel-tete h3 { margin: 0; }
.fi-pieces { font-size: 18px; gap: 4px; color: var(--gold); }
.fi-ups { gap: 4px; }
.fi-up { padding: 4px 8px; flex-wrap: nowrap; gap: 8px; }
.fi-up > .pxi { flex: none; margin: 0; }
.fi-up .btn { flex: none; font-size: 18px; padding: 2px 10px; }
.fi-up .up-pips .pxi { margin: 0 1px 0 0; }
.fi-up.gain { animation: gelGain .6s ease-out; }
.bd-vide { opacity: .35; filter: grayscale(1); line-height: 0; }
.fi-verrou { opacity: .7; }
/* PC : l'en-tête et les onglets restent, seul le contenu défile. */
body:not(.is-touch) .eq-grid ~ #detail.fi-fenetre { overflow: hidden; }
body:not(.is-touch) #detail.fi-fenetre .fi-corps { flex: 1; overflow-y: auto; padding-right: 4px; }
/* (26/11, bug du joueur 4K à 150 %) Mon équipe sur PC : la fenêtre prend toute la hauteur, en colonne ; la grille et la fiche se
   partagent ce qui reste sous l'en-tête, quelle que soit sa hauteur (avant : « 176 px » mesurés à la main, faux dès que les tris
   passaient sur deux lignes). Écran trop bas : c'est la fenêtre qui défile (au moins 300 px pour la grille et la fiche).
   La fiche : l'en-tête et les onglets restent, le contenu défile ; s'il ne reste pas 200 px pour lui, toute la fiche défile. */
/* (27/11) seulement quand la grille et la fiche tiennent côte à côte (fenêtre de PC étroite, ou téléphone avant son premier
   toucher : sinon la fiche recouvrait la grille et on ne pouvait plus toucher un Pokémon). Plus étroit : l'ancienne mise en page. */
@media (min-width: 820px) {
  body:not(.is-touch) .screen.eq-ecran { display: flex; flex-direction: column; height: calc((100vh - 24px) / var(--ui, 1)); height: calc((100dvh - 24px) / var(--ui, 1)); overflow: hidden; }
  body:not(.is-touch) .screen.eq-ecran > .box { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; }
  body:not(.is-touch) .screen.eq-ecran > .box > * { flex: none; }
  body:not(.is-touch) .screen.eq-ecran .eq-corps { flex: 1 1 0; min-height: 300px; flex-wrap: nowrap; }
  body:not(.is-touch) .screen.eq-ecran .eq-grid { min-height: 0; align-self: stretch; }
  body:not(.is-touch) .screen.eq-ecran .eq-grid ~ #detail { min-height: min(300px, 100%); max-height: 100%; }
}
body:not(.is-touch) .screen.eq-ecran .eq-grid ~ #detail.fi-fenetre { overflow-y: auto; }
body:not(.is-touch) .screen.eq-ecran #detail.fi-fenetre .fi-corps { flex: 1 1 auto; min-height: 200px; }
/* Bascule shiny : des étincelles jaillissent du Pokémon ; retour à la normale : il s'éteint doucement. */
#dh.sh-flash > canvas { animation: shFlash .5s steps(5, end); }
@keyframes shFlash { 0% { filter: brightness(3) saturate(0); } 100% { filter: none; } }
#dh.sh-eteint > canvas { animation: shEteint .4s steps(4, end); }
@keyframes shEteint { 0% { filter: brightness(.3); } 100% { filter: none; } }
.sh-eclat { position: absolute; left: 50%; top: 50%; line-height: 0; pointer-events: none; animation: shEclat .8s steps(8, end) forwards; }
.sh-eclat .pxi { margin: 0; }
@keyframes shEclat { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1); opacity: 0; } }
/* ---------- Lot I4 (5/11) : Mon équipe et gelées pour un débutant ---------- */
/* Étoiles de défi légendées et rareté en couleur dans l'en-tête de la fiche */
.fi-et { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; cursor: help; }
.fi-et-leg { font-size: 14px; color: var(--muted, #9fb1c9); white-space: nowrap; }
.fi-rar { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; white-space: nowrap; cursor: help; }
.fi-rar b { color: var(--rc); font-weight: normal; }
.fi-rar-et { display: inline-flex; gap: 1px; line-height: 0; }
.fi-rar-et .pxi { margin: 0; }
/* Médailles : en couleur quand on les a, en ombre sinon (comme les Pokémon pas encore vus du Pokédex) */
.succes-pk { align-items: center; gap: 6px; margin: 4px 0 2px; }
.md-tete { font-size: 16px; color: var(--muted, #9fb1c9); margin-right: 2px; }
.md-tete b { color: var(--gold); font-weight: normal; }
.succes-pk .chip.medaille { width: 38px; height: 38px; padding: 0; gap: 0; justify-content: center; border-radius: 50%; cursor: pointer; position: relative;
  background: radial-gradient(circle at 34% 30%, #fff3b8 0 12%, #f2c443 13% 55%, #b07a12 56% 100%); border: 2px solid #5a3a06; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 2px 0 rgba(0,0,0,.4); }
.succes-pk .chip.medaille .pxi, .succes-pk .chip.medaille .gel-ico { margin: 0; width: auto; height: auto; }
.succes-pk .chip.medaille .gel-ico { width: 24px; height: 24px; }
.succes-pk .chip.medaille .pxi { --k: 2px; }
.succes-pk .chip.medaille .md-nom { display: none; }
.succes-pk .chip.medaille.on { opacity: 1; filter: none; animation: mdBrille 2.4s steps(2, end) infinite; }
.succes-pk .chip.medaille.on::after { content: ''; position: absolute; top: 5px; left: 8px; width: 5px; height: 3px; background: #fff; opacity: .8; }
.succes-pk .chip.medaille.off { opacity: 1; filter: none; background: #1d2540; border: 2px dashed #56628a; box-shadow: inset 0 2px 0 rgba(0,0,0,.4); }
.succes-pk .chip.medaille.off .pxi, .succes-pk .chip.medaille.off .gel-ico { filter: brightness(0) invert(.55); opacity: .5; }
.succes-pk .chip.medaille:hover, .succes-pk .chip.medaille:focus-visible { transform: translateY(-2px); outline: none; border-color: var(--gold); }
.succes-pk .chip.medaille.md-tape { animation: mdTape .35s steps(3, end); }
@keyframes mdBrille { 50% { filter: brightness(1.18); } }
@keyframes mdTape { 40% { transform: scale(1.18) rotate(-8deg); } 80% { transform: scale(.95) rotate(4deg); } }
/* Lignes de gelées sur deux étages : la barre, puis « Tu as 2 Gelées Roses · encore 72 possibles » et les boutons */
.gel-row.gel-2l { flex-wrap: wrap; row-gap: 2px; padding: 4px 6px; border-radius: 6px; background: rgba(0,0,0,.18); margin: 4px 0; }
.gel-2l .gel-nom { width: 62px; }
.gel-2l .stat-num { width: 58px; text-align: right; }
.gel-sous { flex: 1 0 100%; display: flex; align-items: center; gap: 8px; padding-left: 40px; min-width: 0; }
.gel-info { flex: 1; min-width: 0; font-size: 15px; display: flex; flex-direction: column; line-height: 1.15; }
.gel-reste { font-size: 14px; }
.gel-2l .gel-btns { width: auto; gap: 6px; }
.gel-2l .gel-btn { font-size: 15px; padding: 2px 8px !important; white-space: nowrap; }
.gel-2l .gel-btn.dore { border-image-source: url('assets/ui/cadres/cadre1_yellow_fin.png'); color: #ffe27a; animation: gelPret 1.2s steps(2, end) infinite; }
.gel-2l .gel-btn:disabled { opacity: .45; }
.gel-2l .gel-or-btn .gel-or-tx { font-size: 13px; white-space: nowrap; }
.gel-2l .gel-or-btn.dore { animation: gelPret 1.2s steps(2, end) infinite; }
.gel-row.a-donner > .gel-ico { animation: gelAttend 1.8s steps(3, end) infinite; }
@keyframes gelAttend { 0%, 70%, 100% { transform: none; } 85% { transform: translateY(-4px); } }
@keyframes gelPret { 50% { filter: brightness(1.3); } }
/* (G6, 11/11, Kiko) Infobulle du jeu (infobulle.js) : petite fenêtre de la ROM en pixels (contour noir, liseré clair,
   coins coupés), qui apparaît d'un coup en deux paliers ; texte court, sur une ou deux lignes. */
#infobulle { position: fixed; left: -999px; top: -999px; z-index: 100000; max-width: 280px; padding: 4px 9px 5px; pointer-events: none;
  font-family: 'PMD Font', 'Pixelify', system-ui, sans-serif; font-size: 16px; line-height: 1.2; color: #f4f8ff; white-space: normal; text-align: left;
  background: #182a6a; border: 2px solid #e8f0ff; outline: 2px solid #05081a; outline-offset: 0;
  box-shadow: inset 0 0 0 2px #30489c, inset 0 2px 0 2px #4060c0, 3px 3px 0 2px rgba(0,0,0,.45);
  text-shadow: 1px 1px 0 #05081a; image-rendering: pixelated; opacity: 0; visibility: hidden; transform: scale(.9); transform-origin: 0 0; }
#infobulle.vu { opacity: 1; visibility: visible; transform: none; animation: ibPop .1s steps(2, end); }
@keyframes ibPop { from { opacity: .4; transform: scale(.9); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #infobulle.vu { animation: none; } }
/* (13/11, Kiko) la bulle suit la taille de l'interface (--ui, comme les fenêtres) ; jamais plus large que l'écran */
#infobulle { font-size: calc(16px * var(--ui, 1)); max-width: min(calc(280px * var(--ui, 1)), calc(100vw - 16px)); overflow-wrap: anywhere; }
/* Infobulle d'une attaque (attaque-info.js) : nom en couleur du type, petite ligne, puis toute la description */
#infobulle.ib-mv { max-width: min(calc(330px * var(--ui, 1)), calc(100vw - 16px)); padding: 5px 10px 7px; }
#infobulle .ibm-t { display: flex; align-items: center; gap: 6px; font-size: 1.12em; margin-bottom: 2px; }
#infobulle .ibm-t b { flex: 1 1 auto; font-weight: normal; }
#infobulle .ibm-ty { flex: 0 0 auto; font-size: .78em; padding: 0 5px 1px; color: #fff; background: var(--tc); box-shadow: inset 0 -2px 0 rgba(0,0,0,.35), 0 0 0 1px #05081a; text-transform: uppercase; letter-spacing: .5px; }
/* La recharge dans la petite ligne : le mot « recharge », ou le sablier en pixels dans la liste d'un écran étroit (une seule ligne) */
.lc-cd { white-space: nowrap; }
.lc-cd .lc-sab { display: none; vertical-align: -2px; margin-right: 2px; }
@media (max-width: 700px) { .cap-in .lc-cd .lc-sab { display: inline-block; } .cap-in .lc-cd .lc-mot { display: none; } }
#infobulle .ibm-ty.clair { color: #10142a; text-shadow: 1px 1px 0 rgba(255,255,255,.45); }
#infobulle .ibm-l { color: #ffe27a; font-size: .9em; }
#infobulle .ibm-p { color: #a9b8e8; font-size: .85em; }
#infobulle .ibm-cone { display: block; margin: 4px 0 2px; image-rendering: pixelated; } /* (26/11) aperçu du cône */
#infobulle .ibm-e { margin-top: 4px; padding-top: 4px; border-top: 2px solid #30489c; display: flex; flex-direction: column; gap: 3px; font-size: .9em; }
#infobulle .ibm-e > div { padding-left: 10px; position: relative; }
#infobulle .ibm-e > div::before { content: ''; position: absolute; left: 0; top: .45em; width: 4px; height: 4px; background: #ffe27a; box-shadow: 1px 1px 0 #05081a; }
#infobulle .ibm-pied { margin-top: 4px; color: #8fe0a0; font-size: .82em; }

/* (12/11, rapport de Louh) Compte ouvert dans un autre onglet ou appareil : écran par-dessus tout (ui.js ecranAilleurs) */
.modal.ailleurs { z-index: 300; background: rgba(3,6,20,.9); }
.ailleurs-box { width: min(600px, 94vw); text-align: center; animation: pop .3s; border-image-source: url('assets/ui/cadres/cadre1_blue.png'); } /* cadre plein : le titre du jeu ne se voit plus au travers */
.ailleurs-box h2 { margin: 4px 0 10px; }
.ailleurs-box p { font-size: 17px; margin: 0 0 8px; }
.ailleurs-icone { font-size: 44px; line-height: 1; display: inline-block; animation: ailleurs-flotte 1.8s ease-in-out infinite; }
@keyframes ailleurs-flotte { 50% { transform: translateY(-5px); } }

/* (13/11, Kiko) Pokémon favoris (client/js/favoris.js) : grosse étoile jaune en pixel art en haut à gauche de la case.
   Elle dépasse un peu au-dessus du cadre, jamais sur les cases voisines : à gauche, elle s'arrête au bord du cadre ;
   au-dessus, elle sort de 5 px pour un écart de 6 px entre deux rangées. */
.fav-etoile { display: block; image-rendering: pixelated; pointer-events: none; filter: drop-shadow(1px 1px 0 #05081a); }
.fav-etoile.mini { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.eq-grid { padding-top: 8px; }
.eq-cell .eq-fav { position: absolute; left: -2px; top: -7px; z-index: 3; }
.eq-cell[class*="rk-"] .eq-fav { left: -12px; top: -17px; }
.eq-cell.fav .eq-lv { left: 24px; }
.eq-cell.fav[class*="rk-"] .eq-lv { left: 16px; }
.eq-fav.pop { animation: favPop .36s steps(4, end); }
@keyframes favPop { 0% { transform: scale(.2) rotate(-30deg); } 40% { transform: scale(1.4) rotate(8deg); filter: drop-shadow(1px 1px 0 #05081a) brightness(1.6); } 100% { transform: none; } }
/* Titres « Favoris » et « Les autres » dans la grille (seulement s'il y a les deux) */
.eq-titre-groupe { display: flex; align-items: center; gap: 6px; font-size: 18px; color: #a9b8e8; text-shadow: 0 2px 0 #000; margin: 4px 0 0; }
.eq-titre-groupe::after { content: ''; flex: 1; height: 2px; background: #30489c; box-shadow: 0 2px 0 #05081a; }
.eq-titre-groupe.fav { color: var(--gold); }
.eq-titre-groupe .fav-etoile.mini { margin-right: 0; }
/* Sur la fiche : l'étoile en haut à gauche (la croix est en haut à droite). Éteinte = grise ; allumée = jaune. */
#detail .fi-fav { position: absolute; top: 6px; left: 6px; z-index: 3; min-width: 40px; min-height: 40px; padding: 4px; justify-content: center; }
#detail .fi-fav .fav-etoile { filter: grayscale(1) brightness(.55) drop-shadow(1px 1px 0 #05081a); transition: filter .1s steps(2, end); }
#detail .fi-fav:hover .fav-etoile, #detail .fi-fav.focus .fav-etoile { filter: grayscale(.4) brightness(.9) drop-shadow(1px 1px 0 #05081a); }
#detail .fi-fav.on { border-color: var(--gold); }
#detail .fi-fav ~ .fi-haut > #dh { padding-top: 24px; } /* le sprite passe sous l'étoile, sans être caché */
#detail .fi-fav.on .fav-etoile { filter: drop-shadow(1px 1px 0 #05081a); animation: favBrille 2.4s steps(1, end) infinite; }
#detail .fi-fav.pop .fav-etoile { animation: favPop .36s steps(4, end), favBrille 2.4s steps(1, end) .36s infinite; }
#detail .fi-fav.pop-off .fav-etoile { animation: favEteint .25s steps(3, end); }
@keyframes favBrille { 0%, 85%, 100% { filter: drop-shadow(1px 1px 0 #05081a); } 90% { filter: drop-shadow(1px 1px 0 #05081a) brightness(1.45); } }
@keyframes favEteint { from { transform: scale(1.2); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .eq-fav.pop, #detail .fi-fav .fav-etoile { animation: none !important; } }

/* (13/11, Kiko) Protection des cartes d'amélioration (game.js, protegerPicks) : pendant ~1 s, les cartes sont là mais un peu
   ternes et ne se prennent pas ; puis elles s'allument, avec un éclat en pixels qui passe une fois (et un son doux). */
.picks .pick { transition: filter .24s steps(3, end); }
.picks.attente .pick { filter: saturate(.55) brightness(.78); cursor: default; }
.picks.attente .pick:hover { transform: none; }
.pick .pk-eclat { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit; z-index: 2; }
.picks.pret .pick:not(.verrou) .pk-eclat::before { content: ''; position: absolute; top: -10%; bottom: -10%; left: -40%; width: 12%;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.34) 0 4px, rgba(255,255,255,.12) 4px 8px); transform: skewX(-18deg);
  animation: pkEclat .42s steps(6, end) forwards; animation-delay: calc(var(--d, 0ms) * .5); opacity: 0; }
@keyframes pkEclat { 0% { left: -40%; opacity: 1; } 100% { left: 120%; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .picks.pret .pick .pk-eclat::before { animation: none; } .picks .pick { transition: none; } }
.gu-cadenas { width: 16px; height: 16px; vertical-align: -2px; image-rendering: pixelated; margin-left: 4px; } /* (14/11) guilde privée au classement : son nom et un petit cadenas */
/* (18/11, boîte à idées) badge sous le portrait de la roulette de capture : déjà capturé ou nouveau */
.rl-port { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.rl-badge { padding: 1px 6px; font-size: 14px; line-height: 18px; white-space: nowrap; border-radius: 3px; box-shadow: 0 2px 0 #000; }
.rl-badge.deja { color: #c9d6ff; background: #1c2a55; border: 1px solid #5c74c8; }
.rl-badge.nouveau { color: #fff3b0; background: #6b3b00; border: 1px solid var(--gold); animation: rlNouveau 1s steps(2, end) infinite; }
@keyframes rlNouveau { 50% { filter: brightness(1.35); } }

/* (21/11/2026, fluidité) Case d'une grande grille hors de l'écran : ses animations sont coupées (fluidite.js), ce qui
   libère aussi leurs calques graphiques. Invisible à l'œil : elles repartent dès que la case revient à l'écran. */
.anim-off, .anim-off *, .anim-off::before, .anim-off::after, .anim-off *::before, .anim-off *::after { animation-name: none !important; }

/* (21/11) Pause des joueurs : pastille « En pause : 1/2 joueurs » (à plusieurs), une lampe par joueur */
.pausej { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 4px; background: rgba(8,15,40,.88); border: 1px solid rgba(159,216,255,.45); color: #bfe4ff; font-size: 15px; white-space: nowrap; z-index: 6; pointer-events: none; animation: pj-entre .25s ease-out; box-shadow: 0 2px 0 rgba(0,0,0,.35); }
.pausej .pj-ico { font-size: 12px; letter-spacing: -2px; color: #9fd8ff; }
.pausej .pj-lampes { display: flex; gap: 4px; }
.pausej .pj-lampes i { width: 8px; height: 8px; border-radius: 50%; background: #2a3555; border: 1px solid #56638a; transition: background .2s, box-shadow .2s; }
.pausej .pj-lampes i.oui { background: #9fd8ff; border-color: #dff3ff; box-shadow: 0 0 6px #9fd8ff; }
.pausej.on { top: 84px; border-color: var(--gold-line); color: var(--gold); animation: pj-entre .25s ease-out, pj-souffle 1.8s ease-in-out infinite .25s; }
.pausej.on .pj-ico { color: var(--gold); }
.pausej.on .pj-lampes i.oui { background: var(--gold); border-color: #fff3c4; box-shadow: 0 0 6px var(--gold); }
#hud:has(.pausej.on) #h-pause { display: none; }
@keyframes pj-entre { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pj-souffle { 50% { box-shadow: 0 0 10px rgba(255,215,106,.35); } }
.pm-etat.pm-pause-on { color: var(--gold); }

/* (23/11) Fenêtre « Voulez-vous vraiment quitter ? » */
.modal.quit-confirm { z-index: 320; background: rgba(3,6,20,.82); }
.quit-confirm .qc-boite { text-align: center; border-color: var(--gold, #f7d51d); }
.quit-confirm .qc-titre { margin: 0 0 8px; font-size: 26px; }
.quit-confirm .qc-texte { margin: 0 0 14px; opacity: .9; }
.quit-confirm .qc-boutons { justify-content: center; gap: 12px; flex-wrap: wrap; }
.quit-confirm .qc-boutons .btn { min-width: 170px; }
/* (24/11, Kiko) touches affichées : à la manette, l'icône pixel art du bouton de sa marque (input.js, toucheVue) */
.tv { display: inline-flex; align-items: center; vertical-align: middle; line-height: 1; }
.tv .pad-btn { display: inline-flex; line-height: 0; }
.tv .pad-ico { filter: drop-shadow(0 1px 0 rgba(0,0,0,.55)); }
.key .tv .pad-ico, .k .tv .pad-ico { vertical-align: middle; }

/* (24/11) Étage du hors-la-loi : alarme rouge qui clignote 3 fois sur les bords de l'écran (game.js annonceHorsLoi) */
.alerte-hl { position: fixed; inset: 0; pointer-events: none; z-index: 40; box-shadow: inset 0 0 0 0 rgba(255, 40, 40, 0); animation: alerteHL 0.9s steps(6) 3; }
@keyframes alerteHL { 0%, 100% { box-shadow: inset 0 0 0 0 rgba(255, 40, 40, 0); } 40% { box-shadow: inset 0 0 90px 24px rgba(255, 40, 40, 0.55); } }
@media (prefers-reduced-motion: reduce) { .alerte-hl { animation: none; box-shadow: inset 0 0 60px 12px rgba(255, 40, 40, 0.35); } }

/* ---------- Message de guilde (23/11/2026) : banderole qui défile, message épinglé sur le tableau ---------- */
.gu-banderole { position: fixed; top: 8px; left: 50%; z-index: 9000; width: min(760px, 96vw); transform: translateX(-50%); animation: guBdIn .45s steps(6) both; cursor: pointer; }
.gu-banderole.part { animation: guBdOut .4s steps(5) both; }
.gu-bd-ruban { position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 34px 5px 8px; background: linear-gradient(180deg, #ffe08a, #f0b43c 55%, #c9821c); color: #3a2200; border: 3px solid #1a1030; box-shadow: 0 0 0 2px #fff3b0, 0 4px 0 #1a1030, 0 0 22px rgba(255,200,80,.55); }
.gu-bd-ruban::before, .gu-bd-ruban::after { content: ''; position: absolute; top: 6px; width: 14px; height: calc(100% + 2px); background: #c9821c; border: 3px solid #1a1030; z-index: -1; }
.gu-bd-ruban::before { left: -14px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 45% 50%); }
.gu-bd-ruban::after { right: -14px; clip-path: polygon(0 0, 100% 0, 55% 50%, 100% 100%, 0 100%); }
.gu-bd-tete { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 1px 8px; background: #3a2200; color: #ffe08a; font-size: 15px; white-space: nowrap; }
.gu-bd-tete .pxi { animation: guBdLettre 1s steps(2) infinite; }
.gu-bd-fenetre { position: relative; flex: 1; overflow: hidden; height: 24px; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.gu-bd-texte { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 18px; line-height: 24px; font-weight: bold; transform: translateX(var(--bd-l, 600px)); }
.gu-bd-texte.roule { animation: guBdRoule 10s linear 2; }
.gu-bd-de { font-weight: normal; opacity: .8; }
.gu-bd-x { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: #3a2200; color: #ffe08a; border: 2px solid #1a1030; width: 24px; height: 24px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.gu-bd-x:hover, .gu-bd-x:focus-visible { background: #6a3c00; }
@keyframes guBdIn { from { transform: translate(-50%, -80px); opacity: 0; } 70% { transform: translate(-50%, 4px); opacity: 1; } to { transform: translate(-50%, 0); } }
@keyframes guBdOut { to { transform: translate(-50%, -80px); opacity: 0; } }
@keyframes guBdRoule { from { transform: translateX(var(--bd-l, 600px)); } to { transform: translateX(-100%); } }
@keyframes guBdLettre { 50% { transform: translateY(-2px) rotate(-8deg); } }
.gu-msg { position: relative; margin: 6px 0 10px; padding: 10px 12px 8px 30px; background: linear-gradient(180deg, #f6e7c0, #e9d29a); color: #3a2a10; border: 3px solid #1a1030; box-shadow: 0 0 0 2px #fff3d0 inset, 3px 3px 0 rgba(0,0,0,.35); transform: rotate(-.4deg); animation: guMsgPose .35s steps(5) both; }
.gu-msg.vide { background: rgba(0,0,0,.22); color: inherit; box-shadow: none; border: 2px dashed rgba(255,255,255,.25); transform: none; gap: 8px; align-items: center; padding: 6px 10px 6px 30px; }
.gu-msg-punaise { position: absolute; left: 9px; top: 9px; width: 12px; height: 12px; background: #e8403a; border: 2px solid #1a1030; box-shadow: inset -3px -3px 0 #a11e1a, inset 2px 2px 0 #ff9a90; }
.gu-msg.vide .gu-msg-punaise { top: 50%; margin-top: -6px; opacity: .6; }
.gu-msg-titre { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: bold; color: #7a4a00; text-transform: uppercase; letter-spacing: 1px; }
.gu-msg-texte { font-size: 19px; margin: 2px 0 4px; word-break: break-word; }
.gu-msg .muted { color: #6a5a3a; }
.gu-msg-bas { gap: 6px; align-items: center; }
@keyframes guMsgPose { from { transform: translateY(-10px) rotate(-3deg); opacity: 0; } to { transform: rotate(-.4deg); opacity: 1; } }
.gu-m-idees { display: flex; flex-wrap: wrap; gap: 4px; }
.gu-m-ligne { align-items: flex-start; gap: 6px; }
.gu-m-duree { align-items: center; gap: 6px; } .gu-m-duree input[type=range] { accent-color: #ffd35c; min-width: 120px; } #gu-m-jl { min-width: 76px; text-align: right; }
/* (23/11) les autres membres s'ouvrent d'un clic : leur fiche */
.gu-membre.clic { cursor: pointer; transition: background .12s; }
.gu-membre.clic:hover, .gu-membre.clic:focus-visible { background: rgba(95,180,255,.18); outline: 2px solid rgba(255,255,255,.35); outline-offset: -2px; }
.gu-membre.tape { animation: guTape .2s steps(3); }
@keyframes guTape { 50% { transform: scale(.98); } }
@media (prefers-reduced-motion: reduce) { .gu-banderole, .gu-msg, .gu-bd-tete .pxi { animation: none !important; } }
.gu-msg b, .gu-msg .notr { color: #5a2a00; text-shadow: none; }
/* (25/11, bug de Louh « message dédoublé ») sur le papier clair, l'ombre de contour des textes du jeu se lisait comme un 2e texte : aucune ombre dans le message (sauf les boutons) */
.gu-msg-titre, .gu-msg-titre *, .gu-msg-texte, .gu-msg-bas > span, .gu-msg-bas > span * { text-shadow: none !important; }
body.grand-texte .gu-msg .muted { color: #6a5a3a; } /* le « grand texte » (pc.css) mettait ces textes en bleu clair sur le papier */

/* (26/11 soir, bugs Discord « textes écrits 2 fois » : types de l'atelier de Cradopaud, message de guilde) un texte FONCÉ
   qui hérite de l'ombre noire décalée des cadres (« 0 2px 0 #000 ») se lit comme une 2e copie du mot, 2 px plus bas.
   Liste : toutes les règles qui posent un texte foncé sans ombre à elles ; :where() = spécificité nulle,
   donc une ombre écrite exprès sur l'élément reste prioritaire. Essai : test/e2e-textes-doubles.mjs */
:where(.cap-n, .cap-eq, .cap-auto.on .cap-auto-c, #chat .chat-dest, .crc-neuve, .cap-ct, .cap-sous-pastille, .ct-lieu-sep, .ech-n, .ech-onglet[data-vue="lui"] .ech-n, .ech-tag, .ech-shiny .ech-tag, .entr-niveau .entr-plus, .ec-et i, .ec-att, .ec-qui.moi, .mt-tri-neuf, .pg-bulle, .pg-tag, .sos-vide, .dg-hote, .n-proposed, .px-cell.ombre .px-nm, .gu-membre .gu-role.r-chef, .gu-membre .gu-role.r-adjoint, .gu-bd-ruban, .gu-msg, .gu-msg-titre, .gu-msg .muted, body.grand-texte .gu-msg .muted, .af-note .n-title, .af-note .n-where, .af-note .n-txt, .af-note .n-rew, .af-note.k-wanted .n-rew-t, .af-note .n-rew-t, .af-note .rw, .af-note .rw-poke b, .af-note .rw-obj .rw-nom, .af-note .n-proposed, .qd-tag, .qd-titre, .qd-l, .qd-txt, .qd-tampon, .banniere.bn-histoire .bn-ruban, .titre-fete .tf-compteur, .banniere.bn-hw .bn-ruban, .banniere.bn-charme .bn-ruban, .banniere.bn-crane .bn-ruban, .btn.mini.to-cat.on .to-n, .btn.mini.to-rar.on .to-n, .tbr-box.on .tbr-etat, .ct-type) { text-shadow: none; }
:where(.af-note, .qd-titre, .qd-l, .qd-txt, .gu-msg) :where(:not(.btn):not(.btn *)) { text-shadow: none; }
/* (4/12, lag des menus : grandes grilles de Pokémon) hors de l'écran, les animations sont en pause (client/js/anim-visibles.js, fluidite.js) ;
   à l'écran, rien ne change. */
.anim-hors, .anim-hors::before, .anim-hors::after { animation-play-state: paused !important; }
.dex-cell { contain-intrinsic-size: auto 100px auto 120px; } /* taille gardée de la dernière fois où la case a été dessinée */
.dex-cell.anim-hors, .dex-cell.anim-off { content-visibility: hidden; } /* anim-off : cases des grandes grilles, suivies par fluidite.js */
.dex-cell.anim-hors::before, .dex-cell.anim-hors::after { animation: none !important; }
/* (4/12) pendant un défilement de grille : animations en pause, elles repartent 150 ms après (fluidite.js), recalées sur les autres.
   Les effets en pseudo-éléments et la couronne sont coupés le temps du défilement. */
.defile-pause .dex-cell, .defile-pause .dex-cell *, .defile-pause .dex-cell::before, .defile-pause .dex-cell::after, .defile-pause .dex-cell *::before, .defile-pause .dex-cell *::after { animation-play-state: paused !important; }
.defile-pause .dex-cell::before, .defile-pause .dex-cell::after, .defile-pause .dex-cell .crown, .defile-pause .dex-cell .crown svg { animation-name: none !important; }
/* (5/12, Kiko) Haut de la Tour Infinie (91F, puis 101F) : bannière violette qui gronde, voile sombre sur les bords */
#h-banner .banner.feroce .t { color: #c9a2ff; text-shadow: 0 2px 0 #000, 0 0 10px rgba(150,90,255,.75); animation: feroce-gronde .36s steps(4) 4; }
#h-banner .banner.feroce .s { color: #e6d6ff; }
@keyframes feroce-gronde { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.feroce-voile { position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at center, transparent 48%, rgba(70,20,130,.5) 100%); animation: feroce-voile 2.7s ease-out forwards; }
@keyframes feroce-voile { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
