/* ========================================
   SHOP NAVIGATION - Styles modernes et pro
   ======================================== */

/* ========================================
   1. BOUTIQUE À LA CARTE (Plan page)
   ======================================== */

.acard-item {
  position: relative;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}

.acard-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.acard-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.acard-item:hover::before {
  opacity: 1;
}

.acard-item .acard-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

.acard-item:hover .acard-icon {
  animation: pulse-icon 0.6s ease-out;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-icon {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

.acard-item .acard-name {
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: #1f2937;
  transition: color 0.3s ease;
}

.acard-item:hover .acard-name {
  color: #3b82f6;
}

.acard-item .acard-pricing {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.acard-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #3b82f6;
  margin: 0.5rem 0;
}

.acard-note {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0.25rem 0;
}

/* ========================================
   2. CRÉDITS CARD (Account page)
   ======================================== */

.credit-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.credit-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.1) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.credit-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(59, 130, 246, 0.15);
}

.credit-card:hover::before {
  opacity: 1;
  animation: shine 0.6s ease-out;
}

@keyframes shine {
  0% {
    transform: translate(-100%, -100%);
  }
  100% {
    transform: translate(100%, 100%);
  }
}

.credit-card .credit-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.credit-card:hover .credit-icon {
  transform: scale(1.1) rotate(5deg);
}

.credit-card .credit-type {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.credit-card .credit-value {
  font-size: 2rem;
  font-weight: 700;
  color: #3b82f6;
  margin: 0.75rem 0;
}

.credit-card .credit-label {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.credit-progress {
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 100%);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}

.credit-progress-bar {
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* CTA Button pour acheter des crédits */
.credit-card.shop-trigger {
  cursor: pointer;
  position: relative;
}

.credit-card.shop-trigger::after {
  content: "Acheter des crédits";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.credit-card.shop-trigger:hover::after {
  opacity: 1;
}

/* ========================================
   3. SIDEBAR - Shop Link
   ======================================== */

.nav-item.shop-link {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.shop-link-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.08) 0%,
    rgba(37, 99, 235, 0.05) 100%
  );
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
}

.shop-link-container:hover {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15) 0%,
    rgba(37, 99, 235, 0.1) 100%
  );
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
  transform: translateX(4px);
}

.shop-link-icon {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.shop-link-container:hover .shop-link-icon {
  transform: scale(1.15);
}

.shop-link-text {
  display: flex;
  flex-direction: column;
}

.shop-link-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
}

.shop-link-subtitle {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.1rem;
}

/* ========================================
   4. ANIMATIONS D'ACCÈS AU SHOP
   ======================================== */

.shop-access-animation {
  animation: shop-pulse 0.6s ease-out;
}

@keyframes shop-pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ========================================
   5. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .acard-item {
    min-height: 200px;
  }

  .acard-item:hover {
    transform: translateY(-4px);
  }

  .credit-card {
    min-height: 180px;
  }

  .credit-card:hover {
    transform: translateY(-3px);
  }

  .shop-link-container {
    padding: 0.65rem 0.85rem;
  }

  .shop-link-title {
    font-size: 0.9rem;
  }

  .shop-link-subtitle {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .acard-item:hover {
    transform: translateY(-2px);
  }

  .credit-card:hover {
    transform: translateY(-2px);
  }

  .shop-link-container {
    padding: 0.6rem 0.75rem;
  }
}

/* ========================================
   6. ACCESSIBILITÉ
   ======================================== */

.acard-item:focus-visible,
.credit-card:focus-visible,
.shop-link-container:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Animation de chargement vers shop */
#shop-loading-indicator {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

#shop-loading-indicator.active {
  display: block;
  animation: spin-pulse 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes spin-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
