html, body { margin: 0; height: 100%; overflow: hidden; background: lightskyblue; }
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; }
#btn-perso { pointer-events: auto; font: 600 14px system-ui, sans-serif; padding: 6px 12px; border: 0; border-radius: 8px; background: rgba(0,0,0,0.5); color: white; cursor: pointer; align-self: flex-start; }
#menu { position: fixed; inset: 0; display: grid; place-items: center; background: linear-gradient(rgba(10,20,40,0.35), rgba(10,20,40,0.7)); font-family: system-ui, sans-serif; color: white; z-index: 10; }
#menu[hidden] { display: none; }
.carte { background: rgba(20,30,50,0.85); border-radius: 18px; padding: 24px 32px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.carte h1 { margin: 0; font-size: 44px; }
.sous { margin: 4px 0 16px; opacity: 0.8; }
.corps { display: flex; gap: 24px; align-items: center; justify-content: center; }
#apercu { width: 220px; height: 280px; background: rgba(255,255,255,0.08); border-radius: 12px; }
.options { display: flex; flex-direction: column; gap: 14px; text-align: left; min-width: 200px; }
.options label { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; }
.options input[type=color] { width: 56px; height: 32px; border: 0; background: none; cursor: pointer; }
.options button, #jouer { font: 600 14px system-ui, sans-serif; padding: 6px 10px; border: 2px solid transparent; border-radius: 8px; background: rgba(255,255,255,0.15); color: white; cursor: pointer; }
.options button.on { border-color: #66e0ff; }
#jouer { margin-top: 20px; font-size: 22px; padding: 10px 40px; background: #ff7a1a; }
#fondu { position: fixed; inset: 0; background: black; opacity: 0; pointer-events: none; z-index: 5; }
#dialogue { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); width: min(640px, 90vw); box-sizing: border-box; padding: 14px 20px; border-radius: 14px; background: rgba(20,15,40,0.88); border: 2px solid #f0c040; color: white; font: 18px system-ui, sans-serif; z-index: 4; }
#dialogue[hidden] { display: none; }
#dialogue b { color: #f0c040; }
#dialogue p { margin: 6px 0; }
#dialogue small { opacity: 0.6; }
#vie { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); width: 240px; height: 14px; border-radius: 8px; background: rgba(0,0,0,0.5); border: 2px solid white; overflow: hidden; z-index: 3; }
#vie[hidden] { display: none; }
#vie div { width: 100%; height: 100%; background: #e04040; transition: width 0.2s; }
#message[hidden] { display: none; }
