* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', sans-serif;
  background: #1a1a2e;
  color: white;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ecran {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 900px;
  padding: 20px;
  min-height: 100vh;
}

.ecran.actif { display: flex; }

/* ACCUEIL */
.logo { font-size: 80px; margin-bottom: 10px; }

h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #f6d365, #fda085);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.sous-titre {
  font-size: 1.1rem;
  color: #aaa;
  margin-bottom: 40px;
  text-align: center;
}

.btns-accueil {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

/* BOUTONS */
.btn-vert  { background: #27ae60; }
.btn-bleu  { background: #2980b9; }
.btn-rouge { background: #c0392b; }
.btn-retour { background: #555; }

.btn-vert, .btn-bleu, .btn-rouge, .btn-retour {
  color: white;
  border: none;
  padding: 14px 28px;
  font-size: 1.1rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: transform 0.1s, opacity 0.1s;
}

.btn-vert:hover, .btn-bleu:hover, .btn-rouge:hover, .btn-retour:hover {
  opacity: 0.85;
  transform: scale(1.04);
}

/* HAUT DE PAGE */
.haut {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-bottom: 10px;
}

.haut h2 { font-size: 1.4rem; }

.consigne {
  color: #aaa;
  margin-bottom: 20px;
  font-size: 1rem;
}

/* PIANO */
.piano {
  display: flex;
  position: relative;
  height: 200px;
  margin: 10px auto;
  user-select: none;
}

.touche {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  cursor: pointer;
  border-radius: 0 0 8px 8px;
  font-weight: bold;
  transition: filter 0.08s;
  border: 1px solid #333;
}

/* Touche blanche */
.touche.blanche {
  width: 52px;
  height: 200px;
  background: linear-gradient(to bottom, #f0f0f0, #fff);
  color: #333;
  font-size: 0.75rem;
  z-index: 1;
  box-shadow: 2px 4px 6px rgba(0,0,0,0.4);
}

.touche.blanche:hover, .touche.blanche.active {
  background: linear-gradient(to bottom, #ffe066, #ffd700);
  filter: brightness(1.05);
}

/* Touche noire */
.touche.noire {
  width: 34px;
  height: 125px;
  background: linear-gradient(to bottom, #222, #444);
  color: #ddd;
  font-size: 0.6rem;
  position: absolute;
  z-index: 2;
  margin-left: -17px;
  box-shadow: 2px 4px 8px rgba(0,0,0,0.7);
}

.touche.noire:hover, .touche.noire.active {
  background: linear-gradient(to bottom, #ffd700, #ffaa00);
  color: #333;
}

/* Touche illuminée (mode chanson) */
.touche.lumiere {
  animation: pulser 0.5s ease-in-out infinite alternate;
}

.touche.blanche.lumiere {
  background: linear-gradient(to bottom, #66ff99, #00cc66) !important;
}

.touche.noire.lumiere {
  background: linear-gradient(to bottom, #00cc66, #009944) !important;
  color: white !important;
}

@keyframes pulser {
  from { filter: brightness(1); }
  to   { filter: brightness(1.3); }
}

/* CHANSONS */
.liste-chansons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 500px;
}

.carte-chanson {
  background: #16213e;
  border: 2px solid #0f3460;
  border-radius: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  gap: 14px;
}

.carte-chanson:hover {
  transform: scale(1.02);
  border-color: #ffd700;
}

.carte-chanson .ico { font-size: 2rem; }
.carte-chanson .info h3 { font-size: 1.1rem; }
.carte-chanson .info p { color: #aaa; font-size: 0.85rem; }

/* APPRENTISSAGE */
.note-suivante {
  font-size: 1.8rem;
  font-weight: bold;
  background: #16213e;
  border: 3px solid #ffd700;
  border-radius: 16px;
  padding: 16px 32px;
  margin-bottom: 16px;
  text-align: center;
  min-width: 220px;
}

.progression-chanson {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
  max-width: 600px;
}

.pastille {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #555;
}

.pastille.ok { background: #27ae60; }
.pastille.actif { background: #ffd700; }

.btns-chanson {
  display: flex;
  gap: 14px;
  margin-top: 16px;
}

.info-chanson {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}

/* CRÉDIT */
.credit {
  margin-top: auto;
  padding-top: 30px;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  line-height: 1.6;
}

.credit strong { color: #ffd700; }
.credit-petit { font-size: 0.75rem; color: #666; }
