/* ==========================================================
   TOKENS
========================================================== */
:root {
  --encre:        #10182B;
  --encre-2:      #1A2440;
  --papier:       #F6F5F1;
  --papier-2:     #FFFFFF;
  --ardoise:      #5B6472;
  --ardoise-100:  #EDEEF1;
  --ligne:        #E3E1D9;

  --vert-ledger:     #157A5F;
  --vert-ledger-100: #E4F2ED;
  --ambre:           #B8752E;
  --ambre-100:       #FBEEDF;
  --corail:          #C0392B;
  --corail-100:      #FBEAE8;
  --bleu-info:       #2C5AA0;
  --bleu-info-100:   #E7EEF8;

  --font-display: 'Newsreader', Georgia, serif;
  --font-ui:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-card: 0 1px 2px rgba(16,24,43,0.04), 0 8px 24px -12px rgba(16,24,43,0.18);
  --shadow-pop:  0 12px 40px -16px rgba(16,24,43,0.35);

  --sidebar-w: 248px;
  --topbar-h: 60px;
}

/* ==========================================================
   RESET
========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--encre);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
ul {list-style: none;}
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: 100%; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.15; }
p { margin: 0; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }
.icon--sm { width: 16px; height: 16px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ardoise); }
.hidden { display: none !important; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--encre); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 999;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--vert-ledger); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ardoise); display: block; margin-bottom: 4px;
}

/* ==========================================================
   BOUTONS
========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--encre); color: #fff; }
.btn-primary:hover { background: var(--encre-2); }
.btn-accent { background: var(--vert-ledger); color: #fff; }
.btn-accent:hover { box-shadow: 0 8px 20px -8px rgba(21,122,95,.55); }
.btn-outline { background: transparent; border-color: var(--encre); color: var(--encre); }
.btn-outline:hover { background: var(--encre); color: #fff; }
.btn-ghost { background: transparent; color: var(--ardoise); padding: 8px 12px; }
.btn-ghost:hover { color: var(--encre); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.link-btn { background: none; border: none; padding: 0; color: var(--vert-ledger); font-weight: 600; font-size: inherit; }

/* ==========================================================
   FORMULAIRES
========================================================== */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field--inline { display: flex; flex-direction: column; }

.input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--ligne); border-radius: var(--radius-sm);
  background: var(--papier-2); font-size: 15px; color: var(--encre);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:disabled { color: var(--ardoise); background: var(--ardoise-100); }
.input::placeholder { color: #9AA0AB; }
.input:focus { border-color: var(--vert-ledger); box-shadow: 0 0 0 4px var(--vert-ledger-100); outline: none; }
.input.is-invalid { border-color: var(--corail); }

.input-error { font-size: 12.5px; color: var(--corail); margin-top: 6px; display: none; }
.input-error.is-visible { display: block; }

.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-right: 62px; }
.input-group__suffix {
  position: absolute; right: 14px; font-family: var(--font-mono); font-size: 13px; color: var(--ardoise);
}

.select-wrap { position: relative; }
.select-wrap::after {
  content: ''; position: absolute; right: 16px; top: 50%; width: 8px; height: 8px;
  border-right: 1.5px solid var(--ardoise); border-bottom: 1.5px solid var(--ardoise);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 40px; }

.form-row-2 { display: grid; grid-template-columns: 1fr; gap: 0; }
.form-note { font-size: 12.5px; color: var(--ardoise); margin-top: 12px; text-align: center; }

/* Sélecteur de type (radio pills) */
.type-switch { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.type-switch__opt {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1.5px solid var(--ligne); border-radius: var(--radius-sm); cursor: pointer;
  font-size: 14px; font-weight: 500; transition: border-color .15s ease, background .15s ease;
}
.type-switch__opt:has(input:checked) { border-color: var(--vert-ledger); background: var(--vert-ledger-100); }
.type-switch__opt input { accent-color: var(--vert-ledger); }

.type-fields { border: none; padding: 0; margin: 0 0 6px; }

.summary-box { background: var(--ardoise-100); border-radius: var(--radius-sm); padding: 14px 16px; margin: 18px 0; }
.summary-box__row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; color: var(--ardoise); }
.summary-box__row--total { color: var(--encre); font-weight: 700; font-size: 15px; }
.summary-box__divider { border-top: 1px dashed var(--ligne); margin: 8px 0; }

.quick-amounts { display: flex; gap: 8px; flex-wrap: wrap; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ligne); }
.toggle-row:last-of-type { border-bottom: none; }
.toggle-row p { margin-top: 2px; font-size: 12.5px; }

.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch__track { position: absolute; inset: 0; background: var(--ardoise-100); border-radius: 999px; transition: background .2s ease; }
.switch__track::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .switch__track { background: var(--vert-ledger); }
.switch input:checked + .switch__track::before { transform: translateX(18px); }

.checkbox-line { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--ardoise); }
.checkbox-line input { margin-top: 3px; accent-color: var(--vert-ledger); }

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

.sidebar {
  width: 264px; max-width: 82vw;
  background: var(--encre); color: #fff;
  display: flex; flex-direction: column; padding: 20px 14px;
  position: fixed; top: 0; bottom: 0; left: 0;
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 50;
}
.sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow-pop); }

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(16,24,43,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 45;
}
.sidebar-overlay.is-visible { opacity: 1; pointer-events: auto; }

.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; }
.sidebar__brand .brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--vert-ledger);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 17px;
}
.brand-word { font-family: var(--font-mono); font-size: 14px; letter-spacing: .02em; }

.sidebar__account {
  display: flex; flex-direction: column; gap: 2px; margin: 0 4px 18px; padding: 12px 14px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm);
}
.sidebar__account-label { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.sidebar__account-iban { font-size: 13px; color: #fff; font-weight: 500; }

.sidebar__section-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255,255,255,.35); margin: 16px 14px 6px;
}
.sidebar__section-label:first-of-type { margin-top: 2px; }

.sidebar__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar__link {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; text-decoration: none;
  padding: 10px 14px; border: none; background: none; border-radius: var(--radius-sm);
  color: rgba(255,255,255,.62); font-size: 13.5px; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.sidebar__link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar__link.is-active { background: var(--vert-ledger); color: #fff; }

.sidebar__logout { display: flex; align-items: center; gap: 12px; padding: 11px 14px; color: rgba(255,255,255,.45); font-size: 14px; text-decoration: none; }
.sidebar__logout:hover { color: #fff; }

.sidebar__security {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; margin-top: 4px;
  font-size: 10.5px; color: rgba(255,255,255,.35); border-top: 1px solid rgba(255,255,255,.08);
}

.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 16px; background: var(--papier-2); border-bottom: 1px solid var(--ligne);
  position: sticky; top: 0; z-index: 20;
}
.topbar__burger { display: flex; flex-direction: column; gap: 4px; background: none; border: none; padding: 8px; }
.topbar__burger span { width: 20px; height: 2px; background: var(--encre); border-radius: 2px; }
.topbar__heading { display: flex; flex-direction: column; min-width: 0; }
.topbar__eyebrow { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ardoise); }
.topbar__title { font-family: var(--font-display); font-size: 17px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__spacer { flex: 1; }
.topbar__actions { display: flex; align-items: center; gap: 10px; }

.notif-wrap, .user-wrap { position: relative; }

.topbar__icon-btn {
  position: relative; background: var(--ardoise-100); border: none; width: 38px; height: 38px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--encre);
}
.topbar__badge {
  position: absolute; top: -2px; right: -2px; background: var(--corail); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

.topbar__user { display: none; align-items: center; gap: 8px; background: none; border: none; padding: 4px 8px 4px 4px; border-radius: 999px; cursor: pointer; }
.topbar__user:hover { background: var(--ardoise-100); }
.topbar__name { font-weight: 600; font-size: 13.5px; }
.topbar__chevron { color: var(--ardoise); transition: transform .15s ease; }
.user-wrap[data-open="true"] .topbar__chevron { transform: rotate(180deg); }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--encre); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 12.5px; font-weight: 600;
  background-size: cover; background-position: center; flex-shrink: 0;
}
.avatar--lg { width: 84px; height: 84px; font-size: 24px; }

/* Panneaux déroulants (notifications / menu utilisateur) */
.dropdown-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: 320px; max-width: 88vw;
  background: var(--papier-2); border: 1px solid var(--ligne); border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop); z-index: 60; overflow: hidden;
}
.dropdown-panel[hidden] { display: none; }

.notif-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--ligne); }
.notif-panel__head strong { font-size: 14px; }
.notif-panel__list { list-style: none; margin: 0; padding: 6px; max-height: 340px; overflow-y: auto; }

.notif-item { display: flex; gap: 10px; padding: 10px; border-radius: var(--radius-sm); align-items: flex-start; }
.notif-item:hover { background: var(--ardoise-100); }
.notif-item.is-unread { background: var(--vert-ledger-100); }
.notif-item.is-unread:hover { background: #d8ece4; }
.notif-item__icon {
  width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff;
}
.notif-item__icon.warn { background: var(--ambre); }
.notif-item__icon.info { background: var(--bleu-info); }
.notif-item__icon.succes { background: var(--vert-ledger); }
.notif-item__body { min-width: 0; }
.notif-item__title { font-size: 13px; font-weight: 600; margin: 0; }
.notif-item__text { font-size: 12px; color: var(--ardoise); margin: 2px 0 4px; line-height: 1.4; }
.notif-item time { font-size: 11px; color: var(--ardoise); font-family: var(--font-mono); }

.notif-panel__foot {
  display: block; text-align: center; padding: 12px; font-size: 13px; font-weight: 600;
  color: var(--vert-ledger); border-top: 1px solid var(--ligne); text-decoration: none;
}
.notif-panel__foot:hover { background: var(--ardoise-100); }

.user-panel { padding: 8px; }
.user-panel a, .user-panel button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; text-decoration: none;
  padding: 10px 12px; border-radius: var(--radius-sm); color: var(--encre); font-size: 13.5px; font-weight: 500;
  background: none; border: none;
}
.user-panel a:hover, .user-panel button:hover { background: var(--ardoise-100); }
.user-panel hr { border: none; border-top: 1px solid var(--ligne); margin: 6px 4px; }
.user-panel .danger { color: var(--corail); }

/* Upload photo de profil */
.avatar-upload { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.avatar-upload__preview { position: relative; }
.avatar-upload__preview .avatar-upload__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border-radius: 50%; }
.avatar-upload__edit {
  position: absolute; bottom: -2px; right: -2px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--encre); color: #fff; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--papier-2); pointer-events: none;
}
.avatar-upload__actions { display: flex; flex-direction: column; gap: 8px; }
.avatar-upload__hint { font-size: 12px; color: var(--ardoise); }

/* Page Notifications (liste complète) */
.notif-list-page { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.notif-row {
  display: flex; gap: 14px; align-items: flex-start; background: var(--papier-2);
  border: 1px solid var(--ligne); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-card);
}
.notif-row.is-unread { border-left: 3px solid var(--vert-ledger); }
.notif-row__icon { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.notif-row__icon.warn { background: var(--ambre); }
.notif-row__icon.info { background: var(--bleu-info); }
.notif-row__icon.succes { background: var(--vert-ledger); }
.notif-row__body { flex: 1; min-width: 0; }
.notif-row__head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.notif-row__title { font-weight: 600; font-size: 14.5px; }
.notif-row__text { font-size: 13.5px; color: var(--ardoise); margin-top: 4px; line-height: 1.5; }
.notif-row time { font-size: 11.5px; color: var(--ardoise); font-family: var(--font-mono); white-space: nowrap; }


.app-content { padding: 20px 16px 60px; max-width: 1180px; width: 100%; margin: 0 auto; }

@media (min-width: 720px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; gap: 14px; }
  .type-switch { flex-direction: row; }
  .type-switch__opt { flex: 1; justify-content: center; }
  .app-content { padding: 30px 28px 60px; }
}

@media (min-width: 900px) {
  .sidebar { position: fixed; transform: translateX(0); max-width: none; }
  .sidebar-overlay { display: none; }
  .app-main { margin-left: var(--sidebar-w); }
  .topbar { padding: 0 28px; }
  .topbar__burger { display: none; }
  .topbar__user { display: flex; }
}

/* ==========================================================
   PAGE HEAD / SECTIONS
========================================================== */
.view { display: none; }
.view.is-active { display: block; animation: view-in .2s ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.page-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.page-head h1 { font-size: 23px; font-weight: 500; }
.page-head .sub { color: var(--ardoise); font-size: 14px; margin-top: 4px; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; }
.section-head h2 { font-size: 17px; font-family: var(--font-ui); font-weight: 600; }

@media (min-width: 640px) {
  .page-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
}

/* ==========================================================
   CARDS / STATS
========================================================== */
.card { background: var(--papier-2); border: 1px solid var(--ligne); border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-card); }
.grid-cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); } }

.stat-card .value { font-family: var(--font-mono); font-size: 25px; font-weight: 600; margin-top: 2px; }
.stat-card .value--sm { font-size: 16px; }
.stat-card .delta { font-size: 12.5px; margin-top: 6px; color: var(--vert-ledger); }
.stat-card .delta--muted { color: var(--ardoise); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-succes  { background: var(--vert-ledger-100); color: var(--vert-ledger); }
.badge-attente { background: var(--ambre-100); color: var(--ambre); }
.badge-erreur  { background: var(--corail-100); color: var(--corail); }
.badge-info    { background: var(--bleu-info-100); color: var(--bleu-info); }

/* Listes "talon de relevé" */
.stub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stub {
  border: 1px solid var(--ligne); border-radius: var(--radius-md); background: var(--papier-2);
  padding: 14px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-card);
  flex-wrap: wrap;
}
.stub__icon { width: 38px; height: 38px; border-radius: 10px; background: var(--ardoise-100); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--encre); }
.stub__body { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.stub__title { font-weight: 600; font-size: 14px; }
.stub__meta { font-size: 11.5px; color: var(--ardoise); margin-top: 2px; }
.stub__divider { display: none; }
.stub__amount { font-weight: 600; font-size: 14.5px; }

@media (min-width: 560px) {
  .stub__divider { display: block; border-left: 1.5px dashed var(--ligne); align-self: stretch; }
}

/* ==========================================================
   TRANSFERT — carte détaillée + interruption
========================================================== */
.transfer-card { margin-bottom: 20px; }
.transfer-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.transfer-card__head h3 { font-size: 17px; font-weight: 500; margin-top: 2px; }
.transfer-card__amount { font-size: 22px; font-weight: 600; margin-bottom: 14px; }
.transfer-card__amount .muted { font-size: 14px; font-weight: 400; }

.progress { height: 6px; border-radius: 999px; background: var(--ardoise-100); overflow: hidden; }
.progress__bar { height: 100%; background: var(--vert-ledger); border-radius: 999px; transition: width .4s ease; }
.progress__bar.is-blocked { background: var(--ambre); }
.progress__label { font-size: 12px; color: var(--ardoise); margin-top: 6px; margin-bottom: 16px; }

.alert-box { border-radius: var(--radius-sm); padding: 14px; font-size: 13.5px; display: flex; gap: 10px; margin-bottom: 16px; }
.alert-box.warn { background: var(--ambre-100); color: #7A4A17; }
.alert-box.error { background: var(--corail-100); color: #7C2419; }
.alert-box.info { background: var(--bleu-info-100); color: #1E3E6E; }
.alert-box p { margin-top: 4px; line-height: 1.5; }

.resume-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
@media (min-width: 560px) {
  .resume-form { flex-direction: row; align-items: flex-end; }
  .resume-form .field { flex: 1; margin-bottom: 0; }
}

.timeline-details { margin-top: 14px; }
.timeline-details summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--vert-ledger); }
.timeline { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; }
.timeline__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ligne); margin-top: 5px; flex-shrink: 0; }
.timeline__dot.is-done { background: var(--vert-ledger); }
.timeline__dot.is-current { background: var(--ambre); box-shadow: 0 0 0 4px var(--ambre-100); }
.timeline strong { display: block; font-size: 13.5px; }
.timeline time { font-size: 11.5px; color: var(--ardoise); font-family: var(--font-mono); }

.filter-row { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 4px; }
.chip {
  border: 1.5px solid var(--ligne); background: var(--papier-2); padding: 8px 16px;
  border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ardoise); white-space: nowrap;
}
.chip.is-active { background: var(--encre); border-color: var(--encre); color: #fff; }

/* ==========================================================
   CARTE VIRTUELLE
========================================================== */
.card-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 760px) { .card-layout { grid-template-columns: 380px 1fr; align-items: start; } }

.vcard {
  background: linear-gradient(135deg, var(--encre-2) 0%, var(--encre) 60%, #0B1120 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 24px; aspect-ratio: 1.586 / 1;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-pop); position: relative; overflow: hidden;
}
.vcard::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 20px 20px;
}
.vcard__top { display: flex; justify-content: space-between; align-items: center; position: relative; font-family: var(--font-display); font-size: 17px; }
.vcard__type { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.vcard__number { position: relative; display: flex; gap: 12px; font-size: 19px; letter-spacing: .06em; }
.vcard__bottom { position: relative; display: flex; justify-content: space-between; gap: 10px; }
.vcard__label { display: block; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 3px; }
.vcard__value { font-size: 13px; font-weight: 500; }

.card-layout__side .card + .card { margin-top: 14px; }

/* ==========================================================
   KYC — dropzone
========================================================== */
.dropzone { text-align: center; position: relative; }
.dropzone__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone__label { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 10px; border: 1.5px dashed var(--ligne); border-radius: var(--radius-sm); }
.dropzone__label .icon { width: 26px; height: 26px; color: var(--ardoise); }
.dropzone__label strong { font-size: 14px; }
.dropzone__label .muted { font-size: 12px; }
.dropzone.is-dragover .dropzone__label { border-color: var(--vert-ledger); background: var(--vert-ledger-100); }
.dropzone__filename { font-size: 12.5px; color: var(--vert-ledger); font-weight: 600; margin-top: 10px; min-height: 1em; }

/* ==========================================================
   TOAST
========================================================== */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px);
  background: var(--encre); color: #fff; padding: 13px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; box-shadow: var(--shadow-pop); z-index: 100;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  max-width: 90vw; text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.success { background: var(--vert-ledger); }
.toast.error { background: var(--corail); }

/* ==========================================================
   AUTH — connexion / inscription (split screen)
========================================================== */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 960px) { .auth-shell { grid-template-columns: 5fr 6fr; } }

.auth-visual {
  display: none; position: relative;
  background: radial-gradient(120% 140% at 15% 0%, var(--encre-2) 0%, var(--encre) 55%, #0B1120 100%);
  color: #fff; padding: 48px 44px; flex-direction: column; justify-content: space-between; overflow: hidden;
}
@media (min-width: 960px) { .auth-visual { display: flex; } }
.auth-visual::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5;
}
.auth-brand { position: relative; display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 14px; letter-spacing: .04em; color: white; text-decoration: none; }
.auth-brand .brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--vert-ledger); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 18px; }

.auth-headline { position: relative; margin: auto 0; max-width: 440px; }
.auth-headline h1 { font-size: 32px; font-weight: 500; color: #fff; margin-bottom: 14px; }
.auth-headline p { color: rgba(255,255,255,.62); font-size: 15px; }

.ledger-stub {
  position: relative; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-md); padding: 20px 22px; margin-top: 26px; backdrop-filter: blur(6px);
}
.ledger-stub__row { display: flex; justify-content: space-between; align-items: center; }
.ledger-stub__party { font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,.55); }
.ledger-stub__amount { font-family: var(--font-mono); font-size: 21px; color: #fff; font-weight: 500; }
.ledger-stub__divider { margin: 15px -22px; border-top: 1.5px dashed rgba(255,255,255,.22); position: relative; }
.ledger-stub__divider::before, .ledger-stub__divider::after { content: ''; position: absolute; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--encre); }
.ledger-stub__divider::before { left: -7px; }
.ledger-stub__divider::after { right: -7px; }
.ledger-stub__status { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--vert-ledger); }
.ledger-stub__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--vert-ledger); box-shadow: 0 0 0 4px var(--vert-ledger-100); animation: pulse-dot 2.2s ease-in-out infinite; }
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.auth-foot { position: relative; font-size: 11.5px; color: rgba(255,255,255,.4); font-family: var(--font-mono); }

.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 36px 20px; }
.auth-form-card { width: 100%; max-width: 400px; }
.auth-form-card h2 { font-size: 25px; font-weight: 500; margin-bottom: 6px; }
.auth-form-card .sub { color: var(--ardoise); font-size: 14px; margin-bottom: 26px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--ardoise); }
.auth-switch a { color: var(--vert-ledger); font-weight: 600; }

.input-group__action { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: none; padding: 8px; color: var(--ardoise); }
.input-group .input-with-action { padding-right: 46px; }

/* ==========================================================
   COMPOSANT — ALERTE (bannière de message dismissible)
========================================================== */
.alerte {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border-radius: var(--radius-md); border: 1px solid transparent; margin-bottom: 16px;
  animation: alerte-in .2s ease;
}
.alerte[hidden] { display: none; }
@keyframes alerte-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.alerte__icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.alerte__body { flex: 1; min-width: 0; }
.alerte__titre { font-weight: 600; font-size: 14px; margin: 0 0 2px; }
.alerte__texte { font-size: 13.5px; margin: 0; line-height: 1.5; }
.alerte__fermer {
  background: none; border: none; padding: 4px; color: inherit; opacity: .55; flex-shrink: 0; border-radius: 6px;
}
.alerte__fermer:hover { opacity: 1; background: rgba(0,0,0,.06); }

.alerte--info    { background: var(--bleu-info-100); color: #1E3E6E; border-color: rgba(44,90,160,.15); }
.alerte--info .alerte__icon    { background: var(--bleu-info); }
.alerte--succes  { background: var(--vert-ledger-100); color: #0E5943; border-color: rgba(21,122,95,.18); }
.alerte--succes .alerte__icon  { background: var(--vert-ledger); }
.alerte--avertissement { background: var(--ambre-100); color: #7A4A17; border-color: rgba(184,117,46,.18); }
.alerte--avertissement .alerte__icon { background: var(--ambre); }
.alerte--erreur  { background: var(--corail-100); color: #7C2419; border-color: rgba(192,57,43,.18); }
.alerte--erreur .alerte__icon  { background: var(--corail); }

.alerte-demo__triggers { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }

/* ==========================================================
   COMPOSANT — BARRE DE PROGRESSION DE TRANSFERT (moderne)
========================================================== */
.tx-progress { width: 100%; }

.tx-progress__track {
  position: relative; height: 10px; border-radius: 999px; background: var(--ardoise-100);
  overflow: hidden; margin-top: 26px;
}
.tx-progress__fill {
  height: 100%; border-radius: 999px; width: 0%;
  background: linear-gradient(90deg, var(--vert-ledger) 0%, #1FA383 100%);
  transition: width .6s cubic-bezier(.4,0,.2,1);
  position: relative; overflow: hidden;
}
.tx-progress__fill::after {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.28) 0 10px, transparent 10px 22px);
  animation: tx-shimmer 1.4s linear infinite;
}
.tx-progress[data-status="interrompu"] .tx-progress__fill { background: linear-gradient(90deg, var(--ambre) 0%, #CE9047 100%); }
.tx-progress[data-status="rejete"] .tx-progress__fill,
.tx-progress[data-status="annule"] .tx-progress__fill { background: var(--corail); }
.tx-progress[data-status="rejete"] .tx-progress__fill::after,
.tx-progress[data-status="annule"] .tx-progress__fill::after,
.tx-progress[data-status="termine"] .tx-progress__fill::after { animation: none; content: none; }
@keyframes tx-shimmer { from { transform: translateX(-24px); } to { transform: translateX(0); } }

.tx-progress__bubble {
  position: absolute; top: -30px; transform: translateX(-50%);
  background: var(--encre); color: #fff; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap; transition: left .6s cubic-bezier(.4,0,.2,1);
}
.tx-progress__bubble::after {
  content: ''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--encre);
}

.tx-progress__steps {
  list-style: none; margin: 18px 0 0; padding: 0; display: flex; justify-content: space-between;
}
.tx-progress__step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; text-align: center; position: relative; }
.tx-progress__dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--papier-2); border: 2px solid var(--ligne);
  display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; z-index: 1;
}
.tx-progress__dot .icon { width: 12px; height: 12px; display: none; }

.tx-progress__step.is-done .tx-progress__dot { background: var(--vert-ledger); border-color: var(--vert-ledger); }
.tx-progress__step.is-done .tx-progress__dot .icon { display: block; }

.tx-progress__step.is-current .tx-progress__dot { border-color: var(--ambre); box-shadow: 0 0 0 4px var(--ambre-100); animation: pulse-dot 2s ease-in-out infinite; }
.tx-progress[data-status="termine"] .tx-progress__step.is-current .tx-progress__dot { border-color: var(--vert-ledger); box-shadow: 0 0 0 4px var(--vert-ledger-100); }

.tx-progress__label { font-size: 11.5px; color: var(--ardoise); font-weight: 500; }
.tx-progress__step.is-done .tx-progress__label, .tx-progress__step.is-current .tx-progress__label { color: var(--encre); font-weight: 600; }

.tx-progress__status-line { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; font-size: 12.5px; color: var(--ardoise); }
.tx-progress__status-line strong { color: var(--encre); }


/* Règles du mot de passe */
.password-rules {
    background: rgba(0, 119, 255, 0.027);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 24px;
}

.rule-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--encre);
    margin-bottom: 8px;
}

.rules-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rules-list li {
    font-size: 0.8rem;
    color: var(--ardoise);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all .5s ease;
}

.rules-list li.valid {
    color: #10b981;
}

.rules-list li.valid i {
    font-size: 0.85rem;
}

.rules-list li.valid i::before {
    content: "\f058"; /* Icon Check FontAwesome */
}