* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #111;
  color: #f5f5f5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header, footer {
  text-align: center;
  padding: 1rem;
  background: #181818;
}

header h1 {
  margin-bottom: 0.5rem;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 1rem;
}

#controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  background: #202020;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

#controls label {
  font-weight: 600;
}

#monument-select, #reset-btn {
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  border: none;
}

#monument-select {
  background: #f5f5f5;
  color: #111;
}

#reset-btn {
  background: #c0392b;
  color: #fff;
  cursor: pointer;
}

#reset-btn:hover {
  background: #e74c3c;
}

#progress-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#progress-bar {
  width: 120px;
  height: 10px;
  background: #444;
  border-radius: 5px;
  overflow: hidden;
}

#progress-fill {
  width: 0%;
  height: 100%;
  background: #27ae60;
  transition: width 0.2s ease;
}

#progress-text {
  min-width: 40px;
  text-align: right;
}

#game-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

#grid {
  display: grid;
  grid-template-columns: repeat(10, 32px);
  grid-template-rows: repeat(10, 32px);
  gap: 2px;
  background: #222;
  padding: 4px;
  border-radius: 6px;
}

.cell {
  width: 32px;
  height: 32px;
  background: #1b1b1b;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.cell:hover {
  transform: scale(1.05);
}

.cell.bloc {
  background: #8e44ad; /* Couleur par défaut, changée selon monument */
}

.cell.mur_pierre {
  background: #7f8c8d;
}

.cell.tour {
  background: #2980b9;
}

.cell.pyramide {
  background: #d4ac0d;
}

@media (max-width: 600px) {
  #grid {
    transform: scale(0.85);
  }
}