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; }
#vie { width: 220px; height: 14px; margin: 6px 0; background: rgba(0, 0, 0, 0.5); border-radius: 7px; overflow: hidden; }
#vie-barre { height: 100%; background: #ef4444; transition: width 0.15s; }
#victoires { font-size: 15px; }
#rejouer { position: fixed; left: 50%; top: 62%; transform: translateX(-50%); padding: 12px 28px; font: 700 24px system-ui, sans-serif; color: white; background: #16a34a; border: 0; border-radius: 12px; cursor: pointer; }
#rejouer:hover { background: #22c55e; }
#attaques { font-size: 14px; margin-top: 4px; }
#pause { position: fixed; right: 12px; bottom: 12px; padding: 8px 18px; font: 700 18px system-ui, sans-serif; color: white; background: #2563eb; border: 0; border-radius: 10px; cursor: pointer; }
#pieces { font-size: 15px; color: #fde047; }
#boutique { position: fixed; inset: 0; margin: auto; width: min(560px, 92vw); height: fit-content; max-height: 86vh; overflow: auto; padding: 16px 20px; box-sizing: border-box; background: rgba(15, 23, 42, 0.92); color: white; border-radius: 16px; font: 16px system-ui, sans-serif; }
#boutique h2 { margin: 0 0 12px; font-size: 20px; color: #fde047; }
.objet { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; margin-bottom: 8px; padding: 10px 14px; text-align: left; color: white; background: #1e3a8a; border: 0; border-radius: 10px; cursor: pointer; font: inherit; }
.objet b { grid-column: 1; } .objet span { grid-column: 1; font-size: 13px; opacity: 0.8; } .objet em { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; color: #fde047; }
.objet:disabled { background: #334155; cursor: not-allowed; opacity: 0.7; }
#tuto { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.6); z-index: 20; font-family: system-ui, sans-serif; }
#tuto-boite { width: min(640px, 92vw); max-height: 86vh; overflow-y: auto; box-sizing: border-box; padding: 20px 26px; color: white; background: #1e293b; border: 3px solid #fbbf24; border-radius: 16px; }
#tuto h2 { margin: 0 0 8px; color: #fbbf24; }
#tuto h3 { margin: 14px 0 4px; color: #93c5fd; }
#tuto p { margin: 0; font-size: 16px; line-height: 1.4; }
#tuto-jouer { display: block; position: sticky; bottom: 0; margin: 18px auto 0; box-shadow: 0 0 0 8px #1e293b; padding: 10px 34px; font: 700 22px system-ui, sans-serif; color: white; background: #16a34a; border: 0; border-radius: 12px; cursor: pointer; }
#victoire { position: fixed; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(250, 204, 21, 0.55), rgba(0, 0, 0, 0.85)); z-index: 30; font-family: system-ui, sans-serif; text-align: center; color: white; }
#victoire-boite { width: min(560px, 92vw); padding: 24px 30px; background: #1e293b; border: 4px solid #fbbf24; border-radius: 18px; }
#victoire h1 { margin: 0 0 10px; font-size: 56px; color: #fbbf24; }
#victoire p { font-size: 20px; line-height: 1.4; }
#victoire button { margin: 12px 8px 0; padding: 10px 28px; font: 700 22px system-ui, sans-serif; color: white; background: #16a34a; border: 0; border-radius: 12px; cursor: pointer; }
#victoire-quitter { background: #dc2626 !important; }
#tuto[hidden], #victoire[hidden], #victoire [hidden] { display: none !important; }
#message[hidden], #rejouer[hidden] { display: none !important; }
