/* === MOTEUR PARTAGÉ DU BLIND TEST (openings / endings) ===
   Utilisé par blind-test/ (mode dédié) et quiz-daily/ (bonus quotidien).
   S'appuie sur les variables --bg-main/--bg-card/--border/--accent/--text-*
   déjà définies par chaque page ; les variables optionnelles ont un repli. */

.bt-card {
  background: rgba(10, 22, 40, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(170, 190, 215, 0.18);
  border-radius: 1.25rem;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.bt-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.bt-stage-label { font-size: 1rem; font-weight: 700; color: var(--accent); }
.bt-stage-dots { display: flex; gap: 0.4rem; }
.bt-stage-dot {
  width: 0.6rem; height: 0.6rem;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.2s;
}
.bt-stage-dot.active { background: var(--accent); }
.bt-stage-dot.passed  { background: var(--text-muted); }

.bt-player { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }

.bt-progress-track {
  width: 100%;
  max-width: 22rem;
  height: 0.4rem;
  background: var(--border);
  border-radius: 0.3rem;
  overflow: hidden;
}
.bt-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 0.3rem;
}
.bt-play-btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 2.5rem;
  background: var(--accent);
  color: var(--bg-main);
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.bt-play-btn:hover { background: #9dc8e8; transform: translateY(-2px); }
.bt-play-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.bt-guess-row {
  width: 100%;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bt-guess-wrap { flex: 1; min-width: 12rem; position: relative; }
.bt-guess-input {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.6rem 0.85rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.bt-guess-input:focus { border-color: #60a5fa; }
.bt-guess-input:disabled { opacity: 0.4; cursor: not-allowed; }

.bt-guess-btn, .bt-abandon-btn {
  font-family: inherit;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: opacity 0.15s, background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.bt-guess-btn { background: #2563eb; color: #fff; }
.bt-guess-btn:hover:not(:disabled) { background: #1d4ed8; }
.bt-abandon-btn { background: #dc2626; border: 1px solid #ef4444; color: #fff; }
.bt-abandon-btn:hover:not(:disabled) { background: #ef4444; transform: translateY(-1px); }
.bt-guess-btn:disabled, .bt-abandon-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }

.bt-feedback {
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  border-radius: 0.6rem;
}
.bt-feedback.correct { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid var(--found-brd, #22c55e); }
.bt-feedback.wrong    { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid #7f1d1d; }
.bt-feedback.skipped  { background: rgba(148, 163, 184, 0.12); color: var(--text-secondary); border: 1px solid var(--border); }

/* Historique des essais */
.bt-history {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.bt-history-item {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  background: rgba(239, 68, 68, 0.06);
  border-radius: 0.4rem;
}

/* Dropdown autocomplétion */
.bt-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.bt-dropdown-item {
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--bg-main);
  font-size: 0.85rem;
}
.bt-dropdown-item:last-child { border-bottom: none; }
.bt-dropdown-item:hover,
.bt-dropdown-item.highlighted { background: var(--bg-hover, var(--bg-card-hover, #263448)); }
.bt-dropdown-item .bt-dd-type { color: var(--text-muted); margin-right: 0.4rem; }
.bt-dropdown-item .bt-dd-title { color: var(--text-primary); font-weight: 600; }

/* Récap de fin de partie (mode dédié uniquement) */
.bt-recap {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  padding: 2rem 1.5rem 1.75rem;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-main) 100%);
  border: 1px solid var(--found-brd, #22c55e);
  border-radius: 1.25rem;
  box-shadow: 0 0 32px rgba(34, 197, 94, 0.18), 0 20px 45px rgba(0, 0, 0, 0.35);
  animation: btVictoryPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes btVictoryPop {
  0%   { opacity: 0; transform: scale(0.8) translateY(16px); }
  60%  { opacity: 1; transform: scale(1.03) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.bt-recap-title { font-size: 1.5rem; font-weight: 800; color: var(--found-brd, #22c55e); }
.bt-recap-score { font-size: 1.1rem; color: var(--text-secondary); }
.bt-recap-score strong { color: var(--accent); }

.bt-replay-btn {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.75rem 2.5rem;
  background: var(--accent);
  color: #0f172a;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.bt-replay-btn:hover { background: #9dc8e8; transform: translateY(-2px); }

.bt-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 2rem 1rem;
}

/* Téléphone : champ de réponse sur toute la largeur, boutons côte à côte en dessous */
@media (max-width: 700px) {
  .bt-card { padding: 1.25rem 0.9rem; gap: 1rem; }
  .bt-guess-wrap { flex: 1 1 100%; min-width: 0; }
  .bt-guess-input { font-size: 1rem; }
  .bt-guess-btn, .bt-abandon-btn { flex: 1 1 0; padding: 0.7rem 0.5rem; font-size: 0.9rem; }
}
