:root {
  --bg-top: #1a7a8c;      
  --bg-bottom: #d9c9a3;   
  --accent: #2e7d32;      
  --accent-dark: #1b5e20; 
  --green: #4caf50;
  --yellow: #ffc107;
  --red: #e53935;
  --text: #3e2723;        
  --text-light: #f5f5f5;  
  --panel-bg: #e6d7b4;    
  --panel-border: #a67c52; 
  --radius: 12px;
  --font: 'Carter One', cursive; 
}

* { margin: 0; padding: 0; box-sizing: border-box; }

img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

html, body {
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: #121e25; /* Couleur de secours */
  overflow: hidden;
  user-select: none;
}

/* =========================================
   ARRIÈRE-PLAN DYNAMIQUE (CALQUE DE FOND)
   ========================================= */
#bg-layer {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background-size: cover;
  background-position: center;
  z-index: 0; /* CORRIGÉ : l'image est le calque 0 */
  transition: background-image 1s ease-in-out;
}

/* Voile sombre pour que le texte reste lisible */
#bg-layer::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(18, 30, 37, 0.6); /* Opacité baissée à 60% pour mieux voir l'image */
}

button { font-family: inherit; cursor: pointer; border: none; color: inherit; }

.bar {
  flex: 1;
  height: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  overflow: hidden;
}
.bar .fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s;
}

::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: #d9c9a3; border-left: 2px solid #a67c52; }
::-webkit-scrollbar-thumb { background: linear-gradient(to right, #8b5e34, #a67c52, #8b5e34); border-radius: 8px; border: 2px solid #e6d7b4; }
::-webkit-scrollbar-thumb:hover { background: #a67c52; }
::-webkit-scrollbar-button { display: none; }

* { scrollbar-width: auto; scrollbar-color: #8b5e34 #d9c9a3; }