/* Yiriwa — microfinance & tontine — feuille de style unique */
/* Polices de la marque Yiriwa (licence SIL Open Font License, voir fonts/LICENCE-OFL.txt) */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/fonts/Inter-Regular.woff) format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/fonts/Inter-Medium.woff) format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/fonts/Inter-SemiBold.woff) format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url(/fonts/Poppins-Medium.woff) format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(/fonts/Poppins-Bold.woff) format("woff"); }
/* Charte Yiriwa : Vert Forêt #14532D, Vert Feuille #2A9150, Vert Tendre #8AD68C, Or Cauri #E8B640, Or Foncé #B07A14, Crème #F6F1E4 */
:root {
  --brand: #14532D; --brand-leaf: #2A9150; --brand-light: #8AD68C; --brand-gold: #E8B640; --brand-cream: #F6F1E4;
  --ink: #16261C; --ink-2: #44554A; --ink-3: #6B7A70;
  --bg: #F4F6F1; --surface: #ffffff; --line: #DCE3DA; --line-2: #EDF1EB;
  --primary: #1B7340; --primary-2: #14532D; --primary-soft: #E2F1E3;
  --gold: #B07A14; --gold-soft: #FBF1D6;
  --ok: #2e7d4f; --ok-soft: #e2f2e8; --warn: #8a6d1d; --warn-soft: #f8f0d8; --bad: #b3362f; --bad-soft: #f8e3e1; --info-soft: #e6eef8;
  --radius: 10px; --radius-s: 6px;
  --side: 244px; --head: 58px;
  --shadow: 0 1px 2px rgba(20, 83, 45, .06), 0 4px 14px rgba(20, 83, 45, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Ubuntu, Arial, sans-serif;
  --font-title: "Poppins", "Inter", system-ui, sans-serif;
  --side-bg: #14532D; --on-primary: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E6EEE8; --ink-2: #B3C2B8; --ink-3: #85968B; --bg: #0F1712; --surface: #17211A; --line: #29382D; --line-2: #1F2B23;
    --primary: #6CC38F; --primary-2: #8FD6A8; --primary-soft: #17331F; --gold: #E8B640; --gold-soft: #3A2E17;
    --ok: #6cc38f; --ok-soft: #173325; --warn: #e2c060; --warn-soft: #3a3217; --bad: #ee8077; --bad-soft: #3d1d1b; --info-soft: #1c2a3c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); --side-bg: #0B2214; --on-primary: #0B2214;
  }
}
:root[data-theme="dark"] {
  --ink: #E6EEE8; --ink-2: #B3C2B8; --ink-3: #85968B; --bg: #0F1712; --surface: #17211A; --line: #29382D; --line-2: #1F2B23;
  --primary: #6CC38F; --primary-2: #8FD6A8; --primary-soft: #17331F; --gold: #E8B640; --gold-soft: #3A2E17;
  --ok: #6cc38f; --ok-soft: #173325; --warn: #e2c060; --warn-soft: #3a3217; --bad: #ee8077; --bad-soft: #3d1d1b; --info-soft: #1c2a3c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); --side-bg: #0B2214; --on-primary: #0B2214;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-text-size-adjust: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; font-family: var(--font-title); font-weight: 700; letter-spacing: -.005em; }
h2, h3 { font-weight: 500; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
.num, td.num, .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--ink-3); } .small { font-size: .85rem; }
.hidden { display: none !important; }

/* ---------- Écran de chargement ---------- */
.splash { position: fixed; inset: 0; background: #14532D; display: grid; place-items: center; align-content: center; gap: 30px; }
.splash img { width: 190px; height: auto; }
.splash-bar { width: 140px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; position: relative; }
.splash-bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: #E8B640; border-radius: 3px; animation: splash 1.1s ease-in-out infinite; }
@keyframes splash { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .splash-bar::after { animation: none; width: 100%; } }

/* ---------- Structure générale ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--side-bg); color: #DCEBDF; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; gap: 10px; align-items: center; padding: 16px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand img { width: 36px; height: 36px; border-radius: 8px; object-fit: contain; background: #fff; }
.brand .logo-ph { width: 36px; height: 36px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; color: #fff; font-weight: 700; }
.brand b { display: block; color: #fff; font-family: var(--font-title); font-weight: 700; font-size: .98rem; line-height: 1.2; }
.brand span { font-size: .75rem; color: #A6CDB0; }
.brand img.app-icon { background: none; border-radius: 9px; }
.side-foot { padding: 14px 18px 18px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: #A6CDB0; font-size: .7rem; }
.side-foot img { height: 22px; width: auto; opacity: .85; }
.nav { padding: 8px 8px 24px; flex: 1; }
.nav a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: #DCEBDF; font-size: .92rem; border-left: 3px solid transparent; }
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.nav a.active { background: rgba(255,255,255,.12); color: #fff; border-left-color: #E8B640; font-weight: 500; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav .sep { height: 1px; background: rgba(255,255,255,.08); margin: 8px 6px; }
.nav .badge { margin-left: auto; }
.main { min-width: 0; display: flex; flex-direction: column; }
.head { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.head-row { height: var(--head); display: flex; align-items: center; gap: 10px; padding: 0 18px; }
.head .menu-btn { display: none; }
.search-global { flex: 1; max-width: 440px; position: relative; }
.search-global input { width: 100%; padding: 8px 12px 8px 34px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--ink); font: inherit; font-size: .9rem; }
.search-global svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--ink-3); }
.search-results { position: absolute; top: 42px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-height: 60vh; overflow: auto; z-index: 40; }
.search-results a { display: block; padding: 8px 12px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.search-results a small { display: block; color: var(--ink-3); }
.search-results a:hover, .search-results a.sel { background: var(--primary-soft); text-decoration: none; }
.head-info { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: .85rem; }
.caisse-badge { white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 16px; background: var(--gold-soft); color: var(--ink); font-weight: 600; border: 1px solid var(--gold); }
.caisse-badge.off { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 14px; background: var(--line-2); color: var(--ink-2); font-size: .8rem; white-space: nowrap; }
.net-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.net-dot.off { background: var(--bad); }
.space-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.space-switch a { padding: 4px 12px; font-size: .82rem; color: var(--ink-2); }
.space-switch a.on { background: var(--primary); color: var(--on-primary); text-decoration: none; }
.profile-btn { display: flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; color: var(--ink); font: inherit; padding: 4px; border-radius: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.content { padding: 22px 24px 60px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 2px 0 0; color: var(--ink-3); font-size: .9rem; }
.crumbs { font-size: .82rem; color: var(--ink-3); margin-bottom: 4px; }
.offline-bar { background: var(--warn-soft); color: var(--warn); padding: 6px 18px; font-size: .85rem; display: flex; gap: 10px; align-items: center; }

/* ---------- Surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { margin: 0; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.stat .v { font-size: 1.35rem; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .l { color: var(--ink-3); font-size: .82rem; }
.stat.accent { border-left: 3px solid var(--primary); }
.stat.warn { border-left: 3px solid var(--warn); } .stat.bad { border-left: 3px solid var(--bad); } .stat.ok { border-left: 3px solid var(--ok); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: .92rem; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; }

/* ---------- Tuiles des espaces ---------- */
.tile-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.tile-group h3 { font-size: .85rem; color: var(--ink-3); font-weight: 600; margin: 2px 4px 8px; }
.tile { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; color: var(--ink); }
.tile:hover { background: var(--primary-soft); text-decoration: none; }
.tile .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.tile .ic svg { width: 18px; height: 18px; }
.tile span { font-size: .93rem; }

/* ---------- Boutons, formulaires ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .9rem; font-weight: 550; cursor: pointer; white-space: nowrap; min-height: 38px; }
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-2); }
.btn.danger { color: var(--bad); border-color: var(--bad); } .btn.danger.solid { background: var(--bad); color: #fff; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 4px 9px; min-height: 30px; font-size: .82rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .83rem; color: var(--ink-2); margin-bottom: 3px; font-weight: 550; }
.field .hint { font-size: .78rem; color: var(--ink-3); margin-top: 3px; }
.field .req { color: var(--bad); }
input, select, textarea { font: inherit; color: var(--ink); }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, .inp {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); min-height: 40px; font-size: .95rem; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .inp:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field.check { display: flex; align-items: center; gap: 8px; } .field.check label { margin: 0; font-weight: 500; color: var(--ink); }
.field.check input { width: 18px; height: 18px; }
.money-input { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.filters .field { min-width: 140px; } .filters .field label { font-size: .76rem; }
.filters .field input, .filters .field select { min-height: 34px; padding: 5px 8px; font-size: .88rem; }
.picker { position: relative; }
.picker-list { position: absolute; z-index: 60; left: 0; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow); max-height: 260px; overflow: auto; }
.picker-list div { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.picker-list div:hover { background: var(--primary-soft); }
.picker-list small { color: var(--ink-3); display: block; }
.photo-box { display: flex; gap: 10px; align-items: center; }
.photo-box img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--line-2); }

/* ---------- Tableaux ---------- */
.dt-tools { display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.dt-tools .inp { max-width: 260px; min-height: 34px; padding: 5px 10px; font-size: .88rem; }
.dt-exports { display: flex; gap: 4px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); }
table.dt { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.dt th { text-align: left; font-weight: 600; color: var(--ink-2); background: var(--line-2); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
table.dt th.num, table.dt td.num { text-align: right; }
table.dt td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.dt tbody tr:hover { background: var(--primary-soft); }
table.dt tr.clickable { cursor: pointer; }
table.dt tfoot td { font-weight: 650; background: var(--line-2); }
table.dt td.actions { white-space: nowrap; text-align: right; }
.dt-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 2px; font-size: .84rem; color: var(--ink-3); flex-wrap: wrap; }
.empty { padding: 28px; text-align: center; color: var(--ink-3); }
.empty .btn { margin-top: 10px; }

/* ---------- Statuts ---------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .76rem; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.st-ok { background: var(--ok-soft); color: var(--ok); } .st-warn { background: var(--warn-soft); color: var(--warn); } .st-bad { background: var(--bad-soft); color: var(--bad); } .st-info { background: var(--info-soft); color: var(--primary); }
tr.row-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); } tr.row-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); } tr.row-ok td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.alert { border-radius: var(--radius-s); padding: 10px 12px; margin-bottom: 8px; display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; border: 1px solid transparent; }
.alert b { display: block; } .alert a { margin-left: auto; white-space: nowrap; }
.alert.info { background: var(--info-soft); } .alert.warning { background: var(--warn-soft); border-color: rgba(138,109,29,.25); } .alert.danger { background: var(--bad-soft); border-color: rgba(179,54,47,.25); } .alert.success { background: var(--ok-soft); }

/* ---------- Carnet : 12 pages x 31 jours ---------- */
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.page-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--surface); }
.page-card.cur { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.page-card header { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: 6px; }
.days { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.days i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--line-2); font-style: normal; font-size: .62rem; color: var(--ink-3); display: grid; place-items: center; }
.days i.f { background: var(--primary); color: var(--on-primary); } .days i.c { background: var(--gold); color: #fff; }

/* ---------- Saisie rapide de la collecte ---------- */
.collect-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.collect-row:last-child { border-bottom: 0; }
.collect-row .who b { display: block; font-size: .95rem; }
.collect-row .who small { color: var(--ink-3); }
.collect-row.done { background: var(--ok-soft); }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button { width: 38px; height: 38px; border: 0; background: var(--line-2); font-size: 1.15rem; cursor: pointer; color: var(--ink); }
.stepper input { width: 46px; height: 38px; border: 0; text-align: center; font-weight: 700; font-size: 1rem; background: var(--surface); }
.sticky-bar { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; z-index: 5; border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- Fenêtres modales, notifications ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 22, 32, .48); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 640px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 940px; } .modal.narrow { max-width: 440px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.08rem; }
.modal-body { padding: 16px 18px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.x-btn { border: 0; background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink-3); padding: 4px 8px; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: .9rem; animation: tin .18s ease-out; }
.toast.error { background: var(--bad); } .toast.success { background: var(--ok); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.dropdown { position: absolute; right: 12px; top: calc(var(--head) - 4px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 240px; z-index: 50; padding: 6px; }
.dropdown a, .dropdown button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 6px; color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; }
.dropdown a:hover, .dropdown button:hover { background: var(--primary-soft); text-decoration: none; }
.dropdown .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: .85rem; }
.notif-item { padding: 8px 10px; border-bottom: 1px solid var(--line-2); font-size: .88rem; }
.notif-item.unread { background: var(--info-soft); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs a { padding: 8px 14px; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; font-size: .92rem; }
.tabs a.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; text-decoration: none; }
.help-btn { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow); cursor: pointer; font-size: 1.2rem; font-weight: 700; }
.tour-tip { position: fixed; z-index: 300; background: var(--surface); border: 2px solid var(--primary); border-radius: 10px; padding: 12px 14px; max-width: 320px; box-shadow: var(--shadow); font-size: .9rem; }
.tour-hl { position: relative; z-index: 250; box-shadow: 0 0 0 4px var(--gold) !important; border-radius: 8px; }
.chart { width: 100%; height: 190px; }
.chart text { font-size: 10px; fill: var(--ink-3); }
.lock-screen { position: fixed; inset: 0; z-index: 500; background: var(--bg); display: grid; place-items: center; padding: 16px; }

/* ---------- Connexion ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: #14532D; color: #DCEBDF; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art h1 { color: #fff; font-size: 2.1rem; max-width: 14em; margin-top: 34px; }
.login-art .login-logo { width: 210px; height: auto; display: block; position: relative; }
.login-art > * { position: relative; z-index: 1; }
.login-art p { color: #BBD9C2; max-width: 30em; }
.login-art .login-deco { position: absolute; right: -90px; bottom: -70px; width: 430px; height: auto; opacity: .07; z-index: 0; transform: rotate(-14deg); pointer-events: none; }
.login-form .login-mobile-logo { display: none; }
.login-form { display: grid; place-items: center; padding: 32px 20px; background: var(--surface); }
.login-form form { width: 100%; max-width: 360px; }
.login-form .field { margin-bottom: 12px; }
.pw-wrap { position: relative; } .pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--primary); cursor: pointer; font-size: .82rem; }
.server-time { font-size: .82rem; color: var(--ink-3); margin-top: 18px; }

/* ---------- Petits écrans ---------- */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 90; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .head .menu-btn { display: inline-flex; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login { grid-template-columns: 1fr; } .login-art { display: none; }
  .login-form .login-mobile-logo { display: block; width: 170px; margin: 0 auto 26px; }
}
@media (max-width: 640px) {
  .content { padding: 14px 12px 70px; }
  .head-row { padding: 0 10px; gap: 6px; }
  .head-info .hide-sm { display: none; }
  .form, .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .search-global { max-width: none; min-width: 0; }
  .help-btn { bottom: 78px; right: 10px; width: 40px; height: 40px; }
  .caisse-badge { padding: 3px 8px; font-size: .78rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .v { font-size: 1.1rem; }
  .modal-bg { padding: 0; } .modal { border-radius: 0; min-height: 100vh; }
  .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print {
  .side, .head, .help-btn, .toasts, .dt-tools, .dt-foot, .btns, .filters, .no-print, .tabs { display: none !important; }
  .app { display: block; } .content { padding: 0; max-width: none; }
  .panel, .table-wrap { border: 0; } body { background: #fff; color: #000; font-size: 11px; }
  table.dt th { background: #eee !important; }
}

/* ---------- Listes longues : affichage partiel ---------- */
.dt-more { display: flex; gap: 8px; align-items: center; width: 100%; padding: 8px 12px; margin-bottom: 8px; border-radius: var(--radius-s); background: var(--gold-soft); color: var(--ink); font-size: .85rem; }
.dt-more svg { width: 16px; height: 16px; flex: none; color: var(--gold); }
.dt-foot { flex-wrap: wrap; }

/* ---------- Onglets de rubrique (sous le titre) ---------- */
.tabs.section-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: -4px 0 18px; border: 0; border-radius: 12px; background: var(--line-2); max-width: 100%; }
.section-tabs a { border: 0; border-radius: 9px; padding: 7px 16px; color: var(--ink-2); font-weight: 500; }
.section-tabs a:hover { background: rgba(255,255,255,.6); text-decoration: none; }
.section-tabs a.on { background: var(--surface); color: var(--primary-2); box-shadow: var(--shadow); font-weight: 600; }
:root[data-theme="dark"] .section-tabs a.on { color: var(--primary); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .section-tabs a.on { color: var(--primary); } }

/* ---------- Accueil : indicateurs ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
a.kpi:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 22px rgba(20, 83, 45, .12); }
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--primary-soft); opacity: .55; pointer-events: none; }
.kpi > * { position: relative; z-index: 1; }
.kpi-top { display: flex; align-items: center; gap: 10px; }
.kpi-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.kpi-ic svg { width: 18px; height: 18px; }
.kpi-l { font-size: .86rem; color: var(--ink-2); font-weight: 500; }
.kpi-v { font-family: var(--font-title); font-weight: 700; font-size: 1.65rem; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi-b { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-height: 30px; }
.kpi-b > div { display: flex; flex-direction: column; gap: 3px; }
.kpi-sub { font-size: .8rem; color: var(--ink-3); }
.kpi .spark { color: var(--primary); flex: none; }
.kpi.k-leaf { background: linear-gradient(135deg, #14532D, #1F7A42); color: #fff; border-color: transparent; }
.kpi.k-leaf::after { background: rgba(255,255,255,.08); opacity: 1; }
.kpi.k-leaf .kpi-l, .kpi.k-leaf .kpi-sub { color: #CDEBD0; }
.kpi.k-leaf .kpi-ic { background: rgba(255,255,255,.14); color: #E8B640; }
.kpi.k-leaf .spark { color: #E8B640; }
.kpi.k-leaf .trend.up { background: rgba(255,255,255,.15); color: #fff; }
.kpi.k-leaf .trend.down { background: rgba(255,255,255,.15); color: #FFD6D2; }
.kpi.k-gold .kpi-ic { background: var(--gold-soft); color: var(--gold); }
.kpi.k-gold::after { background: var(--gold-soft); }
.kpi.k-warn .kpi-ic { background: var(--bad-soft); color: var(--bad); }
.trend { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 2px 8px; border-radius: 20px; font-size: .76rem; font-weight: 600; }
.trend svg { width: 13px; height: 13px; }
.trend.up { background: var(--ok-soft); color: var(--ok); }
.trend.down { background: var(--bad-soft); color: var(--bad); }
.mini-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mini-stats > * { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .86rem; }
.mini-stats a:hover { text-decoration: none; border-color: var(--primary); }
.mini-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.dash-grid > div > .panel { border-radius: 16px; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.panel.quick .tile-groups { margin: 0; }
.tasks-panel .task { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); border: 1px solid var(--line-2); margin-bottom: 8px; background: var(--bg); }
.tasks-panel .task:hover { text-decoration: none; border-color: var(--primary); }
.task-n { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-title); font-weight: 700; background: var(--primary-soft); color: var(--primary); }
.task.warn .task-n { background: var(--gold-soft); color: var(--gold); }
.task.bad .task-n { background: var(--bad-soft); color: var(--bad); }
.task-l { flex: 1; font-size: .9rem; }
.task-go { width: 16px; height: 16px; color: var(--ink-3); }
.all-good { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); }
.all-good svg { width: 26px; height: 26px; flex: none; }
.all-good span { display: block; color: var(--ink-2); font-size: .85rem; }
.cta-collect { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 18px; border-radius: 16px; background: linear-gradient(135deg, #E8B640, #D9A12E); color: #2A1E05; box-shadow: 0 6px 18px rgba(176, 122, 20, .25); }
.cta-collect:hover { text-decoration: none; filter: brightness(1.03); }
.cta-collect > svg { width: 30px; height: 30px; flex: none; }
.cta-collect > svg:last-child { width: 22px; height: 22px; }
.cta-collect span { flex: 1; } .cta-collect b { display: block; font-family: var(--font-title); font-size: 1.15rem; } .cta-collect small { color: #4A3610; }
.panel.quick .tile-groups { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.panel.quick .tile-group { border: 0; background: var(--bg); border-radius: 12px; padding: 10px; }
.panel.quick .tile { padding: 8px; border-radius: 10px; }
.panel.quick .tile:hover { background: var(--surface); box-shadow: var(--shadow); }

/* ---------- Réussite animée ---------- */
.celebrate { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(10, 30, 18, .28); animation: cel-in .2s ease; }
.celebrate.out { opacity: 0; transition: opacity .35s ease; }
.cel-card { background: var(--surface); border-radius: 22px; padding: 26px 34px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; align-items: center; gap: 6px; animation: cel-pop .35s cubic-bezier(.2,1.4,.4,1); max-width: 86vw; }
.cel-card b { font-family: var(--font-title); font-size: 1.15rem; } .cel-card span { color: var(--ink-2); font-size: .95rem; }
.cel-check { width: 74px; height: 74px; margin-bottom: 6px; }
.cel-check circle { fill: var(--ok-soft); stroke: var(--primary); stroke-width: 2.5; stroke-dasharray: 151; stroke-dashoffset: 151; animation: cel-draw .45s ease forwards; }
.cel-check path { fill: none; stroke: var(--primary); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: cel-draw .3s .35s ease forwards; }
@keyframes cel-draw { to { stroke-dashoffset: 0; } }
@keyframes cel-pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes cel-in { from { opacity: 0; } }
.op-done { text-align: center; margin-bottom: 14px; }
.op-done .cel-check { width: 64px; height: 64px; }
.op-amt { font-family: var(--font-title); font-weight: 700; font-size: 1.8rem; }
.btn.wa { background: #25D366; border-color: #25D366; color: #fff; } .btn.wa:hover { background: #1EB955; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .celebrate, .cel-card, .cel-check circle, .cel-check path { animation: none !important; stroke-dashoffset: 0 !important; } }

/* ---------- Collecte terrain ---------- */
.collect-progress { display: flex; align-items: center; gap: 16px; padding: 14px 18px; margin-bottom: 14px; border-radius: 16px; background: linear-gradient(135deg, #14532D, #1F7A42); color: #fff; }
.collect-progress:empty { display: none; }
.cp-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(#E8B640 calc(var(--p) * 1%), rgba(255,255,255,.18) 0); }
.cp-ring span { width: 50px; height: 50px; border-radius: 50%; background: #17603A; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.cp-txt { flex: 1; min-width: 0; } .cp-txt b { display: block; font-family: var(--font-title); font-size: 1.1rem; } .cp-txt span { color: #CDEBD0; font-size: .88rem; }
.cp-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.18); margin-top: 8px; overflow: hidden; } .cp-bar i { display: block; height: 100%; background: #E8B640; border-radius: 6px; transition: width .4s ease; }
.chips-filter { display: flex; gap: 8px; margin: 0 0 10px; overflow-x: auto; }
.chip-f { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 7px 14px; border-radius: 20px; font: inherit; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.chip-f.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 600; }
.collect-panel { border-radius: 16px; overflow: hidden; }
.collect-row { grid-template-columns: auto 1fr auto !important; cursor: pointer; padding: 12px 14px !important; transition: background .15s; }
.collect-row:hover { background: var(--line-2); }
.collect-row.picked { background: var(--gold-soft); box-shadow: inset 4px 0 0 var(--brand-gold); }
.collect-row .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .9rem; flex: none; }
.collect-row.done .av { background: var(--primary); color: #fff; } .collect-row .av svg { width: 20px; height: 20px; }
.collect-row .who small { display: block; } .collect-row .ok-txt { color: var(--ok); font-weight: 500; } .collect-row .calc { color: var(--gold); }
.collect-row .stepper button { width: 44px; height: 44px; font-size: 1.3rem; }
.collect-row .stepper input { width: 48px; height: 44px; font-size: 1.1rem; }
.sticky-bar .sum-v { font-family: var(--font-title); font-size: 1.15rem; color: var(--primary); }
.btn.big { padding: 12px 20px; font-size: 1rem; border-radius: 12px; }

/* ---------- Fiche client 360° ---------- */
.client-hero { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; padding: 18px 20px; margin-bottom: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.ch-id { display: flex; gap: 16px; align-items: center; min-width: 0; }
.ch-photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--primary-soft); }
.ch-photo.ph { display: grid; place-items: center; background: linear-gradient(135deg, #14532D, #2A9150); color: #fff; font-family: var(--font-title); font-weight: 700; font-size: 1.5rem; }
.ch-name { font-family: var(--font-title); font-weight: 700; font-size: 1.4rem; line-height: 1.2; }
.ch-meta { color: var(--ink-3); font-size: .88rem; margin: 3px 0 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ch-contact { display: flex; gap: 8px; flex-wrap: wrap; }
.ch-figs { display: grid; grid-template-columns: repeat(4, minmax(120px, auto)); gap: 10px; }
.ch-figs > div { padding: 10px 14px; border-radius: 12px; background: var(--bg); }
.ch-figs span { display: block; font-size: .78rem; color: var(--ink-3); }
.ch-figs b { font-family: var(--font-title); font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch-figs .sc.ok b { color: var(--ok); } .ch-figs .sc.warn b { color: var(--warn); } .ch-figs .sc.bad b { color: var(--bad); }
@media (max-width: 900px) { .ch-figs { grid-template-columns: repeat(2, 1fr); width: 100%; } }
.client-tabs { position: sticky; top: calc(var(--head) + 4px); z-index: 6; background: var(--bg); }

/* ---------- Barre de navigation mobile ---------- */
.bottom-nav { display: none; }
@media (max-width: 960px) {
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; height: calc(64px + env(safe-area-inset-bottom)); padding: 6px 6px env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px rgba(20, 83, 45, .08); justify-content: space-around; align-items: center; }
  .bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; color: var(--ink-3); font: inherit; font-size: .7rem; font-weight: 500; background: none; border: 0; cursor: pointer; text-decoration: none; min-width: 0; }
  .bottom-nav span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav a.active { color: var(--primary); }
  .bottom-nav a.active svg { stroke-width: 2.3; }
  .bottom-nav .bn-main { flex: none; width: 66px; height: 66px; margin-top: -26px; border-radius: 50%; background: linear-gradient(135deg, #E8B640, #D29A26); color: #2A1E05; justify-content: center; box-shadow: 0 6px 16px rgba(176, 122, 20, .35); border: 4px solid var(--surface); }
  .bottom-nav .bn-main span { font-size: .62rem; font-weight: 700; }
  .content { padding-bottom: 96px !important; }
  .help-btn { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
  .sticky-bar { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ---------- États vides ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 20px; }
.empty-state .es-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 6px; }
.empty-state .es-ic svg { width: 28px; height: 28px; }
.empty-state b { color: var(--ink-2); font-weight: 600; } .empty-state span { font-size: .86rem; }
.empty-state .btn { margin-top: 8px; }

/* ---------- Palette de commandes (Ctrl+K) ---------- */
.kbd-hint { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
kbd { display: inline-block; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--surface); color: var(--ink-3); font: 600 .7rem/1.5 var(--font); }
.palette { position: fixed; inset: 0; z-index: 150; background: rgba(10, 30, 18, .35); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 14px 14px; animation: cel-in .12s ease; }
.pal-box { width: 100%; max-width: 620px; background: var(--surface); border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.3); overflow: hidden; border: 1px solid var(--line); }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pal-in svg { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.pal-in input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1.05rem; background: none; color: var(--ink); min-width: 0; }
.pal-list { max-height: 52vh; overflow: auto; padding: 6px; }
.pal-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.pal-list a svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.pal-list a span { flex: 1; min-width: 0; } .pal-list small { display: block; color: var(--ink-3); font-size: .8rem; }
.pal-list a em { font-style: normal; font-size: .72rem; color: var(--ink-3); background: var(--line-2); padding: 2px 8px; border-radius: 10px; }
.pal-list a.sel, .pal-list a:hover { background: var(--primary-soft); text-decoration: none; }
.pal-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: .75rem; color: var(--ink-3); flex-wrap: wrap; }
@media (max-width: 640px) { .pal-foot { display: none; } .palette { padding-top: 8vh; } }
.search-global input { padding-right: 62px; }
@media (max-width: 960px) {
  .collect-panel { margin-bottom: 92px; overflow: visible; }
  .collect-panel .sticky-bar { position: fixed; left: 10px; right: 10px; bottom: calc(74px + env(safe-area-inset-bottom)); border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 8px 28px rgba(0,0,0,.18); z-index: 70; }
}
@media (max-width: 640px) {
  .kbd-hint { display: none; } .search-global input { padding-right: 12px; }
  .collect-row { grid-template-columns: auto 1fr !important; }
  .collect-row .stepper { grid-column: 2; justify-self: start; }
  .collect-panel .sticky-bar .sum { font-size: .85rem; }
  .collect-progress { padding: 12px 14px; gap: 12px; }
}
@media (max-width: 640px) {
  .search-global { flex: 1 1 0; min-width: 44px; }
  .caisse-badge { max-width: 104px; overflow: hidden; text-overflow: ellipsis; font-size: .76rem; padding: 3px 9px; }
  .head-info { gap: 4px; flex: none; }
}

/* ---------- Santé du système ---------- */
.health-hero { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: 16px; margin-bottom: 16px; }
.health-hero.ok { background: var(--ok-soft); } .health-hero.warn { background: var(--warn-soft); } .health-hero.bad { background: var(--bad-soft); }
.hh-ic { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); }
.health-hero.ok .hh-ic { color: var(--ok); } .health-hero.warn .hh-ic { color: var(--warn); } .health-hero.bad .hh-ic { color: var(--bad); }
.hh-ic svg { width: 26px; height: 26px; }
.health-hero b { display: block; font-family: var(--font-title); font-size: 1.15rem; } .health-hero span { color: var(--ink-2); font-size: .88rem; }
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.hc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; border-top: 3px solid var(--ok); }
.hc.warn { border-top-color: var(--brand-gold); } .hc.bad { border-top-color: var(--bad); }
.hc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .hc-l { flex: 1; font-weight: 600; font-size: .9rem; }
.hc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); } .hc.warn .hc-dot { background: var(--brand-gold); } .hc.bad .hc-dot { background: var(--bad); }
.hc-v { font-family: var(--font-title); font-weight: 700; font-size: 1.1rem; } .hc-d { color: var(--ink-3); font-size: .82rem; margin-top: 2px; }
.hc-a { display: flex; gap: 6px; margin-top: 8px; font-size: .82rem; color: var(--ink-2); background: var(--bg); border-radius: 8px; padding: 7px 9px; }
.hc-a svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--gold); }
.steps-list li { margin-bottom: 6px; }
.ai-panel h2 svg, .panel-head h2 svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--primary); }
.ai-answer { background: var(--primary-soft); border-radius: 12px; padding: 12px 16px; margin-top: 10px; line-height: 1.6; }
.ai-answer p:last-child, .ai-answer ul:last-child, .ai-answer ol:last-child { margin-bottom: 0; }
.ai-wait { display: flex; align-items: center; gap: 4px; color: var(--ink-3); padding: 12px 0; font-size: .9rem; }
.ai-wait span { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: ai-b 1s infinite ease-in-out; } .ai-wait span:nth-child(2) { animation-delay: .15s; } .ai-wait span:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes ai-b { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* ---------- Tournées ---------- */
.tour-map { margin: 10px 0; } .tour-map svg { width: 100%; height: auto; display: block; }
.tour-map figcaption { font-size: .8rem; color: var(--ink-3); margin-top: 4px; }
.tm-bg { fill: var(--primary-soft); } .tm-path { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-dasharray: 6 5; stroke-linejoin: round; }
.tm-pt { fill: var(--surface); stroke: var(--primary); stroke-width: 2.5; } .tm-pt.first { fill: var(--primary); } .tm-pt.last { fill: var(--brand-gold); stroke: var(--gold); }
.tour-map text { font: 700 9px var(--font); fill: var(--ink); pointer-events: none; }
.tour-list { display: grid; gap: 6px; } .tour-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--bg); color: var(--ink); }
.tour-list a:hover { text-decoration: none; background: var(--primary-soft); } .tour-list a span:nth-child(2) { flex: 1; } .tour-list small { display: block; color: var(--ink-3); }
.tl-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 700; flex: none; }
/* Icônes placées dans un texte : taille du texte */
p > svg[viewBox="0 0 24 24"], li > svg[viewBox="0 0 24 24"], span > svg[viewBox="0 0 24 24"].inl, .small > svg[viewBox="0 0 24 24"], .muted > svg[viewBox="0 0 24 24"] { width: 1.15em; height: 1.15em; vertical-align: -.22em; flex: none; }
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpis > .kpi:first-child { grid-column: 1 / -1; }
  .kpi { padding: 12px 14px; border-radius: 14px; gap: 4px; }
  .kpi-v { font-size: 1.2rem; } .kpis > .kpi:first-child .kpi-v { font-size: 1.6rem; }
  .kpi-ic { width: 28px; height: 28px; border-radius: 8px; } .kpi-l { font-size: .78rem; }
  .kpi .spark { display: none; } .kpis > .kpi:first-child .spark { display: block; }
  .kpi-b { min-height: 0; } .kpi::after { width: 80px; height: 80px; right: -30px; top: -30px; }
  .net .net-label { display: none; } .net { padding: 6px; }
  .profile-btn { padding: 2px; }
  .page-head .btns { gap: 6px; }
}
/* Accès provisoires lisibles */
.cred { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--primary-soft); margin: 10px 0; }
.cred span { color: var(--ink-2); font-size: .85rem; }
.cred b { font-size: 1.25rem; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; }
.cred .pw i { font-style: normal; } .cred .pw i.dg { color: var(--ok); } .cred .pw i.up { text-decoration: underline; text-underline-offset: 3px; }

/* Bandes décoratives retirées (demande du client) */

/* Onglets : passent à la ligne au lieu d'être coupés (tous les onglets restent visibles, même sur petit écran) */
.tabs { flex-wrap: wrap; overflow: visible; }
.tabs.section-tabs { flex-wrap: wrap; }
@media (max-width: 700px) {
  .tabs:not(.section-tabs) { gap: 6px; border-bottom: 0; }
  .tabs:not(.section-tabs) a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; background: var(--surface); }
  .tabs:not(.section-tabs) a.on { background: var(--primary); color: #fff; border-color: var(--primary); }
  .section-tabs a { padding: 6px 12px; }
}

/* Crédit éditeur (ODISIA GROUP) et assistance : discret mais présent */
.credit { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: .72rem; letter-spacing: .02em; }
.credit i { width: 1px; height: 11px; background: currentColor; opacity: .35; }
.credit b { font-weight: 600; letter-spacing: .06em; }
.credit a { color: inherit; text-decoration: none; white-space: nowrap; }
.credit a:hover { text-decoration: underline; }
.login-credit p { margin: 0 0 10px; }
.login-art .credit { color: #8FB79A; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); max-width: 30em; }
.login-form { position: relative; }
.login-foot { display: none; }
@media (max-width: 960px) {
  .login-form { padding-bottom: 64px; }
  .login-foot { display: flex; justify-content: center; position: absolute; left: 0; right: 0; bottom: 18px; color: var(--ink-3); opacity: .75; font-size: .68rem; }
}
.side-credit { font-size: .64rem; line-height: 1.5; color: rgba(255,255,255,.42); letter-spacing: .02em; }
.side-credit a { color: inherit; text-decoration: none; }
a[href^="tel:"] { white-space: nowrap; }

/* Flèche de retour (en-tête de chaque page) */
.ph-title { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.back-btn { flex: none; width: 38px; height: 38px; margin-top: 2px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: inline-grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.back-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.back-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.back-btn svg { width: 18px; height: 18px; }
@media (max-width: 640px) { .back-btn { width: 34px; height: 34px; } }
@media print { .back-btn { display: none !important; } }
