/* ===== FICHIER: booster-style.css ===== */

/* ---------- MODAL / OVERLAY ---------- */
#booster-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#booster-modal.booster-modal-visible {
  opacity: 1;
}

.booster-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#booster-close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 2rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10001;
  transition: transform 0.2s ease;
}

#booster-close-btn:hover {
  transform: scale(1.2);
}

/* ---------- PACKET BOOSTER ---------- */
#booster-pack {
  width: 280px;
  max-width: 60vw;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 10000;
}

#booster-pack img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 0 25px rgba(255, 215, 0, 0.4));
}

.booster-pack-opening {
  animation: boosterOpen 0.9s ease-in forwards;
}

@keyframes boosterOpen {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  40% {
    transform: scale(1.15) rotate(-3deg);
  }
  70% {
    transform: scale(1.3) rotate(3deg);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.6) rotate(0deg);
    opacity: 0;
  }
}

/* ---------- CONTENEUR DES CARTES ---------- */
#booster-cards-container {
  position: absolute;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: center;
  max-width: 90vw;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#booster-cards-container.booster-cards-visible {
  opacity: 1;
}

/* ---------- CARTE PLACEHOLDER ---------- */
.booster-card-placeholder {
  width: 160px;
  height: 230px;
  border-radius: 12px;
  border: 3px solid var(--card-border, #888);
  background: linear-gradient(160deg, #1a1a1a, #2a2a2a);
  box-shadow: 0 0 calc(15px * var(--card-glow-intensity, 0.5)) var(--card-glow, #888);
  opacity: 0;
  transform: translateY(60px);
  animation: cardRise 0.6s ease-out forwards;
}

@keyframes cardRise {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.booster-card-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 12px;
  text-align: center;
  color: #fff;
  font-family: inherit;
}

.booster-card-rarity-badge {
  font-size: 0.85rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--card-border, #888);
  color: var(--card-border, #888);
  background: rgba(0, 0, 0, 0.4);
}

.booster-card-name {
  font-size: 1.1rem;
  font-weight: bold;
  margin-top: 10px;
}

.booster-card-universe {
  font-size: 0.8rem;
  opacity: 0.7;
  font-style: italic;
}

.booster-card-number {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: auto;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .booster-card-placeholder {
    width: 120px;
    height: 175px;
  }
  #booster-pack {
    width: 200px;
  }
  .booster-card-name {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  #booster-cards-container {
    gap: 10px;
  }
  .booster-card-placeholder {
    width: 95px;
    height: 140px;
  }
  .booster-card-name {
    font-size: 0.8rem;
  }
  #booster-pack {
    width: 160px;
  }
}