* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #111; color: #f1f1f1; font-family: system-ui, Segoe UI, sans-serif; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 8px; padding: 10px 14px; background: #333; color: #fff; }
button:hover { filter: brightness(1.2); }
input, select { font: inherit; padding: 10px; border-radius: 8px; border: 1px solid #444; background: #1c1c1c; color: #fff; }

.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(10,10,14,.72); z-index: 10; padding: 16px; }
.card { background: #18181d; border: 1px solid #2c2c35; border-radius: 16px; padding: 24px; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 60px #000a; }
.card.wide { max-width: 640px; }
h1 { margin: 0; font-size: 30px; letter-spacing: .5px; }
h1 span { color: #888; font-size: 20px; }
h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.sub { margin: 0; color: #aaa; }
label { display: flex; flex-direction: column; gap: 6px; color: #bbb; font-size: 14px; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.team { opacity: .55; border: 2px solid transparent; }
.team.sel { opacity: 1; }
.team.manif.sel { border-color: #ef4444; background: #3b1414; }
.team.police.sel { border-color: #3b82f6; background: #13213b; }
.big { background: #e11d48; font-weight: 700; padding: 13px; font-size: 17px; }
.join { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
#code { text-transform: uppercase; letter-spacing: 4px; text-align: center; }
.status { margin: 0; color: #fbbf24; min-height: 1.2em; font-size: 14px; }
.help { color: #aaa; font-size: 13px; }
.help p { margin: 6px 0; }
.legal { margin: 0; font-size: 11px; color: #666; }
.code { background: #000; padding: 4px 10px; border-radius: 6px; letter-spacing: 4px; color: #fbbf24; }
.small { padding: 6px 10px; font-size: 13px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cols ul { list-style: none; padding: 0; margin: 0 0 8px; min-height: 80px; }
.cols li { padding: 4px 0; border-bottom: 1px solid #262630; }
h3 { margin: 0 0 6px; } h3.m { color: #f87171; } h3.p { color: #60a5fa; }
#hostctl { display: flex; flex-direction: column; gap: 10px; }

#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#top { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); text-align: center; background: #000a; padding: 8px 16px; border-radius: 12px; min-width: 300px; }
#clock { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
#obj { font-size: 14px; color: #ddd; margin: 2px 0 6px; }
.bar { height: 8px; background: #333; border-radius: 4px; overflow: hidden; }
#prog { height: 100%; width: 0; background: #ef4444; transition: width .2s; }
#sites { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; margin-top: 5px; color: #999; }
#sites .done { color: #f87171; text-decoration: line-through; }
#sites .cur { color: #fff; font-weight: 700; }
#feed { position: absolute; top: 10px; right: 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; font-size: 13px; }
#feed div { background: #000a; padding: 4px 8px; border-radius: 6px; }
#cross { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); font-size: 22px; color: #fffc; text-shadow: 0 0 3px #000; }
#hint { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); background: #000b; padding: 6px 12px; border-radius: 8px; font-size: 14px; }
#hint:empty { display: none; }
#hpw { position: absolute; left: 16px; bottom: 16px; width: 220px; height: 22px; background: #000a; border-radius: 6px; overflow: hidden; }
#hp { height: 100%; width: 100%; background: #22c55e; }
#hpt { position: absolute; inset: 0; text-align: center; font-weight: 700; font-size: 13px; line-height: 22px; }
#items { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.it { width: 82px; height: 62px; background: #000a; border: 2px solid #444; border-radius: 10px; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; }
.it.sel { border-color: #fbbf24; background: #3a2e0acc; }
.it b { font-size: 20px; }
.it .k { position: absolute; top: 2px; left: 6px; font-size: 11px; color: #aaa; }
.it .cd { position: absolute; left: 0; bottom: 0; width: 100%; background: #0009; }
#dead { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; background: #4008; }
#lockmsg { position: absolute; top: 60%; left: 50%; transform: translateX(-50%); background: #000c; padding: 10px 18px; border-radius: 10px; font-weight: 700; }
#flash { position: absolute; inset: 0; box-shadow: inset 0 0 120px #f00; opacity: 0; transition: opacity .3s; }
#lbdmsg { position: absolute; top: 118px; left: 50%; transform: translateX(-50%); background: #7f1d1dee; border: 2px solid #f87171; padding: 6px 14px; border-radius: 10px; font-weight: 800; font-size: 16px; animation: pulse 1s infinite alternate; }
#lbdmsg.green { background: #14532dee; border-color: #4ade80; }
#lbdarrow { display: inline-block; transition: transform .1s; }
@keyframes pulse { from { opacity: 1; } to { opacity: .7; } }
.it.off { opacity: .35; }
.it .ammo { position: absolute; top: 2px; right: 6px; font-size: 11px; color: #fbbf24; font-weight: 700; }
#skinbox h3 { margin: 4px 0; }
#skinbox .row { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
#skinbox .row > span { width: 44px; color: #aaa; font-size: 13px; }
.sw-row { display: flex; gap: 6px; flex-wrap: wrap; }
.sw-row button { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 3px solid transparent; }
.sw-row button.txt { width: auto; border-radius: 8px; padding: 0 10px; font-size: 13px; background: #333; }
.sw-row button.sel { border-color: #fbbf24; }
.quit { background: #3f3f46; }
#menubtn { position: absolute; top: 10px; left: 12px; pointer-events: auto; background: #000b; border: 1px solid #444; font-weight: 700; }
.tabs { display: flex; gap: 6px; }
.tab { opacity: .6; } .tab.sel { opacity: 1; background: #52525b; }
.tabc p { margin: 6px 0; color: #ccc; font-size: 14px; line-height: 1.45; }
.pbtns { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
#pause { background: rgba(10,10,14,.6); }
/* créateur de perso */
.card.creator { max-width: 920px; max-height: calc(100vh - 32px); overflow: auto; }
.cgrid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; align-items: start; }
.stage { position: relative; background: radial-gradient(circle at 50% 40%, #2a2a35, #121218); border-radius: 14px; aspect-ratio: 4 / 5; overflow: hidden; }
#pv { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.arrows { position: absolute; inset: 0; pointer-events: none; }
.arow { position: absolute; left: 8px; right: 8px; display: flex; align-items: center; gap: 6px; transform: translateY(-50%); }
.arow > * { pointer-events: auto; }
.arow .plabel { flex: 1; display: flex; flex-direction: column; align-items: center; text-shadow: 0 1px 3px #000; pointer-events: none; }
.arow .plabel b { font-size: 12px; color: #aaa; font-weight: 600; }
.arow .plabel em { font-style: normal; font-size: 14px; font-weight: 700; }
.arr { width: 38px; height: 38px; padding: 0; border-radius: 50%; background: #000a; border: 1px solid #555; font-size: 16px; }
.dot { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 3px solid #fff8; }
.hintpv { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 11px; color: #777; margin: 0; }
.opts { display: flex; flex-direction: column; gap: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg.three { grid-template-columns: 1fr 1fr 1fr; }
.seg button { opacity: .55; border: 2px solid transparent; }
.seg button.sel { opacity: 1; border-color: #fbbf24; background: #3a2e0a; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { color: #bbb; font-size: 14px; }
.kit { margin: 0; font-size: 13px; color: #ccc; line-height: 1.5; }
.stats { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 12px; color: #aaa; align-items: center; }
.stats i { display: block; height: 6px; border-radius: 3px; background: #333; overflow: hidden; }
.stats i b { display: block; height: 100%; background: #22c55e; }
label.check { flex-direction: row; align-items: center; gap: 8px; }
#editperso { background: #1e3a5f; }
#ultramsg { position: absolute; top: 160px; left: 50%; transform: translateX(-50%); background: #000d; border: 2px solid #a1a1aa; padding: 6px 14px; border-radius: 10px; font-weight: 800; font-size: 15px; }
#ultramsg.mine { border-color: #facc15; background: #713f12ee; font-size: 18px; animation: pulse .5s infinite alternate; }
#ultraarrow { display: inline-block; }
#ultraflash { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%) scale(0); padding: 14px 28px; border-radius: 16px; color: #000; font-weight: 900; font-size: 42px; letter-spacing: 2px; opacity: 0; white-space: nowrap; text-shadow: 0 2px 0 #fff8; }
#ultraflash.go { animation: ultra 2.6s ease-out forwards; }
@keyframes ultra { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(-8deg); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.15) rotate(3deg); } 25% { transform: translate(-50%, -50%) scale(1) rotate(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.05); } }
#blind { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#charge { position: absolute; left: 50%; top: calc(50% + 26px); transform: translateX(-50%); width: 120px; height: 8px; background: #000a; border-radius: 4px; overflow: hidden; }
#chargef { height: 100%; width: 0; background: linear-gradient(90deg, #22c55e, #facc15, #ef4444); }
@media (max-width: 760px) { .cgrid { grid-template-columns: 1fr; } .stage { max-height: 60vh; margin: 0 auto; width: 100%; } }
/* boutique, compte, options */
.optrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: #bbb; }
.tog { padding: 4px 10px; font-size: 12px; }
.tog.on { background: #166534; }
.account { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: #aaa; background: #111118; padding: 8px 10px; border-radius: 10px; }
.shopbtn { background: #7c3aed; font-weight: 700; }
.lockinfo { position: absolute; top: 6px; left: 8px; right: 8px; margin: 0; background: #000c; border: 1px solid #a16207; color: #fde68a; font-size: 12px; padding: 6px 8px; border-radius: 8px; text-align: center; }
.arow em.locked::after { content: ' 🔒'; }
.shopcard { max-width: 760px; max-height: calc(100vh - 32px); overflow: auto; }
.loginbox { background: #111118; padding: 10px; border-radius: 10px; font-size: 14px; }
.loginbox p { margin: 0 0 8px; color: #bbb; }
.shoplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.sitem { background: #1f1f28; border: 1px solid #333; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.sitem h4 { margin: 0; font-size: 15px; }
.sitem p { margin: 0; font-size: 12px; color: #aaa; flex: 1; }
.sitem .buy { background: #16a34a; font-weight: 700; }
.sitem.owned { border-color: #16a34a; }
.sitem.owned .buy { background: #333; cursor: default; }
.consent { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #ccc; }
.consent a, .legal a { color: #93c5fd; }
/* jouer en ligne, chat, bulle */
.big.online { background: #2563eb; }
.small-sub { font-size: 12px; text-align: center; }
#chat { position: fixed; right: 12px; bottom: 90px; width: 300px; z-index: 12; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
#chatlog { display: flex; flex-direction: column; gap: 3px; max-height: 32vh; overflow: hidden; justify-content: flex-end; }
#chatlog div { background: #000b; padding: 4px 8px; border-radius: 6px; font-size: 13px; line-height: 1.35; word-wrap: break-word; transition: opacity 1s; }
#chatlog div.old { opacity: 0; }
#chat.typing #chatlog div.old, #chat.lobby #chatlog div.old { opacity: 1; }
#chatlog b.m { color: #fca5a5; } #chatlog b.p { color: #93c5fd; } #chatlog i { color: #fbbf24; font-style: normal; }
#chatin { pointer-events: auto; background: #000c; font-size: 13px; padding: 7px 9px; opacity: .55; }
#chat.typing #chatin, #chatin:focus { opacity: 1; border-color: #fbbf24; }
#bubblehud { position: absolute; left: 16px; bottom: 46px; display: flex; align-items: center; gap: 6px; background: #000a; padding: 4px 8px; border-radius: 8px; font-size: 12px; pointer-events: auto; }
#bubblehud input { width: 170px; padding: 4px 6px; font-size: 12px; }
#bubblehud.locked { opacity: .6; }
@media (max-width: 760px) { #chat { width: 220px; } }
#score { list-style: none; padding: 0; margin: 0; max-height: 40vh; overflow: auto; }
#score li { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #262630; }
@media (max-width: 600px) { .cols { grid-template-columns: 1fr; } .it { width: 58px; } #top { min-width: 0; width: calc(100% - 32px); } }
