/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #0ea5e9;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #ffffff;
  --bg-card: #f8fafc;
  --error: #ef4444;
  --success: #22c55e;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-card);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem 1rem;
}

/* Container */
.checkout-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Header */
.checkout-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.checkout-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Prix */
.price-section {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 8px;
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text);
}

/* Email */
.email-field {
  margin-bottom: 2rem;
}

.email-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.email-field input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
}

.email-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Payment Section */
.payment-section {
  margin-bottom: 1.5rem;
}

/* Skeleton */
.skeleton-loader {
  margin-bottom: 1rem;
}

.skeleton-btn {
  height: 50px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: skeleton 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* PayPal Buttons */
.paypal-buttons {
  margin-bottom: 1rem;
  min-height: 50px;
}

/* Divider */
.payment-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.payment-divider::before,
.payment-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Card Fields Container */
.card-fields-container {
  margin-top: 1.5rem;
}

/* Card Fields NATIFS (PayPal gère 100% le style) */
#card-name-field,
#card-number-field,
#card-expiry-field,
#card-cvv-field {
  margin-bottom: 1rem;
}

/* Row Expiration + CVV */
.card-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* Card Submit Button */
.card-submit-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.card-submit-btn:hover {
  background: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}

.card-submit-btn:active {
  transform: translateY(0);
}

.arrow-icon {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}

/* Messages */
.message-box {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.error-box {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.success-box {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Security Notice */
.security-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.lock-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-overlay p {
  color: white;
  margin-top: 1rem;
  font-weight: 500;
}

/* Active Navigation Link */
.nav-list a.active {
  color: #0f172a;
  font-weight: 600;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .main-content {
    padding: 1rem 0.5rem;
  }

  .checkout-container {
    padding: 1.5rem;
  }

  .brand-name {
    font-size: 1.5rem;
  }

  .price-amount {
    font-size: 2rem;
  }

  .card-fields-row {
    grid-template-columns: 1fr;
  }
}

/* PayPal iframe styles */
#paypal-button-container iframe {
  min-height: 50px !important;
}
