/* ═══════════════════════════════════════════════════════════════
   Sylamtech B2B — Portail Partenaires · Design System
   Direction : fintech B2B de confiance (Qonto / Mercury / Ramp)
   Fonts : Clash Display (display) · Satoshi (UI) · JetBrains Mono (chiffres)
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Marque Sylamtech */
  --blue:        #1F5CA4;
  --blue-light:  #4A82C7;
  --blue-dark:   #154277;
  --navy:        #0D2F58;
  --navy-deep:   #071A33;

  /* Surfaces */
  --bg:          #F4F7FB;
  --surface:     #FFFFFF;
  --surface-2:   #FAFCFE;
  --border:      #E3EAF3;
  --border-2:    #EEF3F9;

  /* Texte — text-3 conforme WCAG AA sur fond blanc (≥ 4,5:1) */
  --text:        #0E1B2E;
  --text-2:      #55617A;
  --text-3:      #5F6E88;

  /* Sémantique */
  --success:     #15925A;  --success-bg: #E4F6EC;  --success-bd: #B8E6CC;
  --warning:     #C77A0A;  --warning-bg: #FDF2DD;  --warning-bd: #F3DCA6;
  --danger:      #D23B3B;  --danger-bg:  #FCE9E9;  --danger-bd:  #F3C4C4;
  --info:        #2563EB;  --info-bg:    #E7EFFE;

  /* Effets */
  --shadow-sm: 0 1px 2px rgba(14,27,46,.05), 0 1px 3px rgba(14,27,46,.04);
  --shadow:    0 2px 4px rgba(14,27,46,.04), 0 8px 24px -10px rgba(14,27,46,.12);
  --shadow-lg: 0 12px 32px -8px rgba(14,27,46,.14), 0 4px 8px rgba(14,27,46,.05);
  --shadow-blue: 0 8px 22px -6px rgba(31,92,164,.45);

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --sidebar-w: 264px;
  --ease: cubic-bezier(.16,1,.3,1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Satoshi', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 { font-family: 'Clash Display', 'Satoshi', sans-serif; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; color: var(--text); }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* Chiffres financiers — signature du produit */
.mono, .figure { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #CBD5E4; border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #AAB7CB; }

/* ═══════════════════════ APP SHELL ═══════════════════════ */
.app { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff; position: fixed; inset: 0 auto 0 0; height: 100vh;
  display: flex; flex-direction: column;
  z-index: 40;
}
.sidebar-brand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  padding: 24px 22px 18px; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand .brand-logo { height: 30px; width: auto; display: block; }
.sidebar-brand .brand-sub {
  font-family: 'Satoshi'; font-weight: 600; font-size: 10px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--blue-light);
  padding-left: 2px;
}

.sidebar-nav { flex: 1; padding: 18px 14px; overflow-y: auto; }
.nav-label { font-size: 10.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(255,255,255,.38); padding: 0 12px; margin: 18px 0 8px; }
.nav-label:first-child { margin-top: 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 10px;
  color: rgba(255,255,255,.72); font-weight: 500; font-size: 14.5px;
  transition: background .18s var(--ease), color .18s var(--ease);
  position: relative; margin-bottom: 2px;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; stroke-width: 1.9; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: rgba(74,130,199,.22); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%); width: 3px; height: 22px; background: var(--blue-light); border-radius: 0 3px 3px 0; }
/* Pastille de compteur — classe autonome (sidebar ET topbar) */
.badge-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; line-height: 1;
  background: var(--blue); color: #fff; font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 99px; font-family: 'JetBrains Mono';
}
.nav-item .badge-count { margin-left: auto; }

.sidebar-user {
  padding: 14px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; gap: 11px;
}
.sidebar-user .avatar {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #3E6DAE, #24507F);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff;
}
.sidebar-user .info { flex: 1; min-width: 0; }
.sidebar-user .info strong { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .info span { display: block; font-size: 11.5px; color: rgba(255,255,255,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .logout { color: rgba(255,255,255,.55); padding: 6px; border-radius: 8px; transition: .15s; }
.sidebar-user .logout:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ── Main ── */
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
.topbar {
  height: 72px; background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px) saturate(180%); -webkit-backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; position: sticky; top: 0; z-index: 30;
}
.topbar .crumb { font-size: 13px; color: var(--text-3); font-weight: 500; }
.topbar h1 { font-size: 22px; margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; position: relative;
  transition: .15s;
}
.icon-btn:hover { border-color: var(--blue-light); color: var(--blue); }
.icon-btn svg { width: 19px; height: 19px; stroke-width: 1.9; }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }

.content { padding: 32px; max-width: 1180px; }

/* ═══════════════════════ COMPONENTS ═══════════════════════ */

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border-2); }
.card-head h3 { font-size: 16.5px; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-sm); font-weight: 600; font-size: 14.5px;
  transition: transform .15s var(--ease), box-shadow .2s, background .18s, border-color .18s;
  white-space: nowrap; border: 1.5px solid transparent;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2; }
.btn-primary { background: linear-gradient(180deg, #2A69B5 0%, var(--blue) 55%, #1B528F 100%); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), var(--shadow-blue); }
.btn-primary:hover { background: linear-gradient(180deg, #245C9F, var(--blue-dark)); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 12px 26px -6px rgba(31,92,164,.55); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--blue-light); color: var(--blue); background: var(--surface-2); }
.btn-soft { background: var(--info-bg); color: var(--blue); }
.btn-soft:hover { background: #D8E6FD; }
.btn-lg { padding: 14px 26px; font-size: 15.5px; }
.btn-block { width: 100%; }
.btn-danger-ghost { background: var(--surface); color: var(--danger); border-color: var(--danger-bd); }
.btn-danger-ghost:hover { background: var(--danger-bg); }

/* Badges / statuts */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-bg); color: var(--success); border-color: var(--success-bd); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-bd); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-bd); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-neutral { background: #EEF2F7; color: var(--text-2); }
.badge-gray    { background: #EEF2F7; color: var(--text-2); }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat .stat-ico { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.stat .stat-ico svg { width: 20px; height: 20px; stroke-width: 2; }
.stat-ico.b { background: var(--info-bg); color: var(--blue); }
.stat-ico.g { background: var(--success-bg); color: var(--success); }
.stat-ico.a { background: var(--warning-bg); color: var(--warning); }
.stat .label { font-size: 13px; color: var(--text-3); font-weight: 500; }
.stat .value { font-size: 27px; font-weight: 700; margin-top: 3px; letter-spacing: -0.02em; }
.stat .value .cur { font-size: 15px; color: var(--text-3); font-weight: 500; }
.stat .trend { font-size: 12.5px; margin-top: 8px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.trend.up { color: var(--success); } .trend.down { color: var(--danger); } .trend.flat { color: var(--text-3); }

/* Credit gauge — pièce maîtresse du dashboard */
.credit-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue-dark) 60%, var(--blue) 130%);
  color: #fff; border-radius: var(--r-xl); padding: 28px 30px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.credit-card::before { content:""; position:absolute; inset:0; background: radial-gradient(600px 300px at 100% 0%, rgba(93,180,255,.22), transparent 60%); pointer-events:none; }
.credit-card::after { content:""; position:absolute; right:-40px; bottom:-60px; width:220px; height:220px; border-radius:50%; border:1.5px solid rgba(255,255,255,.08); }
.credit-card .cc-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.credit-card .cc-label { font-size: 12.5px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.6); font-weight: 600; }
.credit-card .cc-amount { font-size: 38px; font-weight: 700; margin-top: 6px; letter-spacing: -.02em; }
.credit-card .cc-amount .cur { font-size: 18px; color: rgba(255,255,255,.65); font-weight: 500; margin-left: 4px; }
.credit-card .cc-chip { background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.18); padding: 6px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 600; backdrop-filter: blur(4px); }
.gauge { margin-top: 24px; position: relative; }
.gauge-track { height: 12px; background: rgba(255,255,255,.15); border-radius: 99px; overflow: hidden; }
.gauge-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6FB4FF, #B9D9FF); box-shadow: 0 0 16px rgba(111,180,255,.5); transition: width 1s var(--ease); }
.gauge-legend { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; }
.gauge-legend .used { color: rgba(255,255,255,.72); }
.gauge-legend .used b, .gauge-legend .avail b { font-family: 'JetBrains Mono'; font-variant-numeric: tabular-nums; }
.gauge-legend .avail { color: #fff; font-weight: 600; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; }
table.data th {
  text-align: left; font-size: 11.5px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--text-3); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border);
  white-space: nowrap; background: var(--surface-2);
}
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--border-2); font-size: 14px; vertical-align: middle; }
/* Alignement premium : la 1re/dernière colonne s'aligne sur le padding des cartes (24px) */
table.data th:first-child, table.data td:first-child { padding-left: 24px; }
table.data th:last-child,  table.data td:last-child  { padding-right: 24px; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data .ref { font-family: 'JetBrains Mono'; font-size: 13px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
table.data .amt { font-family: 'JetBrains Mono'; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }

/* La colonne texte libre garde une largeur de lecture (les colonnes chiffrées sont en nowrap) */
table.data td[data-th="Objet"] { min-width: 150px; }

/* Tableau financier KYC : 8 colonnes compactes, sans débordement */
table.data.fin-table th { white-space: normal; font-size: 10.5px; padding: 10px 8px; line-height: 1.3; }
table.data.fin-table td { padding: 8px 6px; }
table.data.fin-table .input { min-width: 0; width: 100%; padding: 9px 8px; font-size: 13px; }

/* Forms */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.field label .req { color: var(--danger); }
.field .hint { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.input:hover:not(:disabled):not(:focus), .select:hover:not(:disabled):not(:focus), .textarea:hover:not(:disabled):not(:focus) { border-color: #C7D4E6; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,92,164,.12); }
.input::placeholder, .textarea::placeholder { color: #98A3B8; }
/* Champs verrouillés : lisiblement non éditables */
.input:disabled, .select:disabled, .textarea:disabled, .input[readonly] {
  background: #F0F4F9; color: var(--text-2); border-color: var(--border-2); cursor: not-allowed;
}
.textarea { resize: vertical; min-height: 100px; }
.input-group { position: relative; }
.input-group .suffix { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 14px; font-weight: 600; pointer-events: none; }
.input-group .input { padding-right: 56px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }

/* File dropzone */
.dropzone {
  border: 1.6px dashed var(--border); border-radius: var(--r); padding: 26px; text-align: center;
  background: var(--surface-2); transition: .18s; cursor: pointer;
}
.dropzone:hover { border-color: var(--blue-light); background: var(--info-bg); }
.dropzone svg { width: 30px; height: 30px; color: var(--blue); stroke-width: 1.7; margin-bottom: 8px; }
.dropzone .dz-title { font-weight: 600; font-size: 14px; }
.dropzone .dz-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }

/* Timeline (suivi demande) */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content:""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .dot { position: absolute; left: -30px; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; }
.tl-item .dot svg { width: 11px; height: 11px; stroke-width: 3; }
.tl-item.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.tl-item.current .dot { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 0 0 4px rgba(31,92,164,.15); }
.tl-item .tl-title { font-weight: 600; font-size: 14px; }
.tl-item .tl-meta { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* Section helpers */
.page-actions { display: flex; align-items: center; gap: 12px; }
.mt-0{margin-top:0}.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}.mt-4{margin-top:32px}
.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.row { display:flex; align-items:center; gap:12px; }
.between { justify-content: space-between; }
.muted { color: var(--text-3); }
/* Titre de section unifié : même voix que les titres de cartes (Clash Display),
   pour ne plus le confondre avec les en-têtes de colonnes de tables */
.section-title { font-family: 'Clash Display', 'Satoshi', sans-serif; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; text-transform: none; color: var(--text); margin-bottom: 14px; }

/* ═══════════════════════ AUTH (login / inscription) ═══════════════════════ */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-brand {
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 45%, var(--blue-dark) 100%);
  color: #fff; padding: 48px 56px; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.auth-brand::before { content:""; position:absolute; inset:0; background: radial-gradient(700px 400px at 90% 10%, rgba(74,130,199,.28), transparent 60%), radial-gradient(500px 400px at 0% 100%, rgba(31,92,164,.25), transparent 60%); }
.auth-brand::after { content:""; position:absolute; inset:0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 46px 46px; mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: 12px; }
.auth-logo .mark { width: 42px; height: 42px; border-radius: 11px; background: linear-gradient(135deg, var(--blue-light), var(--blue)); display: flex; align-items: center; justify-content: center; font-family: 'Clash Display'; font-weight: 700; font-size: 21px; box-shadow: 0 6px 16px rgba(31,92,164,.5); }
.auth-logo .name { font-family: 'Clash Display'; font-weight: 600; font-size: 18px; }
.auth-logo .name small { display: block; font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--blue-light); font-family: 'Satoshi'; font-weight: 500; }
.auth-hero { margin-top: auto; margin-bottom: auto; max-width: 460px; }
.auth-eyebrow { display: inline-flex; align-items:center; gap:8px; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--blue-light); font-weight: 600; margin-bottom: 20px; }
.auth-eyebrow::before { content:""; width:26px; height:1.5px; background: var(--blue-light); }
.auth-hero h1 { font-size: 40px; line-height: 1.08; color: #fff; letter-spacing: -.02em; }
.auth-hero p { color: rgba(255,255,255,.72); font-size: 16px; margin-top: 18px; line-height: 1.6; }
.auth-feats { margin-top: 34px; display: flex; flex-direction: column; gap: 14px; }
.auth-feat { display: flex; align-items: center; gap: 13px; font-size: 14.5px; color: rgba(255,255,255,.9); }
.auth-feat .fi { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-feat .fi svg { width: 17px; height: 17px; stroke-width: 2; color: var(--blue-light); }
.auth-brand-foot { font-size: 12.5px; color: rgba(255,255,255,.45); }

.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 48px; background: var(--surface); }
.auth-form { width: 100%; max-width: 400px; }
.auth-form h2 { font-size: 27px; }
.auth-form .lead { color: var(--text-2); margin-top: 8px; margin-bottom: 30px; font-size: 15px; }
.auth-alt { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-2); }
.auth-alt a { color: var(--blue); font-weight: 600; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.checkbox-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--blue); flex-shrink: 0; }
.field-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.field-row a { font-size: 12.5px; color: var(--blue); font-weight: 600; }

/* Steps (inscription) */
.steps { display: flex; gap: 8px; margin-bottom: 30px; }
.step { flex: 1; }
.step .bar { height: 4px; border-radius: 99px; background: var(--border); transition: background .3s; }
.step.active .bar, .step.done .bar { background: var(--blue); }
.step .st-label { font-size: 11.5px; color: var(--text-3); margin-top: 8px; font-weight: 500; }
.step.active .st-label { color: var(--blue); font-weight: 600; }
.step.done .st-label { color: var(--text-2); }

/* Toast (démo submit) */
.toast {
  position: fixed; bottom: 28px; right: 28px; z-index: 100;
  background: var(--navy); color: #fff; padding: 15px 20px; border-radius: var(--r);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px;
  transform: translateY(120%); opacity: 0; transition: all .4s var(--ease); max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast .ti { width: 34px; height: 34px; border-radius: 9px; background: var(--success); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.toast .ti svg { width: 18px; height: 18px; stroke-width: 2.5; }
.toast strong { display: block; font-size: 14px; }
.toast span { font-size: 12.5px; color: rgba(255,255,255,.7); }

/* Empty / info banner */
.banner { display: flex; gap: 13px; padding: 15px 18px; border-radius: var(--r); background: var(--info-bg); border: 1px solid #D3E2FB; font-size: 13.5px; color: var(--blue-dark); }
.banner svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--blue); stroke-width: 2; }

/* Animations */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.rise { animation: rise .5s var(--ease) both; }
.d1{animation-delay:.05s}.d2{animation-delay:.12s}.d3{animation-delay:.19s}.d4{animation-delay:.26s}.d5{animation-delay:.33s}

/* Responsive */
@media (max-width: 1000px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .3s var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .content { padding: 20px 16px; }

  /* Topbar compacte : une seule ligne, rien ne déborde */
  .topbar { padding: 0 14px; height: 60px; gap: 10px; }
  .topbar .crumb { display: none; }
  .topbar h1 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
  .topbar .btn .btn-txt { display: none; }         /* CTA réduit à son icône */
  .topbar .btn { padding: 10px 12px; }
  .mobile-toggle { display: flex !important; }
}
.mobile-toggle { display: none; }

/* Voile derrière le menu mobile */
.scrim { position: fixed; inset: 0; background: rgba(7,26,51,.55); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
body.nav-open .scrim { opacity: 1; pointer-events: auto; }

/* Segmented control (type de demande) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 6px; margin-bottom: 22px; }
.seg-opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px 15px; border-radius: var(--r-sm); cursor: pointer; border: 1.5px solid transparent; transition: .16s; background: transparent; }
.seg-opt:hover { background: var(--surface); }
.seg-opt.on { background: var(--surface); border-color: var(--blue); box-shadow: 0 2px 8px rgba(31,92,164,.1); }
.seg-opt .seg-ico { width: 34px; height: 34px; border-radius: 9px; background: var(--info-bg); color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.seg-opt .seg-ico svg { width: 18px; height: 18px; stroke-width: 2; }
.seg-opt.on .seg-ico { background: var(--blue); color: #fff; }
.seg-opt .seg-txt strong { display: block; font-size: 14px; font-weight: 600; }
.seg-opt .seg-txt span { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; line-height: 1.4; }
.seg-body { display: none; }
.seg-body.on { display: block; animation: rise .35s var(--ease) both; }
@media (max-width:560px){ .seg { grid-template-columns: 1fr; } }
/* Type badge dans les listes */
.type-tag { display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:600; padding:2px 9px; border-radius:99px; background:#EEF2F7; color:var(--text-2); white-space:nowrap; }
.type-tag.augmentation { background:#E8F0F9; color:var(--navy); border:1px solid #CDDCEE; }
.type-tag.ouverture { background:var(--info-bg); color:var(--blue); }

/* ═══ Auth v2 : fond hero datacenter + logo réel + OTP (inspiré sylamtechgroup.com) ═══ */
.auth-brand{
  background:
    linear-gradient(155deg, rgba(7,26,51,.93) 0%, rgba(13,47,88,.85) 48%, rgba(21,66,119,.80) 100%),
    url('images/hero-datacenter-poster.webp') center/cover no-repeat,
    var(--navy-deep);
}
/* Logo réel Sylamtech sur le côté clair du formulaire */
.auth-brandmark{ margin-bottom: 30px; }
.auth-brandmark img{ height: 52px; width: auto; display: block; }
/* Logo blanc (côté sombre) : on garde le wordmark texte, lisible sur navy */

/* OTP — champs à 6 chiffres */
.otp-inputs{ display: flex; gap: 10px; margin: 6px 0 4px; }
.otp-inputs input{
  width: 100%; height: 58px; max-width: 56px; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: 24px; font-weight: 700;
  border: 1.5px solid var(--border); border-radius: 12px; color: var(--text);
  background: var(--surface); transition: border-color .15s, box-shadow .15s, background .15s;
}
.otp-inputs input:focus{ outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31,92,164,.12); }
.otp-inputs input.filled{ border-color: var(--blue); background: var(--info-bg); }
@media (max-width:400px){ .otp-inputs input{ height: 48px; font-size: 20px; } }

/* Étapes auth (credentials → OTP) */
.auth-step{ display: none; }
.auth-step.active{ display: block; animation: rise .4s var(--ease) both; }
.otp-target{ color: var(--text); font-weight: 600; }
.otp-resend{ font-size: 13px; color: var(--text-2); text-align: center; margin-top: 18px; }
.otp-resend a{ color: var(--blue); font-weight: 600; }
.otp-back{ display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 600; margin-bottom: 18px; cursor: pointer; }
.otp-back:hover{ color: var(--blue); }
.otp-back svg{ width: 15px; height: 15px; stroke-width: 2.4; }

/* Logo blanc réel sur le panneau sombre auth */
.auth-logo{ flex-direction: column; align-items: flex-start; gap: 10px; }
.auth-logo img.logo-white{ height: 46px; width: auto; display: block; }
.auth-logo .auth-logo-sub{ font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--blue-light); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   B2 — Composants auth Laravel (banners colorés, erreurs, statut)
   ═══════════════════════════════════════════════════════════════ */

/* Variantes de banner */
.banner-success{ background: var(--success-bg); border-color: var(--success-bd); color: var(--success); }
.banner-success svg{ color: var(--success); }
.banner-danger{ background: var(--danger-bg); border-color: var(--danger-bd); color: var(--danger); }
.banner-danger svg{ color: var(--danger); }
.banner-warning{ background: var(--warning-bg); border-color: var(--warning-bd); color: var(--warning); }
.banner-warning svg{ color: var(--warning); }

/* Case à cocher (rester connecté / CGU) */
.check-row{ display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--text-2); cursor: pointer; line-height: 1.5; margin-top: 14px; }
.check-row input[type=checkbox]{ width: 17px; height: 17px; margin-top: 1px; accent-color: var(--blue); flex-shrink: 0; cursor: pointer; }
.check-row a{ color: var(--blue); font-weight: 600; }

/* Bouton stylé en lien (renvoyer le code) */
.link-btn{ background: none; border: 0; padding: 0; font: inherit; color: var(--blue); font-weight: 600; cursor: pointer; }
.link-btn:hover{ text-decoration: underline; }
.link-btn:disabled{ color: var(--text-3); cursor: default; text-decoration: none; }

/* Erreurs de champ */
.input.is-invalid, .select.is-invalid{ border-color: var(--danger-bd); background: var(--danger-bg); }
small.err{ display: block; margin-top: 5px; font-size: 12.5px; color: var(--danger); font-weight: 500; }

/* ── Page statut (en attente / suspendu / refusé) ── */
.status-page{ min-height: 100vh; margin: 0; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, #0d2f58 0%, var(--navy-deep) 60%); font-family: 'Satoshi', sans-serif; }
.status-card{ background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  max-width: 480px; width: 100%; padding: 40px 38px; text-align: center; }
.status-logo{ height: 32px; margin-bottom: 26px; }
.status-ico{ width: 62px; height: 62px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.status-ico svg{ width: 30px; height: 30px; stroke-width: 2; }
.status-ico.warning{ background: var(--warning-bg); color: var(--warning); }
.status-ico.gray{ background: #EEF2F7; color: var(--text-2); }
.status-ico.danger{ background: var(--danger-bg); color: var(--danger); }
.status-card h1{ font-family: 'Clash Display', sans-serif; font-size: 23px; color: var(--text); margin: 0 0 10px; }
.status-card p{ color: var(--text-2); font-size: 14.5px; line-height: 1.65; margin: 0 0 22px; }
.status-meta{ background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 16px; margin-bottom: 24px; display: flex; flex-direction: column; gap: 2px; }
.status-meta strong{ color: var(--text); font-size: 14.5px; }
.status-meta span{ color: var(--text-3); font-size: 13px; }
.status-actions{ display: flex; gap: 10px; justify-content: center; }
.status-actions form{ margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   B8 — Refonte auth : mot de passe, assistant, récap, confiance
   ═══════════════════════════════════════════════════════════════ */

/* Sous-titre sous le logo du formulaire + bandeau de confiance */
.auth-brandmark{ display:flex; flex-direction:column; align-items:flex-start; gap:4px; }
.auth-brandmark-sub{ font-size:11px; letter-spacing:1.6px; text-transform:uppercase; color:var(--text-3); font-weight:600; }
.auth-trust{ display:flex; align-items:center; gap:8px; margin-top:26px; padding-top:16px; border-top:1px solid var(--border-2); font-size:12px; color:var(--text-3); line-height:1.4; }
.auth-trust svg{ width:15px; height:15px; color:var(--success); flex-shrink:0; }

/* Formulaire large (assistant d'inscription) */
.auth-form.auth-form-wide{ max-width:560px; }

/* Champ mot de passe : afficher / masquer */
.pw-wrap{ position:relative; }
.pw-wrap .input{ padding-right:44px; }
.pw-toggle{ position:absolute; right:6px; top:50%; transform:translateY(-50%); width:34px; height:34px; display:flex; align-items:center; justify-content:center; background:none; border:0; color:var(--text-3); cursor:pointer; border-radius:8px; }
.pw-toggle:hover{ color:var(--blue); background:var(--surface-2); }
.pw-toggle svg{ width:19px; height:19px; }
.pw-toggle.on{ color:var(--blue); }

/* Jauge de robustesse + aide */
.pw-meter{ height:4px; border-radius:99px; background:var(--border); margin-top:8px; overflow:hidden; }
.pw-meter span{ display:block; height:100%; width:0; background:var(--danger); border-radius:99px; transition:width .25s var(--ease), background .25s; }
.pw-hint{ display:block; margin-top:6px; font-size:12px; color:var(--text-3); line-height:1.45; }

/* Honeypot anti-bot */
.hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

/* L'attribut hidden doit toujours l'emporter (ex. message « mots de passe » masqué par défaut) */
[hidden]{ display:none !important; }

/* Bouton en chargement */
.btn.is-loading{ position:relative; color:transparent !important; pointer-events:none; opacity:.9; }
.btn.is-loading svg{ opacity:0; }
.btn.is-loading::after{ content:""; position:absolute; top:50%; left:50%; width:18px; height:18px; margin:-9px 0 0 -9px; border:2px solid rgba(255,255,255,.5); border-top-color:#fff; border-radius:50%; animation:btnspin .6s linear infinite; }
.btn-ghost.is-loading::after{ border-color:rgba(31,92,164,.3); border-top-color:var(--blue); }
@keyframes btnspin{ to{ transform:rotate(360deg); } }

/* Assistant : barre de progression */
.wz-steps{ display:flex; gap:8px; margin-bottom:26px; }
.wz-tab{ flex:1; display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--text-3); padding-bottom:10px; border-bottom:2px solid var(--border); transition:.2s; white-space:nowrap; }
.wz-tab .wz-num{ width:22px; height:22px; border-radius:50%; background:var(--border); color:var(--text-2); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex-shrink:0; transition:.2s; }
.wz-tab.active{ color:var(--blue); border-bottom-color:var(--blue); }
.wz-tab.active .wz-num{ background:var(--blue); color:#fff; }
.wz-tab.done{ color:var(--success); border-bottom-color:var(--success); cursor:pointer; }
.wz-tab.done .wz-num{ background:var(--success); color:#fff; }

/* Assistant : étapes */
.wz-step{ display:none; animation:rise .35s var(--ease) both; }
.wz-step.active{ display:block; }
.wz-nav{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:22px; }
.wz-nav .btn{ min-width:120px; }

/* Récapitulatif */
.recap{ border:1px solid var(--border); border-radius:var(--r); overflow:hidden; }
.recap-row{ display:flex; justify-content:space-between; gap:16px; padding:11px 16px; font-size:14px; border-bottom:1px solid var(--border-2); }
.recap-row:last-child{ border-bottom:0; }
.recap-row span{ color:var(--text-3); }
.recap-row b{ color:var(--text); text-align:right; }

/* Mobile : formulaire + assistant compacts */
@media (max-width:560px){
  .auth-form-wrap{ padding:28px 20px; }
  .wz-tab{ font-size:0; gap:0; }
  .wz-tab .wz-num{ font-size:12px; }
  .wz-nav .btn{ min-width:0; flex:1; }
}

/* ── Parcours guidé (stepper) ── */
.journey { padding: 22px 24px; }
.journey-top { display:flex; justify-content:space-between; align-items:baseline; gap:14px; flex-wrap:wrap; margin-bottom:22px; }
.journey-top h3 { font-family:'Clash Display'; font-weight:600; font-size:16px; margin:0; }
.journey-top .sub { color:var(--text-3); font-size:12.5px; }
.steps { display:flex; }
.step { flex:1; position:relative; display:flex; flex-direction:column; align-items:center; text-align:center; gap:9px; }
.step:not(:last-child)::after { content:""; position:absolute; top:18px; left:calc(50% + 24px); right:calc(-50% + 24px); height:2px; background:var(--border); }
.step.done:not(:last-child)::after { background:var(--blue-light); }
.step .dot { width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; background:var(--surface-2); border:2px solid var(--border); color:var(--text-3); position:relative; z-index:1; font-family:'JetBrains Mono'; }
.step.done .dot { background:var(--blue); border-color:var(--blue); color:#fff; }
.step.current .dot { background:#fff; border-color:var(--blue); color:var(--blue); box-shadow:0 0 0 4px var(--info-bg); }
.step .dot svg { width:18px; height:18px; stroke-width:2.4; }
.step .stp-label { font-size:12.5px; font-weight:600; color:var(--text-3); max-width:130px; line-height:1.35; }
.step.done .stp-label, .step.current .stp-label { color:var(--text); }
.journey-cta { margin-top:22px; display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:15px 18px; background:var(--info-bg); border:1px solid #D3E2FB; border-radius:var(--r); }
.journey-cta .txt { font-size:14px; color:var(--text); font-weight:500; }
.journey-cta.done { background:var(--success-bg); border-color:var(--success-bd); }
@media (max-width:640px){ .steps{ overflow-x:auto; scrollbar-width:none } .steps::-webkit-scrollbar{ display:none } .step{ min-width:96px } .step .stp-label{ font-size:11px } }

/* ═══════════════ Corrections design 360° (v9) ═══════════════ */

/* Hero crédit : montant adaptatif, jamais coupé ; chip statut inline */
.credit-card .cc-amount { font-size: clamp(24px, 5.2vw, 38px); white-space: nowrap; }
.credit-card .cc-chip { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; flex-shrink: 0; }
@media (max-width:640px){
  .credit-card { padding: 22px 20px; }
  .gauge-legend { flex-direction: column; gap: 4px; }
}

/* Aucun ascenseur horizontal ne doit apparaître sous les tables :
   dès que la place manque (breakpoint relevé à 1080px), elles basculent
   en cartes empilées (cellules étiquetées par data-th). */
@media (max-width:1080px){
  table.data.rwd thead { display: none; }
  table.data.rwd, table.data.rwd tbody, table.data.rwd tr, table.data.rwd td { display: block; width: 100%; }
  table.data.rwd tr { padding: 14px 16px; border-bottom: 1px solid var(--border); }
  table.data.rwd tr:last-child { border-bottom: none; }
  table.data.rwd td { padding: 5px 0; border: none; display: flex; justify-content: space-between; align-items: baseline; gap: 14px; font-size: 13.5px; text-align: right; }
  table.data.rwd td::before { content: attr(data-th); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); font-weight: 600; flex-shrink: 0; text-align: left; }
  table.data.rwd td:not([data-th]) { justify-content: flex-end; }
  table.data.rwd td:not([data-th])::before { content: none; }
  table.data.rwd td[style*="text-align:right"] { text-align: right; }
}

/* Focus clavier visible sur boutons et liens d'action */
.btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible, .link-btn:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}

/* Respect de prefers-reduced-motion */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
