/* ==========================================================================
   BMCI — Espace client & connexion
   Feuille de style dédiée aux pages applicatives : connexion.html,
   espace-client.html, virements.html, historique.html.
   ========================================================================== */

/* ------------------------------------------------------------------ Polices */
@font-face {
  font-family: 'Oswald';
  src: url('../fonts/oswald-latin.woff2') format('woff2');
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: 'Open Sans';
  src: url('../fonts/opensans-latin.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --green: #00875a;
  --green-600: #0a9463;
  --green-700: #006b48;
  --green-800: #045c40;
  --green-900: #005c4f;
  --teal: #17b39b;
  --mint: #cde7de;
  --mint-soft: #eaf6f2;
  --orange: #e8730f;
  --orange-bright: #fe790d;
  --ink: #1d1d1b;
  --ink-soft: #5a5a56;
  --muted: #8c8c88;
  --grey-50: #fafaf9;
  --grey-100: #f3f2f0;
  --line: #e6e5e2;
  --white: #fff;
  --red: #c0392b;
  --font-head: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(16, 40, 32, .07);
  --shadow-md: 0 8px 24px rgba(16, 40, 32, .1);
  --shadow-lg: 0 20px 50px rgba(10, 30, 24, .18);
  --radius: 8px;
  --gutter: clamp(1rem, 3vw, 2.25rem);
}

/* ------------------------------------------------------------------ Reset */
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--grey-100);
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: .01em;
  margin: 0;
}
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.container {
  width: min(100% - (2 * var(--gutter)), 1180px);
  margin-inline: auto;
}
.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;
}
.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--font-head);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  padding: .9rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 1.05em; height: 1.05em; }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-700); }
.btn--orange { background: var(--orange); color: #fff; }
.btn--orange:hover { background: var(--orange-bright); }
.btn--ghost {
  background: #fff;
  color: var(--ink);
  border-color: #d8d7d4;
}
.btn--ghost:hover { border-color: #b9b8b4; background: var(--grey-50); }
.btn--block { width: 100%; }
.btn--sm { padding: .6rem .9rem; font-size: .8rem; }

.link {
  color: var(--green-700);
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 107, 72, .35);
  padding-bottom: 1px;
  transition: border-color .2s, color .2s;
}
.link:hover { color: var(--green); border-color: var(--green); }

/* ------------------------------------------------------------------ En-tête application */
html { scroll-padding-top: 88px; }
.app-header {
  background: linear-gradient(120deg, #0b9463 0%, #05784e 55%, #00623f 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}
.app-header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 62px;
  padding-block: .6rem;
}
.app-header__brand { display: flex; align-items: center; flex: none; }
.app-header__brand img { height: 26px; width: auto; max-width: none; }
.app-header__sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .35); }
.app-header__title {
  font-family: var(--font-head);
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .95;
  white-space: nowrap;
}
.app-header__right { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.user-chip {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .3rem .7rem .3rem .3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: .82rem;
  white-space: nowrap;
}
.user-chip__avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .9);
  color: var(--green-800);
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 600;
}
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
  border: 0;
  color: #fff;
  cursor: pointer;
  transition: background-color .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .22); }
.icon-btn .ico { width: 19px; height: 19px; }

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

/* Navigation de l'espace client */
.app-nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 62px;
  z-index: 30;
  box-shadow: var(--shadow-sm);
}
.app-nav__list {
  display: flex;
  gap: .25rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.app-nav__list::-webkit-scrollbar { display: none; }
.app-nav__link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .95rem 1rem;
  font-family: var(--font-head);
  font-size: .88rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #4b4b47;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color .2s, border-color .2s, background-color .2s;
}
.app-nav__link .ico { width: 17px; height: 17px; opacity: .75; }
.app-nav__link:hover { color: var(--green); background: var(--mint-soft); }
.app-nav__link[aria-current='page'] {
  color: var(--green-800);
  border-bottom-color: var(--green);
}

/* ------------------------------------------------------------------ Structure */
.app-main { padding-block: clamp(1.25rem, 3vw, 2.25rem) 3rem; }
.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: start;
}
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(.9rem, 1.8vw, 1.25rem); }
.stack > * { min-width: 0; }
.card, .card__body, .card__head { min-width: 0; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}
.page-head h1 {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  text-transform: uppercase;
}
.page-head .sub {
  margin: .35rem 0 0;
  color: var(--ink-soft);
  font-size: .9rem;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .5rem;
}
.breadcrumbs .ico { width: 10px; height: 10px; }

/* ------------------------------------------------------------------ Cartes */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.card__head h2,
.card__head h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.card__body { padding: 1.15rem; }
.card__foot {
  padding: .85rem 1.15rem;
  border-top: 1px solid var(--line);
  background: var(--grey-50);
  font-size: .85rem;
}

/* Carte de compte principale */
.account-hero {
  position: relative;
  background: linear-gradient(125deg, #0b9463, #046a46 70%);
  color: #fff;
  padding: clamp(1.15rem, 2.6vw, 1.75rem);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.account-hero::after {
  content: '';
  position: absolute;
  right: -60px; top: -70px;
  width: 230px; height: 230px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .09);
}
.account-hero::before {
  content: '';
  position: absolute;
  right: 30px; bottom: -90px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.account-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  position: relative;
  z-index: 1;
}
.account-hero__label {
  font-family: var(--font-head);
  font-size: .85rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .92;
}
.account-hero__amount {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 4.4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: .01em;
  margin: .35rem 0 .15rem;
  position: relative;
  z-index: 1;
}
.account-hero__amount small { font-size: .48em; letter-spacing: .08em; opacity: .85; }
.account-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .9rem;
  font-size: .8rem;
  opacity: .92;
  position: relative;
  z-index: 1;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .22rem .6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.pill--warn { background: rgba(255, 193, 102, .95); color: #4a2c00; }
.pill--light { background: #eef7f3; color: var(--green-800); }

/* Liste de comptes */
.account-row {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1.15rem;
  border-bottom: 1px solid var(--line);
  transition: background-color .18s;
}
.account-row:last-child { border-bottom: 0; }
.account-row:hover { background: var(--grey-50); }
.account-row__icon {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--mint-soft);
  color: var(--green-700);
}
.account-row__icon .ico { width: 19px; height: 19px; }
.account-row__main { min-width: 0; flex: 1; }
.account-row__title { display: block; font-weight: 700; font-size: .92rem; }
.account-row__sub { display: block; font-size: .78rem; color: var(--muted); }
.account-row__amount {
  font-family: var(--font-head);
  font-size: 1rem;
  white-space: nowrap;
  text-align: right;
}
.account-row__amount small { display: block; font-family: var(--font-body); font-size: .68rem; color: var(--muted); font-weight: 400; }

/* Opérations */
.op-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.op { min-width: 0; }
.op {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.op:last-child { border-bottom: 0; }
.op__date {
  flex: none;
  width: 42px;
  text-align: center;
  line-height: 1.1;
  color: var(--muted);
  font-size: .7rem;
}
.op__date b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 600;
}
.op__main { flex: 1; min-width: 0; }
.op__label {
  display: block;
  font-size: .89rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.op__cat { display: block; font-size: .74rem; color: var(--muted); }
.op__amount {
  font-family: var(--font-head);
  font-size: .98rem;
  white-space: nowrap;
  letter-spacing: .01em;
}
.op__amount--out { color: var(--ink); }
.op__amount--in { color: var(--green-700); }
.op-tag {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 3px;
  background: var(--grey-100);
  color: #63635f;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.op-tag--in { background: var(--mint-soft); color: var(--green-700); }

/* Onglets / filtres */
.tabs {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: .15rem;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: #55554f;
  border-radius: 999px;
  padding: .45rem .95rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s, color .18s, border-color .18s;
}
.tab:hover { border-color: var(--green); color: var(--green-700); }
.tab[aria-selected='true'] {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Graphique donut */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.donut {
  --p1: 38;
  --p2: 62;
  --p3: 78;
  --p4: 90;
  width: 132px; height: 132px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(
    var(--green) 0 calc(var(--p1) * 1%),
    var(--teal) 0 calc(var(--p2) * 1%),
    #7fd3c0 0 calc(var(--p3) * 1%),
    #f0b357 0 calc(var(--p4) * 1%),
    #dcdbd7 0 100%
  );
  display: grid;
  place-items: center;
  position: relative;
}
.donut::after {
  content: '';
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: #fff;
}
.donut__center {
  position: relative;
  z-index: 1;
  text-align: center;
  font-family: var(--font-head);
  line-height: 1.1;
}
.donut__center b { display: block; font-size: 1.02rem; }
.donut__center span { font-family: var(--font-body); font-size: .68rem; color: var(--muted); }
.legend { display: grid; gap: .45rem; font-size: .82rem; flex: 1; min-width: 140px; }
.legend li { display: flex; align-items: center; gap: .5rem; }
.legend i {
  width: 10px; height: 10px;
  border-radius: 3px;
  flex: none;
}
.legend .val { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Accès rapides */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .6rem;
}
.quick-action {
  display: grid;
  justify-items: center;
  gap: .45rem;
  padding: .9rem .5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: center;
  font-size: .76rem;
  font-weight: 600;
  color: #4b4b47;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.quick-action:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
  color: var(--green-800);
}
.quick-action .ico { width: 22px; height: 22px; color: var(--green); }

/* ------------------------------------------------------------------ Formulaires */
.form-grid { display: grid; gap: 1rem; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: .3rem; }
.field > label,
.field > .label {
  font-size: .82rem;
  font-weight: 700;
  color: #45453f;
}
.field .hint { font-size: .74rem; color: var(--muted); }
.input,
.select,
.textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d9d8d4;
  border-radius: 5px;
  padding: .72rem .8rem;
  transition: border-color .18s, box-shadow .18s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 0;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 135, 90, .15);
}
.input::placeholder { color: #a3a39e; }
.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #6a6a64 50%), linear-gradient(135deg, #6a6a64 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.2rem;
}
.textarea { resize: vertical; min-height: 84px; }
.input-group { position: relative; }
.input-group .suffix {
  position: absolute;
  right: .8rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-head);
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .06em;
}
.input-group .input { padding-right: 3.4rem; }

.segmented {
  display: inline-flex;
  border: 1px solid #d9d8d4;
  border-radius: 999px;
  padding: 3px;
  background: var(--grey-50);
  gap: 2px;
}
.segmented label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .95rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: #55554f;
  cursor: pointer;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span { color: #fff; }
.segmented label:has(input:checked) { background: var(--green); }

.checkbox { display: flex; align-items: flex-start; gap: .55rem; font-size: .85rem; cursor: pointer; }
.checkbox input {
  appearance: none;
  width: 17px; height: 17px;
  flex: none;
  margin: 2px 0 0;
  border: 1px solid #b9b8b4;
  border-radius: 3px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.checkbox input:checked { background: var(--green); border-color: var(--green); }
.checkbox input:checked::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.form-message {
  margin-top: .9rem;
  padding: .7rem .85rem;
  border-radius: 5px;
  font-size: .85rem;
  font-weight: 600;
  display: none;
}
.form-message.is-visible { display: block; }
.form-message--ok { background: #e8f5ee; color: #0a6b45; border: 1px solid #bfe3ce; }
.form-message--error { background: #fdecea; color: #95291c; border: 1px solid #f5c6c0; }

/* Récapitulatif */
.recap { display: grid; gap: .6rem; font-size: .88rem; }
.recap__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .6rem;
  border-bottom: 1px dashed var(--line);
}
.recap__row:last-child { border-bottom: 0; padding-bottom: 0; }
.recap__row dt { color: var(--ink-soft); margin: 0; }
.recap__row dd { margin: 0; font-weight: 700; text-align: right; }
.recap__total dd { font-family: var(--font-head); font-size: 1.15rem; color: var(--green-800); }

/* Bandeau d'information */
.notice {
  display: flex;
  gap: .7rem;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  background: var(--mint-soft);
  border: 1px solid #cfe8de;
  font-size: .84rem;
  color: #235148;
}
.notice .ico { width: 18px; height: 18px; flex: none; color: var(--green-700); margin-top: 1px; }

/* ------------------------------------------------------------------ Page de connexion */
.login-page {
  background: var(--grey-100);
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
}
.login-aside {
  position: relative;
  background: linear-gradient(150deg, #0b9463 0%, #057a50 45%, #004d36 100%);
  color: #fff;
  padding: clamp(1.75rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-aside::after {
  content: '';
  position: absolute;
  right: -120px; bottom: -140px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.login-aside::before {
  content: '';
  position: absolute;
  left: -90px; top: 18%;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
}
.login-aside__brand { position: relative; z-index: 1; }
.login-aside__brand img { height: 34px; width: auto; max-width: none; }
.login-aside__copy { position: relative; z-index: 1; max-width: 34ch; }
.login-aside__copy h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  line-height: 1.12;
  margin-bottom: .75rem;
}
.login-aside__copy p { font-size: .95rem; opacity: .92; }
.login-aside__list {
  display: grid;
  gap: .6rem;
  margin-top: 1.5rem;
  font-size: .88rem;
}
.login-aside__list li { display: flex; align-items: center; gap: .6rem; }
.login-aside__list .ico { width: 18px; height: 18px; opacity: .9; flex: none; }
.login-aside__foot { position: relative; z-index: 1; font-size: .76rem; opacity: .8; }

.login-main {
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
}
.login-card {
  width: min(100%, 430px);
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: clamp(1.4rem, 3vw, 2.25rem);
}
.login-card__brand { display: none; }
.login-card__brand img { height: 26px; width: auto; max-width: 100%; }
.login-card h2 {
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: .25rem;
}
.login-card__sub { color: var(--ink-soft); font-size: .88rem; margin-bottom: 1.35rem; }
.login-form { display: grid; gap: 1rem; }
.login-form .field > label { font-weight: 700; }
.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: -.15rem;
}
.login-row .link { font-size: .82rem; white-space: nowrap; }
.login-card .btn { margin-top: .35rem; }
.login-alt {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: .65rem;
  font-size: .86rem;
  color: var(--ink-soft);
}
.login-alt li { display: flex; align-items: center; gap: .5rem; }
.login-alt .ico { width: 16px; height: 16px; color: var(--green); flex: none; }
.login-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: .72rem;
  color: var(--muted);
}
.login-badges .ico { width: 15px; height: 15px; color: var(--green); }
.login-badges span { display: inline-flex; align-items: center; gap: .35rem; }
.login-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}
.login-back:hover { color: var(--green-700); }

/* ------------------------------------------------------------------ Pied de page */
.app-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  padding-block: 1.1rem;
  font-size: .78rem;
  color: var(--muted);
}
.app-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.app-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; }
.app-footer a:hover { color: var(--green-700); text-decoration: underline; }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 1024px) {
  .app-grid { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .login-card__brand { display: block; margin-bottom: 1.1rem; }
  .login-main { background: linear-gradient(180deg, #0b9463 0, #057a50 210px, var(--grey-100) 210px); }
}

@media (max-width: 860px) {
  .app-header__title { display: none; }
  .app-header__sep { display: none; }
  .app-nav-toggle { display: grid; }
  .app-nav {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    display: none;
    box-shadow: var(--shadow-lg);
    max-height: 70vh;
    overflow-y: auto;
  }
  .app-header { position: sticky; }
  .app-header__bar { position: relative; }
  .app-nav.is-open { display: block; }
  .app-nav__list { flex-direction: column; gap: 0; }
  .app-nav__list li { border-bottom: 1px solid var(--line); }
  .app-nav__link { width: 100%; padding: 1rem 1.25rem; border-bottom: 0; border-left: 3px solid transparent; }
  .app-nav__link[aria-current='page'] { border-left-color: var(--green); background: var(--mint-soft); }
  .user-chip span.user-chip__name { display: none; }
  .form-grid--2 { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 14.5px; }
  .card__head { flex-wrap: wrap; }
  .card__head .tabs { width: 100%; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .account-hero__amount { font-size: 1.85rem; }
  .op__date { width: 36px; }
  .donut { width: 112px; height: 112px; }
  .donut::after { inset: 19px; }
  .page-head { align-items: flex-start; }
  .app-header__brand img { height: 22px; }
}

/* Impression */
@media print {
  .app-header, .app-nav, .app-footer, .quick-actions { display: none !important; }
  body { background: #fff; }
}

/* ------------------------------------------------------------------ Compléments */
/* Indicateurs (historique) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.75rem, 1.6vw, 1.25rem);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
}
.kpi { padding: 1rem 1.15rem; display: grid; gap: .2rem; }
.kpi__label {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
}
.kpi__value {
  font-family: var(--font-head);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 600;
}
.kpi__value small { font-size: .55em; color: var(--muted); letter-spacing: .06em; margin-left: .2em; }
.kpi__value--in { color: var(--green-700); }
.kpi__value--out { color: #a8412f; }
.kpi__sub { font-size: .74rem; color: var(--muted); }

/* Barre de filtres */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}
.filters .field { display: block; }
.filters .tabs { margin-left: auto; }

@media (max-width: 860px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .filters .tabs { margin-left: 0; width: 100%; }
}
@media (max-width: 620px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi:first-child { grid-column: 1 / -1; }
}

/* ==========================================================================
   Compléments — BMCI CONNECT (raccourcis, crédits, paiements, menu latéral)
   ========================================================================== */

/* ------------------------------------------------ Menu latéral (drawer) */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
}
.drawer.is-open { display: block; }
.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 15, .55);
  backdrop-filter: blur(1.5px);
  animation: fadeIn .2s ease;
}
.drawer__panel {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: min(86vw, 360px);
  background: #303030;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 6px 0 30px rgba(0, 0, 0, .35);
  animation: slideIn .24s ease;
}
@keyframes slideIn { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer__head {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1.1rem 1.15rem 1rem;
  background: linear-gradient(120deg, #0b9463, #046a46);
}
.drawer__avatar {
  width: 44px; height: 44px;
  flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .92);
  color: var(--green-800);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
}
.drawer__id { min-width: 0; }
.drawer__id strong { display: block; font-size: .92rem; }
.drawer__id span { display: block; font-size: .68rem; opacity: .8; letter-spacing: .01em; }
.drawer__close {
  margin-left: auto;
  align-self: flex-start;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  padding: .1rem .3rem;
  cursor: pointer;
  opacity: .85;
}
.drawer__list { padding: .35rem 0 1rem; }
.drawer__list > li { border-bottom: 1px solid rgba(255, 255, 255, .1); }
.drawer__list a,
.drawer__list button {
  display: flex;
  align-items: center;
  gap: .85rem;
  width: 100%;
  padding: 1rem 1.15rem;
  background: none;
  border: 0;
  color: #fff;
  font-size: .95rem;
  text-align: left;
  cursor: pointer;
}
.drawer__list a:hover,
.drawer__list button:hover { background: rgba(255, 255, 255, .07); }
.drawer__list .ico { width: 20px; height: 20px; flex: none; opacity: .92; }
.drawer__list .chev { margin-left: auto; width: 16px; height: 16px; opacity: .6; transition: transform .2s; }
.drawer__group.is-open > button .chev { transform: rotate(180deg); }
.drawer__sub { display: none; padding: 0 0 .6rem; }
.drawer__group.is-open .drawer__sub { display: block; }
.drawer__sub a {
  padding: .6rem 1.15rem .6rem 3.6rem;
  font-size: .88rem;
  color: #e7e7e4;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.drawer__list .is-danger { color: #ffb4a2; }
.drawer__foot {
  margin: auto 1.15rem 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  gap: .6rem;
  font-size: .82rem;
  color: #b9d8cd;
  line-height: 1.35;
}
.drawer__foot .ico { width: 20px; height: 20px; color: #7ed6b8; flex: none; }

/* ------------------------------------------------ Barre d'onglets mobile */
.app-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  display: none;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 18px rgba(10, 30, 24, .08);
  padding-bottom: env(safe-area-inset-bottom);
}
.app-tabbar__item {
  flex: 1;
  display: grid;
  justify-items: center;
  gap: .15rem;
  padding: .55rem .3rem .5rem;
  font-size: .68rem;
  font-weight: 600;
  color: #6b6b66;
  background: none;
  border: 0;
  border-top: 2px solid transparent;
  cursor: pointer;
}
.app-tabbar__item .ico { width: 22px; height: 22px; }
.app-tabbar__item[aria-current='page'],
.app-tabbar__item.is-active { color: var(--green-700); border-top-color: var(--green); }

/* ------------------------------------------------ Cartes comptes (carrousel) */
.account-carousel { position: relative; }
.account-carousel__track {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: .2rem;
}
.account-carousel__track::-webkit-scrollbar { display: none; }
.account-carousel__slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  min-width: 0;
}
.account-carousel__dots {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin-top: .7rem;
}
.account-carousel__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #cfd3ce;
  cursor: pointer;
}
.account-carousel__dot[aria-selected='true'] { background: var(--green); }

/* Carte compte façon application */
.acct {
  position: relative;
  border-radius: 10px;
  background: linear-gradient(160deg, #0b9463, #046b47 72%);
  color: #fff;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.acct__head {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .9rem 1rem .75rem;
}
.acct__head .ico { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.acct__name {
  font-family: var(--font-head);
  font-size: .95rem;
  letter-spacing: .02em;
}
.acct__holder { font-size: .78rem; font-weight: 700; margin-top: .45rem; letter-spacing: .01em; }
.acct__num { font-size: .7rem; opacity: .85; letter-spacing: .01em; }
.acct__solar {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  color: #fff;
}
.acct__solar svg { width: 26px; height: 26px; }
.acct__balance {
  margin: 0 1rem .2rem;
  padding: .7rem .85rem;
  background: rgba(255, 255, 255, .16);
  border-radius: 7px;
}
.acct__amount {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4.6vw, 2.05rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .01em;
}
.acct__amount small { font-size: .45em; letter-spacing: .08em; opacity: .9; margin-left: .25em; }
.acct__date { font-size: .72rem; opacity: .9; }
.acct__ops { padding: .35rem 0 0; }
.acct__op {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  font-size: .78rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.acct__op date, .acct__op .d { opacity: .85; flex: none; }
.acct__op .lib { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct__op .val { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.acct__more {
  display: block;
  width: calc(100% - 2rem);
  margin: .35rem 1rem .9rem;
  padding: .55rem;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 5px;
  background: transparent;
  color: #fff;
  font-family: var(--font-head);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}
.acct__more:hover { background: rgba(255, 255, 255, .12); }

/* ------------------------------------------------ Grille de raccourcis */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem .75rem;
}
.shortcut {
  display: grid;
  justify-items: center;
  gap: .55rem;
  text-align: center;
  color: #3d3d39;
  font-size: .8rem;
  line-height: 1.25;
  transition: transform .18s;
}
.shortcut:hover { transform: translateY(-2px); color: var(--green-800); }
.shortcut__icon {
  width: 62px; height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  transition: background-color .2s, box-shadow .2s;
}
.shortcut:hover .shortcut__icon { background: var(--green-700); box-shadow: 0 6px 16px rgba(0, 108, 72, .28); }
.shortcut__icon .ico { width: 28px; height: 28px; stroke-width: 1.5; }

/* ------------------------------------------------ Accordéon facturiers */
.accordion { display: grid; gap: .55rem; }
.acc {
  border-radius: 6px;
  overflow: hidden;
  background: #eceded;
}
.acc__head {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .95rem 1rem;
  background: #eceded;
  border: 0;
  font-family: var(--font-head);
  font-size: .88rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #3b3b37;
  cursor: pointer;
}
.acc__head .chev { margin-left: auto; width: 16px; height: 16px; transition: transform .2s; }
.acc.is-open > .acc__head .chev { transform: rotate(180deg); }
.acc.is-open > .acc__head { background: var(--green); color: #fff; }
.acc__body { display: none; background: #fff; }
.acc.is-open > .acc__body { display: block; }
.facturier {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
}
.facturier:last-child { border-bottom: 0; }
.facturier:hover { background: var(--grey-50); }
.facturier__logo {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 6px;
  display: grid; place-items: center;
  background: var(--mint-soft);
  color: var(--green-700);
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 700;
}
.facturier .chev { margin-left: auto; width: 14px; height: 14px; color: #9a9a95; }

/* ------------------------------------------------ Crédits */
.credit-block { margin-bottom: 1.4rem; }
.credit-block:last-child { margin-bottom: 0; }
.credit-block__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .6rem;
}
.credit-block__head h2 { font-size: 1.15rem; text-transform: none; letter-spacing: 0; }
.credit-block__head .total { font-size: .85rem; font-weight: 700; color: #a8412f; white-space: nowrap; }
.credit-block__date { font-size: .74rem; color: var(--muted); margin: -.35rem 0 .7rem; }

.credit-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid #e6a817;
  border-radius: 5px;
  margin-bottom: .55rem;
  transition: box-shadow .2s, border-color .2s, transform .2s;
}
.credit-card--conso { border-left-color: #7cb342; }
.credit-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.credit-card__main { min-width: 0; flex: 1; }
.credit-card__title { display: block; font-weight: 700; font-size: .92rem; }
.credit-card__num { display: block; font-size: .74rem; color: var(--muted); }
.credit-card__amount {
  font-family: var(--font-head);
  font-size: 1rem;
  white-space: nowrap;
}
.credit-card .chev { width: 16px; height: 16px; color: #a5a5a0; flex: none; }

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .45rem;
}
.progress-top .label { font-size: .88rem; font-weight: 700; }
.progress-top .value {
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: var(--green-700);
}
.progress {
  height: 10px;
  border-radius: 999px;
  background: #e4e4e1;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0b9463, #046a46);
}
.progress-caption { font-size: .72rem; color: var(--muted); margin-top: .35rem; }

.detail-section { margin-top: 1.4rem; }
.detail-section h3 {
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: .5rem;
}
.detail-list { display: grid; }
.detail-list__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .86rem;
}
.detail-list__row:last-child { border-bottom: 0; }
.detail-list__row dt { color: var(--ink-soft); margin: 0; }
.detail-list__row dd { margin: 0; font-weight: 700; text-align: right; white-space: nowrap; }
.detail-foot {
  margin-top: 1.25rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
  font-size: .72rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ------------------------------------------------ Donuts synthèse */
.mini-donuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: .75rem;
}
.mini-donut { text-align: center; }
.mini-donut__ring {
  --p: 30;
  width: 96px; height: 96px;
  margin: 0 auto .5rem;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 calc(var(--p) * 1%), #c9c9c5 0 100%);
  display: grid;
  place-items: center;
  position: relative;
}
.mini-donut__ring::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: #fff;
}
.mini-donut__val {
  position: relative;
  z-index: 1;
  font-family: var(--font-head);
  font-size: .95rem;
  color: var(--green-800);
}
.mini-donut__title { font-weight: 700; font-size: .85rem; }
.mini-donut__sub { font-size: .74rem; color: var(--muted); }

/* ------------------------------------------------ Solde masqué */
.is-masked [data-amount] { color: transparent; position: relative; }
.is-masked [data-amount]::after {
  content: '••••••';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  color: inherit;
  color: currentColor;
  -webkit-text-fill-color: currentColor;
  letter-spacing: .05em;
}
.is-masked [data-amount] { -webkit-text-fill-color: transparent; }
.is-masked [data-amount]::after { -webkit-text-fill-color: currentColor; }

@media (max-width: 860px) {
  .app-tabbar { display: flex; }
  body { padding-bottom: 64px; }
  .shortcut-grid { gap: 1rem .5rem; }
  .shortcut__icon { width: 56px; height: 56px; }
  .shortcut { font-size: .76rem; }
}
@media (max-width: 620px) {
  .shortcut-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .app-header__title { display: none; }
}

/* ==========================================================================
   Compléments page de connexion (BMCI CONNECT)
   ========================================================================== */
.login-title {
  font-size: 1.32rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: .3rem;
}
.login-card__sub { color: var(--ink-soft); font-size: .88rem; margin-bottom: 1.3rem; }

.input-valid {
  position: absolute;
  right: .55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6f4ea;
  color: var(--green);
}
.input-valid .ico { width: 15px; height: 15px; stroke-width: 2.4; }

/* Interrupteur « Se souvenir de moi » */
.switch {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .86rem;
  cursor: pointer;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__ui {
  width: 42px; height: 24px;
  border-radius: 999px;
  background: #cfcfcb;
  position: relative;
  flex: none;
  transition: background-color .2s;
}
.switch__ui::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s;
}
.switch input:checked + .switch__ui { background: var(--green); }
.switch input:checked + .switch__ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch__ui { outline: 3px solid var(--orange); outline-offset: 2px; }

.login-extras {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin-top: 1.1rem;
  font-size: .85rem;
  color: var(--muted);
}

.login-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.35rem;
  font-size: .8rem;
}
.login-shortcuts a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  opacity: .95;
}
.login-shortcuts a:hover { text-decoration: underline; }
.login-shortcuts .ico { width: 17px; height: 17px; }
.login-shortcuts--card {
  margin-top: 1.35rem;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  justify-content: space-between;
}
.login-shortcuts--card .ico { color: var(--green); }
.login-aside__legal { margin: .9rem 0 0; font-size: .74rem; opacity: .75; }
.login-aside__foot .login-shortcuts { color: #fff; }
.login-aside__foot .login-shortcuts a { color: #eaf7f2; }

@media (max-width: 1024px) {
  .login-shortcuts--card { display: none; }
  .login-extras { margin-bottom: .25rem; }
}

/* ------------------------------------------------ Raccourci en bouton */
.shortcut--button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: .8rem;
  line-height: 1.25;
  cursor: pointer;
  width: 100%;
}

/* ------------------------------------------------ Modale services */
.map-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(10, 20, 22, .72);
  backdrop-filter: blur(3px);
}
.map-modal[hidden] { display: none; }
.map-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 1100px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  overflow: visible;
}
.map-modal__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}
.map-modal__close:hover { background: var(--grey-100); }

/* ------------------------------------------------ Nav horizontale aussi sur mobile */
@media (max-width: 860px) {
  .app-nav {
    position: sticky;
    top: 62px;
    display: block;
    box-shadow: var(--shadow-sm);
    max-height: none;
    overflow: visible;
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .app-nav__list {
    flex-direction: row;
    gap: .2rem;
    overflow-x: auto;
  }
  .app-nav__list li { border-bottom: 0; }
  .app-nav__link {
    width: auto;
    padding: .8rem .85rem;
    font-size: .8rem;
    border-bottom: 3px solid transparent;
    border-left: 0;
    white-space: nowrap;
  }
  .app-nav__link[aria-current='page'] {
    border-left: 0;
    border-bottom-color: var(--green);
    background: transparent;
  }
  .app-nav-toggle { display: none !important; }
}


/* ------------------------------------------------ Donut central (tableau de bord) */
.donut { display: grid; place-items: center; }
.donut__center { position: relative; z-index: 1; text-align: center; max-width: 100%; padding: 0 .3rem; }
.donut--lg { width: 180px; height: 180px; }
.donut--lg::after { inset: 32px; }
.donut__center span {
  display: block;
  font-family: var(--font-body);
  font-size: .66rem;
  line-height: 1.15;
  color: var(--muted);
  margin: 0 auto .2rem;
  max-width: 110px;
}
.donut__center b { display: block; font-family: var(--font-head); font-size: 1.1rem; line-height: 1.1; }
@media (max-width: 620px) {
  .donut--lg { width: 148px; height: 148px; }
  .donut--lg::after { inset: 26px; }
  .donut__center span { max-width: 88px; font-size: .62rem; }
  .donut__center b { font-size: .96rem; }
}

/* Légendes des graphiques : jamais de montant coupé */
.legend .val { white-space: nowrap; }
@media (max-width: 620px) {
  .donut-wrap { flex-direction: column; align-items: center; gap: 1rem; }
  .legend { width: 100%; min-width: 0; }
  .legend li { gap: .45rem; }
  .legend .val { margin-left: auto; padding-left: .5rem; }
  .card__head { row-gap: .5rem; }
}

/* Fil d'Ariane : masqué sur les petits écrans (navigation par en-tête) */
@media (max-width: 620px) {
  .crumbs { display: none; }
  .page-head .sub { max-width: 100%; }
}

/* Libellés d'opérations : retour à la ligne sur mobile */
@media (max-width: 620px) {
  .op { align-items: flex-start; }
  .op__label { white-space: normal; line-height: 1.3; }
  .op__amount { white-space: nowrap; }
  .kpi-grid { grid-template-columns: 1fr; }
}

/* Cartes de crédit : une ligne lisible sur mobile */
@media (max-width: 620px) {
  .credit-card { gap: .5rem; padding-inline: .85rem; }
  .credit-card__title { font-size: .92rem; }
  .credit-card__amount { font-size: .85rem; white-space: nowrap; }
  .credit-card__num { font-size: .72rem; }
  .credit-card .chev { flex: none; }
}

/* Connexion : pas de débordement sur les très petits écrans */
.login-main { min-width: 0; }
.login-card { max-width: 100%; }
.login-shortcuts { flex-wrap: wrap; row-gap: .45rem; }
@media (max-width: 400px) {
  .login-main { padding-inline: .9rem; }
  .login-card { padding: 1.15rem; }
  .login-shortcuts { gap: .35rem .8rem; font-size: .78rem; }
  .login-shortcuts--card { gap: .3rem .7rem; }
}

/* Messages d'information */
.form-message--info { background: var(--mint-soft); color: #04563c; border: 1px solid #c6e6dc; }
.link--btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

/* Tablette : la barre d'onglets inférieure est réservée au mobile */
@media (min-width: 621px) and (max-width: 860px) {
  .app-tabbar { display: none; }
  body { padding-bottom: 0; }
}

/* ==========================================================================
   Vérification OTP (connexion — étape 2)
   ========================================================================== */
.otp-step__head {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1rem;
}
.otp-step__icon {
  width: 42px; height: 42px;
  flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--mint-soft);
  color: var(--green-700);
}
.otp-step__icon .ico { width: 22px; height: 22px; }
.otp-step__title {
  font-family: var(--font-head);
  font-size: 1.18rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin: 0;
}
.otp-step__sub { font-size: .76rem; color: var(--muted); margin: 0; }
.otp-step__text { font-size: .9rem; color: var(--ink-soft); margin: 0 0 1.1rem; line-height: 1.55; }

.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .45rem;
  margin-bottom: 1rem;
}
.otp-digit {
  width: 100%;
  height: 54px;
  text-align: center;
  font-family: var(--font-head);
  font-size: 1.35rem;
  color: var(--ink);
  border: 1px solid #cfd3ce;
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.otp-digit:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 135, 90, .16);
}
.otp-digit.is-filled { border-color: var(--green); background: var(--mint-soft); }

.sms-preview {
  border: 1px dashed #b9dcd2;
  background: #f5fbf9;
  border-radius: 8px;
  padding: .7rem .85rem;
  margin-bottom: 1rem;
}
.sms-preview__head {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: .3rem;
}
.sms-preview__head .ico { width: 15px; height: 15px; }
.sms-preview p { margin: 0; font-size: .82rem; color: #3d4a45; line-height: 1.5; }
.sms-preview b {
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: .18em;
  color: var(--green-800);
}

.otp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: .84rem;
}

/* ==========================================================================
   Écran de chargement de l'espace
   ========================================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: linear-gradient(180deg, #f4f8f6 0%, #eef4f1 55%, #e9f1ed 100%);
}
.loader[hidden] { display: none; }
.loader__inner { width: min(100%, 420px); text-align: center; }

.loader__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 22px;
  padding: 1.05rem 1.6rem;
  box-shadow: 0 10px 30px rgba(6, 70, 50, .10);
  margin-bottom: 1.9rem;
}
.loader__logo img { height: 46px; width: auto; }

.loader__brand {
  font-family: var(--font-head);
  font-size: 2.1rem;
  letter-spacing: .04em;
  color: #22282a;
  margin: 0 0 .5rem;
}
.loader__text { font-size: 1.02rem; color: #3c4a48; margin: 0 0 2rem; }

.loader__bar {
  position: relative;
  height: 8px;
  border-radius: 99px;
  background: #d7e3dd;
  overflow: hidden;
}
.loader__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #17b39b, #00875a 70%);
  transition: width .3s ease;
}
.loader__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: .7rem;
  font-size: .92rem;
  color: #56635f;
}
.loader__meta span:last-child {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--green);
}
.loader__dots {
  display: flex;
  justify-content: center;
  gap: .55rem;
  margin-top: 2.1rem;
}
.loader__dots i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #cdd8d3;
}
.loader__dots i.is-on { background: var(--green); }

@media (max-width: 400px) {
  .otp-inputs { gap: .3rem; }
  .otp-digit { height: 48px; font-size: 1.15rem; }
}

/* ==========================================================================
   Compte bloqué
   ========================================================================== */
.blocked-banner {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .95rem 1.05rem;
  border-radius: 10px;
  border: 1px solid #f0cfae;
  background: #fff7ee;
  margin-bottom: clamp(1rem, 2vw, 1.35rem);
}
.blocked-banner__icon {
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #fde7cf;
  color: #a3520b;
}
.blocked-banner__icon .ico { width: 18px; height: 18px; }
.blocked-banner__title {
  font-family: var(--font-head);
  font-size: .98rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #8a4409;
  margin: 0 0 .2rem;
}
.blocked-banner__text { font-size: .84rem; line-height: 1.5; color: #6d4a2a; margin: 0; }
.blocked-banner__body { min-width: 0; }
.blocked-banner .btn { margin-left: auto; align-self: center; white-space: nowrap; }

/* Panneau plein écran (virements) */
.blocked-panel {
  border-top: 4px solid #e8730f;
}
.blocked-panel .card__body { display: grid; gap: .9rem; }
.blocked-panel__head {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.blocked-panel__icon {
  width: 46px; height: 46px;
  flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #fde7cf;
  color: #a3520b;
}
.blocked-panel__icon .ico { width: 24px; height: 24px; }
.blocked-panel h2 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: 0;
  color: #8a4409;
}
.blocked-panel__text { font-size: .9rem; line-height: 1.6; color: var(--ink-soft); margin: 0; }

.blocked-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .9rem;
}
.blocked-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .85rem .95rem;
  background: #fcfcfb;
}
.blocked-box h3 {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .55rem;
}
.blocked-box ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.blocked-box li {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  font-size: .84rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.blocked-box li .ico { width: 16px; height: 16px; flex: none; margin-top: .12rem; }
.blocked-box--off li .ico { color: #b4441b; }
.blocked-box--on li .ico { color: var(--green-700); }

.blocked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  padding-top: .2rem;
}

/* Fenêtre « compte bloqué » (tableau de bord) */
.blocked-modal__dialog { max-width: 560px; }
.blocked-modal__body { padding: 1.4rem 1.3rem 1.25rem; display: grid; gap: .9rem; }
.blocked-modal__body h2 {
  font-family: var(--font-head);
  font-size: 1.16rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin: 0;
  color: #8a4409;
}
.blocked-modal__body p { font-size: .89rem; line-height: 1.6; color: var(--ink-soft); margin: 0; }
.blocked-modal__meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .35rem .8rem;
  font-size: .84rem;
  padding: .8rem .9rem;
  border-radius: 8px;
  background: #fff7ee;
  border: 1px solid #f0cfae;
}
.blocked-modal__meta dt { color: #8a5a2a; font-weight: 600; }
.blocked-modal__meta dd { margin: 0; color: #5d3f24; font-weight: 700; text-align: right; }

@media (max-width: 620px) {
  .blocked-banner { flex-wrap: wrap; }
  .blocked-banner .btn { margin-left: 0; width: 100%; justify-content: center; }
  .blocked-modal__meta { grid-template-columns: 1fr; gap: .15rem; }
  .blocked-modal__meta dd { text-align: left; margin-bottom: .45rem; }
}

/* ==========================================================================
   Cartes bancaires (visuel façon carte physique)
   ========================================================================== */
.bank-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: clamp(.9rem, 2vw, 1.2rem);
}
.bank-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1.62;
  padding: clamp(.95rem, 2vw, 1.2rem) clamp(1rem, 2vw, 1.3rem);
  border-radius: 16px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(6, 60, 44, .18), 0 2px 4px rgba(6, 60, 44, .12);
}
.bank-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 130% at 88% -10%, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 58%);
}
.bank-card--green { background: linear-gradient(118deg, #0a7f56 0%, #2fa478 52%, #7ec8a6 100%); }
.bank-card--orange { background: linear-gradient(118deg, #ec7714 0%, #f59a3c 52%, #f8c273 100%); }

.bank-card__top {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .95rem;
  font-weight: 700;
  font-style: italic;
  letter-spacing: .01em;
}
.bank-card__top .ico { width: 20px; height: 20px; opacity: .95; }
.bank-card__actions { margin-left: auto; display: flex; align-items: center; gap: .55rem; }
.bank-card__actions .ico { width: 19px; height: 19px; opacity: .9; }
.bank-card__badge {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .16rem .45rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .38);
  font-style: normal;
}

.bank-card__chip {
  width: 42px;
  height: 31px;
  margin: .75rem 0 auto;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18));
}

.bank-card__number {
  display: flex;
  align-items: center;
  gap: .38rem;
  margin: .55rem 0 .7rem;
  font-family: var(--font-head);
  font-size: clamp(1.02rem, 1.55vw, 1.24rem);
  letter-spacing: .085em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bank-card__number .sep { opacity: .85; letter-spacing: .12em; }
.bank-card__btn {
  width: 26px; height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}
.bank-card__btn:hover { background: rgba(255, 255, 255, .3); }
.bank-card__btn .ico { width: 15px; height: 15px; }
.bank-card__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.bank-card__foot {
  display: flex;
  align-items: flex-end;
  gap: clamp(.8rem, 3vw, 2.4rem);
}
.bank-card__field { display: grid; gap: .1rem; }
.bank-card__field .k {
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .82;
}
.bank-card__field .v {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  white-space: nowrap;
}
.bank-card__brand {
  margin-left: auto;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 700;
  letter-spacing: .02em;
  opacity: .95;
}
.bank-card__brand--mc { display: flex; align-items: center; gap: .25rem; font-style: normal; }
.bank-card__brand--mc span { width: 17px; height: 17px; border-radius: 50%; background: #ee2f24; opacity: .92; }
.bank-card__brand--mc span:last-child { background: #f7a91b; margin-left: -.55rem; }
.bank-card__foot-note {
  margin-top: .55rem;
  font-size: .72rem;
  color: var(--muted);
}
.bank-card__foot-note strong { color: #a3520b; }

/* Ajustements de proportions des cartes */
.bank-card { aspect-ratio: 1.5; padding: .95rem 1.05rem .9rem; border-radius: 15px; }
.bank-card__top { font-size: .88rem; gap: .42rem; min-width: 0; }
.bank-card__top > * { min-width: 0; }
.bank-card__actions { flex: none; }
.bank-card__chip { width: 38px; height: 28px; margin: .55rem 0 auto; }
.bank-card__number { margin: .3rem 0 .55rem; font-size: clamp(.96rem, 1.4vw, 1.12rem); gap: .3rem; }
.bank-card__btn { width: 23px; height: 23px; }
.bank-card__btn .ico { width: 14px; height: 14px; }
.bank-card__field .v { font-size: .72rem; }
.bank-card__field .k { font-size: .55rem; }
.bank-card__brand { font-size: .98rem; }
.bank-card__badge { font-size: .58rem; padding: .13rem .4rem; }
@media (max-width: 420px) {
  .bank-card { aspect-ratio: 1.45; }
  .bank-card__number { font-size: .92rem; }
}
.bank-card__foot { gap: clamp(.45rem, 1.5vw, 1.05rem); }
.bank-card__brand { font-size: .92rem; flex: none; }
.bank-card__field { min-width: 0; }
.bank-card__field .v { overflow: hidden; text-overflow: ellipsis; }

/* Actions de l'étape OTP */
.otp-actions { flex-direction: column; align-items: center; gap: .4rem; font-size: .82rem; }
.otp-actions .link[disabled],
.otp-actions .link:disabled { color: var(--muted); border-color: transparent; cursor: default; }
