/* ============================================================
   PAYT DESIGN SYSTEM — payt-design.css
   Extrait de modes-paiement.html
   Usage : <link rel="stylesheet" href="payt-design.css">
   ============================================================ */


/* ── 1. POLICES ─────────────────────────────────────────────
   Police : Area (Payt brand font)
   Weights disponibles : 400, 500, 600, 700, 900
   Usage :
     font-family: var(--font);
     font-weight: 400  → texte courant
     font-weight: 500  → medium (labels, hints)
     font-weight: 600  → semibold (boutons secondaires)
     font-weight: 700  → bold (titres, labels forts)
     font-weight: 900  → black (grands chiffres, hero)
   ----------------------------------------------------------- */
@font-face {
  font-family: 'Area';
  src: url('https://raw.githubusercontent.com/dvermeulen02/Fonts/main/Area-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Area';
  src: url('https://raw.githubusercontent.com/dvermeulen02/Fonts/main/Area-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Area';
  src: url('https://raw.githubusercontent.com/dvermeulen02/Fonts/main/Area-Semibold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Area';
  src: url('https://raw.githubusercontent.com/dvermeulen02/Fonts/main/Area-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Area';
  src: url('https://raw.githubusercontent.com/dvermeulen02/Fonts/main/Area-Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}


/* ── 2. VARIABLES CSS (DESIGN TOKENS) ───────────────────────
   Référence centralisée de toutes les valeurs du design system.
   Modifier ici = modifie toute l'app.
   ----------------------------------------------------------- */
:root {

  /* Couleurs principales */
  --navy:         #122C43;   /* Couleur dominante — topbar, textes forts */
  --teal:         #55D6DE;   /* Accent principal — boutons, focus, liens */
  --green:        #32C082;   /* Succès, validation, gradient fin */
  --orange:       #F5A623;   /* Avertissement, statut en attente */
  --red:          #D91F2C;   /* Erreur, danger */
  --white:        #FFFFFF;

  /* Couleurs dérivées (opacités du navy) */
  --muted:        rgba(18, 44, 67, 0.45);  /* Texte secondaire, labels */
  --faint:        rgba(18, 44, 67, 0.07);  /* Fond icône, séparateur léger */
  --faint-border: rgba(18, 44, 67, 0.10);  /* Bordures subtiles */
  --faint-border-strong: rgba(18, 44, 67, 0.16); /* Bordures visibles */

  /* Fond de page (gradient animé) */
  --bg-gradient: linear-gradient(135deg,
    #dcf6f7 0%,
    #edfcfd 35%,
    #d5f2e5 70%,
    #e8faf3 100%
  );

  /* Glass morphism */
  --glass-bg:         rgba(255, 255, 255, 0.65);
  --glass-bg-light:   rgba(255, 255, 255, 0.45);
  --glass-border:     rgba(255, 255, 255, 0.90);
  --glass-blur:       blur(20px);
  --glass-shadow:     0 8px 32px rgba(85, 214, 222, 0.08), 0 2px 8px rgba(0, 0, 0, 0.05);

  /* Couleurs de surface teal/green (pour badges, hints) */
  --teal-bg:      rgba(85, 214, 222, 0.10);
  --teal-border:  rgba(85, 214, 222, 0.30);
  --green-bg:     rgba(50, 192, 130, 0.10);
  --red-bg:       rgba(217, 31, 44, 0.10);
  --red-border:   rgba(217, 31, 44, 0.30);

  /* Typographie */
  --font:         'Area', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Tailles de texte */
  --text-xs:      10px;  /* labels uppercase, captions */
  --text-sm:      11px;  /* badges, hints, meta */
  --text-base:    13px;  /* corps principal */
  --text-md:      14px;  /* corps large, bouton principal */
  --text-lg:      16px;  /* sous-titres */
  --text-xl:      22px;  /* titres de section */
  --text-hero:    30px;  /* grands chiffres, montants */

  /* Rayons de bordure */
  --radius-sm:    6px;
  --radius:       8px;
  --radius-md:    10px;
  --radius-lg:    12px;
  --radius-xl:    16px;
  --radius-full:  999px;

  /* Transitions */
  --transition:       all 0.18s ease;
  --transition-slow:  all 0.22s ease;

  /* Ombres */
  --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md:    0 4px 16px rgba(85, 214, 222, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg:    0 8px 32px rgba(85, 214, 222, 0.22), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-teal:  0 6px 24px rgba(50, 192, 130, 0.35);
}


/* ── 3. RESET & BASE ────────────────────────────────────────
   ----------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font);
}

html, body {
  height: 100%;
}

body {
  background: #ffffff;
  color: var(--navy);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

input, button, select, textarea {
  font-family: var(--font);
}

input:focus, textarea:focus, select:focus {
  outline: none;
}


/* ── 4. FOND ANIMÉ (BLOBS) ──────────────────────────────────
   Ajouter dans le <body> :
   <div class="blob blob-1"></div>
   <div class="blob blob-2"></div>
   <div class="blob blob-3"></div>
   ----------------------------------------------------------- */
@keyframes blob1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.12); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes blob2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-30px, 40px) scale(1.08); }
  100% { transform: translate(0, 0) scale(1); }
}
@keyframes blob3 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(20px, 35px) scale(1.06); }
  100% { transform: translate(0, 0) scale(1); }
}

.blob { display: none; }
.blob-1 {
  top: -15%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(85, 214, 222, 0.50) 0%, transparent 65%);
  animation: blob1 12s ease-in-out infinite;
}
.blob-2 {
  bottom: -15%; right: -10%;
  width: 550px; height: 550px;
  background: radial-gradient(circle, rgba(50, 192, 130, 0.45) 0%, transparent 65%);
  animation: blob2 15s ease-in-out infinite;
}
.blob-3 {
  top: 40%; right: 5%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(85, 214, 222, 0.35) 0%, transparent 65%);
  animation: blob3 18s ease-in-out infinite;
}


/* ── 5. GLASS CARD ──────────────────────────────────────────
   Carte principale en verre dépoli.
   Usage : <div class="glass-card">...</div>
   Variante plus légère : class="glass-card glass-card--light"
   ----------------------------------------------------------- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-shadow);
}
.glass-card--light {
  background: var(--glass-bg-light);
}
.glass-card--hover {
  transition: var(--transition-slow);
  cursor: pointer;
}
.glass-card--hover:hover {
  background: rgba(255, 255, 255, 0.80);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px) scale(1.01);
}
.glass-card--selected {
  background: rgba(85, 214, 222, 0.13);
  border-color: var(--teal);
  box-shadow: var(--shadow-lg);
}


/* ── 6. TYPOGRAPHIE ─────────────────────────────────────────
   ----------------------------------------------------------- */

/* Label uppercase — pour les catégories, sections */
.label-upper {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Texte principal fort */
.text-strong {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--navy);
}

/* Texte secondaire */
.text-muted {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* Grand chiffre (montant, stat) */
.text-hero {
  font-size: var(--text-hero);
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.04em;
  line-height: 1;
}

/* Titre de section */
.text-title {
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.02em;
}


/* ── 7. BOUTONS ─────────────────────────────────────────────
   ----------------------------------------------------------- */

/* Base commune */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.btn:active:not(:disabled) {
  transform: scale(0.98);
}

/* Bouton primaire — gradient teal → green */
.btn-primary {
  background: linear-gradient(90deg, var(--teal), var(--green));
  color: #fff;
  border: none;
  font-weight: 700;
  box-shadow: var(--shadow-teal);
}
.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
}

/* Bouton secondaire — outline teal */
.btn-secondary {
  background: var(--teal-bg);
  color: var(--teal);
  border: 1.5px solid var(--teal-border);
  font-weight: 600;
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(85, 214, 222, 0.16);
  color: var(--navy);
  border-color: var(--teal);
}

/* Bouton ghost — transparent, pour topbar sombre */
.btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Bouton neutre — fond verre */
.btn-neutral {
  background: rgba(255, 255, 255, 0.70);
  color: var(--navy);
  border: 1.5px solid var(--faint-border-strong);
  backdrop-filter: blur(8px);
}
.btn-neutral:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.90);
}

/* Bouton danger */
.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1.5px solid var(--red-border);
  font-weight: 600;
}
.btn-danger:hover:not(:disabled) {
  background: rgba(217, 31, 44, 0.18);
}

/* Tailles */
.btn-sm { padding: 5px 12px; font-size: var(--text-sm); }
.btn-lg { padding: 12px 24px; font-size: var(--text-md); font-weight: 700; border-radius: var(--radius-lg); }


/* ── 8. INPUTS ──────────────────────────────────────────────
   ----------------------------------------------------------- */
.input {
  width: 100%;
  padding: 8px 12px;
  font-size: var(--text-base);
  font-weight: 500;
  font-family: var(--font);
  color: var(--navy);
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid var(--faint-border);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(85, 214, 222, 0.18);
}
.input--error {
  border-color: var(--red);
}
.input--error:focus {
  box-shadow: 0 0 0 3px rgba(217, 31, 44, 0.15);
}
.input--success {
  border-color: var(--teal);
  background: var(--teal-bg);
}


/* ── 9. BADGES ──────────────────────────────────────────────
   ----------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 700;
}
.badge-success {
  background: rgba(50, 192, 130, 0.12);
  color: #1a7a4a;
  border: 1px solid rgba(50, 192, 130, 0.30);
}
.badge-warning {
  background: rgba(245, 166, 35, 0.12);
  color: #8a5a00;
  border: 1px solid rgba(245, 166, 35, 0.30);
}
.badge-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
}
.badge-neutral {
  background: var(--faint);
  color: var(--muted);
  border: 1px solid var(--faint-border);
}
.badge-teal {
  background: var(--teal-bg);
  color: #0a4a52;
  border: 1px solid var(--teal-border);
}


/* ── 10. TOPBAR (fond navy) ─────────────────────────────────
   ----------------------------------------------------------- */
.topbar {
  background: var(--navy);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  height: 52px;
  flex-shrink: 0;
}
.topbar-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.70);
  letter-spacing: 0.03em;
}


/* ── 11. SÉPARATEURS ────────────────────────────────────────
   ----------------------------------------------------------- */
.divider {
  height: 1px;
  background: rgba(18, 44, 67, 0.06);
}
.divider-white {
  height: 1px;
  background: rgba(255, 255, 255, 0.50);
}


/* ── 12. ANIMATIONS ─────────────────────────────────────────
   ----------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-fadeIn  { animation: fadeIn 0.25s ease; }
.animate-pulse   { animation: pulse 0.8s ease infinite; }

/* Spinner de chargement */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.30);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner--dark {
  border-color: var(--faint-border);
  border-top-color: var(--teal);
}


/* ── 13. BARRE DE PROGRESSION ───────────────────────────────
   ----------------------------------------------------------- */
.progress-bar {
  width: 100px;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
}
.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--green));
  border-radius: 2px;
  transition: width 0.3s ease;
}


/* ── 14. SCROLLBARS ─────────────────────────────────────────
   ----------------------------------------------------------- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(18, 44, 67, 0.15);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(18, 44, 67, 0.30);
}


/* ── 15. UTILITAIRES ────────────────────────────────────────
   ----------------------------------------------------------- */
.z-content  { position: relative; z-index: 1; } /* passer au-dessus des blobs */
.text-teal  { color: var(--teal); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-navy  { color: var(--navy); }
.text-muted { color: var(--muted); }
.bg-navy    { background: var(--navy); }
.bg-teal    { background: var(--teal-bg); }
