/* =====================================================================
   Banque mobile — feuille de style (mobile first)
   ===================================================================== */
:root {
  --orange: #F15A22;
  --orange-dark: #D9480F;
  --orange-soft: #FDECE4;
  --blue: #0AA1DD;
  --green: #18A84A;
  --red: #E0405A;
  --yellow: #F7C325;
  --bg: #F7F7F7;
  --page: #E9E9E9;
  --surface: #FFFFFF;
  --surface-2: #F4F3F4;
  --text: #1F1F1F;
  --muted: #6B6B6B;
  --line: #E3E3E3;
  --icon: #BDBDBD;
  --font-title: 'Exo 2', 'Segoe UI', Roboto, sans-serif;
  --font: 'Open Sans', 'Segoe UI', Roboto, Arial, sans-serif;
}
body.theme-dark {
  --bg: #141414;
  --page: #000;
  --surface: #1E1E1E;
  --surface-2: #272727;
  --text: #ECECEC;
  --muted: #A5A5A5;
  --line: #343434;
  --icon: #7A7A7A;
  --orange-soft: #3A2219;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
}
body.text-lg { font-size: 17px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, .08);
}

/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  background: var(--surface);
  border-bottom: 2px solid var(--orange);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 6px;
}
.tb-left, .tb-right { display: flex; align-items: center; }
.tb-right { justify-content: flex-end; }
.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: var(--blue);
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  flex: none;
}
.icon-btn:active, .icon-btn:hover { background: rgba(10, 161, 221, .1); }
.badge {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  font: 700 10px/17px var(--font);
  text-align: center;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: .36em;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  letter-spacing: .2px;
  color: var(--text);
  white-space: nowrap;
}
/* La flèche dépasse le texte en haut et en bas (≈ 2,4 × la hauteur des majuscules) */
.logo-mark { height: 1.7em; width: .97em; flex: none; }
@media (max-width: 380px) {
  .icon-btn { width: 33px; height: 36px; font-size: 18px; }
  .logo { font-size: 16px; }
}

/* ---------- Menu latéral ---------- */
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: max(0px, calc(50% - 240px));
  width: min(90vw, 432px);
  background: var(--surface);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform .28s ease, visibility 0s linear .28s;
  box-shadow: 8px 0 24px rgba(0, 0, 0, .18);
}
.drawer.open { transform: none; visibility: visible; transition: transform .28s ease; }
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
body.drawer-lock { overflow: hidden; }
.drawer-head {
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid var(--orange);
  position: relative;
}
.drawer-close { position: absolute; right: 8px; top: 8px; color: var(--muted); }
.drawer-body { overflow-y: auto; flex: 1; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.drawer-section {
  background: var(--surface-2);
  color: var(--orange);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 21px;
  padding: 18px 16px 14px;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px;
  min-height: 46px;
  font-size: 15px;
}
.drawer-item i { width: 28px; text-align: center; color: var(--icon); font-size: 18px; flex: none; }
.drawer-item:hover { background: var(--surface-2); }
.drawer-item.active, .drawer-item.active i { color: var(--orange); }

/* ---------- Contenu ---------- */
.content { flex: 1; padding: 14px 14px 28px; display: flex; flex-direction: column; }
.page-title {
  font-family: var(--font-title);
  color: var(--orange);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
  margin: 4px 0 12px;
}
.sub-title {
  font-family: var(--font-title);
  color: var(--orange);
  font-weight: 600;
  font-size: 17px;
  margin: 20px 0 8px;
}
.sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 1px solid var(--orange);
  padding: 14px 16px 20px;
  margin-bottom: 14px;
}
.intro { color: var(--muted); margin: -4px 0 16px; font-size: 15px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.text-orange { color: var(--orange); }
.text-blue { color: var(--blue); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.link { color: var(--blue); font-weight: 600; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- Alertes / toast ---------- */
.alert {
  padding: 12px 14px;
  margin-bottom: 12px;
  border-left: 4px solid;
  background: var(--surface);
  font-size: 15px;
}
.alert-success { border-color: var(--green); color: #11743A; }
.alert-error { border-color: var(--red); color: #B0233A; }
.alert-info { border-color: var(--blue); color: #06688F; }
body.theme-dark .alert-success { color: #6EDC95; }
body.theme-dark .alert-error { color: #FF8C9E; }
body.theme-dark .alert-info { color: #7FD3F5; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: #222;
  color: #fff;
  padding: 12px 18px;
  border-radius: 24px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--orange);
  color: #fff;
  border: 2px solid var(--orange);
  padding: 12px 18px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  text-align: center;
  line-height: 1.2;
}
.btn:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-block { width: 100%; }
.btn-outline { background: var(--surface); color: var(--orange); }
.btn-outline:hover { background: var(--orange-soft); color: var(--orange); }
.btn-gray { background: #ECEBEC; color: var(--orange); border-color: #DDD; font-size: 18px; font-weight: 600; }
.btn-gray:hover { background: #E2E1E2; border-color: #D0D0D0; }
body.theme-dark .btn-gray { background: var(--surface-2); border-color: var(--line); }
.btn-blue { background: var(--blue); border-color: var(--blue); }
.btn-blue:hover { background: #0889BC; border-color: #0889BC; }
.btn-sm { padding: 7px 12px; font-size: 14px; }
.btn-row { display: flex; gap: 10px; margin-top: 6px; }
.btn-row > * { flex: 1; }
.btn-wide {
  display: block;
  width: 100%;
  background: var(--orange);
  color: #fff;
  border: 0;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15.5px;
  text-transform: uppercase;
  padding: 10px 8px;
  cursor: pointer;
  letter-spacing: .2px;
}
.btn-wide:hover { background: var(--orange-dark); }
.btn-wide.secondary { background: var(--surface); color: var(--orange); border: 2px solid var(--orange); }

/* ---------- Formulaires ---------- */
.form-group { margin-bottom: 14px; }
.form-group > label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.input {
  width: 100%;
  border: 1px solid #CFCFCF;
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
  font-size: 16px;
  border-radius: 2px;
}
body.theme-dark .input { border-color: #444; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10, 161, 221, .15); }
textarea.input { resize: vertical; min-height: 110px; }
.help { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.pass-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--blue);
  font-size: 18px;
  padding: 8px 10px;
  cursor: pointer;
}
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pill { position: relative; flex: 1; min-width: 120px; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span {
  display: block;
  text-align: center;
  border: 2px solid var(--orange);
  padding: 10px 6px;
  color: var(--orange);
  cursor: pointer;
  font-size: 15px;
  background: var(--surface);
}
.radio-pill input:checked + span { background: var(--orange); color: #fff; }
.radio-pill input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.check-circle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 16px; }
.check-circle input { width: 34px; height: 34px; accent-color: var(--blue); }
.stars { display: inline-flex; flex-direction: row-reverse; gap: 6px; }
.stars input { position: absolute; opacity: 0; pointer-events: none; }
.stars label { font-size: 30px; color: #D5D5D5; cursor: pointer; margin: 0; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #F7B500; }
.stars input:focus-visible + label { outline: 2px solid var(--blue); }

/* ---------- Interrupteur ---------- */
.switch { position: relative; display: inline-block; width: 58px; height: 34px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: #C9C9C9;
  border-radius: 34px;
  transition: .2s;
  cursor: pointer;
}
.switch .slider::before {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::before { transform: translateX(24px); }
.switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }
.switch input:focus-visible + .slider { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Accueil ---------- */
.greet {
  font-family: var(--font-title);
  color: var(--orange);
  font-size: 21px;
  font-weight: 600;
  text-align: center;
  margin: 6px 0 10px;
  line-height: 1.2;
}
.acc-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  gap: 10px;
}
.acc-carousel::-webkit-scrollbar { display: none; }
.account-card {
  flex: 0 0 100%;
  scroll-snap-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 1px solid var(--orange);
  text-align: center;
  padding: 12px 10px 6px;
  font-size: 16px;
}
.account-card .acc-num { color: var(--blue); display: block; font-size: 16px; margin: 2px 0 6px; word-break: break-all; }
.balance { font-size: 17px; font-weight: 600; margin: 2px 0; letter-spacing: 1px; }
.balance .mask { color: var(--text); }
.balance .val { display: none; letter-spacing: 0; color: var(--green); }
.balance.show .val { display: inline; }
.balance.show .mask { display: none; }
.eye-btn { background: none; border: 0; color: var(--blue); cursor: pointer; padding: 6px 14px; line-height: 0; }
.eye-btn svg { width: 34px; height: auto; display: inline-block; vertical-align: middle; }
.eye-btn .ic-eye-off { display: none; }
.balance.show ~ .eye-btn .ic-eye { display: none; }
.balance.show ~ .eye-btn .ic-eye-off { display: inline-block; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.dots .dot { width: 7px; height: 7px; border-radius: 50%; background: #CCC; }
.dots .dot.active { background: var(--orange); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 1px solid var(--orange);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 6px;
  min-height: 96px;
  text-align: center;
  font-size: 14.5px;
}
.tile i { color: var(--orange); font-size: 26px; }
.tile:hover, .tile:active { background: var(--orange-soft); }
.btn-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px solid var(--orange);
  border-radius: 10px;
  padding: 11px 10px;
  color: var(--orange);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15.5px;
  text-transform: uppercase;
  background: var(--surface);
  text-align: center;
  line-height: 1.15;
}
.btn-new .new { background: var(--orange); color: #fff; font-size: 11px; padding: 5px 5px; border-radius: 3px; letter-spacing: 1px; flex: none; }
.home-bottom { margin-top: auto; padding-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.home-bottom a {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-top: 1px solid var(--orange);
  padding: 12px 10px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  line-height: 1.2;
}
.home-bottom i { font-size: 24px; color: var(--icon); }
.home-bottom em { font-style: normal; color: var(--orange); }

/* ---------- Listes ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-top: 1px solid var(--orange); margin-bottom: 14px; }
.list-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  min-height: 56px;
  width: 100%;
  background: none;
  text-align: left;
  cursor: pointer;
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item .li-icon { width: 34px; text-align: center; font-size: 21px; color: var(--orange); flex: none; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-title { display: block; }
.list-item .li-sub { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
.list-item .chev { color: var(--blue); font-size: 16px; flex: none; }
.list-item.unread .li-title { font-weight: 700; }
.list-item .li-icon .avatar { width: 44px; height: 44px; font-size: 18px; }
.list.settings .li-icon { width: 46px; }
.list.settings { border-top: 0; background: none; border: 0; }
.list.settings .list-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 1px solid var(--orange);
  margin-bottom: 2px;
  min-height: 66px;
  font-size: 16px;
  padding: 12px 14px;
}
.list.settings .list-item:first-child .li-title { color: var(--blue); font-weight: 600; }
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: none;
  font-size: 18px;
}
.avatar.big { width: 56px; height: 56px; font-size: 22px; border: 3px solid var(--orange); }

/* ---------- Comptes ---------- */
.acc-row { display: block; background: var(--surface); border: 1px solid var(--line); border-top: 1px solid var(--orange); padding: 14px 16px; margin-bottom: 10px; }
.acc-row-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 17px; }
.acc-row-top i { color: var(--blue); }
.acc-row-num { color: var(--blue); margin: 2px 0 8px; }
.acc-row-bal { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; align-items: baseline; }
.acc-row-bal b { color: var(--text); font-size: 19px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: right; word-break: break-all; }
.big-balance { text-align: center; padding: 6px 0 12px; }
.big-balance small { display: block; color: var(--muted); }
.big-balance b { font-size: 28px; font-family: var(--font-title); color: var(--green); }
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; }
.quick-actions a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; text-align: center; }
.quick-actions i { color: var(--orange); font-size: 22px; }
.filter-bar { display: flex; gap: 10px; align-items: center; margin: 4px 0 6px; }
.filter-bar select { flex: 1; }

/* ---------- Opérations ---------- */
.tx-day { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 14px 2px 6px; letter-spacing: .3px; }
.tx { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.tx-ic {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 15px;
}
.tx-body { flex: 1; min-width: 0; }
.tx-lib { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { font-size: 12px; color: var(--muted); }
.tx-amt { font-weight: 700; white-space: nowrap; font-size: 14.5px; }
.tx-amt.credit { color: var(--green); }

.summary { margin: 0 0 16px; border: 1px solid var(--line); background: var(--surface); }
.summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 15px; }
.summary > div:last-child { border-bottom: 0; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word; }
.summary .total dd { color: var(--orange); font-size: 18px; }
.success-box { text-align: center; padding: 8px 0 14px; }
.success-box > i { font-size: 58px; color: var(--green); }
.success-box h2 { font-family: var(--font-title); color: var(--green); margin: 8px 0 4px; font-size: 20px; }
.secret-box { background: var(--orange-soft); border: 1px dashed var(--orange); padding: 12px; text-align: center; margin-bottom: 14px; }
.secret-box b { display: block; font-size: 26px; letter-spacing: 3px; color: var(--orange); font-family: var(--font-title); }
.steps { display: flex; gap: 6px; margin-bottom: 14px; }
.steps span { flex: 1; height: 4px; background: var(--line); border-radius: 2px; }
.steps span.on { background: var(--orange); }

/* ---------- Cartes ---------- */
.card-tabs-chips { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 6px; }
.chip {
  border: 1px solid var(--orange);
  color: var(--orange);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 14px;
  white-space: nowrap;
  background: var(--surface);
}
.chip.active { background: var(--orange); color: #fff; }
.card-name { font-family: var(--font-title); font-weight: 600; color: var(--orange); font-size: 16px; margin: 14px 0 4px 6px; text-transform: uppercase; }
.bank-card {
  position: relative;
  aspect-ratio: 1.586;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 90% at 85% 10%, rgba(255, 255, 255, .55), transparent 55%),
    linear-gradient(135deg, #8C8C8C 0%, #CFCFCF 42%, #9A9A9A 68%, #BDBDBD 100%);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
  user-select: none;
}
.bank-card::after {
  content: "";
  position: absolute;
  right: -14%;
  top: -8%;
  width: 70%;
  aspect-ratio: 1;
  transform: rotate(45deg);
  border: 22px solid rgba(255, 255, 255, .28);
  border-radius: 14px;
}
.bank-card .bc-logo { position: absolute; left: 7%; top: 5%; color: #fff; font-size: 17px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.bank-card .bc-chip {
  position: absolute;
  left: 8%;
  top: 30%;
  width: 13%;
  aspect-ratio: 1.3;
  border-radius: 7px;
  background: linear-gradient(135deg, #E9E9E9, #A9A9A9);
  border: 1px solid rgba(0, 0, 0, .25);
}
.bank-card .bc-chip::before { content: ""; position: absolute; inset: 30% 0; border-top: 1px solid rgba(0, 0, 0, .3); border-bottom: 1px solid rgba(0, 0, 0, .3); }
.bank-card .bc-warn { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); color: var(--yellow); font-size: 40px; z-index: 2; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }
.bank-card .bc-number {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9%;
  text-align: center;
  font-size: clamp(22px, 7.5vw, 34px);
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .35);
  z-index: 2;
}
.bank-card .bc-exp { position: absolute; right: 7%; top: 30%; font-size: 13px; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); z-index: 2; text-align: right; }
.bank-card.locked { filter: grayscale(1) brightness(.8); }
.bank-card .bc-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 26px;
  background: rgba(0, 0, 0, .35);
  z-index: 3;
  letter-spacing: 2px;
}
.card-status { text-align: center; font-family: var(--font-title); font-weight: 600; font-size: 13.5px; text-transform: uppercase; margin: 10px 0; color: var(--red); }
.card-status.ok { color: var(--green); }
.block-box {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 2px solid #9A9AA6;
  border-radius: 12px;
  padding: 8px 14px;
  margin: 0 4px 12px;
}
.block-box > i { color: var(--orange); font-size: 24px; }
.block-box .bb-text { flex: 1; }
.block-box .bb-title { font-size: 16px; }
.block-box .bb-sub { font-family: var(--font-title); font-weight: 600; color: var(--muted); font-size: 13.5px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; margin: 14px 0 6px; }
.tab {
  border: 2px solid var(--orange);
  background: var(--surface);
  padding: 7px 4px;
  font-size: 13.5px;
  text-transform: uppercase;
  cursor: pointer;
}
.tab.active { background: var(--orange); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.svc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 2px;
  font-size: 15.5px;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.svc > i:not(.chev) { color: var(--orange); font-size: 23px; width: 40px; text-align: center; flex: none; }
.svc:disabled { opacity: .5; cursor: not-allowed; }
.svc .svc-label { flex: 1; }
.svc .chev { color: var(--blue); transition: transform .2s; }
.svc.open .chev { transform: rotate(90deg); }
.svc-detail { display: none; padding: 0 4px 12px 52px; color: var(--muted); font-size: 15px; }
.svc.open + .svc-detail { display: block; }
.svc-detail form { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text); margin-bottom: 6px; }
.link-danger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--red);
  background: none;
  border: 0;
  font-family: var(--font-title);
  font-size: 15.5px;
  text-transform: uppercase;
  width: 100%;
  padding: 12px;
  cursor: pointer;
}
.plafond { padding: 14px 2px; border-bottom: 1px solid var(--line); }
.plafond-head { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 6px; gap: 8px; }
.plafond form { display: flex; gap: 8px; margin-top: 10px; }
.plafond form select { flex: 1; }
.progress { height: 8px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--orange); border-radius: 5px; }
dialog {
  border: 0;
  border-top: 3px solid var(--orange);
  padding: 20px;
  width: min(92vw, 420px);
  background: var(--surface);
  color: var(--text);
}
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h2 { font-family: var(--font-title); color: var(--orange); margin: 0 0 8px; }

/* ---------- Messagerie ---------- */
.msg-new { padding: 14px 6px; }
.msg-new h1 { font-family: var(--font); font-weight: 400; color: var(--orange); font-size: 24px; margin: 8px 0 14px; }
.msg-line { display: flex; align-items: center; gap: 8px; padding: 0 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; font-size: 16px; }
.msg-line .input { flex: 1; }
.msg-body { white-space: pre-wrap; line-height: 1.55; }
.msg-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.msg-head h2 { margin: 0 0 4px; font-size: 19px; }
.fab {
  position: fixed;
  bottom: 22px;
  right: max(18px, calc(50% - 240px + 18px));
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
  z-index: 20;
}
.fab .fa-plus { position: absolute; right: 10px; bottom: 11px; font-size: 11px; background: #fff; color: var(--orange); border-radius: 50%; width: 15px; height: 15px; display: flex; align-items: center; justify-content: center; }

/* ---------- Divers ---------- */
.empty { text-align: center; color: var(--muted); font-size: 15px; padding: 14px 6px 26px; }
.empty i { font-size: 40px; color: var(--icon); display: block; margin-bottom: 8px; }
.empty p { margin: 0; }
.status-pill { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 12px; background: var(--orange-soft); color: var(--orange); font-weight: 600; }
.status-pill.ok { background: #E3F6EA; color: #11743A; }
body.theme-dark .status-pill.ok { background: #183524; color: #6EDC95; }
.item-card { background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; margin-bottom: 8px; }
.item-card .ic-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 4px; }
.item-card .ic-title { font-weight: 700; }
.benef { display: flex; gap: 12px; align-items: center; }
.benef .benef-body { flex: 1; min-width: 0; }
.benef .benef-rib { font-size: 13px; color: var(--muted); word-break: break-all; }
.benef-actions { display: flex; gap: 6px; }
.icon-action { border: 1px solid var(--line); background: var(--surface); width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--blue); cursor: pointer; }
.icon-action.danger { color: var(--red); }
details.fold { background: var(--surface); border: 1px solid var(--line); border-top: 1px solid var(--orange); margin-bottom: 14px; }
details.fold > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; color: var(--orange); list-style: none; display: flex; align-items: center; gap: 10px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; color: var(--blue); font-size: 13px; transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(180deg); }
details.fold > .fold-body { padding: 0 16px 16px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 8px 0 0; }
.rib-card { border: 2px solid var(--orange); padding: 16px; background: var(--surface); }
.rib-grid { display: grid; grid-template-columns: 1fr 1fr 3fr 1fr; border: 1px solid var(--line); margin: 10px 0; text-align: center; }
.rib-grid div { padding: 6px 2px; border-right: 1px solid var(--line); }
.rib-grid div:last-child { border-right: 0; }
.rib-grid small { display: block; color: var(--muted); font-size: 11px; }
.rib-grid b { font-size: 14px; word-break: break-all; }
.statement table { width: 100%; border-collapse: collapse; font-size: 13px; }
.statement th, .statement td { padding: 7px 5px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.statement th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; }
.statement td.num, .statement th.num { text-align: right; white-space: nowrap; }
.statement tr.strong td { font-weight: 700; }
.sim-result { background: var(--orange-soft); padding: 16px; text-align: center; margin: 6px 0 14px; }
.sim-result b { display: block; font-size: 30px; color: var(--orange); font-family: var(--font-title); }
input[type=range] { width: 100%; accent-color: var(--orange); }
.range-value { float: right; font-weight: 700; color: var(--text); }

/* ---------- Connexion ---------- */
.auth { padding: 22px 4px; }
.auth-logo { display: flex; justify-content: center; font-size: 27px; margin: 18px 0 4px; }
.auth .page-title { text-align: center; }
.demo-box { background: var(--surface); border: 1px dashed var(--orange); padding: 12px 14px; font-size: 14px; margin: 16px 0; }
.demo-box code { background: var(--surface-2); padding: 1px 6px; font-weight: 700; }
.disclaimer { font-size: 12px; color: var(--muted); text-align: center; margin-top: 18px; }

/* ---------- Connexion (style CIH) ---------- */
body.auth-page:has(.login) .app {
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 150, 70, .12), transparent 60%),
    linear-gradient(176deg,
      #C75A39 0%, #BC5436 14%, #A94B3E 30%, #5B4B63 50%,
      #3E5880 68%, #2A79B4 86%, #15A3DC 100%);
}
body.auth-page:has(.login) .content { padding: 0; }
.login {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 18px 28px;
  color: #fff;
}
.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  margin: 0 -18px 10px;              /* pleine largeur : .login a un padding de 18px */
  padding: 0 14px;
  border-bottom: 2px solid var(--orange);   /* trait orange sous l'en-tête (comme l'appli CIH) */
}
.login-top .icon-btn { color: #35C2F2; }
.login-top .logo { color: #fff; font-size: 20px; }
.login-top .logo .logo-txt { color: #fff; }
.login-welcome {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  margin: 10px 0 22px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.auth-card {
  background: rgba(28, 20, 26, .5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px;
  padding: 20px 20px 22px;
  margin-bottom: 20px;
}
.auth-card-head { display: flex; align-items: center; justify-content: space-between; }
.auth-card-head h2 { font-family: var(--font-title); font-weight: 700; font-size: 24px; margin: 0; }
.auth-dots { display: inline-flex; gap: 7px; }
.auth-dots i { width: 11px; height: 11px; border-radius: 50%; border: 2px solid #F0641F; }
.auth-dots i.on { background: #F0641F; }
.login-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .3);
  margin-top: 18px;
  padding: 6px 0;
}
.login-field > i { width: 22px; font-size: 18px; text-align: center; color: #fff; flex: none; }
.login-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 16px;
  padding: 8px 0;
}
.login-input::placeholder { color: rgba(255, 255, 255, .6); }
.login-input:focus { outline: none; }
.login-field .pass-eye { position: static; transform: none; color: rgba(255, 255, 255, .8); flex: none; padding: 4px 6px; }
.login-forgot { font-family: var(--font-title); font-weight: 700; font-style: italic; font-size: 14px; color: #fff; flex: none; }
.login-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  font-weight: 600;
  font-size: 17px;
}
.login-connect {
  margin-top: 22px;
  padding: 16px 18px;
  font-size: 19px;
  text-transform: none;
  border-radius: 8px;
}
.login-install {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 10px;
  padding: 15px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.login-install[hidden] { display: none; }
.login-install i { font-size: 18px; }
.login-pay {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #fff;
  color: #222;
  border: 0;
  border-radius: 10px;
  padding: 16px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
}
.login-pay i { color: var(--blue); font-size: 20px; }
.login-services-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 24px;
  margin: 24px 0 14px;
}
.login-services { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.svc-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(20, 28, 42, .42);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  padding: 26px 10px;
  color: #fff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  text-align: center;
}
.svc-tile:hover { background: rgba(20, 28, 42, .6); }
.svc-tile i { font-size: 30px; }
.login-foot { margin-top: 24px; text-align: center; }
.login-register { color: #fff; text-decoration: underline; }
.login-foot .demo-box { background: rgba(0, 0, 0, .22); border-color: rgba(255, 255, 255, .35); color: #fff; }
.login-foot .demo-box code { background: rgba(255, 255, 255, .18); color: #fff; }
.login-foot .disclaimer { color: rgba(255, 255, 255, .85); }

/* ---------- Écran de démarrage (splash) ---------- */
.splash-body { margin: 0; background: #fff; font-family: var(--font); }
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.splash-main { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: -4vh; }
.splash-logo { font-size: 52px; }
.splash-logo .logo-txt { color: #2B2B2B; }
.splash-tag {
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 20px;
  color: #3A4A55;
  margin: 16px 0 0;
}
.splash-foot {
  position: absolute;
  bottom: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.splash-v { font-family: var(--font-title); font-weight: 600; font-size: 18px; color: #9AA0A6; }
.splash-phone { width: 46px; height: auto; }
@media (max-width: 380px) {
  .splash-logo { font-size: 42px; }
  .splash-tag { font-size: 17px; }
}

/* ---------- Impression ---------- */
@media print {
  .topbar, .drawer, .drawer-overlay, .no-print, .toast, .fab, .alert { display: none !important; }
  body, .app { background: #fff !important; box-shadow: none; max-width: none; color: #000; }
  .sheet { border: 0; padding: 0; }
}
