/* =====================================================================
   Banque Horizon — système de design
   1. Jetons  2. Base  3. Composants  4. Public  5. Auth  6. Coque
   7. Client  8. Carte  9. Chat  10. Admin  11. Mouvement  12. Mobile
   Règle d'animation : transform + opacity. Les changements de couleur
   ne servent qu'aux états (survol, focus) sur de petits éléments.
   ===================================================================== */

/* ---------- 1. Jetons ---------- */
:root {
  color-scheme: light dark;

  /* Marine (base #0b2545 = 800) */
  --navy-50: #f2f6fb; --navy-100: #e2eaf5; --navy-200: #c5d4ea; --navy-300: #9bb4d6; --navy-400: #6a8cbc;
  --navy-500: #43679a; --navy-600: #2c4f80; --navy-700: #1b3b68; --navy-800: #0b2545; --navy-900: #061a33;
  /* Vert d'eau (base #12a594 = 500) */
  --teal-50: #effaf8; --teal-100: #d3f4ef; --teal-200: #a8e8df; --teal-300: #6fd6c9; --teal-400: #34bfaf;
  --teal-500: #12a594; --teal-600: #0e8576; --teal-700: #0b6a5e; --teal-800: #0a544b; --teal-900: #08433c;
  /* Sémantique */
  --green-50: #ecfdf3; --green-500: #16a34a; --green-600: #15803d; --green-700: #166534;
  --amber-50: #fffbeb; --amber-400: #fbbf24; --amber-500: #f59e0b; --amber-700: #b45309;
  --red-50: #fef2f2; --red-500: #ef4444; --red-600: #dc2626; --red-700: #b91c1c;
  --blue-50: #eff6ff; --blue-500: #3b82f6; --blue-600: #2563eb; --blue-700: #1d4ed8;

  /* Rôles — clair */
  --bg: #f4f7fb; --surface: #ffffff; --surface-2: #f8fafc; --surface-sunk: #eef2f7;
  --text: #0f1b2d; --text-2: #445268; --text-3: #5f6e84;
  --line: rgba(15, 27, 45, .09); --line-strong: rgba(15, 27, 45, .17);
  --field-bg: #ffffff;
  --accent: var(--teal-500); --accent-text: var(--teal-700); --accent-soft: rgba(18, 165, 148, .12);
  --pos: #15803d; --pos-bg: #dcfce7; --pos-bd: rgba(22, 163, 74, .3);
  --neg: #dc2626; --neg-bg: #fee2e2; --neg-bd: rgba(220, 38, 38, .3);
  --warn: #b45309; --warn-bg: #fef3c7; --warn-bd: rgba(217, 119, 6, .35);
  --info: #1d4ed8; --info-bg: #dbeafe; --info-bd: rgba(37, 99, 235, .3);
  --neutral-bg: #e8edf4; --neutral: #445268;
  --overlay: rgba(6, 26, 51, .5);
  --chart-grid: rgba(15, 27, 45, .06);

  --shadow-sm: 0 1px 2px rgba(11, 37, 69, .06), 0 1px 1px rgba(11, 37, 69, .04);
  --shadow-md: 0 2px 4px rgba(11, 37, 69, .04), 0 8px 24px -6px rgba(11, 37, 69, .12);
  --shadow-lg: 0 4px 8px rgba(11, 37, 69, .05), 0 28px 60px -14px rgba(11, 37, 69, .28);

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 24px;
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 5rem;

  /* Mouvement */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --d-micro: 150ms; --d-ui: 240ms; --d-page: 480ms;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --nav-h: 72px;

  --bs-body-font-family: var(--font);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070e1b; --surface: #0e1a2e; --surface-2: #122039; --surface-sunk: #0a1424;
    --text: #e8eef7; --text-2: #b0bdd0; --text-3: #92a2b9;
    --line: rgba(255, 255, 255, .08); --line-strong: rgba(255, 255, 255, .17);
    --field-bg: rgba(255, 255, 255, .04);
    --accent-text: var(--teal-300); --accent-soft: rgba(52, 191, 175, .16);
    --pos: #4ade80; --pos-bg: rgba(34, 197, 94, .15); --pos-bd: rgba(74, 222, 128, .35);
    --neg: #f87171; --neg-bg: rgba(239, 68, 68, .16); --neg-bd: rgba(248, 113, 113, .35);
    --warn: #fbbf24; --warn-bg: rgba(245, 158, 11, .15); --warn-bd: rgba(251, 191, 36, .35);
    --info: #93c5fd; --info-bg: rgba(59, 130, 246, .17); --info-bd: rgba(147, 197, 253, .35);
    --neutral-bg: rgba(255, 255, 255, .09); --neutral: #b0bdd0;
    --overlay: rgba(2, 8, 18, .65);
    --chart-grid: rgba(255, 255, 255, .07);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, .3), 0 10px 28px -6px rgba(0, 0, 0, .5);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, .35), 0 30px 64px -14px rgba(0, 0, 0, .7);
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 1rem); }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.55; color: var(--text); background: var(--surface);
  font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; -webkit-tap-highlight-color: transparent; overflow-wrap: break-word;
}
body.shell, body.auth { background: var(--bg); }
body.lock { overflow: hidden; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: var(--text); margin-top: 0; text-wrap: balance; }
h1, .h1 { font-size: clamp(1.75rem, 3vw + 1rem, 2.5rem); letter-spacing: -.03em; }
h2, .h2 { font-size: clamp(1.4rem, 1.5vw + 1rem, 1.85rem); }
h3, .h3 { font-size: 1.2rem; } h4, .h4 { font-size: 1.1rem; } h5, .h5 { font-size: 1.02rem; } h6, .h6 { font-size: .85rem; }
.display-6 { font-size: clamp(1.8rem, 3vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; }
p { margin-top: 0; text-wrap: pretty; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
small, .small { font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--line); opacity: 1; margin: 1rem 0; }
dt { font-weight: 600; color: var(--text-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; margin-top: .6rem; }
dd { margin-bottom: .1rem; }
dl.row dt, dl.row dd { margin-top: 0; padding-bottom: .35rem; }
dl.row dt { text-transform: none; letter-spacing: 0; font-size: .85rem; }
code { color: var(--accent-text); background: var(--accent-soft); padding: .1rem .35rem; border-radius: 6px; font-size: .85em; }
mark { background: color-mix(in srgb, var(--amber-400) 55%, transparent); color: inherit; padding: 0 2px; border-radius: 3px; }
::selection { background: rgba(18, 165, 148, .28); }
img, svg { max-width: 100%; }
.ic { flex: none; vertical-align: -3px; stroke-width: 1.75; }
.min-w-0 { min-width: 0; }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.flag { width: 30px; height: 20px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .14), 0 1px 2px rgba(0, 0, 0, .12); }

/* Chiffres tabulaires pour tous les montants */
.amount, .value, .pos, .neg, .tx-amt, td.text-end, .money, .iban, .mono, .code-chip, .kpi, .ph-balance, .stat-n, .num, .bubble small, .hint strong {
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "cv11", "ss03";
}
.pos { color: var(--pos); } .neg { color: var(--neg); }
.hint { font-size: .85rem; color: var(--text-3); overflow-wrap: anywhere; }
.text-nowrap { white-space: nowrap; }

/* Accessibilité */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: fixed; left: 1rem; top: 0; z-index: 300; background: var(--navy-800); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 var(--r) var(--r); font-weight: 600; text-decoration: none; transform: translateY(-110%); transition: transform var(--d-micro) var(--ease-out); }
.skip-link:focus { transform: none; color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
main:focus, #main:focus { outline: none; }

/* Remappage des utilitaires Bootstrap (les seuls !important du fichier) */
.text-muted, .text-secondary { color: var(--text-3) !important; }
.text-dark { color: var(--text) !important; }
.bg-light { background: var(--surface-sunk) !important; }
.bg-white { background: var(--surface) !important; }
.border, .border-bottom, .border-top { border-color: var(--line) !important; }
.border-light { border-color: rgba(255, 255, 255, .2) !important; }
.opacity-75 { opacity: .78 !important; }

/* ---------- 3. Composants ---------- */
/* Boutons — chaque variante ne fixe que ses variables ; une seule règle d'état les relit
   (neutralise les :hover/:focus/:active de Bootstrap sans !important) */
.btn {
  --spin: var(--text); --b-fg: var(--text); --b-bg: transparent; --b-bd: transparent; --b-sh: none;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.25; letter-spacing: -.005em; text-decoration: none; cursor: pointer;
  padding: .62rem 1.15rem; border-radius: var(--r); border: 1px solid var(--b-bd); color: var(--b-fg); background: var(--b-bg); box-shadow: var(--b-sh);
  user-select: none; -webkit-user-select: none; touch-action: manipulation; vertical-align: middle;
  transition: transform var(--d-micro) var(--ease-out), background-color var(--d-micro) ease, border-color var(--d-micro) ease, color var(--d-micro) ease, box-shadow var(--d-micro) ease;
}
.btn:hover, .btn:focus, .btn:active, .btn.active { color: var(--b-fg); background: var(--b-bg); border-color: var(--b-bd); box-shadow: var(--b-sh); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn.disabled { opacity: .5; pointer-events: none; }
.btn-sm { padding: .38rem .75rem; font-size: .84rem; border-radius: 10px; gap: .35rem; }
.btn-lg { padding: .85rem 1.5rem; font-size: 1.05rem; border-radius: 14px; }
.btn-icon { padding: 0; width: 40px; height: 40px; }
.btn-accent { --spin: #fff; --b-fg: #fff; --b-bg: linear-gradient(180deg, var(--teal-600), var(--teal-700)); --b-bd: var(--teal-700);
  --b-sh: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(8, 67, 60, .35), 0 8px 18px -8px rgba(14, 133, 118, .7); }
.btn-navy { --spin: #fff; --b-fg: #fff; --b-bg: var(--navy-800); --b-bd: var(--navy-900); --b-sh: inset 0 1px 0 rgba(255, 255, 255, .1), var(--shadow-sm); }
.btn-success { --spin: #fff; --b-fg: #fff; --b-bg: var(--green-600); --b-bd: var(--green-700); }
.btn-danger { --spin: #fff; --b-fg: #fff; --b-bg: var(--red-600); --b-bd: var(--red-700); }
.btn-warning { --b-fg: #3a2300; --b-bg: var(--amber-400); --b-bd: #e0a40f; }
.btn-primary { --spin: #fff; --b-fg: #fff; --b-bg: var(--blue-600); --b-bd: var(--blue-700); }
.btn-light { --b-bg: var(--surface-sunk); --b-bd: var(--line); }
.btn-outline-secondary { --b-fg: var(--text-2); --b-bd: var(--line-strong); }
.btn-outline-success { --b-fg: var(--pos); --b-bd: var(--pos-bd); }
.btn-outline-danger { --b-fg: var(--neg); --b-bd: var(--neg-bd); }
.btn-outline-warning { --b-fg: var(--warn); --b-bd: var(--warn-bd); }
.btn-outline-primary { --b-fg: var(--info); --b-bd: var(--info-bd); }
.btn-outline-light { --spin: #fff; --b-fg: #fff; --b-bd: rgba(255, 255, 255, .35); }
.btn-link { --b-fg: var(--accent-text); padding: .25rem; }
@media (hover: hover) and (pointer: fine) {
  .btn-accent:hover { --b-bg: linear-gradient(180deg, var(--teal-500), var(--teal-600)); --b-sh: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(8, 67, 60, .35), 0 12px 22px -8px rgba(14, 133, 118, .85); }
  .btn-navy:hover { --b-bg: var(--navy-700); }
  .btn-success:hover { --b-bg: var(--green-500); }
  .btn-danger:hover { --b-bg: var(--red-500); }
  .btn-warning:hover { --b-bg: #fcd34d; }
  .btn-primary:hover { --b-bg: var(--blue-500); }
  .btn-light:hover { --b-bg: var(--navy-100); --b-fg: var(--text); }
  .btn-outline-secondary:hover { --b-bg: var(--surface-sunk); --b-fg: var(--text); }
  .btn-outline-success:hover { --b-bg: var(--pos-bg); }
  .btn-outline-danger:hover { --b-bg: var(--neg-bg); }
  .btn-outline-warning:hover { --b-bg: var(--warn-bg); }
  .btn-outline-primary:hover { --b-bg: var(--info-bg); }
  .btn-outline-light:hover { --b-bg: rgba(255, 255, 255, .14); }
  .btn-link:hover { text-decoration: underline; }
}
@media (prefers-color-scheme: dark) {
  .btn-light { --b-bg: rgba(255, 255, 255, .08); }
  .btn-navy { --b-bg: var(--navy-600); --b-bd: var(--navy-500); }
  @media (hover: hover) and (pointer: fine) { .btn-light:hover { --b-bg: rgba(255, 255, 255, .14); } .btn-navy:hover { --b-bg: var(--navy-500); } }
}
/* Boutons à bascule (btn-check) */
.btn-check { position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; }
.btn-check:checked + .btn-outline-secondary { --b-bg: var(--accent-soft); --b-bd: var(--teal-500); --b-fg: var(--accent-text); background: var(--b-bg); border-color: var(--b-bd); color: var(--b-fg); }
.btn-check:checked + .btn-outline-success { --b-bg: var(--green-600); --b-bd: var(--green-700); --b-fg: #fff; background: var(--b-bg); border-color: var(--b-bd); color: var(--b-fg); }
.btn-check:checked + .btn-outline-danger { --b-bg: var(--red-600); --b-bd: var(--red-700); --b-fg: #fff; background: var(--b-bg); border-color: var(--b-bd); color: var(--b-fg); }
.btn-check:focus-visible + .btn { outline: 2px solid var(--teal-500); outline-offset: 2px; }
.form-check .form-check-input, .form-switch .form-check-input { float: none; margin-left: 0; }
.form-check-input:focus { outline: 0; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(18, 165, 148, .25); }
.form-switch .form-check-input:focus, .form-switch .form-check-input:checked:focus { background-image: none; }
.form-check-input:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }
.btn-close:focus { box-shadow: none; opacity: 1; }
.btn-close:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 1px; }
.btn-group { display: inline-flex; gap: .4rem; }
.btn-group > .btn { flex: 1; }
.btn-group.w-100 { display: flex; }
.btn-close { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23667'%3E%3Cpath d='M2.1 2.1a.75.75 0 0 1 1.06 0L8 6.94l4.84-4.84a.75.75 0 1 1 1.06 1.06L9.06 8l4.84 4.84a.75.75 0 1 1-1.06 1.06L8 9.06 3.16 13.9a.75.75 0 0 1-1.06-1.06L6.94 8 2.1 3.16a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E") center / 14px no-repeat; opacity: .8; transition: transform var(--d-micro) var(--ease-out), background-color var(--d-micro), opacity var(--d-micro); }
.btn-close:active { transform: scale(.9); }
@media (hover: hover) { .btn-close:hover { background-color: var(--surface-sunk); opacity: 1; } }
@media (prefers-color-scheme: dark) { .btn-close { filter: invert(1) brightness(1.6); } }
/* Chargement */
.btn.is-loading, .btn.is-loading:hover, .btn.is-loading:focus, .btn.is-loading:active { color: transparent; pointer-events: none; }
.btn.is-loading > * { opacity: 0; }
.btn.is-loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--spin) 30%, transparent); border-top-color: var(--spin); animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Champs */
.form-label { font-size: .85rem; font-weight: 600; color: var(--text-2); margin-bottom: .4rem; display: block; }
.form-control, .form-select {
  display: block; width: 100%; font: inherit; font-size: 1rem; line-height: 1.4; color: var(--text); background-color: var(--field-bg);
  border: 1px solid var(--line-strong); border-radius: var(--r); padding: .7rem .9rem; min-height: 46px; box-shadow: inset 0 1px 1px rgba(11, 37, 69, .03);
  transition: border-color var(--d-micro) ease, box-shadow var(--d-micro) ease, background-color var(--d-micro) ease; appearance: none; -webkit-appearance: none;
}
textarea.form-control { min-height: 0; resize: vertical; }
.form-control::placeholder { color: var(--text-3); opacity: .7; }
.form-control:focus, .form-select:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(18, 165, 148, .2); background-color: var(--field-bg); color: var(--text); }
.form-control:disabled, .form-control[readonly] { background: var(--surface-sunk); color: var(--text-3); cursor: not-allowed; }
.form-control-lg { font-size: 1.15rem; padding: .85rem 1rem; min-height: 54px; }
.form-control-sm { min-height: 38px; padding: .4rem .7rem; font-size: .9rem; border-radius: 10px; }
.form-select { padding-right: 2.4rem; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.form-select option { color: #0f1b2d; background: #fff; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.form-check { display: flex; align-items: flex-start; gap: .6rem; padding: 0; min-height: 1.5rem; }
.form-check-input { flex: none; width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; appearance: none; -webkit-appearance: none; cursor: pointer; background: var(--field-bg) center / 70% no-repeat; border: 1.5px solid var(--line-strong); border-radius: 6px; transition: background-color var(--d-micro) ease, border-color var(--d-micro) ease, transform var(--d-micro) var(--ease-out); }
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-input:active { transform: scale(.92); }
.form-check-input:checked { background-color: var(--teal-600); border-color: var(--teal-600); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3 6-6'/%3E%3C/svg%3E"); }
.form-check-input[type="radio"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='2' fill='%23fff'/%3E%3C/svg%3E"); }
.form-check-input:disabled { opacity: .45; cursor: not-allowed; }
.form-check-label { cursor: pointer; }
/* Interrupteur animé */
.form-switch .form-check-input { width: 46px; height: 28px; border-radius: 99px; position: relative; background-color: var(--line-strong); border-color: transparent; background-image: none; margin-top: 0; }
.form-switch .form-check-input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform var(--d-ui) var(--ease-spring); }
.form-switch .form-check-input:checked { background-color: var(--teal-600); background-image: none; border-color: transparent; }
.form-switch .form-check-input:checked::after { transform: translateX(18px); }
.form-switch .form-check-input:active::after { transform: scale(1.08, .94); }
.form-switch .form-check-input:checked:active::after { transform: translateX(18px) scale(1.08, .94); }
.input-group { display: flex; }
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 3rem; }
.pw-toggle { position: absolute; right: 4px; top: 50%; margin-top: -20px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--text-3); border-radius: 10px; cursor: pointer; transition: transform var(--d-micro) var(--ease-out), color var(--d-micro); }
.pw-toggle:active { transform: scale(.9); }
@media (hover: hover) { .pw-toggle:hover { color: var(--text); } }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600; line-height: 1.2; padding: .28rem .6rem; border-radius: 99px; letter-spacing: .005em; white-space: nowrap; border: 1px solid transparent; }
.badge.fs-6 { font-size: .85rem !important; padding: .4rem .8rem; }
.text-bg-success { background: var(--pos-bg); color: var(--pos); border-color: var(--pos-bd); }
.text-bg-danger { background: var(--neg-bg); color: var(--neg); border-color: var(--neg-bd); }
.text-bg-warning { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bd); }
.text-bg-info, .text-bg-primary { background: var(--info-bg); color: var(--info); border-color: var(--info-bd); }
.text-bg-secondary, .text-bg-light { background: var(--neutral-bg); color: var(--neutral); }
.text-bg-dark { background: var(--navy-800); color: #fff; }
.pub-nav .text-bg-warning, .side .text-bg-warning { background: rgba(251, 191, 36, .16); color: var(--amber-400); border-color: rgba(251, 191, 36, .35); }

/* Alertes + toasts */
.alert { position: relative; display: block; padding: .85rem 1rem; margin-bottom: 1rem; border-radius: var(--r); border: 1px solid; font-size: .95rem; animation: alert-in var(--d-ui) var(--ease-out); }
@keyframes alert-in { from { opacity: 0; transform: translateY(-6px); } }
.alert-success { background: var(--pos-bg); border-color: var(--pos-bd); color: var(--pos); }
.alert-danger { background: var(--neg-bg); border-color: var(--neg-bd); color: var(--neg); }
.alert-warning { background: var(--warn-bg); border-color: var(--warn-bd); color: var(--warn); }
.alert-info { background: var(--info-bg); border-color: var(--info-bd); color: var(--info); }
.alert-secondary { background: var(--neutral-bg); border-color: var(--line); color: var(--text-2); }
.alert-dismissible { padding-right: 3rem; }
.alert-dismissible .btn-close { position: absolute; right: .5rem; top: 50%; margin-top: -16px; }
.flash-stack { position: fixed; z-index: 400; top: calc(.9rem + env(safe-area-inset-top)); right: max(.9rem, env(safe-area-inset-right)); width: min(420px, calc(100vw - 1.8rem)); display: flex; flex-direction: column; gap: .6rem; pointer-events: none; }
.flash-stack .alert { pointer-events: auto; margin: 0; display: flex; gap: .6rem; align-items: flex-start; background: var(--surface); box-shadow: var(--shadow-lg); backdrop-filter: blur(12px); animation: toast-in 320ms var(--ease-out); }
.flash-stack .alert > .ic { margin-top: .15rem; }
.flash-stack .alert-success > .ic { color: var(--pos); } .flash-stack .alert-danger > .ic { color: var(--neg); }
.flash-stack .alert-warning > .ic { color: var(--warn); } .flash-stack .alert-info > .ic { color: var(--info); }
.flash-stack .alert { color: var(--text); }
.flash-stack .alert.fade:not(.show) { opacity: 0; transform: translateX(24px) scale(.98); }
.fade { transition: opacity var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out); }
.fade:not(.show) { opacity: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px) scale(.98); } }

/* Tableaux */
.table { --bs-table-bg: transparent; --bs-table-accent-bg: transparent; --bs-table-striped-bg: var(--surface-2); --bs-table-hover-bg: var(--accent-soft); --bs-table-striped-color: var(--text); --bs-table-hover-color: var(--text); --bs-table-active-bg: var(--accent-soft); --bs-table-active-color: var(--text);
  width: 100%; margin-bottom: 0; color: var(--text); border-color: var(--line); border-collapse: collapse; font-size: .93rem; }
.table > :not(caption) > * > * { padding: .8rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-sm > :not(caption) > * > * { padding: .5rem .7rem; }
.table > tbody > tr:last-child > * { border-bottom-width: 0; }
.table thead th { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); white-space: nowrap; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.table thead th:first-child { border-top-left-radius: 10px; } .table thead th:last-child { border-top-right-radius: 10px; }
.table-hover > tbody > tr { transition: background-color var(--d-micro) ease; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: var(--surface-2); color: var(--text); }
@media (hover: hover) { .table-hover > tbody > tr:hover > * { background: var(--accent-soft); color: var(--text); } }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table .text-end { text-align: right; }
.user-link { color: var(--text); font-weight: 600; text-decoration: none; }
@media (hover: hover) { .user-link:hover { color: var(--accent-text); text-decoration: underline; } }
.code-chip { font-family: var(--mono); background: var(--warn-bg); color: var(--warn); border-radius: 8px; padding: .15rem .55rem; font-weight: 700; letter-spacing: .08em; border: 1px solid var(--warn-bd); }
.declined { color: var(--text-3); } .declined td:not(:last-child) { text-decoration: line-through; text-decoration-color: var(--text-3); }

/* Modales : entrée 240 ms ease-out, sortie 160 ms, centrées (pas d'origine de déclencheur) */
.modal { position: fixed; inset: 0; z-index: 1055; display: none; overflow-x: hidden; overflow-y: auto; outline: 0; }
.modal-dialog { position: relative; width: auto; margin: 1rem; pointer-events: none; }
.modal.fade .modal-dialog { opacity: 0; transform: translateY(10px) scale(.96); transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out); }
.modal.show .modal-dialog { opacity: 1; transform: none; transition-duration: var(--d-ui); }
.modal.fade { transition: none; opacity: 1; }
.modal-dialog-centered { display: flex; align-items: center; min-height: calc(100% - 2rem); }
@media (min-width: 576px) { .modal-dialog { max-width: 500px; margin: 1.75rem auto; } .modal-dialog-centered { min-height: calc(100% - 3.5rem); } }
@media (min-width: 992px) { .modal-lg { max-width: 800px; } }
.modal-content { position: relative; display: flex; flex-direction: column; width: 100%; pointer-events: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); outline: 0; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.4rem .4rem; border: 0; }
.modal-title { margin: 0; font-size: 1.15rem; }
.modal-body { padding: .8rem 1.4rem 1.2rem; position: relative; flex: 1 1 auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: .6rem; padding: .8rem 1.4rem 1.3rem; border: 0; flex-wrap: wrap; }
.modal-backdrop { position: fixed; inset: 0; z-index: 1050; background: var(--overlay); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal-backdrop.fade { opacity: 0; transition: opacity var(--d-ui) var(--ease-out); }
.modal-backdrop.show { opacity: 1; }
.modal-open { overflow: hidden; }
.modal-static .modal-dialog { transform: scale(1.02); }
.confirm-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-bottom: .8rem; background: var(--warn-bg); color: var(--warn); }
.confirm-ic.danger { background: var(--neg-bg); color: var(--neg); }

/* Accordéon (Bootstrap collapse, ouverture 240 ms) */
.collapse:not(.show) { display: none; }
.collapsing { height: 0; overflow: hidden; transition: height var(--d-ui) var(--ease-out); }
.accordion { display: flex; flex-direction: column; gap: .7rem; }
.accordion-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; transition: border-color var(--d-ui) ease, box-shadow var(--d-ui) ease; }
.accordion-item:has(.accordion-button:not(.collapsed)) { border-color: var(--teal-500); box-shadow: var(--shadow-md); }
.accordion-header { margin: 0; font-size: inherit; letter-spacing: 0; }
.accordion-button { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: 1.1rem 1.3rem; font: inherit; font-weight: 600; text-align: left; color: var(--text); background: transparent; border: 0; cursor: pointer; transition: background-color var(--d-micro) ease; min-height: 56px; }
.accordion-button::after { content: ""; flex: none; width: 20px; height: 20px; background: currentColor; opacity: .55; transition: transform var(--d-ui) var(--ease-in-out); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.accordion-button:not(.collapsed)::after { transform: rotate(180deg); opacity: 1; color: var(--accent-text); }
.accordion-button:not(.collapsed) { color: var(--accent-text); }
.accordion-button:focus-visible { outline-offset: -3px; border-radius: var(--r-lg); }
.accordion-body { padding: 0 1.3rem 1.2rem; color: var(--text-2); }
.accordion-collapse.show .accordion-body { animation: fade-up var(--d-ui) var(--ease-out); }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }

/* Listes, barres, onglets */
.list-group { display: flex; flex-direction: column; gap: .5rem; padding: 0; margin: 0; }
.list-group-item { display: flex; border: 1px solid var(--line); border-radius: var(--r) !important; padding: .85rem 1rem; background: var(--surface); cursor: pointer; transition: border-color var(--d-micro) ease, background-color var(--d-micro) ease; }
.list-group-item:has(input:checked) { border-color: var(--teal-500); background: var(--accent-soft); }
.list-group-item.opacity-75 { cursor: not-allowed; }
.progress { height: 8px; background: var(--surface-sunk); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; background: var(--teal-500); transform-origin: left; animation: bar-in 600ms var(--ease-out) both; }
.progress-bar.bg-success { background: linear-gradient(90deg, var(--teal-500), var(--green-500)); }
.progress-bar.bg-danger { background: linear-gradient(90deg, var(--amber-500), var(--red-500)); }
@keyframes bar-in { from { transform: scaleX(0); } }
.seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; padding: .3rem; border-radius: 14px; background: var(--surface-sunk); border: 1px solid var(--line); margin-bottom: 1rem; list-style: none; }
.seg a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 10px; font-weight: 600; font-size: .9rem; color: var(--text-2); text-decoration: none; min-height: 40px; transition: background-color var(--d-micro) ease, color var(--d-micro) ease, transform var(--d-micro) var(--ease-out); }
.seg a:active { transform: scale(.96); }
.seg a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
@media (hover: hover) { .seg a:not(.active):hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); } }

/* Illustrations d'états vides */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 2.4rem 1rem; color: var(--text-3); text-align: center; }
.empty-state strong { color: var(--text); font-size: 1.02rem; }
.empty-state > span { max-width: 28rem; font-size: .92rem; }
.es-art { position: relative; width: 92px; height: 92px; display: grid; place-items: center; margin-bottom: .6rem; color: var(--accent-text); animation: pop-in var(--d-page) var(--ease-out) both; }
.es-art::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 25%, var(--accent-soft), transparent 70%), var(--surface-sunk); border: 1px dashed var(--line-strong); }
.es-art::after { content: ""; position: absolute; right: 6px; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--teal-400); opacity: .55; box-shadow: -66px 52px 0 -3px var(--amber-400); }
.es-art .ic { position: relative; width: 38px; height: 38px; stroke-width: 1.5; }
@keyframes pop-in { from { opacity: 0; transform: scale(.9); } }

/* ---------- 4. Site public ---------- */
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-dark { color: var(--text); } .brand-dark:hover { color: var(--text); }
.brand-mark { position: relative; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, var(--teal-400), var(--teal-600)); color: #fff; display: inline-grid; place-items: center; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -4px rgba(14, 133, 118, .7); }

.pub-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 90; padding-top: env(safe-area-inset-top); }
.pub-nav::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; background: rgba(6, 26, 51, .8); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); box-shadow: 0 1px 0 rgba(255, 255, 255, .08), 0 12px 28px -14px rgba(0, 0, 0, .55); transition: opacity var(--d-ui) var(--ease-out); }
.pub-nav.scrolled::before, body.menu-open .pub-nav::before { opacity: 1; }
.pub-nav .container { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; }
.pub-menu { display: none; }
.pub-link { white-space: nowrap; display: inline-flex; align-items: center; color: #cfd9e8; text-decoration: none; padding: .5rem .85rem; border-radius: 10px; font-weight: 500; font-size: .95rem; transition: color var(--d-micro) ease, background-color var(--d-micro) ease, transform var(--d-micro) var(--ease-out); }
.pub-link:active { transform: scale(.96); }
.pub-link.active { color: #fff; background: rgba(255, 255, 255, .1); }
@media (hover: hover) { .pub-link:hover { color: #fff; background: rgba(255, 255, 255, .08); } }
.nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -8px; border: 0; background: none; color: #fff; border-radius: 12px; cursor: pointer; transition: transform var(--d-micro) var(--ease-out); }
.nav-toggle:active { transform: scale(.92); }
.nav-toggle .bars { position: relative; width: 22px; height: 14px; }
.nav-toggle .bars i { position: absolute; left: 0; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--d-ui) var(--ease-in-out), opacity var(--d-micro) ease; }
.nav-toggle .bars i:nth-child(1) { top: 0; } .nav-toggle .bars i:nth-child(2) { top: 6px; } .nav-toggle .bars i:nth-child(3) { top: 12px; }
.menu-open .nav-toggle .bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .nav-toggle .bars i:nth-child(2) { opacity: 0; }
.menu-open .nav-toggle .bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 991.98px) {
  .pub-menu { display: flex; flex-direction: column; gap: .25rem; position: fixed; inset: 0; z-index: -2; padding: calc(var(--nav-h) + env(safe-area-inset-top) + 1rem) max(1.25rem, env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left)); background: rgba(6, 26, 51, .96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out), visibility 0s linear var(--d-ui); }
  .menu-open .pub-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .pub-menu .pub-link { font-size: 1.25rem; font-weight: 600; padding: .9rem 1rem; min-height: 56px; opacity: 0; transform: translateY(8px); transition: opacity var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out), background-color var(--d-micro); }
  .menu-open .pub-menu .pub-link, .menu-open .pub-menu .btn { opacity: 1; transform: none; }
  .menu-open .pub-menu > :nth-child(1) { transition-delay: 40ms; } .menu-open .pub-menu > :nth-child(2) { transition-delay: 80ms; }
  .menu-open .pub-menu > :nth-child(3) { transition-delay: 120ms; } .menu-open .pub-menu > :nth-child(4) { transition-delay: 160ms; }
  .menu-open .pub-menu > :nth-child(5) { transition-delay: 200ms; } .menu-open .pub-menu > :nth-child(6) { transition-delay: 240ms; }
  .menu-open .pub-menu > :nth-child(7) { transition-delay: 280ms; }
  .pub-menu .btn { margin-top: 1rem; opacity: 0; transform: translateY(8px); transition: opacity var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out); }
}
@media (min-width: 992px) {
  .nav-toggle { display: none; }
  .pub-menu { display: flex; align-items: center; gap: .15rem; }
}

.hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: calc(var(--nav-h) + 4.5rem) 0 6rem;
  background: radial-gradient(60rem 36rem at 85% -10%, rgba(18, 165, 148, .35), transparent 60%), radial-gradient(40rem 30rem at -5% 40%, rgba(67, 103, 154, .45), transparent 60%), linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, #10345f 100%); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%); mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%); }
.hero .eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem .35rem .45rem; border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); font-size: .82rem; font-weight: 600; color: #d8e4f3; margin-bottom: 1.4rem; }
.hero .eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-300); box-shadow: 0 0 0 4px rgba(111, 214, 201, .25); margin-left: .3rem; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.06; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, var(--teal-300), #8fe6da 50%, #b9f1ea); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #c3d1e4; max-width: 34rem; font-size: 1.15rem; line-height: 1.6; }
.hero-trust { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 2rem; font-size: .88rem; color: #aebfd6; }
.hero-trust span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-trust .ic { color: var(--teal-300); }
.hero-in > * { animation: rise var(--d-page) var(--ease-out) both; }
.hero-in > :nth-child(2) { animation-delay: 70ms; } .hero-in > :nth-child(3) { animation-delay: 140ms; }
.hero-in > :nth-child(4) { animation-delay: 210ms; } .hero-in > :nth-child(5) { animation-delay: 280ms; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* Maquette d'application */
.phone-stage { position: relative; display: flex; justify-content: center; padding: 1rem 0; animation: rise var(--d-page) var(--ease-out) 150ms both; }
.phone-stage::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; top: 8%; left: 15%; border-radius: 50%; background: radial-gradient(circle, rgba(18, 165, 148, .45), transparent 65%); filter: blur(30px); z-index: -1; }
.phone { position: relative; width: min(300px, 78vw); padding: 10px; border-radius: 44px; background: linear-gradient(160deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05)); border: 1px solid rgba(255, 255, 255, .22); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .3); transform: perspective(1400px) rotateY(-9deg) rotateX(3deg) rotateZ(1deg); }
.phone-screen { border-radius: 35px; background: linear-gradient(180deg, #0f2140, #0a1730); padding: 1.1rem 1.1rem 1.2rem; min-height: 470px; color: #fff; overflow: hidden; position: relative; }
.phone-screen::before { content: ""; display: block; width: 84px; height: 22px; border-radius: 99px; background: #050b16; margin: 0 auto 1rem; }
.ph-head { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: #9fb3cf; }
.ph-av { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(145deg, var(--teal-400), var(--teal-700)); display: grid; place-items: center; font-size: .65rem; font-weight: 700; color: #fff; }
.ph-balance { font-size: 2rem; font-weight: 800; letter-spacing: -.035em; margin: .25rem 0 .1rem; }
.ph-delta { font-size: .76rem; color: #6ee7a8; display: inline-flex; align-items: center; gap: .3rem; background: rgba(34, 197, 94, .14); padding: .15rem .5rem; border-radius: 99px; }
.ph-spark { margin: .8rem 0 .5rem; height: 64px; }
.ph-spark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.js .ph-spark svg { clip-path: inset(-4px 100% -4px 0); transition: clip-path 900ms var(--ease-out) 350ms; }
.js .phone-ready .ph-spark svg { clip-path: inset(-4px -4px -4px 0); }
.ph-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .8rem 0 1rem; }
.ph-actions span { display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .66rem; color: #b8c8de; padding: .55rem .2rem; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.ph-actions .ic { color: var(--teal-300); }
.ph-list { display: flex; flex-direction: column; gap: .15rem; }
.ph-item { display: flex; align-items: center; gap: .65rem; padding: .55rem .5rem; border-radius: 14px; font-size: .8rem; transition: opacity var(--d-ui) var(--ease-out), transform var(--d-ui) var(--ease-out); }
.js .ph-item { opacity: 0; transform: translateY(12px); }
.js .ph-item.in { opacity: 1; transform: none; }
.ph-item.hl { background: rgba(18, 165, 148, .16); }
.ph-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: rgba(255, 255, 255, .08); color: #cfe0f5; }
.ph-ico.in { background: rgba(34, 197, 94, .16); color: #6ee7a8; }
.ph-item b { display: block; font-weight: 600; font-size: .82rem; }
.ph-item small { color: #8aa0bf; font-size: .7rem; }
.ph-item .ph-amt { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ph-amt.up { color: #6ee7a8; }
.float-chip { position: absolute; display: flex; align-items: center; gap: .55rem; padding: .6rem .85rem; border-radius: 16px; font-size: .78rem; font-weight: 600; color: #fff; background: rgba(15, 33, 64, .72); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow-lg); transition: opacity var(--d-page) var(--ease-out), transform var(--d-page) var(--ease-out); }
.js .float-chip { opacity: 0; transform: translateY(14px) scale(.96); }
.float-chip small { display: block; font-weight: 400; color: #9fb3cf; font-size: .68rem; }
.float-chip .ic-bubble { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(18, 165, 148, .25); color: var(--teal-300); }
.float-chip.c1 { left: -4%; top: 22%; } .float-chip.c2 { right: -2%; bottom: 14%; }
.js .phone-ready .float-chip { opacity: 1; transform: none; }
.js .phone-ready .float-chip.c2 { transition-delay: 220ms; }
@media (max-width: 575.98px) { .float-chip.c1 { left: -2%; top: 10%; } .float-chip.c2 { right: -2%; bottom: 6%; } }

.page-hero { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: calc(var(--nav-h) + 3rem) 0 3.2rem; background: radial-gradient(40rem 20rem at 90% -20%, rgba(18, 165, 148, .35), transparent 60%), linear-gradient(160deg, var(--navy-900), var(--navy-800)); }
.page-hero h1 { color: #fff; font-weight: 800; letter-spacing: -.035em; margin-bottom: .4rem; }
.page-hero p { color: #b9c8dc; margin: 0; font-size: 1.1rem; }
.page-hero .container { animation: rise var(--d-page) var(--ease-out) both; }

.section { padding: 5rem 0; }
.section.alt { background: var(--bg); }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 3rem; }
.section-head .kicker { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: .6rem; }
.section-head p { color: var(--text-3); font-size: 1.08rem; margin-bottom: 0; }
.feat { position: relative; height: 100%; padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: transform var(--d-ui) var(--ease-out), box-shadow var(--d-ui) ease, border-color var(--d-ui) ease; }
.feat:active { transform: scale(.985); }
@media (hover: hover) and (pointer: fine) { .feat:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(18, 165, 148, .45); } }
.feat .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem; color: var(--accent-text); background: linear-gradient(145deg, var(--accent-soft), transparent), var(--surface-sunk); border: 1px solid var(--line); }
.feat h3 { margin-bottom: .4rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-md); }
.stat { background: var(--surface); padding: 2rem 1rem; text-align: center; }
.stat-n { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; background: linear-gradient(135deg, var(--navy-700), var(--teal-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-color-scheme: dark) { .stat-n { background-image: linear-gradient(135deg, #fff, var(--teal-300)); } }
.stat-l { margin-top: .5rem; color: var(--text-3); font-size: .9rem; }
@media (max-width: 767.98px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.how { counter-reset: how; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.how > div { position: relative; padding: 1.6rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.how > div::before { counter-increment: how; content: counter(how); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; margin-bottom: 1rem; font-weight: 800; color: #fff; background: linear-gradient(145deg, var(--teal-500), var(--teal-700)); box-shadow: 0 6px 14px -4px rgba(14, 133, 118, .6); }
.how h3 { font-size: 1.1rem; } .how p { color: var(--text-3); margin: 0; }
@media (max-width: 767.98px) { .how { grid-template-columns: 1fr; } }
.cta { position: relative; overflow: hidden; isolation: isolate; text-align: center; color: #fff; padding: 4rem 1.5rem; border-radius: 28px; background: radial-gradient(30rem 16rem at 100% 0, rgba(255, 255, 255, .2), transparent 60%), linear-gradient(135deg, var(--teal-600), var(--teal-800)); box-shadow: var(--shadow-lg); }
.cta::after { content: ""; position: absolute; width: 22rem; aspect-ratio: 1; left: -8rem; bottom: -12rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); box-shadow: 0 0 0 40px rgba(255, 255, 255, .04), 0 0 0 80px rgba(255, 255, 255, .03); z-index: -1; }
.cta h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; }
.cta .btn-light { --b-bg: #fff; --b-fg: var(--teal-800); --b-bd: #fff; --b-sh: 0 10px 24px -8px rgba(0, 0, 0, .35); }
@media (hover: hover) { .cta .btn-light:hover { --b-fg: var(--teal-900); transform: translateY(-2px); } .cta .btn-light:active { transform: scale(.97); } }
.price-card { position: relative; height: 100%; padding: 1.8rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: transform var(--d-ui) var(--ease-out), box-shadow var(--d-ui) ease; }
.price-card.pop { border-color: var(--teal-500); box-shadow: 0 0 0 1px var(--teal-500), var(--shadow-md); }
.price-card.pop::before { content: "Populaire"; position: absolute; top: -12px; left: 1.6rem; background: var(--teal-600); color: #fff; font-size: .72rem; font-weight: 700; padding: .2rem .7rem; border-radius: 99px; letter-spacing: .04em; text-transform: uppercase; }
@media (hover: hover) and (pointer: fine) { .price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); } }
.price-card .price { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; margin: .8rem 0 1.2rem; }
.pub-footer { background: var(--navy-900); color: #fff; padding: 4rem 0 calc(1.5rem + env(safe-area-inset-bottom)); }
.pub-footer a { color: #b9c8dc; text-decoration: none; transition: color var(--d-micro); display: inline-block; padding: .2rem 0; }
@media (hover: hover) { .pub-footer a:hover { color: #fff; } }
.pub-footer h6 { color: #fff; margin-bottom: .8rem; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.pub-footer .brand:hover { color: #fff; }
.pub-footer p { color: #b9c8dc; }
.pub-footer .opacity-75 { color: #aebfd6; opacity: 1 !important; }

/* Apparition au défilement */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity var(--d-page) var(--ease-out), transform var(--d-page) var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- 5. Authentification ---------- */
.auth-wrap { position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left)); background: radial-gradient(48rem 30rem at 100% 0%, rgba(18, 165, 148, .16), transparent 60%), radial-gradient(40rem 30rem at 0% 100%, rgba(67, 103, 154, .2), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 2.2rem; box-shadow: var(--shadow-lg); animation: rise var(--d-page) var(--ease-out) both; }
.auth-card.wide { max-width: 660px; }
.auth-card h1 { font-size: 1.55rem; }
.auth-card > p { color: var(--text-3); }
.steps { position: relative; display: flex; margin-bottom: 1.8rem; }
.step { position: relative; flex: 1; text-align: center; font-size: .8rem; color: var(--text-3); font-weight: 500; transition: color var(--d-ui) ease; }
.step::before { content: ""; position: absolute; top: 15px; left: calc(-50% + 20px); right: calc(50% + 20px); height: 2px; background: var(--line-strong); }
.step::after { content: ""; position: absolute; top: 15px; left: calc(-50% + 20px); right: calc(50% + 20px); height: 2px; background: var(--teal-500); transform: scaleX(0); transform-origin: left; transition: transform var(--d-page) var(--ease-in-out); }
.step:first-child::before, .step:first-child::after { display: none; }
.step.active::after, .step.done::after { transform: none; }
.step .dot { position: relative; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto .4rem; font-weight: 700; font-size: .85rem; background: var(--surface-sunk); border: 1.5px solid var(--line-strong); color: var(--text-3); transition: background-color var(--d-ui) ease, border-color var(--d-ui) ease, color var(--d-ui) ease, transform var(--d-ui) var(--ease-spring); }
.step.active .dot { background: var(--teal-600); border-color: var(--teal-600); color: #fff; transform: scale(1.1); box-shadow: 0 0 0 5px rgba(18, 165, 148, .2); }
.step.done .dot { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
@media (prefers-color-scheme: dark) { .step.done .dot { background: var(--teal-800); border-color: var(--teal-700); } }
.step.active { color: var(--text); font-weight: 600; }
.reg-steps { display: grid; overflow: hidden; margin: 0 -4px; padding: 0 4px 4px; }
.reg-step { grid-area: 1 / 1; min-width: 0; }
.reg-step[hidden] { display: none; }
.strength { height: 6px; border-radius: 99px; background: var(--surface-sunk); overflow: hidden; margin-top: .55rem; }
.strength span { display: block; width: 100%; height: 100%; border-radius: 99px; background: var(--red-500); transform: scaleX(0); transform-origin: left; transition: transform var(--d-ui) var(--ease-out), background-color var(--d-ui) ease; }
.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; max-height: 46vh; overflow-y: auto; padding: 4px; margin: -4px; }
.country { position: relative; display: block; cursor: pointer; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r); padding: .8rem .4rem .7rem; text-align: center; font-size: .86rem; font-weight: 500; min-height: 44px; transition: transform var(--d-micro) var(--ease-out), border-color var(--d-micro) ease, background-color var(--d-micro) ease, box-shadow var(--d-micro) ease; }
.country input { position: absolute; opacity: 0; pointer-events: none; }
.country .flag { display: block; margin: 0 auto .45rem; width: 42px; height: 28px; transition: transform var(--d-ui) var(--ease-spring); }
.country::after { content: ""; position: absolute; top: 7px; right: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--teal-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M5.5 10.5l3 3 6-6.5'/%3E%3C/svg%3E") center / 75% no-repeat; opacity: 0; transform: scale(.5); transition: opacity var(--d-micro) ease, transform var(--d-ui) var(--ease-spring); }
@media (hover: hover) and (pointer: fine) { .country:hover { transform: translateY(-2px); border-color: rgba(18, 165, 148, .6); box-shadow: var(--shadow-md); } .country:hover .flag { transform: scale(1.06); } }
.country:active { transform: scale(.96); }
.country:has(input:checked) { border-color: var(--teal-500); background: var(--accent-soft); font-weight: 600; box-shadow: 0 0 0 3px rgba(18, 165, 148, .18); }
.country:has(input:checked)::after { opacity: 1; transform: none; }
.country:has(input:checked) .flag { transform: scale(1.08); }
.country:has(input:focus-visible) { outline: 2px solid var(--teal-500); outline-offset: 2px; }
/* Écran de succès : coche révélée */
.success-box { text-align: center; }
.success-box h2 { justify-content: center; }
.tick { position: relative; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.2rem; color: var(--pos); background: var(--pos-bg); animation: pop-in var(--d-page) var(--ease-spring) both; }
.tick::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--pos); opacity: 0; animation: ring 700ms var(--ease-out) 250ms both; }
.tick svg { width: 36px; height: 36px; stroke-width: 2.6; clip-path: inset(0 100% 0 0); animation: reveal-x 380ms var(--ease-in-out) 260ms forwards; }
@keyframes reveal-x { to { clip-path: inset(-2px -2px -2px -2px); } }
@keyframes ring { from { opacity: .7; transform: scale(.8); } to { opacity: 0; transform: scale(1.45); } }
.success-box > :not(.tick) { animation: fade-up var(--d-page) var(--ease-out) 320ms both; }
.iban-box { font-family: var(--mono); font-size: 1.05rem; letter-spacing: .04em; background: var(--surface-sunk); border: 1px dashed var(--line-strong); border-radius: var(--r); padding: .9rem; word-break: break-all; }

/* ---------- 6. Coque client / admin ---------- */
div.shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; z-index: 100; width: 264px; flex: none; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 1rem .8rem calc(1rem + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; color: #fff; background: radial-gradient(18rem 14rem at 0 0, rgba(18, 165, 148, .18), transparent 70%), linear-gradient(180deg, var(--navy-800), var(--navy-900)); border-right: 1px solid rgba(255, 255, 255, .06); }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .4rem .55rem 1.2rem; }
.side-top .brand { font-size: 1.02rem; gap: .5rem; }
.side-nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.side-link { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 44px; padding: .6rem .8rem; border-radius: 12px; color: #c0cde0; font-weight: 500; font-size: .95rem; text-decoration: none; transition: background-color var(--d-micro) ease, color var(--d-micro) ease, transform var(--d-micro) var(--ease-out); }
.side-link .ic { opacity: .85; }
.side-link:active { transform: scale(.97); }
@media (hover: hover) { .side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; } }
.side-link.active { color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); font-weight: 600; }
.side-link.active .ic { color: var(--teal-300); opacity: 1; }
.side-link.active::before { content: ""; position: absolute; left: -.8rem; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--teal-400); }
.side-link.logout { margin-top: .5rem; color: #aebfd6; }
.side-badge { margin-left: auto; min-width: 22px; text-align: center; background: var(--amber-400); color: #2b1a00; border-radius: 99px; font-size: .72rem; font-weight: 700; padding: .08rem .5rem; font-variant-numeric: tabular-nums; }
.side-user { display: flex; align-items: center; gap: .7rem; padding: .75rem .7rem; margin: .8rem 0 .2rem; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07); }
.side-user .opacity-75 { color: #aebfd6; opacity: 1 !important; }
.avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: #fff; background: linear-gradient(145deg, var(--teal-400), var(--teal-700)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.avatar.lg { width: 76px; height: 76px; font-size: 1.5rem; }
.side-search { position: relative; display: flex; align-items: center; gap: .5rem; padding: 0 .75rem; margin-bottom: .9rem; border-radius: 12px; color: #aebfd6; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .08); transition: border-color var(--d-micro), background-color var(--d-micro); }
.side-search:focus-within { background: rgba(255, 255, 255, .12); border-color: rgba(111, 214, 201, .6); }
.side-search input { background: none; border: 0; outline: 0; color: #fff; width: 100%; min-height: 42px; font-size: .92rem; font-family: inherit; }
.side-search input::placeholder { color: #94a8c4; }
.side-search kbd { font: 600 .68rem var(--font); color: #aebfd6; border: 1px solid rgba(255, 255, 255, .2); border-radius: 6px; padding: .05rem .35rem; }
.side-search:focus-within kbd { display: none; }
.main { flex: 1; min-width: 0; }
.topbar { display: none; align-items: center; gap: .8rem; position: sticky; top: 0; z-index: 60; padding: calc(.55rem + env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) .55rem max(1rem, env(safe-area-inset-left)); background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--line); }
.topbar strong { font-size: 1.02rem; letter-spacing: -.01em; }
.content { padding: 2rem 2.2rem 3rem; max-width: 1320px; }
.side-backdrop { position: fixed; inset: 0; z-index: 90; background: var(--overlay); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity var(--d-ui) var(--ease-out), visibility 0s linear var(--d-ui); }
.side-backdrop.show { opacity: 1; visibility: visible; transition-delay: 0s; }
@media (max-width: 991.98px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); padding-left: max(.8rem, env(safe-area-inset-left)); transform: translateX(-100%); visibility: hidden; box-shadow: none; transition: transform 320ms var(--ease-drawer), visibility 0s linear 320ms; touch-action: pan-y; }
  .side.open { transform: none; visibility: visible; box-shadow: var(--shadow-lg); transition-delay: 0s; }
  .side.dragging { transition: none; }
  .topbar { display: flex; }
  .content { padding: 1.2rem max(1rem, env(safe-area-inset-right)) calc(2rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
}

/* ---------- 7. Client ---------- */
.page-title { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; font-size: clamp(1.5rem, 2vw + .8rem, 2rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: 1.4rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.3rem 1.4rem; margin-bottom: 1.25rem; box-shadow: var(--shadow-sm); }
.panel > h2, .panel-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-size: 1.02rem; font-weight: 700; letter-spacing: -.015em; margin-bottom: 1rem; }
.panel > h2 > span { display: inline-flex; align-items: center; gap: .5rem; }
.panel > h2 .ic { color: var(--accent-text); }
.panel.p-0 { padding: 0 !important; }
.row.panel { margin-left: 0; margin-right: 0; }
.balance-card { position: relative; overflow: hidden; isolation: isolate; color: #fff; border-radius: var(--r-xl); padding: 1.8rem; margin-bottom: 1.25rem; background: radial-gradient(22rem 14rem at 100% 0, rgba(18, 165, 148, .5), transparent 65%), linear-gradient(135deg, var(--navy-800), #164178); box-shadow: var(--shadow-md); }
.balance-card::after { content: ""; position: absolute; z-index: -1; width: 18rem; aspect-ratio: 1; right: -6rem; bottom: -10rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 0 0 36px rgba(255, 255, 255, .03), 0 0 0 72px rgba(255, 255, 255, .02); }
.balance-card .opacity-75 { font-size: .9rem; font-weight: 500; letter-spacing: .01em; }
.balance-card .amount { font-size: clamp(2.2rem, 5vw, 3.1rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; margin: .2rem 0; }
.balance-card .iban { font-family: var(--mono); font-size: .88rem; opacity: .9; word-break: break-all; }
.kpi { height: 100%; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.kpi .label { color: var(--text-3); font-size: .85rem; font-weight: 500; }
.kpi .label .text-muted { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text) !important; }
.kpi .value { font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; margin-top: .25rem; overflow-wrap: anywhere; }
.quick { display: flex; flex-direction: column; align-items: center; gap: .55rem; padding: 1.1rem .5rem; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem; text-align: center; transition: transform var(--d-micro) var(--ease-out), box-shadow var(--d-ui) ease, border-color var(--d-ui) ease; touch-action: manipulation; }
.quick .ic { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); transition: transform var(--d-ui) var(--ease-spring); }
.quick:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .quick:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(18, 165, 148, .5); color: var(--text); } .quick:hover .ic { transform: scale(1.08); } }
.notif { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; margin-bottom: .6rem; border-radius: var(--r); border: 1px solid var(--info-bd); background: var(--info-bg); animation: notif-in var(--d-ui) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms); }
.notif .n-ic { flex: none; margin-top: .1rem; color: var(--info); }
.notif.success { background: var(--pos-bg); border-color: var(--pos-bd); } .notif.success .n-ic { color: var(--pos); }
.notif.warning { background: var(--warn-bg); border-color: var(--warn-bd); } .notif.warning .n-ic { color: var(--warn); }
.notif.danger { background: var(--neg-bg); border-color: var(--neg-bd); } .notif.danger .n-ic { color: var(--neg); }
.notif .btn-light { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.notif.out { opacity: 0; transform: translateX(24px); transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out); pointer-events: none; animation: none; }
@keyframes notif-in { from { opacity: 0; transform: translateY(8px); } }
.tx-row { display: flex; align-items: center; gap: .85rem; padding: .75rem .5rem; margin: 0 -.5rem; border-bottom: 1px solid var(--line); border-radius: 12px; transition: background-color var(--d-micro) ease; }
.tx-row:last-child { border-bottom: 0; }
@media (hover: hover) { .tx-row:hover { background: var(--surface-2); } }
.js [data-stagger] > .tx-row { animation: fade-up var(--d-ui) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms + 120ms); }
.tx-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.tx-ico.in { background: var(--pos-bg); color: var(--pos); } .tx-ico.out { background: var(--neg-bg); color: var(--neg); }
.chart-box { position: relative; height: 260px; }
.info-card { height: 100%; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.info-card .ico { color: var(--accent-text); margin-top: .1rem; }
.pending-note { font-size: .85rem; }

/* ---------- 8. Carte bancaire ---------- */
.card-scene { perspective: 1200px; max-width: 380px; margin: 0 auto; }
.card-flip { position: relative; aspect-ratio: 1.586; width: 100%; transform-style: preserve-3d; transition: transform 520ms var(--ease-spring); }
.card-flip.flipped { transform: rotateY(180deg); }
.bank-card { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 100%; aspect-ratio: 1.586; max-width: 380px; padding: 1.35rem 1.4rem; border-radius: 20px; color: #fff; overflow: hidden; isolation: isolate; background: radial-gradient(18rem 12rem at 100% 0, rgba(111, 214, 201, .55), transparent 60%), linear-gradient(135deg, #0b2545, #1d4e89 58%, #12a594); box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 20px 40px -14px rgba(11, 37, 69, .6), 0 4px 10px rgba(11, 37, 69, .2); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card-flip .bank-card { position: absolute; inset: 0; }
.card-flip .bank-card.back { transform: rotateY(180deg); padding: 1.35rem 0; }
.bank-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 2px, transparent 2px 9px); }
.bank-card::after { content: ""; position: absolute; top: -40%; bottom: -40%; width: 45%; left: -70%; z-index: 1; pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .32), transparent); transform: skewX(-18deg); transition: transform 700ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .bank-card:hover::after { transform: translateX(520%) skewX(-18deg); } }
.bank-card.blocked { background: linear-gradient(135deg, #3f1717, #7f1d1d); }
.bank-card.pending_activation, .bank-card.inactive, .bank-card.expired { background: radial-gradient(18rem 12rem at 100% 0, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(135deg, #2c3646, #5b6779); }
.bank-card .chip { position: relative; width: 46px; height: 35px; border-radius: 8px; background: linear-gradient(135deg, #f7dd8a, #d9a22e); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); overflow: hidden; }
.bank-card .chip::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 33%, rgba(0, 0, 0, .22) 33% calc(33% + 1px), transparent calc(33% + 1px) 66%, rgba(0, 0, 0, .22) 66% calc(66% + 1px), transparent calc(66% + 1px)), linear-gradient(0deg, transparent 45%, rgba(0, 0, 0, .22) 45% calc(45% + 1px), transparent calc(45% + 1px)); }
.bank-card .num { font-family: var(--mono); font-size: clamp(1.02rem, 4.4vw, 1.3rem); letter-spacing: .09em; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); font-variant-numeric: tabular-nums; }
.bank-card .brand-name { font-weight: 800; font-style: italic; letter-spacing: -.02em; }
.mag { height: 14%; background: #0a0f18; margin-bottom: 7%; }
.sig { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; margin: 0 1.4rem; padding: .5rem .8rem; border-radius: 6px; background: repeating-linear-gradient(135deg, #f1f1f1 0 6px, #e1e1e1 6px 12px); color: #0b1220; }
.sig .cvv { font-family: var(--mono); font-weight: 800; letter-spacing: .15em; font-size: 1.1rem; }
.sig small { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: #556; margin-right: auto; }
.card-actions { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: 1.1rem; flex-wrap: wrap; }
.code-inputs { display: flex; gap: .5rem; justify-content: center; }
.code-inputs input { width: 48px; height: 58px; text-align: center; font: 700 1.5rem var(--mono); color: var(--text); background: var(--field-bg); border: 1.5px solid var(--line-strong); border-radius: var(--r); padding: 0; transition: border-color var(--d-micro) ease, box-shadow var(--d-micro) ease, transform var(--d-micro) var(--ease-out); }
.code-inputs input:focus { outline: 0; border-color: var(--teal-500); box-shadow: 0 0 0 4px rgba(18, 165, 148, .2); transform: translateY(-2px); }
.code-inputs input.filled { border-color: var(--teal-600); background: var(--accent-soft); animation: key-pop 180ms var(--ease-out); }
@keyframes key-pop { 0% { transform: scale(.88); } 60% { transform: scale(1.07); } 100% { transform: scale(1); } }
@media (max-width: 400px) { .code-inputs { gap: .35rem; } .code-inputs input { width: 42px; height: 54px; } }

/* ---------- 9. Chat ---------- */
.chat-box { height: 440px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .5rem; padding: 1rem; border-radius: var(--r-lg); background: var(--surface-sunk); border: 1px solid var(--line); }
.bubble { max-width: min(78%, 34rem); padding: .6rem .9rem; border-radius: 18px; font-size: .95rem; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; white-space: pre-wrap; box-shadow: var(--shadow-sm); }
.bubble small { display: block; font-size: .7rem; opacity: .75; margin-top: .2rem; }
.bubble.me { align-self: flex-end; color: #fff; border-bottom-right-radius: 6px; background: linear-gradient(160deg, var(--teal-600), var(--teal-700)); transform-origin: bottom right; }
.bubble.them { align-self: flex-start; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; transform-origin: bottom left; }
.bubble.pop { animation: bubble-in var(--d-ui) var(--ease-out); }
@keyframes bubble-in { from { opacity: 0; transform: translateY(10px) scale(.94); } }
.bubble.sending { opacity: .65; } .bubble.failed { background: var(--red-600); }
.chat-form { display: flex; gap: .6rem; margin-top: .9rem; align-items: flex-end; }
.chat-form textarea { resize: none; max-height: 140px; border-radius: 22px; padding-left: 1.1rem; }
.chat-form .btn { width: 46px; height: 46px; padding: 0; border-radius: 50%; flex: none; }
.chat-list-item { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); min-height: 60px; transition: background-color var(--d-micro) ease; }
.chat-list-item.active { background: var(--accent-soft); }
@media (hover: hover) { .chat-list-item:hover { background: var(--surface-2); } .chat-list-item.active:hover { background: var(--accent-soft); } }
.chat-layout .chat-box { height: calc(100vh - 340px); height: calc(100dvh - 340px); min-height: 320px; }
@media (max-width: 991.98px) { .chat-layout.has-conv .chat-list-col { display: none; } .chat-layout:not(.has-conv) .chat-conv-col { display: none; } .chat-box { height: calc(100dvh - 300px); min-height: 280px; } }

/* ---------- 10. Admin ---------- */
.only-mobile { display: none; }
@media (max-width: 767.98px) { .only-desktop { display: none; } .only-mobile { display: block; } }
.user-card { padding: 1rem; margin-bottom: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.user-card .d-flex > *, .tx-row > *, .notif > *, .info-card .d-flex > * { min-width: 0; }
.user-card, .tx-row, .kpi, .bubble { overflow-wrap: anywhere; }
.search-group h3 { display: flex; align-items: center; gap: .5rem; font-size: 1rem; margin-bottom: .6rem; }
.admin .content { max-width: 1480px; }
.admin .table { font-size: .9rem; }
.admin .table > :not(caption) > * > * { padding: .65rem .8rem; }
.mail-body { white-space: pre-wrap; padding: 1rem; border-radius: var(--r); background: var(--surface-sunk); border: 1px solid var(--line); }
.ms-box { max-height: 200px; overflow: auto; padding: .5rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-sunk), var(--surface-2), var(--surface-sunk)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; margin: .7rem 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
/* Recherche globale en direct */
.search-pop { position: fixed; z-index: 500; width: min(420px, calc(100vw - 1.5rem)); max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding: .4rem; border-radius: var(--r-lg); background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top left; visibility: hidden; transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out), visibility 0s linear 160ms; }
.search-pop.show { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.sp-h { display: flex; align-items: center; justify-content: space-between; padding: .5rem .7rem .2rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); }
.sp-i { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .55rem .7rem; border-radius: 10px; color: var(--text); text-decoration: none; font-size: .9rem; min-height: 44px; }
.sp-i:hover, .sp-i:focus-visible { background: var(--accent-soft); color: var(--text); outline: none; }
.sp-i small { color: var(--text-3); display: block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-empty { padding: 1.2rem; text-align: center; color: var(--text-3); font-size: .9rem; }
.sp-all { display: block; text-align: center; padding: .6rem; font-size: .85rem; font-weight: 600; border-top: 1px solid var(--line); margin-top: .3rem; }
.sp-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--teal-500); animation: spin 700ms linear infinite; }

/* Tableaux → cartes sur mobile (étiquettes posées par app.js) */
@media (max-width: 767.98px) {
  .table.rt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .table.rt, .table.rt tbody, .table.rt tr, .table.rt td { display: block; width: 100%; }
  .table.rt tr { padding: .8rem .9rem; margin-bottom: .7rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm); }
  .table.rt > :not(caption) > * > * { padding: .3rem 0; border: 0; background: none; text-align: left; box-shadow: none; }
  .table.rt td { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; text-align: right !important; }
  .table.rt td::before { content: attr(data-label); flex: none; max-width: 40%; text-align: left; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding-top: .15rem; }
  .table.rt td[data-label=""]::before, .table.rt td.t-actions::before { display: none; }
  .table.rt td.t-actions { justify-content: flex-start; flex-wrap: wrap; gap: .4rem; padding-top: .6rem; margin-top: .3rem; border-top: 1px solid var(--line); }
  .table.rt td > div { text-align: right; min-width: 0; }
  .table.rt td > .t-val > div { text-align: right; }
  .table-hover > tbody > tr:hover > * { background: none; }
  .table-responsive:has(.rt) { overflow: visible; }
}

/* ---------- 11. Mouvement : préférences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js [data-reveal] { transform: none; transition: opacity 200ms ease; }
  .js [data-reveal].in { opacity: 1; }
  .pub-menu .pub-link, .pub-menu .btn, .js .ph-item, .js .float-chip { transform: none; }
  .modal.fade .modal-dialog { transform: none; }
  .search-pop { transform: none; }
  .btn.is-loading::after { animation-duration: 1.2s !important; animation-iteration-count: infinite !important; }
  .card-flip { transition: transform 1ms; }
  .tick svg { clip-path: none; }
}

/* ---------- 12. Mobile / tactile ---------- */
@media (max-width: 767.98px), (pointer: coarse) {
  .form-control, .form-select, .form-control-sm, .form-control-lg { font-size: 16px; min-height: 46px; }
  .btn, .btn-sm { min-height: 44px; }
  .btn-icon { width: 44px; height: 44px; }
  .pub-link, .side-link, .accordion-button, .chat-list-item { min-height: 48px; }
  .btn-close { width: 44px; height: 44px; }
  .pw-toggle { width: 44px; height: 44px; margin-top: -22px; right: 1px; }
  .form-check-input { width: 1.4rem; height: 1.4rem; }
  .form-check { min-height: 44px; align-items: center; }
  .seg a { min-height: 44px; }
}
@media (max-width: 767.98px) {
  .section { padding: 3.2rem 0; }
  .hero { padding-bottom: 3.5rem; }
  .auth-card { padding: 1.6rem 1.25rem; border-radius: 20px; }
  .panel { padding: 1.1rem 1rem; }
  .balance-card { padding: 1.4rem 1.2rem; }
  .modal-header, .modal-body, .modal-footer { padding-left: 1.1rem; padding-right: 1.1rem; }
  .modal-footer .btn { flex: 1; }
  .modal-dialog { margin: .75rem; }
  .flash-stack { left: .9rem; right: .9rem; width: auto; }
  .chat-form textarea { font-size: 16px; }
  .bubble { max-width: 88%; }
  .hero-in .d-flex .btn { flex: 1 1 100%; }
}
@media (max-width: 575.98px) { .phone-stage { padding-bottom: 2rem; } }

/* Coordonnées du site */
.foot-contact li { display: flex; align-items: flex-start; gap: .55rem; padding: .2rem 0; color: #b9c8dc; }
.foot-contact .ic { margin-top: .2rem; color: var(--teal-300); }
.contact-info { position: sticky; top: calc(var(--nav-h) + 1rem); padding: 1.5rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.contact-info h2 { margin-bottom: 1rem; }
.ci { display: flex; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.ci:first-of-type { border-top: 0; }
.ci-ic { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--accent-text); background: var(--accent-soft); }
.ci a { color: var(--text); font-weight: 600; text-decoration: none; }
@media (hover: hover) { .ci a:hover { color: var(--accent-text); text-decoration: underline; } }

/* Choix de carte */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.country .ic { display: block; margin: 0 auto .45rem; color: var(--accent-text); }
.req-panel { border-color: var(--warn-bd); }

/* Sélecteur de langue */
.lang-switch { display: inline-flex; padding: 3px; gap: 2px; border-radius: 99px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); }
.lang-switch a { display: grid; place-items: center; min-width: 38px; min-height: 30px; padding: 0 .6rem; border-radius: 99px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: #cfd9e8; text-decoration: none; transition: background-color var(--d-micro) ease, color var(--d-micro) ease, transform var(--d-micro) var(--ease-out); }
.lang-switch a:active { transform: scale(.94); }
.lang-switch a.on { background: #fff; color: var(--navy-800); }
@media (hover: hover) { .lang-switch a:not(.on):hover { color: #fff; background: rgba(255, 255, 255, .12); } }
.pub-menu .lang-switch { margin-left: .6rem; }
.side-lang { padding: .6rem .4rem 0; }
.auth-lang { position: fixed; z-index: 5; top: max(.9rem, env(safe-area-inset-top)); right: max(.9rem, env(safe-area-inset-right)); }
.auth-lang .lang-switch { background: var(--surface); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.auth-lang .lang-switch a { color: var(--text-2); }
.auth-lang .lang-switch a.on { background: var(--navy-800); color: #fff; }
@media (max-width: 991.98px) { .pub-menu .lang-switch { margin: 1rem 0 0; align-self: flex-start; } }

/* Suivi d'un virement : progression 0 → 100 % */
.flow-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.flow-pct { display: flex; align-items: baseline; justify-content: center; gap: .15rem; margin: .8rem 0 1.2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-size: clamp(3rem, 14vw, 4.6rem); font-variant-numeric: tabular-nums; }
.flow-pct span { display: inline-block; min-width: 1ch; text-align: right; transform-origin: 50% 80%; }
.flow-pct small { font-size: .38em; font-weight: 700; color: var(--text-3); }
.flow-pct.bump span { animation: flow-bump 300ms var(--ease-out); }
@keyframes flow-bump { 40% { transform: scale(1.1); } }
.flow-track { position: relative; height: 12px; margin: 0 0 1.6rem; border-radius: 99px; background: var(--surface-sunk); border: 1px solid var(--line); }
.flow-fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--teal-500), var(--teal-300)); clip-path: inset(0 100% 0 0 round 99px); transition: clip-path 1s linear; }
.flow.is-js .flow-fill { transition: none; will-change: clip-path; }
.flow-fill::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--warn), #f59e0b); opacity: 0; transition: opacity var(--d-ui) var(--ease-out); }
.flow-fill.is-hold::after { opacity: 1; }
.flow-fill.is-done { background: var(--pos); }
.flow-fill.is-stop { background: var(--text-3); }
@keyframes flow-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes flow-ring { from { opacity: .6; transform: scale(1); } to { opacity: 0; transform: scale(1.8); } }
@keyframes flow-shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
[data-flow-area] > * { animation: flow-in var(--d-ui) var(--ease-out) both; }
.flow-code { padding: 1.2rem; border-radius: var(--r-lg); background: var(--warn-bg); border: 1px solid var(--warn-bd); }
.flow-code.shake { animation: flow-shake 320ms var(--ease-out); }
.flow-code h2 { color: var(--warn); }
.flow-reason { display: flex; flex-direction: column; gap: .1rem; margin: .2rem 0 .9rem; padding: .6rem .85rem; border-radius: var(--r); background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--warn-bd); }
.flow-reason strong { color: var(--text); }
.flow-detail { margin: .45rem 0 0; padding-top: .5rem; border-top: 1px dashed var(--warn-bd); color: var(--text-2); font-size: .92rem; line-height: 1.5; }
.vd-row { grid-template-areas: "pct msg x" ". detail ." ". save ."; }
.vd-row > .vd-save { grid-area: save; justify-self: start; padding: .2rem .6rem; border: 0; background: transparent; color: var(--accent); font-size: .82rem; font-weight: 600; border-radius: 99px; }
.vd-tpl { display: inline-flex; }
.vd-tpl .vd-chip:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vd-tpl .vd-tpl-x { border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; padding: .3rem .5rem; }
.vd-row > .vd-pct { grid-area: pct; } .vd-row > [name="msg[]"] { grid-area: msg; } .vd-row > .vd-x { grid-area: x; }
.vd-row > .vd-detail { grid-area: detail; min-height: 64px; resize: vertical; font-size: .9rem; }
.flow-err { margin-bottom: .75rem; color: var(--neg); font-weight: 600; font-size: .9rem; animation: flow-in 180ms var(--ease-out); }
.flow-err[hidden] { display: none; }
.flow-state { text-align: center; padding: .6rem 0 0; }
.flow-state h2 { justify-content: center; }
.flow-state .tick::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--pos); animation: flow-ring 700ms var(--ease-out) 200ms both; }
.flow-note { display: flex; align-items: center; gap: .7rem; margin: 0; color: var(--text-2); font-size: .92rem; }
.flow-spin { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: flow-rot .9s linear infinite; }
@keyframes flow-rot { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .flow-fill, .flow-fill::after { transition: none; }
  .flow-spin, .flow-state .tick::after { animation: none; }
  .flow-pct.bump span, .flow-code.shake, [data-flow-area] > * { animation: none; }
}

/* Admin : validation d'un virement (fenêtre) */
.vdlg { width: min(34rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: 0 24px 60px rgba(8, 16, 32, .32); overflow: hidden;
  opacity: 0; transform: translateY(8px) scale(.97); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.vdlg[open] { opacity: 1; transform: none; }
@starting-style { .vdlg[open] { opacity: 0; transform: translateY(8px) scale(.97); } }
.vdlg.is-closing { opacity: 0; transform: scale(.98); transition-duration: 150ms; }
.vdlg::backdrop { background: rgba(8, 16, 32, .55); opacity: 0; transition: opacity 200ms var(--ease-out); }
.vdlg[open]::backdrop { opacity: 1; }
@starting-style { .vdlg[open]::backdrop { opacity: 0; } }
.vdlg.is-closing::backdrop { opacity: 0; }
.vdlg form { display: flex; flex-direction: column; max-height: calc(100vh - 2rem); }
.vd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem .9rem; border-bottom: 1px solid var(--line); }
.vd-close { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); transition: background-color 150ms ease, transform 160ms var(--ease-out); }
.vd-close:active { transform: scale(.92); }
@media (hover: hover) and (pointer: fine) { .vd-close:hover { background: var(--surface-sunk); } }
.vd-body { padding: 1.1rem 1.25rem; overflow-y: auto; }
.vd-foot { display: flex; justify-content: flex-end; gap: .6rem; padding: .9rem 1.25rem; border-top: 1px solid var(--line); background: var(--surface-sunk); }
.vd-foot .btn:active, .vd-add:active { transform: scale(.97); }

/* choix : sans / avec vérification */
.vd-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 99px; background: var(--surface-sunk); border: 1px solid var(--line); margin-bottom: 1rem; }
.vd-seg input { position: absolute; opacity: 0; pointer-events: none; }
.vd-seg label { position: relative; z-index: 1; padding: .55rem .5rem; text-align: center; font-weight: 600; font-size: .92rem; border-radius: 99px; cursor: pointer; color: var(--text-2); transition: color 180ms ease; user-select: none; }
.vd-seg input:checked + label { color: var(--text); }
.vd-seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.vd-seg-ind { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 99px; background: var(--surface); box-shadow: 0 1px 3px rgba(8, 16, 32, .18), 0 0 0 1px var(--line); transform: translateX(100%); transition: transform 240ms var(--ease-out); }
.vd-seg:has(#vd_no:checked) .vd-seg-ind { transform: none; }

/* bloc des vérifications : se replie quand « sans vérification » */
.vd-checks { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows 240ms var(--ease-out), opacity 200ms ease; }
.vd-checks-in { overflow: hidden; min-height: 0; padding: 2px; margin: -2px; }
form[data-mode="no"] .vd-checks { grid-template-rows: 0fr; opacity: 0; }

/* aperçu : la barre avec les arrêts choisis */
.vd-bar { position: relative; display: flex; align-items: center; gap: .6rem; margin: 1.6rem 0 1.1rem; }
.vd-cap { flex: none; font-size: .72rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.vd-track { position: relative; flex: 1; height: 8px; border-radius: 99px; background: var(--surface-sunk); border: 1px solid var(--line); }
.vd-mark { position: absolute; left: 0; top: 50%; width: 0; height: 0; transition: transform 220ms var(--ease-out); }
.vd-mark i { position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%; background: var(--warn); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--warn-bd); animation: vd-pop 220ms var(--ease-out) both; transition: transform 160ms var(--ease-out); }
.vd-mark b { position: absolute; left: 0; bottom: 14px; transform: translateX(-50%); font-size: .72rem; font-weight: 700; color: var(--warn); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vd-mark.is-on i { transform: scale(1.3); }
@keyframes vd-pop { from { opacity: 0; transform: scale(.6); } }

/* lignes : pourcentage + message */
.vd-list { display: grid; gap: .55rem; }
.vd-row { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; animation: vd-in 200ms var(--ease-out) both; transition: opacity 150ms ease, transform 150ms var(--ease-out); }
.vd-row.is-out { opacity: 0; transform: translateX(10px); }
@keyframes vd-in { from { opacity: 0; transform: translateY(6px); } }
.vd-pct { display: flex; align-items: center; gap: .3rem; padding: 0 .65rem; height: 40px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); transition: border-color 150ms ease, box-shadow 150ms ease; }
.vd-pct:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.vd-pct input { width: 2.6rem; border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; -moz-appearance: textfield; }
.vd-pct input::-webkit-outer-spin-button, .vd-pct input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vd-pct span { color: var(--text-3); font-weight: 600; }
.vd-pct.is-bad { border-color: var(--neg); }
.vd-row .form-control { height: 40px; }
.vd-x { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); font-size: 1.3rem; line-height: 1; transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out); }
.vd-x:active { transform: scale(.9); }
@media (hover: hover) and (pointer: fine) { .vd-x:hover { background: var(--surface-sunk); color: var(--neg); } }
.vd-add { margin-top: .7rem; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border: 1px dashed var(--line-strong); border-radius: 99px; background: transparent; color: var(--accent); font-weight: 600; font-size: .9rem; transition: background-color 150ms ease, transform 160ms var(--ease-out), opacity 150ms ease; }
.vd-add[disabled] { opacity: .45; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .vd-add:hover { background: var(--surface-sunk); } }
.vd-sugg { margin-top: 1rem; }
.vd-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.vd-chip { padding: .3rem .65rem; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); color: var(--text-2); font-size: .8rem; transition: background-color 150ms ease, transform 160ms var(--ease-out); }
.vd-chip:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .vd-chip:hover { background: var(--surface-sunk); color: var(--text); } }
.vd-sum { margin: 1rem 0 0; padding: .65rem .85rem; border-radius: var(--r); background: var(--surface-sunk); font-size: .88rem; color: var(--text-2); }
.vd-sum.is-bad { background: var(--warn-bg); color: var(--warn); }
@media (prefers-reduced-motion: reduce) {
  .vdlg, .vdlg.is-closing { transform: none; }
  .vd-seg-ind, .vd-mark { transition: none; }
  .vd-row, .vd-mark i { animation: none; }
  .vd-row.is-out { transform: none; }
}
