:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #eaf0f8;
  --border: #dce5f2;
  --text: #0b2545;
  --muted: #526581;
  --primary: #0b2545;
  --accent: #facc15;
  --accent-ink: #0b2545;
  --ok: #059669;
  --err: #dc2626;
  --radius: 14px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Layout Tri-Plateforme (QUALITÉ #14) */
.wx-shell {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 20px 48px;
}

.wx-sidebar {
  position: sticky;
  top: 20px;
  height: fit-content;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.wx-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.wx-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
}

.wx-brand-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.3px;
}

.wx-brand-sub {
  font-size: 11px;
  color: var(--muted);
  display: block;
}

.wx-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wx-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: background .15s, color .15s;
}

.wx-nav a:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.wx-nav a.active {
  background: var(--primary);
  color: #fff;
}

.wx-main {
  min-width: 0;
}

.wx-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.wx-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.4px;
}

.wx-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* Pass Wilix (sans visuel de carte bancaire) */
.wx-pass {
  background: linear-gradient(135deg, #0b2545 0%, #153b6e 100%);
  color: #fff;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
}

.wx-pass-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.wx-pass-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  background: rgba(255, 255, 255, .14);
  padding: 4px 10px;
  border-radius: 999px;
}

.wx-pass-balance {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 4px;
}

.wx-pass-escrow {
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 18px;
}

.wx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.wx-btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.wx-btn-light {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border-color: rgba(255, 255, 255, .24);
}

.wx-btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.wx-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wx-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.wx-card h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.wx-form-group {
  margin-bottom: 14px;
}

.wx-form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.wx-form-group input,
.wx-form-group select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.wx-alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 14px;
}

.wx-alert-ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.wx-alert-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.wx-tx-list {
  display: flex;
  flex-direction: column;
  divide-y: 1px solid var(--border);
}

.wx-tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.wx-tx-item:last-child {
  border-bottom: none;
}

.wx-tx-title {
  font-size: 14px;
  font-weight: 600;
}

.wx-tx-meta {
  font-size: 12px;
  color: var(--muted);
}

.wx-tx-amt {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.wx-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.wx-bottom-nav {
  display: none;
}

@media (max-width: 1023.98px) {
  .wx-shell {
    grid-template-columns: 1fr;
    padding: 14px 14px 86px;
    gap: 14px;
  }
  .wx-sidebar {
    display: none !important;
  }
  .wx-grid-2 {
    grid-template-columns: 1fr;
  }
  .wx-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 6px 4px env(safe-area-inset-bottom);
    z-index: 50;
  }
  .wx-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    gap: 3px;
  }
  .wx-bottom-nav a.active {
    color: var(--accent);
  }
}

