/* ══════════════════════════════════════════════════
   TRANSFERWIRE — Design System CSS
   Couleurs: #0A3D8F (bleu) + #C8A400 (or)
══════════════════════════════════════════════════ */

:root {
  --blue:       #0A3D8F;
  --blue-dk:    #072d6b;
  --blue-lt:    #1a5cc4;
  --gold:       #C8A400;
  --gold-lt:    #e8c000;
  --green:      #0F6E56;
  --red:        #A32D2D;
  --gray:       #64748B;
  --gray-lt:    #F8FAFC;
  --gray-bd:    #E2E8F0;
  --text:       #1E293B;
  --text-lt:    #64748B;
  --white:      #FFFFFF;
  --shadow:     0 4px 24px rgba(10,61,143,.10);
  --shadow-sm:  0 2px 8px rgba(10,61,143,.07);
  --radius:     12px;
  --radius-sm:  8px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--gray-lt);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-lt); }
img { max-width: 100%; }

/* ── Typographie ─────────────────────────────── */
h1 { font-size: 2rem;   font-weight: 800; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1rem;   font-weight: 600; }
p  { margin-bottom: .5rem; }

/* ── Layout ─────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 0 20px; }
.container-md { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* ── Navbar ─────────────────────────────────── */
.navbar {
  background: var(--blue);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 16px rgba(0,0,0,.15);
  position: sticky; top: 0; z-index: 100;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--white); font-weight: 800; font-size: 1.1rem;
}
.navbar-brand img { height: 32px; }
.navbar-brand span { color: var(--gold); letter-spacing: .05em; }
.navbar-nav { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: rgba(255,255,255,.8); padding: 8px 14px;
  border-radius: var(--radius-sm); font-size: .9rem;
  transition: all .2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--white); background: rgba(255,255,255,.12);
}
.nav-link-gold {
  color: var(--gold) !important; border: 1px solid rgba(200,164,0,.4);
}
.nav-link-gold:hover { background: rgba(200,164,0,.12) !important; }

/* ── Sidebar (pages connectées) ─────────────── */
.layout-app {
  display: flex; min-height: calc(100vh - 64px);
}
.sidebar {
  width: 240px; min-width: 240px;
  background: var(--white);
  border-right: 1px solid var(--gray-bd);
  padding: 24px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-title {
  font-size: .72rem; font-weight: 700; color: var(--text-lt);
  text-transform: uppercase; letter-spacing: .08em;
  padding: 16px 12px 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text); font-size: .9rem;
  transition: all .2s;
}
.sidebar-link:hover { background: var(--gray-lt); color: var(--blue); }
.sidebar-link.active {
  background: rgba(10,61,143,.08); color: var(--blue); font-weight: 600;
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-badge {
  margin-left: auto; background: var(--red);
  color: var(--white); font-size: .7rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px; min-width: 20px;
  text-align: center;
}
.main-content { flex: 1; padding: 32px 24px; overflow-x: hidden; }

/* ── Cards ───────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-bd);
  padding: 24px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.card-title { font-size: 1rem; font-weight: 700; color: var(--text); }

/* ── Carte bancaire ──────────────────────────── */
.bank-card {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dk) 100%);
  border-radius: 16px;
  padding: 24px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  min-height: 180px;
}
.bank-card::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.bank-card-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.bank-card-logo img { height: 28px; }
.bank-card-label { font-size: .75rem; color: rgba(255,255,255,.7); margin-bottom: 4px; }
.bank-card-solde { font-size: 2rem; font-weight: 800; color: var(--white); }
.bank-card-iban { font-family: monospace; font-size: .8rem; color: rgba(255,255,255,.8); margin-top: 16px; }
.bank-card-actions { display: flex; gap: 10px; margin-top: 16px; }
.bank-card-btn {
  padding: 7px 16px; border-radius: 8px; font-size: .8rem; font-weight: 700;
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  transition: all .2s; border: none;
}
.bank-card-btn-gold {
  background: rgba(200,164,0,.2); color: var(--gold);
  border: 1px solid rgba(200,164,0,.4);
}
.bank-card-btn-gold:hover { background: rgba(200,164,0,.35); }
.bank-card-btn-white {
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.2);
}
.bank-card-btn-white:hover { background: rgba(255,255,255,.2); }

/* ── Stats dashboard ─────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-bd);
  padding: 20px; display: flex; align-items: center; gap: 16px;
}
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon-blue  { background: rgba(10,61,143,.1);  color: var(--blue); }
.stat-icon-gold  { background: rgba(200,164,0,.1);  color: var(--gold); }
.stat-icon-green { background: rgba(15,110,86,.1);  color: var(--green); }
.stat-icon-red   { background: rgba(163,45,45,.1);  color: var(--red); }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.stat-label { font-size: .8rem; color: var(--text-lt); }

/* ── Boutons ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 700; cursor: pointer;
  border: none; transition: all .2s; text-decoration: none;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-lt); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold-lt); color: var(--white); }
.btn-success { background: var(--green); color: var(--white); }
.btn-success:hover { background: #0a5540; color: var(--white); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #8a2525; color: var(--white); }
.btn-outline {
  background: transparent; color: var(--blue);
  border: 1.5px solid var(--blue);
}
.btn-outline:hover { background: var(--blue); color: var(--white); }
.btn-sm { padding: 7px 14px; font-size: .82rem; border-radius: 6px; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; border-radius: var(--radius); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Formulaires ─────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: .88rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--gray-bd);
  border-radius: var(--radius-sm);
  font-size: .95rem; color: var(--text);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10,61,143,.12);
}
.form-control::placeholder { color: var(--text-lt); }
.form-control.error { border-color: var(--red); }
.form-hint { font-size: .8rem; color: var(--text-lt); margin-top: 4px; }
.form-error { font-size: .8rem; color: var(--red); margin-top: 4px; font-weight: 600; }
select.form-control { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Badges statut ───────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: .75rem; font-weight: 700;
}
.badge-waiting  { background: rgba(200,164,0,.12); color: #8a6e00; }
.badge-success  { background: rgba(15,110,86,.12);  color: var(--green); }
.badge-danger   { background: rgba(163,45,45,.12);  color: var(--red); }
.badge-info     { background: rgba(10,61,143,.10);  color: var(--blue); }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ── Tableaux ────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--gray-lt); padding: 12px 16px;
  font-size: .8rem; font-weight: 700; color: var(--text-lt);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--gray-bd); text-align: left;
}
tbody td {
  padding: 14px 16px; border-bottom: 1px solid var(--gray-bd);
  font-size: .9rem; vertical-align: middle;
}
tbody tr:hover { background: rgba(10,61,143,.02); }
tbody tr:last-child td { border-bottom: none; }

/* ── Alertes ─────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm);
  font-size: .9rem; margin-bottom: 20px;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert-success { background: rgba(15,110,86,.1); color: var(--green); border: 1px solid rgba(15,110,86,.25); }
.alert-danger  { background: rgba(163,45,45,.1); color: var(--red);   border: 1px solid rgba(163,45,45,.25); }
.alert-info    { background: rgba(10,61,143,.08); color: var(--blue); border: 1px solid rgba(10,61,143,.2); }
.alert-warning { background: rgba(200,164,0,.1); color: #8a6e00; border: 1px solid rgba(200,164,0,.3); }

/* ── Auth pages ──────────────────────────────── */
.auth-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dk) 60%, #03194a 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: var(--white);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%; max-width: 440px;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
}
.auth-logo {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; margin-bottom: 32px; text-align: center;
}
.auth-logo img { height: 48px; }
.auth-logo h1 { color: var(--blue); font-size: 1.4rem; letter-spacing: .05em; }
.auth-logo p { color: var(--text-lt); font-size: .85rem; }
.auth-divider {
  text-align: center; position: relative; margin: 24px 0;
  color: var(--text-lt); font-size: .82rem;
}
.auth-divider::before {
  content: ''; position: absolute; top: 50%; left: 0;
  width: 100%; height: 1px; background: var(--gray-bd);
}
.auth-divider span { background: var(--white); padding: 0 12px; position: relative; }

/* ── Notifications ───────────────────────────── */
.notif-item {
  display: flex; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--gray-bd); cursor: pointer;
  transition: background .15s;
}
.notif-item:hover { background: var(--gray-lt); }
.notif-item.unread { background: rgba(10,61,143,.03); }
.notif-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-title { font-size: .9rem; font-weight: 700; color: var(--text); }
.notif-text  { font-size: .82rem; color: var(--text-lt); margin-top: 2px; }
.notif-time  { font-size: .75rem; color: var(--text-lt); margin-top: 4px; }

/* ── Chat ────────────────────────────────────── */
.chat-container { display: flex; flex-direction: column; height: 500px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble {
  max-width: 70%; padding: 10px 16px;
  border-radius: 18px; font-size: .9rem; line-height: 1.5;
}
.chat-bubble-admin {
  background: var(--blue); color: var(--white);
  border-bottom-left-radius: 4px; align-self: flex-start;
}
.chat-bubble-client {
  background: var(--gray-lt); color: var(--text);
  border-bottom-right-radius: 4px; align-self: flex-end;
  border: 1px solid var(--gray-bd);
}
.chat-input-area {
  border-top: 1px solid var(--gray-bd);
  padding: 12px 16px; display: flex; gap: 10px;
  background: var(--white);
}
.chat-input {
  flex: 1; padding: 10px 14px;
  border: 1.5px solid var(--gray-bd);
  border-radius: 24px; outline: none; font-size: .9rem;
  transition: border-color .2s;
}
.chat-input:focus { border-color: var(--blue); }

/* ── Progress étapes ─────────────────────────── */
.steps { display: flex; align-items: center; margin-bottom: 32px; }
.step { display: flex; flex-direction: column; align-items: center; flex: 1; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem;
  border: 2px solid var(--gray-bd); background: var(--white); color: var(--text-lt);
}
.step.active .step-circle { border-color: var(--blue); background: var(--blue); color: var(--white); }
.step.done .step-circle   { border-color: var(--green); background: var(--green); color: var(--white); }
.step-label { font-size: .75rem; color: var(--text-lt); margin-top: 6px; text-align: center; }
.step.active .step-label { color: var(--blue); font-weight: 700; }
.step.done .step-label   { color: var(--green); }
.step-line { flex: 1; height: 2px; background: var(--gray-bd); margin: 0 4px; margin-bottom: 20px; }
.step-line.done { background: var(--green); }

/* ── Utilities ───────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--text-lt); }
.text-gold   { color: var(--gold); }
.text-blue   { color: var(--blue); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.fw-bold     { font-weight: 700; }
.fw-800      { font-weight: 800; }
.mt-1 { margin-top: 4px; }  .mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }  .mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; } .mb-4 { margin-bottom: 24px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 16px; }
.d-flex { display: flex; } .align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 32px 24px; }
  .main-content { padding: 20px 16px; }
  h1 { font-size: 1.5rem; }
  .bank-card-actions { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .navbar { padding: 0 16px; }
  .container { padding: 0 16px; }
}

/* ── Animations ──────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn .3s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 20px; height: 20px; border: 2px solid rgba(255,255,255,.3);
  border-top-color: var(--white); border-radius: 50%;
  animation: spin .7s linear infinite; display: inline-block;
}

/* ── Scrollbar ───────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-lt); }
::-webkit-scrollbar-thumb { background: var(--gray-bd); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }
