/* NightGame — Jeu d'enchères (équipe de 5 personnages) */

.hidden { display: none !important; }

.encheres-main {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.enc-screen { animation: fadeUp 0.4s ease; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.enc-title {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 0.5rem;
}

.enc-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.party-line {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* --- Choix du budget --- */
.enc-h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.3rem;
  text-align: center;
  margin-bottom: 0.4rem;
}
.enc-h2-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.budget-host { display: flex; flex-direction: column; align-items: center; }

.budget-grid {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.budget-card {
  width: 150px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: var(--text);
  font-family: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.budget-card:hover {
  transform: translateY(-6px);
  border-color: var(--cyan);
  box-shadow: 0 12px 40px rgba(56, 225, 255, 0.25);
}
.budget-amount {
  font-family: "Orbitron", sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(56, 225, 255, 0.5);
}
.budget-label { font-size: 0.8rem; color: var(--text-muted); }
.budget-list-btn { margin-top: 1.25rem; }

.budget-wait { text-align: center; color: var(--text-muted); padding: 2.5rem 1rem; }
.wait-spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 1rem;
  border: 3px solid rgba(124, 92, 255, 0.25);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Écran enchères --- */
.auc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.auc-budget { color: var(--text-muted); font-size: 0.95rem; }
.auc-budget b { color: var(--cyan); font-family: "Orbitron", sans-serif; }

.auc-item-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
}

.char-top { display: flex; align-items: center; gap: 1rem; }
.auc-item-emoji { font-size: 3.5rem; line-height: 1; }
.auc-item-img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  object-position: top center;
  border-radius: 14px;
  border: 2px solid rgba(124, 92, 255, 0.5);
  box-shadow: 0 0 24px rgba(124, 92, 255, 0.35);
  display: block;
}
.char-info { flex: 1; text-align: left; min-width: 0; }
.auc-item-name {
  font-family: "Orbitron", sans-serif;
  font-size: 1.35rem;
  margin-bottom: 0.15rem;
}
.auc-item-anime { color: var(--text-muted); font-size: 0.85rem; }

.tier-badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid;
  white-space: nowrap;
}
.tier-badge.tier-legendaire { color: #ff6b6b; border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 107, 107, 0.1); }
.tier-badge.tier-moyen { color: #38e1ff; border-color: rgba(56, 225, 255, 0.5); background: rgba(56, 225, 255, 0.1); }
.tier-badge.tier-faible { color: #8a92a8; border-color: rgba(138, 146, 168, 0.5); background: rgba(138, 146, 168, 0.1); }
.tier-badge.tier-mythique { color: #ffd700; border-color: rgba(255, 215, 0, 0.6); background: rgba(255, 215, 0, 0.12); text-shadow: 0 0 8px rgba(255, 215, 0, 0.5); }

.power-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.1rem;
}
.power-label { color: var(--text-muted); font-size: 0.8rem; white-space: nowrap; }
.power-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  overflow: hidden;
}
.power-fill { height: 100%; width: 0%; border-radius: 999px; transition: width 0.4s ease; }
.fill-legendaire { background: linear-gradient(90deg, #ff6b6b, #ff9f43); }
.fill-moyen { background: linear-gradient(90deg, #38e1ff, #7c5cff); }
.fill-faible { background: linear-gradient(90deg, #8a92a8, #5a6070); }
.fill-mythique { background: linear-gradient(90deg, #ffd700, #ff6b6b); }
.power-value {
  font-family: "Orbitron", sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  min-width: 2.2rem;
  text-align: right;
}

.auc-teams {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.team-chip {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.team-chip b { color: var(--cyan); font-family: "Orbitron", sans-serif; }

.auc-bid { text-align: center; margin-bottom: 1.25rem; }
.auc-current { color: var(--text-muted); }
.auc-current b { color: #e6e9f5; font-size: 1.2rem; font-family: "Orbitron", sans-serif; }
.auc-leader { color: var(--cyan); font-size: 0.9rem; margin-top: 0.25rem; }

.auc-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.bid-btn { min-width: 56px; }

.auc-custom {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
.custom-bid-input {
  width: 140px;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 1rem;
  text-align: center;
  font-family: "Orbitron", sans-serif;
}
.custom-bid-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 225, 255, 0.15);
}
.custom-bid-input:disabled { opacity: 0.35; }

.auc-msg { min-height: 1.4em; text-align: center; color: var(--text-muted); font-size: 0.95rem; }

/* --- Modale liste des personnages --- */
.char-list-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 12, 0.72);
  backdrop-filter: blur(6px);
  padding: 1.5rem;
}
.char-list-card {
  background: #0c0f1a;
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.5rem;
  width: min(480px, 100%);
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  text-align: center;
}
.char-list-card h2 { font-family: "Orbitron", sans-serif; font-size: 1.15rem; margin-bottom: 0.3rem; }
.char-list-sub { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 1rem; }
.char-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.25rem; }
.char-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.9rem;
  text-align: left;
}
.char-row-emoji { font-size: 1.25rem; }
.char-thumb {
  width: 34px;
  height: 34px;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  display: block;
}
.team-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  vertical-align: middle;
  margin-right: 2px;
}
.char-row-name { flex: 1; }
.char-row-name i { color: var(--text-muted); font-style: normal; font-size: 0.78rem; }
.char-row-power { font-family: "Orbitron", sans-serif; font-weight: 900; color: var(--cyan); }

/* --- Résultat --- */
.result-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 50px rgba(124, 92, 255, 0.12);
}
.result-emoji { font-size: 4rem; line-height: 1; margin-bottom: 1rem; }
.result-title { font-family: "Orbitron", sans-serif; font-size: 1.6rem; margin-bottom: 1.5rem; }
.result-teams { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.5rem; }
.team-result {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  text-align: left;
}
.team-result.is-you {
  border-color: rgba(56, 225, 255, 0.5);
  background: rgba(56, 225, 255, 0.06);
}
.team-result-head { display: flex; justify-content: space-between; margin-bottom: 0.3rem; }
.team-result-name { font-weight: 700; }
.team-result-power { font-family: "Orbitron", sans-serif; font-weight: 900; color: var(--cyan); }
.team-result-roster { font-size: 1.3rem; letter-spacing: 2px; }
.result-msg { color: var(--text-muted); margin-bottom: 2rem; }
.result-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

.btn-small { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn:disabled { opacity: 0.35; pointer-events: none; cursor: default; }

@media (max-width: 560px) {
  .budget-card { width: 120px; }
  .auc-item-emoji { font-size: 2.75rem; }
}

/* --- Mode téléphone --- */
html.mode-phone .budget-card { width: 120px; }
html.mode-phone .auc-item-img { width: 84px; height: 84px; }
html.mode-phone .char-top { flex-wrap: wrap; }
html.mode-phone .char-list-card { width: 100%; }
