html, body { margin: 0; height: 100%; overflow: hidden; background: #0a0f1a; }
canvas { display: block; }
#hud { position: fixed; inset: 12px 12px auto 12px; display: flex; justify-content: space-between; gap: 12px; color: white; font: 600 18px system-ui, sans-serif; text-shadow: 0 2px 4px black; pointer-events: none; }
#aide { font-size: 14px; opacity: 0.85; text-align: right; }
#message { position: fixed; inset: 0; display: grid; place-items: center; color: white; font: 700 42px system-ui, sans-serif; text-shadow: 0 3px 8px black; pointer-events: none; }
#cross { position: fixed; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border: 2px solid white; border-radius: 50%; opacity: .7; pointer-events: none; }
#message small { font-size: 22px; }
#arme { position: fixed; right: 16px; bottom: 16px; color: white; font: 600 18px system-ui, sans-serif; text-align: right; text-shadow: 0 2px 4px black; pointer-events: none; }
#arme b { font-size: 32px; }
#arme small { font-size: 13px; opacity: .8; }
.barre { position: fixed; width: 70px; height: 8px; margin: -4px 0 0 -35px; background: #300; border: 1px solid #000; pointer-events: none; }
.barre i { display: block; height: 100%; background: #e33; }
#equipe { position: fixed; left: 16px; bottom: 56px; color: white; font: 600 16px system-ui, sans-serif; text-shadow: 0 2px 4px black; pointer-events: none; }
#secours { position: fixed; left: 0; right: 0; bottom: 120px; text-align: center; color: #ffd24a; font: 700 22px system-ui, sans-serif; text-shadow: 0 2px 6px black; pointer-events: none; }
#salle { position: fixed; left: 16px; bottom: 16px; color: white; font: 600 14px system-ui, sans-serif; text-shadow: 0 2px 4px black; }
#salle button { margin-left: 6px; padding: 3px 8px; border-radius: 6px; border: 1px solid #556; background: #1c2438; color: white; cursor: pointer; }
.nom { position: fixed; transform: translate(-50%, -100%); color: white; font: 700 14px system-ui, sans-serif; text-shadow: 0 2px 4px black; pointer-events: none; white-space: nowrap; }

#fin { position: fixed; inset: 0; background: rgba(10,0,0,.88); color: white; font: 18px system-ui, sans-serif; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; z-index: 20; overflow: auto; }
#fin[hidden] { display: none; }
#fin h1 { margin: 0; font-size: 72px; color: #e11d2e; letter-spacing: 8px; text-shadow: 0 0 24px #e11d2e; }
#fin h2 { margin: 10px 0 0; font-size: 20px; }
#fin .gros { font-size: 28px; margin: 0; }
#fin ul { list-style: none; padding: 0; margin: 6px 0; line-height: 1.7; }
#fin .equipe-fin { width: min(420px, 90vw); }
#fin .equipe-fin div { position: relative; display: flex; justify-content: space-between; padding: 3px 8px; margin: 3px 0; background: #2a1414; }
#fin .equipe-fin i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(225,29,46,.55); }
#fin .equipe-fin span, #fin .equipe-fin b { position: relative; }
#fin .boutons { display: flex; gap: 12px; margin-top: 14px; }
#fin button { font: 700 18px system-ui, sans-serif; padding: 10px 22px; border: 0; border-radius: 8px; background: #e11d2e; color: white; cursor: pointer; }
#fin #lobby { background: #374151; }

/* Bords sombres autour de l'écran, pour un effet de cinéma */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.55) 100%); }

#boutique { position: fixed; inset: 0; background: rgba(8,8,20,.95); color: white; font: 16px system-ui, sans-serif; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 30; overflow: auto; padding: 16px; }
#boutique[hidden] { display: none; }
#boutique h1 { margin: 0; letter-spacing: 3px; }
#boutique .gros { font-size: 22px; margin: 0; }
#boutique .cartes { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 1000px; }
#boutique .carte { width: 180px; border: 2px solid; border-radius: 10px; padding: 8px; background: rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 4px; }
#boutique .carte h3 { margin: 0; }
#boutique .carte p { margin: 0; font-size: 14px; flex: 1; }
#boutique .carte small { color: #f87171; }
#boutique .carte small.bon { color: #4ade80; }
#boutique button { padding: 6px 10px; border: 0; border-radius: 6px; font-weight: 700; cursor: pointer; background: #e11d2e; color: white; }
#boutique button:disabled { background: #444; color: #999; cursor: default; }
#classe { position: fixed; right: 16px; bottom: 120px; color: white; font: 600 15px system-ui, sans-serif; text-shadow: 0 2px 4px black; pointer-events: none; }

#lobby { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(5, 8, 20, 0.75); color: #fff; font-family: sans-serif; text-align: center; }
#lobby .boite { background: rgba(20, 24, 40, 0.92); border: 2px solid #4a6; border-radius: 16px; padding: 28px 40px; min-width: 320px; }
#lobby h1 { margin: 0 0 8px; font-size: 38px; }
#lobbyJoueurs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 20px; }
#lobbyJoueurs span { background: #2b3a55; border-radius: 12px; padding: 6px 14px; }
#lobby button { font-size: 16px; padding: 8px 14px; margin: 4px; border-radius: 10px; border: 0; cursor: pointer; }
#jouer { font-size: 28px !important; padding: 12px 48px !important; background: #3c9; color: #012; font-weight: bold; }
