
/* Style général */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond&family=Great+Vibes&display=swap');

#intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  padding: 40px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  color: #fcefdc;
  text-align: center;
  font-family: 'EB Garamond', serif;
  font-size: 1.2em;
  line-height: 2.2em;
  letter-spacing: 0.9px;
  text-shadow: 1px 1px 3px #000;

  background-image: url('pandas-sad.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  background-color: rgba(0, 0, 0, 0.4);
  background-blend-mode: darken;
}
#capacities {
  display: flex;
  justify-content: center;
  gap: 40px; /* espace entre les seaux */
  margin-bottom: 10px;
}

.capacity {
  text-align: center;
  font-weight: bold;
  font-size: 1.4em;
  color: #222;
}



body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #c2e9fb, #a1c4fd);
  margin: 0;
  padding: 0;
  text-align: center;
  color: #333;
}

h1 {
  font-size: 2.5em;
  margin-top: 20px;
  color: #2c3e50;
}

p {
  font-size: 1.2em;
  margin: 10px 0;
}

/* Diaporama d’intro */
/*#intro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 30px;
  box-sizing: border-box;

  background-image: url('pandas-sad.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}*/

/* Ajout d’un fond sombre translucide derrière le texte */
#intro::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* fond noir semi-transparent */
  z-index: -1;
}

/* Style du texte */
#intro p {
  font-size: 2.5em;
  max-width: 800px;
  margin-bottom: 30px;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  z-index: 1;
}

.intro-buttons {
  display: flex;
  gap: 20px;
}

.intro-buttons button {
  padding: 12px 24px;
  font-size: 1em;
  background: #3498db;
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.intro-buttons button:hover {
  background: #2980b9;
}

/* Zone de jeu */
#game {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 40px;
  margin-top: 40px;
}

.controls {
  margin: 20px 0;
}

#moves {
  font-size: 1.4em;
  display: inline-block;
  margin-right: 20px;
}

#resetBtn {
  padding: 12px 24px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  background: linear-gradient(145deg, #f39c12, #e67e22);
  color: white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  transform: scale(1);
}

#resetBtn:hover {
  background: linear-gradient(145deg, #e67e22, #d35400);
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

#resetBtn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}


/* Seaux */
.bucket {
  position: relative;
  width: 100px;
  background: #dcdcdc;
  border: 2px solid #444;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.bucket[data-index="0"] {
  height: 240px; /* 8L */
}
.bucket[data-index="1"] {
  height: 150px; /* 5L */
}
.bucket[data-index="2"] {
  height: 90px; /* 3L */
}
.bucket.selected {
  outline: 4px solid yellow;
  outline-offset: -4px;
}


.water {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: #3498db;
  transition: height 0.4s ease;
  z-index: 1;
}

.label {
  margin-top: 12px;
  font-size: 1.2em;
  font-weight: bold;
  color: #e74c3c;
  z-index: 2;
}

#message {
  display: none; /* caché par défaut */
  font-size: 2.5em;
  color: white;
  text-align: center;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  padding: 20px;
  max-width: 90%;
}
#victory-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.85);
  display: none; /* caché au départ */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#victory-image {
  max-width: 80%;
  max-height: 60%;
  object-fit: contain;
  margin-bottom: 20px;
}

#victory-message {
  font-size: 2.5em;
  color: white;
  text-align: center;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.8);
}
#musicToggle {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 20px;
  font-size: 1em;
  border: none;
  border-radius: 12px;
  background-color: #3498db;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

#musicToggle:hover {
  background-color: #2980b9;
}

#musicTutorial {
  position: fixed;
  top: 70px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: bold;
  color: white;
  font-size: 1em;
  animation: fadeIn 1s ease forwards;
  z-index: 1000;
}

.arrow {
  font-size: 3em;
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.music-hint {
  color: red;
  font-size: 2em;
  font-weight: bold;
}



