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

:root {
  --primary: #fb0797;
  --primary-dark: #d90680;
  --primary-light: #ff5cbf;
  --gold: #e1d790;
  --gold-dark: #c4b96e;
  --text: #373737;
  --text-muted: #6b6b6b;
  --border: #e8e4d9;
  --bg: #ffffff;
  --bg-page: #fcfbf4;
  --bg-card: #faf9f2;
  --error: #ef4444;
  --success: #22c55e;
  --gradient-primary: linear-gradient(135deg, #fb0797 0%, #d90680 100%);
  --gradient-gold: linear-gradient(135deg, #e1d790 0%, #c4b96e 100%);
  --gradient-bg: linear-gradient(180deg, #fcfbf4 0%, #ffffff 100%);
  --shadow-sm: 0 1px 3px rgba(55,55,55,0.08);
  --shadow-md: 0 4px 6px rgba(55,55,55,0.1);
  --shadow-lg: 0 10px 25px rgba(55,55,55,0.12);
  --shadow-xl: 0 20px 40px rgba(55,55,55,0.15);
}

body {
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.6;
  padding: 1rem;
  min-height: 100vh;
}

p {
  font-weight: 500;
  font-size: 16px;
}

/* Container */
.checkout-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 2px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.checkout-header::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: 0;
}

.brand-name {
  font-family: 'Assistant', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.checkout-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.8rem;
}

/* Section Produit avec Bénéfices */
.product-summary {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(251,7,151,0.03) 0%, rgba(225,215,144,0.06) 100%);
  border-radius: 2px;
  border: 1px solid rgba(225,215,144,0.3);
  animation: fadeIn 0.6s ease-out;
}

.product-name {
  font-family: 'Assistant', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  text-align: center;
}

.benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.benefits-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text);
  font-weight: 500;
}

.benefit-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary);
  stroke-width: 2.5;
}

/* Preuve Sociale */
.social-proof {
  margin-bottom: 2rem;
  animation: fadeIn 0.6s ease-out 0.2s both;
}

.social-proof-badge {
  background: linear-gradient(135deg, rgba(225,215,144,0.15) 0%, rgba(225,215,144,0.08) 100%);
  border: 1px solid rgba(225,215,144,0.4);
  color: var(--text);
  font-weight: 600;
}

.social-proof-badge .badge-icon {
  color: #d4a017;
  width: 20px;
  height: 20px;
}

/* Prix */
.price-section {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: var(--gradient-primary);
  border-radius: 2px;
  box-shadow: 0 4px 20px rgba(251,7,151,0.2);
  position: relative;
  overflow: hidden;
  animation: fadeIn 0.6s ease-out 0.3s both;
}

.price-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.price-display {
  position: relative;
  z-index: 1;
}

.price-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.price-amount {
  font-size: 3rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  letter-spacing: -1px;
  display: block;
  margin: 0.25rem 0;
}

.price-description {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0.5rem;
}

/* Trust Indicators */
.trust-indicators {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 0.5rem 0;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
  stroke-width: 2.5;
}

/* Récapitulatif de Commande */
.order-summary {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 2px;
  border: 1px solid var(--border);
  animation: fadeIn 0.6s ease-out 0.4s both;
}

.summary-title {
  font-family: 'Assistant', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  text-align: center;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.summary-line:last-of-type {
  border-bottom: none;
}

.summary-value {
  font-weight: 600;
  color: var(--text);
}

.summary-total {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--gold);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.summary-total-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
}

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

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

.email-field label::before {
  content: '';
}

.email-field input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: 2px;
  font-size: 1rem;
  font-family: 'Archivo', sans-serif;
  transition: all 0.3s ease;
  background: var(--bg);
}

.email-field input:hover {
  border-color: var(--gold);
}

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

.email-field.error input {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

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

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

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

@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.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

/* Card Fields */
.card-fields-container {
  margin-top: 1.5rem;
  animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Card Security Notice */
.card-security-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, rgba(34,197,94,0.06), rgba(225,215,144,0.1));
  border: 1px solid rgba(225,215,144,0.3);
  border-radius: 2px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #059669;
}

.card-security-notice svg {
  width: 20px;
  height: 20px;
  color: #10b981;
  flex-shrink: 0;
}

.card-field-wrapper {
  margin-bottom: 1.25rem;
  position: relative;
}

.card-field-wrapper label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.625rem;
  letter-spacing: 0.01em;
}

.card-field-wrapper label::after {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
}

.card-field-wrapper:focus-within label::after {
  opacity: 1;
}

.card-field {
  border: none;
  background: transparent;
  min-height: 0;
  position: relative;
}

/* Hide our SVG icons - PayPal handles its own field UI */
.card-field .card-field-icon {
  display: none;
}


/* Card Fields Row (Expiration + CVV) */
.card-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Card Number Field */
#card-number-field {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

/* CVV Field */
#card-cvv-field {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

/* Card Field Icons - hidden, PayPal renders its own UI */
.card-field-icon {
  display: none;
}

/* Card Submit Button */
.card-submit-btn {
  width: 100%;
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 1.125rem 1.5rem;
  border-radius: 2px;
  font-family: 'Assistant', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(251,7,151,0.3);
  position: relative;
  overflow: hidden;
  margin-top: 1.5rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card-submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.card-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(251,7,151,0.4);
}

.card-submit-btn:hover::before {
  opacity: 1;
}

.card-submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(251,7,151,0.3);
}

.card-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.card-submit-btn .arrow-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-submit-btn:hover .arrow-icon {
  transform: translateX(4px);
}

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

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

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

/* Trust Badges */
.trust-badges {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 1.5rem 0;
  animation: fadeIn 0.6s ease-out 0.5s both;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-card);
  border-radius: 2px;
  font-size: 0.875rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.trust-badge:hover {
  background: var(--bg);
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(225,215,144,0.2);
}

.trust-badge .badge-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--primary);
  stroke-width: 2;
}

a.trust-badge-link {
  text-decoration: none;
  color: var(--text-muted);
  cursor: pointer;
}

a.trust-badge-link:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* Garantie Visible */
.guarantee-section {
  margin: 2rem 0 1.5rem;
  animation: fadeIn 0.6s ease-out 0.6s both;
}

.guarantee-badge {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(34,197,94,0.06) 0%, rgba(225,215,144,0.08) 100%);
  border-radius: 2px;
  border: 1px solid rgba(225,215,144,0.3);
  transition: all 0.2s;
}

.guarantee-badge:hover {
  border-color: rgba(225,215,144,0.5);
  box-shadow: 0 4px 12px rgba(225,215,144,0.15);
}

.guarantee-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--success);
  stroke-width: 2;
  margin-top: 0.25rem;
}

.guarantee-content {
  flex: 1;
}

.guarantee-content strong {
  display: block;
  font-family: 'Assistant', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.guarantee-content p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.guarantee-link {
  font-size: 0.875rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.guarantee-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Security Notice */
.security-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: linear-gradient(135deg, rgba(225,215,144,0.08) 0%, rgba(251,7,151,0.03) 100%);
  border-radius: 2px;
  border: 1px solid rgba(225,215,144,0.2);
  font-weight: 500;
  margin-top: 1rem;
}

.lock-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(55, 55, 55, 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: var(--primary);
  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;
}

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

/* Responsive */
@media (max-width: 640px) {
  body {
    padding: 0.5rem;
  }

  .checkout-container {
    padding: 1.5rem;
  }

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

  .product-name {
    font-size: 1.25rem;
  }

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

  .trust-indicators {
    gap: 0.75rem;
  }

  .trust-item {
    font-size: 0.75rem;
  }

  .trust-icon {
    width: 24px;
    height: 24px;
  }

  .price-section {
    padding: 1.5rem 1rem;
  }

  .order-summary {
    padding: 1.25rem;
  }

  .summary-total-value {
    font-size: 1.25rem;
  }

  .trust-badges {
    flex-direction: column;
    gap: 0.75rem;
  }

  .trust-badge {
    width: 100%;
    justify-content: center;
  }

  .guarantee-badge {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .guarantee-icon {
    margin: 0 auto;
  }

  .benefits-list li {
    font-size: 0.875rem;
  }

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

  .card-security-notice {
    font-size: 0.8125rem;
    padding: 0.625rem 0.875rem;
  }

  .card-security-notice svg {
    width: 18px;
    height: 18px;
  }

  .payment-divider {
    margin: 1.25rem 0;
    font-size: 0.75rem;
  }

  .card-submit-btn {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
}

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

/* PayPal card field iframes - seamless integration */
.card-field iframe {
  border: none !important;
  border-radius: 0 !important;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Pulse subtil pour le bouton de paiement */
.card-submit-btn {
  animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(251,7,151,0.25);
  }
  50% {
    box-shadow: 0 4px 16px rgba(251,7,151,0.35);
  }
}
