/* Tarbes City — interface du jeu, d'après la maquette de l'atelier (commun.css, 30/11/2026).
   Dimensions de la maquette (1280 × 720) multipliées par --k, plancher 0,62 pour garder
   des boutons assez gros au doigt sur téléphone. */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter:wght@400;600;700;800&display=swap');
:root {
  --nuit: #0e1220; --nuit-2: #161b2d; --verre: rgba(12, 15, 26, .78); --verre-clair: rgba(22, 27, 45, .92);
  --ligne: rgba(255, 255, 255, .14); --neon: #ff3d7f; --neon-sombre: #4a1530; --or: #ffc21a; --police: #2d9cff;
  --alerte: #ff4b4b; --ok: #3ddc84; --creme: #f4efe6; --creme-2: #b8b3aa; --creme-3: #7c7a85;
  --titre: Anton, Impact, "Arial Narrow", sans-serif; --texte: Inter, ui-sans-serif, system-ui, sans-serif;
  --k: 1;   /* recalculé par main.js selon la taille de l'écran */
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--nuit); color: var(--creme); font-family: var(--texte);
  -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
.cache { display: none !important; }
#jeu, #zone { position: fixed; inset: 0; }
#jeu canvas { display: block; width: 100%; height: 100%; }
#zone { z-index: 1; }
#etiquettes { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
#hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
#hud .hud { position: absolute; }
#hud button, #hud .joystick { pointer-events: auto; }

.minicarte { left: calc(24px * var(--k)); top: calc(22px * var(--k)); width: calc(184px * var(--k)); height: calc(184px * var(--k)); border-radius: 50%;
  overflow: hidden; border: 3px solid rgba(255, 255, 255, .85); box-shadow: 0 6px 24px rgba(0, 0, 0, .5); background: #14161c; }
.minicarte canvas { width: 100%; height: 100%; display: block; }
.lieu-mini { left: calc(24px * var(--k)); top: calc(212px * var(--k)); width: calc(184px * var(--k)); text-align: center; font-size: calc(13px * var(--k) + 1px);
  font-weight: 700; text-shadow: 0 1px 3px #000; line-height: 1.2; }
.forme { left: calc(34px * var(--k)); top: calc(250px * var(--k)); width: calc(164px * var(--k)); display: flex; flex-direction: column; gap: calc(5px * var(--k)); }
.forme div { display: flex; align-items: center; gap: 7px; font-size: calc(13px * var(--k)); text-shadow: 0 1px 3px #000; }
.forme i { flex: 1; height: 7px; border-radius: 99px; background: rgba(0, 0, 0, .45); overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.forme i b { display: block; height: 100%; border-radius: 99px; transition: width .4s; }
.forme .bas b { animation: clign 1s steps(2) infinite; }
.statut { right: calc(26px * var(--k)); top: calc(22px * var(--k)); text-align: right; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
.argent { font-family: var(--titre); font-size: calc(44px * var(--k)); line-height: 1; color: var(--ok); letter-spacing: .02em; }
.argent.gain { animation: gain .6s; }
@keyframes gain { 30% { transform: scale(1.15); } }
.heure { font-size: calc(15px * var(--k)); font-weight: 700; margin-top: 4px; }
.etoiles { margin-top: 6px; font-size: calc(30px * var(--k)); letter-spacing: 4px; color: rgba(255, 255, 255, .35); min-height: 1em; }
.etoiles b { color: var(--or); text-shadow: 0 0 10px rgba(255, 194, 26, .8); }
.etoiles.clign b { animation: clign 1s steps(2) infinite; }
.avis { margin-top: 4px; display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--alerte); color: #fff; font-weight: 800; font-size: 12px; letter-spacing: .1em; }
@keyframes clign { 50% { opacity: .35; } }
.boutons-haut { right: calc(26px * var(--k)); top: calc(170px * var(--k)); display: flex; gap: 10px; }
.rond { width: calc(52px * var(--k) + 6px); height: calc(52px * var(--k) + 6px); border-radius: 50%; background: var(--verre); border: 2px solid var(--ligne);
  font-size: calc(22px * var(--k) + 2px); display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.rond.signal { border-color: var(--neon); animation: clign 1s steps(2) infinite; }
.compteur { left: 50%; bottom: calc(26px * var(--k)); transform: translateX(-50%); text-align: center; text-shadow: 0 2px 6px #000; }
.compteur b { font-family: var(--titre); font-size: calc(40px * var(--k)); display: block; line-height: 1; }
.compteur small { font-size: 12px; font-weight: 700; color: var(--creme-2); }
.joystick { left: calc(60px * var(--k)); bottom: calc(54px * var(--k)); width: calc(150px * var(--k) + 20px); height: calc(150px * var(--k) + 20px); border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
.joystick i { position: absolute; left: 30%; top: 30%; width: 40%; height: 40%; border-radius: 50%; background: rgba(255, 255, 255, .32); pointer-events: none; }
body:not(.tactile) .joystick { opacity: .55; }
.actions { right: calc(30px * var(--k)); bottom: calc(30px * var(--k)); display: flex; flex-direction: column; align-items: flex-end; gap: calc(10px * var(--k) + 2px); }
.action { display: flex; align-items: center; gap: 10px; padding: 0 calc(20px * var(--k) + 4px) 0 8px; height: calc(58px * var(--k) + 6px); border-radius: 40px; background: var(--verre);
  border: 2px solid var(--ligne); font-size: calc(17px * var(--k) + 2px); font-weight: 800; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); white-space: nowrap; pointer-events: auto; }
.action .r { width: calc(42px * var(--k) + 4px); height: calc(42px * var(--k) + 4px); border-radius: 50%; display: grid; place-items: center; font-size: calc(21px * var(--k) + 2px); background: rgba(255, 255, 255, .1); }
.action.forte { background: linear-gradient(180deg, #ff5a92, var(--neon)); border-color: rgba(255, 255, 255, .5); }
.action.forte .r { background: rgba(0, 0, 0, .18); }
.action.or { background: linear-gradient(180deg, #ffd34f, var(--or)); color: #2a1d00; }
.action.police { background: linear-gradient(180deg, #4fb0ff, var(--police)); }
.action:active { transform: scale(.96); }
.action.rangee { flex-direction: row; }
.actions .duo { display: flex; gap: 10px; }
.toast { left: 50%; top: calc(118px * var(--k)); transform: translateX(-50%); padding: 10px 20px; border-radius: 99px; background: var(--verre); border: 1px solid var(--ligne);
  font-size: calc(15px * var(--k) + 1px); font-weight: 700; max-width: 62vw; text-align: center; }
.toast.alerte { border-color: var(--alerte); color: #ffb3b3; }
.toast.ok { border-color: var(--ok); }
.attribution { right: 8px; bottom: 2px; font-size: 10px; color: rgba(255, 255, 255, .6); text-shadow: 0 1px 2px #000; }
.ips { left: 50%; top: 4px; transform: translateX(-50%); font: 700 11px monospace; background: rgba(0, 0, 0, .5); padding: 2px 6px; border-radius: 4px; }

/* étiquettes au-dessus des têtes : pseudo, bulles de chat, état des passants */
.etiq { position: absolute; transform: translate(-50%, -100%); white-space: nowrap; font-size: 13px; font-weight: 800; text-shadow: 0 1px 3px #000; text-align: center; }
.etiq .nom { padding: 2px 8px; border-radius: 99px; background: rgba(0, 0, 0, .45); }
.etiq .nom.recherche { color: var(--or); }
.etiq .bulle { position: relative; display: block; margin-bottom: 6px; padding: 6px 12px; border-radius: 12px; background: var(--verre); border: 1px solid var(--ligne);
  font-size: 13px; font-weight: 700; max-width: 240px; white-space: normal; }
.etiq .etat { font-size: 20px; }

/* panneaux */
#panneau { position: fixed; z-index: 7; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(5, 7, 14, .35); padding: 12px; }
#panneau.droite { justify-content: flex-end; background: linear-gradient(90deg, transparent 30%, rgba(10, 12, 22, .7)); }
#panneau.transparent { background: none; pointer-events: none; }
#panneau.transparent .panneau { pointer-events: auto; }
.panneau { background: var(--verre-clair); border: 1px solid var(--ligne); border-radius: 16px; padding: 16px 18px; backdrop-filter: blur(6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5); width: min(560px, 96vw); max-height: 94vh; overflow-y: auto; touch-action: pan-y; }
.panneau.large { width: min(760px, 96vw); }
.titre-panneau { font-family: var(--titre); font-size: 28px; letter-spacing: .02em; line-height: 1.05; }
.surtitre { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--neon); }
.petit { font-size: 13.5px; color: var(--creme-2); line-height: 1.45; }
.ligne { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--ligne); }
.ligne:last-child { border-bottom: 0; }
.ic { width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.tx { flex: 1; min-width: 0; }
.tx b { display: block; font-size: 15px; }
.tx span { display: block; font-size: 12.5px; color: var(--creme-2); }
.btn { padding: 10px 16px; border-radius: 12px; background: rgba(255, 255, 255, .1); border: 1px solid var(--ligne); font-weight: 800; font-size: 15px; min-height: 44px; }
.btn.forte { background: linear-gradient(180deg, #ff5a92, var(--neon)); border-color: rgba(255, 255, 255, .5); }
.btn.or { background: linear-gradient(180deg, #ffd34f, var(--or)); color: #2a1d00; }
.btn.police { background: var(--police); }
.btn:disabled { opacity: .4; }
.choix { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.choix button { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid var(--ligne);
  font-size: 15.5px; font-weight: 700; text-align: left; min-height: 48px; }
.choix button .k { width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, .12); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.pied-panneau { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; justify-content: flex-end; }
.pastille { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.p-neon { background: var(--neon-sombre); color: #ff9dbf; } .p-or { background: rgba(255, 194, 26, .16); color: var(--or); }
.p-ok { background: rgba(61, 220, 132, .15); color: var(--ok); } .p-alerte { background: rgba(255, 75, 75, .18); color: #ff8d8d; }
.p-police { background: rgba(45, 156, 255, .18); color: #8cc8ff; } .p-gris { background: rgba(255, 255, 255, .08); color: var(--creme-2); }
.jauge { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.jauge > i { display: block; height: 100%; background: linear-gradient(90deg, #ff3d7f, #ffc21a); border-radius: 99px; }
.jauge.police > i { background: linear-gradient(90deg, #2d9cff, #ff4b4b); }
.nuancier { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.nuancier button { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); }
.nuancier button.mis { border: 3px solid #fff; box-shadow: 0 0 0 3px var(--neon); }
.objets { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-top: 6px; }
.objets button { height: 58px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid var(--ligne); display: grid; place-items: center; font-size: 22px; position: relative; padding-bottom: 12px; }
.objets button small { position: absolute; bottom: 3px; left: 0; right: 0; font-size: 9.5px; color: var(--creme-2); font-weight: 600; }
.objets button.mis { border: 2px solid var(--neon); background: rgba(255, 61, 127, .14); }
.objets button.cle::after { content: '🔒'; position: absolute; top: 3px; right: 4px; font-size: 11px; }
.section { margin-top: 12px; }
.chat-fil { max-height: 34vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.chat-fil .m { padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, .07); font-size: 14px; align-self: flex-start; max-width: 85%; }
.chat-fil .m.moi { align-self: flex-end; background: rgba(255, 61, 127, .2); }
.chat-saisie { display: flex; gap: 8px; }
.chat-saisie input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--ligne); background: rgba(0, 0, 0, .3); color: var(--creme); font: inherit; user-select: text; -webkit-user-select: text; }
.rapides { display: flex; gap: 6px; flex-wrap: wrap; }
.rapides button { padding: 6px 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid var(--ligne); font-size: 13px; font-weight: 700; min-height: 36px; }

/* mini-jeux */
.mj { text-align: center; }
.mj .piste { position: relative; height: 70px; margin: 16px 0; border-radius: 12px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.mj .cible { position: absolute; left: 50%; top: 8px; bottom: 8px; width: 6px; margin-left: -3px; background: var(--or); border-radius: 3px; box-shadow: 0 0 12px var(--or); }
.mj .note { position: absolute; top: 15px; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 12px var(--neon); }
.mj .zone { position: absolute; top: 0; bottom: 0; background: rgba(61, 220, 132, .35); }
.mj .curseur { position: absolute; top: 0; bottom: 0; width: 6px; margin-left: -3px; background: #fff; }
.mj .gros { width: 100%; height: 84px; font-size: 22px; }
.mj .score { font-family: var(--titre); font-size: 34px; }
.tirs { position: relative; height: min(50vh, 300px); border-radius: 12px; background: #2b2c31; overflow: hidden; cursor: crosshair; touch-action: none; }
.tirs .c { position: absolute; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: radial-gradient(circle, #ff3d7f 0 22%, #f4efe6 23% 40%, #1c1d22 41% 58%, #f4efe6 59%); }

/* écran d'accueil */
.ecran { position: fixed; inset: 0; z-index: 6; background: #0a0c16 center/cover no-repeat; }
.ecran .voile { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 12, 22, .95) 0%, rgba(10, 12, 22, .7) 50%, rgba(10, 12, 22, .2) 85%); }
.accueil-corps { position: absolute; left: calc(80px * var(--k)); top: 50%; transform: translateY(-55%); width: min(560px, 88vw); }
.logo { font-family: var(--titre); letter-spacing: .02em; line-height: .9; font-size: calc(110px * var(--k)); }
.logo .t { color: var(--creme); } .logo .c { color: var(--neon); text-shadow: 0 0 18px rgba(255, 61, 127, .55); }
.slogan { font-size: calc(22px * var(--k)); font-weight: 600; margin-top: 12px; }
.ligne-boutons { display: flex; gap: 12px; margin-top: calc(22px * var(--k)); flex-wrap: wrap; align-items: center; }
.pastilles { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.pied { position: absolute; right: 20px; bottom: 12px; left: 20px; text-align: right; font-size: 11px; }
.chargement { margin-top: 10px; }
@media (max-height: 430px) { .accueil-corps { top: 46%; } .pastilles { margin-top: 8px; } .accueil-corps > .petit:not(.chargement) { display: none; } }

/* âge : badge 18+ maison (le logo PEGI ne s'affiche qu'avec une classification PEGI/IARC délivrée) */
.mention-age { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; line-height: 1.3; }
.badge-18 { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; background: #d4202a; color: #fff; font-weight: 900; font-size: 15px; letter-spacing: -.5px; border: 2px solid #fff; }
@media (max-height: 430px) { .mention-age { margin-top: 6px; } .badge-18 { width: 32px; height: 32px; font-size: 13px; } }

/* boussole horizontale : points cardinaux et repères (destination, chez moi) */
.boussole { left: 50%; top: calc(14px * var(--k)); transform: translateX(-50%); width: calc(460px * var(--k)); height: calc(96px * var(--k)); min-width: 300px; min-height: 76px; max-width: 48vw; pointer-events: none; }
.boussole canvas { width: 100%; height: 100%; display: block; }

/* rappel des touches */
.panneau.aide { max-width: min(760px, 94vw); max-height: 88vh; overflow: auto; }
.touches { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.touches th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--rose, #ff3d7f); padding: 4px 8px; }
.touches td { padding: 7px 8px; border-top: 1px solid var(--ligne); vertical-align: middle; }
.touches td:first-child { font-weight: 700; }
.touches .pale { opacity: .5; }
.touches kbd { display: inline-block; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--ligne); background: rgba(255,255,255,.08); font: 700 12px Inter, system-ui, sans-serif; margin: 1px 0; }

/* US14 : cage d'escalier (étages du haut vers le bas) et portes */
.panneau.immeuble { max-width: min(640px, 94vw); max-height: 90vh; overflow: auto; }
.cage { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.etage { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.04); }
.nom-etage { width: 120px; flex: none; font-size: 12px; font-weight: 700; color: #ccd2e6; }
.portes { display: flex; gap: 8px; flex-wrap: wrap; }
.porte { width: 64px; height: 58px; border-radius: 8px 8px 2px 2px; border: 2px solid #6b4a2e; background: linear-gradient(#8a6040, #6b4a2e); color: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 800 16px Inter, system-ui, sans-serif; }
.porte span { font-size: 15px; line-height: 1; min-height: 15px; }
.porte:hover:not(:disabled) { border-color: #ffc21a; transform: translateY(-1px); }
.porte.moi { border-color: #b39ddb; background: linear-gradient(#6b5a9a, #4a3d70); }
.porte.forcee, .porte:disabled { opacity: .45; cursor: default; }
.resultat { margin: 4px 0 8px; padding: 8px 10px; border-radius: 8px; font-weight: 700; }
.resultat.ok { background: rgba(61, 220, 132, .14); color: #8ff0b8; } .resultat.ko { background: rgba(255, 75, 75, .14); color: #ffb3b3; }
