/* acheter-modeles.css */

/* Affichage des crédits */
#credits-display {
  background: linear-gradient(135deg, var(--fv-honey-500, #d99a3b) 0%, var(--fv-honey-700, #9b6820) 100%);
  border-radius: 12px;
  color: white;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#credits-amount {
  font-size: 3.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Cartes de modèles */
.model-card {
  border-radius: 8px;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.model-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.model-card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.model-card .content {
  flex: 1;
  margin-bottom: 1rem;
}

/* Badge de statut */
.ownership-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
}

.ownership-badge.owned {
  background-color: var(--fv-forest-400, #5f8f5a);
  color: white;
}

.ownership-badge.not-owned {
  background-color: #ffdd57;
  color: #363636;
}

/* Boutons d'achat */
.buy-button {
  width: 100%;
  margin-top: auto;
}

.buy-button.is-loading {
  pointer-events: none;
}

/* Prix du modèle */
.model-price {
  background-color: #f5f5f5;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
}

.model-price .price-value {
  color: var(--fv-honey-700, #9b6820);
  font-size: 1.3rem;
}

/* Message vide */
#no-models-message {
  margin-top: 2rem;
  text-align: center;
  padding: 3rem 2rem;
}

/* Animation de chargement */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading-skeleton {
  animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  background-color: #e0e0e0;
  border-radius: 4px;
}

/* Responsive */
@media screen and (max-width: 768px) {
  #credits-amount {
    font-size: 2.5rem;
  }

  .column.is-one-third {
    flex: none;
    width: 100%;
  }
}
/* Cartes grisées pour modèles déjà possédés */
.card.is-disabled-card {
  opacity: 0.6;
  background-color: #f5f5f5;
  position: relative;
}

.card.is-disabled-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(0, 0, 0, 0.03) 10px,
    rgba(0, 0, 0, 0.03) 20px
  );
  pointer-events: none;
  border-radius: 6px;
}

.card.is-disabled-card .card-content {
  pointer-events: none;
}

.button.is-disabled {
  background-color: #dbdbdb;
  border-color: #dbdbdb;
  color: #6b6b6b;
  cursor: not-allowed;
  opacity: 0.8;
}

.button.is-disabled:hover,
.button.is-disabled:focus {
  background-color: #dbdbdb;
  border-color: #dbdbdb;
  color: #6b6b6b;
}

/* ============================================
   CSS À AJOUTER DANS loca.css OU general.css
   Pour les badges et boutons d'achat de modèles
   ============================================ */

/* Badge "Non acheté" sur les cartes de modèles */
.not-owned-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ffc107;
  color: #333;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

/* Bouton d'achat */
.btn-buy {
  background-color: #ffc107;
  color: #333;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
}

.btn-buy:hover {
  background-color: #ffb300;
  color: #333;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* S'assurer que la card est en position relative pour les badges absolus */
.card {
  position: relative;
}

/* Badge principal (déjà existant normalement, mais au cas où) */
.principal-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--fv-forest-400, #5f8f5a);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}

/* Indicateur d'utilisateurs liés (déjà existant normalement) */
.linked-users-indicator {
  position: absolute;
  top: 40px;
  left: 10px;
  background-color: var(--fv-sky-500, #3d87c2);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
}
