/* ========================================
   SYSTÈME D'ABONNEMENT - YAPlayer v2
   ======================================== */

/* Variables */
:root {
  --sub-primary: #3b82f6;
  --sub-secondary: #8b5cf6;
  --sub-success: #10b981;
  --sub-warning: #f59e0b;
  --sub-danger: #ef4444;
  --sub-bg: #f8fafc;
  --sub-card-bg: white;
  --sub-text: #1e293b;
  --sub-text-light: #64748b;
  --sub-border: #e2e8f0;
  --sub-shadow: rgba(0, 0, 0, 0.1);
}

/* Banner d'abonnement dans le dashboard */
.subscription-banner {
  padding: 16px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px var(--sub-shadow);
}

.subscription-banner.trial {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-left: 4px solid var(--sub-warning);
}

.subscription-banner.active {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left: 4px solid var(--sub-success);
}

.subscription-banner.expired {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-left: 4px solid var(--sub-danger);
}

.subscription-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sub-text);
}

.subscription-banner-icon {
  font-size: 24px;
}

.upgrade-btn {
  padding: 10px 20px;
  background: var(--sub-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.upgrade-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.manage-btn {
  padding: 10px 20px;
  background: white;
  color: var(--sub-primary);
  border: 2px solid var(--sub-primary);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.manage-btn:hover {
  background: var(--sub-primary);
  color: white;
}

/* Page des offres */
.pricing-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 60px 20px;
}

.pricing-header {
  text-align: center;
  margin-bottom: 60px;
  color: white;
}

.pricing-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pricing-subtitle {
  font-size: 20px;
  opacity: 0.9;
}

/* Grille des cartes de prix */
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Carte de prix */
.pricing-card {
  background: white;
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.pricing-card.popular {
  border: 3px solid #fbbf24;
  transform: scale(1.05);
}

.pricing-card.popular:hover {
  transform: scale(1.08) translateY(-12px);
}

/* Badge */
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

/* Nom du plan */
.pricing-plan-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--sub-text);
  margin-bottom: 16px;
  text-align: center;
}

/* Prix */
.pricing-price {
  text-align: center;
  margin-bottom: 24px;
}

.pricing-amount {
  font-size: 48px;
  font-weight: 800;
  color: var(--sub-primary);
  line-height: 1;
}

.pricing-period {
  font-size: 16px;
  color: var(--sub-text-light);
  margin-left: 4px;
}

.pricing-discount {
  display: inline-block;
  background: #dcfce7;
  color: #15803d;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
}

/* Économies */
.pricing-savings {
  text-align: center;
  color: var(--sub-success);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  min-height: 20px;
}

/* Features */
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
  flex-grow: 1;
}

.pricing-features li {
  padding: 12px 0;
  font-size: 15px;
  color: var(--sub-text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.pricing-features li::before {
  content: "✅";
  font-size: 18px;
  flex-shrink: 0;
}

/* Bouton d'achat */
.pricing-card-btn {
  width: 100%;
  padding: 16px;
  background: var(--sub-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pricing-card-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
}

.pricing-card.popular .pricing-card-btn {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.pricing-card.popular .pricing-card-btn:hover {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 8px 16px rgba(251, 191, 36, 0.4);
}

/* Garantie */
.pricing-guarantee {
  text-align: center;
  margin-top: 48px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-guarantee-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.pricing-guarantee-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--sub-text);
  margin-bottom: 8px;
}

.pricing-guarantee-subtext {
  font-size: 14px;
  color: var(--sub-text-light);
}

/* Panier */
.cart-container {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100%;
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.cart-container.open {
  right: 0;
}

.cart-header {
  padding: 24px;
  border-bottom: 2px solid var(--sub-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--sub-text);
}

.cart-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--sub-text-light);
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.cart-close:hover {
  background: var(--sub-bg);
}

.cart-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--sub-text-light);
}

.cart-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.cart-empty-text {
  font-size: 18px;
}

/* Items du panier */
.cart-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  background: var(--sub-bg);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cart-item-icon {
  width: 48px;
  height: 48px;
  background: var(--sub-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--sub-text);
  margin-bottom: 4px;
}

.cart-item-profile {
  font-size: 13px;
  color: var(--sub-text-light);
}

.cart-item-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--sub-primary);
  white-space: nowrap;
}

.cart-item-remove {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--sub-danger);
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.cart-item-remove:hover {
  background: #fee2e2;
}

/* Footer du panier */
.cart-footer {
  padding: 24px;
  border-top: 2px solid var(--sub-border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.cart-total-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--sub-text);
}

.cart-total-amount {
  font-size: 28px;
  font-weight: 800;
  color: var(--sub-primary);
}

.cart-checkout-btn {
  width: 100%;
  padding: 16px;
  background: var(--sub-success);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cart-checkout-btn:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.cart-checkout-btn:disabled {
  background: var(--sub-border);
  cursor: not-allowed;
  transform: none;
}

/* PayPal Container */
#paypal-button-container {
  margin-top: 16px;
}

/* Bouton panier flottant */
.cart-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 64px;
  height: 64px;
  background: var(--sub-primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transition: all 0.3s ease;
  z-index: 999;
}

.cart-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.6);
}

.cart-fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--sub-danger);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 3px solid white;
}

/* Responsive */
@media (max-width: 768px) {
  .pricing-cards {
    grid-template-columns: 1fr;
  }
  
  .pricing-card.popular {
    transform: scale(1);
  }
  
  .pricing-card.popular:hover {
    transform: translateY(-12px);
  }
  
  .pricing-title {
    font-size: 32px;
  }
  
  .cart-container {
    width: 100%;
    right: -100%;
  }
  
  .cart-fab {
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
  }
}


