/* --- RESET & BASE --- */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #1c1f26; /* Fond principal uniforme */
  color: white;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  display: flex;
  flex-direction: column;
}

#page-content {
  flex: 1;
  padding-bottom: 60px;
}

/* --- HEADER --- */
header {
  background: rgba(21,101,192,0.8); /* Transparent léger avec dégradé simplifié */
  padding: 20px 40px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.3);
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-buttons {
  display: flex;
  gap: 10px; /* Espace entre Status et Info */
}

header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.4);
}

.status-link {
  font-size: 1rem;
  color: white;
  text-decoration: none;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1); /* Transparent léger */
  padding: 8px 15px;
  border-radius: 8px;
  transition: background 0.3s;
}

.status-link:hover {
  background: rgba(255, 255, 255, 0.25);
}

#info-btn {
    font-size: 1rem;
    color: white;
    background: rgba(255, 255, 255, 0.1); /* Même style que .status-link */
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

#info-btn:hover {
    background: rgba(255, 255, 255, 0.25); /* Même hover que .status-link */
}


/* --- SEARCH --- */
#search-container {
  background: rgba(36,40,48,0.7); /* Transparent léger */
  padding: 15px;
  text-align: center;
}

#search {
  padding: 12px 18px;
  width: 320px;
  max-width: 90%;
  font-size: 1rem;
  border: none;
  border-radius: 30px;
  outline: none;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  background: rgba(31,34,40,0.8);
  color: white;
  transition: all 0.3s ease;
}

#search:focus {
  background: rgba(43,47,56,0.85);
  box-shadow: 0 0 8px #42a5f5;
}

/* --- CARDS --- */
#noobs-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 20px;
  padding: 25px;
  max-width: 1170px;
  margin: 0 auto;
  box-sizing: border-box;
}

.noob-card {
  background: rgba(42,47,58,0.85);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
  #noobs-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  #noobs-container {
    grid-template-columns: 1fr;
  }
}

/* Tablette : 2 cartes par ligne */
@media (max-width: 900px) {
  #noobs-container {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px;
  }
}

/* Mobile : 1 carte par ligne */
@media (max-width: 500px) {
  #noobs-container {
    grid-template-columns: 1fr;
    padding: 15px;
  }
}

.noob-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.noob-card img {
  width: 100%;
  border-radius: 8px;
}

.noob-name {
  font-size: 18px;
  margin: 10px 0 5px;
  font-weight: 600;
}

/* --- RARETÉ --- */
.rarete-Commun { color: #b0b0b0; }
.rarete-UnCommun { color: #4caf50; }
.rarete-Rare { color: #4fc3f7; }
.rarete-Légendaire { color: #ffca28; }
.rarete-Mythique { color: #ff4081; }
.rarete-Secret { color: rgb(30, 30, 30); }

/* --- PRIX --- */
.price {
  color: #4caf50;
  font-weight: 700;
}

/* --- FOOTER --- */
footer {
  background: rgba(21,101,192,0.8);
  color: white;
  padding: 10px 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
  user-select: none;
}

/* --- POP-UP --- */
#popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.5); /* Fond transparent */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

#popup-overlay.hidden { display: none; }

#popup {
  background: rgba(42,47,58,0.85); /* Transparent léger */
  padding: 25px 35px;
  border-radius: 15px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  max-width: 90%;
  text-align: center;
  font-size: 1.1rem;
  animation: popIn 0.3s ease;
}

#popup button {
  margin-top: 20px;
  padding: 10px 25px;
  background: rgba(21,101,192,0.85);
  border: none;
  border-radius: 30px;
  color: white;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#popup button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(66,165,245,0.6);
}

/* --- MODALE --- */
#modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(10px);
}

#modal-overlay.hidden {
  display: none;
}

/* Conteneur modal */
#modal {
  background: linear-gradient(135deg, #1c1f26 0%, #2a2f3a 100%);
  padding: 35px 30px;
  border-radius: 18px;
  max-width: 420px;
  width: 90%;
  color: white;
  text-align: center;
  position: relative;
  box-shadow:
    0 12px 40px rgba(0,0,0,0.8),
    0 0 20px rgba(66,165,245,0.25);
  animation: fadeUp 0.35s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

@keyframes fadeUp {
  from { transform: translateY(25px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Bouton close */
#modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  background: rgba(255,255,255,0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
#modal-close:hover {
  transform: rotate(90deg) scale(1.1);
  background: rgba(255,64,129,0.25);
  color: #ff4081;
}

/* Image */
#modal img {
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}

/* Nom */
#modal h2 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: #42a5f5;
}

/* Infos */
#modal p {
  width: 100%;
  display: flex;
  justify-content: space-between;
  background: rgba(255,255,255,0.05);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  color: #ddd;
  border: 1px solid rgba(255,255,255,0.07);
  margin: 0;
}

#modal p strong {
  color: #fff;
}

#modal p span {
  color: #42a5f5;
  font-weight: 600;
}


#animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* derrière tout le contenu */
  background: #1c1f26; /* fond sombre */
}

.info-modal {
  display: none; 
  position: fixed; 
  z-index: 1000; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 1rem; /* espace pour mobile */
}

.info-modal-content {
  background: linear-gradient(135deg, #1c1f26, #24272f);
  color: #ffffff;
  margin: auto;
  width: 100%;
  max-width: 600px;
  max-height: 90vh; /* limite la hauteur */
  overflow-y: auto; /* scroll si contenu trop grand */
  padding: 30px 35px;
  border-radius: 1.5rem;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  animation: popIn 0.3s ease-out;
  position: relative;
  line-height: 1.6;
}

.info-modal-content h2,
.info-modal-content h3 {
  margin-top: 1.2rem;
  margin-bottom: 0.6rem;
  color: #42a5f5; /* titres colorés pour contraster */
}

.info-modal-content p {
  margin-bottom: 1rem;
}

.info-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
}

.info-close:hover {
  color: #ff4081;
}

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
