/* ===== RESET ===== */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* empêche tout scroll */
  background: #000;
  font-family: Arial, Helvetica, sans-serif;
}

/* ===== HEADER FIXE ===== */
#game-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: flex-start;      /* aligne header-left et header-right en haut */
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.7);
  padding: 5px 10px;
  z-index: 20;
  box-sizing: border-box;
  margin: 0;
  border-radius: 0;
}

/* ===== HEADER LEFT ===== */
#header-left {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#header-left h1 {
  margin: 0;
  font-size: 14px; /* titre réduit */
  color: #fff;
}

#header-left p {
  margin: 2px 0 0 0;
  font-size: 10px; /* texte des consignes réduit */
  color: #fff;
}

/* ===== HEADER RIGHT / DEBUG PANEL ===== */
#header-right {
  flex: 0 0 70%;            /* prend 70% de la largeur */
  text-align: right;
  overflow: hidden;
}

#debug-panel {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 5px;
  border-radius: 0;
  font-family: monospace;
}

/* Titre du debug au-dessus de la console */
#debug-panel-title {
  font-size: 10px;
  color: #0f0;
  margin-bottom: 2px;
}

/* Console de debug sur 5 lignes */
#debug-console {
  font-size: 8px;
  line-height: 1.1em;
  color: #0f0;
  height: calc(1.1em * 5); /* 5 lignes */
  overflow: hidden;        /* pas d'ascenseur */
  white-space: pre;        /* respect des retours à la ligne */
}

/* ===== HUD ===== */
#hud {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  gap: 10px;
}

#hud button {
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid #666;
  cursor: pointer;
  font-size: 14px;
}

#hud button:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ===== CONTENEUR CANVAS ===== */
#game-container {
  position: fixed;          /* fixe le canvas */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;         /* plus de scrollbar */
}

#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== FOOTER / TABLEAU DE BORD ===== */
#game-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;               /* hauteur du tableau de bord */
  background: rgba(0,0,0,0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
  z-index: 20;
  box-sizing: border-box;
  padding: 0 10px;
}
