/* ============================================================
   UTB — Espace Client — Design System
   Palette héritée de l'app publique (tailwind.config.js) :
   navy #002068 / gold #C5A059 — étendue en direction
   "banque privée éditoriale" : Fraunces (display) + Manrope (UI)
   + JetBrains Mono (données chiffrées).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Brand */
  --navy-900: #00164e;
  --navy-800: #002068;
  --navy-700: #003399;
  --navy-600: #153ea3;
  --navy-500: #2d4ea8;
  --gold-600: #a6803f;
  --gold-500: #c5a059;
  --gold-400: #d4af37;
  --gold-100: #f4e9d2;

  /* Surfaces */
  --paper: #faf9f5;
  --paper-dim: #f2f0e8;
  --surface: #ffffff;
  --surface-sunken: #f5f4ee;
  --ink: #14171f;
  --ink-soft: #4a4f5c;
  --ink-faint: #8a8d98;
  --line: #e4e1d6;
  --line-strong: #d2cebd;

  /* Status */
  --success: #1e7f4f;
  --success-bg: #e7f4ec;
  --warning: #a6690f;
  --warning-bg: #fbf0dd;
  --danger: #b3261e;
  --danger-bg: #fbeae9;
  --info: #1a4fa0;
  --info-bg: #eaf1fb;

  /* Type */
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-ui: 'Manrope', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Rhythm */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(20,23,31,.04), 0 12px 32px -16px rgba(0,32,104,.18);
  --shadow-pop: 0 24px 60px -20px rgba(0,22,78,.35);
  --sidebar-w: 272px;
  --sidebar-w-collapsed: 88px;
  --topbar-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold-100); color: var(--navy-900); }

/* subtle grain texture used on hero/dark panels */
.grain { position: relative; isolation: isolate; }
.grain::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  opacity: .06; mix-blend-mode: overlay; pointer-events: none; z-index: 1;
}

/* ---------- App shell ---------- */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
body.sidebar-collapsed .app-shell { grid-template-columns: var(--sidebar-w-collapsed) 1fr; }

/* ---------- Sidebar ---------- */
.sidebar {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 60%, #001647 100%);
  color: #fff;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
  transition: width .25s ease;
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 28px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  margin-bottom: 22px;
  white-space: nowrap;
}
.brand img { height: 34px; width: auto; filter: brightness(0) invert(1); flex-shrink: 0; }
.brand-name { font-family: var(--font-display); font-size: 15px; letter-spacing: .04em; color: #fff; opacity: .92; }
.brand-name b { display:block; font-size: 12px; font-weight: 500; letter-spacing: .12em; color: var(--gold-400); text-transform: uppercase; }

.nav-group { margin-bottom: 6px; }
.nav-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.38); padding: 14px 12px 8px; white-space: nowrap; }
.nav-link {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 12px; border-radius: 12px;
  color: rgba(255,255,255,.72); font-size: 14.5px; font-weight: 600;
  position: relative; margin-bottom: 2px; white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}
.nav-link .ico { width: 20px; height: 20px; flex-shrink: 0; opacity: .85; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: rgba(255,255,255,.1); color: #fff; }
.nav-link.active::before {
  content: ""; position: absolute; left: -18px; top: 8px; bottom: 8px; width: 3px;
  background: var(--gold-400); border-radius: 0 4px 4px 0;
}
.nav-link .badge {
  margin-left: auto; background: var(--gold-400); color: var(--navy-900);
  font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px;
}
.sidebar-spacer { flex: 1; }
.sidebar-foot {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; margin-top: 10px;
}
.mini-profile { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; }
.mini-profile:hover { background: rgba(255,255,255,.06); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; color: var(--navy-900); font-size: 15px;
}
.mini-profile .who { line-height: 1.25; white-space: nowrap; overflow: hidden; }
.mini-profile .who strong { display: block; font-size: 13.5px; color: #fff; }
.mini-profile .who span { font-size: 11.5px; color: rgba(255,255,255,.5); }
.sidebar-collapse-btn {
  width: 100%; margin-top: 14px; background: transparent; border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.6); border-radius: 10px; padding: 8px; font-size: 12px; display:flex; align-items:center; justify-content:center; gap:8px;
}
.sidebar-collapse-btn:hover { color: #fff; border-color: rgba(255,255,255,.3); }

body.sidebar-collapsed .brand-name,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-link span:not(.badge),
body.sidebar-collapsed .mini-profile .who,
body.sidebar-collapsed .sidebar-collapse-btn span { display: none; }
body.sidebar-collapsed .nav-link { justify-content: center; }
body.sidebar-collapsed .nav-link .badge { position: absolute; top: 4px; right: 4px; margin: 0; }
body.sidebar-collapsed .brand { justify-content: center; }
body.sidebar-collapsed .mini-profile { justify-content: center; }

/* ---------- Main / topbar ---------- */
.main { min-width: 0; }
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 36px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(250,249,245,.85); backdrop-filter: blur(10px); z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.hamburger { display: none; background: none; border: none; }
.page-eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 700; }
.page-title { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--navy-900); margin-top: 1px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-strong);
  background: var(--surface); display: flex; align-items: center; justify-content: center;
  position: relative; transition: border-color .15s, transform .15s;
}
.icon-btn:hover { border-color: var(--navy-700); transform: translateY(-1px); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-500); border: 2px solid var(--paper); }
.topbar-profile { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); }
.topbar-profile .avatar { width: 32px; height: 32px; font-size: 13px; }
.topbar-profile span { font-size: 13.5px; font-weight: 700; color: var(--navy-900); }

.view-wrap { padding: 34px 36px 80px; max-width: 1280px; }
.view { display: none; animation: rise .45s cubic-bezier(.22,1,.36,1) both; }
.view.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.stagger > * { animation: rise .5s cubic-bezier(.22,1,.36,1) both; }
.stagger > *:nth-child(1){animation-delay:.02s}.stagger > *:nth-child(2){animation-delay:.07s}
.stagger > *:nth-child(3){animation-delay:.12s}.stagger > *:nth-child(4){animation-delay:.17s}
.stagger > *:nth-child(5){animation-delay:.22s}.stagger > *:nth-child(6){animation-delay:.27s}

/* ---------- Primitives ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}
.eyebrow { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; font-weight: 800; color: var(--ink-faint); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 44px 0 18px; }
.section-head:first-child { margin-top: 0; }
.section-head h2 { font-family: var(--font-display); font-size: 21px; font-weight: 600; color: var(--navy-900); margin: 0; }
.link-more { font-size: 13px; font-weight: 700; color: var(--navy-700); display:flex; align-items:center; gap:4px; }
.link-more:hover { color: var(--gold-600); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; padding: 12px 20px; font-size: 14px; font-weight: 700;
  border: 1px solid transparent; transition: all .16s ease; white-space: nowrap;
}
.btn-primary { background: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-900); transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(0,32,104,.5); }
.btn-gold { background: linear-gradient(135deg, var(--gold-500), var(--gold-400)); color: var(--navy-900); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(197,160,89,.6); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--navy-900); }
.btn-ghost:hover { border-color: var(--navy-700); background: var(--paper-dim); }
.btn-sm { padding: 8px 14px; font-size: 12.5px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn svg { width: 16px; height: 16px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .02em; border: 1px solid transparent;
}
.chip-warning { background: var(--warning-bg); color: var(--warning); }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-success { background: var(--success-bg); color: var(--success); }
.chip-danger { background: var(--danger-bg); color: var(--danger); }
.chip-neutral { background: var(--surface-sunken); color: var(--ink-soft); border-color: var(--line); }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.mono { font-family: var(--font-mono); letter-spacing: .01em; }

/* ---------- Dashboard hero ---------- */
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: stretch; }
.account-hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 34px 36px;
  background: radial-gradient(120% 140% at 100% 0%, #123a9e 0%, var(--navy-800) 42%, var(--navy-900) 100%);
  color: #fff; box-shadow: var(--shadow-pop);
}
.account-hero::before {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08); top: -220px; right: -140px;
}
.account-hero::after {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.22), transparent 70%); bottom: -140px; left: -80px;
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 2; }
.hero-top .eyebrow { color: rgba(255,255,255,.55); }
.account-select { position: relative; z-index: 2; margin-top: 4px; }
.account-select select {
  appearance: none; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  color: #fff; padding: 8px 34px 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 700; font-family: var(--font-ui);
}
.balance-row { display: flex; align-items: baseline; gap: 14px; margin-top: 18px; position: relative; z-index: 2; }
.balance-value { font-family: var(--font-display); font-size: 44px; font-weight: 600; letter-spacing: -.01em; }
.balance-value.blurred { filter: blur(9px); user-select: none; }
.eye-toggle {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); width: 38px; height: 38px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff;
}
.eye-toggle:hover { background: rgba(255,255,255,.18); }
.hero-meta { display: flex; gap: 34px; margin-top: 26px; position: relative; z-index: 2; }
.hero-meta div span { display: block; font-size: 11px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.hero-meta div strong { font-family: var(--font-mono); font-size: 14.5px; font-weight: 500; }
.hero-actions { display: flex; gap: 10px; margin-top: 28px; position: relative; z-index: 2; flex-wrap: wrap; }
.hero-actions .btn-ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.22); color: #fff; }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,.14); }

.eligibility-card {
  border-radius: 26px; padding: 30px 30px 26px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--gold-100) 0%, #fff 55%);
  border: 1px solid var(--gold-100);
  display: flex; flex-direction: column; justify-content: space-between;
}
.eligibility-card .stamp {
  position: absolute; top: 18px; right: 18px; font-family: var(--font-display); font-style: italic; font-size: 11.5px;
  color: var(--gold-600); border: 1px solid var(--gold-500); border-radius: 999px; padding: 4px 12px; transform: rotate(4deg);
}
.eligibility-card .amount { font-family: var(--font-display); font-size: 34px; color: var(--navy-900); font-weight: 600; margin: 10px 0 4px; }
.eligibility-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 18px; }

/* ---------- Bento quick actions ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.bento-item {
  padding: 22px 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 30px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.bento-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-color: var(--line-strong); }
.bento-item .ico-wrap {
  width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--navy-800); color: #fff;
}
.bento-item:nth-child(2) .ico-wrap { background: var(--gold-500); color: var(--navy-900); }
.bento-item:nth-child(3) .ico-wrap { background: var(--info); }
.bento-item:nth-child(4) .ico-wrap { background: var(--success); }
.bento-item strong { font-size: 14.5px; color: var(--navy-900); }
.bento-item small { display: block; font-size: 12px; color: var(--ink-faint); margin-top: 2px; font-weight: 500; }

/* ---------- Lists / rows ---------- */
.demande-row, .doc-row, .notif-row, .relve-row {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); margin-bottom: 10px; transition: border-color .15s, background .15s;
}
.demande-row:hover, .doc-row:hover, .relve-row:hover { border-color: var(--navy-500); }
.row-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--paper-dim); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--navy-800); }
.row-main { flex: 1; min-width: 0; }
.row-main strong { display: block; font-size: 14.5px; color: var(--navy-900); }
.row-main span { font-size: 12.5px; color: var(--ink-faint); }
.progress-track { height: 5px; background: var(--line); border-radius: 999px; margin-top: 8px; width: 220px; max-width: 100%; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--navy-700), var(--gold-500)); border-radius: 999px; }
.row-side { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* ---------- Table-ish list header for Mes demandes ---------- */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.filter-tab {
  padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-soft);
}
.filter-tab.active { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }

/* ---------- Notif dropdown ---------- */
.notif-panel {
  position: fixed; top: 84px; right: 36px; width: 380px; max-height: 70vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-pop);
  padding: 10px; z-index: 60; display: none; flex-direction: column; gap: 6px;
}
.notif-panel.open { display: flex; animation: rise .22s ease both; }
.notif-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 6px; }
.notif-panel-head strong { font-family: var(--font-display); font-size: 16px; color: var(--navy-900); }
.notif-panel-head button { font-size: 12px; font-weight: 700; color: var(--navy-700); background: none; border: none; }
.notif-group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); font-weight: 800; padding: 10px 10px 4px; }
.notif-item { display: flex; gap: 12px; padding: 10px; border-radius: 12px; }
.notif-item:hover { background: var(--paper-dim); }
.notif-item .row-ico { width: 34px; height: 34px; border-radius: 10px; }
.notif-item p { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.4; }
.notif-item time { font-size: 11px; color: var(--ink-faint); }
.notif-item.unread { position: relative; }
.notif-item.unread::before { content:""; position:absolute; left: 2px; top: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); }

/* ---------- Grid of demande types ---------- */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.type-card {
  padding: 26px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 16px; text-align: left; transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative; overflow: hidden;
}
.type-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--navy-700); }
.type-card .ico-wrap { width: 46px; height: 46px; border-radius: 13px; background: var(--navy-800); color: #fff; display:flex; align-items:center; justify-content:center; }
.type-card h3 { font-family: var(--font-display); font-size: 18px; margin: 0; color: var(--navy-900); }
.type-card p { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin: 0; flex: 1; }
.type-card .tag { position: absolute; top: 18px; right: 18px; }

/* ---------- Wizard ---------- */
.wizard-shell { max-width: 880px; }
.stepper { display: flex; align-items: center; margin-bottom: 38px; }
.step { display: flex; align-items: center; gap: 10px; flex: 1; position: relative; }
.step-dot {
  width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--ink-faint);
  flex-shrink: 0; z-index: 2; transition: all .2s;
}
.step-label { font-size: 12.5px; font-weight: 700; color: var(--ink-faint); white-space: nowrap; }
.step::after { content: ""; position: absolute; left: 30px; right: -10px; top: 16px; height: 2px; background: var(--line); z-index: 1; }
.step:last-child::after { display: none; }
.step.done .step-dot { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.step.done::after { background: var(--navy-800); }
.step.current .step-dot { background: var(--gold-500); border-color: var(--gold-500); color: var(--navy-900); box-shadow: 0 0 0 5px var(--gold-100); }
.step.current .step-label, .step.done .step-label { color: var(--navy-900); }

.wizard-panel { display: none; }
.wizard-panel.active { display: block; animation: rise .4s cubic-bezier(.22,1,.36,1) both; }

.field-locked {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 14px; background: var(--surface-sunken); border: 1px solid var(--line); margin-bottom: 10px;
}
.field-locked .fl-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 800; display: block; margin-bottom: 3px; }
.field-locked .fl-value { font-size: 14.5px; font-weight: 700; color: var(--navy-900); }
.field-locked .fl-report { font-size: 11.5px; font-weight: 700; color: var(--navy-700); flex-shrink: 0; }
.field-locked .fl-report:hover { color: var(--gold-600); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.confirm-block { padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 14px; }
.confirm-block .cb-q { font-size: 13.5px; font-weight: 700; color: var(--navy-900); margin-bottom: 10px; }
.toggle-pair { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.toggle-pair button { padding: 8px 18px; font-size: 13px; font-weight: 700; background: var(--surface); color: var(--ink-soft); border: none; }
.toggle-pair button.sel { background: var(--navy-800); color: #fff; }
.reveal { margin-top: 12px; display: none; }
.reveal.open { display: block; }

.auto-detect { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: var(--success-bg); border: 1px solid #cfe9d8; margin-bottom: 10px; }
.auto-detect .row-ico { background: var(--success); color: #fff; }
.auto-detect strong { font-size: 13.5px; color: var(--navy-900); display: block; margin-bottom: 2px; }
.auto-detect span { font-size: 12.5px; color: var(--ink-soft); }

.form-label { font-size: 12px; font-weight: 800; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 8px; }
.form-group { margin-bottom: 22px; }
.text-input, select.text-input {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface);
  font-family: var(--font-ui); font-size: 14.5px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.text-input:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgba(0,51,153,.1); }

.chip-select { display: flex; gap: 10px; flex-wrap: wrap; }
.chip-option { padding: 10px 18px; border-radius: 12px; border: 1.5px solid var(--line-strong); font-size: 13.5px; font-weight: 700; color: var(--ink-soft); background: var(--surface); }
.chip-option.sel { border-color: var(--navy-800); background: var(--navy-800); color: #fff; }

.range-block { padding: 22px; border-radius: 16px; background: var(--paper-dim); border: 1px solid var(--line); }
.range-value { font-family: var(--font-display); font-size: 30px; color: var(--navy-900); font-weight: 600; }
input[type=range] { width: 100%; accent-color: var(--navy-800); margin-top: 14px; }
.range-caps { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-faint); font-family: var(--font-mono); margin-top: 4px; }

.sim-result-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-top: 18px; }
.sim-result { padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.sim-result span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 800; }
.sim-result strong { display: block; font-family: var(--font-display); font-size: 21px; color: var(--navy-900); margin-top: 6px; }

.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: 16px; padding: 30px; text-align: center; background: var(--paper-dim);
  transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--navy-700); background: #fff; }
.dropzone svg { margin: 0 auto 10px; color: var(--navy-700); }
.dropzone p { margin: 0; font-size: 13.5px; color: var(--ink-soft); }
.dropzone small { color: var(--ink-faint); }
.file-chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 12px; background: var(--success-bg); color: var(--success); border-radius: 10px; font-size: 12.5px; font-weight: 700; }

.recap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.recap-item { padding: 15px 18px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.recap-item:nth-child(2n) { border-right: none; }
.recap-item span { display: block; font-size: 11px; text-transform: uppercase; color: var(--ink-faint); font-weight: 800; letter-spacing: .06em; margin-bottom: 4px; }
.recap-item strong { font-size: 14px; color: var(--navy-900); }

.sign-pad {
  border: 1.5px solid var(--line-strong); border-radius: 16px; padding: 30px; text-align: center; background: var(--surface); margin-top: 18px;
}
.sign-pad .sign-name { font-family: 'Fraunces', serif; font-style: italic; font-size: 32px; color: var(--navy-800); opacity: 0; transition: opacity .5s ease; }
.sign-pad.signed .sign-name { opacity: 1; }
.sign-pad small { display: block; margin-top: 10px; color: var(--ink-faint); font-size: 11.5px; }

.wizard-nav { display: flex; justify-content: space-between; margin-top: 30px; }

.success-screen { text-align: center; padding: 50px 20px 20px; }
.success-badge { width: 84px; height: 84px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; }
.success-screen h2 { font-family: var(--font-display); font-size: 26px; color: var(--navy-900); margin: 0 0 10px; }
.success-screen p { color: var(--ink-soft); font-size: 14.5px; max-width: 420px; margin: 0 auto 22px; }
.ticket-pill { display: inline-block; padding: 10px 22px; background: var(--paper-dim); border: 1px dashed var(--line-strong); border-radius: 12px; font-family: var(--font-mono); font-weight: 700; color: var(--navy-900); margin-bottom: 26px; }

/* ---------- Documents ---------- */
.doc-row .row-side .doc-expiry { font-size: 11.5px; font-family: var(--font-mono); color: var(--ink-faint); }

/* ---------- RDV ---------- */
.agence-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.agence-card { padding: 18px; border-radius: 16px; border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; }
.agence-card.sel { border-color: var(--navy-800); background: var(--paper-dim); }
.agence-card strong { display: block; font-size: 14px; color: var(--navy-900); }
.agence-card span { font-size: 12px; color: var(--ink-faint); }
.slot-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.slot { padding: 12px; text-align: center; border-radius: 10px; border: 1.5px solid var(--line-strong); font-size: 13px; font-weight: 700; font-family: var(--font-mono); }
.slot.sel { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.slot.taken { opacity: .3; text-decoration: line-through; pointer-events: none; }

/* ---------- Misc ---------- */
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.info-note { display: flex; gap: 12px; padding: 16px 18px; border-radius: 14px; background: var(--info-bg); border: 1px solid #d7e5f8; }
.info-note svg { color: var(--info); flex-shrink: 0; }
.info-note p { margin: 0; font-size: 13px; color: var(--navy-900); line-height: 1.5; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,10,40,.45); backdrop-filter: blur(2px); z-index: 80; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--surface); border-radius: 22px; max-width: 560px; width: 100%; padding: 30px; max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow-pop); animation: rise .3s cubic-bezier(.22,1,.36,1) both; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.modal-head h3 { font-family: var(--font-display); font-size: 20px; color: var(--navy-900); margin: 0; }
.modal-close { background: var(--paper-dim); border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: none; }
.timeline { border-left: 2px solid var(--line); margin-left: 8px; padding-left: 22px; }
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item::before { content: ""; position: absolute; left: -28px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--line-strong); border: 2px solid var(--surface); }
.timeline-item.done::before { background: var(--success); }
.timeline-item.current::before { background: var(--gold-500); box-shadow: 0 0 0 4px var(--gold-100); }
.timeline-item strong { display: block; font-size: 13.5px; color: var(--navy-900); }
.timeline-item time { font-size: 11.5px; color: var(--ink-faint); font-family: var(--font-mono); }

.mobile-nav-toggle { display: none; }

/* ---------- Footer credit ---------- */
.footer-note { margin-top: 60px; padding: 22px 0 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-note span { font-size: 12px; color: var(--ink-faint); }
.footer-note .proto-mark { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); border: 1px solid var(--line-strong); padding: 4px 10px; border-radius: 999px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: repeat(2,1fr); }
  .type-grid { grid-template-columns: repeat(2,1fr); }
  .sim-result-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .recap-grid { grid-template-columns: 1fr; }
  .recap-item { border-right: none !important; }
}
@media (max-width: 768px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; width: 260px; transform: translateX(-100%);
    transition: transform .25s ease; box-shadow: 0 0 0 100vmax rgba(0,10,40,0);
  }
  body.mobile-nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(0,10,40,.45); }
  .hamburger { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
  .topbar { padding: 0 16px; }
  .view-wrap { padding: 22px 16px 60px; }
  .bento { grid-template-columns: 1fr 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  .field-grid { grid-template-columns: 1fr; }
  .agence-list { grid-template-columns: 1fr; }
  .slot-grid { grid-template-columns: repeat(2,1fr); }
  .balance-value { font-size: 32px; }
  .notif-panel { right: 12px; left: 12px; width: auto; top: 78px; }
  .topbar-profile span { display: none; }
}
