* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: linear-gradient(135deg, #0A2540, #12335A); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.card { background: white; border-radius: 20px; padding: 40px 32px; max-width: 460px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.logo { text-align: center; margin-bottom: 24px; }
.logo img { width: 56px; height: 56px; }
.logo h1 { font-size: 22px; color: #0A2540; margin-top: 8px; }
h2 { font-size: 24px; color: #0A2540; margin-bottom: 8px; text-align: center; }
.subtitle { color: #5A6779; font-size: 14px; text-align: center; margin-bottom: 32px; }
.btn-google { width: 100%; padding: 14px; background: white; border: 2px solid #E4E8EF; border-radius: 12px; font-size: 16px; font-weight: 600; color: #1A1F2E; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 12px; transition: all 0.2s; }
.btn-google:hover { border-color: #0A2540; box-shadow: 0 4px 12px rgba(10,37,64,0.1); }
.btn-google img { width: 20px; height: 20px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: #B0BAC8; font-size: 13px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #E4E8EF; }
label { display: block; font-size: 14px; color: #1A1F2E; font-weight: 600; margin-bottom: 6px; }
input { width: 100%; padding: 12px 16px; border: 2px solid #E4E8EF; border-radius: 10px; font-size: 15px; margin-bottom: 16px; font-family: inherit; }
input:focus { outline: none; border-color: #0A2540; }
input[type="checkbox"] { width: auto; margin-right: 8px; }
.checkbox-label { display: flex; align-items: flex-start; font-size: 13px; color: #5A6779; font-weight: normal; margin-bottom: 16px; }
.checkbox-label a { color: #0A2540; }
.btn-primary { width: 100%; padding: 14px; background: #0A2540; color: white; border: none; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; }
.btn-primary:hover { background: #12335A; }
.footer-links { text-align: center; margin-top: 20px; font-size: 14px; color: #5A6779; }
.footer-links a { color: #0A2540; font-weight: 600; text-decoration: none; }
.back { text-align: center; margin-top: 16px; font-size: 13px; }
.back a { color: #B0BAC8; text-decoration: none; }
#msg { margin-bottom: 16px; padding: 10px; border-radius: 8px; font-size: 14px; display: none; }
#msg.error { background: #FFEBEE; color: #C62828; display: block; }
#msg.success { background: #E8F5E9; color: #2E7D32; display: block; }

/* Profile page */
.profile-card { max-width: 600px; }
.profile-row { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid #E4E8EF; }
.profile-row:last-child { border-bottom: none; }
.profile-label { color: #5A6779; font-size: 14px; }
.profile-value { font-weight: 600; color: #1A1F2E; }
/* Se déconnecter est une action courante et volontaire : elle doit se voir.
   Auparavant elle passait derrière le lien de suppression de compte, qui est
   pourtant l'action rare et irréversible. */
.btn-logout {
  width: 100%; padding: 16px; margin-top: 22px;
  background: #FFFFFF; color: #2B3A4F;
  border: 2px solid #CBD5E1; border-radius: 13px;
  font-weight: 800; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: border-color .15s, background .15s, transform .12s;
}
.btn-logout:hover {
  background: #F1F5F9; border-color: #7C3AED; color: #4C1D95;
  transform: translateY(-1px);
}
.btn-logout:active { transform: translateY(0); }

/* Checkout */
.checkout-card { max-width: 520px; }
.plan-summary { background: #F5F7FA; padding: 20px; border-radius: 12px; margin-bottom: 24px; }
.plan-summary-name { color: #0A2540; font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.plan-summary-price { font-size: 32px; font-weight: 800; color: #0A2540; }
.plan-summary-desc { color: #5A6779; font-size: 14px; margin-top: 4px; }
#airwallex-element { min-height: 350px; margin-bottom: 16px; }

/* Sélecteur de pays : s'affiche quand on arrive sur « 1 pays » sans avoir
   choisi lequel. Avant, le serveur répondait « Pays manquant » et la vente
   s'arrêtait là. */
.picker-title { font-size: 15px; font-weight: 700; color: #0A2540; margin-bottom: 4px; }
.picker-hint { font-size: 13px; color: #5A6779; margin-bottom: 14px; }
#country-search { margin-bottom: 12px; }
.country-list {
  max-height: 290px; overflow-y: auto;
  border: 2px solid #E4E8EF; border-radius: 12px; margin-bottom: 16px;
}
.country-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 11px 14px; background: none; border: none; cursor: pointer;
  font-size: 15px; color: #1A1F2E; font-family: inherit; text-align: left;
  border-bottom: 1px solid #F0F3F8;
}
.country-item:last-child { border-bottom: none; }
.country-item:hover { background: #F5F7FA; }
.country-item.selected { background: #EDE9FE; color: #4C1D95; font-weight: 700; }
.country-item .flag { font-size: 20px; line-height: 1; }
.country-empty { padding: 20px; text-align: center; color: #B0BAC8; font-size: 14px; }
#picker-go:disabled { background: #CBD5E1; cursor: not-allowed; }

/* Navigation de secours sur la page de paiement */
.checkout-nav {
  display: flex; gap: 8px; margin-top: 20px;
  padding-top: 18px; border-top: 1px solid #E4E8EF;
}
.cn-btn {
  flex: 1; text-align: center; padding: 11px 6px;
  background: #F5F7FA; border: 2px solid #E4E8EF; border-radius: 11px;
  color: #2B3A4F; font-size: 13px; font-weight: 700; text-decoration: none;
  transition: border-color .15s, background .15s, transform .12s;
}
.cn-btn:hover {
  background: #F1F5F9; border-color: #7C3AED; color: #4C1D95;
  transform: translateY(-1px);
}
.payment-secure { text-align: center; font-size: 12px; color: #5A6779; margin-top: 12px; }

/* Lancer l'app : c'est l'action qu'on veut voir en premier sur le profil */
/* Action principale du profil : ouvrir l'app. Elle doit dominer la page. */
.btn-launch {
  display: block; width: 100%; margin-top: 22px; padding: 24px 18px;
  background: linear-gradient(135deg, #7C3AED 0%, #DB2777 55%, #F59E0B 100%);
  color: #fff; text-align: center; text-decoration: none;
  border-radius: 18px; font-size: 22px; font-weight: 900; letter-spacing: -.3px;
  box-shadow: 0 12px 32px rgba(124, 58, 237, .38);
  transition: transform .15s, filter .2s, box-shadow .2s;
  animation: launchPulse 2.8s ease-in-out infinite;
}
.btn-launch:hover {
  transform: translateY(-3px) scale(1.02); filter: brightness(1.06);
  box-shadow: 0 16px 40px rgba(219,39,119,.5), 0 0 0 4px rgba(255,47,180,.3);
}
@keyframes launchPulse {
  0%, 100% { box-shadow: 0 12px 32px rgba(124,58,237,.38), 0 0 0 0 rgba(219,39,119,.45); }
  50%      { box-shadow: 0 12px 32px rgba(124,58,237,.38), 0 0 0 16px rgba(219,39,119,0); }
}
@media (prefers-reduced-motion: reduce) { .btn-launch { animation: none; } }

/* Suppression de compte : disponible, mais discrete — un seul element,
   pour ne pas concurrencer visuellement l'action principale. */
.danger-zone { margin-top: 26px; padding-top: 16px; border-top: 1px solid #E4E8EF; text-align: center; }
.delete-link {
  color: #98A0AE; font-size: 13px; text-decoration: underline;
  text-underline-offset: 3px;
}
.delete-link:hover { color: #C62828; }
#delete-msg { margin-top: 10px; font-size: 13px; color: #C62828; }