/* AuraLiving — système visuel (charte graphique v1.0, novembre 2026)
   Encre #1B2531 · Bleu profond #1963A6 (actions) · dégradé signature Bleu → Turquoise → Vert · Outfit (titres) · Inter (interface). */
/* Polices embarquées (fonctionnent hors ligne) : Outfit (titres, logo) · Inter (interface) */
@font-face { font-family: "Outfit"; font-weight: 400; font-display: swap; src: url(../assets/fonts/outfit-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 500; font-display: swap; src: url(../assets/fonts/outfit-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-display: swap; src: url(../assets/fonts/outfit-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 700; font-display: swap; src: url(../assets/fonts/outfit-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url(../assets/fonts/poppins-latin-400-normal.woff) format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url(../assets/fonts/poppins-latin-500-normal.woff) format("woff"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-display: swap; src: url(../assets/fonts/montserrat-latin-500-normal.woff) format("woff"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(../assets/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(../assets/fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(../assets/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(../assets/fonts/inter-latin-700-normal.woff2) format("woff2"); }

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Outfit", "Inter", -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* Charte AuraLiving */
  --h-blue: #2A7BC4; --h-teal: #E5B38A; --h-green: #D9A273; --h-sky: #A9C8E6; --h-mint: #F3DCC6; --h-ink: #1B2531;
  --gradient: linear-gradient(90deg, #2A7BC4, #E5B38A 55%, #D9A273);
  --bg: #F6F8FB; --surface: #ffffff; --surface-2: #F9FAFC; --sunken: #EEF1F6;
  --line: #E3E7EE; --line-strong: #D2D8E2;
  --ink: #1B2531; --ink-2: #5B6170; --ink-3: #8A90A0;
  --brand: #1963A6; --brand-ink: #ffffff; --brand-soft: #E7F0F9; --brand-strong: #134D82;
  --gold: #E5B38A; --gold-soft: #FBF0E6; --sand: #E5B38A;
  --pos: #14A06F; --neg: #D93036; --warn: #B7791F;
  --side: #1B2531; --side-ink: #C5CAD6; --side-hover: rgba(255, 255, 255, .06); --side-active: rgba(255, 255, 255, .10);
  --focus: 0 0 0 3px color-mix(in srgb, var(--h-blue) 30%, transparent);
  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(38, 42, 54, .05), 0 1px 1px rgba(38, 42, 54, .03);
  --shadow-lg: 0 18px 48px -12px rgba(38, 42, 54, .30);
  --sidebar: 252px; --topbar: 64px;
  --tap: 44px;

  /* Couleurs de statut (badges / calendrier) : fond doux + encre */
  --c-slate: #e7ebee; --i-slate: #44515b;
  --c-violet: #ece7f6; --i-violet: #5b4596;
  --c-amber: #FBF0DD; --i-amber: #94600F;
  --c-blue: #E7F0F9; --i-blue: #1963A6;
  --c-green: #E2F6EE; --i-green: #0F7F57;
  --c-teal: #FBF0E6; --i-teal: #0F7F75;
  --c-gray: #ecebe8; --i-gray: #5d625f;
  --c-red: #FDE7E7; --i-red: #C02A30;
  --c-orange: #fbe5d4; --i-orange: #9a4a12;
  --c-pink: #f7e1ec; --i-pink: #973a69;
  --c-cyan: #dcf0f5; --i-cyan: #1d6577;
  --c-free: #ffffff; --i-free: #7c8582;
  /* Barres du planning (plus saturées) */
  --b-blue: #2A7BC4; --b-green: #14A06F; --b-amber: #D69A2E; --b-violet: #7a5cc0; --b-slate: #8592a0; --b-gray: #a3a8a4;
  --b-orange: #d2752f; --b-pink: #c4588d; --b-cyan: #2f8fa5;
  --chart: #2A7BC4;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0E141B; --surface: #151D26; --surface-2: #19222C; --sunken: #111820;
  --line: #26313D; --line-strong: #34404D;
  --ink: #EEF1F6; --ink-2: #B4BAC8; --ink-3: #8A90A0;
  --brand: #6EA8E2; --brand-ink: #0B1626; --brand-soft: #1A2A3D; --brand-strong: #9CC3EA;
  --gold: #E5B38A; --gold-soft: #33281D; --sand: #E5B38A;
  --pos: #3FD08F; --neg: #F0676B; --warn: #E0A84A;
  --side: #111923; --side-ink: #B4BAC8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .6);
  --c-slate: #232c33; --i-slate: #b7c2cb; --c-violet: #2a2340; --i-violet: #c6b6f0; --c-amber: #352a14; --i-amber: #f1c46d;
  --c-blue: #1a2a3e; --i-blue: #9cc3f1; --c-green: #173023; --i-green: #8fd8a9; --c-teal: #163030; --i-teal: #8fd3cb;
  --c-gray: #252a2b; --i-gray: #b9bfbc; --c-red: #3a1f1a; --i-red: #f2a493; --c-orange: #3a2414; --i-orange: #f3b07c;
  --c-pink: #38202d; --i-pink: #f0a5c9; --c-cyan: #15303a; --i-cyan: #8fd0e2; --c-free: #161d20; --i-free: #85908d;
  --b-blue: #4F8FCC; --b-green: #23A877; --b-amber: #c79230; --b-violet: #8b70cf; --b-slate: #6d7a86; --b-gray: #5b625f;
  --b-orange: #c8732f; --b-pink: #b8578a; --b-cyan: #3a98ad;
  --chart: #6EA8E2;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: .4em 0; }
kbd { font: 11px var(--mono); padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; color: var(--ink-3); background: var(--surface); }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--ink-3); } .small { font-size: 12.5px; } .center { text-align: center; } .mono { font-family: var(--mono); font-size: 12.5px; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .pre { white-space: pre-wrap; }
.grow { flex: 1; } .pad { padding: 8px 0; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* ---------------------------------------------------------------- Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 550 14px var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s; text-decoration: none !important; }
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn-danger { background: #FDE7E7; border-color: #FDE7E7; color: #C02A30; }
.btn-danger:hover { background: #F9D2D3; border-color: #F9D2D3; }
.btn-danger-ghost { color: var(--neg); border-color: transparent; background: transparent; }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 48px; font-size: 15px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--sunken); color: var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; font-size: 13.5px; }

/* ---------------------------------------------------------------- Badges */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 6px; opacity: .8; }
.badge-slate { background: var(--c-slate); color: var(--i-slate); } .badge-violet { background: var(--c-violet); color: var(--i-violet); }
.badge-amber { background: var(--c-amber); color: var(--i-amber); } .badge-blue { background: var(--c-blue); color: var(--i-blue); }
.badge-green { background: var(--c-green); color: var(--i-green); } .badge-teal { background: var(--c-teal); color: var(--i-teal); }
.badge-gray { background: var(--c-gray); color: var(--i-gray); } .badge-red { background: var(--c-red); color: var(--i-red); }
.badge-orange { background: var(--c-orange); color: var(--i-orange); } .badge-pink { background: var(--c-pink); color: var(--i-pink); }
.badge-cyan { background: var(--c-cyan); color: var(--i-cyan); }

/* ---------------------------------------------------------------- Shell */
.shell { min-height: 100dvh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; gap: 6px; padding: calc(16px + env(safe-area-inset-top)) 12px 12px calc(12px + env(safe-area-inset-left));
  background: var(--side); color: #fff; z-index: 30; }
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 10px 16px; }
.h-logo { display: inline-flex; align-items: center; --logo-blue: #1963a6; --logo-sand: #e5b38a; --logo-sign: #5a6b7d; }
.h-wordmark { display: block; height: calc(var(--h) * 1.45); width: auto; }
/* Logo sur fond sombre (menu, démarrage, administration) : version inversée blanche */
.sidebar .h-logo, .boot .h-logo, .h-logo.h-dark, .adm-brand .h-logo, [data-theme="dark"] .h-logo { --logo-blue: #fff; --logo-sign: #c9d3de; }
.h-symbol { flex: none; overflow: visible; }
.logo-full { --logo-blue: #1963a6; --logo-sand: #e5b38a; --logo-sign: #5a6b7d; display: block; height: auto; }
[data-theme="dark"] .logo-full { --logo-blue: #fff; --logo-sign: #c9d3de; }
/* Apparition du logo */
.h-anim-logo .h-wordmark, .h-anim { animation: h-in .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes h-in { from { opacity: 0; transform: translateY(6px); } }
.search-trigger { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.05); color: var(--side-ink); font: inherit; font-size: 13.5px; cursor: pointer; margin-bottom: 8px; }
.search-trigger span { flex: 1; text-align: left; }
.search-trigger kbd { background: transparent; border-color: rgba(255,255,255,.15); color: var(--side-ink); }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; border-radius: 12px; color: var(--side-ink); font-weight: 500; text-decoration: none !important; }
.nav-item:hover { background: var(--side-hover); color: #fff; }
.nav-item.active { background: var(--side-active); color: #fff; }
.nav-item.active .ic { color: var(--h-sky); }
.nav-kbd { background: transparent; border-color: rgba(255,255,255,.15); color: var(--side-ink); }
.nav-item span { flex: 1; }
.nav-kbd { opacity: 0; transition: opacity .15s; }
.nav-item:hover .nav-kbd { opacity: 1; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; }
.sidebar .me { background: rgba(255,255,255,.05); border-radius: 14px; padding: 8px; }
.sidebar .me-name { color: #fff; } .sidebar .me-role { color: var(--side-ink); }
.sidebar .icon-btn { color: var(--side-ink); } .sidebar .icon-btn:hover { background: var(--side-hover); color: #fff; }
.me { display: flex; align-items: center; gap: 9px; padding: 4px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--h-sky); color: var(--h-ink); font-weight: 700; font-size: 13px; flex: none; }
.me-txt { flex: 1; min-width: 0; } .me-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .me-role { font-size: 11.5px; color: var(--ink-3); }
.sync, .sync-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 550; padding: 5px 10px; border-radius: 999px; }
.sync .ic, .sync-pill .ic { width: 15px; height: 15px; }
.sync.ok, .sync-pill.ok { color: var(--i-green); background: var(--c-green); }
.sync.off, .sync-pill.off { color: var(--i-amber); background: var(--c-amber); }
.sync.warn, .sync-pill.warn { color: var(--i-orange); background: var(--c-orange); }
.sync-pill.ok { display: none; }

.main-wrap { margin-left: var(--sidebar); min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: calc(var(--topbar) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 24px 0; display: flex; align-items: center; gap: 12px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.page-title { font: 600 20px var(--font-display); letter-spacing: -.02em; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.local-banner { display: flex; align-items: center; gap: 8px; padding: 8px 24px; font-size: 13px; background: var(--c-orange); color: var(--i-orange); }
.view { flex: 1; padding: 22px 24px calc(40px + env(safe-area-inset-bottom)); outline: none; }
.page { max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; animation: fade .18s ease-out; }
.page.narrow { max-width: 820px; }
  .view.no-anim .page { animation: none; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.tabbar { display: none; }
.scrim { display: none; }
.only-compact { display: none; }

/* ---------------------------------------------------------------- Cartes */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.sub-head { display: flex; align-items: center; gap: 7px; margin: 14px 0 4px; font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.sub-head .ic { width: 15px; height: 15px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.eyebrow { font-size: 12.5px; color: var(--ink-3); font-weight: 550; text-transform: capitalize; }
.h-display { font-size: 28px; font-weight: 600; letter-spacing: -.025em; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; }
.onboarding { background: var(--h-ink); color: #fff; border: 0; padding: 26px; position: relative; overflow: hidden; }
.onboarding p { color: #C5CAD6; } .onboarding .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.onboarding::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 260px; height: 220px; background: var(--gradient); clip-path: polygon(50% 0, 100% 45%, 100% 100%, 0 100%, 0 45%); opacity: .9; }
.onboarding h2 { font-size: 20px; margin-bottom: 4px; }
.onboarding .row-gap { margin-top: 12px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.kpi { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 13px 15px; color: var(--ink); text-decoration: none !important; box-shadow: var(--shadow); transition: border-color .15s; }
a.kpi:hover { border-color: var(--line-strong); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; }
.kpi-label { font-size: 12.5px; color: var(--ink-3); font-weight: 550; }
.kpi-ic { color: var(--ink-3); width: 16px; height: 16px; }
.kpi-value { font: 600 26px var(--font-display); letter-spacing: -.02em; margin-top: 3px; font-variant-numeric: tabular-nums; line-height: 1.25; }
.kpis-money .kpi-value { font-size: 19px; }
.kpi-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* Lignes cliquables */
.row-link { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none !important; border-radius: 8px; min-height: var(--tap); }
.row-link:last-child { border-bottom: 0; }
a.row-link:hover { background: var(--surface-2); }
.rl-main { flex: 1; min-width: 0; } .rl-title { font-weight: 600; } .rl-sub { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-side { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }

/* Fil d'activité */
.feed { list-style: none; padding: 0; margin: 0; }
.feed li { display: flex; gap: 11px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.feed li:last-child { border-bottom: 0; }
.feed a { color: var(--ink); }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); margin-top: 7px; flex: none; }
.feed-dot.t-booking { background: var(--b-blue); } .feed-dot.t-payment { background: var(--b-green); } .feed-dot.t-checkin { background: var(--b-green); }
.feed-dot.t-checkout { background: var(--b-cyan); } .feed-dot.t-block { background: var(--b-orange); } .feed-dot.t-user { background: var(--gold); } .feed-dot.t-client { background: var(--b-violet); } .feed-dot.t-message { background: #1f9d55; }
.feed-day { font-size: 12px; font-weight: 650; text-transform: capitalize; color: var(--ink-3); padding-top: 16px !important; border-bottom: 0 !important; }

/* Graphiques */
.chart { width: 100%; height: auto; display: block; }
.chart .bar { fill: var(--chart); }
.chart .bar-hit { fill: transparent; }
.chart .bar-g:hover .bar, .chart .bar-g:focus .bar { fill: var(--brand-strong); }
.chart .bar-g:hover .bar-hit { fill: color-mix(in srgb, var(--chart) 6%, transparent); }
.chart .baseline { stroke: var(--line-strong); stroke-width: 1; }
.chart .axis-lbl { fill: var(--ink-3); font-size: 11.5px; text-transform: capitalize; }
.chart .bar-val { fill: var(--ink-2); font-size: 11.5px; font-weight: 600; }
.hbars { display: flex; flex-direction: column; gap: 6px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr 48px; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; padding: 4px 0; font-size: 13.5px; }
.hbar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { height: 10px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--chart); border-radius: 999px; }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ---------------------------------------------------------------- Barre d'outils */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.seg { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.range-lbl { font-weight: 600; padding: 0 4px; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--sunken); border-radius: 10px; flex-wrap: wrap; }
.tab { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font: 550 13.5px var(--font); color: var(--ink-2); cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.tab.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(38,42,54,.12); }
.count { background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 0 7px; font-size: 11px; }
select, input, textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 11px; min-height: 42px; width: 100%; }
textarea { resize: vertical; min-height: 64px; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input:disabled, select:disabled { background: var(--sunken); color: var(--ink-3); }
.select-sm { width: auto; min-height: 34px; padding: 5px 30px 5px 10px; font-size: 13.5px; border-radius: 9px; }
.search-inline { display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); min-width: 240px; color: var(--ink-3); }
.search-inline input { border: 0; padding: 6px 0; min-height: 34px; box-shadow: none !important; background: transparent; font-size: 14px; }

/* ---------------------------------------------------------------- Tableaux */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.empty { text-align: center; padding: 48px 20px; color: var(--ink-2); }
.empty-title { font: 650 17px var(--font-display); color: var(--ink); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.skeleton { height: 240px; border-radius: var(--radius-lg); background: linear-gradient(90deg, var(--sunken), var(--surface-2), var(--sunken)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; }
.notice.warn { background: var(--c-amber); color: var(--i-amber); }
.notice a { color: inherit; text-decoration: underline; }

/* ---------------------------------------------------------------- Calendrier */
.timeline { padding: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tl-row { display: flex; min-width: max-content; border-bottom: 1px solid var(--line); }
.tl-row:last-child { border-bottom: 0; }
.tl-prop { position: sticky; left: 0; z-index: 3; width: 180px; flex: none; padding: 10px 14px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; color: var(--ink); text-decoration: none !important; min-height: 56px; }
.tl-prop b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tl-prop span { font-size: 11.5px; color: var(--ink-3); }
.tl-head { position: sticky; top: 0; z-index: 4; background: var(--surface-2); }
.tl-head .tl-prop { background: var(--surface-2); font-size: 12px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; min-height: 46px; }
.tl-track { position: relative; display: flex; }
.tl-day { width: var(--cw); flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--ink-3); border-right: 1px solid var(--line); }
.tl-day b { font-size: 14px; color: var(--ink); }
.tl-day.is-we { background: color-mix(in srgb, var(--sunken) 60%, transparent); }
.tl-day.is-today b { background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 0 7px; }
.tl-cell { width: var(--cw); flex: none; border-right: 1px solid var(--line); cursor: pointer; }
.tl-cell:hover { background: var(--brand-soft); }
.tl-cell.is-today { background: color-mix(in srgb, var(--brand-soft) 50%, transparent); }
.tl-bar { position: absolute; top: 9px; bottom: 9px; border-radius: 7px; display: flex; align-items: center; padding: 0 8px; color: #fff; font-size: 12px; font-weight: 600; overflow: hidden; text-decoration: none !important; z-index: 2; border: 0; cursor: pointer; font-family: var(--font);
  box-shadow: 0 0 0 2px var(--surface); }
.tl-bar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-bar.is-soft { opacity: .78; background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .18) 0 6px, transparent 6px 12px); }
.tl-block { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .22) 0 5px, transparent 5px 10px); }
.c-blue { background-color: var(--b-blue); } .c-green { background-color: var(--b-green); } .c-amber { background-color: var(--b-amber); } .c-violet { background-color: var(--b-violet); }
.c-slate { background-color: var(--b-slate); } .c-gray { background-color: var(--b-gray); } .c-orange { background-color: var(--b-orange); } .c-pink { background-color: var(--b-pink); } .c-cyan { background-color: var(--b-cyan); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 4px; display: inline-block; border: 1px solid var(--line-strong); }
.sw-free { background: var(--surface); } .sw-blue { background: var(--b-blue); border: 0; } .sw-green { background: var(--b-green); border: 0; } .sw-violet { background: var(--b-violet); border: 0; }
.sw-amber { background: var(--b-amber); border: 0; } .sw-cyan { background: var(--b-cyan); border: 0; } .sw-orange { background: var(--b-orange); border: 0; } .sw-pink { background: var(--b-pink); border: 0; }

.month-cal { padding: 0; overflow: hidden; }
.mc-head, .mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.mc-head div { padding: 10px; font-size: 12px; font-weight: 650; color: var(--ink-3); text-align: center; text-transform: uppercase; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mc { position: relative; min-height: 92px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; padding: 8px; font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.mc:nth-child(7n) { border-right: 0; }
.mc-empty { background: var(--surface-2); cursor: default; }
.mc-n { font-weight: 650; font-size: 13px; }
.mc.is-today .mc-n { background: var(--brand); color: var(--brand-ink); border-radius: 999px; width: 24px; height: 24px; display: grid; place-items: center; }
.mc-who { font-size: 12px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mc-tag { position: absolute; top: 8px; right: 8px; color: var(--ink-2); } .mc-tag + .mc-tag { right: 28px; }
.mc-tag .ic { width: 14px; height: 14px; }
.st-blue { background: var(--c-blue); color: var(--i-blue); } .st-green { background: var(--c-green); color: var(--i-green); } .st-violet { background: var(--c-violet); color: var(--i-violet); }
.st-amber { background: var(--c-amber); color: var(--i-amber); } .st-cyan { background: var(--c-cyan); color: var(--i-cyan); } .st-orange { background: var(--c-orange); color: var(--i-orange); }
.st-pink { background: var(--c-pink); color: var(--i-pink); } .st-free { background: var(--surface); }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.state-tile { padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); display: flex; flex-direction: column; text-decoration: none !important; color: var(--ink); }
.state-tile span { font-size: 12.5px; }
.pdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1px solid var(--line-strong); }
.pdot.st-green { background: var(--b-green); border: 0; } .pdot.st-blue { background: var(--b-blue); border: 0; } .pdot.st-amber { background: var(--b-amber); border: 0; } .pdot.st-violet { background: var(--b-violet); border: 0; }
.pdot.st-orange { background: var(--b-orange); border: 0; } .pdot.st-pink { background: var(--b-pink); border: 0; } .pdot.st-cyan { background: var(--b-cyan); border: 0; }

/* ---------------------------------------------------------------- Biens */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none !important; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.pcard-top { display: flex; align-items: center; gap: 7px; } .pcard-top .badge { margin-left: auto; }
.pcard-name { font: 650 17px var(--font-display); margin-top: 6px; }
.pcard-foot { display: flex; align-items: baseline; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- Fiches */
.detail-head { display: flex; flex-direction: column; gap: 8px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; color: var(--ink-3); }
.back .ic { width: 16px; height: 16px; }
.dh-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.dh-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.dh-meta a { display: inline-flex; align-items: center; gap: 5px; }
.dh-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 8px 18px; margin: 0; font-size: 14px; }
.dl dt { color: var(--ink-3); } .dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dl-num dd { text-align: right; font-variant-numeric: tabular-nums; }
.dl-kbd dt { white-space: nowrap; }
.stepper { list-style: none; display: flex; margin: 10px 0 0; padding: 0; gap: 3px; }
.stepper li { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.stepper li span { height: 5px; border-radius: 3px; background: var(--sunken); }
.stepper li.done span { background: color-mix(in srgb, var(--brand) 55%, transparent); }
.stepper li.now span { background: var(--brand); }
.stepper em { font-style: normal; font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper li.now em { color: var(--ink); font-weight: 650; }
.money-sum { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.money-sum div { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; font-size: 14px; }
.money-sum .big { font-size: 17px; padding-top: 6px; }
.pay-list { list-style: none; padding: 0; margin: 0; }
.pay-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pay-list li > div:first-child { flex: 1; }
.pay-list li:last-child { border-bottom: 0; }
.pay-amt { font-weight: 650; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); font-size: 13px; font-weight: 550; text-decoration: none !important; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
button.chip { background: var(--surface); font: 550 13px var(--font); cursor: pointer; }
.wa-box { margin-top: 6px; }

/* ---------------------------------------------------------------- Formulaires & modales */
.modal { border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 24px)); max-height: min(90dvh, 900px); display: flex; flex-direction: column; }
.modal:not([open]) { display: none; }
.modal-sm { width: min(420px, calc(100vw - 24px)); }
.modal-lg { width: min(940px, calc(100vw - 24px)); }
.modal::backdrop { background: rgba(14, 20, 19, .42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 8px; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-lg .modal-body:has(.bk-form) { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 20px; }
.modal-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field-hint { font-size: 12px; color: var(--ink-3); }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; min-height: 36px; cursor: pointer; }
.check input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); flex: none; }
.inline-time { width: auto; min-height: 34px; padding: 4px 8px; margin-left: auto; }
.more { margin: 14px 0; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.more[open] summary { margin-bottom: 12px; }
.extras, .periods { display: flex; flex-direction: column; gap: 8px; }
.extra-row { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.period-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 6px; align-items: center; }
.periods { margin: 8px 0; }
.client-pick { position: relative; }
.suggest { position: absolute; top: 72px; left: 0; right: 0; z-index: 5; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-lg); overflow: hidden; }
.suggest button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; background: none; padding: 10px 12px; font: inherit; color: var(--ink); cursor: pointer; border-bottom: 1px solid var(--line); text-align: left; }
.suggest button:hover { background: var(--brand-soft); }
.suggest button span { font-size: 12.5px; color: var(--ink-3); }
.new-client { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.bk-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; align-self: start; }
.quote { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.quote-head { font-weight: 650; } .quote-sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; }
.quote-t { width: 100%; font-size: 13.5px; border-collapse: collapse; }
.quote-t td { padding: 4px 0; } .quote-t td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-strong); }
.quote-total b { font: 600 20px var(--font-display); font-variant-numeric: tabular-nums; }
.q-err { display: flex; align-items: center; gap: 6px; color: var(--i-amber); font-size: 12.5px; margin-top: 6px; }
.q-err .ic { width: 15px; height: 15px; }
.conflict { display: flex; gap: 9px; padding: 10px 12px; border-radius: 10px; font-size: 13px; margin-bottom: 6px; }
.conflict div { display: flex; flex-direction: column; } .conflict .ic { margin-top: 1px; }
.conflict.hard { background: var(--c-red); color: var(--i-red); } .conflict.soft { background: var(--c-amber); color: var(--i-amber); } .conflict.ok { background: var(--c-green); color: var(--i-green); }
.form-tabs { margin-bottom: 14px; }
.price-box { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--brand-soft); }
.price-box input { font-size: 17px; font-weight: 600; }
@media (max-width: 600px) { .price-box { grid-template-columns: 1fr; } }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.perm-grid fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin: 0; }
.perm-grid legend { font-size: 12px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; padding: 0 4px; }
.perm-grid .check { font-size: 13.5px; }
.install-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; font-size: 14px; }
.install-steps ol { margin: 6px 0; padding-left: 18px; color: var(--ink-2); }

/* Recherche */
.search-dlg .modal-head { display: none; }
.search-dlg .modal-body { padding: 14px; }
.search-box { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); padding: 0 6px 12px; color: var(--ink-3); }
.search-box input { border: 0; box-shadow: none !important; font-size: 17px; padding: 6px 0; }
.search-res { max-height: 60dvh; overflow-y: auto; padding-top: 8px; }
.sr { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 9px; color: var(--ink); text-decoration: none !important; }
.sr.on, .sr:hover { background: var(--brand-soft); }
.sr-k { font-size: 11px; font-weight: 650; text-transform: uppercase; color: var(--ink-3); width: 82px; flex: none; }

/* Toasts */
#toasts { position: fixed; z-index: 1000; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 15px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(8px); transition: .25s; max-width: 420px; pointer-events: auto; }
.toast.in { opacity: 1; transform: none; }
.toast-error { background: #D93036; color: #fff; }
.toast { background: var(--h-ink); color: #fff; }
.toast-success .ic { color: #fff; background: #14A06F; border-radius: 50%; padding: 3px; width: 22px; height: 22px; }

/* ---------------------------------------------------------------- Authentification */
.auth { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; padding-top: calc(24px + env(safe-area-inset-top));
  background: radial-gradient(900px 500px at 100% 100%, color-mix(in srgb, var(--h-green) 16%, transparent), transparent 60%), radial-gradient(900px 500px at 0% 0%, color-mix(in srgb, var(--h-blue) 14%, transparent), transparent 60%), var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 18px; }
.auth-brand { display: flex; justify-content: center; padding: 10px 0 0; }
.auth-tag { text-align: center; margin: -8px 0 4px; font: 500 14px var(--font-display); background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: .01em; }
.auth-card { position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--gradient); }
.auth-title { font: 700 22px var(--font-display); letter-spacing: -.02em; } .auth-sub { color: var(--ink-3); font-size: 13.5px; }
.auth-card h2 { font-size: 19px; }
.auth-links { display: flex; justify-content: space-between; }
.auth-err { color: var(--neg); font-size: 13.5px; min-height: 1em; margin: 0; }
.auth-foot { color: var(--ink-3); font-size: 12px; margin-top: 18px; }
.boot-error { max-width: 420px; margin: 20vh auto; text-align: center; padding: 20px; }
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot .h-logo { --h: 40px; }
.boot { background: var(--h-ink); }
.boot img, .boot svg { width: 96px; height: auto; }
@keyframes breathe { 50% { opacity: .55; transform: scale(.96); } }

/* ---------------------------------------------------------------- iPad / tablette (≤ 1100 px) */
@media (max-width: 1100px) {
  :root { --tap: 48px; }
  .sidebar { transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  body.menu-open .sidebar { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .3); z-index: 25; }
  .main-wrap { margin-left: 0; }
  .only-compact { display: inline-grid; }
  .icon-btn { width: 42px; height: 42px; }
  .btn { min-height: 44px; } .btn-sm { min-height: 38px; } .tab { min-height: 38px; padding: 6px 14px; }
  .nav-item { height: 48px; } .nav-kbd, .search-trigger kbd { display: none; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 550; color: var(--ink-3); text-decoration: none !important; padding: 6px 10px; border-radius: 10px; min-width: 64px; }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--brand); }
  .view { padding: 18px 18px calc(96px + env(safe-area-inset-bottom)); }
  .topbar { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  #toasts { bottom: calc(86px + env(safe-area-inset-bottom)); left: 16px; right: 16px; align-items: center; }
}
/* iPad portrait / téléphones larges */
@media (max-width: 860px) {
  .grid-2, .grid-detail, .grid-3 { grid-template-columns: 1fr; }
  .modal-lg .modal-body:has(.bk-form) { grid-template-columns: 1fr; }
  .bk-side { position: static; order: -1; }
  .tl-prop { width: 132px; padding: 8px 10px; }
  .search-inline { min-width: 0; flex: 1; }
}
/* Téléphones */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .hide-sm { display: none; }
  .sync-pill span { display: none; } .sync-pill { padding: 6px; }
  .topbar .btn-primary { padding: 0 12px; }
  .view { padding: 14px 12px calc(96px + env(safe-area-inset-bottom)); }
  .h-display { font-size: 22px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 11px 12px; } .kpi-value { font-size: 20px; } .kpis-money .kpi-value { font-size: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { width: 100vw; max-width: 100vw; max-height: 94dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .modal-sm, .modal-lg { width: 100vw; }
  .period-row { grid-template-columns: 1fr 1fr; } .period-row input:first-child { grid-column: 1 / -1; }
  .table th, .table td { padding: 10px; }
  .dl { grid-template-columns: 1fr; gap: 2px; } .dl dd { margin-bottom: 8px; } .dl-num dd { text-align: left; }
  .stepper em { display: none; }
  .mc { min-height: 64px; padding: 5px; } .mc-who { font-size: 10.5px; } .mc-tag { display: none; }
  .new-client { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar, .tabbar, .local-banner { display: none !important; } .main-wrap { margin: 0; } }
html.is-offline .needs-online { opacity: .5; pointer-events: none; }

/* ---------------------------------------------------------------- Messages clients */
.btn-whatsapp { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn-whatsapp:hover { background: #188046; border-color: #188046; }
.msg-text { font: 14px/1.5 var(--font); min-height: 260px; }
.celebrate { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius); background: var(--c-green); color: var(--i-green); margin-bottom: 12px; }
.celebrate .ic { width: 26px; height: 26px; flex: none; }
.celebrate div { display: flex; flex-direction: column; } .celebrate span { font-size: 13px; }
.sent-check { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--brand-soft); }
.sent-check p { margin: 0 0 8px; font-weight: 600; }
.tpl-vars { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 10px; }
.tpl-vars button { font: 12px var(--mono); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.sig-preview { max-height: 90px; max-width: 220px; display: block; margin: 6px 0; background: #fff; border-radius: 8px; border: 1px solid var(--line); }

/* ---------------------------------------------------------------- Facture A4 (charte AuraLiving) */
.a4-wrap { overflow: hidden; display: flex; justify-content: center; }
.a4 { --b: #1963A6; --t: #1B2531; --t2: #5B6170; --l: #E3E7EE; width: 210mm; min-height: 297mm; background: #fff; color: var(--t); font: 400 3.4mm/1.45 Inter, sans-serif; position: relative;
  box-shadow: var(--shadow-lg); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; padding: 16mm 16mm 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.a4 .h-logo { --h: 7.4mm !important; }
.a4 .h-logo { --logo-blue: #1963a6; --logo-sign: #5a6b7d; }
.a4-head { display: flex; justify-content: space-between; align-items: center; }
.a4-head h1 { font: 600 11mm/1 Outfit, sans-serif; color: var(--b); letter-spacing: -.02em; margin: 0; }
.a4-parties { display: flex; justify-content: space-between; margin-top: 10mm; }
.a4-lbl { color: var(--t2); }
.a4-client { font-weight: 700; margin: .6mm 0 .4mm; }
.a4-small { color: var(--t2); }
.a4-meta { text-align: right; color: var(--t2); line-height: 1.7; }
.a4-meta b { color: var(--t); font-weight: 600; }
.a4-object { margin: 9mm 0 4mm; font-weight: 600; }
.a4-table { width: 100%; border-collapse: collapse; }
.a4-table th { text-align: left; font-weight: 600; color: var(--t2); padding: 2.6mm 2mm; border-bottom: .35mm solid var(--l); }
.a4-table td { padding: 3mm 2mm; border-bottom: .35mm solid var(--l); vertical-align: top; }
.a4-table th:first-child, .a4-table td:first-child { padding-left: 0; }
.a4-table .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.a4-table td small { display: block; color: var(--t2); }
.a4-bottom { display: flex; justify-content: space-between; gap: 10mm; margin-top: 7mm; }
.a4-pay { flex: 1; color: var(--t2); font-size: 3.2mm; }
.a4-pay h3 { font: 600 3.3mm Inter, sans-serif; color: var(--t); margin: 0 0 1.6mm; }
.a4-pay h3.mt { margin-top: 5mm; }
.a4-pay p { margin: 0 0 1mm; } .a4-pay b { color: var(--t); font-weight: 600; }
.a4-hint { color: #D93036; }
.a4-totals { width: 78mm; font-variant-numeric: tabular-nums; }
.a4-totals > div { display: flex; justify-content: space-between; padding: 1.2mm 4mm; color: var(--t2); }
.a4-totals > div span:last-child { color: var(--t); }
.a4-total { background: #F6F8FB; border-radius: 3.5mm; padding: 4mm !important; margin-top: 2mm; font-weight: 700; }
.a4-total span { color: var(--t) !important; font-size: 3.8mm; }
.a4-paid { justify-content: center !important; color: #14A06F !important; font-weight: 700; letter-spacing: .08em; }
.a4-terms { margin: 9mm 0 0; color: var(--t2); font-size: 3.1mm; }
.a4-terms b { color: var(--t); }
.a4-sign { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; padding-top: 6mm; }
.a4-bye { font: 600 4.4mm Outfit, sans-serif; margin: 0 0 6mm; }
.a4-signature { width: 50mm; display: flex; flex-direction: column; align-items: center; font-size: 3.4mm; }
.a4-signature img { width: 46mm; max-height: 28mm; object-fit: contain; }
.a4-sig-space { height: 20mm; }
.a4-signature b { font-weight: 700; margin-top: -4mm; position: relative; z-index: 1; }
.a4-sig-line { width: 100%; height: .3mm; background: var(--t); margin: 1mm 0 .6mm; }
.a4-signature span { color: var(--t2); font-size: 2.8mm; }
.a4-foot { margin: 8mm -16mm 0; padding: 0 16mm; }
.a4-contacts { display: flex; gap: 6mm; flex-wrap: wrap; color: var(--t2); font-size: 3mm; padding-bottom: 2mm; }
.a4-legal { color: var(--t2); font-size: 2.8mm; padding-bottom: 5mm; }
.a4-strip { height: 3mm; background: linear-gradient(90deg, #2A7BC4, #E5B38A 55%, #D9A273); margin: 0 -16mm; }

/* Choix du modèle de facture */
.tpl-picker { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tpl-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tpl-chip { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font: 500 13.5px var(--font); padding: 0 14px; min-height: 36px; border-radius: 999px; cursor: pointer; }
.tpl-chip.on { background: var(--h-ink); border-color: var(--h-ink); color: #fff; }
.tpl-accents { display: flex; gap: 8px; align-items: center; }
.sw-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; padding: 0; position: relative; overflow: hidden; }
.sw-dot.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.sw-custom { background: conic-gradient(#e53, #fc3, #3c6, #3cf, #36f, #c3f, #e53); }
.sw-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.a4.a4-tpl { padding: 0; width: 794px; min-height: 1123px; font: inherit; display: block; }
.tpl-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.tpl-card { border: 2px solid var(--line); border-radius: 14px; background: var(--surface); padding: 8px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.tpl-card.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tpl-thumb { height: 190px; overflow: hidden; border-radius: 8px; background: #fff; border: 1px solid var(--line); position: relative; }
.tpl-thumb > .a4 { position: absolute; left: 0; top: 0; transform: scale(.17); transform-origin: 0 0; box-shadow: none; pointer-events: none; }
.tpl-card b { font-size: 13.5px; } .tpl-card span { font-size: 12px; color: var(--ink-3); line-height: 1.3; }
.company-logo { max-width: 120px; max-height: 60px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 4px; display: block; }

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  .sidebar, .topbar, .tabbar, .local-banner, .no-print, #toasts, .scrim { display: none !important; }
  .main-wrap { margin: 0 !important; } .view { padding: 0 !important; } .page { max-width: none; gap: 0; animation: none; }
  .a4-wrap { display: block; overflow: visible; }
  .a4 { zoom: 1 !important; box-shadow: none; border-radius: 0; width: 210mm; height: 296mm; min-height: 0; overflow: hidden; page-break-after: avoid; break-inside: avoid; }
}

/* ---------------------------------------------------------------- Airbnb / Booking.com */
.c-airbnb { background-color: #e0565b; } .c-booking { background-color: #0b3d91; } .c-ota { background-color: #6b7785; }
.tl-import { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .18) 0 6px, transparent 6px 12px); }
.sw-airbnb { background: #e0565b; border: 0; } .sw-booking { background: #0b3d91; border: 0; }
.st-airbnb { background: #fde8e8; color: #a3282d; }
[data-theme="dark"] .st-airbnb { background: #3d1c1e; color: #f3a3a6; }
.badge-airbnb { background: #fde8e8; color: #b42d33; } .badge-booking { background: #e3eaf7; color: #0b3d91; } .badge-ota { background: var(--c-gray); color: var(--i-gray); }
[data-theme="dark"] .badge-airbnb { background: #3d1c1e; color: #f3a3a6; } [data-theme="dark"] .badge-booking { background: #182a4a; color: #a9c2ee; }
.feed-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.feed-row:last-of-type { border-bottom: 0; }
.feed-main { display: flex; flex-direction: column; gap: 4px; } .feed-main .badge { align-self: flex-start; }
.feed-actions { display: flex; gap: 6px; align-items: center; }
.feed-help { background: var(--brand-soft); padding: 10px 12px; border-radius: 10px; margin: 0; color: var(--ink-2); }
.copy-box { display: flex; gap: 8px; margin: 12px 0; } .copy-box input { font: 12.5px var(--mono); }
.notice.err { background: var(--c-red); color: var(--i-red); }
button.row-link { background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: inherit; text-align: left; cursor: pointer; }
button.row-link:hover { background: var(--surface-2); }
.w100 { width: 100%; }
.todo-imports { border-left: 4px solid #e0565b; }
.celebrate.imp { background: var(--sunken); color: var(--ink); }

/* Pièces d'identité */
.id-row { display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line, #E3E7EE); }
.id-row:first-child { border-top: 0; }
.id-main { flex: 1; min-width: 0; }
.id-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.id-thumbs img { height: 64px; width: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #E3E7EE); cursor: zoom-in; }
.id-none { display: grid; place-items: center; height: 64px; width: 96px; border-radius: 8px; background: var(--page, #F4F6F9); color: var(--muted, #8A93A3); }

/* État des lieux */
.insp-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line, #E3E7EE); }
.insp-card .notice { margin: 10px 16px 14px; }
.insp-count { position: sticky; top: 0; z-index: 2; background: var(--card, #fff); font-weight: 700; padding: 6px 0; }
.insp-room { margin-top: 12px; }
.insp-room-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 2px solid var(--line, #E3E7EE); }
.insp-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line, #E3E7EE); cursor: pointer; min-height: 46px; }
.insp-item input { width: 22px; height: 22px; flex: none; accent-color: #1E8E5A; }
.insp-item.on .insp-name { color: #1E8E5A; font-weight: 600; }
.insp-name { flex: 1; }
.insp-was { font-size: 11.5px; color: var(--muted, #8A93A3); white-space: nowrap; }
.insp-was.neg { color: #C0392B; }
.btn-xs { padding: 3px 9px; font-size: 12px; min-height: 0; }
.notice.ok { background: var(--c-green, #E3F5EC); color: var(--i-green, #1E6B47); }

/* ---------------------------------------------- O'Mbap (lecture seule) */
.ombap-banner { align-items: center; flex-wrap: wrap; background: var(--c-violet, #efeaff); color: var(--ink); margin-bottom: 14px; }
.ombap-banner > div:first-of-type { flex: 1 1 320px; }
.ombap-banner.warn { background: var(--c-amber); color: var(--i-amber); }
.ombap-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.ombap-room { display: flex; flex-direction: column; gap: 8px; }
.ombap-room.is-occ { border-color: var(--brand, #6d5cff); }
.ombap-room p { margin: 0; }
.ombap-clean { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 8px; }
button.row-link.ombap-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; font: inherit; }
.ombap-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0; }
.ombap-dl dt { color: var(--muted, #6b7280); } .ombap-dl dd { margin: 0; }
.tabs + .tabs { margin-top: 0; }
.tabs-sm .tab { font-size: 13px; }
