/* ============================================
   Heiwa Solution — Espace propriétaire V1
   Design system + composants
   ============================================ */

:root {
  /* Couleurs Heiwa */
  --ink: #11272c;
  --ink-soft: #44565b;
  --muted: #6f8084;
  --line: #e1e8e9;
  --sand: #f1f8f8;
  --sand-deep: #e5f1f2;
  --white: #ffffff;

  --teal: #2f9aa1;
  --teal-700: #24828a;
  --teal-300: #6bc4ca;
  --teal-050: #e3f4f5;

  --gold: #b89a5f;
  --gold-050: #fcf3d6;

  --green: #2f9e6d;
  --amber: #e9ad12;
  --red: #c0392b;

  /* Typographie */
  --display: "Prompt", "Trebuchet MS", -apple-system, sans-serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 28, .06), 0 2px 8px rgba(20, 32, 28, .05);
  --shadow: 0 10px 30px rgba(20, 32, 28, .10);

  /* Sidebar */
  --sidebar-width: 248px;
}

/* ============================================
   Reset + base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  background: var(--sand);
}
.login-visual {
  background: linear-gradient(135deg, var(--ink) 0%, #1a3a40 100%);
  color: white;
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(107, 196, 202, .15), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(184, 154, 95, .1), transparent 40%);
  pointer-events: none;
}
.login-brand {
  position: relative;
  z-index: 1;
}
.login-brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: white;
}
.login-brand-tag {
  color: var(--teal-300);
  font-size: 13px;
  margin-top: 4px;
  opacity: 0.85;
}
.login-hero {
  position: relative;
  z-index: 1;
}
.login-hero h1 {
  color: white;
  font-size: 42px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.login-hero h1 em {
  font-style: normal;
  color: var(--teal-300);
}
.login-hero p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  max-width: 480px;
  line-height: 1.6;
}
.login-features {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin-top: 30px;
}
.login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}
.login-feature .feat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(107, 196, 202, 0.15);
  border: 1px solid rgba(107, 196, 202, 0.3);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.login-feature .feat-icon svg { width: 16px; height: 16px; stroke: var(--teal-300); }

.login-footer-small {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 30px;
}

.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 50px;
}
.login-form {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.login-form h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.login-form .subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
}
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--sans);
  background: white;
  color: var(--ink);
  transition: all 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(47, 154, 161, 0.1);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--sans);
  transition: all 0.15s;
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: white;
  width: 100%;
  padding: 14px 20px;
}
.btn-primary:hover {
  background: #1a3a40;
}
.btn-primary svg { width: 16px; height: 16px; stroke: currentColor; }
.login-note {
  margin-top: 20px;
  padding: 14px;
  background: var(--teal-050);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.login-note svg { width: 16px; height: 16px; stroke: var(--teal); flex-shrink: 0; margin-top: 2px; }

/* Message d'envoi du lien */
.login-success {
  text-align: center;
  padding: 40px 20px;
}
.login-success .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--teal-050);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}
.login-success .check svg { width: 30px; height: 30px; stroke: var(--teal); }

/* ── 2FA — double authentification (style guidé, comme vue.heiwa) ── */
.twofa-step {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-700);
  margin: 22px 0 10px;
}
.twofa-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.twofa-qr {
  display: grid;
  place-items: center;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
}
.twofa-qr img, .twofa-qr canvas { display: block; border-radius: 4px; }
.twofa-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}
.twofa-manual {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--sand-deep);
  padding: 12px 14px;
}
.twofa-manual summary {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  list-style: none;
}
.twofa-manual summary::-webkit-details-marker { display: none; }
.twofa-manual summary::before { content: "+ "; color: var(--teal); font-weight: 700; }
.twofa-manual[open] summary::before { content: "− "; }
.twofa-secret-key {
  display: block;
  text-align: center;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 18px;
  letter-spacing: 3px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 6px;
  margin: 6px 0;
  user-select: all;
  -webkit-user-select: all;
  word-break: break-all;
}
.twofa-uri-line { text-align: left; margin-top: 8px; }
.twofa-uri {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 11px;
  color: var(--ink-soft);
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}
.twofa-code {
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 10px;
  padding-left: 10px;
  font-variant-numeric: tabular-nums;
}
.twofa-code::placeholder { color: var(--line); letter-spacing: 8px; }
.twofa-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 22px;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
}
.twofa-remember input { width: 16px; height: 16px; accent-color: var(--teal); }

/* ============================================
   APP LAYOUT (Dashboard)
   ============================================ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--ink);
  color: #cfe0e2;
  padding: 22px 16px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  overflow-x: hidden;
}
/* Scrollbar discrète */
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }
/* Owner bar : reste collée en bas même en scrollant */
.sidebar .owner-bar {
  position: sticky;
  bottom: -16px;
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 16px;
  background: var(--ink);
  z-index: 2;
  box-shadow: 0 -10px 20px -10px var(--ink);
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  margin-bottom: 10px;
}
.sidebar .brand-name {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: white;
}
.sidebar .brand-tag {
  font-size: 11px;
  color: var(--teal-300);
  margin-top: 2px;
}
.nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #7f989c;
  padding: 14px 10px 6px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #cfe0e2;
  font-size: 14px;
  font-weight: 500;
  transition: .15s;
}
.sidebar nav a svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  opacity: 0.85;
}
.sidebar nav a:hover {
  background: rgba(255, 255, 255, .07);
  color: white;
}
.sidebar nav a.active {
  background: var(--teal);
  color: white;
}
.sidebar nav a.nav-muted {
  opacity: .58;
  font-size: 13px;
  margin-top: 4px;
}
.sidebar nav a.nav-muted:hover {
  opacity: 1;
}
.sidebar nav a.nav-muted.active {
  opacity: 1;
}
.section-muted {
  opacity: .92;
}
.section-muted .sec-head h2 {
  font-size: 18px;
  color: var(--ink-soft);
}
.sidebar .soon {
  opacity: .5;
  pointer-events: none;
}
.sidebar .soon .tag {
  margin-left: auto;
  font-size: 9px;
  background: var(--gold);
  color: #1a1200;
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 700;
}
.sidebar .owner-bar {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 2px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.sidebar .owner-bar .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal-300);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-family: var(--display);
  font-size: 14px;
}
.sidebar .owner-bar .info { font-size: 13px; line-height: 1.3; }
.sidebar .owner-bar .info b { color: white; }
.sidebar .owner-bar .info small { color: #8aa3a7; font-size: 11px; display: block; }

/* Main content */
.main {
  padding: 0 0 60px;
  min-width: 0;
}
.topbar {
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 16px 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar .property {
  display: flex;
  align-items: center;
  gap: 13px;
}
.topbar .property h1 {
  font-size: 18px;
  margin-bottom: 0;
}
.topbar .property .sub {
  color: var(--muted);
  font-size: 13px;
}
.topbar .right { margin-left: auto; display: flex; gap: 10px; }
.topbar-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 13px;
  font-size: 13px;
  color: var(--ink-soft);
  background: white;
  font-weight: 500;
}
.topbar-btn svg { width: 14px; height: 14px; stroke: var(--muted); }

.wrap {
  padding: 30px 34px;
  max-width: 1180px;
}
section {
  margin-bottom: 38px;
  scroll-margin-top: 84px;
}
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.sec-head h2 { font-size: 22px; }
.sec-head .hint { color: var(--muted); font-size: 13px; }
.sec-head .src {
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--teal-700);
  background: var(--teal-050);
  padding: 3px 9px;
  border-radius: 20px;
  font-weight: 700;
  margin-left: auto;
}
/* Badges de source technique (Supabase/Hostaway/Duve · live) : masqués en
   production — le propriétaire ne doit pas les voir. Visibles seulement en
   mode debug (body.debug, activé via ?debug=1). Override placé après la règle
   ci-dessus pour gagner la cascade à spécificité égale. */
.sec-head .src { display: none; }
body.debug .sec-head .src { display: inline-block; }

/* ════════ Composants clarté réutilisables (spec 2026-06-22) ════════ */
/* Composant B : popover « ? » */
.q-wrap { position: relative; display: inline-flex; align-items: center; }
.q-tip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; margin-left: 5px; padding: 0;
  border: 1px solid var(--muted); border-radius: 50%;
  background: transparent; color: var(--muted);
  font-size: 11px; line-height: 1; cursor: help; vertical-align: middle;
}
.q-tip:hover, .q-tip:focus-visible { background: var(--teal); border-color: var(--teal); color: #fff; }
.q-pop {
  display: none; position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%); z-index: 50;
  width: max-content; max-width: 280px; padding: 10px 12px;
  background: var(--ink, #11272c); color: #fff;
  font-size: 12px; line-height: 1.45; font-weight: 400; text-transform: none;
  letter-spacing: normal; border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18); text-align: left; white-space: normal;
}
.q-wrap.is-open .q-pop { display: block; }
/* Composant C : badge fraîcheur */
.fresh-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.fresh-confirmed { background: rgba(58,144,124,.12); color: #2f7d68; }
.fresh-estimated { background: rgba(174,144,58,.14); color: #8a6d27; }
/* Composant D : encart « Bon à savoir » */
.know-box { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; margin: 12px 0; background: var(--teal-050, #eef7f8); border-left: 3px solid var(--teal); border-radius: 8px; font-size: 13px; color: var(--ink-soft); }
.know-box--warn { background: #fdf3e3; border-left-color: #e6b667; color: #8a5a17; }
.stmt-total-net--negative span { color: var(--red, #c0392b); }
/* Composant A : sous-titre de libellé */
.sub-label { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
/* Blocage verrouillé (R2/R3) */
.cal-locked { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; }
.cal-cell[data-resa], .cal-cell[data-block] { cursor: pointer; }

/* ════════ Assistant chatbot (panneau bas-droite) ════════ */
.assistant-panel { position: fixed; bottom: 84px; right: 24px; width: 360px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 120px); background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.18); display: none; flex-direction: column; overflow: hidden; z-index: 1000; }
.assistant-panel.is-open { display: flex; }
.assistant-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--ink, #11272c); color: #fff; font-weight: 600; }
.assistant-head button { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; line-height: 1; }
.assistant-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--sand, #f7f5f1); }
.assistant-msg { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.assistant-msg.from-bot { background: #fff; align-self: flex-start; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.assistant-msg.from-user { background: var(--teal, #4FA3B0); color: #fff; align-self: flex-end; }
.assistant-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.assistant-sugg button { background: #fff; border: 1px solid var(--teal, #4FA3B0); color: var(--teal-700, #2f7d8a); border-radius: 16px; padding: 5px 10px; font-size: 12px; cursor: pointer; }
.assistant-escalate { align-self: flex-start; }
.assistant-escalate button { background: var(--gold, #B89A5F); color: #fff; border: none; border-radius: 10px; padding: 8px 12px; font-size: 13px; cursor: pointer; }
.assistant-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; background: #fff; }
.assistant-input input { flex: 1; border: 1px solid #ddd; border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.assistant-input button { background: var(--teal, #4FA3B0); color: #fff; border: none; border-radius: 10px; width: 42px; cursor: pointer; font-size: 16px; }
@media (max-width: 600px) { .assistant-panel { right: 8px; left: 8px; width: auto; bottom: 8px; height: calc(100vh - 80px); } }

/* ════════ Polish clarté (2026-06-23) ════════ */
/* Barre « estimée » du graphe revenus : hachures diagonales (vs barre pleine = confirmé) */
.bar-estimated { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 4px, rgba(255,255,255,0) 4px 8px) !important; opacity: .9; }
.legend-hatch { display: inline-block; width: 11px; height: 11px; border-radius: 2px; vertical-align: -1px; background: var(--teal, #4FA3B0); background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.6) 0 3px, rgba(255,255,255,0) 3px 6px); }
/* Bandeau d'accueil 1ʳᵉ visite */
.welcome-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 18px; background: var(--teal-050, #eef7f8); border: 1px solid var(--teal, #4FA3B0); border-radius: 12px; font-size: 14px; color: var(--ink-soft); }
.welcome-banner .wb-text { flex: 1; min-width: 200px; }
.welcome-banner button { background: var(--teal, #4FA3B0); color: #fff; border: none; border-radius: 10px; padding: 8px 14px; font-size: 13px; cursor: pointer; white-space: nowrap; }

/* KPI cards */
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.kpi {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.kpi .label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kpi .label svg {
  width: 14px;
  height: 14px;
  stroke: var(--teal);
  fill: none;
  stroke-width: 2;
}
.kpi .value {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  margin-top: 8px;
  letter-spacing: -.02em;
}
.kpi .value small {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}
.kpi .delta {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 3px;
}
.kpi .delta.up { color: var(--green); }
.kpi .delta.down { color: var(--red); }

/* Card */
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
}
.grid2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
}

/* Chart - bar */
.chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  gap: 8px;
  margin-bottom: 12px;
}
.bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  cursor: pointer;
}
.bar {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(180deg, var(--teal-300), var(--teal));
  border-radius: 5px 5px 0 0;
  transition: opacity .2s;
}
.bar-col:hover .bar { opacity: 0.85; }
.bar-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  background: var(--ink);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  line-height: 1.3;
  z-index: 10;
}
.bar-col:hover .bar-tooltip { opacity: 1; }
.bar-label { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Reservations list */
.res-list .res-row {
  display: grid;
  grid-template-columns: 130px 1fr 100px 100px;
  gap: 14px;
  align-items: center;
  padding: 14px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.res-list .res-row:last-child { border-bottom: none; }
.res-dates .arr { font-weight: 600; color: var(--ink); font-size: 14px; }
.res-dates .dep { font-size: 12px; color: var(--muted); margin-top: 2px; }
.res-guest { color: var(--ink-soft); }
.res-price {
  text-align: right;
  font-weight: 700;
  color: var(--teal-700);
  font-family: var(--display);
}
.ch-pill {
  display: inline-block;
  color: white;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 10px;
  font-weight: 600;
}
.ch-pill.airbnb { background: #FF5A5F; }
.ch-pill.booking { background: #003580; }
.ch-pill.direct { background: var(--ink); }
.ch-pill.vrbo { background: #0073e6; }

/* Channels stats */
.ch-row {
  display: grid;
  grid-template-columns: 110px 1fr 60px;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  font-size: 13px;
}
.ch-row + .ch-row { border-top: 1px solid var(--line); }
.ch-info { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ch-dot { width: 10px; height: 10px; border-radius: 50%; }
.ch-track {
  height: 8px;
  background: var(--sand-deep);
  border-radius: 4px;
  overflow: hidden;
}
.ch-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s;
}
.ch-pct { text-align: right; font-size: 12px; color: var(--muted); }

/* Reviews */
.review {
  background: var(--sand-deep);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.rev-head {
  display: flex;
  gap: 12px;
  margin-bottom: 6px;
}
.rev-rating {
  color: white;
  font-weight: 700;
  font-family: var(--display);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  flex-shrink: 0;
}
.rev-meta { font-size: 13px; line-height: 1.3; }
.rev-text {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Demo banner */
.demo-banner {
  background: linear-gradient(135deg, var(--gold) 0%, #c9a563 100%);
  color: #1a1200;
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.demo-banner svg { width: 16px; height: 16px; stroke: currentColor; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
}

/* ============================================
   MOBILE — Burger menu + adaptations tactiles
   ============================================ */
.mobile-topbar {
  display: none;
  background: var(--ink);
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.mobile-topbar .brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .04em;
  color: white;
  text-transform: uppercase;
}
.mobile-burger {
  width: 38px;
  height: 38px;
  border: none;
  background: rgba(255,255,255,.08);
  border-radius: 8px;
  color: white;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.mobile-burger svg { width: 20px; height: 20px; }
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 49;
}
.sidebar-backdrop.is-open { display: block; }

@media (max-width: 768px) {
  /* Topbar mobile visible */
  .mobile-topbar { display: flex; }

  /* App = pleine largeur */
  .app { grid-template-columns: 1fr; }

  /* Sidebar = drawer slide-in */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 51;
    overflow-y: auto;
    padding-top: 22px;
  }
  .sidebar.is-open { transform: translateX(0); }

  /* Topbar desktop : compact en mobile */
  .topbar {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .topbar .property h1 { font-size: 16px; }
  .topbar .property .sub { font-size: 11px; }
  .topbar .right { margin-left: 0; flex-basis: 100%; }
  .topbar-btn { font-size: 12px; padding: 6px 10px; flex: 1; justify-content: center; }
  .topbar-btn svg { width: 12px; height: 12px; }

  /* Wrap = padding réduit */
  .wrap { padding: 16px 14px 40px; }

  /* KPIs = 2 colonnes */
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .value { font-size: 22px; }
  .kpi .label { font-size: 10px; gap: 4px; }
  .kpi .delta { font-size: 11px; }

  /* Charts + sections */
  .sec-head { flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
  .sec-head h2 { font-size: 18px; }
  .sec-head .src { font-size: 9px; padding: 2px 7px; }
  section { margin-bottom: 26px; scroll-margin-top: 100px; }

  /* Chart */
  .chart { height: 140px; }
  .bar-col { gap: 2px; }
  .bar { max-width: 22px; }
  .bar-label { font-size: 10px; }

  /* Réservations à venir */
  .res-list .res-row {
    grid-template-columns: 100px 1fr;
    grid-template-areas:
      "dates guest"
      "channel price";
    gap: 8px;
    padding: 12px 6px;
    font-size: 12px;
  }
  .res-list .res-dates { grid-area: dates; }
  .res-list .res-guest { grid-area: guest; }
  .res-list .ch-pill { grid-area: channel; justify-self: start; }
  .res-list .res-price { grid-area: price; justify-self: end; font-size: 14px; }

  /* Plateformes */
  .ch-row { grid-template-columns: 90px 1fr 40px; gap: 8px; }

  /* Avis voyageurs */
  .review { padding: 12px; }
  .rev-rating { padding: 3px 8px; font-size: 11px; }
  .rev-text { font-size: 12px; }

  /* Calendrier vue mois */
  .cal-block { padding: 12px; }
  .cal-toolbar { grid-template-columns: 36px 1fr 36px; gap: 8px; }
  .cal-month-kpis { grid-column: 1 / -1; text-align: center; font-size: 11px; margin-top: 4px; }
  .cal-cell { min-height: 50px; padding: 3px; gap: 1px; }
  .cal-cell-day { font-size: 11px; }
  .cal-resa-name { font-size: 9px; }
  .cal-resa-strip { font-size: 8px; height: 12px; padding: 0 3px; }
  .cal-weekdays > div { font-size: 9px; padding: 4px 0; }
  .cal-legend { font-size: 10px; gap: 8px; margin-top: 10px; padding-top: 8px; }

  /* Calendrier blocage */
  .os-block { padding: 14px; gap: 18px; }
  .os-cal-cell { font-size: 12px; }
  .os-cal-month { font-size: 15px; }
  .os-summary { font-size: 12px; }

  /* Codes promo */
  .coupon-card { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .coupon-meta { grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 11px; }
  .coupon-code { font-size: 15px; }
  .coupon-disc { font-size: 18px; }

  /* Owner stays */
  .ownerstay-card { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .os-meta { grid-template-columns: 1fr; }

  /* Messagerie */
  .msg-block { grid-template-columns: 1fr; }
  .msg-list { max-height: 240px; border-right: none; border-bottom: 1px solid var(--line); }
  .msg-detail { max-height: none; }
  .msg-bubble { max-width: 85%; font-size: 12px; padding: 8px 12px; }

  /* Statements */
  .stmt-card { grid-template-columns: 1fr; gap: 6px; padding: 14px; text-align: left; }
  .stmt-open { justify-self: end; }
  .stmt-table { font-size: 10px; }
  .stmt-table thead th, .stmt-table tbody td { padding: 6px 8px; font-size: 10px; }
  .stmt-totals { padding: 14px; }
  .stmt-total-row { font-size: 12px; }
  .stmt-total-net { font-size: 14px; }
  .stmt-total-net span:last-child { font-size: 18px; }
  .modal-content { max-width: 100% !important; max-height: 92vh; }
  .modal-head { padding: 14px 18px; }
  .modal-head h2 { font-size: 16px; }
  .modal-body { padding: 16px 18px; }

  /* FAQ */
  .faq-item summary { padding: 14px 18px; font-size: 13px; }
  .faq-body { padding: 0 18px 18px; font-size: 12px; }

  /* Modal coupon */
  .form-row { flex-direction: column; gap: 0; }
  .listings-picker { grid-template-columns: 1fr; }

  /* Profil */
  .form-input { padding: 11px 13px; font-size: 14px; }

  /* Login page mobile */
  .login-form-wrap { padding: 30px 18px; }
  .login-form { padding: 28px 22px; }
  .login-form h2 { font-size: 20px; }
  .login-tabs { font-size: 12px; }
  .login-tab { padding: 8px 10px; font-size: 12px; }
}

/* Tactile : agrandir cibles */
@media (hover: none) and (pointer: coarse) {
  .btn-primary { padding: 16px 20px; }
  .os-cal-cell { min-height: 40px; }
  .stmt-open { padding: 10px 16px; }
  .topbar-btn { padding: 10px 14px; }
  .faq-item summary { padding: 18px 20px; }
}

/* ============================================
   V2 — Coupons + Modal + Forms
   ============================================ */

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 39, 44, 0.55);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-head {
  display: flex;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { font-size: 19px; flex: 1; }
.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.modal-close:hover { background: var(--sand); color: var(--ink); }
.modal-body {
  padding: 22px 24px 24px;
  overflow-y: auto;
}

/* Forms */
.form-row {
  display: flex;
  gap: 14px;
}
.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Listings picker */
.listings-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  background: var(--sand);
}
.picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  transition: background .12s;
}
.picker-item:hover { background: white; }
.picker-item input[type=checkbox] {
  accent-color: var(--teal);
  width: 16px;
  height: 16px;
  margin: 0;
}

/* Coupon cards */
.coupon-card {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
  padding: 16px 20px;
  position: relative;
}
.coupon-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.coupon-code {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: 0.02em;
  background: var(--teal-050);
  color: var(--teal-700);
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  width: fit-content;
}
.coupon-disc {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  color: var(--gold);
}
.coupon-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  font-size: 12px;
  color: var(--ink-soft);
}
.coupon-meta strong {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 3px;
}
.coupon-del {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .15s;
}
.coupon-del svg { width: 16px; height: 16px; }
.coupon-del:hover {
  background: #fdecec;
  border-color: var(--red);
  color: var(--red);
}

@media (max-width: 700px) {
  .form-row { flex-direction: column; gap: 0; }
  .listings-picker { grid-template-columns: 1fr; }
  .coupon-card { grid-template-columns: 1fr; gap: 12px; }
  .coupon-meta { grid-template-columns: repeat(3, 1fr); }
}

/* Owner Stay cards */
.ownerstay-card {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 20px;
  align-items: center;
  margin-bottom: 12px;
  padding: 16px 20px;
}
.os-dates {
  background: var(--sand-deep);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.os-arr {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.os-dep {
  font-size: 12px;
  color: var(--muted);
  margin: 2px 0;
}
.os-nights {
  font-size: 11px;
  color: var(--teal-700);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.os-meta {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}
.os-meta strong {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 3px;
}

@media (max-width: 700px) {
  .ownerstay-card { grid-template-columns: 1fr; gap: 12px; }
  .os-meta { grid-template-columns: 1fr; }
}

/* ============================================
   Calendrier blocage propriétaire (inspiré Cari'Stay)
   ============================================ */
.os-block {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  padding: 24px;
}
.os-cal-wrap { min-width: 0; }

/* En-tête calendrier */
.os-cal-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.os-cal-month {
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  text-transform: capitalize;
}
.os-cal-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}
.os-cal-nav:hover { background: var(--sand-deep); color: var(--ink); border-color: var(--teal-300); }
.os-cal-nav:disabled { opacity: .3; cursor: not-allowed; }

/* Jours de la semaine */
.os-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
  text-align: center;
}
.os-cal-weekdays > div {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 0;
}

/* Grille calendrier */
.os-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.os-cal-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink);
  position: relative;
  transition: all 0.12s;
  font-family: inherit;
  font-weight: 500;
}
.os-cal-cell:hover:not(.is-disabled):not(.is-reserved):not(.is-owner):not(.is-past) {
  background: var(--sand-deep);
}

/* Cellule vide (padding début/fin mois) */
.os-cal-cell.is-empty { cursor: default; background: transparent !important; }

/* Cellule passée */
.os-cal-cell.is-past { color: var(--line); cursor: not-allowed; text-decoration: line-through; opacity: .5; }

/* Réservation client (existante) */
.os-cal-cell.is-reserved {
  color: var(--muted);
  cursor: not-allowed;
  background: repeating-linear-gradient(
    45deg,
    transparent 0 4px,
    rgba(192, 57, 43, 0.08) 4px 7px
  );
  position: relative;
}
.os-cal-cell.is-reserved::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 1.5px;
  background: var(--red);
  opacity: 0.45;
}

/* Owner stay existant (= déjà bloqué par l'owner) */
.os-cal-cell.is-owner {
  color: var(--teal-700);
  cursor: not-allowed;
  background: var(--teal-050);
  font-weight: 600;
}
.os-cal-cell.is-owner::after {
  content: '−';
  position: absolute;
  bottom: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}

/* Aujourd'hui */
.os-cal-cell.is-today { font-weight: 700; }
.os-cal-cell.is-today::before {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--teal);
  border-radius: 50%;
  bottom: 4px;
}

/* Sélection : start + end + range */
.os-cal-cell.is-selected-start,
.os-cal-cell.is-selected-end {
  background: var(--ink) !important;
  color: white !important;
  font-weight: 600;
}
.os-cal-cell.is-in-range {
  background: var(--sand-deep);
  border-radius: 0;
}
.os-cal-cell.is-selected-start { border-radius: 50% 0 0 50%; }
.os-cal-cell.is-selected-end { border-radius: 0 50% 50% 0; }
/* Si même cellule = unique sélection */
.os-cal-cell.is-selected-start.is-selected-end { border-radius: 50%; }

/* Hover sur la range potentielle */
.os-cal-cell.is-hover-range {
  background: rgba(47, 154, 161, 0.1);
  border-radius: 0;
}

/* Légende */
.os-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--ink-soft);
}
.os-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.os-legend .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.dot-free { background: white; border: 1px solid var(--line); }
.dot-res { background: repeating-linear-gradient(45deg, transparent 0 2px, rgba(192, 57, 43, 0.25) 2px 4px); border: 1px solid var(--line); }
.dot-own { background: var(--teal-050); border: 1px solid var(--teal-300); }
.dot-sel { background: var(--ink); }

/* Side panel (récap + form) */
.os-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.os-summary {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.os-sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.os-sum-row:last-child { border-bottom: none; background: var(--sand); }
.os-sum-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.os-sum-val {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}
.os-sum-total .os-sum-val { color: var(--teal-700); font-size: 15px; }

.os-form .form-group { margin-bottom: 12px; }
.os-form textarea { resize: vertical; min-height: 50px; }

.os-clear {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px;
}
.os-clear:hover { color: var(--ink); }

/* Responsive */
@media (max-width: 900px) {
  .os-block { grid-template-columns: 1fr; gap: 24px; }
}

/* Login tabs */
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--sand-deep);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 22px;
}
.login-tab {
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.login-tab.is-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 32, 28, 0.08);
}


/* ============================================
   Messagerie voyageurs
   ============================================ */
.msg-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  padding: 0;
  min-height: 520px;
  overflow: hidden;
}
.msg-list {
  border-right: 1px solid var(--line);
  max-height: 620px;
  overflow-y: auto;
}
.msg-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .12s;
}
.msg-item:hover { background: var(--sand); }
.msg-item.is-active { background: var(--teal-050); border-left: 3px solid var(--teal); padding-left: 13px; }
.msg-item.has-unread { font-weight: 600; }
.msg-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.msg-item-name {
  font-family: var(--display);
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}
.msg-item-time { font-size: 11px; color: var(--muted); }
.msg-item-preview {
  font-size: 12px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}
.msg-item-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  margin-left: 8px;
}
.msg-detail {
  display: flex;
  flex-direction: column;
  max-height: 620px;
}
.msg-detail-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--sand);
}
.msg-detail-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}
.msg-detail-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.msg-detail-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: var(--sand);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.msg-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-bubble.from-guest {
  align-self: flex-start;
  background: white;
  border-radius: 16px 16px 16px 4px;
  border: 1px solid var(--line);
}
.msg-bubble.from-host {
  align-self: flex-end;
  background: var(--teal);
  color: white;
  border-radius: 16px 16px 4px 16px;
}
.msg-time {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 4px;
  text-align: right;
}
.msg-bubble.from-guest .msg-time { color: var(--muted); }

@media (max-width: 800px) {
  .msg-block { grid-template-columns: 1fr; }
  .msg-list { max-height: 280px; border-right: none; border-bottom: 1px solid var(--line); }
}

/* ============================================
   Calendrier vue mois global
   ============================================ */
.cal-block { padding: 22px; }
.cal-toolbar {
  display: grid;
  grid-template-columns: 40px 1fr 40px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.cal-month-label {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  text-transform: capitalize;
}
.cal-month-kpis {
  font-size: 12px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.cal-month-kpis strong { color: var(--ink); }
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  margin-bottom: 6px;
}
.cal-weekdays > div {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 0;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-cell {
  position: relative;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: white;
  font-size: 13px;
  overflow: visible;
  cursor: default;
  transition: box-shadow .15s;
}
.cal-cell.is-empty { background: var(--sand); border: none; }
.cal-cell.is-past .cal-cell-day { color: var(--muted); }
.cal-cell.is-today { box-shadow: 0 0 0 2px var(--teal); }
.cal-cell.has-resa { cursor: pointer; }
.cal-cell.has-resa:hover { box-shadow: 0 4px 12px rgba(20, 32, 28, 0.12); }
.cal-cell-day {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cal-cell.is-today .cal-cell-day { color: var(--teal-700); }
/* Barres horizontales continues (style Airbnb/Hostaway) */
.cal-bar {
  position: absolute;
  bottom: 10px;
  height: 22px;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 0 8px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
  letter-spacing: 0.1px;
}
/* Cas check-out + check-in le même jour : 2 demi-barres juxtaposées, PAS empilées.
   bar-checkout occupe la gauche (0→50%), bar-checkin la droite (50%→100%). */
.cal-bar.bar-full {
  left: -2px;
  right: -2px;
  border-radius: 0;
}
.cal-bar.bar-checkin {
  left: 50%;
  right: -2px;
  border-radius: 11px 0 0 11px;
  padding-left: 10px;
}
.cal-bar.bar-checkout {
  left: -2px;
  right: 50%;
  border-radius: 0 11px 11px 0;
}
/* Empiler verticalement UNIQUEMENT si on a plusieurs barres pleines (vrai chevauchement
   de 2 résa actives sur le même jour, cas exceptionnel). */
.cal-bar.bar-full + .cal-bar.bar-full { bottom: 36px; }
.cal-cell.has-resa:hover .cal-bar {
  filter: brightness(1.05);
}
/* Legacy classes — gardées pour ne pas casser d'autres usages */
.cal-resa-strip {
  margin-top: auto;
  height: 18px;
  border-radius: 4px;
  color: white;
  font-size: 10px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-resa-name {
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--ink-soft);
}
.cal-legend > span { display: flex; align-items: center; gap: 6px; }
.cal-legend .dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* Modal détail réservation */
.resa-modal-content { max-width: 480px; }
.resa-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.resa-row:last-child { border-bottom: none; }
.resa-row .lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.resa-row .val { color: var(--ink); font-weight: 600; text-align: right; }

/* "Mon logement" — hiérarchie carte > groupe (catégorie) > lignes */
.info-group { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.info-group:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.info-group-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 6px; }
.info-note { margin-top: 12px; padding: 10px 12px; background: var(--sand-deep); border-radius: 8px; font-size: 12px; color: var(--ink-soft); }

@media (max-width: 700px) {
  .cal-cell { min-height: 56px; padding: 4px; }
  .cal-resa-strip { font-size: 9px; height: 14px; }
}

/* ============================================
   Décomptes mensuels (statements)
   ============================================ */
.stmt-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  margin-bottom: 12px;
}
.stmt-month {
  font-family: var(--display);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  text-transform: capitalize;
}
.stmt-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--teal-050);
  color: var(--teal-700);
  font-weight: 600;
}
.stmt-open {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-700);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .12s;
}
.stmt-open:hover { background: var(--sand-deep); }

.stmt-period {
  background: var(--sand-deep);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}
.stmt-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  /* Mobile : défilement horizontal + ombres aux bords pour signaler « ça continue → »
     (avant : overflow:hidden coupait les colonnes sur petit écran). */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center / 22px 100% no-repeat local,
    linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right center / 22px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.10), rgba(0,0,0,0)) left center / 11px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.10), rgba(0,0,0,0)) right center / 11px 100% no-repeat scroll;
}
.stmt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.stmt-table thead th {
  background: var(--sand);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 10px 12px;
  text-align: left;
}
.stmt-table tbody td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.stmt-totals {
  margin-top: 24px;
  padding: 18px 22px;
  background: var(--sand-deep);
  border-radius: var(--radius);
}
.stmt-total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 14px;
}
.stmt-total-net {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.stmt-total-net span:last-child {
  color: var(--teal-700);
  font-size: 22px;
}

/* FAQ */
.faq-card { padding: 0; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  padding: 18px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: background .12s;
}
.faq-item summary:hover { background: var(--sand); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 20px;
  color: var(--teal);
  flex-shrink: 0;
  transition: transform .15s;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-body {
  padding: 0 24px 22px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.6;
}
.faq-body a { color: var(--teal-700); font-weight: 600; }

@media (max-width: 700px) {
  .stmt-card { grid-template-columns: 1fr; gap: 8px; }
  .stmt-table { font-size: 11px; }
  .stmt-table thead th, .stmt-table tbody td { padding: 6px 8px; }
}

/* Onglets années (revenus) */
.year-tabs {
  display: flex;
  gap: 4px;
  background: var(--sand-deep);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 14px;
  width: fit-content;
}
.year-tab {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--display);
}
.year-tab:hover { background: rgba(255, 255, 255, 0.5); }
.year-tab.is-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 32, 28, 0.08);
}

/* Bouton "Voir plus" avis */
.reviews-toggle {
  display: block;
  width: 100%;
  background: white;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  color: var(--teal-700);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.15s;
}
.reviews-toggle:hover {
  background: var(--teal-050);
  border-color: var(--teal);
  border-style: solid;
}

/* Toggle simple blocage calendrier (discret) */
.os-simpleblock {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--sand);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  transition: all .15s;
}
.os-simpleblock:hover {
  background: var(--sand-deep);
  border-color: var(--teal-300);
}
.os-simpleblock input[type=checkbox] {
  margin-top: 2px;
  accent-color: var(--teal);
  flex-shrink: 0;
}
.os-simpleblock small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

/* Tickets Breezeway dans statement */
.ticket-dept {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.dept-housekeeping { background: #e3f4f5; color: var(--teal-700); }
.dept-maintenance { background: #fcf3d6; color: var(--gold); }
.dept-inspection { background: #e6f6ee; color: var(--green); }
.dept-safety { background: #fdecec; color: var(--red); }
.dept-office { background: var(--sand-deep); color: var(--ink-soft); }

.ticket-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: capitalize;
}
.ticket-status-finished, .ticket-status-closed { background: #e6f6ee; color: var(--green); }
.ticket-status-created { background: var(--sand-deep); color: var(--ink-soft); }
.ticket-status-in_progress { background: #fcf3d6; color: var(--gold); }
.ticket-status-cancelled { background: var(--line); color: var(--muted); }

/* ============================================
   Chart avec grille horizontale (V2 — flex direct)
   ============================================ */
.chart {
  position: relative;
  height: 240px;
  padding: 10px 0 32px 56px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 6px;
  border-bottom: 1px solid var(--line);
}
.chart-grid {
  position: absolute;
  top: 10px;
  bottom: 32px;
  left: 56px;
  right: 0;
  pointer-events: none;
  z-index: 0;
}
.chart-gridline {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--line);
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chart-gridline:first-child { border-top-style: solid; opacity: 0.7; }
.chart-axis-label {
  position: absolute;
  left: -56px;
  top: -7px;
  width: 50px;
  text-align: right;
  background: white;
  padding: 0 4px 0 0;
  font-weight: 500;
}
.chart .bar-col {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  position: relative;
  z-index: 1;
  cursor: pointer;
  min-width: 0;
}
.chart .bar {
  width: 100%;
  max-width: 36px;
  background: linear-gradient(180deg, var(--teal-300), var(--teal));
  border-radius: 5px 5px 0 0;
  transition: opacity 0.2s;
}
.chart .bar-label {
  position: absolute;
  bottom: -22px;
  font-size: 11px;
  color: var(--muted);
}
/* Overlay comparaison année N-1 : barre discrète et claire à côté de l'année en cours */
.chart .bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 100%;
}
.chart .bars .bar { flex: 1 1 0; max-width: 16px; }
.chart .bar-prev {
  flex: 1 1 0;
  max-width: 16px;
  background: var(--muted);
  opacity: 0.28;
  border-radius: 5px 5px 0 0;
}
.bar-col:hover .bar-prev { opacity: 0.42; }

@media (max-width: 768px) {
  .chart { padding-left: 38px; height: 180px; }
  .chart-grid { left: 38px; }
  .chart-axis-label { left: -38px; width: 34px; font-size: 9px; }
}

/* Sélecteur filtres revenus */
.rev-filter-tabs {
  display: flex;
  gap: 4px;
  background: var(--sand-deep);
  border-radius: 10px;
  padding: 4px;
}
.rev-filter {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--display);
  position: relative;
}
.rev-filter::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--col, var(--teal));
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.rev-filter:hover { background: rgba(255, 255, 255, 0.5); }
.rev-filter.is-active {
  background: white;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(20, 32, 28, 0.08);
}

@media (max-width: 700px) {
  .rev-filter { padding: 6px 8px; font-size: 11px; }
  .rev-filter::before { width: 6px; height: 6px; margin-right: 4px; }
}

/* ============================================
   FAQ enrichie avec catégories + recherche
   ============================================ */
.faq-search-wrap {
  margin-bottom: 18px;
}
.faq-controls {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
@media (max-width: 640px) {
  .faq-controls { grid-template-columns: 1fr; }
}
.faq-category-select {
  font-size: 14px;
  padding: 12px 16px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
                    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 18px) center, calc(100% - 13px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
#faqSearch {
  font-size: 15px;
  padding: 14px 18px;
}
.faq-category {
  margin-bottom: 22px;
}
/* ============================================
   SPA Router : 1 vue = 1 ou plusieurs sections visibles
   ============================================ */
#dashboardContent > section { display: none; }
#dashboardContent > section.is-active { display: block; }

/* Animation fade léger au changement de vue (perception de fluidité) */
@keyframes view-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
#dashboardContent > section.is-active {
  animation: view-fade-in .18s ease-out;
}

/* Regroupement Calendrier + Mes blocages — pas de gap visuel entre les deux */
section#ownerstay.cal-companion {
  margin-top: -8px;
}
section#ownerstay.cal-companion .sec-head h2 {
  font-size: 20px;
}

/* ============================================
   Calendrier — Layout 70/30 (cal + side panel form)
   ============================================ */
.cal-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 980px) {
  .cal-layout { grid-template-columns: 1fr; }
}

.cal-side-panel {
  padding: 22px 20px;
  position: sticky;
  top: 16px;
}
.cal-side-head h3 {
  font-size: 17px;
  margin-bottom: 4px;
}
.cal-side-hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.cal-side-summary {
  background: var(--sand);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

/* Sélection sur le calendrier principal (jours libres) */
.cal-cell.is-selectable {
  cursor: pointer;
  transition: background .12s, box-shadow .12s;
}
.cal-cell.is-selectable:hover {
  background: var(--teal-050);
  box-shadow: inset 0 0 0 1.5px var(--teal-300);
}
.cal-cell.is-sel-start,
.cal-cell.is-sel-end {
  background: var(--teal) !important;
  color: white;
  box-shadow: 0 0 0 2px var(--teal-700);
}
.cal-cell.is-sel-start .cal-cell-day,
.cal-cell.is-sel-end .cal-cell-day {
  color: white;
}
.cal-cell.is-in-range {
  background: var(--teal-050) !important;
  box-shadow: inset 0 0 0 1px var(--teal-300);
}

/* Catégorie repliable : la card EST le <details> */
.faq-category-block {
  margin-bottom: 12px;
  padding: 0;
  overflow: hidden;
  transition: box-shadow .15s;
}
.faq-category-block[open] {
  box-shadow: 0 4px 16px rgba(20, 32, 28, 0.06);
}
.faq-category-block > summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  transition: background .12s;
}
.faq-category-block > summary::-webkit-details-marker { display: none; }
.faq-category-block > summary::marker { display: none; }
.faq-category-block > summary:hover { background: var(--sand); }
.faq-cat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
}
.faq-cat-icon { font-size: 20px; }
.faq-cat-name { flex: 1 1 auto; min-width: 0; }
.faq-cat-count {
  background: var(--sand-deep);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 20px;
}
.faq-cat-chev {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform .2s;
  flex-shrink: 0;
}
.faq-category-block[open] > summary .faq-cat-chev {
  transform: rotate(180deg);
  color: var(--teal);
}
.faq-card-inner {
  padding: 0 20px 6px;
  border-top: 1px solid var(--line);
}
.faq-card { padding: 6px 18px; }
.faq-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  padding: 4px 0;
  transition: color .12s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--teal-700); }
.faq-item summary > span:first-child { flex: 1; }
.faq-chev {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform .15s;
  flex-shrink: 0;
}
.faq-item[open] .faq-chev { transform: rotate(180deg); color: var(--teal); }
.faq-body {
  padding-top: 10px;
  padding-left: 4px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
}
.faq-body strong { color: var(--ink); }
.faq-body a { color: var(--teal-700); border-bottom: 1px solid var(--teal-050); }
.faq-body a:hover { border-bottom-color: var(--teal); }
mark {
  background: var(--gold-050);
  color: var(--ink);
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .faq-cat-title { font-size: 15px; }
  .faq-cat-icon { font-size: 18px; }
  .faq-card { padding: 4px 14px; }
  .faq-item summary { font-size: 13px; }
  .faq-body { font-size: 13px; }
}

/* ===== Finitions owner (audit usage 2026-06-19) ===== */
/* Bouton flottant "Une question ?" */
.help-fab {
  position: fixed; bottom: 20px; right: 20px; z-index: 900;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal-700, #0f766e); color: #fff; text-decoration: none;
  padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,.35); transition: transform .15s, background .15s;
}
.help-fab:hover { transform: translateY(-2px); }
.help-fab span { font-size: 17px; }
@media (max-width: 600px) { .help-fab { bottom: 14px; right: 14px; padding: 10px 14px; font-size: 13px; } }

/* Actions dans l'entête des modals + bouton fantôme */
.modal-head-actions { display: flex; align-items: center; gap: 8px; }
.btn-ghost {
  background: transparent; border: 1px solid var(--shironeri, #e3ddd0); color: var(--ink, #2a2a28);
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-ghost:hover { background: var(--sand-deep, #f0e8d8); border-color: var(--gold, #b89a5f); }

/* Impression : ne garder que le contenu du modal (décompte ou récap fiscal) */
/* En-tête de marque visible UNIQUEMENT à l'impression (PDF autoportant) */
.print-only { display: none; }

@media print {
  @page { margin: 1.5cm; }
  body.printing-statement > *:not(#stmtModal),
  body.printing-fiscal > *:not(#fiscalModal) { display: none !important; }
  #stmtModal, #fiscalModal { position: static !important; display: block !important; background: none !important; }
  #stmtModal .modal-backdrop, #fiscalModal .modal-backdrop { display: none !important; }
  #stmtModal .modal-content, #fiscalModal .modal-content {
    position: static !important; max-width: 100% !important; width: 100% !important;
    box-shadow: none !important; border: none !important; max-height: none !important; overflow: visible !important;
    padding: 0 !important;
  }
  .modal-head-actions, .modal-close, .help-fab { display: none !important; }
  /* Garder les couleurs/branding à l'impression (sinon le navigateur les retire) */
  #stmtModal, #fiscalModal, #stmtModal *, #fiscalModal * {
    -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;
  }
  /* Masquer à l'impression les éléments écran-only */
  .no-print { display: none !important; }

  /* Le détail des dépenses du récap fiscal est toujours visible à l'impression,
     même s'il est replié à l'écran (display:none inline posé par JS). */
  #fiscalModal .fiscal-detail-row { display: table-row !important; }

  /* En-tête société (letterhead) */
  .print-only { display: block !important; }
  .print-header {
    display: flex !important; align-items: baseline; justify-content: space-between;
    border-bottom: 2.5px solid #11272c; padding-bottom: 12px; margin-bottom: 22px;
  }
  .print-header .ph-brand { font-size: 20px; font-weight: 700; color: #11272c; letter-spacing: .5px; }
  .print-header .ph-sub { font-size: 10.5px; color: #6f8084; margin-top: 3px; }

  /* Titre du document */
  #stmtModal h2, #fiscalModal h2 {
    font-size: 22px !important; color: #11272c !important; margin: 0 0 4px !important; font-weight: 700;
  }

  /* Bloc destinataire / période (2 colonnes) */
  .print-doc-meta {
    display: flex !important; justify-content: space-between; gap: 24px;
    margin: 18px 0 24px; padding: 14px 16px; background: #f7f5f0 !important; border-radius: 6px;
  }
  .print-doc-meta .pdm-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1.5px; color: #6f8084; margin-bottom: 3px; }
  .print-doc-meta .pdm-strong { font-size: 14px; font-weight: 700; color: #11272c; }
  .print-doc-meta .pdm-muted { font-size: 11px; color: #6f8084; }

  /* Sections */
  #stmtModal h3, #fiscalModal h3 {
    font-size: 12px !important; text-transform: uppercase; letter-spacing: 1px;
    color: #11272c !important; border-bottom: 1px solid #e3ddd0; padding-bottom: 5px; margin: 22px 0 10px !important;
  }

  /* Tableaux propres */
  #stmtModal table, #fiscalModal table { width: 100% !important; border-collapse: collapse; font-size: 11px; }
  #stmtModal thead th, #fiscalModal thead th {
    background: #11272c !important; color: #fff !important; font-size: 9.5px; text-transform: uppercase;
    letter-spacing: .5px; padding: 7px 9px; text-align: left;
  }
  #stmtModal tbody td, #fiscalModal tbody td { padding: 7px 9px; border-bottom: 1px solid #eee; }
  #stmtModal tbody tr:nth-child(even) td { background: #faf9f6 !important; }
  #stmtModal tr, #fiscalModal tr { break-inside: avoid; }
  .stmt-table-wrap { overflow: visible !important; border: none !important; }

  /* Encadré totaux */
  .stmt-totals {
    margin-top: 20px !important; margin-left: auto; max-width: 340px;
    border: 1.5px solid #11272c !important; border-radius: 8px; padding: 12px 16px !important;
  }
  .stmt-total-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 12px; }
  .stmt-total-net {
    border-top: 1.5px solid #11272c !important; margin-top: 6px; padding-top: 8px !important;
    font-size: 15px !important; font-weight: 700; color: #0f5e57 !important;
  }

  /* Pied de page légal */
  .print-doc-footer {
    margin-top: 28px; padding-top: 12px; border-top: 1px solid #e3ddd0;
    font-size: 9.5px; color: #8a9499; line-height: 1.5; text-align: center;
  }
}
