﻿:root {
  /* Couleurs de base */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f6f6f6;
  --ink: #050505;
  --bg-dark: #050505;
  --muted: #5f5f5f;
  --line: #e8e8e8;
  --border: #e8e8e8;

  /* Marque */
  --brand: #c0120c;
  --brand-hover: #9e0c08;
  --brand-2: #9e0c08;
  --brand-light: rgba(192, 18, 12, 0.1);
  --brand-shadow: rgba(192, 18, 12, 0.3);

  /* Sémantique */
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --danger: #c0120c;
  --danger-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --info: #555555;
  --info-bg: #f7f7f8;

  /* Formes */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 99px;

  /* Inputs */
  --input-height: 44px;
  --input-radius: var(--radius);
  --input-border: 1px solid var(--line);
  --input-font-size: 0.85rem;
  --input-padding: 10px 12px;

  --shadow: 0 22px 60px rgba(22, 31, 28, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
}

.is-hidden {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.public-shell {
  min-height: 100vh;
  background: var(--bg);
}

/* ══════════════════════════════════════════════════════
   PAGE D'AUTHENTIFICATION - REDESIGN PREMIUM
   ══════════════════════════════════════════════════════ */

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}

/* ── Colonne gauche (branding) ── */
.auth-brand-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 45%;
  flex-shrink: 0;
  background: var(--bg-dark);
  padding: 40px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
}

.auth-brand-glow {
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(192,18,12,.28) 0%, transparent 70%);
  pointer-events: none;
}

/* Logo branding */
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  position: absolute;
  top: 36px;
  left: 56px;
  z-index: 2;
}
.auth-logo-mark {
  width: 36px;
  height: 36px;
  background: #fff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.auth-logo-mark img { width: 36px; height: 36px; display: block; }

/* Body branding */
.auth-brand-body { position: relative; z-index: 1; }
.auth-brand-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.auth-brand-title {
  font-size: clamp(2rem, 3vw, 2.7rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.025em;
  margin: 0 0 20px;
}
.auth-brand-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.55);
  line-height: 1.7;
  margin: 0 0 36px;
}

/* Bénéfices */
.auth-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 1rem;
  color: rgba(255,255,255,.75);
  font-weight: 500;
}
.auth-benefit-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(192,18,12,.2);
  border: 1px solid rgba(192,18,12,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand);
}

/* Mini-preview dashboard */
.auth-preview-card {
  margin-top: auto;
  padding-top: 36px;
  position: relative;
  z-index: 1;
}
.auth-preview-card > * {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 16px 18px;
}
.auth-preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.auth-preview-dots { display: flex; gap: 5px; }
.auth-preview-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
}
.auth-preview-dots span:first-child  { background: #ef4444; }
.auth-preview-dots span:nth-child(2) { background: #c41d15; }
.auth-preview-dots span:last-child   { background: #9ca3af; }
.auth-preview-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,.35);
  font-weight: 500;
  margin-left: 2px;
}
.auth-preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
.auth-preview-stat { text-align: center; }
.auth-preview-val {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.auth-preview-lbl {
  display: block;
  font-size: 0.65rem;
  color: rgba(255,255,255,.4);
  margin-top: 2px;
}
.auth-preview-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  border: none;
  background: none;
  margin-top: 0;
}
.auth-preview-bar {
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-shadow) 100%);
}

/* ── Colonne droite (formulaire) ── */
.auth-form-panel {
  flex: 1;
  background: #f5f6f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 32px 0;
  min-height: 100vh;
}

/* Carte centrée verticalement dans l'espace au-dessus du footer */
.auth-form-panel > .auth-card {
  margin-top: auto;
  margin-bottom: auto;
}

/* Footer pleine largeur, ancré en bas */
.auth-form-panel > .auth-legal-footer {
  align-self: stretch;
  margin-top: 0;
}

.auth-card {
  width: min(480px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 36px 36px 32px;
  box-shadow: 0 4px 6px rgba(0,0,0,.04), 0 20px 60px rgba(0,0,0,.08);
}

/* ── Onglets ── */
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-bottom: 28px;
  padding: 4px;
  border-radius: 12px;
  background: #f0f1f3;
}
.auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #9ca3af;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background .18s, color .18s, box-shadow .18s;
}
.auth-tab:hover:not(.active) { color: #374151; }
.auth-tab.active {
  background: #fff;
  color: #111;
  box-shadow: 0 1px 4px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
}
.auth-tab.active::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--brand);
  border-radius: 99px;
  margin: 4px auto 0;
}

/* ── Copy ── */
.auth-badge {
  display: inline-block;
  background: #fff0ef;
  color: var(--brand);
  border: 1px solid rgba(192,18,12,.2);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.auth-copy-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0d1117;
  line-height: 1.15;
  letter-spacing: -.025em;
  margin: 0 0 6px;
}
.auth-copy-sub {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 24px;
}

/* ── Formulaire ── */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
}
.auth-optional { font-weight: 400; color: #9ca3af; }
.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.auth-forgot {
  font-size: 0.78rem;
  color: var(--brand);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-weight: 500;
  transition: opacity .15s;
}
.auth-forgot:hover { opacity: .75; }

/* ── Modes mot de passe oublié / réinitialisation ── */
.forgot-only, .reset-only { display: none; }
.auth-shell.forgot-mode .auth-form,
.auth-shell.forgot-mode .auth-tabs { display: none; }
.auth-shell.forgot-mode .forgot-only { display: block; }
.auth-shell.reset-mode .auth-form,
.auth-shell.reset-mode .auth-tabs { display: none; }
.auth-shell.reset-mode .reset-only { display: block; }
.auth-forgot-title { font-size: 1.1rem; font-weight: 700; color: #111; margin: 0 0 8px; }
.auth-forgot-desc { font-size: 0.82rem; color: #6b7280; margin: 0 0 20px; line-height: 1.5; }
.auth-forgot-back { display: block; width: 100%; margin-top: 12px; background: none; border: none; color: var(--brand); font-size: 0.82rem; font-weight: 500; cursor: pointer; text-align: center; padding: 6px 0; }
.auth-forgot-back:hover { opacity: .75; }
.auth-success { display: flex; align-items: flex-start; gap: 8px; background: #f0fdf4; border: 1.5px solid rgba(21,128,61,.25); color: #15803d; border-radius: 10px; padding: 10px 14px; font-size: 0.82rem; font-weight: 600; margin-bottom: 12px; }
.auth-success.is-hidden { display: none; }

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-icon {
  position: absolute;
  left: 13px;
  color: #9ca3af;
  pointer-events: none;
  flex-shrink: 0;
}
.auth-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fafafa;
  font-size: 0.88rem;
  color: #111;
  font-family: inherit;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
  box-sizing: border-box;
}
.auth-input.has-icon { padding-left: 42px; }
.auth-input:focus {
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-light);
}
.auth-input::placeholder { color: #c4c8d0; }
select.auth-input { appearance: none; cursor: pointer; padding-right: 36px; }

.auth-pw-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  transition: color .15s;
}
.auth-pw-toggle:hover { color: #374151; }

/* Visibilité register-only / login-only */
.auth-shell.login-mode .register-only { display: none; }
.auth-shell.register-mode .login-only { display: none; }

/* ── Bouton principal ── */
.auth-submit {
  width: 100%;
  height: 50px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .01em;
  transition: background .18s, box-shadow .18s, transform .1s;
  box-shadow: 0 4px 12px var(--brand-shadow);
  margin-top: 4px;
}
.auth-submit:hover { background: var(--brand-hover); box-shadow: 0 6px 20px rgba(192,18,12,.4); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit[disabled] { opacity: .6; cursor: not-allowed; }

/* Note & mentions */
.auth-free {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #374151;
  font-weight: 500;
  margin: 0;
}
.auth-legal {
  font-size: 0.73rem;
  color: #9ca3af;
  text-align: center;
  line-height: 1.5;
  margin: 0;
}
.auth-legal a { color: #6b7280; text-decoration: underline; }
.auth-tenant-hint {
  font-size: 0.73rem;
  color: #9ca3af;
  text-align: center;
  line-height: 1.5;
  margin: 4px 0 0;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

/* Retour accueil */
.auth-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 10px;
  background: none;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  font-family: inherit;
}
.auth-back:hover { background: #f5f6f8; border-color: #d1d5db; color: #374151; }

/* Erreur */
.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fff0ef;
  border: 1.5px solid rgba(192,18,12,.25);
  color: var(--brand-hover);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}
.auth-error::before {
  content: "!";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}
.auth-error.is-hidden { display: none; }

/* Topbar user */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.topbar-username {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =============================================
   SIDEBAR - grouped navigation
   ============================================= */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 280px;
  background: #07070a;
  color: #f0f0f0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 20;
  border-right: 1px solid rgba(255,255,255,0.06);
}

/* Brand */
.sb-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}

.sb-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-brand-name {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.1;
}

.sb-brand-space {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.50);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sb-plan-badge {
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 2px 7px;
  border-radius: 20px;
}
.sidebar-badge {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.sidebar-badge-essential {
  background: rgba(224,32,32,0.12);
  color: #f87171;
  border: 1px solid rgba(224,32,32,0.25);
}
.sidebar-badge-unlimited {
  background: rgba(233,40,35,0.14);
  color: #ef4444;
  border: 1px solid rgba(233,40,35,0.25);
}

/* User greeting */
.sb-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.sb-user-info { min-width: 0; }

.sb-hello {
  display: block;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1px;
}

.sb-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Wrappers de navigation (owner / contractor) - doivent être flex enfants propres */
#sbNavOwner,
#sbNavContractor {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Scrollable nav area */
.sb-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 0 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}

.sb-nav::-webkit-scrollbar { width: 5px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 999px; }
.sb-nav::-webkit-scrollbar-track { background: transparent; }

/* Group */
.sb-group {
  margin-bottom: 10px;
}

.sb-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 8px 14px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: left;
  transition: color 0.15s;
}

.sb-group-btn:hover { color: rgba(255,255,255,0.85); }

.sb-top-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 14px;
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  margin-bottom: 10px;
  border-radius: 0;
  transition: color 0.15s;
}
.sb-top-link:hover { color: rgba(255,255,255,0.85); }
.sb-top-link.active-route {
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
}

.sb-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sb-chevron {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  opacity: 0.5;
}

.sb-group-btn:not(.open) .sb-chevron {
  transform: rotate(-90deg);
}

.sb-group-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 4px 4px;
  overflow: hidden;
  max-height: 400px;
  transition: max-height 0.22s ease, opacity 0.2s;
  opacity: 1;
}

.sb-group-body.collapsed {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Nav items */
.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 10px;
  color: rgba(255,255,255,0.80);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
}

.nav-link:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}

.nav-link.active {
  background: rgba(192,18,12,0.10);
  color: var(--brand);
  font-weight: 700;
}

.nav-link.active svg { color: var(--brand); }

.nav-link svg {
  flex-shrink: 0;
  opacity: 0.70;
}

.nav-link.active svg { opacity: 1; }


.nav-badge-soon {
  margin-left: auto;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.07);
  padding: 1px 5px;
  border-radius: 4px;
}

/* Bottom area */
.sb-bottom {
  flex-shrink: 0;
  padding: 10px 8px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-stat {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  padding: 6px 10px;
  font-weight: 600;
}

.sb-logout {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 0 10px;
  color: rgba(255,255,255,0.4);
  background: none;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
  width: 100%;
}

.sb-logout:hover {
  background: rgba(170,0,0,0.12);
  color: #ff4b4b;
}

.sb-logout svg { flex-shrink: 0; opacity: 0.6; }

/* eyebrow utility */
.eyebrow {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main {
  grid-column: 2;
  min-width: 0;
  padding: 22px;
}

.topbar {
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.menu-button {
  display: none;
}

.global-search {
  position: relative;
  width: 100%;
  max-width: 420px;
}
.global-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.global-search-icon {
  position: absolute;
  left: 14px;
  color: #aaa;
  pointer-events: none;
  flex-shrink: 0;
}
.global-search-input {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 11px 40px 11px 44px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  text-overflow: ellipsis;
}
.global-search-input:focus {
  border-color: rgba(181,24,24,.4);
  box-shadow: 0 0 0 3px rgba(181,24,24,.07);
}
.global-search-input::placeholder { color: #bbb; }
/* hide native clear button */
.global-search-input::-webkit-search-cancel-button { display: none; }

.global-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(560px, 90vw);
  max-height: 420px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.13);
  z-index: 9999;
  padding: 8px;
}
.global-search-result {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .12s;
}
.global-search-result:hover,
.global-search-result.is-focused { background: #f6f6f7; }
.global-search-result-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: #f3f4f6;
  display: grid; place-items: center;
  color: #6b7280;
  flex-shrink: 0;
}
.global-search-result-content { flex: 1; min-width: 0; }
.global-search-result-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-search-result-subtitle {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.global-search-result-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #991b1b;
  background: #fff1f1;
  border: 1px solid rgba(181,24,24,.18);
  border-radius: 999px;
  padding: 3px 8px;
  align-self: center;
  white-space: nowrap;
}
.global-search-empty {
  padding: 20px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}
.global-search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #aaa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, background .15s;
  line-height: 0;
}
.global-search-clear:hover { color: #555; background: #f0f0f0; }
.global-search-input:not(:placeholder-shown) ~ .global-search-clear { display: flex !important; }

.primary-action,
.secondary-action,
.ghost-action,
.icon-button {
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  font-size: 0.875rem;
  font-weight: 600;
}

.primary-action {
  background: var(--brand);
  color: #ffffff;
}

.primary-action:hover {
  background: var(--brand-2);
}

/* Focus ring WCAG AA — visible uniquement au clavier */
.primary-action:focus-visible,
.secondary-action:focus-visible,
.ghost-action:focus-visible,
.icon-button:focus-visible,
.mini-button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.secondary-action,
.ghost-action,
.icon-button {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.ghost-action {
  background: transparent;
}

.icon-button {
  width: 44px;
  padding: 0;
}

.hero-band {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 24px;
  background: var(--bg-dark);
  color: #ffffff;
  isolation: isolate;
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.93), rgba(0, 0, 0, 0.62) 48%, rgba(170, 0, 0, 0.08));
  z-index: -1;
}

.hero-copy {
  max-width: 650px;
  padding: 44px;
}

.hero-copy h1 {
  max-width: 610px;
  margin: 8px 0 14px;
  font-size: clamp(2rem, 5vw, 4.3rem);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.83);
  line-height: 1.6;
}

.hero-copy .eyebrow {
  color: #ff4b4b;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04);
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(224,32,32,0.25);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.btn-primary:hover {
  background: #c41a1a;
  box-shadow: 0 4px 14px rgba(224,32,32,0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.toolbar-actions select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

h3 {
  margin-bottom: 0;
}

/* legacy selectors kept for non-dashboard panels */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi,
.panel,
.property-card,
.table-panel,
.payment-card,
.ticket-column,
.document-card,
.public-preview {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(22, 31, 28, 0.06);
}

.property-card { transition: box-shadow 160ms; }
.property-card:hover { box-shadow: 0 6px 22px rgba(22,31,28,.10); }

.kpi { padding: 18px; }
.kpi strong { display: block; margin-top: 8px; font-size: 1.7rem; }
.kpi small, .muted { color: var(--muted); }

.split-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.panel { padding: 18px; }

.bar-chart { display: grid; gap: 12px; }

.bar-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 90px;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}

.bar-track {
  min-height: 12px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  min-height: 12px;
  background: linear-gradient(90deg, var(--brand), var(--bg-dark));
  border-radius: inherit;
}

.task-list { display: grid; gap: 8px; }

.task-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
}

/* =========================================
   DASHBOARD - nouveau layout
   ========================================= */

/* Banner */
/* ── Dashboard page header (no banner) ── */
.db-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.db-header h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 3px;
}

.db-header-sub {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.38);
  margin: 0;
}

.db-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* ── Secondary metrics strip ── */
.db-metrics-strip {
  margin-top: 10px;
  display: flex;
  align-items: stretch;
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.db-metric-item {
  flex: 1;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.db-metric-sep {
  width: 1px;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.db-metric-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.db-metric-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.db-metric-val.positive { color: #d1d5db; }
.db-metric-val.negative { color: #ff4b4b; }

/* ── Mes biens section ── */
.db-biens-section {
  margin-top: 24px;
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
}

.db-biens-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.db-biens-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.db-biens-table {
  display: flex;
  flex-direction: column;
}

.db-biens-thead {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1fr 1.2fr 90px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.db-biens-th {
  padding: 9px 16px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.35);
  text-align: left;
}

.db-biens-th:nth-child(3),
.db-biens-th:nth-child(4),
.db-biens-th:nth-child(5) { text-align: right; }

.db-bien-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1fr 1.2fr 90px;
}

.db-bien-row > *,
.db-bien-card-hd > * {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  font-size: 0.83rem;
}

.db-bien-row:last-child > *,
.db-bien-row:last-child .db-bien-card-hd > * {
  border-bottom: none;
}

.db-bien-card-hd {
  display: contents;
}

.db-bien-name {
  font-weight: 700;
  color: #fff;
  gap: 8px;
}

.db-bien-city {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  font-weight: 400;
  display: block;
  margin-top: 1px;
}

.db-bien-cell {
  color: rgba(255,255,255,0.5);
  justify-content: flex-end;
}

.db-bien-card-hd > .db-bien-cell { justify-content: flex-start; }
.db-bien-cell--action { justify-content: center; }

.db-bien-val {
  font-weight: 700;
  color: #fff;
}

.db-biens-empty {
  padding: 24px;
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 0.85rem;
}

.db-bien-val.positive { color: #d1d5db; }
.db-bien-val.negative { color: #ff4b4b; }

/* KPI grid */
/* ── Dashboard empty state ── */
#dbEmptyState { margin-bottom: 2rem; }
.db-empty-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}
.db-empty-icon {
  width: 72px; height: 72px;
  background: rgba(224,32,32,0.08);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--accent, #E02020);
}
.db-empty-title {
  font-size: 1.2rem; font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
}
.db-empty-sub {
  font-size: 0.875rem; color: var(--text-muted);
  margin: 0 0 1.75rem; line-height: 1.6;
}
.db-empty-btn {
  background: var(--accent, #E02020); color: #fff;
  border: none; border-radius: 8px;
  padding: 0.7rem 1.6rem;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.db-empty-btn:hover { background: #c41919; }

.db-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.db-kpi-card {
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 22px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color 150ms, transform 150ms;
  cursor: default;
}

.db-kpi-card:hover {
  border-color: rgba(255,255,255,0.13);
  transform: translateY(-1px);
}

.db-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.db-kpi-text { min-width: 0; }

.db-kpi-label {
  font-size: 0.74rem;
  color: rgba(255,255,255,0.38);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 5px;
}

.db-kpi-value {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-kpi-hint {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.28);
}

/* 2-column body */
.db-body {
  display: grid;
  margin-top: 20px;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: start;
}

.db-panel {
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
}

/* Gestion locative panel */
.db-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.db-panel-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.db-panel-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(170,0,0,0.12);
  display: grid;
  place-items: center;
  color: var(--brand);
}

.db-panel-head h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px;
}

.db-panel-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  margin: 0;
}

.db-details-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 150ms;
}
.db-details-btn:hover { color: #fff; }

/* Progress rows */
.db-loyer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 6px;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.55);
}

.db-loyer-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.db-loyer-rate {
  font-weight: 800;
  color: #d1d5db;
}

.db-progress-track {
  margin: 0 20px;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}

.db-progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 99px;
  transition: width 500ms ease;
}

.db-progress-secondary {
  background: rgba(255,255,255,0.25);
}

.db-loyer-amounts {
  display: flex;
  justify-content: space-between;
  padding: 8px 20px 14px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.db-loyer-amounts strong { color: #fff; font-weight: 700; }

.db-cumul-row {
  display: grid;
  grid-template-columns: max-content 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 20px;
  font-size: 0.8rem;
}

.db-cumul-label { color: rgba(255,255,255,0.35); white-space: nowrap; }
.db-cumul-value { color: rgba(255,255,255,0.6); font-weight: 700; }

.db-forecast-row { padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 6px; }
.db-forecast-label { color: rgba(255,255,255,0.25); font-style: italic; }
.db-forecast-value { color: rgba(255,255,255,0.45); font-weight: 600; }

.db-bar-section {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 10px;
}

.db-bar-chart { display: grid; gap: 10px; }

.db-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 80px;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.db-bar-row strong { color: rgba(255,255,255,0.75); font-weight: 600; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.db-bar-row span   { color: rgba(255,255,255,0.35); text-align: right; font-size: 0.78rem; }

.db-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 99px;
  overflow: hidden;
}

.db-bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 99px;
}

.db-bar-fill.paid    { background: #d1d5db; }
.db-bar-fill.late    { background: #ff4b4b; }
.db-bar-fill.pending { background: rgba(255,255,255,0.35); }
.db-bar-fill.vacant  { background: rgba(255,255,255,0.15); }
.db-bar-info { white-space: nowrap; }

/* Right panel - tabs */
.db-right-tabs {
  display: flex;
  gap: 2px;
  padding: 6px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.db-rtab {
  flex: 1;
  padding: 8px 6px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms;
  white-space: nowrap;
}

.db-rtab.active {
  background: #1e1e1e;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.db-rtab:hover:not(.active) { color: rgba(255,255,255,0.7); }

.db-rtab-panel { display: none; padding: 14px; }
.db-rtab-panel.active { display: block; }

/* Task items in new dashboard */
#priorityTasks .task-item,
#dbTravauxList .task-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  color: #fff;
}

#priorityTasks .task-item strong,
#dbTravauxList .task-item strong { color: #fff; }

#priorityTasks .task-item .muted,
#dbTravauxList .task-item .muted { color: rgba(255,255,255,0.4); }

.db-empty {
  padding: 28px 0;
  text-align: center;
  color: rgba(255,255,255,0.25);
  font-size: 0.83rem;
}

/* Responsive */
@media (max-width: 1100px) {
  .db-body { grid-template-columns: 1fr; }
  .db-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .db-biens-thead, .db-bien-row { grid-template-columns: 2fr 1fr 1.2fr 1fr 1.2fr 90px; }
}

@media (max-width: 600px) {
  .db-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .db-header { flex-wrap: wrap; gap: 10px; }
  .db-metrics-strip { flex-wrap: wrap; }
  .db-metric-sep { display: none; }
  .db-metric-item { flex: 1 1 45%; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .db-biens-section { overflow-x: auto; }
  .db-biens-table { min-width: 620px; }
  .db-biens-thead, .db-bien-row { grid-template-columns: 155px 95px 108px 88px 108px 66px; }
}

/* ── Mobile 375px ─────────────────────────────────────────── */
@media (max-width: 480px) {
  /* KPI : une seule colonne */
  .db-kpi-grid,
  .kpi-grid { grid-template-columns: 1fr; }

  /* Tableaux défilants */
  .db-biens-table,
  .payment-table,
  .tenant-table,
  .table-panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Modals : pleine largeur, padding réduit */
  .modal { padding: 8px; }
  .modal-card { border-radius: var(--radius-lg); }
  .modal-header { padding: 14px; }

  /* Formulaires : une colonne */
  .form-grid { grid-template-columns: 1fr; }

  /* Topbar : empiler menu + search */
  .topbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
  }
  .topbar-actions > * { flex: 1 1 auto; min-width: 0; }

  /* Boutons côte-à-côte → empilés */
  .section-heading { flex-direction: column; align-items: flex-start; gap: 8px; }
  .section-heading .primary-action,
  .section-heading .secondary-action { width: 100%; justify-content: center; }

  /* Sidebar overlay : largeur max sur très petit écran */
  .sidebar { width: min(300px, 92vw); }

  /* Padding principal réduit */
  .main { padding: 10px; }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.success {
  background: var(--success-bg);
  color: var(--success);
}

.warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.danger {
  background: rgba(170, 0, 0, 0.12);
  color: var(--danger);
}

.neutral {
  background: rgba(23, 32, 30, 0.09);
  color: var(--muted);
}

.properties-grid,
.listing-preview,
.documents-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.property-card {
  overflow: hidden;
}

.property-image {
  height: 145px;
  background:
    linear-gradient(135deg, rgba(5, 5, 5, 0.86), rgba(170, 0, 0, 0.72)),
    var(--surface-2);
  position: relative;
}

.property-image::after {
  content: "";
  position: absolute;
  inset: 32px 28px 0;
  background:
    linear-gradient(90deg, transparent 48%, rgba(255, 255, 255, 0.35) 49%, rgba(255, 255, 255, 0.35) 52%, transparent 53%),
    linear-gradient(#ffffff, #ffffff);
  border-radius: 8px 8px 0 0;
  opacity: 0.74;
}

.property-body {
  padding: 16px;
}

.property-meta,
.card-actions,
.payment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-actions {
  margin-top: 16px;
}

.mini-button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.mini-button.danger-button {
  color: var(--danger);
}

.table-panel {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

/* ===== CRÉDITS PAGE ===== */
.credits-kpi-strip {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 10px;
  padding: 16px 24px;
  margin-bottom: 20px;
  gap: 0;
  flex-wrap: wrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.cred-kpi-item { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 4px; }
.cred-kpi-label { font-size: 0.72rem; color: #888; }
.cred-kpi-val { font-size: 1.05rem; font-weight: 700; color: #111; }
.cred-kpi-pos { color: #374151; }
.cred-kpi-neg { color: #b51818; }
.cred-kpi-sep { width: 1px; background: #eee; align-self: stretch; margin: 0 20px; }
.credits-list { display: flex; flex-direction: column; gap: 14px; }
.credits-empty { text-align: center; padding: 60px 24px; color: #aaa; font-size: 0.9rem; background: #fff; border: 1px solid #e4e6eb; border-radius: 10px; }
.credit-card { background: #fff; border: 1px solid #e4e6eb; border-radius: 12px; display: flex; align-items: stretch; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,0.05); transition: box-shadow 0.15s; }
.credit-card:hover { box-shadow: 0 3px 14px rgba(0,0,0,0.09); }
.credit-card-left { display: flex; flex: 1; min-width: 0; }
.credit-color-bar { width: 5px; flex-shrink: 0; }
.credit-card-body { flex: 1; padding: 18px 20px; min-width: 0; }
.credit-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.credit-prop-name { font-size: 0.95rem; font-weight: 700; color: #111; display: block; }
.credit-prop-city { font-size: 0.75rem; color: #aaa; margin-top: 2px; }
.credit-bank-badge { display: flex; align-items: center; gap: 5px; background: #f0f4ff; border: 1px solid #dce4ff; color: #c0120c; border-radius: 20px; padding: 5px 12px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.credit-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 8px; margin-bottom: 18px; }
.credit-stat { display: flex; flex-direction: column; gap: 3px; }
.credit-stat-label { font-size: 0.68rem; color: #aaa; text-transform: uppercase; letter-spacing: 0.04em; }
.credit-stat-val { font-size: 0.85rem; font-weight: 600; color: #222; }
.credit-progress-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: #888; margin-bottom: 6px; }
.credit-progress-labels strong { color: #111; }
.credit-progress-track { height: 8px; background: #f0f0f0; border-radius: 10px; overflow: hidden; }
.credit-progress-fill { height: 100%; border-radius: 10px; transition: width 0.5s ease; }
.credit-card-actions { display: flex; align-items: center; gap: 8px; padding: 0 20px; border-left: 1px solid #f0f0f0; }
.btn-secondary { background: #f5f6f8; border: 1px solid #dde1e9; border-radius: var(--radius); color: #333; font-size: 0.78rem; font-weight: 600; padding: 8px 16px; cursor: pointer; white-space: nowrap; transition: background 0.15s; }
.btn-secondary:hover { background: #eceef2; }
.btn-secondary.btn-brand { background: #c0120c; border-color: #c0120c; color: #fff; }
.btn-secondary.btn-brand:hover { background: #a50f0a; border-color: #a50f0a; }
.btn-delete-credit { background: none; border: 1px solid #fecaca; border-radius: var(--radius); color: #b51818; padding: 8px 10px; cursor: pointer; display: flex; align-items: center; transition: background 0.15s; }
.btn-delete-credit:hover { background: var(--danger-bg); }

.payment-list {
  display: grid;
  gap: 12px;
}

.payment-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.documents-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.document-card {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.document-icon {
  width: 44px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--brand-2);
  font-weight: 900;
}

.document-card h3 {
  font-size: 1rem;
  line-height: 1.3;
}

.document-card p {
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.ticket-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ticket-column {
  padding: 14px;
  min-height: 270px;
}

.ticket-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ticket-card {
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius);
}

.ticket-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.public-preview {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 22px;
  padding: 22px;
}

.public-copy p {
  color: var(--muted);
  line-height: 1.55;
}

.public-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.public-stat {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.public-stat strong {
  display: block;
  margin-top: 3px;
  font-size: 1.25rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 21, 20, 0.56);
  z-index: 50;
}

.modal.is-open {
  display: flex;
}

.modal-card {
  width: min(620px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.modal-card-wide {
  width: min(760px, calc(100vw - 32px));
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  font-size: 1.2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-weight: 750;
  font-size: 0.9rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: var(--input-height);
  border: var(--input-border);
  border-radius: var(--input-radius);
  padding: var(--input-padding);
  font-size: var(--input-font-size);
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}

.form-field textarea {
  min-height: 94px;
  resize: vertical;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 12px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.5);
  grid-column: 1 / -1;
}
.empty-state svg { opacity: 0.35; flex-shrink: 0; }
.empty-state p { margin: 0; font-size: 0.95rem; }
.empty-state .empty-state-title { font-weight: 600; font-size: 1rem; color: var(--ink); opacity: 1; }
.empty-state .empty-state-sub { font-size: 0.84rem; color: var(--muted); }

/* Harmonisation maintenance empty */
.maint-empty-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 12px;
  color: var(--muted);
}
.maint-empty-detail svg { opacity: 0.35; }
.maint-empty-detail p { margin: 0; font-size: 0.95rem; }

/* ── États de chargement ── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  gap: 14px;
  color: var(--muted);
  font-size: 0.88rem;
}
.loading-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* Overlay chargement initial (appShell) */
.app-loader {
  position: absolute;
  inset: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

@media (max-width: 1100px) {
  .kpi-grid,
  .properties-grid,
  .listing-preview,
  .documents-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split-grid,
  .public-preview,
  .feature-showcase,
  .landing-preview,
  .simulator-section {
    grid-template-columns: 1fr;
  }

  .simulator-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefits-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benefits-strip article {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .pricing-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .public-header {
    position: relative;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.92);
    flex-direction: column;
    align-items: flex-start;
  }

  .public-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .public-nav a {
    color: var(--muted);
  }

  .landing-hero {
    min-height: 680px;
    align-items: flex-end;
    padding: 104px 18px 48px;
  }

  .landing-hero::after {
    background: rgba(0, 0, 0, 0.82);
  }

  .landing-hero-copy {
    margin: 0;
    padding: 0;
  }

  .landing-hero-copy h1 {
    font-size: clamp(2.2rem, 11vw, 4.2rem);
    white-space: normal;
  }

  .landing-hero .primary-action,
  .landing-hero .ghost-action {
    width: 100%;
  }


  .landing-metrics,
  .landing-strip,
  .benefits-strip,
  .landing-preview,
  .feature-grid,
  .workflow-grid,
  .simulator-cards,
  .mock-kpis {
    grid-template-columns: 1fr;
  }

  .landing-metrics {
    margin-top: 18px;
  }

  .landing-strip {
    margin-top: 14px;
  }

  .landing-preview {
    margin-top: 34px;
  }

  .benefits-strip article {
    border-right: 0;
  }

  .feature-showcase,
  .simulator-section,
  .pricing-cta {
    padding: 22px;
  }

  .dashboard-mock {
    grid-template-columns: 48px 1fr;
    min-height: 300px;
  }

  .auth-shell { flex-direction: column; }
  .auth-brand-panel {
    width: 100%;
    padding: 28px 24px 32px;
    min-height: auto;
  }
  .auth-logo { margin-bottom: 28px; }
  .auth-brand-title { font-size: 1.4rem; }
  .auth-brand-sub { font-size: 0.82rem; }
  .auth-preview-card { padding-top: 24px; }
  .auth-form-panel {
    padding: 28px 16px 0;
    min-height: auto;
    align-items: center;
  }
  .auth-card {
    border-radius: 20px;
    padding: 28px 22px 24px;
  }
  .auth-field-row { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(260px, 86vw);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .main {
    grid-column: 1;
    padding: 14px;
  }

  .topbar {
    grid-template-columns: auto 1fr;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero-copy {
    padding: 30px 20px;
  }

  .hero-band::after {
    background: rgba(0, 0, 0, 0.78);
  }

  .kpi-grid,
  .properties-grid,
  .listing-preview,
  .documents-grid,
  .ticket-board {
    grid-template-columns: 1fr;
  }

  .payment-card {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions {
    width: 100%;
    justify-content: stretch;
  }

  .toolbar-actions > * {
    flex: 1 1 170px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================================
   NAVBAR
   =========================================== */
.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(5, 5, 5, 0.0);
  transition: background 220ms ease, box-shadow 220ms ease;
}

.navbar.scrolled {
  background: rgba(5, 5, 5, 0.97);
  box-shadow: 0 2px 24px rgba(0,0,0,0.32);
}

.navbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 64px);
  height: 70px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.navbar-brand {
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0 auto;
}

.navbar-nav a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 140ms;
}

.navbar-nav a:hover {
  color: #ffffff;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.navbar-actions .secondary-action {
  background: transparent;
  border-color: rgba(255,255,255,0.3);
  color: #ffffff;
}

.navbar-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 0 10px;
}

.navbar-burger span {
  display: block;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

.navbar-mobile {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 16px clamp(16px, 4vw, 48px) 20px;
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.navbar-mobile.is-open {
  display: flex;
}

.navbar-mobile a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 0;
}

/* ===========================================
   HERO
   =========================================== */
.hero {
  width: 100%;
  min-height: 80vh;
  position: relative;
  isolation: isolate;
}

.hero-inner {
  max-width: 940px;
  margin: 0 auto;
  padding: 130px clamp(20px, 3vw, 48px) 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 620px;
}

.hero::before {
  display: none;
}

.hero-eyebrow {
  color: var(--brand);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(170,0,0,0.35);
  border-radius: 99px;
  background: rgba(170,0,0,0.08);
  color: rgba(255,255,255,0.7);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px rgba(170,0,0,0.8);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(1.6rem, 3.2vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  color: #ffffff;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}

.hero-accent {
  color: var(--brand);
  text-shadow: 0 0 60px rgba(170,0,0,0.45);
  font-style: italic;
}

.hero-question {
  color: var(--brand);
  text-shadow: 0 0 40px rgba(170,0,0,0.5);
}

/* Hero trust row */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 20px;
  justify-content: center;
}

.hero-trust span {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

.hero-subtitle {
  color: rgba(255,255,255,0.72);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
  max-width: 100%;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-cta-primary {
  min-height: 52px;
  padding: 0 28px;
  font-size: 1rem;
  box-shadow: 0 12px 32px rgba(170,0,0,0.35);
}

.hero-cta-ghost {
  min-height: 52px;
  padding: 0 28px;
  font-size: 1rem;
  background: transparent;
  border-color: rgba(255,255,255,0.3);
  color: #ffffff;
}

.hero-mention {
  margin-top: 18px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}


/* Public shell background */
.public-shell {
  background: #000000;
  min-height: 100vh;
}

/* Override eyebrow color on dark landing */
.public-shell .eyebrow {
  color: var(--brand);
}

/* Override h2/h3/p default margins for landing sections */
.public-shell .section h2,
.public-shell .section h3 {
  margin-top: 0;
  margin-bottom: 0;
}

/* ===========================================
   TRUST BAND
   =========================================== */
.trust-band {
  background: #0d0d0d;
  border-top: 1px solid rgba(255,255,255,0.07);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.trust-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px clamp(16px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 0;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 40px;
  text-align: center;
}

.trust-item strong {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 900;
  color: #ffffff;
  display: block;
}

.trust-item span {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.45);
  margin-top: 3px;
}

.trust-sep {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.1);
}

/* ===========================================
   SECTIONS LAYOUT
   =========================================== */
.section {
  max-width: 1440px;
  margin: 0 auto;
  padding: 96px clamp(16px, 4vw, 64px);
  scroll-margin-top: 80px;
}

#owners-section,
#contractors-section,
#tenants-section {
  scroll-margin-top: 80px;
}

.section-label {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-label h2 {
  color: #ffffff;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 900;
  line-height: 1.08;
  margin: 10px 0 14px;
}

.section-sub {
  color: rgba(255,255,255,0.5);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ===========================================
   FEATURES GRID
   =========================================== */
.features-section {
  border-top: 1px solid rgba(255,255,255,0.07);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px 28px 28px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  background: #0d0d0d;
  transition: border-color 200ms, transform 200ms;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feature-card:hover {
  border-color: rgba(170,0,0,0.3);
  transform: translateY(-3px);
}

.feature-icon-box {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--brand);
  margin-bottom: 22px;
  flex-shrink: 0;
}

.feature-icon-box svg {
  width: 26px;
  height: 26px;
  stroke: #ffffff;
  stroke-width: 2;
}

.feature-card h3 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.feature-card p {
  color: rgba(255,255,255,0.48);
  line-height: 1.7;
  font-size: 0.92rem;
}

/* ===========================================
   STEPS
   =========================================== */
.steps-section {
  border-top: 1px solid rgba(255,255,255,0.07);
}

.steps-grid {
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: center;
}

.step-item {
  flex: 1;
  max-width: 320px;
  padding: 32px 24px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.step-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--brand);
  margin-bottom: 16px;
  line-height: 1;
}

.step-item h3 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.step-item p {
  color: rgba(255,255,255,0.5);
  line-height: 1.65;
  font-size: 0.93rem;
}

.step-arrow {
  padding: 0 20px;
  font-size: 1.8rem;
  color: rgba(255,255,255,0.2);
  align-self: center;
  flex-shrink: 0;
  margin-top: -20px;
}

/* ===========================================
   SIMULATOR (landing)
   =========================================== */
.simulator-section {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 96px;
  padding-bottom: 96px;
}

.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.simulator-copy h2 {
  color: #ffffff;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 900;
  line-height: 1.08;
  margin: 10px 0 16px;
}

.simulator-copy p {
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  margin-bottom: 24px;
}

.simulator-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  gap: 10px;
}

.simulator-bullets li {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

.simulator-live {
  background: #111;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.sim-form {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sim-form .sim-field {
  display: grid;
  gap: 6px;
}

.sim-form .sim-field label {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sim-form .sim-field input {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #ffffff;
  padding: 10px 12px;
  min-height: 42px;
  font-size: 1rem;
  font-weight: 700;
  transition: border-color 150ms;
}

.sim-form .sim-field input:focus {
  outline: none;
  border-color: var(--brand);
}

.sim-results {
  padding: 20px 24px 24px;
  display: grid;
  gap: 10px;
}

.sim-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
}

.sim-result-row span {
  color: rgba(255,255,255,0.55);
  font-size: 0.88rem;
}

.sim-result-row strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
}

.sim-result-row.highlight {
  background: rgba(170,0,0,0.12);
  border: 1px solid rgba(170,0,0,0.25);
}

.sim-result-row.highlight strong {
  color: #ff4b4b;
  font-size: 1.2rem;
}

.sim-verdict {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.6);
  font-size: 0.88rem;
}

.sim-verdict.positive .verdict-icon {
  color: #d1d5db;
}

.sim-verdict.negative .verdict-icon {
  color: #ff4b4b;
}

.verdict-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ===========================================
   TESTIMONIALS
   =========================================== */
.testimonials-section {
  border-top: 1px solid rgba(255,255,255,0.07);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.testimonial-card {
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  display: grid;
  gap: 16px;
  align-content: start;
}

.testimonial-stars {
  color: var(--brand);
  font-size: 0.9rem;
  letter-spacing: 2px;
}

.testimonial-card > p {
  color: rgba(255,255,255,0.75);
  line-height: 1.65;
  font-size: 0.95rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  font-size: 0.78rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.testimonial-author strong {
  display: block;
  color: #ffffff;
  font-size: 0.9rem;
}

.testimonial-author span {
  display: block;
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
  margin-top: 2px;
}

.featured-testimonial {
  border-color: rgba(170,0,0,0.3);
  background: rgba(170,0,0,0.05);
}

/* ===========================================
   PRICING
   =========================================== */
/* ── Billing toggle (landing page – fond sombre) ─────────────────────────── */
.pricing-billing-toggle {
  display: flex;
  gap: 4px;
  background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 99px;
  padding: 4px;
  margin: 0 auto 36px;
  width: fit-content;
}
.pbt-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.72);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 99px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 180ms, color 180ms;
  font-family: inherit;
  white-space: nowrap;
}
.pbt-btn--active { background: var(--brand); color: #fff; }
.pbt-btn:not(.pbt-btn--active):hover { color: #fff; background: rgba(255,255,255,0.06); }
.pbt-badge {
  background: rgba(255,255,255,0.22);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
}

/* ── Prix annuels (landing page) ─────────────────────────────────────────── */
.pricing-annual-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: -6px;
  margin-bottom: 8px;
}
.pricing-annual-billed {
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
}
.pricing-annual-save {
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
  text-decoration: line-through;
}

.pricing-section {
  border-top: 1px solid rgba(255,255,255,0.07);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 18px;
  row-gap: 18px;
}

.pricing-card {
  grid-row: span 3;
  display: grid;
  grid-template-rows: subgrid;
  position: relative;
  padding: 32px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
}

.pricing-popular {
  border-color: var(--brand);
  background: rgba(170,0,0,0.06);
  box-shadow: 0 0 0 1px rgba(192,18,12,.4), 0 20px 60px rgba(192,18,12,.15);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 99px;
  white-space: nowrap;
}

/* header: flex-col so the description fills remaining space → border toujours en bas de zone */
.pricing-header {
  display: flex;
  flex-direction: column;
}

.pricing-header h3 {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 10px;
}

.pricing-amount strong {
  font-size: 2.4rem;
  font-weight: 900;
  color: #ffffff;
}

.pricing-amount span {
  color: rgba(255,255,255,0.45);
  font-size: 0.9rem;
}

.pricing-header > p {
  flex: 1; /* remplit l'espace → border-bottom toujours alignée en bas de zone */
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  align-content: start; /* items collés en haut de la zone */
}

.pricing-features li {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
}

.pricing-features li.disabled {
  color: rgba(255,255,255,0.25);
}

.pricing-features .check {
  color: #d1d5db;
  font-weight: 900;
  flex-shrink: 0;
}

.pricing-cta-btn {
  width: 100%;
  justify-content: center;
  align-self: end; /* bouton ancré en bas de la zone */
}

/* ===========================================
   FAQ
   =========================================== */
.faq-section {
  border-top: 1px solid rgba(255,255,255,0.07);
}

.faq-inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: start;
}

.faq-label {
  text-align: left;
  margin: 0;
  position: sticky;
  top: 100px;
}

.faq-list {
  display: grid;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.faq-item summary {
  padding: 22px 0;
  cursor: pointer;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--brand);
  flex-shrink: 0;
  transition: transform 200ms;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  padding-bottom: 22px;
  font-size: 0.95rem;
}

/* Résumé loyer CC dans le formulaire */
.rent-cc-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7f7f8;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.88rem;
}
.rent-cc-label { color: #111111; }
.rent-cc-val   { color: #374151; font-size: 1rem; }

/* ===========================================
   FOOTER
   =========================================== */
.site-footer {
  background: #000000;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px clamp(16px, 4vw, 48px) 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
}

.footer-brand .brand {
  color: #ffffff;
  margin-bottom: 18px;
  text-decoration: none;
}

.footer-brand .brand strong,
.footer-brand .brand:hover,
.footer-brand .brand:visited {
  text-decoration: none;
  color: #ffffff;
}

.footer-brand > p {
  color: rgba(255,255,255,0.4);
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 340px;
  margin-bottom: 8px;
}

.footer-legal-inline {
  color: rgba(255,255,255,0.25) !important;
  font-size: 0.78rem !important;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col strong {
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.footer-col a,
.footer-col button {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 0.88rem;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: color 140ms;
}

.footer-col a:hover,
.footer-col button:hover {
  color: rgba(255,255,255,0.75);
}

/* ===========================================
   RESPONSIVE - LANDING
   =========================================== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 110px;
    padding-bottom: 60px;
    gap: 48px;
  }

  .hero-visual {
    display: none;
  }

  .features-grid,
  .testimonials-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-popular {
    transform: none;
  }

  .faq-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .faq-label {
    position: static;
    text-align: center;
  }

  .simulator-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .navbar-nav,
  .navbar-actions {
    display: none;
  }

  .navbar-burger {
    display: flex;
  }

  .trust-inner {
    flex-direction: column;
    gap: 0;
  }

  .trust-sep {
    width: 40px;
    height: 1px;
    margin: 4px 0;
  }

  .trust-item {
    padding: 14px 20px;
  }

  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    flex-direction: column;
    align-items: center;
  }

  .step-arrow {
    transform: rotate(90deg);
    padding: 0;
  }

  .step-item {
    max-width: 100%;
    width: 100%;
  }

  .sim-form {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: 64px clamp(16px, 4vw, 48px);
  }
}

/* ===========================================
   SIMULATOR TEASER SECTION
   =========================================== */
.simulator-teaser-section {
  border-top: 1px solid rgba(255,255,255,0.07);
}

.sim-teaser-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.sim-teaser-copy h2 {
  color: #ffffff;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 900;
  line-height: 1.08;
  margin: 10px 0 16px;
}

.sim-teaser-copy p {
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  margin-bottom: 24px;
}

.simulator-bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  gap: 10px;
}

.simulator-bullets li {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

.sim-teaser-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sim-ghost-btn {
  background: transparent;
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
}

/* Preview clickable card */
.sim-teaser-preview {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  position: relative;
}

.sim-preview-screen {
  background: #111;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0,0,0,0.6);
  transition: transform 200ms, box-shadow 200ms;
}

.sim-teaser-preview:hover .sim-preview-screen {
  transform: translateY(-4px);
  box-shadow: 0 40px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(170,0,0,0.3);
}

.sim-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: #1a1a1a;
}

.sim-preview-header span {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  font-weight: 700;
}

.sim-preview-badge {
  background: rgba(107,107,107,0.10);
  color: #d1d5db !important;
  border: 1px solid rgba(74,222,128,0.3);
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
}

.sim-preview-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.sim-preview-inputs {
  padding: 16px;
  border-right: 1px solid rgba(255,255,255,0.07);
  display: grid;
  gap: 10px;
}

.sim-preview-field {
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-preview-field span {
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
}

.sim-preview-field strong {
  color: #ffffff;
  font-size: 0.88rem;
}

.sim-preview-results {
  padding: 16px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.sim-preview-kpi {
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  padding: 10px 12px;
}

.sim-preview-kpi span {
  display: block;
  color: rgba(255,255,255,0.4);
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.sim-preview-kpi strong {
  display: block;
  font-size: 1.2rem;
  color: #ffffff;
  font-weight: 900;
}

.sim-preview-kpi small {
  color: rgba(255,255,255,0.35);
  font-size: 0.72rem;
}

.sim-green { color: #d1d5db !important; }

.sim-preview-verdict {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.sim-positive {
  background: rgba(74,222,128,0.15);
  color: #d1d5db;
  border: 1px solid rgba(74,222,128,0.25);
}

.sim-teaser-cta-hint {
  margin-top: 12px;
  text-align: center;
  color: rgba(255,255,255,0.35);
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 200ms;
}

.sim-teaser-preview:hover .sim-teaser-cta-hint {
  color: var(--brand);
}

/* ===========================================
   PROPERTY DETAIL PAGE
   =========================================== */

.pd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

.pd-back {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  transition: color 150ms;
}
.pd-back:hover { color: #fff; }
.pd-breadcrumb-sep { color: rgba(255,255,255,0.2); }

/* Header */
.pd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px 24px;
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
}

.pd-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pd-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
}

.pd-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 4px;
}

.pd-address {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

.pd-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pd-status-badge {
  padding: 5px 14px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(74,222,128,0.12);
  color: #d1d5db;
  border: 1px solid rgba(74,222,128,0.25);
}

.pd-status-badge.vacant {
  background: rgba(250,204,21,0.12);
  color: #c41d15;
  border-color: rgba(107,107,107,0.12);
}

/* KPI Strip */
.pd-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.pd-kpi {
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pd-kpi-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}

.pd-kpi-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.pd-kpi-value.positive { color: #d1d5db; }
.pd-kpi-value.negative { color: #ff4b4b; }

/* 2-column body */
.pd-body {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

.pd-left, .pd-right {
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  overflow: hidden;
}

/* Tab bars */
.pd-tab-bar {
  display: flex;
  gap: 2px;
  padding: 6px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.pd-tab {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms;
  white-space: nowrap;
}

.pd-tab.active {
  background: #1e1e1e;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.pd-tab:hover:not(.active) {
  color: rgba(255,255,255,0.7);
}

/* Panels */
.pd-panel { display: none; padding: 20px; }
.pd-panel.active { display: block; }

/* Info grid */
.pd-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pd-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pd-info-item.full-width {
  grid-column: 1 / -1;
}

.pd-info-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pd-info-value {
  font-size: 0.95rem;
  color: #fff;
  font-weight: 600;
}

/* Analyse list (right) */
.pd-analyse-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pd-analyse-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.pd-analyse-row:last-child { border-bottom: none; }

.pd-analyse-row span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.pd-analyse-row strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}

.pd-analyse-row strong.positive { color: #d1d5db; }
.pd-analyse-row strong.negative { color: #ff4b4b; }

/* Travaux */
.pd-travaux-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.pd-travaux-count {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}

.pd-add-work {
  font-size: 0.82rem;
  min-height: 32px;
  padding: 0 12px;
}

.pd-travaux-list {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 120px;
}

.pd-work-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
}

.pd-work-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.pd-work-dot.planned  { background: #c41d15; }
.pd-work-dot.ongoing  { background: var(--brand); }
.pd-work-dot.done     { background: #d1d5db; }

.pd-work-info { flex: 1; min-width: 0; }

.pd-work-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.pd-work-meta {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

.pd-work-cost {
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
}

.pd-empty {
  text-align: center;
  padding: 32px 0;
  color: rgba(255,255,255,0.25);
  font-size: 0.85rem;
}

/* ── Fiscalité du bien (section fiche) ── */
.pd-fisc-section {
  margin-top: 24px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15,23,42,0.06);
}
.pd-fisc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.pd-fisc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
}
.pd-fisc-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pd-fisc-tmi-label { font-size: 0.78rem; color: #6b7280; white-space: nowrap; }
.pd-fisc-tmi-select {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #111827;
  font-size: 0.82rem;
  cursor: pointer;
}
.pd-fisc-edit-btn { font-size: 0.78rem; padding: 5px 12px; }
.pd-fisc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0;
  padding: 0;
}
.pd-fisc-kpi {
  padding: 18px 20px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}
.pd-fisc-kpi:last-child { border-right: none; }
.pd-fisc-kpi-label { display: block; font-size: 0.72rem; color: #6b7280; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
.pd-fisc-kpi-val { display: block; font-size: 1rem; font-weight: 700; color: #111827; }
.pd-fisc-pos { color: #374151; }
.pd-fisc-neg { color: #b51818; }
.pd-fisc-regime-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid;
  font-size: 0.75rem;
  font-weight: 600;
}
.pd-fisc-opti {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 20px 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  border: 1px solid;
}
.pd-fisc-opti--positive { background: #ecfdf5; border-color: #e5e7eb; color: #111111; }
.pd-fisc-opti--neutral  { background: #f9fafb; border-color: #e5e7eb; color: #6b7280; }
.pd-fisc-opti-detail { color: #6b7280; font-weight: 400; }
.pd-fisc-detail-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  padding: 16px 20px 8px;
}
.pd-fisc-detail-grid { padding: 0 20px 16px; }
.pd-fisc-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.84rem;
  color: #374151;
  border-bottom: 1px solid #eef0f3;
}
.pd-fisc-detail-row:last-child { border-bottom: none; }
.pd-fisc-detail-sep { border-top: 1px solid #d1d5db; padding-top: 10px; margin-top: 4px; }
.pd-fisc-detail-total { font-weight: 700; color: #111827; font-size: 0.9rem; }
.pd-fisc-compare { margin: 0 20px 16px; border-radius: 8px; overflow: hidden; border: 1px solid #e5e7eb; }
.pd-fisc-compare-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 9px 14px;
  font-size: 0.81rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}
.pd-fisc-compare-head { font-weight: 600; color: #9ca3af; font-size: 0.75rem; text-transform: uppercase; }
.pd-fisc-compare-best { background: #f7f7f8; color: #111111; }
.pd-fisc-compare-row:last-child { border-bottom: none; }
/* Styles détail fiscal structuré */
.pd-fisc-bloc-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  padding: 14px 20px 6px;
  border-top: 1px solid #e5e7eb;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pd-fisc-regime-actuel {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  background: #f3f4f6;
  color: #111111;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  padding: 1px 6px;
}
.pd-fisc-etudier { font-size: 0.7rem; font-weight: 600; text-transform: none; letter-spacing: 0; background: #fffbeb; color: #92400e; border: 1px solid #fcd34d; border-radius: 4px; padding: 1px 6px; }
.pd-fisc-hint {
  font-size: 0.72rem;
  color: #9ca3af;
  font-weight: 400;
}
.pd-fisc-muted { color: #9ca3af !important; }
.pd-fisc-muted-row > span { opacity: 0.6; }
.pd-fisc-na {
  font-size: 0.78rem;
  color: #b91c1c;
  font-style: italic;
}
.pd-fisc-detail-warn { background: #fff7ed; border-radius: 4px; }
.pd-fisc-note {
  margin: 0 20px 10px;
  font-size: 0.78rem;
  color: #4b5563;
  line-height: 1.5;
  padding: 8px 12px;
  background: #f9fafb;
  border-radius: 6px;
  border-left: 3px solid #d1d5db;
}
.pd-fisc-note--warn {
  border-left-color: #c41d15;
  background: #fff5f5;
  color: #9b1c1c;
}
.pd-fisc-notes-section {
  margin: 8px 20px 4px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pd-fisc-note-item {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
}
.pd-fisc-note-item strong { color: #374151; }
.pd-fisc-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 20px 20px;
  padding: 10px 14px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 0.78rem;
  color: #78350f;
  line-height: 1.5;
}
.pd-fisc-disclaimer svg { flex-shrink: 0; margin-top: 1px; color: #b91c1c; }
/* Boutons fiscalité dans la table fiscalité globale */
.fisc-prop-actions { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }
.fisc-action-btn {
  padding: 3px 10px;
  border-radius: 5px;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.73rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.fisc-action-btn:hover { background: #e5e7eb; }
.fisc-action-btn--sec { color: #6b7280; }

/* Responsive */
@media (max-width: 1024px) {
  .pd-body { grid-template-columns: 1fr; }
  .pd-kpi-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .pd-kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .pd-info-grid { grid-template-columns: 1fr; }
}

/* ===========================================
   SIMULATOR OVERLAY (plein écran)
   =========================================== */
/* =========================================
   SIMULATOR OVERLAY - redesigned
   ========================================= */

.sim-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: stretch;
  overflow: hidden;
}

.sim-overlay.is-hidden { display: none; }

.sim-overlay-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #090909;
  overflow: hidden;
}

/* Header */
.sim-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 32px;
  height: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: #111;
  flex-shrink: 0;
}

.sim-overlay-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sim-overlay-brand strong {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
}

.sim-overlay-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 160ms, color 160ms;
}

.sim-overlay-close:hover {
  background: rgba(170,0,0,0.18);
  color: #fff;
}

/* Body */
.sim-overlay-body {
  display: grid;
  grid-template-columns: 480px 1fr;
  flex: 1;
  overflow: hidden;
}

/* ---- LEFT: form ---- */
.sim-overlay-left {
  border-right: 1px solid rgba(255,255,255,0.07);
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* Tab bar */
.sim-tab-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}

.sim-tab-btn {
  padding: 9px 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,0.45);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms;
  white-space: nowrap;
}

.sim-tab-btn.active {
  background: #1e1e1e;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.sim-tab-btn:hover:not(.active) {
  color: rgba(255,255,255,0.75);
}

/* Tab panels */
.sim-tab-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 24px 28px;
  flex: 1;
}

.sim-tab-panel.active {
  display: flex;
}

/* Fields */
.sim-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sim-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
}

.sim-required {
  color: var(--brand);
}

.sim-field input,
.sim-field select {
  min-height: 44px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #111111;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: border-color 150ms;
  width: 100%;
  box-sizing: border-box;
}

.sim-field input:focus,
.sim-field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}

.sim-field small {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

.sim-select-wrap {
  position: relative;
}

.sim-select-wrap::after {
  content: '›';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  color: rgba(255,255,255,0.35);
  pointer-events: none;
  font-size: 1rem;
}

.sim-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* ── Simulateur overlay (#simOverlay) — thème sombre ──────────────────────
   Surcharge les valeurs par défaut (fond blanc / texte noir) uniquement
   dans l'overlay sombre (#090909). N'affecte pas les simulateurs pages
   (.sim-input dans .main) ni aucun autre formulaire de l'app.          */

.sim-overlay .sim-field input,
.sim-overlay .sim-field select {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.sim-overlay .sim-field input::placeholder {
  color: rgba(255, 255, 255, 0.28);
  font-style: normal;
}

/* Champs auto-calculés (notaire, montant emprunté) — placeholder italique
   pour signaler visuellement qu'une valeur peut être pré-remplie          */
.sim-overlay .sim-field input[placeholder="Auto-calculé"]::placeholder,
.sim-overlay .sim-field input[placeholder="Calculé automatiquement"]::placeholder {
  font-style: italic;
  color: rgba(255, 255, 255, 0.38);
}

.sim-overlay .sim-field select option {
  background: #1e1e1e;
  color: #ffffff;
}

.sim-overlay .sim-field input:focus,
.sim-overlay .sim-field select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(181, 24, 24, 0.16);
}

/* Flèches input[type=number] — forcer l'opacité sur fond sombre */
.sim-overlay .sim-field input[type="number"]::-webkit-inner-spin-button,
.sim-overlay .sim-field input[type="number"]::-webkit-outer-spin-button {
  opacity: 0.35;
  cursor: pointer;
}

.sim-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Bottom actions */
.sim-form-actions {
  padding: 20px 28px;
  display: flex;
  gap: 12px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.sim-form-actions .secondary-action {
  flex: 1;
  justify-content: center;
}

.sim-form-actions .primary-action {
  flex: 2;
  justify-content: center;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- RIGHT: results ---- */
.sim-overlay-right {
  overflow-y: auto;
  padding: 28px;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sim-results-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* KPI rows */
.sim-kpi-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sim-kpi-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.sim-kpi-card {
  padding: 18px;
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sim-kpi-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
}

.sim-kpi-big {
  font-size: 1.7rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.sim-kpi-big.negative { color: #ff4b4b; }
.sim-kpi-big.positive { color: #d1d5db; }

.sim-kpi-trend {
  font-size: 0.8rem;
  font-weight: 700;
}

.sim-kpi-trend.positive { color: #d1d5db; }
.sim-kpi-trend.negative { color: #ff4b4b; }

.sim-kpi-desc {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.4;
}

/* Cartes résultats — état vide discret */
.sim-kpi-idle .sim-kpi-card {
  opacity: 0.45;
  transition: opacity .2s;
}
.sim-kpi-idle .sim-kpi-big {
  font-size: 1rem;
  font-weight: 400;
  color: #6b7280;
  letter-spacing: 0;
}

/* Verdict */
.sim-verdict-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}

.verdict-positive { background: rgba(74,222,128,0.07); border-color: rgba(107,107,107,0.10); }
.verdict-neutral  { background: rgba(250,204,21,0.07);  border-color: rgba(107,107,107,0.10); }
.verdict-negative { background: rgba(170,0,0,0.07);     border-color: rgba(170,0,0,0.2); }

.sim-verdict-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 900;
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.verdict-positive .sim-verdict-icon { background: rgba(107,107,107,0.10); color: #d1d5db; }
.verdict-neutral  .sim-verdict-icon { background: rgba(107,107,107,0.10);  color: #c41d15; }
.verdict-negative .sim-verdict-icon { background: rgba(170,0,0,0.2);     color: #ff4b4b; }

.sim-verdict-box strong {
  display: block;
  color: #fff;
  font-size: 0.93rem;
  margin-bottom: 4px;
}

.sim-verdict-box p {
  color: rgba(255,255,255,0.5);
  font-size: 0.83rem;
  line-height: 1.5;
  margin: 0;
}

/* Detail grid */
.sim-detail-grid {
  display: grid;
  gap: 6px;
}

.sim-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
}

.sim-detail-row span {
  color: rgba(255,255,255,0.45);
  font-size: 0.84rem;
}

.sim-detail-row strong {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
}

/* CTA zone */
.sim-cta-zone {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sim-cta-note {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

.sim-save-btn {
  width: 100%;
  justify-content: center;
  min-height: 48px;
}

/* Badge colors */
.badge-green  { background: rgba(74,222,128,0.15); color: #d1d5db; border: 1px solid rgba(74,222,128,0.25); }
.badge-yellow { background: rgba(107,107,107,0.08); color: #555555; border: 1px solid rgba(107,107,107,0.15); }
.badge-red    { background: rgba(170,0,0,0.15);     color: #ff4b4b; border: 1px solid rgba(170,0,0,0.25); }

/* Responsive */
@media (max-width: 1024px) {
  .sim-overlay-body { grid-template-columns: 1fr; overflow-y: auto; }
  .sim-overlay-left { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); max-height: 60vh; }
  .sim-kpi-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .sim-overlay-body { grid-template-columns: 1fr; }
  .sim-kpi-row-2, .sim-kpi-row-3 { grid-template-columns: 1fr; }
  .sim-row { grid-template-columns: 1fr; }
  .sim-teaser-inner { grid-template-columns: 1fr; }
  .sim-preview-body { grid-template-columns: 1fr; }
}

/* =============================================
   PROP CARDS - Mes biens (rentarise style)
   ============================================= */
.prop-card {
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.prop-card:hover {
  border-color: rgba(170,0,0,0.35);
  transform: translateY(-2px);
}
.prop-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 0;
}
.prop-exploit-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.prop-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  color: rgba(170,0,0,0.55);
}
.prop-card-body {
  padding: 0 14px 12px;
  flex: 1;
}
.prop-card-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prop-card-address {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.42);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prop-card-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.28);
  margin-bottom: 10px;
}
.prop-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.prop-card-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.38);
}
.prop-card-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.78);
}
.prop-card-footer {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.prop-detail-btn {
  flex: 1;
  padding: 8px 0;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.prop-detail-btn:hover { opacity: 0.85; }
.prop-edit-btn {
  padding: 8px 12px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.prop-edit-btn:hover { background: rgba(255,255,255,0.11); }

.prop-delete-btn {
  padding: 8px 10px;
  background: rgba(181,24,24,0.08);
  color: rgba(181,24,24,0.6);
  border: 1px solid rgba(181,24,24,0.15);
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.prop-delete-btn:hover {
  background: rgba(181,24,24,0.18);
  color: #b51818;
  border-color: rgba(181,24,24,0.35);
}

/* ── Property card visual zone ── */
.prop-card-visual {
  position: relative;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}
.prop-cover-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.property-map-preview {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #eef0f3;
}
.property-map-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.property-visual-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  gap: 8px;
  color: rgba(170,0,0,0.5);
}
.property-visual-fallback span {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.prop-photo-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.52);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 9px;
  cursor: pointer;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
  z-index: 2;
  transition: background 0.15s;
}
.prop-photo-btn:hover { background: rgba(0,0,0,0.72); }
/* Metrics strip */
.prop-card-metrics {
  display: flex;
  margin-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
}
.prop-card-metric {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 0;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.prop-card-metric:last-child { border-right: none; }
.prop-card-metric-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}
.prop-card-metric-label {
  font-size: 0.63rem;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.prop-card-metric.cf-pos .prop-card-metric-val { color: #d1d5db; }
.prop-card-metric.cf-neg .prop-card-metric-val { color: #ff6b6b; }
/* Form photo preview */
.prop-photo-preview-container { width: 100%; }
.prop-photo-preview-img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.prop-remove-photo-btn {
  display: inline-block;
  margin-top: 8px;
  background: rgba(181,24,24,0.08);
  color: #b51818;
  border: 1px solid rgba(181,24,24,0.18);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.15s;
}
.prop-remove-photo-btn:hover { background: rgba(181,24,24,0.18); }
.form-file-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 8px;
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
  cursor: pointer;
  box-sizing: border-box;
}
.form-file-input::file-selector-button {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 5px;
  padding: 3px 10px;
  margin-right: 10px;
  font-size: 0.78rem;
  cursor: pointer;
}

/* Light theme overrides for prop card footer */
.main .prop-card-footer {
  border-top: 1px solid #f0f0f0;
}
.main .prop-edit-btn {
  background: #f2f3f5;
  color: #555;
  border: 1px solid #e0e0e0;
}
.main .prop-edit-btn:hover { background: #e4e6eb; }
.main .property-visual-fallback { background: #f5f6f8; color: #b80000; }
.main .property-visual-fallback span { color: #aaa; }
.main .property-map-preview { background: #eef0f3; }
.main .prop-card-metrics { border-top: 1px solid #f0f0f0; }
.main .prop-card-metric { border-right: 1px solid #f0f0f0; }
.main .prop-card-metric-val { color: #1a1a1a; }
.main .prop-card-metric-label { color: #bbb; }
.main .prop-card-metric.cf-pos .prop-card-metric-val { color: #374151; }
.main .prop-card-metric.cf-neg .prop-card-metric-val { color: #b51818; }
.main .form-file-input { background: #fafafa; border: 1px dashed #ccc; color: #555; }
.main .form-file-input::file-selector-button { background: #f0f0f0; color: #444; border-color: #ddd; }

/* =============================================
   MODAL TABS - Modifier le bien
   ============================================= */
.modal-tab-bar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f1f3f5;
  border-bottom: none;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 4px;
}
.modal-tab-bar::-webkit-scrollbar { display: none; }
.modal-tab {
  flex: 1;
  padding: 10px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #444;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: center;
  white-space: nowrap;
  min-height: 44px;
}
.modal-tab.active {
  background: var(--brand, #c0120c);
  color: #fff;
  font-weight: 700;
}
.modal-tab:hover:not(.active) { background: #e2e5e9; color: #111; }
.modal-panel { display: none; }
.modal-panel.active { display: block; }

/* pd-analyse classes */
.pd-analyse-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.pd-analyse-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
}
.pd-analyse-value.positive { color: #d1d5db; }
.pd-analyse-value.negative { color: #ff4b4b; }
.pd-work-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}

@media (max-width: 640px) {
  .modal-tab-bar { grid-template-columns: repeat(2, 1fr); }
  .prop-card-footer { flex-direction: column; }
}

/* ===== DASHBOARD DOUGHNUTS ROW ===== */
.db-donut-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}
.db-donut-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.db-donut-head {
  width: 100%;
  font-size: 0.88rem;
  font-weight: 700;
  color: #111;
}
.db-donut-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.db-donut-center {
  position: absolute;
  font-size: 0.78rem;
  font-weight: 800;
  color: #111;
  text-align: center;
  pointer-events: none;
  max-width: 90px;
  line-height: 1.3;
}
.db-donut-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.db-donut-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #555;
}
.db-donut-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.db-donut-legend-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-donut-legend-pct { font-weight: 700; color: #111; }
.db-donut-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 24px 12px; color: #c4c9d4; font-size: 12px; text-align: center;
  width: 100%;
}
.db-donut-empty .ic { color: #d1d5db; }
.db-chart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 32px 20px; color: #c4c9d4; font-size: 12.5px; text-align: center;
}
.db-chart-empty .ic { color: #d1d5db; }

/* ===== DASHBOARD CHARTS ROW ===== */
.db-charts-row {
  display: block;
  margin-top: 28px;
}
.db-chart-card {
  background: #18181f;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 22px 24px 20px;
}
.db-chart-card--full { width: 100%; }
.db-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}
.db-chart-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  letter-spacing: 0.01em;
}
.db-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.73rem;
  color: rgba(255,255,255,0.45);
}
.db-chart-legend span { display: flex; align-items: center; gap: 5px; }
.db-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.db-legend-brand   { background: var(--brand); }
.db-legend-info    { background: var(--info); }
.db-legend-success { background: var(--success); }
.db-chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
}

/* ===== DASHBOARD BOTTOM ROW ===== */
.db-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
}
.db-bottom-row--single {
  grid-template-columns: 1fr;
}

/* --- Fiscal card --- */
.db-fiscal-card {
  background: #18181f;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 18px 20px;
}
.db-fiscal-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.fisc-tmi-wrap {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}
.fisc-tmi-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: rgba(255,255,255,0.75);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 28px 4px 10px;
  cursor: pointer;
  appearance: auto;
}
/* KPI row */
.fisc-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.fisc-kpi-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 12px 14px;
}
.fisc-kpi-card.fisc-kpi-red  { border-left: 3px solid rgba(181,24,24,0.5); }
.fisc-kpi-card.fisc-kpi-green { border-color: rgba(107,107,107,0.10); }
.fisc-kpi-label {
  display: block;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
}
.fisc-kpi-val {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.fisc-neg { color: #ff5555; }
.fisc-pos { color: #d1d5db; }
/* Section title */
.fisc-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  margin: 0 0 10px;
}
/* Modes d'exploitation */
.fisc-modes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.fisc-mode-item {
  flex: 1;
  min-width: 180px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 12px 14px;
}
.fisc-mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.fisc-mode-name { font-size: 0.8rem; font-weight: 700; color: rgba(255,255,255,0.85); }
.fisc-mode-badge {
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 2px 9px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
}
.fisc-mode-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}
.fisc-mode-row span:last-child { font-weight: 600; color: rgba(255,255,255,0.75); }
/* Detail table */
.fisc-table {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}
.fisc-thead {
  display: grid;
  grid-template-columns: 2fr 1.6fr 0.7fr 1fr 1fr 1fr 0.9fr;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.fisc-th {
  padding: 8px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.35);
}
.fisc-right { text-align: right; justify-content: flex-end; }
.fisc-row {
  display: grid;
  grid-template-columns: 2fr 1.6fr 0.7fr 1fr 1fr 1fr 0.9fr;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.fisc-row:last-child { border-bottom: none; }
.fisc-cell {
  padding: 10px 12px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
}
.fisc-cell-name { flex-direction: column; align-items: flex-start; gap: 2px; font-weight: 600; color: rgba(255,255,255,0.85); }
.fisc-city { font-size: 0.7rem; color: rgba(255,255,255,0.35); font-weight: 400; }
.fisc-regime-badge {
  background: rgba(192,18,12,0.10);
  border: 1px solid rgba(192,18,12,0.20);
  color: #f87171;
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 600;
}
.fisc-disclaimer {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
}

/* --- Alertes card --- */
.db-alertes-card {
  background: #18181f;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.db-alertes-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.db-alert-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 12px 8px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  position: relative;
  top: 1px;
}
.db-alert-tab:hover { color: rgba(255,255,255,0.7); }
.db-alert-tab.active {
  color: #fff;
  border-bottom-color: var(--brand);
}
.db-alert-badge {
  background: var(--brand);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}
.db-alert-badge:empty { display: none; }
.db-alert-panel { display: none; flex: 1; overflow-y: auto; }
.db-alert-panel.active { display: block; }
.db-alert-list { padding: 8px 12px; }

.db-alert-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.db-alert-item:last-child { border-bottom: none; }
.db-alert-info { flex: 1; min-width: 0; }
.db-alert-bien {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-alert-desc {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.38);
  margin-top: 2px;
}
.db-alert-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex-shrink: 0;
}
.db-alert-chip {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.db-alert-chip.green { background: rgba(74,222,128,0.15); color: #d1d5db; }
.db-alert-chip.orange { background: rgba(251,146,60,0.15); color: #fb923c; }
.db-alert-chip.red { background: rgba(239,68,68,0.15); color: #f87171; }
.db-alert-apply {
  background: rgba(170,0,0,0.18);
  border: 1px solid rgba(170,0,0,0.35);
  color: #ff5555;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.db-alert-apply:hover { background: rgba(170,0,0,0.35); }

/* Score locataire badge */
.tenant-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
  white-space: nowrap;
}
.tenant-score-badge.score-green { background: rgba(74,222,128,0.15); color: #d1d5db; }
.tenant-score-badge.score-orange { background: rgba(251,146,60,0.15); color: #fb923c; }
.tenant-score-badge.score-red { background: rgba(239,68,68,0.15); color: #f87171; }

/* =====================================================
   LIGHT THEME - Zone de contenu principale (.main)
   Sidebar reste sombre, tout le centre devient blanc
   ===================================================== */

.main {
  background: #f0f1f5;
  color: #111;
}

/* Topbar */
.main .topbar {
  background: transparent;
}

/* Headings & text in content area */
.main h2,
.main h3,
.main p,
.main .eyebrow {
  color: #111;
}

.main .eyebrow {
  color: var(--brand);
  font-weight: 800;
}

/* Section heading */
.main .section-heading h2,
.main .panel-heading h2 {
  color: #0d0d0d;
}

/* ── Dashboard header ── */
.main .db-header h2 {
  color: #0d0d0d;
}
.main .db-header-sub {
  color: #777;
}

/* ── Metrics strip ── */
.main .db-metrics-strip {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.main .db-metric-sep {
  background: #e4e6eb;
}
.main .db-metric-label {
  color: #888;
}
.main .db-metric-val {
  color: #0d0d0d;
}
.main .db-metric-val.positive { color: #374151; }
.main .db-metric-val.negative { color: #b51818; }

/* ── KPI cards ── */
.main .db-kpi-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.main .db-kpi-card:hover {
  border-color: #ccc;
}
.main .db-kpi-label {
  color: #888;
}
.main .db-kpi-value {
  color: #0d0d0d;
}
.main .db-kpi-hint {
  color: #aaa;
}

/* ── Main panels ── */
.main .db-panel {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.main .db-panel-head {
  border-bottom: 1px solid #f0f0f0;
}
.main .db-panel-head h3 {
  color: #0d0d0d;
}
.main .db-panel-sub {
  color: #888;
}
.main .db-details-btn {
  color: #888;
}
.main .db-details-btn:hover {
  color: #111;
}

/* Progress rows */
.main .db-loyer-row {
  color: #555;
}
.main .db-loyer-rate {
  color: #374151;
}
.main .db-progress-track {
  background: #eee;
}
.main .db-progress-secondary {
  background: rgba(0,0,0,0.12);
}
.main .db-loyer-amounts {
  color: #777;
  border-bottom: 1px solid #f0f0f0;
}
.main .db-loyer-amounts strong {
  color: #111;
}
.main .db-cumul-label { color: #999; }
.main .db-cumul-value { color: #444; }
.main .db-forecast-row { border-top: 1px solid #f0f0f0; }
.main .db-forecast-label { color: #bbb; }
.main .db-forecast-value { color: #888; }
.main .db-bar-section {
  border-top: 1px solid #f0f0f0;
}
.main .db-bar-row strong { color: #333; }
.main .db-bar-row span   { color: #999; }
.main .db-bar-track {
  background: #eee;
}
.main .db-bar-fill.pending { background: #e0e0e0; }
.main .db-bar-fill.vacant  { background: #ddd; }

/* Right panel tabs */
.main .db-right-tabs {
  background: #f7f7f9;
  border-bottom: 1px solid #eee;
}
.main .db-rtab {
  color: #888;
}
.main .db-rtab.active {
  background: #fff;
  color: #0d0d0d;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.main .db-rtab:hover:not(.active) { color: #333; }

/* Task items */
.main #priorityTasks .task-item,
.main #dbTravauxList .task-item {
  background: #f7f7f9;
  border: 1px solid #eee;
  color: #111;
}
.main #priorityTasks .task-item strong,
.main #dbTravauxList .task-item strong { color: #111; }
.main #priorityTasks .task-item .muted,
.main #dbTravauxList .task-item .muted { color: #888; }

.main .db-empty {
  color: #bbb;
}

/* ── Mes biens section ── */
.main .db-biens-section {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.main .db-biens-head {
  border-bottom: 1px solid #f0f0f0;
}
.main .db-biens-head h3 {
  color: #0d0d0d;
}
.main .db-biens-thead {
  background: #f8f9fb;
  border-bottom: 1px solid #e8eaef;
}
.main .db-biens-th {
  color: #999;
}
.main .db-bien-row > *,
.main .db-bien-card-hd > * {
  border-bottom: 1px solid #f3f3f3;
}
.main .db-bien-name {
  color: #0d0d0d;
}
.main .db-bien-city {
  color: #aaa;
}
.main .db-bien-cell {
  color: #888;
}
.main .db-bien-val {
  color: #111;
}
.main .db-bien-val.positive { color: #374151; }
.main .db-bien-val.negative { color: #b51818; }
.main .db-biens-empty {
  color: #ccc;
}

/* ── Charts ── */
.main .db-chart-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.main .db-chart-title { color: #111; }
.main .db-chart-legend { color: #888; }

/* ── Fiscalité ── */
.main .db-fiscal-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.main .db-fiscal-head { color: #111; }
.main .fisc-tmi-wrap { color: #888; }
.main .fisc-tmi-select {
  background: #f5f5f7;
  border: 1px solid #ddd;
  color: #333;
}
.main .fisc-kpi-card {
  background: #f7f8fb;
  border: 1px solid #eaecf0;
}
.main .fisc-kpi-card.fisc-kpi-red  { border-left: 3px solid rgba(181,24,24,0.45); }
.main .fisc-kpi-card.fisc-kpi-green { border-color: rgba(107,107,107,0.10); }
.main .fisc-kpi-label { color: #888; }
.main .fisc-kpi-val { color: #111; }
.main .fisc-neg { color: #b51818; }
.main .fisc-pos { color: #374151; }
.main .fisc-section-title { color: #888; }
.main .fisc-mode-item { background: #f7f8fb; border: 1px solid #eaecf0; }
.main .fisc-mode-name { color: #111; }
.main .fisc-mode-badge { background: #eee; color: #666; }
.main .fisc-mode-row { color: #888; }
.main .fisc-mode-row span:last-child { color: #333; }
.main .fisc-table { border: 1px solid #e8eaef; }
.main .fisc-thead { background: #f8f9fb; border-bottom: 1px solid #e8eaef; }
.main .fisc-th { color: #999; }
.main .fisc-row { border-bottom: 1px solid #f3f3f5; }
.main .fisc-cell { color: #555; }
.main .fisc-cell-name { color: #111; }
.main .fisc-city { color: #aaa; }
.main .fisc-regime-badge { background: rgba(107,107,107,0.08); border-color: rgba(107,107,107,0.20); color: #c0120c; }
.main .fisc-disclaimer { color: #aaa; }

/* ── Alertes ── */
.main .db-alertes-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.main .db-alertes-tabs {
  border-bottom: 1px solid #eee;
  background: #f7f7f9;
}
.main .db-alert-tab {
  color: #888;
  border-bottom: 2px solid transparent;
}
.main .db-alert-tab.active {
  color: #0d0d0d;
  border-bottom-color: var(--brand);
}
.main .db-alert-tab:hover { color: #333; }
.main .db-alert-item {
  border-bottom: 1px solid #f3f3f3;
}
.main .db-alert-bien {
  color: #111;
}
.main .db-alert-desc {
  color: #888;
}
.main .db-alert-apply {
  background: rgba(220,0,0,0.07);
  border: 1px solid rgba(220,0,0,0.2);
  color: #cc0000;
}
.main .db-alert-apply:hover {
  background: rgba(220,0,0,0.15);
}

/* Score badges dans alertes - adaptés light */
.main .tenant-score-badge.score-green { background: rgba(22,163,74,0.1); color: #374151; }
.main .tenant-score-badge.score-orange { background: rgba(234,88,12,0.1); color: #c41d15; }
.main .tenant-score-badge.score-red { background: rgba(181,24,24,0.1); color: #b51818; }

/* ── Property cards (light) ── */
.main .prop-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.main .prop-card:hover {
  border-color: #ccc;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.main .prop-card-name { color: #0d0d0d; }
.main .prop-card-address,
.main .prop-card-sub { color: #888; }
.main .prop-card-row { color: #555; }
.main .prop-card-footer {
  border-top: 1px solid #f0f0f0;
}

/* ── Panels généraux (tenants, payments, etc.) ── */
.main .kpi,
.main .panel,
.main .property-card,
.main .table-panel,
.main .payment-card,
.main .ticket-column,
.main .document-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.main .task-item {
  background: #f7f7f9;
  border: 1px solid #eee;
}

/* Buttons in content area */
.main .secondary-action,
.main .ghost-action {
  background: #fff;
  border-color: #ddd;
  color: #111;
}
.main .ghost-action {
  background: transparent;
}
.main .mini-button {
  background: #f0f1f5;
  border: 1px solid #ddd;
  color: #333;
}
.main .mini-button:hover {
  background: #e4e6eb;
}

/* Toolbar select */
.main .toolbar-actions select {
  background: #fff;
  border-color: #ddd;
  color: #111;
}

/* =====================================================
   LIGHT THEME - Détail du bien (property-detail)
   ===================================================== */

.main .pd-header {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.main .pd-header h2 { color: #0d0d0d; }
.main .pd-address { color: #888; }

.main .pd-status-badge {
  background: rgba(22,163,74,0.1);
  color: #374151;
  border-color: rgba(22,163,74,0.2);
}
.main .pd-status-badge.vacant {
  background: rgba(202,138,4,0.1);
  color: #9b1c1c;
  border-color: rgba(202,138,4,0.2);
}

.main .pd-kpi {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.main .pd-kpi-label { color: #888; }
.main .pd-kpi-value { color: #0d0d0d; }
.main .pd-kpi-value.positive { color: #374151; }
.main .pd-kpi-value.negative { color: #b51818; }

.main .pd-left,
.main .pd-right {
  background: #fff;
  border: 1px solid #e4e6eb;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.main .pd-tab-bar {
  background: #f7f7f9;
  border-bottom: 1px solid #eee;
}
.main .pd-tab {
  color: #888;
}
.main .pd-tab.active {
  background: #fff;
  color: #111;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.main .pd-tab:hover:not(.active) { color: #333; }

.main .pd-info-label {
  color: #999;
}
.main .pd-info-value {
  color: #111;
}

.main .pd-analyse-row {
  border-bottom: 1px solid #f0f0f0;
}
.main .pd-analyse-row span {
  color: #666;
}
.main .pd-analyse-row strong {
  color: #111;
}
.main .pd-analyse-row strong.positive { color: #374151; }
.main .pd-analyse-row strong.negative { color: #b51818; }

.main .pd-travaux-header {
  border-bottom: 1px solid #f0f0f0;
}
.main .pd-travaux-count { color: #aaa; }

.main .pd-work-item {
  background: #f7f7f9;
  border: 1px solid #eee;
}
.main .pd-work-title { color: #111; }
.main .pd-work-meta  { color: #999; }

/* Breadcrumb */
.main .pd-breadcrumb { color: #888; }
.main .pd-back { color: #555; }
.main .pd-back:hover { color: #111; }
.main .pd-breadcrumb-sep { color: #ccc; }

/* =====================================================
   PAGE PATRIMOINE GLOBAL
   ===================================================== */

/* KPI row */
.pat-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.pat-kpi-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.pat-kpi-card.pat-kpi-primary {
  border-left: 4px solid var(--brand);
}
.pat-kpi-card.pat-kpi-accent {
  background: linear-gradient(135deg, #fff 60%, rgba(170,0,0,0.04));
  border-left: 4px solid var(--brand);
}
.pat-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pat-kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0d0d0d;
  line-height: 1.1;
}
.pat-kpi-sub {
  font-size: 0.72rem;
  color: #aaa;
}
.pat-pos { color: #374151 !important; }
.pat-neg { color: #b51818 !important; }

/* Grille centrale : donut | résumé (remplace pat-charts-row) */
.pat-central-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
  align-items: stretch;
}

/* Panneau résumé (colonne droite) */
.pat-summary-panel {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}
.pat-summary-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #333;
  letter-spacing: 0.01em;
}
.pat-summary-header svg { color: #888; flex-shrink: 0; }

/* Grille 2×2 de stats */
.pat-sum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pat-sum-stat {
  background: #f9fafb;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pat-sum-stat-wide { grid-column: 1 / -1; }
.pat-sum-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pat-sum-label svg { flex-shrink: 0; color: #bbb; }
.pat-sum-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0d0d0d;
  line-height: 1.1;
}
.pat-sum-sub {
  font-size: 0.70rem;
  color: #aaa;
}

/* Bloc LTV dans le panneau résumé */
.pat-sum-ltv {
  background: #f9fafb;
  border: 1px solid #f0f0f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Carte projection (pleine largeur) - override pat-chart-card flex centering */
.pat-projection-card {
  margin-bottom: 24px;
}
.pat-chart-card.pat-projection-card {
  align-items: stretch;
  align-self: auto;
  justify-content: flex-start;
}
#patProjectionChartWrap {
  width: 100%;
}
.pat-chart-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 14px;
  padding: 18px 20px 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.pat-chart-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
  flex-wrap: wrap;
}
.pat-doughnut-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}
.pat-doughnut-center {
  position: absolute;
  font-size: 0.85rem;
  font-weight: 800;
  color: #0d0d0d;
  text-align: center;
  pointer-events: none;
  max-width: 100px;
  line-height: 1.2;
}
.pat-legend { display: grid; gap: 7px; width: 100%; }
.pat-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
}
.pat-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pat-legend-label { flex: 1; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pat-legend-val { font-weight: 700; color: #111; }

/* Tableau des biens */
.pat-table-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}
.pat-table-head {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.pat-table-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0d0d0d;
  margin: 0;
}
.pat-table-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 0.8fr 1fr;
  padding: 8px 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #bbb;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}
.pat-table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 0.8fr 1fr;
  border-bottom: 1px solid #f5f5f5;
}
.pat-table-row:last-child { border-bottom: none; }
.pat-table-row:hover { background: #fafbff; }
.pat-table-cell {
  padding: 13px 20px;
  font-size: 0.82rem;
  color: #555;
  display: flex;
  align-items: center;
}
.pat-table-cell strong { color: #0d0d0d; font-weight: 700; }
.pat-cell-name { gap: 10px; }
.pat-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pat-bien-name { font-weight: 600; color: #111; font-size: 0.82rem; }
.pat-bien-city { font-size: 0.72rem; color: #aaa; }

/* ── Suivi des crédits ── */
#patCreditsSection { margin-bottom: 36px; }

.cred-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 16px;
}
.cred-section-badge {
  background: rgba(181,24,24,0.1);
  color: #b51818;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 4px;
}
.cred-summary-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.cred-summary-card {
  background: #fff;
  border: 1px solid #e8eaef;
  border-radius: 10px;
  padding: 14px 16px;
}
.cred-summary-label {
  display: block;
  font-size: 0.72rem;
  color: #888;
  margin-bottom: 6px;
}
.cred-summary-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111;
}
.cred-pos { color: #374151; }
.cred-neg { color: #b51818; }

.cred-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}
.cred-cards-col { display: flex; flex-direction: column; gap: 12px; }
.cred-card {
  background: #fff;
  border: 1px solid #e8eaef;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cred-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cred-card-name { display: flex; align-items: center; gap: 10px; }
.cred-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.cred-prop-name { font-size: 0.85rem; font-weight: 700; color: #111; }
.cred-prop-city { font-size: 0.72rem; color: #aaa; margin-top: 2px; }
.cred-bank-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f0f4ff;
  border: 1px solid #dce4ff;
  color: #c0120c;
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.cred-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px 6px;
  margin-bottom: 14px;
}
.cred-info-item { display: flex; flex-direction: column; gap: 2px; }
.cred-info-label { font-size: 0.68rem; color: #aaa; }
.cred-info-val { font-size: 0.82rem; font-weight: 600; color: #222; }
.cred-progress-wrap { margin-top: auto; padding-top: 14px; }
.cred-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #aaa;
  margin-bottom: 5px;
}
.cred-progress-track {
  height: 7px;
  background: rgba(0,0,0,0.07);
  border-radius: 10px;
  overflow: hidden;
}
.cred-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
}

.cred-charts-col { display: flex; flex-direction: column; gap: 16px; }
.cred-chart-card {
  background: #fff;
  border: 1px solid #e8eaef;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cred-chart-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #555;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cred-chart-wrap { position: relative; width: 100%; flex: 1; min-height: 200px; }

.cred-bank-list { display: flex; flex-direction: column; gap: 14px; }
.cred-bank-row { }
.cred-bank-info { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cred-bank-name { font-size: 0.82rem; font-weight: 600; color: #222; }
.cred-bank-sub { font-size: 0.7rem; color: #aaa; }
.cred-bank-bar-wrap { display: flex; align-items: center; gap: 10px; }
.cred-bank-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(0,0,0,0.07);
  border-radius: 10px;
  overflow: hidden;
}
.cred-bank-bar-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s ease;
}
.cred-bank-pct { font-size: 0.72rem; font-weight: 700; color: #555; min-width: 32px; text-align: right; }

/* Indicateurs avancés */
.pat-indicators-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.pat-indicator-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pat-indicator-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pat-indicator-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0d0d0d;
  line-height: 1;
}
.pat-indicator-sub {
  font-size: 0.7rem;
  color: #aaa;
}
/* LTV bar */
.pat-ltv-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pat-ltv-bar-track {
  flex: 1;
  height: 8px;
  background: #eee;
  border-radius: 99px;
  overflow: hidden;
}
.pat-ltv-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 600ms ease;
}
.pat-ltv-pct {
  font-size: 1rem;
  font-weight: 800;
  color: #0d0d0d;
  white-space: nowrap;
}
.pat-ltv-legend {
  display: flex;
  gap: 8px;
  font-size: 0.65rem;
  flex-wrap: wrap;
}
.pat-ltv-ok     { color: #374151; font-weight: 600; }
.pat-ltv-warn   { color: #b91c1c; font-weight: 600; }
.pat-ltv-danger { color: #b51818; font-weight: 600; }

.pat-ltv-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.pat-ltv-label-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pat-ltv-info-btn {
  position: relative;
  background: none;
  border: none;
  padding: 2px;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 150ms, background 150ms;
  flex-shrink: 0;
}
.pat-ltv-info-btn:hover {
  color: var(--ink);
  background: rgba(0,0,0,0.05);
}
.pat-ltv-info-btn:hover .pat-ltv-tooltip,
.pat-ltv-info-btn:focus .pat-ltv-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.pat-ltv-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  right: -6px;
  width: 240px;
  background: #1a1a1a;
  color: #f0f0f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.76rem;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 150ms, transform 150ms;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
}
.pat-ltv-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 10px;
  border: 6px solid transparent;
  border-top-color: #1a1a1a;
}

.pat-ltv-details {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pat-ltv-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.pat-ltv-detail-label {
  font-size: 0.75rem;
  color: var(--muted);
}
.pat-ltv-detail-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.pat-ltv-detail-red   { color: #b51818; }
.pat-ltv-detail-green { color: #374151; }

@media (max-width: 1100px) {
  .pat-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .pat-central-grid { grid-template-columns: 1fr; }
  .pat-sum-grid { grid-template-columns: repeat(2, 1fr); }
  .pat-table-header,
  .pat-table-row { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
  .pat-table-header span:nth-child(n+6),
  .pat-table-row .pat-table-cell:nth-child(n+6) { display: none; }
}
@media (max-width: 640px) {
  .pat-kpi-row { grid-template-columns: 1fr 1fr; }
  .pat-sum-grid { grid-template-columns: 1fr; }
  .pat-sum-stat-wide { grid-column: 1; }
  .pat-table-header,
  .pat-table-row { grid-template-columns: 2fr 1fr 1fr; }
  .pat-table-header span:nth-child(n+4),
  .pat-table-row .pat-table-cell:nth-child(n+4) { display: none; }
}

/* ══════════════════════════════════════════════
   ESTIMATION D'UN BIEN
══════════════════════════════════════════════ */

.estim-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  margin-bottom: 32px;
  align-items: start;
}

.estim-form-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 20px;
}
.estim-form-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 18px;
}
.estim-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.estim-field { display: flex; flex-direction: column; gap: 5px; }
.estim-field.full { grid-column: 1 / -1; }
.estim-field label { font-size: 0.74rem; color: var(--muted); font-weight: 500; }
.estim-field input, .estim-field select {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.85rem;
  color: var(--ink);
  background: #fafafa;
  transition: border-color 150ms;
}
.estim-field input:focus, .estim-field select:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
}
.estim-btn { width: 100%; justify-content: center; }

/* Résultats */
.estim-results { min-height: 200px; }

.estim-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 260px;
  background: #fff;
  border: 1.5px dashed #e0e0e0;
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.estim-hero-card {
  background: #111;
  border-radius: 16px;
  padding: 28px 28px 24px;
  margin-bottom: 16px;
}
.estim-hero-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(255,255,255,0.4); margin-bottom: 8px; }
.estim-hero-val   { font-size: 2.6rem; font-weight: 800; color: #fff; line-height: 1.05; }
.estim-hero-sub   { font-size: 0.82rem; color: rgba(255,255,255,0.35); margin-top: 6px; margin-bottom: 18px; }

.estim-range-bar-wrap { }
.estim-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 6px;
}
.estim-range-track {
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  position: relative;
}
.estim-range-fill {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, rgba(224,32,32,0.5), rgba(107,107,107,0.4));
  border-radius: 99px;
}
.estim-range-needle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.estim-range-hint { font-size: 0.68rem; color: rgba(255,255,255,0.25); margin-top: 8px; text-align: center; }

.estim-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.estim-kpi {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px 18px;
}
.estim-kpi-mid {
  background: #111;
  border-color: transparent;
}
.estim-kpi-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 4px; }
.estim-kpi-mid .estim-kpi-label { color: rgba(255,255,255,0.4); }
.estim-kpi-val   { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.estim-kpi-mid .estim-kpi-val { color: #fff; }
.estim-kpi-sub   { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

.estim-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.estim-detail-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 16px 18px;
}
.estim-detail-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 4px; }
.estim-detail-val   { font-size: 1.1rem; font-weight: 700; color: var(--ink); }
.estim-detail-sub   { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }

.estim-coefs-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 18px 20px;
}
.estim-coefs-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 12px;
}
.estim-coefs-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.estim-coef-item {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.78rem;
}
.estim-coef-item span:first-child { color: var(--muted); }
.estim-coef-item span:last-child  { font-weight: 700; }

.estim-market-section { margin-top: 8px; }
.estim-market-grid    { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

/* Light theme overrides */
.main .estim-form-card,
.main .estim-kpi,
.main .estim-detail-card,
.main .estim-coefs-card { background: #fff; border-color: #e4e6eb; }
.main .estim-kpi-mid    { background: #111; }
.main .estim-hero-card  { background: #111; }
.main .estim-field input,
.main .estim-field select { background: #f8f8f8; border-color: #dde1ea; }

@media (max-width: 1000px) {
  .estim-layout       { grid-template-columns: 1fr; }
  .estim-form-card    { position: static; }
  .estim-kpi-row      { grid-template-columns: repeat(3, 1fr); }
  .estim-detail-grid  { grid-template-columns: 1fr 1fr; }
  .estim-market-grid  { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════
   REVENTE & ESTIMATION
══════════════════════════════════════════════ */

.rev-badge-simulé {
  display: inline-flex;
  align-items: center;
  background: rgba(224,32,32,0.1);
  color: var(--brand);
  border: 1px solid rgba(224,32,32,0.2);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 4px 12px;
}

.rev-property-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #111;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 28px;
}
.rev-prop-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(224,32,32,0.15);
  color: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.rev-prop-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.rev-prop-meta {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  margin-top: 3px;
}

/* Section wrapper */
.rev-section { margin-bottom: 32px; }

.rev-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.rev-section-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rev-dot-blue   { background: #555555; }
.rev-dot-purple { background: #c0120c; }
.rev-dot-red    { background: var(--brand); }
.rev-dot-green  { background: #9ca3af; }
.rev-dot-gold   { background: #c41d15; }

.rev-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

/* ── Section 1: KPI grid ── */
.rev-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.rev-kpi-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 20px 22px;
  transition: border-color 150ms, transform 150ms;
}
.rev-kpi-card:hover {
  border-color: #d0d0d0;
  transform: translateY(-1px);
}
.rev-kpi-featured {
  background: #111;
  border-color: rgba(255,255,255,0.08);
}
.rev-kpi-pos { background: rgba(34,197,94,0.05); border-color: rgba(34,197,94,0.2); }
.rev-kpi-neg { background: rgba(224,32,32,0.05); border-color: rgba(224,32,32,0.2); }

.rev-kpi-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 6px;
}
.rev-kpi-featured .rev-kpi-label { color: rgba(255,255,255,0.45); }
.rev-kpi-val {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}
.rev-val-white { color: #fff; }
.rev-kpi-sub  { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.rev-sub-muted { color: rgba(255,255,255,0.35); }

/* ── Section 2: Marché ── */
.rev-market-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.rev-market-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.rev-market-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.rev-icon-purple { background: rgba(139,92,246,0.12); color: #c0120c; }
.rev-icon-blue   { background: rgba(107,114,128,0.12); color: #555555; }
.rev-icon-green  { background: rgba(34,197,94,0.12);  color: #9ca3af; }
.rev-icon-orange { background: rgba(249,115,22,0.12); color: #c0120c; }
.rev-icon-red    { background: rgba(224,32,32,0.12);  color: var(--brand); }
.rev-icon-yellow { background: rgba(107,107,107,0.08); color: #555555; }

.rev-market-label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.rev-market-val   { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-top: 2px; }
.rev-market-sub   { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.rev-market-stars { font-size: 0.85rem; color: #c41d15; margin-top: 2px; letter-spacing: 1px; }

/* ── Section 3: Crédit ── */
.rev-credit-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 24px;
}
.rev-credit-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.rev-credit-stat { padding: 0 20px; border-right: 1px solid #f0f0f0; }
.rev-credit-stat:first-child { padding-left: 0; }
.rev-credit-stat:last-child  { border-right: none; }
.rev-credit-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 6px; }
.rev-credit-stat-val   { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.rev-credit-stat-sub   { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }

.rev-progress-wrap { }
.rev-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.rev-progress-labels strong { color: var(--ink); }
.rev-progress-bar {
  height: 10px;
  background: #f0f0f0;
  border-radius: 99px;
  overflow: hidden;
}
.rev-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #9ca3af, #374151);
  border-radius: 99px;
  transition: width 600ms ease;
}

/* ── Section 4: Plus-value ── */
.rev-pv-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 24px;
}
.rev-pv-table { display: flex; flex-direction: column; gap: 0; }
.rev-pv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid #f5f5f5;
  gap: 16px;
}
.rev-pv-row:last-child { border-bottom: none; }
.rev-pv-label { font-size: 0.875rem; color: var(--ink); flex: 1; }
.rev-pv-val   { font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.rev-pv-hint  { font-size: 0.72rem; color: var(--muted); font-weight: 400; }
.rev-pv-deduct .rev-pv-label { color: var(--muted); }
.rev-pv-total { border-top: 2px solid #e8e8e8; border-bottom: none; padding-top: 14px; margin-top: 4px; }
.rev-pv-net   { background: #f9f9f9; border-radius: 10px; padding: 14px 12px; margin-top: 4px; }
.rev-pv-disclaimer {
  margin-top: 16px;
  font-size: 0.72rem;
  color: var(--muted);
  background: #f9f9f9;
  border-radius: 8px;
  padding: 10px 14px;
  border-left: 3px solid #e8e8e8;
}

/* ── Section 5: Récupérable ── */
.rev-net-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.rev-net-hero {
  background: #111;
  border-radius: 16px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.rev-net-hero-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.4); margin-bottom: 10px; }
.rev-net-hero-val   { font-size: 2.4rem; font-weight: 800; color: #9ca3af; line-height: 1; }
.rev-net-hero-sub   { font-size: 0.78rem; color: rgba(255,255,255,0.3); margin-top: 10px; }

.rev-net-breakdown {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rev-net-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.rev-net-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rev-net-label { flex: 1; font-size: 0.83rem; color: var(--ink); }
.rev-net-val   { font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.rev-net-divider { height: 1px; background: #f0f0f0; margin: 6px 0; }
.rev-net-total  { margin-top: 2px; }
.rev-net-total .rev-net-label { font-weight: 700; }
.rev-net-total .rev-net-val   { font-size: 1rem; }

.rev-chart-wrap {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 20px 24px;
}

/* Colors */
.rev-green { color: #374151; }
.rev-red   { color: #b51818; }
.rev-muted { color: var(--muted); }

/* ── Bloc fiscalité plus-value ── */
.rev-fisc-block {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 24px;
}
.rev-fisc-table { display: flex; flex-direction: column; gap: 0; }
.rev-fisc-section-head {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: #9ca3af;
  padding: 14px 0 4px;
}
.rev-fisc-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid #f5f5f5; gap: 16px;
}
.rev-fisc-row:last-child { border-bottom: none; }
.rev-fisc-row--detail { padding: 5px 0 5px 12px; border-bottom: none; }
.rev-fisc-label { font-size: 0.875rem; color: var(--ink); flex: 1; }
.rev-fisc-val   { font-size: 0.9rem; font-weight: 600; white-space: nowrap; }
.rev-fisc-sub   { font-size: 0.8rem !important; font-weight: 400 !important; color: var(--muted) !important; }
.rev-fisc-total {
  border-top: 2px solid #e8e8e8; border-bottom: none;
  padding-top: 14px; margin-top: 4px;
}
.rev-fisc-disclaimer {
  margin-top: 16px; font-size: 0.72rem; color: var(--muted);
  background: #f9f9f9; border-radius: 8px;
  padding: 10px 14px; border-left: 3px solid #e8e8e8;
}
.rev-fisc-warning {
  display: flex; align-items: flex-start; gap: 8px;
  background: #fffbf0; border: 1px solid #fde68a; border-radius: 8px;
  padding: 12px 14px; font-size: 0.82rem; color: #92400e; margin-bottom: 16px;
}
.rev-fisc-warning svg { flex-shrink: 0; margin-top: 1px; stroke: #d97706; }
.rev-fisc-exempt {
  display: flex; align-items: center; gap: 8px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
  padding: 12px 14px; font-size: 0.87rem; font-weight: 600;
  color: #15803d; margin-bottom: 12px;
}
.rev-fisc-exempt svg { flex-shrink: 0; stroke: #15803d; }

/* Light theme overrides (inside .main) */
.main .rev-property-header { background: #fff; border-color: #e4e6eb; }
.main .rev-prop-name        { color: var(--ink); }
.main .rev-kpi-featured     { background: #f2f4f8; border-color: #dde1ea; }
.main .rev-val-white        { color: var(--ink); }
.main .rev-sub-muted        { color: var(--muted); }
.main .rev-kpi-featured .rev-kpi-label { color: var(--muted); }
.main .rev-net-hero         { background: #111; }
.main .rev-market-card,
.main .rev-credit-card,
.main .rev-pv-card,
.main .rev-net-breakdown,
.main .rev-chart-wrap { background: #fff; border-color: #e4e6eb; }

@media (max-width: 900px) {
  .rev-kpi-grid    { grid-template-columns: repeat(2, 1fr); }
  .rev-market-grid { grid-template-columns: repeat(2, 1fr); }
  .rev-credit-stats { grid-template-columns: repeat(2, 1fr); }
  .rev-net-grid    { grid-template-columns: 1fr; }
}

/* ===== PLACEHOLDER PAGES ===== */
.placeholder-page {
  padding: 40px 32px;
  max-width: 900px;
}
.placeholder-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 40px;
}
.placeholder-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.main .placeholder-icon {
  background: #f2f4f8;
  border-color: #dde1ea;
  color: var(--accent);
}
.placeholder-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.placeholder-h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.placeholder-desc {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  max-width: 520px;
  line-height: 1.5;
}
.placeholder-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
}
.placeholder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.placeholder-card {
  border-radius: 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  height: 160px;
  overflow: hidden;
  position: relative;
}
.main .placeholder-card {
  background: #fff;
  border-color: #e4e6eb;
}
.placeholder-card-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
.main .placeholder-card-shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.03) 50%, transparent 100%);
  background-size: 200% 100%;
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
@media (max-width: 700px) {
  .placeholder-grid { grid-template-columns: 1fr; }
  .placeholder-header { flex-direction: column; }
}

/* ===== PAGE LOCATAIRES ===== */

/* KPI */
.tenants-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.tenant-kpi-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.tenant-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f5f6fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #888;
}
.tenant-kpi-body { flex: 1; min-width: 0; }
.tenant-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 4px;
}
.tenant-kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}
.tenant-kpi-value.tkv-ok   { color: #374151; }
.tenant-kpi-value.tkv-warn { color: #c0120c; }
.tenant-kpi-sub {
  font-size: 0.78rem;
  color: #aaa;
  margin-top: 3px;
}

/* Filtres */
.tenant-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-select {
  min-height: 36px;
  padding: 8px 32px 8px 12px;
  border: 1px solid #e0e2e8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.filter-select:focus { border-color: var(--brand); }
.tenant-reset-btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #e0e2e8;
  border-radius: 8px;
  background: #fff;
  color: #666;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.tenant-reset-btn:hover { border-color: var(--brand); color: var(--brand); }

/* Tableau */
.tenant-table-panel {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 14px;
  overflow: hidden;
}
.tenant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.tenant-table thead tr {
  background: #f8f9fc;
  border-bottom: 1px solid #e4e6eb;
}
.tenant-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #888;
  white-space: nowrap;
}
.tenant-table tbody tr {
  border-bottom: 1px solid #f0f1f5;
  transition: background 0.1s;
}
.tenant-table tbody tr:last-child { border-bottom: none; }
.tenant-table tbody tr:hover { background: #fafbff; }
.tenant-table td {
  padding: 14px 16px;
  vertical-align: middle;
  color: var(--ink);
}

/* Cellules */
.tenant-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.3;
}
.tenant-cell-stack strong { font-weight: 600; }
.tenant-retard-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 20px;
  background: #fff0f0;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  width: fit-content;
}
.tenant-date-cell {
  font-size: 0.82rem;
  color: #555;
  white-space: nowrap;
}
.font-xs { font-size: 0.75rem; }

/* Actions */
.tenant-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tenant-action-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e0e2e8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.tenant-action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tenant-delete-btn {
  color: var(--accent);
  border-color: #ffd6d6;
  background: #fff8f8;
}
.tenant-delete-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Empty state */
.tenant-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 56px 32px;
  color: #aaa;
  text-align: center;
}
.tenant-empty-state svg { opacity: 0.35; }
.tenant-empty-state p { font-size: 0.95rem; margin: 0; }

/* section-sub */
.section-sub {
  font-size: 0.875rem;
  color: #999;
  margin-top: 4px;
  margin-bottom: 0;
}

@media (max-width: 1100px) {
  .tenants-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .tenants-kpi-grid { grid-template-columns: 1fr; }
  .tenant-table { font-size: 0.8rem; }
  .tenant-table th, .tenant-table td { padding: 10px 10px; }
  .tenant-actions { flex-direction: column; }
}

/* ===== PAGE LOYERS & PAIEMENTS ===== */

.payments-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.payment-kpi-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

/* Synthèse du mois */
.payments-month-summary {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.pms-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.pms-left { flex: 1; min-width: 240px; }
.pms-right {
  display: flex;
  align-items: center;
  padding-top: 4px;
}
.pms-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}
.pms-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pms-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}
.pms-ok      { background: #e6f7ee; color: #374151; }
.pms-late    { background: #fff0f0; color: var(--accent); }
.pms-pending { background: #fff8e6; color: #b97c00; }
.payments-progress-track {
  height: 8px;
  background: #f0f1f5;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}
.payments-progress-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.payments-progress-fill.full     { background: #374151; }
.payments-progress-fill.progress { background: #f5a623; }
.pms-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #666;
}
.pms-pct { font-weight: 700; color: var(--ink); }
.pms-all-ok {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #374151;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.pms-alert {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.pms-pending-msg {
  color: #b97c00;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Filtres */
.payments-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* Cartes paiement */
.payment-list { display: flex; flex-direction: column; gap: 10px; }
.payment-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow 0.15s;
}
.payment-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.payment-card-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.payment-card-prop-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f5f6fa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #888;
}
.payment-card-info { min-width: 0; }
.payment-card-propname {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.payment-card-meta {
  font-size: 0.8rem;
  color: #888;
  margin-top: 2px;
}
.payment-card-period {
  font-size: 0.78rem;
  color: #aaa;
  margin-top: 3px;
}
.payment-month-tag {
  font-size: 0.72rem;
  font-weight: 600;
  background: #f5f6fa;
  color: #555;
  padding: 2px 7px;
  border-radius: 5px;
}
.payment-card-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 110px;
}
.payment-amount-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.payment-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}
.payment-action-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e0e2e8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.payment-action-btn:hover       { border-color: var(--accent); color: var(--accent); }
.pay-validate                   { border-color: var(--success); color: var(--success); background: var(--success-bg); }
.pay-validate:hover             { background: var(--success); color: #fff; border-color: var(--success); }
.pay-relancer                   { border-color: #ffd6d6; color: var(--accent); background: #fff8f8; }
.pay-relancer:hover             { background: var(--accent); color: #fff; border-color: var(--accent); }
.payment-delete-btn             { color: var(--accent); border-color: #ffd6d6; background: #fff8f8; }
.payment-delete-btn:hover       { background: var(--accent); color: #fff; border-color: var(--accent); }

/* État vide */
.payment-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 56px 32px;
  color: #aaa;
  text-align: center;
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 14px;
}
.payment-empty-state svg { opacity: 0.3; }
.payment-empty-state p   { margin: 0; font-size: 0.95rem; color: var(--ink); }

@media (max-width: 1100px) {
  .payments-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .payment-card { flex-wrap: wrap; }
  .payment-card-amount { align-items: flex-start; }
  .payment-card-actions { width: 100%; }
}
@media (max-width: 700px) {
  .payments-kpi-grid { grid-template-columns: 1fr; }
}

/* ===== CRÉDITS - correctifs labels ===== */
.credit-estim-note {
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 8px;
  font-style: italic;
}
.credit-stat-highlight {
  background: #f8f9fc;
  border-radius: 8px;
  padding: 6px 8px;
  margin: 0 -8px;
}
.main .credit-stat-highlight { background: #f2f4f8; }

/* ===== PAGE DOCUMENTS ===== */
.documents-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .documents-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .documents-kpi-grid { grid-template-columns: 1fr; } }

.document-kpi-card {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.doc-kpi-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #f5f6fa;
  display: flex; align-items: center; justify-content: center;
  color: #555; flex-shrink: 0;
}
.doc-kpi-icon.dki-warn  { background: #fff5f5; color: #c41d15; }
.doc-kpi-icon.dki-danger{ background: #fff0f0; color: #c0392b; }
.doc-kpi-label { font-size: 0.75rem; color: #888; font-weight: 500; margin-bottom: 2px; }
.doc-kpi-value { font-size: 1.55rem; font-weight: 700; color: var(--ink); line-height: 1.15; }
.dkv-warn   { color: #c41d15; }
.dkv-danger { color: #c0392b; }
.doc-kpi-sub  { font-size: 0.72rem; color: #aaa; margin-top: 2px; }

.documents-filters {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 20px; align-items: center;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* Le conteneur #documentsGrid héberge le nouveau rendu Level 1/2/3 — on le remet en block */
#documentsGrid {
  display: block;
}

.document-card {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 150ms, box-shadow 150ms;
}
.document-card:hover {
  border-color: #d0d3db;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.document-card-top {
  display: flex; align-items: flex-start; gap: 12px;
}
.document-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #f5f6fa; color: #666; flex-shrink: 0;
}
.document-icon.doc-icon-success { background: #f7f7f8; color: #374151; }
.document-icon.doc-icon-warning { background: #fff5f5; color: #c41d15; }
.document-icon.doc-icon-danger  { background: #fff0f0; color: #c0392b; }
.document-info { flex: 1; min-width: 0; }
.document-title {
  font-size: 0.93rem; font-weight: 700; color: var(--ink);
  line-height: 1.3; margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.document-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.doc-meta-item { font-size: 0.75rem; color: #888; }
.doc-meta-tenant { color: var(--accent); font-weight: 500; }
.doc-status-pill { flex-shrink: 0; align-self: flex-start; }

.document-card-body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.doc-type-tag {
  font-size: 0.72rem; font-weight: 600;
  background: #f2f4f8; color: #555;
  border-radius: 6px; padding: 3px 8px;
}
.doc-date-item { font-size: 0.75rem; color: #999; }
.doc-expiry-warn   { color: #c41d15; font-weight: 600; }
.doc-expiry-danger { color: #c0392b; font-weight: 600; }
.doc-notes {
  width: 100%; font-size: 0.78rem; color: #777;
  font-style: italic; margin: 0; line-height: 1.4;
}

.document-card-actions {
  display: flex; flex-wrap: wrap; gap: 6px;
  border-top: 1px solid #f0f2f5; padding-top: 10px;
}
.document-action-btn {
  font-size: 0.78rem; font-weight: 500;
  padding: 5px 12px; border-radius: 7px;
  border: 1px solid #dde0e8; background: #f8f9fc;
  color: #444; cursor: pointer;
  transition: background 120ms, border-color 120ms;
}
.document-action-btn:hover { background: #eef0f5; border-color: #c8ccd6; }
.document-delete-btn { color: #c0392b; border-color: #f5ccc9; background: #fff5f4; }
.document-delete-btn:hover { background: #ffe8e6; border-color: #e0a09b; }

.document-empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 60px 24px; color: #aaa; gap: 10px;
}
.document-empty-state svg { color: #ccc; }
.document-empty-state p { margin: 0; color: #666; font-size: 0.95rem; }
.document-empty-state .muted { font-size: 0.82rem; color: #aaa; }

/* ===== DOCUMENTS - VUE PAR APPARTEMENT ===== */

/* Grille des cartes bien */
.documents-property-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  width: 100%;
}

@media (max-width: 960px) {
  .documents-property-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .documents-property-grid {
    grid-template-columns: 1fr;
  }
}

.documents-property-card {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 150ms, box-shadow 150ms;
  min-width: 0;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}
.documents-property-card:hover {
  border-color: #d0d3db;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.dpc-header {
  display: flex; align-items: flex-start; gap: 12px;
}
.dpc-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: #f5f6fa; color: #666;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dpc-title-block { flex: 1; min-width: 0; }
.dpc-name {
  font-size: 0.97rem; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dpc-address { font-size: 0.77rem; color: #888; margin-top: 2px; white-space: normal; overflow-wrap: break-word; line-height: 1.4; }
.dpc-status {
  font-size: 0.7rem; font-weight: 600; padding: 3px 9px;
  border-radius: 20px; white-space: nowrap; flex-shrink: 0;
}
.dpc-status-ok      { background: #f7f7f8; color: #374151; }
.dpc-status-warn    { background: #fff5f5; color: #c41d15; }
.dpc-status-neutral { background: #f2f4f8; color: #666; }

.dpc-meta {
  display: flex; flex-wrap: wrap; gap: 4px 10px;
}
.dpc-meta-item {
  font-size: 0.75rem; color: #777;
  background: #f5f6fa; border-radius: 6px; padding: 2px 8px;
}

.dpc-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.dpc-stat {
  background: #f8f9fc; border-radius: 8px;
  padding: 8px 6px; text-align: center;
}
.dpc-stat-warn { background: #fff5f5; }
.dpc-stat-val {
  display: block; font-size: 1.2rem; font-weight: 700; color: var(--ink); line-height: 1.1;
}
.dpc-stat-warn .dpc-stat-val { color: #c41d15; }
.dpc-stat-label { font-size: 0.67rem; color: #999; margin-top: 2px; display: block; }

.dpc-last-doc {
  font-size: 0.74rem; color: #aaa;
  border-top: 1px solid #f0f2f5; padding-top: 10px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.dpc-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: #c0120c; color: #fff !important;
  border: none; border-radius: 9px; padding: 11px 16px;
  font-size: 0.83rem; font-weight: 700; cursor: pointer;
  transition: background 150ms;
  margin-top: auto;
  width: 100%;
}
.dpc-btn:hover { background: #c01c14; color: #fff !important; }
.dpc-btn * { color: inherit; }

/* ═══════════════════════════════════════════════════════════
   DOCUMENTS - VUE DÉTAIL (Level 2)
═══════════════════════════════════════════════════════════ */

.documents-detail-page { display: flex; flex-direction: column; gap: 20px; }

/* ── Header ── */
.documents-detail-header {
  background: #fff; border: 1px solid #eaecf0;
  border-radius: 14px; padding: 18px 24px;
}
.documents-back-button {
  display: inline-flex; align-items: center; gap: 6px;
  background: #c0120c; border: 1.5px solid #c0120c;
  border-radius: 8px; padding: 7px 16px;
  font-size: 0.82rem; font-weight: 700; color: #fff;
  cursor: pointer; transition: background 150ms, border-color 150ms;
  align-self: flex-start;
}
.documents-back-button:hover { background: #a00f09; border-color: #a00f09; color: #fff; }
.documents-back-button svg { stroke: #fff; }
.ddh-info { min-width: 0; }
.ddh-name { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.ddh-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.78rem; color: #888; }
.ddh-status-pill {
  font-size: 0.7rem; font-weight: 600; padding: 2px 8px;
  border-radius: 20px; background: #f2f4f8; color: #666;
}
.ddh-tenant {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.78rem; color: var(--accent); font-weight: 500; margin-top: 6px;
}

.document-status-badge {
  font-size: 0.7rem; font-weight: 600; padding: 3px 9px;
  border-radius: 20px; flex-shrink: 0; align-self: flex-start;
  background: #f2f4f8; color: #666;
}
.document-status-badge.ds-success { background: var(--success-bg); color: var(--success); }
.document-status-badge.ds-warning { background: var(--warning-bg); color: var(--warning); }
.document-status-badge.ds-danger  { background: var(--danger-bg); color: var(--danger); }

/* ── Documents : grille de catégories ── */
.dcat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dcat-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 14px;
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s, transform .12s;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  outline: none;
}
.dcat-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.10);
  border-color: #d0d3da;
  transform: translateY(-2px);
}
.dcat-card:focus-visible { outline: 2px solid #c0120c; outline-offset: 2px; }
.dcat-card--empty { opacity: .55; cursor: default; }
.dcat-card--empty:hover { box-shadow: 0 1px 4px rgba(0,0,0,.05); border-color: #e4e6eb; transform: none; }
.dcat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.dcat-icon { color: #c0120c; flex-shrink: 0; }
.dcat-icon--empty { color: #c8ccd6; }
.dcat-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 13px;
  background: #f5f6fa;
  font-size: 0.78rem;
  font-weight: 700;
  color: #555;
  flex-shrink: 0;
}
.dcat-card:not(.dcat-card--empty) .dcat-count-pill { background: #fff0f0; color: #c0120c; }
.dcat-body { flex: 1; min-width: 0; }
.dcat-name { font-size: 0.97rem; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.dcat-desc { font-size: 0.78rem; color: #888; line-height: 1.4; }
.dcat-footer { border-top: 1px solid #f0f0f0; padding-top: 12px; margin-top: 4px; }
.dcat-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #c0120c;
}
.dcat-cta--empty { color: #aaa; font-weight: 500; }
.dcat-cta svg { flex-shrink: 0; }

/* ── Documents : barre de navigation catégorie (niveau 3) ── */
.dcat-nav-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 10px;
  padding: 10px 16px;
  flex-wrap: wrap;
}
.dcat-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: #c0120c;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color .12s;
  flex-shrink: 0;
}
.dcat-nav-back:hover { color: #a00f09; }
.dcat-nav-sep { color: #d1d5db; font-size: 0.82rem; flex-shrink: 0; }
.dcat-nav-title { font-size: 0.88rem; font-weight: 700; color: var(--ink); flex-shrink: 0; }
.dcat-nav-count {
  font-size: 0.75rem;
  color: #888;
  background: #f5f6fa;
  border-radius: 10px;
  padding: 2px 9px;
  font-weight: 600;
  flex-shrink: 0;
}
.dcat-nav-search { margin-left: auto; }

@media (max-width: 960px) {
  .dcat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .dcat-grid { grid-template-columns: 1fr; }
  .dcat-nav-bar { gap: 8px; }
  .dcat-nav-search { margin-left: 0; width: 100%; }
  .dcat-nav-search .ddv2-search { width: 100%; min-width: 0; }
}

/* ── Documents v2 : barre d'actions ── */
.ddv2-actions-bar {
  display: flex;
  align-items: center;
  padding: 4px 0 8px;
}
.ddv2-actions-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ddv2-actions-right { display: flex; align-items: center; }
.ddv2-search {
  min-height: 36px;
  min-width: 220px;
  padding: 8px 12px;
  border: 1px solid #e2e4e9;
  border-radius: 7px;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--ink);
  background: #f9fafb;
  outline: none;
  transition: border-color .15s, background .15s;
}
.ddv2-search:focus { border-color: #c0120c; background: #fff; }
.ddv2-search::placeholder { color: #aaa; }

/* ── Documents v2 : onglets ── */
.ddv2-tabs-wrap {
  background: #fff;
  border: 1px solid #e9eaed;
  border-radius: 10px;
  padding: 4px 8px;
  overflow: hidden;
}
.ddv2-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ddv2-tabs::-webkit-scrollbar { display: none; }
.ddv2-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, color .12s;
}
.ddv2-tab:hover { background: #f5f6fa; color: var(--ink); }
.ddv2-tab--active {
  background: #fff0f0;
  color: #c0120c;
  font-weight: 700;
}
.ddv2-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #e9eaed;
  font-size: 0.68rem;
  font-weight: 700;
  color: #555;
  line-height: 1;
}
.ddv2-tab--active .ddv2-tab-count { background: #fdd; color: #c0120c; }

/* ── Documents v2 : grille documents (legacy) ── */
.ddv2-doc-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ── Documents : liste compacte (niveau 3) ── */
.doc-list {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 12px;
  overflow: hidden;
}
.doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid #f0f1f5;
  min-height: 52px;
  transition: background .1s;
  flex-wrap: wrap;
}
.doc-row:last-child { border-bottom: none; }
.doc-row:hover { background: #fafbfd; }
.doc-row--warn { background: #fffbf5; }
.doc-row--warn:hover { background: #fff7ee; }

.doc-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.doc-row-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f6fa;
  border-radius: 7px;
  color: #888;
}
.doc-row-icon svg { width: 15px; height: 15px; }
.doc-row-info { min-width: 0; }
.doc-row-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.doc-row-meta {
  font-size: 0.72rem;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-row-meta--warn { color: #c0120c; }

.doc-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.doc-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.doc-row-btn {
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid #e2e4e9;
  border-radius: 6px;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.doc-row-btn:hover { background: #f0f1f5; border-color: #c8ccd6; }
.doc-row-btn--danger { color: #c0120c; border-color: #fdd; background: #fff; }
.doc-row-btn--danger:hover { background: #fef2f2; border-color: #fca5a5; }
.doc-row-btn--send { color: #374151; }
.doc-row-btn--regen { color: #1a56db; border-color: #bfdbfe; background: #eff6ff; }
.doc-row-btn--regen:hover { background: #dbeafe; border-color: #93c5fd; }
.doc-row-btn--ok { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; }
.doc-row-btn--ok:hover { background: #dcfce7; }

.doc-row-review {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 40px;
  flex-wrap: wrap;
}
.doc-row-review-warn {
  font-size: 0.74rem;
  color: #c0120c;
  font-weight: 600;
  flex: 1;
}

@media (max-width: 720px) {
  .doc-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .doc-row-right { width: 100%; justify-content: flex-start; }
  .doc-row-review { padding: 4px 0; }
}

/* ── Documents v2 : état vide ── */
.ddv2-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 52px 24px;
  text-align: center;
  color: #aaa;
}
.ddv2-empty svg { color: #d0d3da; }
.ddv2-empty p { margin: 0; font-size: 0.92rem; color: #666; }
.ddv2-empty-sub { font-size: 0.8rem !important; color: #aaa !important; }

@media (max-width: 720px) {
  .ddv2-actions-bar { flex-direction: column; align-items: stretch; }
  .ddv2-actions-left { flex-direction: column; }
  .ddv2-actions-left button { width: 100%; justify-content: center; }
  .ddv2-search { width: 100%; min-width: 0; }
  .ddv2-doc-grid { grid-template-columns: 1fr; }
}

/* ===== PAGE VITRINE PUBLIQUE ===== */
.public-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}
@media (max-width: 900px) { .public-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .public-kpi-grid { grid-template-columns: 1fr; } }

.public-upgrade-wrapper {
  width: 100%;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  grid-column: 1 / -1;
}
.public-upgrade-card {
  width: 100%;
  max-width: 420px;
}
@media (max-width: 768px) {
  .public-upgrade-wrapper { min-height: auto; padding: 32px 16px; align-items: flex-start; }
  .public-upgrade-card { max-width: 100%; }
}

.public-kpi-card {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 18px 20px;
  display: flex; align-items: flex-start; gap: 14px;
}
.pub-kpi-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: #f5f6fa; color: #555;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.pub-kpi-icon.pki-ok   { background: #f7f7f8; color: #374151; }
.pub-kpi-icon.pki-warn { background: #fff5f5; color: #c41d15; }
.pub-kpi-label { font-size: 0.75rem; color: #888; font-weight: 500; margin-bottom: 2px; }
.pub-kpi-value { font-size: 1.55rem; font-weight: 700; color: var(--ink); line-height: 1.15; }
.pkv-ok   { color: #374151; }
.pkv-warn { color: #c41d15; }
.pub-kpi-sub  { font-size: 0.72rem; color: #aaa; margin-top: 2px; }

/* public layout — full width, pas de panel latéral */
.public-layout { display: block; }

.pub-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.pub-section-title { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 0; }
.pub-section-hint  { font-size: 0.78rem; color: #aaa; }

/* grille adaptive : 1 carte = pleine largeur, 2 = 2 col, 3+ = 3 col max */
.plc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  width: 100%;
}
@media (max-width: 680px)  { .plc-grid { grid-template-columns: 1fr; } }

.public-listing-card {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 150ms, box-shadow 150ms;
}
.public-listing-card:hover { border-color: #d0d3db; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.plc-card--published { border-color: #c8e6d4; background: #fafffe; }
.plc-card--published:hover { border-color: #88c9a8; }

.plc-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  margin-bottom: 10px;
}
.plc-name { font-size: 0.95rem; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.plc-meta { font-size: 0.78rem; color: #888; display: flex; gap: 4px; flex-wrap: wrap; }
.plc-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }

/* badge Publiée / Non publiée */
.plc-pub-badge {
  font-size: 0.71rem; font-weight: 600;
  padding: 3px 9px; border-radius: 20px;
  white-space: nowrap;
}
.plc-pub-on  { background: #e8f5ee; color: #1a7c3e; }
.plc-pub-off { background: #f5f6fa; color: #999; }

/* badge demandes */
.plc-req-count {
  font-size: 0.73rem; font-weight: 600;
  background: #fff0eb; color: var(--accent);
  border-radius: 20px; padding: 2px 9px;
}

/* alerte champs manquants / limite */
.plc-card-alert {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
  padding: 8px 10px; margin-bottom: 10px;
  font-size: 0.76rem; color: #92400e;
}
.plc-card-alert svg { flex-shrink: 0; color: #d97706; }
.plc-card-alert--limit { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.plc-card-alert--limit svg { color: var(--accent); }

/* bouton publier désactivé (limite atteinte) */
.plc-btn-locked { opacity: 0.45; cursor: not-allowed !important; }

.plc-body { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

.plc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }

.public-action-btn {
  font-size: 0.78rem; font-weight: 500;
  padding: 5px 12px; border-radius: 7px;
  border: 1px solid #dde0e8; background: #f8f9fc; color: #444;
  cursor: pointer; transition: background 120ms, border-color 120ms;
}
.public-action-btn:hover { background: #eef0f5; border-color: #c8ccd6; }
.pub-publish-btn   { background: var(--accent); color: #fff; border-color: var(--accent); }
.pub-publish-btn:hover { background: #a8150f; border-color: #a8150f; }
.pub-depublish-btn { background: #f5f6fa; color: #777; border-color: #dde0e8; }
.pub-mark-btn      { background: #f7f7f8; color: #374151; border-color: #b6e8c4; }
.pub-mark-btn:hover { background: #d5f2de; }
.public-danger-btn { color: #c0392b; border-color: #f5ccc9; background: #fff5f4; }
.public-danger-btn:hover { background: #ffe8e6; border-color: #e0a09b; }
.public-copy-btn   { color: #c0120c; border-color: #c5cff5; background: #f0f2fc; }
.public-copy-btn:hover { background: #e4e8f8; }

.public-preview-panel { position: sticky; top: 20px; }
.pub-preview-box {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 16px;
  overflow: hidden;
}
.pub-preview-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  background: var(--ink);
}
.pub-preview-logo { display: flex; align-items: center; gap: 8px; }
.pub-preview-logo-mark {
  width: 26px; height: 26px; background: var(--accent); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.85rem; color: #fff;
}
.pub-preview-logo-name { color: #fff; font-weight: 700; font-size: 0.88rem; }
.pub-preview-tag {
  font-size: 0.68rem; font-weight: 600;
  background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.8);
  border-radius: 20px; padding: 3px 9px;
}
.pub-preview-body { padding: 18px; }
.pub-preview-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #aaa; margin: 0 0 2px; }
.pub-preview-count { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
.pub-preview-empty { font-size: 0.82rem; color: #aaa; text-align: center; padding: 20px 0; }

.pub-preview-card {
  border: 1px solid #eaecf0; border-radius: 10px; overflow: hidden;
}
.pub-preview-card-img {
  height: 90px;
  background: linear-gradient(135deg, #f0f2f5, #e4e6eb);
}
.pub-preview-card-body { padding: 12px 14px; }
.pub-preview-card-name { font-size: 0.88rem; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.pub-preview-card-meta { font-size: 0.75rem; color: #888; margin-bottom: 8px; }
.pub-preview-card-rent { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.pub-preview-cta {
  width: 100%; padding: 7px; border-radius: 8px;
  background: var(--ink); color: #fff; border: none;
  font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.pub-preview-link-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 18px; background: #f8f9fc; border-top: 1px solid #eaecf0;
}
.pub-preview-link-label { font-size: 0.72rem; color: #aaa; white-space: nowrap; }
.pub-preview-link-val   { font-size: 0.75rem; color: #c0120c; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-preview-copy-btn   { font-size: 0.72rem; padding: 3px 9px; }

.public-requests-section { margin-top: 8px; }

.public-request-card {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  transition: border-color 150ms;
}
.public-request-card:hover { border-color: #d0d3db; }
.public-request-card.req-done { opacity: 0.65; }

.prc-left  { display: flex; gap: 14px; align-items: flex-start; flex: 1; min-width: 0; }
.prc-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.prc-name   { font-size: 0.93rem; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.prc-meta   { display: flex; gap: 8px; font-size: 0.75rem; color: #aaa; margin-bottom: 4px; }
.prc-prop   { color: var(--accent); font-weight: 500; }
.prc-contact { font-size: 0.78rem; color: #888; margin-bottom: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.prc-message { font-size: 0.82rem; color: #666; margin: 0; line-height: 1.45; font-style: italic; }

.prc-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0;
}
.prc-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

.public-empty-state {
  text-align: center; padding: 40px 24px; color: #aaa;
}
.public-empty-state p { color: #666; font-size: 0.9rem; margin: 0; }
.public-empty-state svg { margin-bottom: 10px; display: block; margin-left: auto; margin-right: auto; }

/* ===== VITRINE PUBLIQUE - nouveaux composants ===== */

/* Info banner */
.pub-info-banner {
  display: flex; align-items: flex-start; gap: 9px;
  background: #f0f2fc; border: 1px solid #c5cff5; border-radius: 10px;
  padding: 11px 14px; margin-bottom: 18px;
  font-size: 0.81rem; color: #c0120c; line-height: 1.4;
}
.pub-info-banner svg { flex-shrink: 0; margin-top: 1px; }

/* Section headers */
.pub-section-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pub-section-title  { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 0; }
.pub-section-hint   { font-size: 0.76rem; color: #aaa; }

/* Listing card - enhanced */
.plc-rent-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.plc-rent     { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.plc-rent-unit { font-size: 0.78rem; font-weight: 500; color: #888; }
.plc-chip     { font-size: 0.75rem; background: #f5f6fa; color: #666; border-radius: 20px; padding: 2px 9px; }
.plc-req-count { font-size: 0.74rem; font-weight: 600; background: #fff0eb; color: var(--accent); border-radius: 20px; padding: 2px 9px; }

.plc-title-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.plc-label     { font-size: 0.73rem; color: #aaa; white-space: nowrap; flex-shrink: 0; }
.plc-generated-title { font-size: 0.82rem; color: #444; font-style: italic; }

.plc-url-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.plc-url     { font-size: 0.78rem; color: #c0120c; font-weight: 500; word-break: break-all; }

/* Listing status badge */
.listing-status-badge {
  font-size: 0.7rem; font-weight: 700; padding: 3px 9px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: 0.04em;
}
.lsb-neutral { background: #f5f6fa; color: #777; }
.lsb-warning { background: #fff5f5; color: #c41d15; }
.lsb-success { background: #f7f7f8; color: #374151; }
.lsb-danger  { background: #fff5f4; color: #c0392b; }

/* Kit de publication */
.listing-kit-grid {
  margin-top: 14px;
  border: 1px solid #eaecf0; border-radius: 12px;
  overflow: hidden;
  background: #fafbfd;
}
.listing-kit-header {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; font-size: 0.85rem; font-weight: 600; color: var(--ink);
  background: #f5f6fa; border-bottom: 1px solid #eaecf0;
}
.listing-kit-sub {
  font-size: 0.75rem; font-weight: 400; color: #888; margin-left: 4px;
}
.listing-kit-platforms {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0;
}

.listing-platform-card {
  padding: 14px 16px;
  border-right: 1px solid #eaecf0;
  border-bottom: 1px solid #eaecf0;
}
.listing-platform-card:last-child { border-right: none; }

.lpc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.lpc-name   { font-size: 0.83rem; font-weight: 700; color: var(--ink); }
.lpc-pub-badge {
  font-size: 0.67rem; font-weight: 600; padding: 2px 7px;
  background: #f7f7f8; color: #374151; border-radius: 20px;
}
.lpc-actions { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }

.listing-copy-button {
  font-size: 0.77rem; font-weight: 500; padding: 5px 11px;
  border-radius: 7px; border: 1px solid #dde0e8;
  background: #fff; color: #444; cursor: pointer;
  transition: background 120ms, border-color 120ms; text-align: center;
  display: block; width: 100%; text-decoration: none;
}
.listing-copy-button:hover { background: #f0f2f5; border-color: #c8ccd6; }
.lpc-open-btn { color: #c0120c; border-color: #c5cff5; background: #f0f2fc; }
.lpc-open-btn:hover { background: #e4e8f8; }

.lpc-ext-url { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lpc-ext-input {
  flex: 1; min-width: 120px;
  font-size: 0.75rem; padding: 5px 8px;
  border: 1px solid #dde0e8; border-radius: 7px; outline: none;
  color: #444;
}
.lpc-ext-input:focus { border-color: var(--accent); }
.lpc-mark-published {
  font-size: 0.75rem; font-weight: 600; padding: 5px 10px;
  border-radius: 7px; border: 1px solid #b6e8c4;
  background: #f7f7f8; color: #374151; cursor: pointer;
  white-space: nowrap;
}
.lpc-mark-published:hover { background: #d5f2de; }

/* Copy toast */
/* ── Keymmo Toasts ── */
#kt-container {
  position: fixed; top: 20px; right: 20px; z-index: 10000;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; width: 320px;
}
.kt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px 12px 16px;
  background: #fff; border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,.14), 0 1px 4px rgba(0,0,0,.08);
  font-size: .855rem; font-weight: 500; color: #111;
  border-left: 3px solid #aaa;
  pointer-events: auto;
  opacity: 0; transform: translateX(20px);
  transition: opacity .28s ease, transform .28s ease;
}
.kt--in  { opacity: 1; transform: translateX(0); }
.kt--out { opacity: 0; transform: translateX(20px); transition: opacity .3s ease, transform .3s ease; }
.kt--success { border-left-color: #22c55e; }
.kt--success .kt-icon { color: #22c55e; }
.kt--info    { border-left-color: #c0392b; }
.kt--info    .kt-icon { color: #c0392b; }
.kt--warning { border-left-color: #f59e0b; }
.kt--warning .kt-icon { color: #f59e0b; }
.kt--error   { border-left-color: #ef4444; }
.kt--error   .kt-icon { color: #ef4444; }
.kt-icon { flex-shrink: 0; display: flex; align-items: center; padding-top: 1px; }
.kt-msg  { flex: 1; line-height: 1.4; }
.kt-x    { flex-shrink: 0; width: 22px; height: 22px; background: none; border: none; cursor: pointer; font-size: 1.05rem; color: #999; line-height: 1; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.kt-x:hover { color: #333; background: #f0f0f0; }
@media (max-width: 500px) {
  #kt-container { top: auto; bottom: 16px; left: 12px; right: 12px; width: auto; }
}
/* ── Confirm Modal ── */
.kcm-box { max-width: 460px; }
.kcm-msg { color: #555; line-height: 1.55; margin: 0; font-size: .92rem; }
.kcm-detail { margin-top: 12px; padding: 10px 14px; background: rgba(192,18,12,.06); border: 1px solid rgba(192,18,12,.18); border-radius: 8px; }
.kcm-delete-list { margin: 0; padding: 0 0 0 18px; color: #c0120c; font-size: .84rem; line-height: 1.7; }

/* Source stats */
.req-source-stats {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.req-source-stats-label { font-size: 0.75rem; color: #aaa; }
.req-source-stat { display: flex; align-items: center; gap: 5px; font-size: 0.78rem; color: #666; }

/* Request source badge */
.request-source-badge {
  font-size: 0.67rem; font-weight: 600; padding: 2px 7px;
  border-radius: 20px; background: #f0f2fc; color: #c0120c;
  vertical-align: middle; margin-left: 5px;
}
.rsb-leboncoin  { background: #fff3e0; color: #c41d15; }
.rsb-pap        { background: #e8f5e9; color: #374151; }
.rsb-facebook   { background: #e8eaf6; color: #3949ab; }
.rsb-olymmo    { background: #f5e6ff; color: #c0120c; }
.rsb-autre      { background: #f5f6fa; color: #888; }

/* Candidate request card (renamed) */
.candidate-request-card {
  background: #fff;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  transition: border-color 150ms;
}
.candidate-request-card:hover { border-color: #d0d3db; }
.candidate-request-card.req-done { opacity: 0.65; }

.prc-details { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.prc-detail-tag {
  font-size: 0.73rem; padding: 2px 8px; border-radius: 20px;
  background: #f5f6fa; color: #555;
}

.prc-status-sel {
  font-size: 0.78rem; padding: 4px 8px;
  border: 1px solid #dde0e8; border-radius: 7px;
  background: #fff; color: #444; cursor: pointer;
}

/* Preview listing modal */
.preview-listing-modal { padding: 4px 0; }
.plm-badge {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: #c0120c; background: #f0f2fc; border-radius: 20px;
  padding: 3px 10px; display: inline-block; margin-bottom: 12px;
}
.plm-title  { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.plm-meta   { display: flex; gap: 6px; flex-wrap: wrap; font-size: 0.78rem; color: #888; margin-bottom: 10px; }
.plm-rent   { font-size: 1.4rem; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.plm-rent-unit { font-size: 0.85rem; font-weight: 500; color: #888; }
.plm-divider { border: none; border-top: 1px solid #eaecf0; margin: 14px 0; }
.plm-description {
  font-size: 0.83rem; color: #444; line-height: 1.6;
  white-space: pre-wrap; margin: 0 0 4px;
  font-family: inherit; background: #f8f9fc; border-radius: 8px; padding: 12px;
}
.plm-link-row  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.plm-link-label { font-size: 0.73rem; color: #aaa; white-space: nowrap; }
.plm-link      { font-size: 0.8rem; color: #c0120c; word-break: break-all; }
.plm-actions   { display: flex; gap: 8px; flex-wrap: wrap; }

/* Candidate form */
.candidate-form { padding: 4px 0; }
.cf-subtitle {
  font-size: 0.85rem; color: #666; margin: 0 0 16px;
  background: #f5f6fa; border-radius: 8px; padding: 8px 12px;
}
.cf-rgpd {
  font-size: 0.73rem; color: #aaa; margin: 14px 0 0;
  padding: 8px 12px; border-radius: 7px; background: #fafbfd;
  border: 1px solid #eaecf0;
}
.form-required { color: var(--accent); }

/* ── Candidature form - sections & docs ── */
.cf-section-label {
  font-size: 0.72rem; font-weight: 700; color: #888; letter-spacing: .05em;
  text-transform: uppercase; margin: 18px 0 8px; padding: 0;
  border-bottom: 1px solid #eaecf0; padding-bottom: 5px;
}
.cf-guarantor-fields { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.cf-docs-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px; margin-top: 4px;
}
.cf-doc-item {
  display: flex; align-items: flex-start; gap: 8px;
  background: #f8f9fc; border: 1px solid #eaecf0;
  border-radius: 8px; padding: 9px 11px; cursor: pointer;
}
.cf-doc-item:has(input:checked) {
  background: #f7f7f8; border-color: #a8d5b5;
}
.cf-doc-item input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }
.cf-doc-label { font-size: 0.81rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.cf-doc-examples { font-size: 0.72rem; color: #888; margin-top: 2px; line-height: 1.3; }
.cf-doc-note {
  font-size: 0.74rem; color: #666; margin-top: 10px;
  background: #f5f6fa; border-radius: 7px; padding: 7px 10px;
  border-left: 3px solid #dde0e8;
}

/* ── Candidate request card - enriched ── */
.prc-top-row  { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.prc-actions-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 12px; }

/* ── Candidate analysis card (inline in request) ── */
.candidate-analysis-card {
  background: #f8f9fc; border: 1px solid #eaecf0; border-radius: 10px;
  padding: 12px 14px; margin-top: 0;
}
.cac-score-row  { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; flex-wrap: wrap; }
.cac-ratio      { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; }
.cac-ratio-label { font-size: 0.7rem; color: #aaa; }
.cac-ratio-val   { font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.crb-ok   { color: #374151; }
.crb-warn { color: #c41d15; }

.candidate-score { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 160px; }
.cs-bar-wrap { flex: 1; height: 5px; background: #e4e6eb; border-radius: 99px; overflow: hidden; }
.cs-bar      { height: 100%; border-radius: 99px; transition: width 400ms; }
.cs-label    { font-size: 0.75rem; color: #666; white-space: nowrap; }

.candidate-summary {
  font-size: 0.8rem; color: #555; line-height: 1.45; margin: 0 0 8px;
}
.cac-warn-preview { display: flex; gap: 6px; flex-wrap: wrap; }
.cac-warn-chip {
  font-size: 0.71rem; padding: 2px 9px; border-radius: 20px;
  background: #fff5f4; color: #c0392b; border: 1px solid #f5ccc9;
}
.cac-warn-more {
  font-size: 0.71rem; padding: 2px 9px; border-radius: 20px;
  background: #f5f6fa; color: #888;
}

/* ── Candidate analysis badge ── */
.candidate-analysis-badge {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 3px 9px; border-radius: 20px;
  white-space: nowrap;
}
.ca-level-ok   { background: #f7f7f8; color: #374151; }
.ca-level-warn { background: #fff5f5; color: #c41d15; }
.ca-level-ko   { background: #fff5f4; color: #c0392b; }

/* ── Candidate analysis modal ── */
.candidate-analysis-modal { padding: 4px 0; }
.ca-header-row {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
  padding-bottom: 16px; border-bottom: 1px solid #eaecf0;
}
.ca-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}
.ca-header-info { flex: 1; min-width: 0; }
.ca-name { font-size: 1rem; font-weight: 700; color: var(--ink); }
.ca-sub  { font-size: 0.78rem; color: #888; }

.ca-score-row { margin-bottom: 10px; }

.ca-sections { display: flex; flex-direction: column; gap: 18px; }
.ca-section { }
.ca-section-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: #aaa; margin-bottom: 8px;
}
.ca-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .ca-two-col { grid-template-columns: 1fr; } }

.ca-data-grid { display: flex; flex-direction: column; gap: 6px; }
.ca-data-row  { display: flex; gap: 10px; font-size: 0.82rem; }
.ca-data-label { color: #aaa; min-width: 160px; flex-shrink: 0; }
.ca-data-val   { color: var(--ink); font-weight: 500; }

/* ── Ratio box ── */
.candidate-ratio-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  background: #f8f9fc; border-radius: 10px; padding: 14px;
  border: 1px solid #eaecf0;
}
.crb-item { display: flex; flex-direction: column; gap: 2px; }
.crb-highlight { background: #fff; border-radius: 8px; padding: 8px 10px; border: 1px solid #eaecf0; }
.crb-label { font-size: 0.71rem; color: #aaa; }
.crb-val   { font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.crb-ratio { font-size: 1.2rem; }

.ca-missing-income { font-size: 0.8rem; color: #c41d15; margin: 8px 0 0; background: #fff5f5; border-radius: 7px; padding: 7px 10px; }
.ca-guarantor-info { font-size: 0.8rem; color: #374151; margin: 8px 0 0; background: #f7f7f8; border-radius: 7px; padding: 7px 10px; }

/* ── Document lists ── */
.ca-doc-group { margin-bottom: 10px; }
.ca-doc-group-label { font-size: 0.71rem; color: #aaa; display: block; margin-bottom: 5px; }
.candidate-documents-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.candidate-documents-list li {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.82rem; padding: 5px 9px; border-radius: 7px;
}
.cdl-ok      { background: #f7f7f8; color: #374151; }
.cdl-ok svg  { stroke: #374151; flex-shrink: 0; }
.cdl-missing { background: #fff5f4; color: #c0392b; }
.cdl-missing svg { stroke: #c0392b; flex-shrink: 0; }
.cdl-warn    { background: #fff5f5; color: #c41d15; }
.cdl-warn svg { stroke: #c41d15; flex-shrink: 0; }
.cdl-status  { margin-left: auto; font-size: 0.72rem; opacity: .7; font-weight: 500; }
.cdl-action  { margin-left: auto; font-size: 0.72rem; color: #c0392b; font-weight: 500; }
.candidate-missing-documents .cdl-missing { border: 1px dashed #f5b8b3; }
.ca-prop-tag { font-size: 0.75rem; color: #888; margin-top: 2px; }

/* ── Strength / warning lists ── */
.candidate-strength-list,
.candidate-warning-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 5px;
}
.candidate-strength-list li {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 0.81rem; color: #374151; line-height: 1.35;
}
.candidate-strength-list svg { stroke: #374151; flex-shrink: 0; margin-top: 2px; }
.candidate-warning-list li {
  display: flex; align-items: flex-start; gap: 7px;
  font-size: 0.81rem; color: #c41d15; line-height: 1.35;
}
.candidate-warning-list svg { stroke: #c41d15; flex-shrink: 0; margin-top: 2px; }
.ca-empty { font-size: 0.8rem; color: #aaa; margin: 0; }

/* ── Recommendation ── */
.ca-recommendation {
  font-size: 0.84rem; color: #444; line-height: 1.5; margin: 0;
  background: #f8f9fc; border-radius: 8px; padding: 12px;
  border-left: 3px solid #dde0e8;
}

/* ── Next actions ── */
.candidate-next-actions {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.candidate-next-actions li {
  font-size: 0.81rem; color: #444; padding: 7px 10px;
  background: #f8f9fc; border-radius: 7px; border: 1px solid #eaecf0;
}

/* ── Legal notice ── */
.ca-legal-notice {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 0.76rem; color: #aaa; line-height: 1.5;
  background: #fafbfd; border-radius: 8px; padding: 10px 12px;
  border: 1px solid #eaecf0;
}
.ca-legal-notice svg { flex-shrink: 0; margin-top: 1px; stroke: #ccc; }

.ca-footer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid #eaecf0; }

/* ── Request documents modal ── */
.request-docs-modal { padding: 4px 0; }
.rdm-label { font-size: 0.83rem; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.rdm-hint  { font-size: 0.77rem; color: #aaa; margin: 0 0 12px; }
.rdm-textarea {
  width: 100%; box-sizing: border-box;
  font-size: 0.82rem; color: #444; line-height: 1.55;
  border: 1px solid #dde0e8; border-radius: 8px; padding: 12px;
  font-family: inherit; background: #f8f9fc; resize: vertical;
}
.rdm-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.rdm-to      { font-size: 0.8rem; color: #888; }
.rdm-note    { font-size: 0.73rem; color: #aaa; margin: 10px 0 0; }

/* ===== PROJECTION YEARS SELECT ===== */
.db-chart-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.projection-years-select {
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid #e4e6eb;
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color 150ms;
}
.projection-years-select:hover { border-color: #c8ccd6; }
.projection-years-select:focus { border-color: var(--accent); }

/* ===== Credit amortization note styles ===== */
.credit-source-note {
  font-size: 0.76rem;
  color: #888;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(0,0,0,0.04);
  border-left: 3px solid #ddd;
}
.credit-source-manual {
  color: #374151;
  background: rgba(22,163,74,0.07);
  border-left-color: #374151;
}
.credit-source-warn {
  color: #b91c1c;
  background: rgba(217,119,6,0.07);
  border-left-color: #b91c1c;
}
.credit-badge-manual {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  color: #374151;
  background: rgba(22,163,74,0.12);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.credit-stat-unknown {
  color: #888 !important;
  font-style: italic;
}

/* ===== CREDITS PROPERTY-STYLE CARD GRID ===== */
.credits-prop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  width: 100%;
}
@media (max-width: 1199px) {
  .credits-prop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .credits-prop-grid { grid-template-columns: 1fr; }
}
.cred-prop-card {
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.cred-prop-card:hover {
  border-color: rgba(192,18,12,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
/* Visual header zone */
.cred-card-visual {
  height: 130px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cred-card-visual-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.cred-card-visual-amount {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1;
}
.cred-card-visual-sublabel {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.cred-card-color-accent {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
}
/* Bank pill badge */
.cred-bank-pill {
  font-size: 0.68rem;
  font-weight: 600;
  color: #555;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}
/* Danger metric (capital restant dû) */
.cred-metric-danger { color: #b51818 !important; }
/* Progress row */
.cred-card-progress {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cred-card-progress-track {
  height: 5px;
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
}
.cred-card-progress-fill {
  height: 100%;
  border-radius: 10px;
  min-width: 3px;
}
.cred-card-progress-label {
  font-size: 0.68rem;
  color: #bbb;
}

/* ===== CREDIT DETAIL VIEW (crd = credit detail) ===== */
.crd-header { margin-bottom: 20px; }
.crd-back-btn { display: inline-flex; align-items: center; gap: 6px; background: #c0120c; border: 1.5px solid #c0120c; border-radius: 8px; color: #fff; font-size: 0.82rem; font-weight: 700; cursor: pointer; padding: 7px 16px; margin-bottom: 16px; transition: background 150ms, border-color 150ms; }
.crd-back-btn:hover { background: #a00f09; border-color: #a00f09; color: #fff; }
.crd-back-btn svg { stroke: #fff; }
.crd-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.crd-color-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.crd-prop-name { font-size: 1.3rem; font-weight: 800; color: #111; margin: 0; }
.crd-prop-sub { font-size: 0.78rem; color: #aaa; margin-top: 3px; }
.crd-kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 700px) { .crd-kpi-row { grid-template-columns: repeat(2, 1fr); } }
.crd-kpi { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.crd-kpi-label { font-size: 0.68rem; color: #aaa; text-transform: uppercase; letter-spacing: 0.05em; }
.crd-kpi-val { font-size: 1.05rem; font-weight: 800; color: #111; }
.crd-progress-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.crd-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.crd-progress-title { font-size: 0.78rem; font-weight: 700; color: #374151; }
.crd-progress-pct { font-size: 0.85rem; font-weight: 700; color: #374151; }
.crd-progress-track { height: 10px; background: #f0f0f0; border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.crd-progress-fill { height: 100%; border-radius: 10px; transition: width 0.5s ease; }
.crd-progress-labels { display: flex; justify-content: space-between; font-size: 0.74rem; color: #888; }
.crd-details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 16px; }

/* Bouton Modifier → rouge (cohérence avec "Voir les détails") — carte crédit uniquement */
/* Vient après .main .prop-edit-btn (l.5153) donc l'écrase à priorité de cascade égale */
.cred-prop-card .prop-edit-btn {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.cred-prop-card .prop-edit-btn:hover { background: #a00f09; border-color: #a00f09; }

/* Bouton Modifier sur la page de détail d'un crédit (en haut à droite du titre) */
.crd-title-row .btn-secondary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.crd-title-row .btn-secondary:hover { background: #a00f09; border-color: #a00f09; }
.crd-detail-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px 20px; }
.crd-detail-title { font-size: 0.75rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.crd-detail-rows { display: flex; flex-direction: column; }
.crd-detail-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #f3f4f6; font-size: 0.82rem; color: #444; }
.crd-detail-row:last-child { border-bottom: none; }
.crd-detail-row strong { font-weight: 700; color: #111; }
.crd-detail-row--total { background: #f8f9fc; margin: 0 -8px; padding: 9px 8px; border-radius: 6px; border-bottom: none; }
.crd-chart-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px 20px; margin-top: 16px; }

/* ── Credit detail: loan lines + amortization ── */
.crd-section-title { font-size: .9rem; font-weight: 700; color: #111; margin: 0; }
.crd-loans-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.crd-loans-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.crd-add-loan-btn { font-size: .8rem !important; padding: 7px 14px !important; display: inline-flex; align-items: center; gap: 6px; }
.crd-loans-table-wrap { overflow-x: auto; }
.crd-loans-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.crd-loans-table thead th { text-align: left; padding: 7px 10px; font-size: .72rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #e5e7eb; }
.loan-line-row td { padding: 10px 10px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.loan-line-row:last-child td { border-bottom: none; }
.loan-line-label { color: #111; }
.loan-line-amount, .loan-line-rate, .loan-line-dur, .loan-line-monthly { color: #444; white-space: nowrap; }
.loan-line-monthly strong { color: #111; }
.loan-line-actions { white-space: nowrap; text-align: right; }
.loan-line-btn-edit, .loan-line-btn-del { background: none; border: none; cursor: pointer; padding: 5px 6px; border-radius: 6px; color: #888; transition: background .12s, color .12s; }
.loan-line-btn-edit:hover { background: #f0f4ff; color: #374151; }
.loan-line-btn-del:hover { background: #fff0f0; color: #c0120c; }
.loan-line-total td { padding: 9px 10px; font-size: .84rem; border-top: 2px solid #e5e7eb; background: #f8f9fc; }
.loan-dif-badge { font-size: .68rem; font-weight: 700; background: #f3f4f6; color: #888; border-radius: 6px; padding: 1px 5px; margin-left: 4px; }
@media (max-width: 768px) {
  /* Annule le min-width: 680px global sur les tableaux en mode carte */
  table.responsive-table { min-width: 0 !important; }
  .crd-loans-table-wrap { overflow-x: visible !important; }
  .crd-loans-table.responsive-table tfoot { display: none !important; }
  .crd-loans-table.responsive-table tbody > tr {
    background: #f9fafb;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px;
    margin-bottom: 8px;
  }
  .crd-loans-table.responsive-table tbody > tr:last-child { margin-bottom: 0; }
  .crd-loans-table.responsive-table td[data-label="actions"] {
    flex-direction: row !important;
    justify-content: flex-end !important;
    padding-top: 8px !important;
    border-top: 1px solid #f0f0f0 !important;
  }
  .crd-loans-table.responsive-table td[data-label="actions"] button {
    width: auto !important;
    min-height: 44px;
    min-width: 44px;
    padding: 8px;
  }
  .crd-loans-header { flex-direction: column; align-items: stretch; }
  .crd-add-loan-btn { width: 100%; justify-content: center; }
}
.crd-global-row { font-size: .8rem; color: #888; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f3f4f6; }
.crd-global-row strong { color: #444; }
.crd-amort-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px 20px; margin-top: 16px; }
.crd-amort-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.crd-amort-select { font-size: .84rem; padding: 6px 10px; border: 1.5px solid #dde1e7; border-radius: 8px; background: #fff; color: #111; cursor: pointer; outline: none; }
.crd-amort-tbl { width: 100%; border-collapse: collapse; font-size: .82rem; min-width: 580px; }
.crd-amort-tbl thead th { text-align: right; padding: 7px 8px; font-size: .7rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.crd-amort-tbl thead th:first-child, .crd-amort-tbl thead th:nth-child(2) { text-align: left; }
.crd-amort-tbl tbody td { text-align: right; padding: 7px 8px; border-bottom: 1px solid #f3f4f6; font-size: .8rem; color: #444; }
.crd-amort-tbl tbody tr:last-child td { border-bottom: none; }
.crd-amort-tbl tbody td:first-child, .crd-amort-tbl tbody td:nth-child(2) { text-align: left; }
.crd-amort-tbl tbody tr:nth-child(even) { background: #fafafa; }
.crd-amort-int { color: #b51818 !important; }
.crd-amort-crd { font-weight: 700; color: #111 !important; }
.crd-amort-show-more { display: block; width: 100%; margin-top: 8px; padding: 9px; background: none; border: 1.5px dashed #dde1e7; border-radius: 8px; font-size: .82rem; font-weight: 600; color: #888; cursor: pointer; transition: border-color .12s, color .12s; }
.crd-amort-show-more:hover { border-color: #c0120c; color: #c0120c; }
.crd-lisse-row { display: flex; align-items: center; gap: 12px; margin-top: 13px; padding-top: 12px; border-top: 1px solid #f3f4f6; flex-wrap: wrap; }
.crd-lisse-label { display: flex; align-items: center; gap: 7px; font-size: .85rem; font-weight: 600; color: #374151; cursor: pointer; user-select: none; }
.crd-lisse-label input[type="checkbox"] { width: 15px; height: 15px; accent-color: #c0120c; cursor: pointer; }
.crd-lisse-select { font-size: .82rem; padding: 5px 9px; border: 1.5px solid #dde1e7; border-radius: 7px; color: #111; background: #fff; cursor: pointer; outline: none; }
.crd-lisse-select:focus { border-color: #c0120c; }
.loan-lisse-badge { font-size: .68rem; font-weight: 700; color: #fff; background: #c0120c; border-radius: 4px; padding: 2px 6px; vertical-align: middle; margin-left: 4px; text-transform: uppercase; letter-spacing: .03em; }
.crd-amort-palier td { background: #fef3f2; color: #b51818 !important; font-size: .74rem; font-weight: 700; padding: 5px 10px !important; text-transform: uppercase; letter-spacing: .05em; border-top: 2px solid #fca5a5 !important; border-bottom: 0 !important; }

/* ===== SUBSCRIPTION PAGE ===== */
.sub-page { width: 100%; padding: 32px 28px; box-sizing: border-box; }
.sub-header { margin-bottom: 28px; }
.sub-title { font-size: 1.6rem; font-weight: 700; color: #111; margin: 0 0 6px; }
.sub-subtitle { color: #666; font-size: 0.97rem; margin: 0; }
.sub-current-wrap { margin-bottom: 32px; }
.sub-current-card { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 18px 24px; gap: 24px; flex-wrap: wrap; }
.sub-current-left { display: flex; align-items: center; gap: 14px; }
.sub-current-label { font-size: 0.8rem; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.06em; }
.sub-plan-badge-free { background: #f3f4f6; color: #555; border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; font-size: 0.82rem; font-weight: 600; }
.sub-current-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.sub-current-stat { display: flex; flex-direction: column; gap: 2px; }
.sub-current-stat-label { font-size: 0.75rem; color: #aaa; }
.sub-current-stat-val { font-size: 0.95rem; font-weight: 600; color: #222; }
.sub-status-active { color: #374151; }
.sub-plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 28px; }
@media (max-width: 900px) { .sub-plans-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 580px) { .sub-plans-grid { grid-template-columns: 1fr; } }
.sub-plan-card { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; position: relative; transition: box-shadow 0.2s; }
.sub-plan-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.sub-plan-featured { border-color: var(--brand); border-width: 2px; box-shadow: 0 6px 32px rgba(224,32,32,0.12); }
.sub-best-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 3px 12px; border-radius: 20px; letter-spacing: 0.05em; white-space: nowrap; text-transform: uppercase; }
.sub-plan-header { display: flex; flex-direction: column; gap: 6px; }
.sub-plan-name { font-size: 1.05rem; font-weight: 700; color: #111; }
.sub-plan-price { display: flex; align-items: baseline; gap: 2px; }
.sub-plan-amount { font-size: 2rem; font-weight: 800; color: #111; }
.sub-plan-period { font-size: 0.85rem; color: #888; }
.sub-plan-limit { font-size: 0.78rem; color: #888; background: #f9fafb; border: 1px solid var(--line); border-radius: 5px; padding: 3px 8px; width: fit-content; }
.sub-features-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.sub-feature-ok, .sub-feature-locked, .sub-feature-base { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.sub-feature-ok { color: #333; }
.sub-feature-locked { color: #bbb; }
.sub-feature-base { color: #374151; font-size: 0.9rem; padding: 6px 8px; background: #f7f7f8; border-radius: 6px; margin-bottom: 4px; }
.sub-feature-base strong { font-weight: 600; }
.sub-cta-btn { width: 100%; padding: 11px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; border: 1.5px solid var(--line); background: #f9fafb; color: #555; transition: all 0.15s; margin-top: auto; }
.sub-cta-btn:disabled { opacity: 0.6; cursor: default; }
.sub-cta-featured { background: var(--brand); color: #fff; border-color: var(--brand); }
.sub-cta-featured:hover { background: #c01818; }
.sub-cta-current { background: #f3f4f6; color: #999; border-color: var(--line); }
.sub-footer-note { font-size: 0.82rem; color: #999; text-align: center; padding: 12px; }
.sub-footer-note a { color: var(--brand); text-decoration: none; }
.sub-current-compact { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 20px; }
.sub-current-sep { color: #ccc; font-size: 0.9rem; }
.sub-current-biens { font-size: 0.88rem; color: #555; font-weight: 500; }
.sub-current-status { font-size: 0.88rem; color: #374151; font-weight: 600; }
.sub-detail-accordion { margin-top: 2px; }
.sub-detail-toggle { font-size: 0.82rem; color: var(--brand); cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; font-weight: 500; }
.sub-detail-toggle::-webkit-details-marker { display: none; }
.sub-detail-toggle::before { content: "+ "; }
details[open] .sub-detail-toggle::before { content: "- "; }
.sub-detail-list { list-style: none; padding: 8px 0 4px 8px; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.sub-detail-list li { font-size: 0.82rem; color: #666; padding-left: 12px; position: relative; }
.sub-detail-list li::before { content: "✓"; position: absolute; left: 0; color: #9ca3af; font-size: 0.75rem; }

/* ── Billing toggle (page abonnement – fond clair) ───────────────────────── */
.sub-billing-toggle {
  display: flex;
  gap: 4px;
  background: #e2e4e8;
  border: 1.5px solid #cacdd2;
  border-radius: 99px;
  padding: 4px;
  margin: 0 auto 24px;
  width: fit-content;
}
.sbt-btn {
  background: transparent;
  border: none;
  color: #444;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 99px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: background 180ms, color 180ms;
  font-family: inherit;
  white-space: nowrap;
}
.sbt-btn--active { background: #fff; color: #111; box-shadow: 0 2px 8px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.06); }
.sbt-btn:not(.sbt-btn--active):hover { color: #111; background: rgba(0,0,0,0.04); }
.sbt-badge {
  background: #fde8e8;
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}
/* Prix dans les cartes plan (page abonnement) */
.sub-plan-price { display: flex; flex-direction: column; gap: 0; }
.sub-price-row { display: flex; align-items: baseline; gap: 2px; }
.sub-price-hidden { display: none; }
.sub-annual-detail { display: flex; flex-direction: column; gap: 1px; margin-top: 3px; }
.sub-annual-billed { font-size: 0.78rem; color: #888; }
.sub-annual-save { font-size: 0.74rem; color: #bbb; text-decoration: line-through; }
.sub-monthly-detail { font-size: 0.75rem; color: #aaa; margin-top: 3px; }

/* ===== FISCALITE PAGES ===== */
.fisc-page { max-width: none; width: 100%; box-sizing: border-box; padding: 24px 28px; }
.fisc-disclaimer { display: flex; align-items: flex-start; gap: 10px; background: #f7f7f8; border: 1.5px solid #e5e5e5; border-radius: 10px; padding: 11px 16px; font-size: 0.82rem; color: #555555; margin-bottom: 14px; line-height: 1.4; }
.fisc-disclaimer svg { flex-shrink: 0; margin-top: 1px; }
.fisc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.fisc-title { font-size: 1.6rem; font-weight: 700; color: #111; margin: 0 0 6px; }
.fisc-subtitle { color: #666; font-size: 0.97rem; margin: 0; }
.fisc-year-wrap { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.fisc-year-label { font-size: 0.75rem; color: #aaa; text-transform: uppercase; letter-spacing: 0.06em; }
.fisc-year-select { border: 1.5px solid var(--line); border-radius: 8px; padding: 7px 12px; font-size: 0.9rem; color: #222; background: #fff; cursor: pointer; }
.fisc-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 32px; width: 100%; }
.fisc-kpi-grid-2 { margin-top: -20px; }
@media (max-width: 900px) { .fisc-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.fisc-kpi-card { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 20px 18px; display: flex; flex-direction: column; gap: 4px; }
.fisc-kpi-pos-bg { border-color: #e5e7eb; background: #f7f7f8; }
.fisc-kpi-neg-bg { border-left: 3px solid #b51818; }
.fisc-kpi-label { font-size: 0.78rem; color: #888; font-weight: 500; }
.fisc-kpi-val { font-size: 1.4rem; font-weight: 700; color: #111; }
.fisc-kpi-sub { font-size: 0.73rem; color: #aaa; }
.fisc-pos { color: #374151; }
.fisc-neg { color: #b51818; }
.fisc-warn { color: #b91c1c; }
.fisc-section-title { font-size: 0.85rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.07em; margin: 16px 0 10px; border-bottom: 1px solid #f0f0f0; padding-bottom: 6px; }
.fisc-table-wrap { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 20px; width: 100%; }
.fisc-table-scroll { overflow-x: auto; }
.fisc-table-row { display: grid; grid-template-columns: 2fr 0.8fr 1fr 1fr 1fr 0.7fr 1.1fr 0.8fr; gap: 12px; padding: 12px 20px; align-items: center; }
.fisc-table-row-11 { grid-template-columns: 1.8fr 0.85fr 0.65fr 0.9fr 0.9fr 0.8fr 0.65fr 0.85fr 0.9fr 0.65fr 0.75fr; min-width: 1100px; }
.fisc-table-head { background: #f9fafb; font-size: 0.75rem; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1.5px solid var(--line); }
.fisc-table-data { font-size: 0.85rem; color: #333; border-bottom: 1px solid #f5f5f5; }
.fisc-table-data:last-child { border-bottom: none; }
.fisc-prop-name { font-weight: 600; color: #111; display: flex; flex-direction: column; gap: 2px; }
.fisc-prop-city { font-weight: 400; font-size: 0.75rem; color: #aaa; }
.fisc-regime-badge { display: inline-block; font-size: 0.7rem; font-weight: 600; color: #666; background: #f3f4f6; border-radius: 4px; padding: 2px 6px; border: 1px solid var(--line); }
.fisc-empty { padding: 32px; text-align: center; color: #aaa; font-size: 0.9rem; }
.fisc-note-capital { display: flex; align-items: flex-start; gap: 10px; background: #fff5f5; border: 1.5px solid #fecaca; border-radius: 10px; padding: 12px 16px; font-size: 0.82rem; color: #9b1c1c; margin-top: 20px; }
.fisc-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.fisc-alert-item { display: flex; align-items: center; gap: 10px; background: #fff5f5; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 14px; font-size: 0.83rem; color: #9b1c1c; }
.fisc-alert-critique  { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.fisc-alert-important { background: #fff5f5; border-color: #fecaca; color: #9b1c1c; }
.fisc-alert-faible    { background: #f7f7f8; border-color: #e5e5e5; color: #555555; }
.fisc-alert-sev-badge { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
.fisc-sev-critique  { background: #fee2e2; color: #b51818; }
.fisc-sev-important { background: #f7f7f8; color: #b91c1c; }
.fisc-sev-faible    { background: #f7f7f8; color: #555555; }
.fisc-alert-icon { flex-shrink: 0; }
.fisc-alert-text { flex: 1; }
.fisc-alert-fix-btn { font-size: 0.78rem; font-weight: 600; padding: 4px 10px; border-radius: 6px; border: 1.5px solid var(--brand); color: var(--brand); background: #fff; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.fisc-alert-fix-btn:hover { background: var(--brand); color: #fff; }
.fisc-alert-ok { display: flex; align-items: center; gap: 10px; background: #f7f7f8; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 12px 16px; font-size: 0.85rem; color: #374151; margin-bottom: 20px; }
.fisc-dossier-ok   { display: inline-block; font-size: 0.7rem; font-weight: 700; background: #f3f4f6; color: #374151; border-radius: 4px; padding: 2px 7px; }
.fisc-dossier-warn { display: inline-block; font-size: 0.7rem; font-weight: 700; background: #fff7ed; color: #c41d15; border-radius: 4px; padding: 2px 7px; }
.fisc-result-cell { font-weight: 700; }
/* Exports */
.fisc-exports-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; width: 100%; }
.fisc-exports-grid-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
@media (max-width: 700px) { .fisc-exports-grid-cols { grid-template-columns: 1fr; } }
.fisc-export-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 20px; }
.fisc-export-soon { opacity: 0.6; }
.fisc-export-icon { color: var(--brand); flex-shrink: 0; }
.fisc-export-info { flex: 1; }
.fisc-export-label { font-size: 0.92rem; font-weight: 600; color: #111; margin-bottom: 2px; display: flex; align-items: center; gap: 8px; }
.fisc-export-desc { font-size: 0.8rem; color: #888; }
.fisc-soon-badge { font-size: 0.68rem; font-weight: 600; color: #888; background: #f3f4f6; border-radius: 4px; padding: 2px 6px; }
.fisc-export-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; border: 1.5px solid var(--brand); color: var(--brand); background: #fff; transition: all 0.15s; white-space: nowrap; }
.fisc-export-btn:hover { background: var(--brand); color: #fff; }
.fisc-export-btn-disabled { border-color: var(--line); color: #bbb; cursor: not-allowed; }
/* Regimes */
.fisc-biens-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 4px; width: 100%; }
.fisc-bien-card { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.fisc-bien-header { display: flex; align-items: center; gap: 12px; }
.fisc-bien-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.fisc-bien-name { font-size: 0.9rem; font-weight: 600; color: #111; }
.fisc-bien-city { font-size: 0.75rem; color: #aaa; }
.fisc-bien-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.fisc-tag { font-size: 0.72rem; font-weight: 500; color: #666; background: #f3f4f6; border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; }
.fisc-bien-desc { font-size: 0.8rem; color: #666; line-height: 1.4; }
.fisc-bien-note { font-size: 0.78rem; color: #4b5563; background: #f9fafb; border-left: 3px solid var(--line); border-radius: 0 6px 6px 0; padding: 6px 10px; }
.fisc-bien-edit-btn { display: flex; align-items: center; gap: 5px; font-size: 0.75rem; font-weight: 600; padding: 5px 10px; border-radius: 7px; border: 1.5px solid var(--line); color: #666; background: #fff; cursor: pointer; flex-shrink: 0; white-space: nowrap; }
.fisc-bien-edit-btn:hover { border-color: var(--brand); color: var(--brand); }
.fisc-regime-vigilance { font-size: 0.75rem; color: #888; background: #f9fafb; border-radius: 6px; padding: 6px 10px; border-left: 3px solid #e5e7eb; font-style: italic; }
.fisc-regimes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; width: 100%; }
@media (max-width: 1200px) { .fisc-regimes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .fisc-regimes-grid { grid-template-columns: 1fr; } }
.fisc-regime-card { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.fisc-regime-header { display: flex; align-items: center; gap: 12px; }
.fisc-regime-badge-lg { display: inline-block; font-size: 0.75rem; font-weight: 700; border-radius: 6px; padding: 4px 10px; border: 1px solid; white-space: nowrap; }
.fisc-regime-name { font-size: 0.95rem; font-weight: 700; color: #111; }
.fisc-regime-type { font-size: 0.75rem; color: #aaa; }
.fisc-regime-desc { font-size: 0.83rem; color: #555; line-height: 1.45; }
.fisc-regime-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fisc-regime-list-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.fisc-regime-item { font-size: 0.8rem; padding: 2px 0; }
.fisc-regime-when { font-size: 0.78rem; color: #666; background: #f9fafb; border-radius: 6px; padding: 8px 10px; border-left: 3px solid var(--line); margin-top: auto; }

/* ===== FISCALITE - NOUVEAU DESIGN (fp-*) ===== */
.fp-page { max-width: none; padding: 24px 28px; box-sizing: border-box; }
.fp-disclaimer { display: flex; align-items: flex-start; gap: 10px; background: #f8f8f8; border: 1px solid #e5e5e5; border-radius: 10px; padding: 11px 16px; font-size: .81rem; color: #555; margin-bottom: 16px; line-height: 1.4; }
.fp-disclaimer svg { flex-shrink: 0; margin-top: 1px; color: #888; }
.fp-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.fp-title { font-size: 1.55rem; font-weight: 700; color: #111; margin: 0 0 5px; }
.fp-subtitle { font-size: .86rem; color: #777; margin: 0; }
.fp-header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fp-year-wrap { display: flex; flex-direction: column; gap: 3px; }
.fp-year-lbl { font-size: .72rem; color: #999; font-weight: 500; }

/* Tabs bar */
.fp-tabs-bar { display: flex; gap: 4px; background: #f1f3f5; border-radius: 12px; padding: 4px; margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.fp-tabs-bar::-webkit-scrollbar { display: none; }
.fp-tab-btn { background: none; border: none; padding: 10px 16px; font-size: .86rem; font-weight: 600; color: #444; cursor: pointer; border-radius: 99px; white-space: nowrap; display: flex; align-items: center; gap: 6px; min-height: 44px; transition: background .15s, color .15s; }
.fp-tab-btn:hover { background: #e2e5e9; color: #111; }
.fp-tab-btn.active { background: var(--brand,#c0120c); color: #fff; }
.fp-tab-bdg { background: #e2e5e9; color: #555; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 9px; }
.fp-tab-btn.active .fp-tab-bdg { background: rgba(255,255,255,0.28); color: #fff; }
.fp-tab-body { min-height: 200px; }

/* Boutons génériques */
.fp-btn-sm { font-size: .8rem; padding: 6px 13px; border-radius: 7px; }
.fp-btn-ghost { background: none; border: 1.5px solid #e5e5e5; color: #555; cursor: pointer; border-radius: 7px; font-size: .8rem; padding: 6px 12px; transition: background .15s; }
.fp-btn-ghost:hover { background: #f5f5f5; }
.fp-btn-outline { background: #fff; border: 1.5px solid var(--brand,#cc3333); color: var(--brand,#cc3333); cursor: pointer; border-radius: 7px; font-size: .8rem; padding: 6px 12px; transition: background .15s; }
.fp-btn-outline:hover { background: var(--brand,#cc3333); color: #fff; }
.fp-neg { color: #b51818; }
.fp-pos { color: #374151; }

/* Score card */
.fp-score-card { background: #fff; border: 1.5px solid #e8e8e8; border-radius: 14px; padding: 20px 22px; margin-bottom: 20px; }
.fp-score-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.fp-score-title { font-size: 1rem; font-weight: 700; color: #111; margin-bottom: 3px; }
.fp-score-sub { font-size: .78rem; color: #999; }
.fp-score-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.fp-score-pct { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.fp-score-lbl { font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; border: 1.5px solid; }
.fp-score-track { height: 7px; background: #f0f0f0; border-radius: 99px; overflow: hidden; margin-bottom: 14px; }
.fp-score-fill { height: 100%; border-radius: 99px; transition: width .4s; }
.fp-score-cta { display: flex; align-items: center; gap: 12px; }
.fp-score-hint { font-size: .78rem; color: #999; }
.fp-score-ok { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: #374151; font-weight: 500; }

/* KPI grid */
.fp-kpi-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width:1100px) { .fp-kpi-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width:680px)  { .fp-kpi-grid { grid-template-columns: repeat(2,1fr); } }
.fp-kpi { background: #fff; border: 1.5px solid #e8e8e8; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.fp-kpi--neg { border-color: #e8e8e8; border-left: 3px solid #b51818; }
.fp-kpi-lbl { font-size: .74rem; color: #999; font-weight: 500; display: flex; align-items: center; gap: 3px; }
.fp-kpi-val { font-size: 1.25rem; font-weight: 700; color: #111; }
.fp-kpi--neg .fp-kpi-val { color: #b51818; }
.fp-kpi-sub { font-size: .7rem; color: #bbb; }

/* Note */
.fp-note { display: flex; align-items: flex-start; gap: 9px; background: #fff; border: 1px solid #e8e8e8; border-left: 3px solid #b51818; border-radius: 9px; padding: 11px 14px; font-size: .8rem; color: #374151; margin: 16px 0; }
.fp-note svg { flex-shrink: 0; margin-top: 1px; color: #b51818; }
.fp-note strong { color: inherit; }

/* Section header */
.fp-section-hd { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #999; margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fp-section-sub { font-size: .72rem; color: #888; font-weight: 400; text-transform: none; letter-spacing: 0; }
.fp-chip { font-size: .68rem; font-weight: 700; padding: 2px 7px; border-radius: 5px; }
.fp-chip--crit { background: #fee2e2; color: #b51818; }
.fp-chip--imp  { background: #f7f7f8; color: #b91c1c; }
.fp-chip--fai  { background: #f7f7f8; color: #555555; }

/* Alerts */
.fp-alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.fp-alert { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-radius: 9px; padding: 11px 14px; font-size: .83rem; border: 1px solid; }
.fp-alert--critique  { background: #fff; border-color: #e2e8f0; border-left: 3px solid #b51818; color: #374151; }
.fp-alert--important { background: #fff; border-color: #e2e8f0; border-left: 3px solid #b51818; color: #374151; }
.fp-alert--faible    { background: #f8fafc; border-color: #e2e8f0; color: #475569; }
.fp-alert-body { flex: 1; }
.fp-alert-txt { font-weight: 500; margin-bottom: 3px; }
.fp-alert-exp { font-size: .78rem; color: inherit; opacity: .75; margin-bottom: 2px; }
.fp-alert-fix { font-size: .78rem; font-style: italic; }
.fp-ok-banner { display: flex; align-items: center; gap: 9px; background: #f7f7f8; border: 1px solid #e5e7eb; border-radius: 9px; padding: 12px 15px; font-size: .84rem; color: #374151; margin-bottom: 20px; }
.fp-opti-banner { display: flex; align-items: flex-start; gap: 10px; background: #fffbeb; border: 1.5px solid #fcd34d; border-radius: 10px; padding: 12px 15px; font-size: .82rem; color: #78350f; margin: 0 0 16px; }
.fp-opti-banner svg { flex-shrink: 0; margin-top: 2px; color: #d97706; }
.fp-opti-banner strong { color: #92400e; display: block; margin-bottom: 5px; }
.fp-opti-item { margin-bottom: 3px; }
.fp-opti-note { color: #a16207; font-size: .78rem; margin-top: 5px; display: block; }
.fp-empty { color: #aaa; font-size: .85rem; padding: 24px 0; text-align: center; }

/* Par bien */
.fp-bien-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px,1fr)); gap: 16px; }
.fp-bien-card { background: #fff; border: 1.5px solid #e8e8e8; border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.fp-bien-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fp-bien-name { font-size: .95rem; font-weight: 700; color: #111; margin-bottom: 2px; }
.fp-bien-addr { font-size: .77rem; color: #999; }
.fp-sc-badge { font-size: .7rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; }
.fp-sc-ok   { background: #f3f4f6; color: #374151; }
.fp-sc-warn { background: #f7f7f8; color: #9b1c1c; }
.fp-sc-bad  { background: #fee2e2; color: #b51818; }
.fp-bien-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.fp-badge { display: inline-flex; font-size: .72rem; font-weight: 500; padding: 3px 8px; border-radius: 6px; border: 1px solid; white-space: nowrap; }
.fp-badge--neutral { background: #f5f5f5; color: #555; border-color: #e5e5e5; }
.fp-badge--type    { background: #f7f7f8; color: #c41d15; border-color: #fecaca; }
.fp-badge--reg     { background: #faf5ff; color: #c0120c; border-color: #e9d5ff; }
.fp-badge--decl    { background: #f8fafc; color: #475569; border-color: #cbd5e1; }
.fp-bien-warn { display: flex; align-items: flex-start; gap: 8px; background: #fff5f5; border: 1px solid #fecaca; border-radius: 8px; padding: 9px 12px; font-size: .78rem; color: #9b1c1c; }
.fp-bien-warn svg { flex-shrink: 0; margin-top: 1px; }
.fp-bien-warn--crit { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.fp-bien-nums { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; background: #fafafa; border-radius: 10px; padding: 12px; }
.fp-nr { display: flex; flex-direction: column; gap: 2px; }
.fp-nr--result { grid-column: 1/-1; border-top: 1px solid #eee; padding-top: 8px; margin-top: 2px; }
.fp-nr-lbl { font-size: .7rem; color: #aaa; }
.fp-nr strong { font-size: .88rem; font-weight: 700; color: #111; }
.fp-bien-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Régimes */
.fp-config-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 12px; margin-bottom: 8px; }
.fp-config-card { background: #fff; border: 1.5px solid #e8e8e8; border-radius: 12px; padding: 16px; }
.fp-config-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.fp-config-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.fp-config-ident { flex: 1; }
.fp-config-name { font-size: .88rem; font-weight: 600; color: #111; }
.fp-config-city { font-size: .74rem; color: #999; }
.fp-config-desc { font-size: .77rem; color: #888; margin-top: 8px; line-height: 1.4; }
.fp-regimes-intro { font-size: .8rem; color: #888; margin: 4px 0 16px; line-height: 1.5; }
.fp-regimes-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(300px,1fr)); gap: 16px; }
.fp-regime-card { background: #fff; border: 1.5px solid #e8e8e8; border-radius: 13px; padding: 18px 20px; }
.fp-regime-hd { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.fp-regime-bdg { font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 7px; border: 1px solid; flex-shrink: 0; }
.fp-regime-name { font-size: .9rem; font-weight: 700; color: #111; margin-bottom: 2px; }
.fp-regime-type { font-size: .74rem; color: #999; }
.fp-regime-adressed { font-size: .78rem; color: #555; background: #f8f8f8; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.4; }
.fp-regime-desc { font-size: .82rem; color: #555; line-height: 1.45; margin-bottom: 12px; }
.fp-regime-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: .76rem; }
.fp-rl-hd { font-weight: 600; margin-bottom: 4px; }
.fp-rl-item { margin-bottom: 3px; line-height: 1.35; }
.fp-ok  { color: #374151; }
.fp-neg { color: #b51818; }
.fp-warn{ color: #b91c1c; }
.fp-regime-ft { font-size: .71rem; color: #aaa; margin-top: 12px; font-style: italic; border-top: 1px solid #f0f0f0; padding-top: 8px; }

/* Charges & justificatifs */
.fp-justif-sum { display: flex; align-items: center; gap: 14px; font-size: .82rem; color: #555; margin-bottom: 12px; flex-wrap: wrap; }
.fp-justif-filters { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.fp-filter-btn { background: #f5f5f5; border: 1.5px solid transparent; color: #666; border-radius: 7px; padding: 6px 13px; font-size: .8rem; cursor: pointer; }
.fp-filter-btn:hover { background: #ececec; }
.fp-filter-btn.active { background: #E02020; color: #fff; border-color: #E02020; }
.fp-charges-table { background: #fff; border: 1.5px solid #e8e8e8; border-radius: 12px; overflow: hidden; }
.fp-ct-head { display: grid; grid-template-columns: 1.2fr 0.9fr 1.4fr 0.8fr 0.8fr 0.8fr; gap: 10px; padding: 10px 16px; background: #f9f9f9; font-size: .72rem; font-weight: 600; color: #999; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1.5px solid #f0f0f0; min-width: 700px; }
.fp-ct-row { display: grid; grid-template-columns: 1.2fr 0.9fr 1.4fr 0.8fr 0.8fr 0.8fr; gap: 10px; padding: 9px 16px; font-size: .82rem; color: #333; border-bottom: 1px solid #f5f5f5; align-items: center; min-width: 700px; }
.fp-ct-row:last-child { border-bottom: none; }
.fp-ct-prop { font-weight: 600; color: #111; }
.fp-ct-cat { color: #555; }
.fp-charges { overflow-x: auto; }
.fp-status { font-size: .71rem; font-weight: 600; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.fp-status--ok   { background: #f3f4f6; color: #374151; }
.fp-status--warn { background: #f7f7f8; color: #9b1c1c; }
.fp-status--miss { background: #fee2e2; color: #b51818; }

/* Exports */
.fp-exports-intro { font-size: .84rem; color: #666; margin-bottom: 20px; line-height: 1.5; }
.fp-exp-group { margin-bottom: 24px; }
.fp-exp-title { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #aaa; margin-bottom: 12px; }
.fp-exp-cards { display: flex; flex-direction: column; gap: 10px; }
.fp-exp-cards--sm { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 10px; }
.fp-exp-card { background: #fff; border: 1.5px solid #e8e8e8; border-radius: 12px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.fp-exp-card--sm { padding: 12px 14px; }
.fp-exp-icon { color: #999; flex-shrink: 0; }
.fp-exp-info { flex: 1; }
.fp-exp-lbl { font-size: .88rem; font-weight: 600; color: #111; margin-bottom: 3px; }
.fp-exp-desc { font-size: .76rem; color: #999; line-height: 1.4; }

/* ===== EXPORTS FISCAUX (fex-*) ===== */
.fex-page { max-width: none; padding: 24px 28px; box-sizing: border-box; }
.fex-disclaimer { display: flex; align-items: flex-start; gap: 10px; background: #f8f8f8; border: 1px solid #e5e5e5; border-radius: 10px; padding: 11px 16px; font-size: .81rem; color: #555; margin-bottom: 16px; line-height: 1.4; }
.fex-disclaimer svg { flex-shrink: 0; margin-top: 1px; color: #888; }
.fex-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.fex-title { font-size: 1.55rem; font-weight: 700; color: #111; margin: 0 0 5px; }
.fex-subtitle { font-size: .86rem; color: #777; margin: 0; }
.fex-year-wrap { display: flex; flex-direction: column; gap: 3px; }
.fex-year-lbl { font-size: .72rem; color: #999; font-weight: 500; }
.fex-year-sel { font-size: .88rem; border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 7px 10px; color: #333; background: #fff; cursor: pointer; }
.fex-alert-banner { display: flex; align-items: center; gap: 9px; background: #fff5f5; border: 1px solid #fecaca; border-radius: 9px; padding: 10px 14px; font-size: .83rem; color: #9b1c1c; margin-bottom: 18px; }
.fex-alert-banner svg { flex-shrink: 0; }
.fex-section { margin-bottom: 28px; }
.fex-section-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.fex-section-title { font-size: 1rem; font-weight: 700; color: #111; margin: 0; }
.fex-section-badge { font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; white-space: nowrap; }
.fex-section-badge--plan { background: #f7f7f8; color: #374151; border: 1px solid #e5e7eb; }
.fex-section-badge--unlim { background: #fdf4ff; color: #9333ea; border: 1px solid #e9d5ff; }
.fex-section-count { font-size: .78rem; color: #aaa; }
.fex-cards { display: flex; flex-direction: column; gap: 10px; }
.fex-card { background: #fff; border: 1.5px solid #e8e8e8; border-radius: 12px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; transition: border-color .15s; }
.fex-card:not(.fex-card--locked):not(.fex-card--coming):hover { border-color: #d0d0d0; }
.fex-card--locked { border-color: #f0f0f0; background: #fafafa; }
.fex-card--coming { border-color: #f0f0f0; background: #fafafa; }
.fex-card-icon { color: #999; flex-shrink: 0; }
.fex-card--locked .fex-card-icon,
.fex-card--coming .fex-card-icon { color: #ccc; }
.fex-card-body { flex: 1; min-width: 0; }
.fex-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.fex-card-title { font-size: .88rem; font-weight: 600; color: #111; }
.fex-card--locked .fex-card-title,
.fex-card--coming .fex-card-title { color: #bbb; }
.fex-card-desc { font-size: .76rem; color: #999; line-height: 1.4; margin: 0; }
.fex-card-cta { flex-shrink: 0; }
.fex-badge { display: inline-flex; align-items: center; gap: 3px; font-size: .68rem; font-weight: 600; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.fex-badge--ok    { background: #f7f7f8; color: #374151; }
.fex-badge--incomp { background: #fff5f5; color: #b91c1c; }
.fex-badge--soon  { background: #f1f5f9; color: #94a3b8; }
.fex-badge--unlim { background: #fdf4ff; color: #9333ea; }
.fex-btn { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; padding: 7px 14px; border-radius: 7px; cursor: pointer; white-space: nowrap; border: none; font-weight: 500; transition: opacity .15s, background .15s; }
.fex-btn--action { background: var(--brand,#cc3333); color: #fff; }
.fex-btn--action:hover { opacity: .88; }
.fex-btn--upgrade { background: #fdf4ff; color: #c0120c; border: 1px solid #e9d5ff; }
.fex-btn--upgrade:hover { background: #fff5f5; }
.fex-btn--soon { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.fex-bien-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 12px; }
.fex-prop-card { background: #fff; border: 1.5px solid #e8e8e8; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; min-height: 128px; transition: border-color .15s, box-shadow .15s; }
.fex-prop-card:hover { border-color: #ccc; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.fex-prop-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 5px; }
.fex-prop-card-name { font-size: .9rem; font-weight: 700; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.fex-prop-card-addr { font-size: .76rem; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
.fex-prop-card-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fex-prop-card-regime { font-size: .7rem; color: #555; background: #f5f5f5; border-radius: 4px; padding: 2px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fex-prop-card-score { font-size: .7rem; color: #888; }
.fex-prop-card-btn { width: 100%; background: #111; color: #fff; border: none; border-radius: 7px; padding: 9px 12px; font-size: .8rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: auto; transition: background .15s; }
.fex-prop-card-btn:hover { background: #333; }
.fex-empty { color: #aaa; font-size: .85rem; padding: 20px; text-align: center; background: #fafafa; border-radius: 10px; border: 1.5px dashed #e0e0e0; }
.fex-footer-note { display: flex; align-items: flex-start; gap: 8px; font-size: .78rem; color: #aaa; margin-top: 8px; line-height: 1.5; padding: 12px 0; border-top: 1px solid #f0f0f0; }
.fex-footer-note svg { flex-shrink: 0; margin-top: 1px; }
@media (max-width: 700px) {
  .fex-page { padding: 16px; }
  .fex-card { flex-wrap: wrap; }
  .fex-card-cta { width: 100%; }
  .fex-btn { width: 100%; justify-content: center; }
  .fex-bien-grid { grid-template-columns: 1fr; }
}

/* ===== RÉGIMES FISCAUX (frg-*) ===== */

.frg-page { padding: 24px 28px; max-width: none; box-sizing: border-box; }
.frg-disclaimer { display: flex; align-items: flex-start; gap: 8px; font-size: .8rem; color: #666; background: #f7f7f7; border: 1px solid #e8e8e8; border-radius: 8px; padding: 10px 14px; margin-bottom: 20px; line-height: 1.5; }
.frg-disclaimer svg { flex-shrink: 0; margin-top: 1px; color: #999; }
.frg-header { margin-bottom: 20px; }
.frg-title { font-size: 1.45rem; font-weight: 700; color: #111; margin: 0 0 4px; }
.frg-subtitle { font-size: .9rem; color: #666; margin: 0; }
.frg-alert-banner { display: flex; align-items: center; gap: 10px; background: #fff3f3; border: 1px solid #ffd0d0; border-radius: 8px; padding: 11px 16px; font-size: .85rem; color: #c0392b; margin-bottom: 20px; }
.frg-alert-banner svg { flex-shrink: 0; }

/* Sections */
.frg-section { margin-bottom: 32px; }
.frg-section-hd { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.frg-section-title { font-size: 1rem; font-weight: 700; color: #111; }
.frg-section-sub { font-size: .8rem; color: #aaa; }
.frg-empty { color: #aaa; font-size: .85rem; padding: 20px; text-align: center; background: #fafafa; border-radius: 10px; border: 1.5px dashed #e0e0e0; }

/* Badges (sober: gray bg, light border, black/red text) */
.frg-badge { display: inline-flex; align-items: center; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: #f2f2f2; border: 1px solid #ddd; color: #333; line-height: 1.6; }
.frg-badge--regime { background: #f5f5f5; border-color: #d0d0d0; color: #111; }
.frg-badge--simple  { background: #f5f5f5; border-color: #d8d8d8; color: #555; }
.frg-badge--moyen   { background: #fafaf5; border-color: #e0ddc8; color: #7a6a1a; }
.frg-badge--complexe { background: #fff5f5; border-color: #f0cece; color: #c0392b; }
.frg-badge--ok   { background: #f0faf0; border-color: #c3e6c3; color: #1a7a3a; }
.frg-badge--mid  { background: #fffaf0; border-color: #f0dda0; color: #8a6600; }
.frg-badge--warn { background: #fff5f5; border-color: #f0cece; color: #c0392b; }
.frg-badge--verifier { background: #fff5f5; border-color: #f5cece; color: #c0392b; font-weight: 700; }

/* Complexity dots */
.frg-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e0e0e0; margin-right: 2px; }
.frg-dot-on { background: #c0392b; }

/* Section 1 - Property cards grid */
.frg-biens-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.frg-bien-card { background: #fff; border: 1.5px solid #ebebeb; border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.frg-bien-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.frg-bien-info { flex: 1; min-width: 0; }
.frg-bien-name { font-size: .9rem; font-weight: 600; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frg-bien-city { font-size: .78rem; color: #999; margin-top: 1px; }
.frg-bien-btn { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; color: #c0392b; background: #fff5f5; border: 1px solid #f5cece; border-radius: 6px; padding: 4px 10px; cursor: pointer; white-space: nowrap; transition: background .15s; }
.frg-bien-btn:hover { background: #ffe8e8; }
.frg-bien-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.frg-bien-desc { font-size: .78rem; color: #777; line-height: 1.5; }
.frg-bien-desc--empty { color: #ccc; font-style: italic; }

/* Section 2 - Filter pills */
.frg-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.frg-filter-pill { font-size: .78rem; font-weight: 500; padding: 5px 13px; border-radius: 20px; border: 1.5px solid #e0e0e0; background: #fafafa; color: #555; cursor: pointer; transition: all .15s; }
.frg-filter-pill:hover { border-color: #bbb; background: #f2f2f2; }
.frg-filter-pill--active { border-color: #c0392b; background: #fff5f5; color: #c0392b; font-weight: 700; }

/* Regime cards grid */
.frg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.frg-card { background: #fff; border: 1.5px solid #ebebeb; border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .18s; }
.frg-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.07); }
.frg-card--vigilance { border-color: #f5cece; background: #fffbfb; }
.frg-card-head { display: flex; flex-direction: column; gap: 5px; }
.frg-card-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.frg-card-name { font-size: .95rem; font-weight: 700; color: #111; }
.frg-card-type { font-size: .78rem; color: #999; }
.frg-card-principle { font-size: .82rem; color: #555; line-height: 1.55; margin: 0; }
.frg-card-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.frg-card-list { display: flex; flex-direction: column; gap: 3px; }
.frg-list-title { font-size: .72rem; font-weight: 700; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .04em; }
.frg-list-title.frg-list-ok { color: #1a7a3a; }
.frg-list-title.frg-list-no { color: #c0392b; }
.frg-list-item { font-size: .78rem; line-height: 1.4; }
.frg-list-item.frg-list-ok { color: #2e7d4a; }
.frg-list-item.frg-list-no { color: #b03020; }
.frg-list-item.frg-list-warn { color: #8a5e00; }
.frg-card-warn { display: flex; align-items: flex-start; gap: 6px; font-size: .78rem; color: #a05a00; background: #fffbf0; border: 1px solid #eedba0; border-radius: 6px; padding: 7px 10px; line-height: 1.45; }
.frg-card-warn svg { flex-shrink: 0; margin-top: 1px; }
.frg-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #f2f2f2; padding-top: 10px; margin-top: 2px; }
.frg-form-tag { font-size: .72rem; color: #888; background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 4px; padding: 2px 7px; }
.frg-detail-btn { font-size: .78rem; font-weight: 600; color: #c0392b; background: none; border: none; cursor: pointer; padding: 0; white-space: nowrap; }
.frg-detail-btn:hover { text-decoration: underline; }

/* Section 3 - Comparison table */
.frg-table-wrap { overflow-x: auto; border: 1.5px solid #ebebeb; border-radius: 10px; }
.frg-table { width: 100%; border-collapse: collapse; font-size: .8rem; min-width: 720px; }
.frg-th { background: #f7f7f7; font-weight: 700; color: #333; padding: 10px 12px; text-align: center; border-bottom: 1.5px solid #e8e8e8; border-right: 1px solid #f0f0f0; font-size: .78rem; white-space: nowrap; }
.frg-th:last-child { border-right: none; }
.frg-th--row { text-align: left; min-width: 140px; }
.frg-tr:hover td { background: #fafafa; }
.frg-tr--alt td { background: #fbfbfb; }
.frg-tr--alt:hover td { background: #f5f5f5; }
.frg-td { padding: 9px 12px; text-align: center; color: #444; border-bottom: 1px solid #f2f2f2; border-right: 1px solid #f5f5f5; }
.frg-td:last-child { border-right: none; }
.frg-td--label { text-align: left; font-weight: 600; color: #333; background: #fafafa !important; border-right: 1.5px solid #e8e8e8 !important; }
.frg-td--ok { color: #1a7a3a; font-weight: 700; }
.frg-td--no { color: #c0392b; font-weight: 700; }
.frg-table-mobile-cards { display: none; }
.frg-regime-mc { background: #fff; border: 1.5px solid #e8e8e8; border-radius: 10px; overflow: hidden; }
.frg-regime-mc-hd { background: #f7f7f7; font-size: .82rem; font-weight: 700; color: #111; padding: 8px 12px; border-bottom: 1.5px solid #e8e8e8; }
.frg-regime-mc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 12px; font-size: .79rem; border-bottom: 1px solid #f3f3f3; }
.frg-regime-mc-row:last-child { border-bottom: none; }
.frg-regime-mc-lbl { color: #666; }
.frg-regime-mc-val { font-weight: 600; color: #111; text-align: right; }

/* Section 4 - Comment choisir */
.frg-choice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.frg-choice-card { background: #fff; border: 1.5px solid #ebebeb; border-radius: 12px; padding: 18px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.frg-choice-icon { color: #c0392b; opacity: .8; }
.frg-choice-label { font-size: .85rem; font-weight: 600; color: #222; line-height: 1.4; }
.frg-choice-result { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 5px; }
.frg-choice-result--multi { flex-direction: row; }
.frg-choice-or { font-size: .75rem; color: #aaa; }
.frg-choice-tip { font-size: .77rem; color: #888; line-height: 1.45; }

/* Global CTAs */
.frg-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 24px; }
.frg-cta-btn { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 600; padding: 9px 18px; border-radius: 8px; border: 1.5px solid #ddd; background: #fff; color: #333; cursor: pointer; transition: all .15s; }
.frg-cta-btn:hover { background: #f5f5f5; border-color: #bbb; }
.frg-cta-btn--primary { background: #c0392b; border-color: #c0392b; color: #fff; }
.frg-cta-btn--primary:hover { background: #a93226; border-color: #a93226; }
.frg-footer-note { display: flex; align-items: flex-start; gap: 8px; font-size: .78rem; color: #aaa; margin-top: 8px; line-height: 1.5; padding: 12px 0; border-top: 1px solid #f0f0f0; }
.frg-footer-note svg { flex-shrink: 0; margin-top: 1px; }

/* Modal */
.frg-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.frg-modal { background: #fff; border-radius: 14px; max-width: 680px; width: 100%; max-height: 88vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.18); display: flex; flex-direction: column; }
.frg-modal-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; border-bottom: 1.5px solid #f0f0f0; position: sticky; top: 0; background: #fff; z-index: 1; }
.frg-modal-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 1rem; font-weight: 700; color: #111; }
.frg-modal-type { font-size: .8rem; font-weight: 400; color: #999; margin-left: 4px; }
.frg-modal-close { background: none; border: none; cursor: pointer; color: #999; padding: 2px; border-radius: 4px; flex-shrink: 0; }
.frg-modal-close:hover { color: #333; }
.frg-modal-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.frg-modal-section { display: flex; flex-direction: column; gap: 6px; }
.frg-modal-section p { font-size: .85rem; color: #555; line-height: 1.6; margin: 0; }
.frg-modal-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #888; }
.frg-modal-label--warn { color: #a05a00; }
.frg-modal-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.frg-modal-footer { border-top: 1.5px solid #f0f0f0; padding-top: 16px; display: flex; justify-content: flex-end; }

/* Responsive */
@media (max-width: 900px) {
  .frg-biens-grid { grid-template-columns: repeat(2, 1fr); }
  .frg-choice-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .frg-page { padding: 16px; }
  .frg-biens-grid { grid-template-columns: 1fr; }
  .frg-choice-grid { grid-template-columns: 1fr; }
  .frg-cards { grid-template-columns: 1fr; }
  .frg-card-lists { grid-template-columns: 1fr; }
  .frg-modal-cols { grid-template-columns: 1fr; }
  .frg-ctas { flex-direction: column; }
  .frg-section-hd { flex-direction: column; gap: 2px; }
}

/* ===== FISCAL EXPORTS - Document cards & modal (fex-fdoc-*, fex-toast) ===== */

/* Document card list */
.fex-fdocs-section { margin-top: 28px; }
.fex-section-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.fex-section-title { font-size: 1rem; font-weight: 700; color: #111; margin: 0; }
.fex-section-count { font-size: .78rem; color: #888; background: #f4f4f4; border-radius: 20px; padding: 2px 9px; }
.fex-fdocs-sub { font-size: .83rem; color: #777; margin: 0 0 14px; }
.fex-fdocs-list { display: flex; flex-direction: column; gap: 10px; }

.fex-fdoc-card { display: flex; align-items: flex-start; gap: 14px; background: #fff; border: 1.5px solid #e8e8e8; border-radius: 10px; padding: 14px 16px; transition: border-color .15s; }
.fex-fdoc-card:hover { border-color: #c8c8c8; }
.fex-fdoc-icon { flex-shrink: 0; width: 38px; height: 38px; background: #f5f5f5; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #555; }
.fex-fdoc-body { flex: 1; min-width: 0; }
.fex-fdoc-title { font-size: .88rem; font-weight: 600; color: #111; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fex-fdoc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .76rem; color: #888; }
.fex-fdoc-meta-item { color: #888; }
.fex-fdoc-fmt { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.fex-fdoc-fmt--pdf { background: #fee2e2; color: #b91c1c; }
.fex-fdoc-fmt--xls { background: #d1fae5; color: #065f46; }
.fex-fdoc-fmt--csv { background: #fff5f5; color: #c41d15; }
.fex-fdoc-badge-ok { background: #f7f7f8; color: #374151; border: 1px solid #e5e7eb; border-radius: 4px; padding: 1px 7px; font-size: .72rem; font-weight: 600; }
.fex-fdoc-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.fex-fdoc-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 6px; border: 1.5px solid #ddd; background: #fff; font-size: .78rem; font-weight: 500; cursor: pointer; color: #333; transition: background .12s, border-color .12s; white-space: nowrap; }
.fex-fdoc-btn:hover { background: #f5f5f5; border-color: #bbb; }
.fex-fdoc-btn--view { color: #111; }
.fex-fdoc-btn--dl { color: #111; }
.fex-fdoc-btn--del { color: #b91c1c; border-color: #fecaca; }
.fex-fdoc-btn--del:hover { background: #fee2e2; border-color: #f87171; }

/* Preview modal */
.fex-fdoc-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 4000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.fex-fdoc-modal { background: #fff; border-radius: 14px; max-width: 820px; width: 100%; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,.2); }
.fex-fdoc-modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1.5px solid #f0f0f0; font-weight: 700; font-size: .95rem; color: #111; gap: 12px; }
.fex-fdoc-modal-hd button { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: #999; line-height: 1; padding: 0 4px; }
.fex-fdoc-modal-hd button:hover { color: #333; }
#fex-fdoc-modal-meta { padding: 10px 20px; background: #fafafa; border-bottom: 1px solid #f0f0f0; font-size: .8rem; color: #666; display: flex; gap: 12px; flex-wrap: wrap; }
#fex-fdoc-modal-preview { flex: 1; overflow: auto; padding: 0; min-height: 300px; }
#fex-fdoc-modal-preview iframe { width: 100%; height: 100%; min-height: 500px; border: none; display: block; }
#fex-fdoc-modal-preview pre { margin: 0; padding: 20px; font-size: .78rem; background: #f8f8f8; overflow: auto; max-height: 560px; line-height: 1.5; }
#fex-fdoc-modal-preview .fex-fdoc-xls-info { padding: 32px 24px; text-align: center; color: #555; font-size: .88rem; }
.fex-fdoc-modal-foot { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 12px 20px; border-top: 1.5px solid #f0f0f0; }
.fex-fdoc-modal-foot button { padding: 8px 18px; border-radius: 7px; border: 1.5px solid #ddd; background: #fff; font-size: .83rem; font-weight: 500; cursor: pointer; color: #333; }
.fex-fdoc-modal-foot button:hover { background: #f5f5f5; }
.fex-fdoc-modal-foot button.fex-btn--action { background: #E02020; color: #fff; border-color: #E02020; }
.fex-fdoc-modal-foot button.fex-btn--action:hover { background: #c0120c; }

/* Validation cross-totals table */
.fex-valid-section { margin-top: 8px; }
.fex-valid-desc { font-size: .8rem; color: #666; margin-bottom: 12px; }
.fex-valid-wrap { overflow-x: auto; }
.fex-valid-table { width: 100%; border-collapse: collapse; font-size: .77rem; min-width: 700px; }
.fex-valid-table th { background: #111; color: #fff; padding: 7px 10px; text-align: left; font-weight: 600; white-space: nowrap; }
.fex-valid-table th.n { text-align: right; }
.fex-valid-table td { border-bottom: 1px solid #f0f0f0; padding: 7px 10px; vertical-align: middle; }
.fex-valid-table td.n { text-align: right; font-variant-numeric: tabular-nums; }
.fex-valid-table td.neg { color: #c00; }
.fex-valid-table tbody tr:nth-child(even) td { background: #fafafa; }
.fex-valid-table tbody tr:hover td { background: #f5f5f5; }
.fex-valid-table tfoot tr.fex-valid-total td { background: #111; color: #fff; font-weight: 700; border-bottom: none; }
.fex-valid-table tfoot tr.fex-valid-total td.neg { color: #fca5a5; }
.fex-valid-name { font-weight: 600; white-space: nowrap; }
.fex-valid-city { font-size: .72rem; color: #999; font-weight: 400; }
.fex-valid-score { font-weight: 700; }
.fex-valid-note { font-size: .74rem; color: #888; margin-top: 8px; font-style: italic; }

/* Toast */
.fex-toast { position: fixed; bottom: 24px; right: 24px; z-index: 5000; display: flex; align-items: center; gap: 10px; background: #111; color: #fff; font-size: .83rem; font-weight: 500; padding: 12px 18px; border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 1; transform: translateY(0); transition: opacity .35s, transform .35s; pointer-events: none; }
.fex-toast svg { flex-shrink: 0; }
.fex-toast--out { opacity: 0; transform: translateY(8px); }

/* Documents page - fiscal section */
/* Section wrapper niveau 1 */
.documents-level1-wrap { display: flex; flex-direction: column; gap: 40px; }
.dl1-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: -16px; }
.dl1-section-title { font-size: 1rem; font-weight: 700; color: #111; letter-spacing: -0.2px; }
.dl1-fiscal-link { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: #888; }
.dl1-fiscal-link svg { flex-shrink: 0; color: #aaa; }
.dl1-fiscal-link button { background: none; border: none; padding: 0; color: #e53e3e; font-size: 0.82rem; font-weight: 500; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.dl1-fiscal-link button:hover { color: #c53030; }


@media (max-width: 600px) {
  .fex-fdoc-card { flex-wrap: wrap; }
  .fex-fdoc-actions { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .fex-fdoc-modal { max-height: 95vh; border-radius: 10px 10px 0 0; align-self: flex-end; }
}

/* ===== PREMIUM FISCAL MODULE ===== */

/* Largeur étendue */
.fisc-page-wide { padding: 24px 28px; }

/* Lock screen */
.fisc-lock-overlay { display: flex; align-items: center; justify-content: center; min-height: 400px; padding: 40px 20px; }
.fisc-lock-box { background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 40px 36px; max-width: 500px; width: 100%; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.fisc-lock-icon { color: #9ca3af; margin-bottom: 16px; }
.fisc-lock-title { font-size: 1.1rem; font-weight: 700; color: #111; margin-bottom: 10px; line-height: 1.3; }
.fisc-lock-text { font-size: 0.88rem; color: #666; line-height: 1.5; margin-bottom: 20px; }
.fisc-lock-features { text-align: left; display: flex; flex-direction: column; gap: 6px; margin-bottom: 24px; background: #f9fafb; border-radius: 10px; padding: 14px 16px; }
.fisc-lock-feature { font-size: 0.82rem; color: #374151; }
.fisc-lock-btns { display: flex; gap: 10px; justify-content: center; }
.fisc-lock-btn-primary { background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: 10px 22px; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.fisc-lock-btn-primary:hover { opacity: 0.88; }
.fisc-lock-btn-sec { background: #fff; color: #555; border: 1.5px solid var(--line); border-radius: 8px; padding: 10px 18px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.fisc-lock-btn-sec:hover { border-color: var(--brand); color: var(--brand); }

/* Plan indicator */
.fisc-plan-indicator { display: flex; align-items: center; }

/* Assistant fiscal */
.fisc-assistant-card { background: #f7f7f8; border: 1.5px solid #e5e7eb; border-radius: 14px; padding: 20px 22px; margin-bottom: 24px; width: 100%; box-sizing: border-box; }
.fisc-assistant-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }
.fisc-assistant-left { display: flex; align-items: flex-start; gap: 12px; }
.fisc-assistant-left svg { color: #374151; margin-top: 2px; flex-shrink: 0; }
.fisc-assistant-title { font-size: 0.95rem; font-weight: 700; color: #14532d; }
.fisc-assistant-sub { font-size: 0.8rem; color: #111111; margin-top: 2px; }
.fisc-assistant-score-wrap { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; min-width: 180px; }
.fisc-assistant-pct { font-size: 0.82rem; color: #111111; }
.fisc-progress-outer { width: 180px; height: 8px; background: #f3f4f6; border-radius: 99px; overflow: hidden; }
.fisc-progress-inner { height: 100%; border-radius: 99px; transition: width 0.3s ease; }
.fisc-progress-inner.fisc-score-ok   { background: #374151; }
.fisc-progress-inner.fisc-score-warn { background: #b91c1c; }
.fisc-progress-inner.fisc-score-bad  { background: #b51818; }

/* Step grid */
.fisc-step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
@media (max-width: 900px) { .fisc-step-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .fisc-step-grid { grid-template-columns: 1fr; } }
.fisc-step-item { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 8px; padding: 7px 10px; font-size: 0.8rem; border: 1.5px solid transparent; }
.fisc-step-done    { border-color: #e5e7eb; background: #f7f7f8; }
.fisc-step-partial { border-color: #fecaca; background: #f7f7f8; }
.fisc-step-missing { border-color: #fecaca; background: #fef2f2; }
.fisc-step-check { font-size: 0.9rem; font-weight: 700; width: 18px; text-align: center; flex-shrink: 0; }
.fisc-step-done    .fisc-step-check { color: #374151; }
.fisc-step-partial .fisc-step-check { color: #b91c1c; }
.fisc-step-missing .fisc-step-check { color: #b51818; }
.fisc-step-label { flex: 1; color: #374151; }
.fisc-step-count { font-size: 0.72rem; color: #9ca3af; white-space: nowrap; }
.fisc-assistant-cta { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.fisc-assistant-cta-hint { font-size: 0.8rem; color: #111111; }
.fisc-assistant-ok { font-size: 0.85rem; color: #374151; font-weight: 600; }
.fisc-btn-primary { background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: 9px 20px; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.fisc-btn-primary:hover { opacity: 0.88; }

/* Score badges */
.fisc-score-badge { display: inline-block; font-size: 0.72rem; font-weight: 700; border-radius: 5px; padding: 2px 8px; }
.fisc-score-ok   { background: #f3f4f6; color: #374151; }
.fisc-score-warn { background: #f7f7f8; color: #9b1c1c; }
.fisc-score-bad  { background: #fee2e2; color: #b91c1c; }

/* KPI 6 colonnes */
.fisc-kpi-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1300px) { .fisc-kpi-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .fisc-kpi-6 { grid-template-columns: repeat(2, 1fr); } }

/* Tooltips */
.fisc-tooltip-wrap { position: relative; display: inline-block; }
.fisc-tooltip-icon { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; background: #e5e7eb; color: #6b7280; font-size: 0.65rem; font-weight: 800; cursor: help; margin-left: 3px; flex-shrink: 0; vertical-align: middle; }
.fisc-tooltip-text { visibility: hidden; opacity: 0; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #1f2937; color: #f9fafb; font-size: 0.75rem; font-weight: 400; line-height: 1.4; padding: 7px 10px; border-radius: 7px; width: 220px; z-index: 100; white-space: normal; pointer-events: none; transition: opacity 0.15s; }
.fisc-tooltip-wrap:hover .fisc-tooltip-text,
.fisc-tooltip-icon:focus + .fisc-tooltip-text { visibility: visible; opacity: 1; }
.fisc-tooltip-text::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #1f2937; }

/* Table 10 colonnes */
.fisc-table-row-10 { grid-template-columns: 1.8fr 0.85fr 0.9fr 0.85fr 0.8fr 0.65fr 0.85fr 0.9fr 0.75fr 1.1fr; min-width: 1100px; }
.fisc-muted { color: #bbb; font-size: 0.82rem; }
.fisc-row-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fisc-action-btn--csv { padding: 3px 6px; min-width: 0; }

/* Section title enrichie */
.fisc-section-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fisc-sev-badge-inline { font-size: 0.68rem; font-weight: 700; border-radius: 4px; padding: 2px 7px; }
.fisc-sev-badge-inline.fisc-sev-critique  { background: #fee2e2; color: #b91c1c; }
.fisc-sev-badge-inline.fisc-sev-important { background: #f7f7f8; color: #9b1c1c; }
.fisc-sev-badge-inline.fisc-sev-faible    { background: #f3f4f6; color: #6b7280; }

/* Alertes enrichies */
.fisc-alert-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.fisc-alert-left { display: flex; align-items: flex-start; gap: 10px; flex: 1; }
.fisc-alert-body { display: flex; flex-direction: column; gap: 3px; }
.fisc-alert-explanation { font-size: 0.77rem; color: #888; line-height: 1.4; }
.fisc-alert-action { font-size: 0.77rem; color: #555; font-weight: 600; }
.fisc-alert-fix-btn { flex-shrink: 0; padding: 5px 12px; font-size: 0.78rem; font-weight: 600; border-radius: 6px; border: 1.5px solid var(--brand); color: var(--brand); background: #fff; cursor: pointer; white-space: nowrap; }
.fisc-alert-fix-btn:hover { background: var(--brand); color: #fff; }

/* Tier badges */
.fisc-tier-badge { display: inline-block; font-size: 0.65rem; font-weight: 700; border-radius: 4px; padding: 2px 7px; white-space: nowrap; }
.fisc-tier-essential { background: #fff5f5; color: #c41d15; }
.fisc-tier-unlimited { background: #fff5f5; color: #c0120c; }
.fisc-section-upgrade-hint { font-size: 0.78rem; font-weight: 400; color: #9ca3af; text-transform: none; letter-spacing: 0; }
.fisc-inline-upgrade-btn { background: none; border: none; color: #c0120c; font-size: 0.78rem; font-weight: 600; cursor: pointer; padding: 0; text-decoration: underline; }
.fisc-export-locked { opacity: 0.65; }
.fisc-export-btn-upgrade { background: #fff5f5; color: #c0120c; border-color: #f87171; font-size: 0.78rem; padding: 7px 12px; }
.fisc-export-btn-upgrade:hover { background: #c0120c; color: #fff; border-color: #c0120c; }

/* Régimes enrichis */
.fisc-regime-adressed { font-size: 0.8rem; color: #374151; background: #f9fafb; border-radius: 6px; padding: 8px 10px; line-height: 1.4; }
.fisc-regime-vigilance-section { display: flex; flex-direction: column; gap: 3px; }
.fisc-regime-donnees { display: flex; flex-direction: column; gap: 3px; }
.fisc-regime-footer { font-size: 0.74rem; color: #9ca3af; font-style: italic; padding-top: 8px; border-top: 1px solid #f0f0f0; }
.fisc-complexity-wrap { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.fisc-dot { width: 8px; height: 8px; border-radius: 50%; background: #e5e7eb; }
.fisc-dot-on { background: #6b7280; }
.fisc-complexity-label { font-size: 0.7rem; color: #9ca3af; }
.fisc-warn { color: #b91c1c; }
.fisc-regime-item.fisc-warn { color: #9b1c1c; }
.fisc-alert-year-note { display: flex; align-items: center; gap: 8px; background: #f7f7f8; border: 1px solid #fecaca; border-radius: 8px; padding: 9px 14px; font-size: 0.8rem; color: #9b1c1c; margin-bottom: 12px; }
.fisc-alert-year-note svg { flex-shrink: 0; color: #b91c1c; }

/* ===== MAINTENANCE MONTH CALENDAR ===== */
.maintenance-calendar-wrap { margin-bottom: 24px; }
.maintenance-calendar-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.055);
  padding: 20px 20px 16px;
  margin-bottom: 14px;
}
.maintenance-calendar-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.maintenance-calendar-nav { display: flex; align-items: center; gap: 10px; }
.maint-cal-nav-btn {
  width: 32px; height: 32px;
  border: 1.5px solid var(--line); background: #fff;
  border-radius: 8px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; color: #374151;
}
.maint-cal-nav-btn:hover { border-color: var(--brand); color: var(--brand); }
.maintenance-calendar-month-label {
  font-size: 1.05rem; font-weight: 700; color: #111;
  min-width: 170px; text-align: center;
}
.maint-cal-today-btn {
  padding: 6px 14px; border: 1.5px solid var(--line); background: #fff;
  border-radius: 8px; font-size: 0.82rem; font-weight: 600; color: #555;
  cursor: pointer; transition: all 0.15s;
}
.maint-cal-today-btn:hover { border-color: var(--brand); color: var(--brand); }
/* Grid */
.maintenance-calendar-grid { overflow-x: auto; }
.maintenance-calendar-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  margin-bottom: 2px;
}
.maintenance-calendar-weekday {
  text-align: center; font-size: 0.7rem; font-weight: 700;
  color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 2px;
}
.maintenance-calendar-days {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 1px; background: #ececec;
  border: 1px solid #ececec; border-radius: 10px; overflow: hidden;
}
.maintenance-calendar-day {
  background: #fff; min-height: 90px; padding: 6px 5px 4px;
  cursor: pointer; transition: background 0.1s;
  position: relative; box-sizing: border-box;
}
.maintenance-calendar-day:hover { background: #fafafa; }
.maintenance-calendar-day.is-outside { background: #f8f8f8; }
.maintenance-calendar-day.is-selected { background: #fff5f5; }
.maintenance-calendar-day.is-selected::after {
  content: ""; position: absolute; inset: 0;
  border: 2px solid var(--brand); border-radius: 2px; pointer-events: none;
}
.maintenance-calendar-day-num {
  font-size: 0.78rem; font-weight: 600; color: #374151;
  margin-bottom: 4px; line-height: 1;
}
.maintenance-calendar-day.is-outside .maintenance-calendar-day-num { color: #d1d5db; }
.cal-today-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 0.76rem; font-weight: 700; line-height: 1;
}
/* Events in cells */
.maintenance-calendar-events { display: flex; flex-direction: column; gap: 2px; }
.maintenance-calendar-event {
  font-size: 0.64rem; font-weight: 600;
  border-radius: 4px; padding: 2px 5px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  cursor: pointer; line-height: 1.35; display: block;
}
.maintenance-calendar-event.work    { background: #fee2e2; color: #b91c1c; }
.maintenance-calendar-event.ticket  { background: #f7f7f8; color: #9b1c1c; }
.maintenance-calendar-event.quote   { background: #fff5f5; color: #c41d15; }
.maintenance-calendar-event.invoice { background: #f3f4f6; color: #374151; }
.maintenance-calendar-event-more { font-size: 0.64rem; font-weight: 700; color: #9ca3af; padding: 1px 4px; }
/* Day events panel */
.maintenance-day-events {
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 18px 20px; margin-bottom: 24px;
}
.maint-day-ev-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0;
}
.maint-day-ev-title-section {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.9rem; font-weight: 700; color: #111;
}
.maint-day-ev-date { font-style: italic; font-weight: 400; color: #666; margin-left: 3px; }
.maint-day-ev-count {
  font-size: 0.72rem; font-weight: 700;
  background: #f3f4f6; color: #555;
  border-radius: 99px; padding: 2px 10px;
}
.maintenance-day-event-card {
  border: 1px solid #f0f0f0; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 8px; background: #fafafa;
}
.maintenance-day-event-card:last-child { margin-bottom: 0; }
.maint-day-ev-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.maint-day-ev-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.maint-day-ev-badge { font-size: 0.67rem; padding: 2px 7px; border-radius: 4px; font-weight: 700; flex-shrink: 0; }
.maint-day-ev-title { font-size: 0.88rem; font-weight: 600; color: #111; }
.maint-day-ev-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.maint-day-ev-desc { font-size: 0.78rem; color: #666; margin-bottom: 6px; line-height: 1.4; }
.maint-day-ev-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Responsive */
@media (max-width: 720px) {
  .maintenance-calendar-day { min-height: 52px; }
  .maintenance-calendar-event { display: none; }
  .maintenance-calendar-day[data-has-events="true"] .maintenance-calendar-day-num::after {
    content: "•"; color: var(--brand); font-size: 0.8rem; margin-left: 2px;
  }
  .maintenance-calendar-month-label { min-width: 130px; font-size: 0.92rem; }
}
@media (max-width: 480px) {
  .maintenance-calendar-card { padding: 14px 10px 10px; border-radius: 12px; }
  .maintenance-calendar-weekday { font-size: 0.62rem; padding: 4px 1px; }
}

/* ===== SIMULATEUR FRAIS DE NOTAIRE ===== */
.notary-simulator-page { padding: 32px 28px; width: 100%; box-sizing: border-box; }
.notary-page-header { margin-bottom: 18px; }
.notary-page-title { font-size: 1.4rem; font-weight: 800; color: #111; margin: 0 0 4px; }
.notary-page-subtitle { font-size: 0.88rem; color: #6b7280; margin: 0; }
.notary-disclaimer { display: flex; align-items: flex-start; gap: 10px; background: #f7f7f8; border: 1.5px solid #fecaca; border-radius: 10px; padding: 11px 16px; font-size: 0.82rem; color: #9b1c1c; margin-bottom: 24px; line-height: 1.5; }
.notary-disclaimer svg { flex-shrink: 0; margin-top: 1px; }
.notary-disclaimer--footer { margin-bottom: 0; margin-top: 20px; }
.money-input-wrapper { position: relative; width: 100%; }
.money-input-wrapper input { width: 100%; padding-right: 42px; box-sizing: border-box; }
.money-input-symbol { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #6b7280; font-weight: 600; font-size: 0.9rem; pointer-events: none; }
.notary-layout { display: grid; grid-template-columns: 380px 1fr; gap: 24px; align-items: start; }
@media (max-width: 920px) { .notary-layout { grid-template-columns: 1fr; } }
.notary-form-card { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 22px 20px; margin-bottom: 14px; }
.notary-card-title { font-size: 0.78rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }
.notary-field-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.notary-label { font-size: 0.82rem; font-weight: 600; color: #374151; display: flex; flex-direction: column; gap: 2px; }
.notary-label-unit { font-weight: 400; color: #9ca3af; font-size: 0.76rem; display: inline; margin-left: 3px; }
.notary-hint { font-size: 0.72rem; font-weight: 400; color: #9ca3af; }
.notary-input { width: 100%; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 0.9rem; color: #111; background: #fff; box-sizing: border-box; transition: border-color 0.15s, box-shadow 0.15s; outline: none; font-family: inherit; }
.notary-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(192,18,12,0.15); }
.notary-input::placeholder { color: #bbb; }
.notary-select { width: 100%; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 0.88rem; color: #111; background: #fff; box-sizing: border-box; cursor: pointer; outline: none; font-family: inherit; transition: border-color 0.15s, box-shadow 0.15s; }
.notary-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(192,18,12,0.15); }
.notary-select option { background: #fff; color: #111; }
.notary-field-divider { height: 1px; background: #f0f0f0; margin: 4px 0 13px; }
.money-input-symbol { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #6b7280; font-weight: 600; font-size: 0.9rem; pointer-events: none; }
.notary-action-row { display: flex; gap: 8px; flex-wrap: wrap; }
.notary-btn-reset { padding: 8px 14px; border: 1.5px solid var(--line); background: #fff; color: #6b7280; border-radius: 8px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.notary-btn-reset:hover { border-color: #b51818; color: #b51818; }
.notary-btn-invest { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #fff; border: 1.5px solid var(--brand); color: var(--brand); border-radius: 8px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.notary-btn-invest:hover { background: var(--brand); color: #fff; }
.notary-btn-export { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #fff; border: 1.5px solid var(--line); color: #555; border-radius: 8px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.notary-btn-export:hover { border-color: var(--brand); color: var(--brand); }
.notary-result-card { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 22px 20px; position: sticky; top: 16px; }
.notary-result-type { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #bbb; margin-bottom: 8px; }
.notary-result-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 48px 24px; color: #9ca3af; font-size: 0.9rem; text-align: center; }
.notary-result-main { text-align: center; padding: 14px 0 16px; border-bottom: 1px solid #f0f0f0; margin-bottom: 14px; }
.notary-result-label { font-size: 0.8rem; color: #9ca3af; margin-bottom: 4px; }
.notary-result-amount { font-size: 2.4rem; font-weight: 900; color: #111; line-height: 1; letter-spacing: -0.02em; }
.notary-result-pct { font-size: 0.82rem; color: #9ca3af; margin-top: 5px; }
.notary-result-budget { background: #f9fafb; border-radius: 10px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; border: 1px solid #f0f0f0; }
.notary-result-budget-label { font-size: 0.82rem; color: #555; font-weight: 600; }
.notary-result-budget-amount { font-size: 1.15rem; font-weight: 800; color: #111; }
.notary-detail-sep { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #bbb; margin: 12px 0 5px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.notary-detail-row { display: flex; justify-content: space-between; align-items: baseline; padding: 3px 0; font-size: 0.82rem; }
.notary-detail-label { color: #555; }
.notary-detail-val { font-weight: 600; color: #111; }
.notary-row-save .notary-detail-val { color: #374151; }
.notary-row-base { font-weight: 600; background: #f9fafb; border-radius: 5px; padding: 4px 6px; margin: 2px -6px; }
.notary-row-subtotal { border-top: 1px dashed #e5e7eb; margin-top: 3px; padding-top: 5px; }
.notary-row-subtotal .notary-detail-val { color: #374151; }
.notary-row-total { border-top: 2px solid #111; margin-top: 6px; padding-top: 7px; }
.notary-row-total .notary-detail-label { font-size: 0.9rem; font-weight: 700; color: #111; }
.notary-row-total .notary-detail-val { font-size: 1rem; font-weight: 900; }
.notary-row-budget .notary-detail-val { color: var(--brand); }
.notary-summary-grid { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.notary-summary-item { flex: 1; min-width: 70px; background: #f9fafb; border-radius: 8px; padding: 9px 10px; text-align: center; border: 1px solid #e5e7eb; }
.notary-summary-val { font-size: 0.88rem; font-weight: 800; color: #111; }
.notary-summary-lbl { font-size: 0.65rem; color: #9ca3af; margin-top: 2px; text-transform: uppercase; letter-spacing: 0.04em; }
.notary-summary-save .notary-summary-val { color: #374151; }
.notary-summary-indicative { border-style: dashed; }
.notary-summary-indicative .notary-summary-val { color: #9ca3af; font-size: 0.76rem; }
.notary-info-box { display: flex; align-items: flex-start; gap: 8px; background: #f7f7f8; border: 1px solid #fecaca; border-radius: 8px; padding: 9px 12px; font-size: 0.76rem; color: #9b1c1c; line-height: 1.45; margin-top: 10px; }
.notary-info-box svg { flex-shrink: 0; margin-top: 1px; }
.notary-info-warn { background: #f7f7f8; border-color: #fecaca; color: #9b1c1c; }
.notary-info-warn svg { color: #b91c1c; }
.notary-info-agency { background: #f9fafb; border-color: #e5e7eb; color: #6b7280; }
.notary-info-agency svg { color: #9ca3af; }
.notary-final-disclaimer { font-size: 0.72rem; color: #9ca3af; font-style: italic; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0f0f0; line-height: 1.5; }
/* ── Frais notaire — KPI bar ── */
.notary-kpi-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.notary-kpi-box { flex: 1; min-width: 90px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 12px 10px; text-align: center; }
.notary-kpi-box--main { background: #111; border-color: #111; }
.notary-kpi-box--main .notary-kpi-val { color: #fff; }
.notary-kpi-box--main .notary-kpi-lbl { color: #9ca3af; }
.notary-kpi-val { font-size: 1.05rem; font-weight: 800; color: #111; line-height: 1.1; }
.notary-kpi-lbl { font-size: 0.65rem; color: #9ca3af; margin-top: 3px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ═══ CANDIDATES PAGE ═══════════════════════════════════════════════════ */
.candidates-page { padding: 0 0 48px; }
.candidates-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.candidates-page-title { font-size: 1.5rem; font-weight: 700; margin: 4px 0; }
.candidates-subtitle { font-size: 0.85rem; color: #6b7280; margin: 4px 0 0; }

.candidates-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.candidate-kpi-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.ckpi-value { font-size: 1.8rem; font-weight: 700; color: #111; line-height: 1; }
.ckpi-value.ckpi-ok   { color: #9ca3af; }
.ckpi-value.ckpi-warn { color: #c41d15; }
.ckpi-label { font-size: 0.78rem; color: #6b7280; margin-top: 4px; }

.candidates-filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.cand-search-input { flex: 1; min-width: 180px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.85rem; background: #fff; }
.cand-filter-select { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.85rem; background: #fff; cursor: pointer; }

.candidates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.candidate-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .15s; }
.candidate-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.candidate-card-header { display: flex; align-items: flex-start; gap: 12px; }
.cand-avatar { width: 38px; height: 38px; border-radius: 50%; background: #e0e7ff; color: #555555; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.cand-info { flex: 1; min-width: 0; }
.cand-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cand-property { font-size: 0.78rem; color: #6b7280; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.candidate-status-badge { padding: 3px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.cand-status-success { background: #f3f4f6; color: #374151; }
.cand-status-warning  { background: #f7f7f8; color: #a16207; }
.cand-status-danger   { background: #fee2e2; color: #b91c1c; }
.cand-status-info     { background: #fff5f5; color: #c41d15; }
.cand-status-neutral  { background: #f3f4f6; color: #374151; }
.cand-meta-row { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.76rem; color: #6b7280; }
.cand-meta-item { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 4px; padding: 2px 7px; }
.cand-tag-ok { background: #f3f4f6 !important; color: #374151 !important; border-color: #e5e7eb !important; }
.cand-score-row { display: flex; align-items: center; gap: 10px; }
.cand-score-label { font-size: 0.76rem; color: #6b7280; white-space: nowrap; min-width: 90px; }
.cand-score-bar { flex: 1; height: 6px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.cand-score-fill { height: 100%; background: var(--brand, #555555); border-radius: 999px; transition: width .3s; }
.candidate-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cand-btn-primary   { flex: 0 0 100%; padding: 7px 14px; border-radius: 7px; background: #E02020; color: #fff; border: none; font-size: 0.8rem; font-weight: 600; cursor: pointer; }
.cand-btn-secondary { flex: 1; padding: 5px 8px; border-radius: 7px; background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; font-size: 0.78rem; white-space: nowrap; cursor: pointer; }
.cand-btn-accept    { flex: 1; padding: 5px 8px; border-radius: 7px; background: #1a1a1a; color: #fff; border: none; font-size: 0.78rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.cand-btn-refuse    { flex: 1; padding: 5px 8px; border-radius: 7px; background: #fff; color: #ef4444; border: 1px solid #fca5a5; font-size: 0.78rem; white-space: nowrap; cursor: pointer; }
.cand-btn-primary:hover   { background: #c0120c; }
.cand-btn-secondary:hover { background: #e5e7eb; }
.cand-btn-accept:hover    { background: #000; }
.cand-btn-refuse:hover    { background: #fee2e2; }

.candidates-empty { text-align: center; padding: 64px 24px; color: #6b7280; }
.candidates-empty svg { color: #d1d5db; margin-bottom: 16px; }
.candidates-empty h3 { font-size: 1rem; font-weight: 600; color: #374151; margin: 0 0 8px; }
.candidates-empty p { font-size: 0.85rem; max-width: 420px; margin: 0 auto 20px; line-height: 1.6; }

/* Candidate detail */
.cand-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.cand-back-btn { display: inline-flex; align-items: center; gap: 6px; background: #c0120c; border: 1.5px solid #c0120c; border-radius: 8px; color: #fff; font-size: 0.82rem; cursor: pointer; font-weight: 700; padding: 7px 16px; transition: background 150ms, border-color 150ms; }
.cand-back-btn:hover { background: #a00f09; border-color: #a00f09; text-decoration: none; }
.cand-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cand-detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.cand-detail-section { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.cand-detail-section-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #9ca3af; margin-bottom: 14px; }
.cand-detail-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cand-field { display: flex; flex-direction: column; gap: 3px; }
.cand-field-label { font-size: 0.72rem; color: #9ca3af; font-weight: 500; }
.cand-message-box { margin-top: 12px; background: #f9fafb; border-radius: 8px; padding: 12px; font-size: 0.85rem; color: #374151; line-height: 1.5; }
.cand-doc-missing-list { margin: 0 0 14px; padding-left: 20px; font-size: 0.85rem; color: #374151; line-height: 1.8; }
.cand-msg-template { width: 100%; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.82rem; line-height: 1.6; height: 160px; resize: vertical; }
.cand-analysis-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; position: sticky; top: 16px; }
.cand-analysis-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 16px; }
.cand-score-circle { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 90px; height: 90px; border-radius: 50%; border: 4px solid var(--score-color, #555555); margin: 0 auto 16px; }
.cand-score-pct { font-size: 1.4rem; font-weight: 700; line-height: 1; }
.cand-score-lbl { font-size: 0.68rem; color: #9ca3af; }
.cand-ratio-row { display: flex; justify-content: space-between; font-size: 0.82rem; padding: 8px 0; border-top: 1px solid #f0f0f0; margin-bottom: 8px; }
.cand-analysis-subtitle { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: #9ca3af; margin: 12px 0 6px; }
.candidate-strength { font-size: 0.8rem; color: #374151; padding: 3px 0; }
.candidate-warning  { font-size: 0.8rem; color: #9b1c1c; padding: 3px 0; }
.cand-recommendation { font-size: 0.82rem; color: #374151; background: #f9fafb; border-radius: 8px; padding: 10px 12px; margin-top: 12px; line-height: 1.5; }
.cand-disclaimer { font-size: 0.72rem; color: #9ca3af; font-style: italic; margin-top: 10px; line-height: 1.4; }

@media (max-width: 900px) {
  .candidates-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .cand-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .candidates-kpi-grid { grid-template-columns: 1fr 1fr; }
  .candidates-grid { grid-template-columns: 1fr; }
  .cand-detail-fields { grid-template-columns: 1fr; }
}

/* ===== AUTO-ALERT LOYERS ===== */
#dbAutoAlert { margin-bottom: 16px; }
.db-auto-alert {
  display: flex; align-items: center; gap: 10px;
  background: #fff8e1; border: 1px solid #c41d15; border-radius: 10px;
  padding: 12px 16px; color: #9b1c1c; font-size: 13.5px;
}
.db-auto-alert svg { flex-shrink: 0; color: #c41d15; }
.db-auto-alert span { flex: 1; }
.db-auto-alert-btn {
  background: var(--brand); color: #fff; border: none; border-radius: 7px;
  padding: 6px 14px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: background 0.15s;
}
.db-auto-alert-btn:hover { background: #b91c1c; }

/* ===== CREDIT SOURCE ESTIMATION ===== */
.credit-source-estimation {
  color: #9b1c1c; background: #fff8e1;
  border: 1px solid #c41d15; border-radius: 6px; padding: 6px 10px;
  font-size: 12px; margin-top: 8px;
}

/* ===================================================
   TRAVAUX & INTERVENTIONS - Styles communs
   =================================================== */

/* ── Suivi des travaux ── */
.works-page { padding: 0; }

.works-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 20px 0 24px;
}
.works-kpi-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 16px 18px;
}
.works-kpi-label { font-size: 12px; color: #888; margin-bottom: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.works-kpi-value { font-size: 22px; font-weight: 700; color: #111; }

.works-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.works-kanban {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: start;
}
.works-column {
  background: #f5f6f8;
  border-radius: 14px;
  padding: 14px;
  min-height: 120px;
}
.works-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.works-col-title { font-weight: 700; font-size: 13.5px; color: #333; }
.works-col-body  { display: flex; flex-direction: column; gap: 10px; }
.works-col-empty { padding: 24px 12px; text-align: center; color: #aaa; font-size: 13px; }

.works-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 12px 14px;
  transition: box-shadow .15s;
}
.works-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }

.works-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 6px;
}
.works-cat-badge {
  font-size: 11px;
  background: #f0f4ff;
  color: #c0120c;
  border-radius: 5px;
  padding: 2px 7px;
  font-weight: 600;
  white-space: nowrap;
}
.works-prio { font-size: 11px; }

.works-card-title   { font-weight: 700; font-size: 13.5px; color: #111; margin-bottom: 3px; }
.works-card-prop    { font-size: 12px; color: #666; margin-bottom: 5px; }
.works-card-desc    { font-size: 12px; color: #555; line-height: 1.45; margin-bottom: 8px; }
.works-card-contractor { font-size: 11.5px; color: #444; display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }

.works-card-meta    { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.works-meta-item    { font-size: 11px; color: #666; background: #f7f7f7; border-radius: 4px; padding: 2px 6px; }

.works-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-button.danger { color: #c0392b !important; }

/* ── Entreprises ── */
.contractors-page { padding: 0; }

.contractors-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 20px 0 12px;
  flex-wrap: wrap;
}
.contractors-search-input {
  flex: 1;
  min-width: 200px;
  padding: 9px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 13.5px;
  outline: none;
  background: #fff;
  transition: border .15s;
}
.contractors-search-input:focus { border-color: var(--brand); }

.contractors-results-label { font-size: 13px; color: #888; margin-bottom: 16px; }

.contractors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.contractors-empty { grid-column: 1 / -1; padding: 56px 32px; text-align: center; color: #aaa; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.contractors-empty-title { font-size: 1rem; font-weight: 700; color: #333; }
.contractors-empty-text  { font-size: 0.85rem; color: #888; line-height: 1.6; max-width: 380px; margin: 0; }

.contractor-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 18px;
  transition: box-shadow .15s;
  display: flex;
  flex-direction: column;
}
.contractor-card:hover  { box-shadow: 0 3px 16px rgba(0,0,0,.08); }

.contractor-card-header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.contractor-avatar {
  width: 42px; height: 42px; flex-shrink: 0;
  background: #111; color: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
}
.contractor-header-info { flex: 1; min-width: 0; }

.contractor-name-row    { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 2px; }
.contractor-name        { font-weight: 700; font-size: 14px; color: #111; }
.contractor-trade-city  { font-size: 12.5px; color: #666; margin-bottom: 4px; }
.contractor-rating-row  { display: flex; align-items: center; gap: 4px; font-size: 12px; }
.contractor-score       { font-weight: 700; color: #111; }
.contractor-rev         { color: #888; }

.contractor-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.contractor-badge.partner  { background: var(--brand); color: #fff; }
.contractor-badge.verified { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }

.contractor-trust { font-size: 14px; margin-top: 3px; line-height: 1; }
.contractor-desc { font-size: 12.5px; color: #555; line-height: 1.5; margin-bottom: 10px; }

.contractor-meta-row {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 12.5px; color: #555; margin-bottom: 12px;
}
.contractor-specialties { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.contractor-spec-tag {
  font-size: 11px;
  background: #f0f4ff; color: #c0120c;
  border-radius: 4px; padding: 2px 7px; font-weight: 500;
}

.contractor-card-footer { display: flex; gap: 6px; flex-wrap: wrap; border-top: 1px solid #f0f0f0; padding-top: 12px; margin-top: auto; }
.contractor-card-footer a.mini-button { text-decoration: none; }

.ctr-meta-item { display: flex; align-items: center; gap: 6px; line-height: 1.4; }
.ctr-meta-item .ic { color: #9ca3af; flex-shrink: 0; }
.ctr-incomplete { font-size: 11.5px; color: #9ca3af; margin: 0 0 10px; display: flex; align-items: center; gap: 5px; }
.ctr-incomplete .ic { flex-shrink: 0; }

.contractor-card-footer .mini-button {
  height: 30px; padding: 0 11px;
  font-size: 12px; font-weight: 500;
  border: 1px solid #e5e7eb; border-radius: 7px;
  background: transparent; color: #374151;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  text-decoration: none; white-space: nowrap; font-family: inherit;
  transition: background .12s, border-color .12s;
}
.contractor-card-footer .mini-button:hover { background: #f9fafb; border-color: #d1d5db; }
.contractor-card-footer .mini-button.danger { color: #c0120c !important; border-color: rgba(192,18,12,.25); }
.contractor-card-footer .mini-button.danger:hover { background: rgba(192,18,12,.04); border-color: rgba(192,18,12,.4); }

/* CTA section "Vous êtes une entreprise ?" */
.contractors-cta-section { margin-top: 16px; }
.contractors-cta-card {
  display: flex; align-items: center; gap: 20px;
  background: #111;
  color: #fff;
  border-radius: 14px;
  padding: 24px 28px;
  flex-wrap: wrap;
}
.contractors-cta-icon { color: var(--brand); flex-shrink: 0; }
.contractors-cta-text { flex: 1; min-width: 200px; }
.contractors-cta-text strong { display: block; font-size: 16px; margin-bottom: 6px; }
.contractors-cta-text p { font-size: 13px; color: #ccc; margin: 0; line-height: 1.5; }
.contractors-cta-card .primary-action { white-space: nowrap; flex-shrink: 0; }

/* ── Devis & factures ── */
.qi-page { padding: 0; width: 100%; max-width: none; }

.qi-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}
.qi-kpi-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 16px 18px; }
.qi-kpi-label { font-size: 12px; color: #888; margin-bottom: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.qi-kpi-value { font-size: 22px; font-weight: 700; color: #111; }

.qi-list { display: flex; flex-direction: column; gap: 10px; }

.qi-card {
  background: #fff;
  border: 1px solid #e2e5e9;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  transition: border-color 160ms, box-shadow 160ms;
}
.qi-card:hover {
  border-color: #bbb;
  box-shadow: 0 3px 12px rgba(0,0,0,.07);
}
.qi-card-main {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.qi-card-left  { display: flex; align-items: flex-start; gap: 12px; flex: 2; min-width: 200px; }
.qi-card-mid   { flex: 1.5; min-width: 130px; }
.qi-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 100px; }
.qi-card-actions { margin-top: 10px; display: flex; gap: 8px; justify-content: flex-end; }

.qi-type-badge {
  display: inline-block; padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; flex-shrink: 0;
}
.qi-type-quote   { background: #f3f4f6; color: #111111; }
.qi-type-invoice { background: #fff8e1; color: #e65100; }

.qi-number  { font-weight: 700; font-size: 14px; color: #111; }
.qi-refs    { font-size: 12px; color: #666; margin-top: 2px; }
.qi-notes   { font-size: 12px; color: #888; margin-top: 4px; font-style: italic; }

.qi-amount  { font-size: 16px; font-weight: 700; color: #111; }
.qi-ht      { font-size: 12px; color: #888; }
.qi-dates   { font-size: 12px; color: #888; }
.qi-due     { font-size: 12px; color: #e65100; }

.qi-fiscal-tag {
  display: inline-block; font-size: 11px; padding: 2px 7px;
  border-radius: 4px; background: #f0f0f0; color: #666; margin-top: 4px;
}
.qi-fiscal-ok   { background: #e8f5e9; color: #2e7d32; }
.qi-fiscal-warn { background: #fff8e1; color: #e65100; }

.qi-empty {
  text-align: center; padding: 60px 20px; color: #aaa;
}
.qi-empty p { margin: 12px 0; font-size: 14px; }

/* ── Tickets d'intervention ── */
.tickets-page { padding: 0; }

.tickets-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 20px 0 24px;
}
.tickets-kpi-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 16px 18px; }
.tickets-kpi-label { font-size: 12px; color: #888; margin-bottom: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: .03em; }
.tickets-kpi-value { font-size: 22px; font-weight: 700; color: #111; }

.tickets-list { display: flex; flex-direction: column; gap: 10px; }

.ticket-row {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.ticket-row-urgent { border-left: 3px solid var(--brand); }
.ticket-row-left   { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 240px; }
.ticket-row-right  { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.ticket-row-body   { flex: 1; }

.ticket-prio-pill  { flex-shrink: 0; margin-top: 2px; }
.ticket-row-title  { font-weight: 700; font-size: 14px; color: #111; margin-bottom: 3px; }
.ticket-row-meta   { font-size: 12px; color: #666; margin-bottom: 5px; }
.ticket-row-desc   { font-size: 12.5px; color: #555; line-height: 1.45; margin-bottom: 6px; }
.ticket-row-contractor { font-size: 12px; color: #444; display: flex; align-items: center; gap: 4px; }
.ticket-row-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* Responsive kanban - 2 cols on medium screens */
@media (max-width: 1100px) {
  .works-kanban { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .works-kpi-grid, .qi-kpi-grid, .tickets-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .works-kanban { grid-template-columns: 1fr; }
  .works-kpi-grid, .qi-kpi-grid, .tickets-kpi-grid { grid-template-columns: 1fr; }
}

/* ── Revente two-level view ── */
.rev-page { width: 100%; }

/* Back button */
.rev-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #c0120c; border: 1.5px solid #c0120c; border-radius: 8px;
  padding: 7px 16px; font-size: 0.82rem; font-weight: 700;
  color: #fff; cursor: pointer; margin-bottom: 20px;
  transition: background 150ms, border-color 150ms;
}
.rev-back-btn:hover { background: #a00f09; border-color: #a00f09; color: #fff; }
.rev-back-btn svg { stroke: #fff; }

/* Detail header */
.rev-detail-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 20px;
}
.rev-detail-name { font-size: 1.25rem; font-weight: 800; color: var(--ink); }
.rev-detail-meta { font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.rev-detail-addr { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* Warning banner */
.rev-warning-banner {
  background: #fff7ed; border: 1px solid #fdba74; border-radius: 8px;
  padding: 10px 14px; font-size: 0.82rem; color: #9b1c1c;
  margin-bottom: 16px;
}

/* 8-KPI grid (detail view) */
.rev-kpi-grid-8 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .rev-kpi-grid-8 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .rev-kpi-grid-8 { grid-template-columns: 1fr; } }

/* Section title within detail */
.rev-section-title {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted);
  margin: 24px 0 12px; padding-top: 20px; border-top: 1px solid var(--border);
}

/* Scenario row details */
.scenario-row {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; color: var(--muted); margin: 4px 0;
}

/* Market section */
.rev-market-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; margin-bottom: 20px;
}
.rev-market-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 12px;
}
@media (max-width: 700px) { .rev-market-grid { grid-template-columns: repeat(2, 1fr); } }
.rev-market-item {}
.rev-market-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 3px; }
.rev-market-val { font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.rev-market-comment { font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.rev-market-hint { font-size: 0.74rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; font-style: italic; }

/* ── Market search UI ────────────────────────────────── */
.market-search-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 20px;
}
.market-search-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.market-search-title {
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.market-search-sub {
  font-size: 0.78rem;
  color: var(--muted);
}
.market-addr-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  position: relative;
}
.market-addr-wrap {
  flex: 1;
  position: relative;
}
.market-addr-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.88rem;
  background: var(--bg);
  color: var(--ink);
  outline: none;
  transition: border-color 140ms;
}
.market-addr-input:focus { border-color: var(--brand); }
.market-addr-input::-webkit-search-cancel-button,
.market-addr-input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.market-addr-input::-ms-clear { display: none; }
.market-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 14px;
  z-index: 300;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 18px 45px rgba(15,23,42,0.16);
}
.market-suggestion-item {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #111827;
  cursor: pointer;
  border-bottom: 1px solid rgba(15,23,42,0.06);
  transition: background 100ms;
}
.market-suggestion-item:last-child { border-bottom: none; }
.market-suggestion-item:hover,
.market-suggestion-item.is-active { background: #f5f5f5; }
.suggest-label { display: block; font-weight: 500; }
.addr-suggest-info {
  padding: 11px 14px;
  font-size: 0.83rem;
  color: #6b7280;
  font-style: italic;
}
.market-addr-input--clearable { padding-right: 34px; }
.market-addr-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #9ca3af;
  padding: 0 2px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: color 120ms;
}
.market-addr-clear:hover { color: #374151; }
.market-search-btn {
  height: 40px;
  padding: 0 18px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 140ms;
}
.market-search-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.market-search-btn:hover:not(:disabled) { opacity: 0.88; }
.market-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.83rem;
  padding: 10px 0;
}
.market-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.market-empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.83rem;
  padding: 14px 0 4px;
}
.market-results-card {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 4px;
}
.market-results-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.market-results-source {
  font-size: 0.78rem;
  color: var(--muted);
  flex: 1;
}
.market-reliability-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.market-reliability-badge.high   { background: rgba(74,222,128,0.15); color: #374151; }
.market-reliability-badge.medium { background: rgba(234,179,8,0.15); color: #9b1c1c; }
.market-reliability-badge.low-ok { background: rgba(251,146,60,0.15); color: #c41d15; }
.market-reliability-badge.low    { background: rgba(239,68,68,0.1); color: #b51818; }
.market-price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
@media (max-width: 600px) { .market-price-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; } }
.market-price-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  text-align: center;
}
.market-price-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.market-price-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}
.market-price-item.featured { border-color: var(--brand); background: rgba(170,0,0,0.04); }
.market-price-item.featured .market-price-val { color: var(--brand); }
.market-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.market-btn-use {
  height: 36px;
  padding: 0 16px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 140ms;
}
.market-btn-use:hover { opacity: 0.88; }
.market-btn-refresh {
  height: 36px;
  padding: 0 16px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms;
}
.market-btn-refresh:hover { background: var(--bg); }
.market-btn-refresh:disabled { opacity: 0.5; cursor: not-allowed; }
.market-comparables-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}
.market-comparables-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.market-comparables-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.market-comparables-table th {
  text-align: left;
  padding: 6px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}
.market-comparables-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  white-space: nowrap;
}
.market-comparables-table tbody tr:last-child td { border-bottom: none; }
.market-comparables-table tbody tr:hover td { background: var(--bg); }
.market-prixm2-cell { font-weight: 700; color: var(--brand); }
.market-disclaimer {
  font-size: 0.73rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── Upgrade blocks & modals ── */
.upgrade-block {
  display: flex; justify-content: center; align-items: center;
  min-height: 300px; padding: 40px 20px;
}
.upgrade-block-inner {
  max-width: 480px; width: 100%; text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 40px 36px;
  box-shadow: 0 4px 32px rgba(0,0,0,.07);
}
.upgrade-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 18px;
}
.upgrade-icon { width: 48px; height: 48px; margin-bottom: 14px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; border-radius: 10px; color: var(--brand); }
.upgrade-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.upgrade-description { font-size: .9rem; color: var(--muted); margin-bottom: 22px; line-height: 1.5; }
.upgrade-benefits {
  list-style: none; padding: 0; margin: 0 0 24px; text-align: left;
  display: flex; flex-direction: column; gap: 8px;
}
.upgrade-benefits li {
  display: flex; align-items: center; gap: 8px;
  font-size: .88rem; color: var(--text);
}
.upgrade-cta-row { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.upgrade-cta-btn {
  width: 100%; padding: 12px 24px; border: none; border-radius: 10px;
  font-size: .95rem; font-weight: 700; cursor: pointer; color: #fff;
  transition: filter .15s;
}
.upgrade-cta-btn:hover { filter: brightness(1.1); }
.upgrade-cta-secondary {
  font-size: .82rem; color: var(--muted); background: none; border: none;
  cursor: pointer; text-decoration: underline;
}

/* Upgrade banner (compact) */
.upgrade-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; border-radius: 12px; border: 1px solid;
  margin-bottom: 20px; flex-wrap: wrap;
}
.upgrade-banner-icon { flex-shrink: 0; display: flex; align-items: center; color: var(--brand); }
.upgrade-banner-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.upgrade-banner-text strong { font-size: .9rem; color: var(--text); }
.upgrade-banner-text span { font-size: .82rem; color: var(--muted); }
.upgrade-banner-btn {
  flex-shrink: 0; padding: 7px 16px; border: none; border-radius: 8px;
  font-size: .82rem; font-weight: 700; color: #fff; cursor: pointer;
  transition: filter .15s;
}
.upgrade-banner-btn:hover { filter: brightness(1.1); }

/* Upgrade modal overlay */
.upgrade-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 9000; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.upgrade-modal-card {
  background: var(--surface); border-radius: 20px; padding: 40px 36px;
  max-width: 420px; width: 100%; position: relative; text-align: center;
  box-shadow: 0 8px 48px rgba(0,0,0,.18);
}
.upgrade-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 1.2rem; cursor: pointer;
  color: var(--muted); line-height: 1;
}
.upgrade-modal-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.upgrade-modal-desc { font-size: .9rem; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.upgrade-modal-price {
  font-size: 1.8rem; font-weight: 800; color: var(--text); margin-bottom: 24px;
}
.upgrade-modal-price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.upgrade-modal-later {
  margin-top: 10px; background: none; border: none; font-size: .82rem;
  color: var(--muted); cursor: pointer; text-decoration: underline;
}

/* Sidebar plan badges */
.sb-plan-badge {
  display: none;
  margin-left: auto; font-size: .62rem; font-weight: 800; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 6px;
  background: #55555520; color: #555555; border: 1px solid #55555530;
  text-transform: uppercase;
}

/* Plan test switcher (subscription page demo) */
.plan-test-switcher {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 28px;
}
.plan-test-label {
  font-size: .8rem; font-weight: 600; color: var(--muted); margin-right: 4px;
}
.plan-test-btn {
  padding: 5px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: .82rem;
  font-weight: 600; cursor: pointer; transition: all .15s;
}
.plan-test-btn:hover { border-color: #555555; color: #555555; }
.plan-test-btn.active { font-weight: 700; }

/* Cards grid (list view) */
.rev-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 20px;
  margin-bottom: 24px;
}

.rev-prop-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; display: flex; flex-direction: column; gap: 0;
  transition: border-color 150ms, box-shadow 150ms;
}
.rev-prop-card:hover { border-color: #c8c8c8; box-shadow: 0 4px 14px rgba(0,0,0,.08); }

.rev-prop-card-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  margin-bottom: 12px;
}
.rev-prop-card-name { font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.rev-prop-card-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.rev-prop-card-addr { font-size: 0.73rem; color: var(--muted); margin-top: 1px; }

.rev-prop-card-divider { height: 1px; background: var(--border); margin-bottom: 10px; }

.rev-prop-card-rows { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rev-prop-card-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.82rem;
}
.rev-prop-card-rowlabel { color: var(--muted); }
.rev-prop-card-rowval { font-weight: 600; color: var(--ink); }
.rev-prop-card-row-total {
  border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px;
}

.rev-analyze-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 14px;
  background: var(--brand); color: #fff;
  border: none; border-radius: 8px; padding: 9px 16px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
  transition: opacity 150ms;
}
.rev-analyze-btn:hover { opacity: 0.88; }

/* Colour helpers (see also "Colors" block above) */

/* ================================================================
   ANALYSE - Rentabilite, Revente, Projection, Arbitrage
   ================================================================ */

.section-subtitle { color: #888; font-size: 0.875rem; margin: 2px 0 0; }
.analysis-empty-state { display:flex; flex-direction:column; align-items:center; gap:12px; padding:60px 20px; color:#aaa; text-align:center; }
.analysis-empty-state svg { opacity:.35; }
.analysis-disclaimer { font-size:.75rem; color:#bbb; margin-top:24px; }
.analysis-warn-banner { background:#fff8f0; border:1px solid #c0120c; color:#c41d15; border-radius:8px; padding:10px 16px; font-size:.85rem; margin-bottom:16px; }

.renta-kpi-strip { display:flex; align-items:stretch; background:#fff; border:1px solid #f0f0f0; border-radius:12px; overflow:hidden; margin-bottom:24px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.renta-kpi-item { flex:1; display:flex; flex-direction:column; gap:4px; padding:18px 20px; }
.renta-kpi-sep { width:1px; background:#f0f0f0; flex-shrink:0; }
.renta-kpi-label { font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; color:#888; font-weight:600; }
.renta-kpi-val { font-size:1.35rem; font-weight:700; color:#111; }
.renta-pos { color:#374151 !important; }
.renta-neg { color:#b51818 !important; }

.renta-highlights { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:24px; }
.renta-highlight-card { background:#fff; border:1px solid #f0f0f0; border-radius:12px; padding:20px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.renta-best { border-left:4px solid #374151; }
.renta-watch-card { border-left:4px solid #c0120c; }
.renta-badge-best { display:inline-flex; align-items:center; gap:5px; font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:#374151; margin-bottom:8px; }
.renta-badge-warn { display:inline-flex; align-items:center; gap:5px; font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:#c0120c; margin-bottom:8px; }
.renta-highlight-name { font-weight:700; font-size:1rem; color:#111; }
.renta-highlight-meta { font-size:.8rem; color:#888; margin-bottom:10px; }
.renta-highlight-stats { display:flex; gap:16px; flex-wrap:wrap; font-size:.85rem; color:#444; }

.renta-table-wrap { background:#fff; border:1px solid #f0f0f0; border-radius:12px; overflow:hidden; margin-bottom:24px; box-shadow:0 1px 4px rgba(0,0,0,.04); overflow-x:auto; }
.renta-table { width:100%; border-collapse:collapse; font-size:.85rem; }
.renta-table thead tr { background:#f9f9f9; }
.renta-table th { padding:10px 14px; text-align:left; font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; color:#888; font-weight:600; border-bottom:1px solid #f0f0f0; white-space:nowrap; }
.renta-table td { padding:13px 14px; border-bottom:1px solid #f9f9f9; color:#222; vertical-align:middle; }
.renta-table tbody tr:last-child td { border-bottom:none; }
.renta-table tbody tr:hover td { background:#fafafa; }
.renta-prop-name { font-weight:600; font-size:.9rem; }
.renta-prop-city { font-size:.78rem; color:#888; }

.performance-badge { display:inline-block; padding:3px 10px; border-radius:999px; font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; white-space:nowrap; }
.perf-excellent  { background:#f3f4f6; color:#374151; }
.perf-bon        { background:#fff5f5; color:#c41d15; }
.perf-optimiser  { background:#fed7aa; color:#c41d15; }
.perf-verifier   { background:#f3f4f6; color:#4b5563; }
.perf-risque     { background:#fee2e2; color:#b51818; }
/* legacy aliases for the investment simulator */
.perf-correct    { background:#f7f7f8; color:#a16207; }
.perf-watch      { background:#fee2e2; color:#b51818; }
.perf-surveiller { background:#f7f7f8; color:#a16207; }
.analysis-badge-col { display:flex; flex-direction:column; align-items:flex-end; gap:4px; min-width:0; }
.analysis-badge-hint { font-size:.70rem; color:#6b7280; text-align:right; line-height:1.35; max-width:160px; }

.analysis-cards-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:16px; margin-bottom:24px; }
.analysis-card { background:#fff; border:1px solid #f0f0f0; border-radius:12px; padding:20px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.analysis-card-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:14px; gap:8px; }
.analysis-card-name { font-weight:700; font-size:.95rem; color:#111; }
.analysis-card-city { font-size:.78rem; color:#888; }
.analysis-card-stats { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; margin-bottom:14px; }
.analysis-stat-label { font-size:.72rem; color:#888; display:block; }
.analysis-stat-val { font-size:.9rem; color:#111; }
.analysis-progress-label { display:flex; justify-content:space-between; font-size:.75rem; color:#888; margin-bottom:4px; }
.analysis-progress-track { background:#f0f0f0; border-radius:999px; height:5px; overflow:hidden; }
.analysis-progress-fill { height:100%; background:var(--brand); border-radius:999px; }

.scenario-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; margin-bottom:20px; }
.scenario-card { background:#fff; border:1px solid #f0f0f0; border-radius:12px; padding:16px 18px; text-align:center; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.scenario-pessimiste { border-top:3px solid #ef4444; }
.scenario-neutre     { border-top:3px solid #c0120c; }
.scenario-optimiste  { border-top:3px solid #9ca3af; }
.scenario-label { font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; font-weight:600; color:#888; margin-bottom:6px; }
.scenario-pessimiste .scenario-delta { color:#ef4444; font-weight:700; }
.scenario-neutre     .scenario-delta { color:#c0120c; font-weight:700; }
.scenario-optimiste  .scenario-delta { color:#9ca3af; font-weight:700; }
.scenario-val { font-size:1.2rem; font-weight:700; color:#111; margin-bottom:4px; }
.scenario-net { font-size:.8rem; color:#555; }

.rev-marche-empty { background:#f9f9f9; border:1px dashed #e0e0e0; border-radius:8px; padding:12px 16px; font-size:.82rem; color:#aaa; display:flex; align-items:center; gap:8px; margin-top:12px; }

.proj-controls-row { display:flex; align-items:center; gap:14px; margin-bottom:20px; flex-wrap:wrap; }
.proj-duration-label { font-size:.85rem; font-weight:600; color:#555; }
.proj-duration-btns { display:flex; gap:6px; flex-wrap:wrap; }
.proj-dur-btn { padding:6px 14px; border:1px solid #e5e5e5; border-radius:8px; background:#fff; font-size:.82rem; color:#555; cursor:pointer; }
.proj-dur-btn:hover { border-color:var(--brand); color:var(--brand); }
.proj-dur-btn.active { background:var(--brand); border-color:var(--brand); color:#fff; font-weight:600; }
.proj-chart-card { background:#fff; border:1px solid #f0f0f0; border-radius:12px; padding:20px; margin-bottom:20px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.proj-hypotheses-card { background:#fff; border:1px solid #e4e6eb; border-radius:14px; padding:24px 28px; box-shadow:0 1px 6px rgba(0,0,0,.05); margin-bottom:24px; }
.proj-hyp-title { font-weight:700; font-size:.95rem; color:#111; margin-bottom:20px; }
.proj-hyp-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
.proj-hyp-item { display:flex; flex-direction:column; gap:0; }
.proj-hyp-label { font-size:.72rem; font-weight:600; color:#9ca3af; text-transform:uppercase; letter-spacing:.04em; margin-bottom:8px; }
.proj-hyp-val-row { display:flex; align-items:baseline; gap:4px; margin-bottom:10px; }
.proj-hyp-val { font-size:1.45rem; font-weight:800; color:#111; line-height:1; }
.proj-hyp-unit { font-size:.8rem; font-weight:600; color:#6b7280; }
/* Custom range slider */
.proj-range { -webkit-appearance:none; appearance:none; width:100%; height:5px; border-radius:999px; outline:none; cursor:pointer; border:none; }
.proj-range::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:22px; height:22px; border-radius:50%; background:#c0120c; border:3px solid #fff; box-shadow:0 0 0 1px #c0120c, 0 2px 6px rgba(192,18,12,.35); cursor:pointer; transition:transform .1s,box-shadow .1s; }
.proj-range::-webkit-slider-thumb:hover { transform:scale(1.15); box-shadow:0 0 0 1px #c0120c, 0 3px 10px rgba(192,18,12,.45); }
.proj-range::-moz-range-thumb { width:22px; height:22px; border-radius:50%; background:#c0120c; border:3px solid #fff; box-shadow:0 0 0 1px #c0120c, 0 2px 6px rgba(192,18,12,.35); cursor:pointer; }
.proj-range::-moz-range-track { height:5px; border-radius:999px; background:#e5e7eb; }
.proj-range:focus { outline:none; }
.proj-range:focus::-webkit-slider-thumb { box-shadow:0 0 0 3px rgba(192,18,12,.2), 0 2px 6px rgba(192,18,12,.35); }
.proj-hyp-minmax { display:flex; justify-content:space-between; margin-top:6px; font-size:.7rem; color:#bbb; }
@media (max-width:900px) { .proj-hyp-grid { grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px) { .proj-hyp-grid { grid-template-columns:1fr; } }
.proj-export-btn { margin-left:auto; padding:7px 16px; background:var(--brand); border:none; border-radius:8px; color:#fff; font-size:.82rem; font-weight:600; cursor:pointer; white-space:nowrap; transition:background .15s; }
.proj-export-btn:hover { background:#a00f09; }

/* ===== ARBITRAGE - KPI strip ===== */
.arb-kpi-strip {
  display: flex; align-items: stretch; background: #fff;
  border: 1px solid #e4e6eb; border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04); margin-bottom: 20px;
  overflow: hidden;
}
.arb-kpi-item { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:16px 20px; flex:1; min-width:0; }
.arb-kpi-sep  { width:1px; background:#f0f0f0; flex-shrink:0; }
.arb-kpi-label { font-size:.75rem; color:#888; text-align:center; white-space:nowrap; }
.arb-kpi-val   { font-size:1.5rem; font-weight:800; color:#111; margin-top:2px; }
.arb-val-keep  { color:#16a34a; }
.arb-val-optim { color:#f97316; }
.arb-val-watch { color:#c2410c; }
.arb-val-sell  { color:#b91c1c; }

/* ===== ARBITRAGE - Toolbar filtres + tri ===== */
.arb-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:20px; }
.arb-filter-group { display:flex; flex-wrap:wrap; gap:6px; }
.arb-filter-btn {
  font-size:.78rem; font-weight:600; padding:6px 14px; border-radius:999px;
  border:1px solid #e4e6eb; background:#fff; color:#555; cursor:pointer;
  transition:background .15s,color .15s,border-color .15s;
}
.arb-filter-btn:hover   { border-color:#c0120c; color:#c0120c; }
.arb-filter-btn.active  { background:#c0120c; border-color:#c0120c; color:#fff; }
.arb-sort-wrap  { display:flex; align-items:center; gap:8px; }
.arb-sort-label { font-size:.78rem; color:#888; white-space:nowrap; }
.arb-sort-select {
  font-size:.8rem; padding:6px 10px; border:1px solid #e4e6eb;
  border-radius:7px; background:#fff; color:#111; cursor:pointer; outline:none;
}
.arb-empty { padding:32px; text-align:center; color:#999; font-size:.9rem; }

/* ===== ARBITRAGE - Grille de cartes ===== */
.recommendation-cards-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(310px,1fr)); gap:20px; }
.recommendation-card {
  background:#fff; border:1px solid #eaecef; border-radius:14px;
  padding:20px; box-shadow:0 1px 6px rgba(0,0,0,.05);
  display:flex; flex-direction:column; gap:14px;
}
.reco-keep  { border-top:3px solid #374151; }
.reco-optim { border-top:3px solid #92400e; }
.reco-watch { border-top:3px solid #c2410c; }
.reco-sell  { border-top:3px solid #b91c1c; }

.reco-card-header { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.reco-prop-info   { flex:1; min-width:0; }
.reco-prop-name   { font-weight:700; font-size:.95rem; color:#111; }
.reco-prop-city   { font-size:.78rem; color:#888; margin-top:2px; }

.reco-score-circle { position:relative; width:44px; height:44px; flex-shrink:0; }
.reco-score-svg    { width:44px; height:44px; transform:rotate(-90deg); }
.reco-score-num    { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:.74rem; font-weight:800; }

.reco-badge-wrap { }
.risk-badge { display:inline-block; padding:3px 10px; border-radius:999px; font-size:.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.reco-keep  .risk-badge { background:#dcfce7; color:#16a34a; }
.reco-optim .risk-badge { background:#fff7ed; color:#f97316; }
.reco-watch .risk-badge { background:#fff1ec; color:#c2410c; }
.reco-sell  .risk-badge { background:#fee2e2; color:#b91c1c; }

.reco-metrics { display:grid; grid-template-columns:1fr 1fr; gap:8px 14px; }
.reco-metric span    { font-size:.71rem; color:#999; display:block; margin-bottom:1px; }
.reco-metric strong  { font-size:.87rem; color:#111; }

.reco-text { font-size:.82rem; color:#555; background:#f8f9fa; border-radius:8px; padding:10px 12px; line-height:1.5; }

.reco-decision { background:#f8f9fa; border-radius:8px; padding:10px 12px; display:flex; flex-direction:column; gap:6px; }
.reco-decision-row   { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.reco-decision-label { font-size:.72rem; color:#888; }
.reco-decision-val   { font-size:.78rem; font-weight:700; }
.reco-decision-val.reco-keep  { color:#374151; }
.reco-decision-val.reco-optim { color:#92400e; }
.reco-decision-val.reco-watch { color:#c2410c; }
.reco-decision-val.reco-sell  { color:#b91c1c; }
.reco-decision-next { font-size:.78rem; color:#444; font-weight:500; text-align:right; max-width:60%; }

.reco-actions-title { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:#999; margin-bottom:5px; }
.reco-actions-list  { margin:0; padding-left:16px; display:flex; flex-direction:column; gap:4px; }
.reco-actions-list li { font-size:.81rem; color:#444; }

.reco-card-footer { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-top:auto; padding-top:4px; border-top:1px solid #f0f0f0; }
.reco-disclaimer  { font-size:.68rem; color:#bbb; flex:1; }
.reco-detail-btn  {
  font-size:.78rem; font-weight:600; padding:6px 14px; border-radius:7px;
  border:1px solid #c0120c; background:transparent; color:#c0120c;
  cursor:pointer; white-space:nowrap; transition:background .15s,color .15s;
  flex-shrink:0;
}
.reco-detail-btn:hover { background:#c0120c; color:#fff; }

/* ===== ARBITRAGE DETAIL - Page ===== */
.arb-detail-header { margin-bottom:24px; }
.arb-back-btn {
  display:inline-flex; align-items:center; gap:6px; font-size:.82rem; font-weight:700;
  color:#fff; background:#c0120c; border:1.5px solid #c0120c; border-radius:8px;
  padding:7px 16px; cursor:pointer; margin-bottom:16px;
  transition:background 150ms, border-color 150ms;
}
.arb-back-btn:hover { background:#a00f09; border-color:#a00f09; color:#fff; }
.arb-back-btn svg { stroke:#fff; }
.arb-detail-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; flex-wrap:wrap; }
.arb-detail-h2  { font-size:1.5rem; font-weight:800; color:#111; margin:4px 0 4px; }
.arb-detail-sub { font-size:.85rem; color:#888; }
.arb-detail-score-block { display:flex; flex-direction:column; align-items:center; gap:4px; flex-shrink:0; }
.arb-detail-score-circle { position:relative; width:80px; height:80px; }
.arb-detail-score-circle svg { transform:rotate(-90deg); }
.arb-detail-score-inner { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
.arb-detail-score-num { font-size:1.75rem; font-weight:800; line-height:1; }
.arb-detail-score-sub { font-size:.65rem; color:#999; }

.arb-detail-body { display:flex; flex-direction:column; gap:16px; }

.arb-detail-card { background:#fff; border:1px solid #eaecef; border-radius:12px; padding:20px; box-shadow:0 1px 4px rgba(0,0,0,.04); }
.arb-detail-card-title { font-size:.82rem; font-weight:700; color:#111; text-transform:uppercase; letter-spacing:.04em; margin-bottom:14px; }

.arb-detail-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }

/* Score breakdown */
.arb-score-breakdown { display:flex; flex-direction:column; gap:10px; }
.arb-score-row       { display:flex; align-items:center; gap:12px; }
.arb-score-row-left  { width:160px; flex-shrink:0; }
.arb-score-row-label { display:block; font-size:.8rem; color:#444; font-weight:500; }
.arb-score-row-hint  { display:block; font-size:.72rem; color:#999; }
.arb-score-bar-wrap  { flex:1; }
.arb-score-bar       { background:#f0f0f0; border-radius:999px; height:6px; overflow:hidden; }
.arb-score-bar-fill  { height:6px; border-radius:999px; transition:width .3s; }
.arb-score-row-pts   { width:52px; text-align:right; font-size:.78rem; font-weight:700; color:#111; flex-shrink:0; }

/* Points forts/faibles */
.arb-points-list { margin:0; padding-left:18px; display:flex; flex-direction:column; gap:6px; }
.arb-points-list li { font-size:.83rem; }
.arb-points-pos li  { color:#374151; }
.arb-points-neg li  { color:#b91c1c; }
.arb-points-none    { font-size:.82rem; color:#aaa; }

/* Scénarios */
.arb-scenarios-grid   { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.arb-scenario-card    { background:#fff; border:1px solid #eaecef; border-radius:12px; padding:18px; box-shadow:0 1px 4px rgba(0,0,0,.04); display:flex; flex-direction:column; gap:10px; }
.arb-scenario-keep    { border-top:3px solid #16a34a; }
.arb-scenario-optim   { border-top:3px solid #f97316; }
.arb-scenario-sell    { border-top:3px solid #b91c1c; }
.arb-scenario-head    { font-size:.8rem; font-weight:700; color:#111; text-transform:uppercase; letter-spacing:.05em; }
.arb-scenario-body    { display:flex; flex-direction:column; gap:8px; flex:1; }
.arb-sc-row           { display:flex; justify-content:space-between; align-items:center; gap:8px; font-size:.82rem; }
.arb-sc-row span      { color:#888; flex:1; }
.arb-sc-row strong    { text-align:right; color:#111; white-space:nowrap; }
.arb-sc-total         { padding-top:8px; border-top:1px solid #f0f0f0; }
.arb-sc-total strong  { font-size:.9rem; }
.arb-scenario-note    { font-size:.72rem; color:#bbb; margin-top:auto; }

/* Actions détail */
.arb-detail-actions-list  { margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:8px; }
.arb-detail-action-item   { display:flex; align-items:flex-start; gap:10px; font-size:.84rem; color:#444; }
.arb-action-num           { width:22px; height:22px; border-radius:50%; background:#f0f0f0; display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:700; color:#555; flex-shrink:0; margin-top:1px; }

/* Recommandation finale */
.arb-reco-finale { background:#fff; border:1px solid #eaecef; border-radius:12px; padding:22px 24px; box-shadow:0 1px 4px rgba(0,0,0,.04); display:grid; grid-template-columns:1fr auto; gap:24px; align-items:start; }
.arb-reco-finale-label  { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:#999; margin-bottom:4px; }
.arb-reco-finale-val    { font-size:1.1rem; font-weight:800; margin-bottom:8px; }
.arb-reco-finale-val.reco-keep  { color:#374151; }
.arb-reco-finale-val.reco-optim { color:#92400e; }
.arb-reco-finale-val.reco-watch { color:#c2410c; }
.arb-reco-finale-val.reco-sell  { color:#b91c1c; }
.arb-reco-finale-text   { font-size:.84rem; color:#555; line-height:1.55; }
.arb-reco-finale-right  { text-align:right; min-width:140px; }
.arb-reco-finale-action { font-size:.85rem; color:#111; font-weight:600; margin-bottom:4px; }
.arb-reco-finale-conf   { font-size:.85rem; color:#374151; font-weight:700; }

.arb-detail-disclaimer { font-size:.72rem; color:#ccc; line-height:1.5; margin-top:8px; }

/* ===== RESPONSIVE arbitrage ===== */
@media (max-width: 900px) {
  .arb-scenarios-grid  { grid-template-columns:1fr; }
  .arb-detail-grid-2   { grid-template-columns:1fr; }
  .arb-reco-finale     { grid-template-columns:1fr; }
  .arb-kpi-strip       { flex-wrap:wrap; }
  .arb-kpi-item        { flex:0 0 40%; }
  .arb-kpi-sep         { display:none; }
}
@media (max-width: 600px) {
  .recommendation-cards-grid { grid-template-columns:1fr; }
  .arb-toolbar         { flex-direction:column; align-items:flex-start; }
  .arb-kpi-item        { flex:0 0 100%; }
  .arb-score-row-left  { width:110px; }
  .reco-decision-next  { max-width:100%; text-align:left; }
}

/* ── nav-link--section (Calendrier direct link) ─────── */
.nav-link--section {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px; margin: 0 8px; border-radius: 7px;
  font-size: .82rem; font-weight: 500; color: var(--sidebar-text, #c8ccd4);
  text-decoration: none; transition: background .15s, color .15s;
}
.nav-link--section svg { flex-shrink:0; opacity:.75; }
.nav-link--section:hover { background: rgba(255,255,255,.08); color:#fff; }
.nav-link--section.active { background: rgba(192,18,12,.18); color:var(--brand); }

/* ── Calendar page ───────────────────────────────────── */
.cal-kpi-strip {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px;
}
.cal-kpi {
  background: var(--card-bg,#fff); border: 1px solid var(--border,#e8e8e8);
  border-radius: 10px; padding: 16px 20px; text-align: center;
}
.cal-kpi--danger { border-color: #ef4444; }
.cal-kpi--danger .cal-kpi-val { color: #ef4444; }
.cal-kpi-val { font-size: 2rem; font-weight: 700; color: var(--text-primary,#111); line-height: 1.1; }
.cal-kpi-label { font-size: .78rem; color: var(--text-muted,#888); margin-top: 3px; }

.cal-filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.cal-filter-btn {
  padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border,#e8e8e8);
  background: var(--card-bg,#fff); color: var(--text-secondary,#555); font-size: .78rem;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.cal-filter-btn:hover { border-color: var(--brand); color: var(--brand); }
.cal-filter-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.cal-view-toggle { display: flex; border: 1px solid var(--border,#e8e8e8); border-radius: 8px; overflow: hidden; }
.cal-view-btn {
  padding: 6px 14px; border: none; background: transparent; color: var(--text-secondary,#555);
  font-size: .82rem; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all .15s;
}
.cal-view-btn:hover { background: var(--bg-secondary,#f5f5f5); }
.cal-view-btn.active { background: var(--brand); color: #fff; }

/* List view */
.cal-list-view { display: flex; flex-direction: column; gap: 24px; }
.cal-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 12px; border-radius: 8px; margin-bottom: 10px; font-size: .82rem; font-weight: 600;
}
.cal-g-danger  { background: #fee2e2; color: #b51818; }
.cal-g-warning { background: #f7f7f8; color: #b91c1c; }
.cal-g-normal  { background: var(--bg-secondary,#f5f5f5); color: var(--text-primary,#111); }
.cal-g-muted   { background: var(--bg-secondary,#f5f5f5); color: var(--text-muted,#888); }
.cal-g-done    { background: #f7f7f8; color: #374151; }
.cal-group-count { background: rgba(0,0,0,.08); border-radius: 12px; padding: 1px 8px; font-size: .75rem; }
.cal-group-events { display: flex; flex-direction: column; gap: 8px; }

/* Event card */
.cal-event-card {
  display: flex; background: var(--card-bg,#fff);
  border: 1px solid var(--border,#e8e8e8); border-radius: 12px;
  overflow: hidden; transition: box-shadow .18s, transform .12s;
}
.cal-event-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.09); transform: translateY(-1px); }
.cal-event-done { opacity: 1; }
.cal-event-strip { width: 5px; flex-shrink: 0; }
.cal-event-body { padding: 14px 16px; flex: 1; min-width: 0; }
.cal-event-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.cal-event-title { font-weight: 700; font-size: .9rem; color: var(--text-primary,#111); line-height: 1.3; }
.cal-event-date { font-size: .75rem; color: var(--text-muted,#888); white-space: nowrap; flex-shrink: 0; }
.cal-event-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.cal-cat-badge, .cal-status-badge, .cal-priority-badge, .cal-prop-badge, .cal-auto-badge {
  padding: 2px 8px; border-radius: 12px; font-size: .7rem; font-weight: 500;
}
.cal-s-blue   { background: #fff5f5; color: #c41d15; }
.cal-s-orange { background: #f7f7f8; color: #b91c1c; }
.cal-s-red    { background: #fee2e2; color: #b51818; }
.cal-s-green  { background: #f3f4f6; color: #374151; }
.cal-p-high  { background: #f7f7f8; color: #b91c1c; }
.cal-p-crit  { background: #fee2e2; color: #b51818; font-weight: 700; }
.cal-prop-badge  { background: var(--bg-secondary,#f5f5f5); color: var(--text-secondary,#555); }
.cal-auto-badge  { background: #f1f5f9; color: #94a3b8; font-style: italic; }
.cal-event-desc  { font-size: .8rem; color: var(--text-secondary,#555); margin: 4px 0 6px; line-height: 1.4; }
.cal-event-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.cal-action-btn {
  padding: 5px 12px; border-radius: 8px; border: 1.5px solid #e5e7eb;
  background: #f9fafb; font-size: .76rem; cursor: pointer;
  color: #374151; font-weight: 600; transition: all .14s; font-family: inherit;
}
.cal-action-btn:hover { background: #f1f5f9; border-color: #d1d5db; }
.cal-action-done { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.cal-action-done:hover { background: #dcfce7; border-color: #86efac; }
.cal-action-del  { background: #fff5f5; border-color: #fecaca; color: #b51818; }
.cal-action-del:hover { background: #fee2e2; border-color: #fca5a5; }
.cal-action-del:hover  { background: #fee2e2; }

/* Month grid */
.cal-month-card { background: var(--card-bg,#fff); border: 1px solid var(--border,#e8e8e8); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.cal-month-nav {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-bottom: 1px solid var(--border,#e8e8e8);
}
.cal-month-title { margin: 0; font-size: 1rem; font-weight: 600; flex: 1; text-align: center; }
.cal-nav-btn {
  display: flex; align-items: center; padding: 5px 8px; border: 1px solid var(--border,#e8e8e8);
  border-radius: 6px; background: var(--card-bg,#fff); cursor: pointer; transition: background .15s;
}
.cal-nav-btn:hover { background: var(--bg-secondary,#f5f5f5); }
.cal-today-btn { font-size: .78rem; color: var(--brand); border-color: var(--brand); padding: 5px 10px; }
.cal-month-grid { display: grid; grid-template-columns: repeat(7,1fr); }
.cal-week-header { padding: 8px 4px; text-align: center; font-size: .75rem; font-weight: 600; color: var(--text-muted,#888); border-bottom: 1px solid var(--border,#e8e8e8); }
.cal-day-cell { min-height: 80px; padding: 6px; border-right: 1px solid var(--border,#e8e8e8); border-bottom: 1px solid var(--border,#e8e8e8); }
.cal-day-cell:nth-child(7n+7) { border-right: none; }
.cal-day-empty { background: var(--bg-secondary,#f5f5f5); opacity: .4; min-height: 80px; }
.cal-day-today { background: #fff5f5; }
.cal-day-num { font-size: .8rem; font-weight: 600; color: var(--text-secondary,#555); display: block; margin-bottom: 4px; }
.cal-day-today .cal-day-num { color: var(--brand); }
.cal-day-events { display: flex; flex-direction: column; gap: 2px; }
.cal-event-dot {
  font-size: .65rem; padding: 1px 5px; border-radius: 3px; color: #fff;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%;
  opacity: .9;
}
.cal-event-more { font-size: .65rem; color: var(--text-muted,#888); padding: 1px 4px; }

/* Empty state */
.cal-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 56px 24px; color: var(--text-muted,#888); text-align: center; background: var(--card-bg,#fff); border: 1px solid var(--border,#e8e8e8); border-radius: 12px; }
.cal-empty p { margin: 0; font-size: .9rem; }

/* ===== Settings / Profil propriétaire ===== */
.sp-page { max-width: 1100px; }
.sp-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
@media (max-width: 860px) { .sp-layout { grid-template-columns: 1fr; } }
.sp-form-col { display: flex; flex-direction: column; gap: 20px; }
.sp-aside-col { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 16px; }
.sp-card { background: var(--card-bg,#fff); border: 1px solid var(--border,#e8e8e8); border-radius: 12px; padding: 20px; }
.sp-card-title { display: flex; align-items: center; gap: 7px; font-size: .92rem; font-weight: 600; color: var(--text-primary,#111); margin-bottom: 16px; }
.sp-card-title svg { color: var(--text-muted,#888); }
.sp-card-sub { font-size: .84rem; color: var(--text-secondary,#666); margin: -10px 0 14px; }
.sp-form-actions { display: flex; align-items: center; gap: 14px; padding: 4px 0 8px; }
.sp-saved-msg { font-size: .84rem; color: #374151; font-weight: 500; }

/* Completion card */
.sp-side-card { background: var(--card-bg,#fff); border: 1px solid var(--border,#e8e8e8); border-radius: 12px; padding: 16px; }
.sp-comp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sp-comp-title { font-size: .84rem; font-weight: 600; color: var(--text-primary,#111); }
.sp-comp-pct { font-size: 1.1rem; font-weight: 700; }
.sp-comp-track { height: 6px; background: var(--border,#e8e8e8); border-radius: 99px; overflow: hidden; margin-bottom: 12px; }
.sp-comp-fill { height: 100%; border-radius: 99px; transition: width .3s; }
.sp-comp-ok { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: #374151; font-weight: 500; }
.sp-comp-ok svg { flex-shrink: 0; }
.sp-comp-miss-lbl { font-size: .8rem; color: var(--text-secondary,#666); margin-bottom: 6px; }
.sp-comp-miss-list { margin: 0; padding-left: 16px; font-size: .8rem; color: #b51818; }
.sp-comp-miss-list li { margin-bottom: 2px; }

/* Preview card */
.sp-preview-hd { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted,#888); margin-bottom: 12px; }
.sp-preview-doc { border: 1px dashed var(--border,#e0e0e0); border-radius: 8px; padding: 12px 14px; background: var(--bg-secondary,#fafafa); min-height: 80px; }
.sp-prev-logo-wrap { margin-bottom: 8px; }
.sp-prev-logo { max-height: 36px; max-width: 120px; object-fit: contain; }
.sp-prev-name { font-size: .88rem; font-weight: 700; color: var(--text-primary,#111); margin-bottom: 4px; }
.sp-prev-info { font-size: .78rem; color: var(--text-secondary,#666); line-height: 1.5; }
.sp-prev-empty { font-style: italic; color: var(--text-muted,#aaa); }
.sp-prev-sig { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border,#eee); }
.sp-sig-img { max-height: 30px; max-width: 100px; object-fit: contain; }
.sp-preview-ft { font-size: .72rem; color: var(--text-muted,#aaa); margin-top: 8px; text-align: center; }

/* Visibility tabs */
.cal-vis-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cal-vis-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 20px; font-size: .8rem; font-weight: 500;
  background: var(--bg-secondary,#f5f5f5); border: 1.5px solid transparent;
  color: var(--text-secondary,#555); cursor: pointer; transition: background 150ms, color 150ms, border-color 150ms;
}
.cal-vis-tab:hover { background: #eee; color: var(--text-primary,#111); }
.cal-vis-tab.active { background: #111; color: #fff; border-color: #111; }

/* Visibility badge on event cards */
.cal-vis-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 10px; font-size: .72rem; font-weight: 600; }

/* Participant badges */
.cal-event-participants { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.cal-participant-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 10px; font-size: .74rem; font-weight: 600; }
.cal-p-tenant     { background: #fff0f0; color: #b51818; border: 1px solid #fecaca; }
.cal-p-contractor { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

/* Muted status badge (Annulé) */
.cal-s-muted { background: #f1f5f9; color: #94a3b8; }

/* "Aujourd'hui" group header */
.cal-g-today { background: #f7f7f8; color: #c41d15; }

/* KPI info variant (Partagés) */
.cal-kpi--info { border-color: #555555; }
.cal-kpi--info .cal-kpi-val { color: #c0120c; }

/* ══════════════════════════════════════════════════════════
   SIDEBAR PREMIUM - overrides (grands titres rouge, sobres)
   ══════════════════════════════════════════════════════════ */

/* ── Groupe headers (Patrimoine, Gestion, Analyse…) ──────── */
.sb-group-btn {
  color: rgba(255,255,255,0.55);
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0;
  padding: 8px 10px 8px 12px;
  margin: 0 2px 1px;
  width: calc(100% - 4px);
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.sb-group-btn:hover {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.90);
}
.sb-group-label {
  gap: 10px;
}
.sb-group-label svg {
  color: rgba(255,255,255,0.55);
  opacity: 1;
}
.sb-group-btn:hover .sb-group-label svg {
  color: rgba(255,255,255,0.90);
}
.sb-chevron {
  color: rgba(255,255,255,0.35);
  opacity: 1 !important;
}
.sb-group-btn:hover .sb-chevron {
  color: rgba(255,255,255,0.70);
}

/* ── Tableau de bord (sb-top-link) ──────────────────────── */
.sb-top-link {
  color: rgba(255,255,255,0.80);
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0;
  padding: 8px 10px 8px 12px;
  margin: 0 2px 4px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.sb-top-link svg {
  color: rgba(255,255,255,0.65);
  opacity: 1;
  flex-shrink: 0;
}
.sb-top-link:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}
.sb-top-link:hover svg { color: #fff; }
/* Supprimer le bloc rouge plein sur actif */
.sb-top-link.active-route,
.sb-top-link.active {
  background: rgba(192,18,12,0.08);
  color: var(--brand);
  font-weight: 700;
  border-left: 2px solid var(--brand);
  padding-left: 10px;
}
.sb-top-link.active svg,
.sb-top-link.active-route svg { opacity: 1; }

/* ── Calendrier (nav-link--section) ─────────────────────── */
.nav-link--section {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.80);
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0;
  padding: 8px 10px 8px 12px;
  margin: 0 2px 1px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  overflow: hidden;
}
.nav-link--section svg {
  color: rgba(255,255,255,0.65);
  opacity: 1;
  flex-shrink: 0;
}
.nav-link--section:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}
.nav-link--section:hover svg { color: #fff; }
.nav-link--section.active {
  background: rgba(192,18,12,0.08);
  color: var(--brand);
  font-weight: 700;
  border-left: 2px solid var(--brand);
  padding-left: 10px;
}
.nav-link--section.active svg { opacity: 1; }

/* ── nav-link.active : texte rouge, fond discret ───── */
.nav-link.active {
  background: rgba(192,18,12,0.09);
  color: var(--brand);
  font-weight: 600;
}
.nav-link.active svg {
  color: var(--brand);
  opacity: 1;
}

/* ── Sub-items dans les groupes : indicateur gauche discret ─ */
.sb-group-body .nav-link.active {
  background: rgba(192,18,12,0.07);
  color: var(--brand);
  font-weight: 600;
  border-left: 2px solid var(--brand);
  padding-left: 6px;
}
.sb-group-body .nav-link:not(.active):hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
}

/* ── Bottom : Abonnement & Paramètres ────────────────────── */
.sb-bottom .nav-link {
  color: rgba(255,255,255,0.65);
  font-size: 0.87rem;
  font-weight: 500;
  gap: 9px;
}
.sb-bottom .nav-link svg {
  color: rgba(255,255,255,0.50);
  opacity: 1;
}
.sb-bottom .nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}
.sb-bottom .nav-link:hover svg { color: #fff; opacity: 1; }
.sb-bottom .nav-link.active {
  background: rgba(192,18,12,0.08);
  color: var(--brand);
  border-left: 2px solid var(--brand);
  padding-left: 8px;
}

/* ── Déconnexion ─────────────────────────────────────────── */
.sb-logout {
  color: rgba(255,255,255,0.28);
  font-size: 0.82rem;
  font-weight: 400;
}
.sb-logout svg { color: rgba(255,255,255,0.28); opacity: 1; }
.sb-logout:hover {
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.6);
}
.sb-logout:hover svg { opacity: 0.8; }

/* ══════════════════════════════════════════════════════
   SIMULATEURS - layout & composants
   ══════════════════════════════════════════════════════ */

.sim-page { padding: 0; }
.sim-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}
@media (max-width: 900px) { .sim-layout { grid-template-columns: 1fr; } }

.sim-form-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sim-results-col { min-width: 0; }
.sim-sticky { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.sim-amort-section { margin-top: 24px; }

.sim-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 12px;
  padding: 20px;
}
.sim-card--score { border-left: 3px solid var(--brand); }

.sim-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #999;
  margin-bottom: 14px;
}

.sim-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.sim-field { display: flex; flex-direction: column; gap: 5px; }
.sim-field.full { grid-column: 1 / -1; }
.sim-field label { font-size: 0.77rem; color: #666; font-weight: 500; }

/* ── Unified input — all simulators ── */
.sim-input {
  padding: var(--input-padding);
  border: var(--input-border);
  border-radius: var(--input-radius);
  font-size: var(--input-font-size);
  color: var(--ink);
  background: var(--surface);
  width: 100%;
  min-height: 40px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
  font-family: inherit;
}
.sim-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light); }
.sim-input::placeholder { color: #bbb; }

/* results */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.result-kpi {
  background: var(--bg-secondary, #f7f8fa);
  border-radius: 9px;
  padding: 12px 10px;
  text-align: center;
}
.result-kpi-val { font-size: 1.05rem; font-weight: 700; color: #111; line-height: 1.2; }
.result-kpi-lbl { font-size: 0.68rem; color: #999; margin-top: 3px; line-height: 1.3; }

.sim-score-row { margin-bottom: 6px; }
.sim-analysis  { font-size: 0.83rem; color: #555; line-height: 1.55; margin: 0; }

.sim-detail-list { display: flex; flex-direction: column; gap: 0; }
.sim-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: #555;
  padding: 8px 0;
  border-bottom: 1px solid var(--border, #f0f0f0);
}
.sim-detail-row:last-child { border-bottom: none; }
.sim-detail-row strong { color: #111; font-weight: 600; }

/* scenarios */
.sim-scenario-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.sim-scenario-card {
  border-radius: 10px;
  padding: 13px 8px;
  text-align: center;
  border: 1px solid transparent;
}
.sim-scenario-card.pessimiste { background: #fee2e2; border-color: #fca5a5; }
.sim-scenario-card.neutre     { background: #fff5f5; border-color: #f87171; }
.sim-scenario-card.optimiste  { background: #f3f4f6; border-color: #86efac; }
.sim-scenario-title { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.sim-scenario-card.pessimiste .sim-scenario-title { color: #b51818; }
.sim-scenario-card.neutre     .sim-scenario-title { color: #c41d15; }
.sim-scenario-card.optimiste  .sim-scenario-title { color: #374151; }
.sim-scenario-val { font-size: 1rem; font-weight: 700; color: #111; }
.sim-scenario-sub { font-size: 0.65rem; color: #777; margin-top: 2px; }

/* amortization table */
.sim-table { width: 100%; border-collapse: collapse; font-size: 0.77rem; }
.sim-table th {
  padding: 7px 8px;
  background: var(--bg-secondary, #f7f8fa);
  font-weight: 600;
  text-align: right;
  border-bottom: 2px solid var(--border, #e8e8e8);
  white-space: nowrap;
  color: #444;
}
.sim-table th:first-child { text-align: left; }
.sim-table td { padding: 6px 8px; border-bottom: 1px solid var(--border, #f4f4f4); text-align: right; color: #333; }
.sim-table td:first-child { text-align: left; color: #888; }
.sim-table tr:hover td { background: #fafafa; }

/* Amortissement filter controls */
.sf-amort-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sf-amort-btn { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border, #e5e7eb); background: #fff; color: #555; font-size: 0.78rem; cursor: pointer; transition: background 0.15s, color 0.15s, border-color 0.15s; white-space: nowrap; }
.sf-amort-btn:hover { background: #f3f4f6; border-color: #c7c9cc; }
.sf-amort-btn--active { background: var(--brand, #c0120c); color: #fff; border-color: var(--brand, #c0120c); }
.sf-amort-btn--xlsx { margin-left: auto; background: #e8f5e9; color: #1b5e20; border-color: #a5d6a7; font-weight: 600; }
.sf-amort-btn--xlsx:hover { background: #c8e6c9; border-color: #81c784; }
.sf-amort-btn--csv { background: #f7f7f8; color: #374151; border-color: #e5e7eb; }
.sf-amort-btn--csv:hover { background: #f3f4f6; }

/* chart */
.sim-chart-wrap { position: relative; height: 190px; margin-top: 4px; }

/* disclaimer */
.sim-disclaimer {
  font-size: 0.74rem;
  color: #bbb;
  font-style: italic;
  line-height: 1.45;
  margin: 0;
}

/* ── Simulateur revente - KPI 3 colonnes ── */
.sr-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.sr-kpi-card {
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
  border: 1px solid transparent;
}
.sr-kpi-card--gross {
  background: #f7f7f8;
  border-color: #fecaca;
}
.sr-kpi-card--tax {
  background: #fef2f2;
  border-color: #fecaca;
}
.sr-kpi-card--net {
  background: #f7f7f8;
  border-color: #86efac;
  box-shadow: 0 2px 12px rgba(22,163,74,0.10);
}
.sr-kpi-val {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  color: #111;
}
.sr-kpi-card--gross .sr-kpi-val { color: #c41d15; }
.sr-kpi-card--tax  .sr-kpi-val { color: #b51818; }
.sr-kpi-card--net  .sr-kpi-val { color: #374151; font-size: 1.2rem; }
.sr-kpi-lbl {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  margin-top: 5px;
  line-height: 1.3;
}

/* Warnings & notes fiscaux */
.sr-tax-warning {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #9b1c1c;
  margin-bottom: 6px;
  line-height: 1.45;
}
.sr-tax-note {
  font-size: 0.74rem;
  color: #aaa;
  font-style: italic;
  line-height: 1.4;
}

/* Lignes résultat colorées */
.sim-detail-row.sr-row-gross strong { color: #c41d15 !important; font-weight: 700; }
.sim-detail-row.sr-row-tax  strong { color: #b51818 !important; }
.sim-detail-row.sr-row-net  { border-top: 2px solid #e5e7eb; margin-top: 2px; }
.sim-detail-row.sr-row-net  strong { color: #374151 !important; font-size: .95rem; font-weight: 800; }

/* Scénarios - valeur nette */
.sr-scenario-net { font-size: 0.88rem; color: #374151; font-weight: 700; margin-top: 4px; }

/* =====================================================================
   LOCATAIRES - VUE PAR APPARTEMENT
   ===================================================================== */

.tenants-property-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

/* Carte appartement */
.tpc-card {
  background: #fff;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.tpc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px 16px;
}
.tpc-header-left { flex: 1; min-width: 0; }
.tpc-prop-name { font-size: 1.05rem; font-weight: 700; color: #111; }
.tpc-prop-meta { font-size: 0.8rem; color: #888; margin-top: 3px; }
.tpc-address { font-size: 0.78rem; color: #aaa; margin-top: 2px; }
.tpc-sep { color: #ccc; margin: 0 4px; }
.tpc-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.tpc-rent { font-size: 1.15rem; font-weight: 700; color: #111; }
.tpc-rent-unit { font-size: 0.75rem; font-weight: 400; color: #888; margin-left: 2px; }

.tpc-divider { height: 1px; background: var(--border, #f0f0f0); }

/* Bloc locataire actuel */
.tpc-tenant-block {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border, #f0f0f0);
}
.tpc-tb-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #aaa;
  margin-bottom: 12px;
}
.tpc-tenant-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tpc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #E02020;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tpc-avatar.tpc-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
  background: #666;
}
.tpc-tenant-info { flex: 1; min-width: 0; }
.tpc-tenant-name { font-weight: 600; color: #111; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tpc-tenant-meta { font-size: 0.8rem; color: #888; margin-top: 2px; }
.tpc-bail-info { font-size: 0.78rem; color: #aaa; margin-top: 2px; }
.tpc-retard-badge {
  background: #fee2e2;
  color: #E02020;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.68rem;
  font-weight: 600;
}
.tpc-tenant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* Bloc logement vacant */
.tpc-vacant-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  background: var(--bg-secondary, #f9f9f9);
  border-bottom: 1px solid var(--border, #f0f0f0);
}
.tpc-vacant-block svg { color: #bbb; flex-shrink: 0; }
.tpc-vacant-label { color: #888; font-size: 0.88rem; flex: 1; }
.tpc-tenant-actions.tpc-vacant-actions { margin-top: 0; }

/* Boutons actions */
.tpc-btn {
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid var(--border, #e0e0e0);
  background: var(--bg-secondary, #f7f7f7);
  color: #444;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.tpc-btn:hover { background: #efefef; border-color: #ccc; }
.tpc-btn.tpc-btn-primary {
  background: #E02020;
  border-color: #E02020;
  color: #fff;
}
.tpc-btn.tpc-btn-primary:hover { background: #c0120c; }
.tpc-btn.tpc-btn-danger {
  border-color: #fca5a5;
  color: #E02020;
  background: #fff5f5;
}
.tpc-btn.tpc-btn-danger:hover { background: #fee2e2; }
.tpc-btn.tpc-btn-email {
  border-color: #d1d5db;
  color: #374151;
  background: #fff;
  display: inline-flex; align-items: center; gap: 5px;
}
.tpc-btn.tpc-btn-email:hover { border-color: #c0120c; color: #c0120c; }

/* Grille de détails (historique / docs / paiements) */
.tpc-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  border-top: 1px solid var(--border, #f0f0f0);
}
.tpc-section {
  padding: 16px 20px;
  border-right: 1px solid var(--border, #f0f0f0);
}
.tpc-section:last-child { border-right: none; }
.tpc-section-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #888;
  margin-bottom: 10px;
}
.tpc-section-count {
  background: #f0f0f0;
  color: #666;
  border-radius: 8px;
  padding: 0 5px;
  font-size: 0.65rem;
  font-weight: 700;
}
.tpc-list { display: flex; flex-direction: column; gap: 6px; }

/* Historique items */
.tpc-history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f4f4f4;
}
.tpc-history-item:last-child { border-bottom: none; }
.tpc-hi-info { flex: 1; min-width: 0; }
.tpc-hi-name { font-size: 0.82rem; font-weight: 600; color: #222; }
.tpc-hi-period { font-size: 0.75rem; color: #aaa; }

/* Documents items */
.tpc-doc-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #f4f4f4;
}
.tpc-doc-item:last-child { border-bottom: none; }
.tpc-doc-info { flex: 1; min-width: 0; }
.tpc-doc-title { font-size: 0.82rem; font-weight: 500; color: #222; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpc-doc-meta { font-size: 0.73rem; color: #aaa; }
.tpc-more { font-size: 0.75rem; color: #888; padding-top: 4px; }

/* Paiements items */
.tpc-pay-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid #f4f4f4;
}
.tpc-pay-item:last-child { border-bottom: none; }
.tpc-pay-month { font-size: 0.8rem; color: #444; flex: 1; }
.tpc-pay-amount { font-size: 0.82rem; font-weight: 600; color: #111; }

/* Modal clôture */
.cloture-summary {
  background: var(--bg-secondary, #f7f8fa);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: 1px solid var(--border, #e8e8e8);
}
.cloture-prop { font-weight: 700; font-size: 1rem; color: #111; }
.cloture-tenant { font-size: 0.85rem; color: #666; margin-top: 3px; }

/* ══════════════════════════════════════════════
   FIN DE LOCATION - bloc compact
   ══════════════════════════════════════════════ */

/* Conteneur - margin-top pour l'espace avec les boutons du dessus */
.tpc-moveout-block {
  margin: 20px 20px 16px;
  border-radius: 12px;
  border: 1px solid #e9eaec;
  background: #fafafa;
  overflow: hidden;
}
.tpc-moveout-block.tpc-moveout-declared {
  border-color: rgba(229, 57, 53, 0.28);
  background: #fffafa;
}

/* Header : titre gauche, badge droite */
.tpc-mo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(229, 57, 53, 0.14);
}
.tpc-moveout-none .tpc-mo-header {
  border-bottom: none;
  padding: 10px 16px;
}
.tpc-mo-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #aaa;
}
.tpc-moveout-declared .tpc-mo-title { color: #c41d15; }
.tpc-moveout-declared .tpc-mo-title svg { stroke: #c41d15; }

/* Badge statut */
.tpc-mo-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 9px;
  border-radius: 20px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tpc-mo-badge-alert { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
.tpc-mo-badge-ok    { background: #f3f4f6; color: #555;    border-color: #e5e7eb; }
.tpc-mo-badge-plan  { background: #f3f4f6; color: #444;    border-color: #e5e7eb; }

/* Séparateur - géré par border-bottom du header */
.tpc-mo-divider { display: none; }

/* Grille 4 colonnes compacte */
.tpc-mo-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 12px 16px 10px;
}
.tpc-mo-field { padding: 0; }
.tpc-mo-field-label {
  font-size: 0.63rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #bbb;
  margin-bottom: 3px;
  line-height: 1.3;
}
.tpc-mo-field-value {
  font-size: 0.83rem;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
}
.tpc-mo-empty {
  font-weight: 400;
  color: #ccc;
  font-style: italic;
  font-size: 0.79rem;
}

/* Message locataire - compact */
.tpc-mo-message {
  margin: 2px 16px 10px;
  background: rgba(255,250,250,1);
  border: 1px solid rgba(229, 57, 53, 0.14);
  border-radius: 7px;
  padding: 7px 11px;
}
.tpc-mo-msg-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #ccc;
  margin-bottom: 3px;
}
.tpc-mo-msg-content {
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
  line-height: 1.5;
}
.tpc-mo-msg-content::before { content: "\201C"; }
.tpc-mo-msg-content::after  { content: "\201D"; }

/* Footer actions compact */
.tpc-mo-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 12px;
  border-top: 1px solid rgba(229, 57, 53, 0.14);
  background: rgba(255,255,255,.5);
}

/* Boutons du bloc fin de location */
.tpc-mo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: background .13s, border-color .13s, color .13s;
  line-height: 1;
}
.tpc-mo-btn-primary   { background: #c0120c; border-color: #c0120c; color: #fff; }
.tpc-mo-btn-primary:hover  { background: #c41d15; border-color: #c41d15; }
.tpc-mo-btn-secondary { background: #fff; border-color: #d1d5db; color: #374151; }
.tpc-mo-btn-secondary:hover { background: #f9fafb; border-color: #9ca3af; }
.tpc-mo-btn-ghost     { background: #fff; border-color: #e5e7eb; color: #555; }
.tpc-mo-btn-ghost:hover  { background: #f9fafb; border-color: #d1d5db; }
.tpc-mo-btn-danger    { background: #fff; border-color: #fca5a5; color: #b51818; }
.tpc-mo-btn-danger:hover { background: #fff5f5; border-color: #f87171; }

/* État "aucune demande" - header compact sur une ligne */
.tpc-mo-none-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tpc-mo-none-text {
  font-size: 0.75rem;
  color: #ccc;
  font-style: italic;
}

/* ══════════════════════════════════════════════
   MESSAGERIE INTERNE
   ══════════════════════════════════════════════ */

/* Badge dans le nav */
.nav-msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: #c0120c;
  color: #fff;
  font-size: 0.63rem;
  font-weight: 700;
  border-radius: 10px;
  margin-left: 6px;
  line-height: 1;
}

/* Layout principal deux colonnes */
.msg-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  height: calc(100vh - 140px);
  min-height: 500px;
  border: 1px solid #e9eaec;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

/* Colonne gauche : liste conversations */
.msg-sidebar-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #f0f0f0;
  background: #fafafa;
  overflow: hidden;
}
.msg-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #f0f0f0;
}
.msg-sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #999;
}
.msg-total-unread {
  background: #c0120c;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 2px 7px;
}
.msg-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.msg-conv-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: background .12s;
}
.msg-conv-item:hover { background: #f4f4f5; }
.msg-conv-item.active { background: #fff5f5; border-left: 3px solid #c0120c; }
.msg-conv-item.unread .msg-conv-name { font-weight: 700; color: #111; }
.msg-conv-avatar {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #c0120c;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.msg-conv-info { flex: 1; min-width: 0; }
.msg-conv-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #222;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-unread-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #c0120c;
  flex-shrink: 0;
}
.msg-conv-prop {
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-conv-preview {
  font-size: 0.75rem;
  color: #888;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-conv-meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.msg-conv-date {
  font-size: 0.68rem;
  color: #bbb;
  white-space: nowrap;
}
.msg-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px; height: 18px;
  background: #c0120c;
  color: #fff;
  font-size: 0.63rem;
  font-weight: 700;
  border-radius: 9px;
  padding: 0 4px;
}
.msg-empty-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 20px;
  color: #ccc;
  font-size: 0.8rem;
  text-align: center;
}

/* Colonne droite : fil de messages */
.msg-main-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}
.msg-thread-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ccc;
  font-size: 0.85rem;
  padding: 40px;
  text-align: center;
}
.msg-thread-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.msg-thread-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #c0120c;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.msg-thread-info { flex: 1; min-width: 0; }
.msg-thread-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #111;
}
.msg-thread-prop {
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 1px;
}
.msg-thread-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg-thread-empty {
  color: #ccc;
  font-size: 0.82rem;
  text-align: center;
  padding: 30px 0;
  font-style: italic;
}

/* Bulles de message */
.msg-bubble-wrap {
  display: flex;
  max-width: 70%;
}
.msg-bubble-wrap.tenant { align-self: flex-end; justify-content: flex-end; }
.msg-bubble-wrap.owner  { align-self: flex-start; justify-content: flex-start; }

.msg-bubble {
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.55;
  max-width: 100%;
}
.msg-bubble-wrap.tenant .msg-bubble {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #111;
  border-bottom-right-radius: 4px;
}
.msg-bubble-wrap.owner .msg-bubble {
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #111;
  border-bottom-left-radius: 4px;
}
.msg-bubble-subject {
  font-size: 0.75rem;
  font-weight: 700;
  color: #c41d15;
  margin-bottom: 4px;
}
.msg-bubble-cat {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  background: #fff;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  font-size: 0.63rem;
  font-weight: 600;
  color: #c41d15;
  margin-bottom: 5px;
}
.msg-bubble-body { color: #222; }
.msg-bubble-time {
  font-size: 0.65rem;
  color: #bbb;
  margin-top: 5px;
  text-align: right;
}

/* Zone de réponse */
.msg-reply-area {
  border-top: 1px solid #f0f0f0;
  padding: 14px 16px;
  flex-shrink: 0;
  background: #fff;
}
.msg-reply-input {
  width: 100%;
  resize: none;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.84rem;
  font-family: inherit;
  color: #222;
  outline: none;
  transition: border-color .13s;
  box-sizing: border-box;
}
.msg-reply-input:focus { border-color: #c0120c; }
.msg-reply-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.msg-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 16px;
  background: #c0120c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .13s;
}
.msg-send-btn:hover { background: #c41d15; }

/* Page locataire : vue unique */
.msg-tenant-wrap { max-width: 760px; }
.msg-tenant-conv-card {
  border: 1px solid #e9eaec;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  min-height: 480px;
}
.msg-tenant-conv-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   EMAIL - styles
   ══════════════════════════════════════════════ */

/* Barre de statut email dans le fil de messages */
.msg-email-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
  font-size: 0.72rem;
  color: #999;
  cursor: pointer;
  transition: background .12s;
}
.msg-email-status:hover { background: #f5f5f5; color: #666; }
.msg-email-status svg { stroke: #bbb; flex-shrink: 0; }
.msg-email-status-link {
  color: #c41d15;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Avertissement prototype dans la modal document */
.keymmo-email-proto-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.78rem;
  color: #92400e;
  line-height: 1.5;
}
.keymmo-email-proto-warn svg { stroke: #d97706; flex-shrink: 0; margin-top: 1px; }

/* Bouton email dans les cartes document */
.doc-email-btn {
  background: #fff !important;
  border-color: #e5e7eb !important;
  color: #555 !important;
}
.doc-email-btn:hover {
  background: #f9fafb !important;
  border-color: #c0120c !important;
  color: #c0120c !important;
}

/* Modal fin de location - grille infos */
.tpc-mo-view-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tpc-mo-view-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.84rem;
  color: #555;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}
.tpc-mo-view-row:last-child { border-bottom: none; }
.tpc-mo-view-row strong { color: #111; font-weight: 600; text-align: right; }
.tpc-mo-view-msg { display: flex; flex-direction: column; gap: 4px; }
.tpc-mo-view-msg > span { font-size: 0.78rem; color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tpc-mo-view-quote {
  margin: 0;
  font-size: 0.84rem;
  color: #444;
  font-style: italic;
  background: #f9f9f9;
  border-left: 3px solid #c0120c;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
  line-height: 1.55;
}

/* Réponse propriétaire côté locataire */
.tmv-owner-response {
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tmv-owner-response-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.81rem;
  color: #444;
  background: #f9f9f9;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.5;
}
.tmv-owner-response-item svg { flex-shrink: 0; margin-top: 1px; }
.tmv-or-ack { border-color: #d1fae5; background: #f0fdf4; color: #166534; }
.tmv-or-ack svg { stroke: #16a34a; }
.tmv-or-plan { border-color: #e5e7eb; background: #f9f9f9; color: #444; }
.main .tmv-or-ack { background: #f0fdf4; border-color: #d1fae5; }

/* Light theme overrides */
.main .tpc-card { background: #fff; border-color: #e8e8e8; }
.main .tpc-divider, .main .tpc-details-grid, .main .tpc-section { border-color: #f0f0f0; }
.main .tpc-btn { background: #f7f7f7; border-color: #e0e0e0; color: #444; }
.main .tpc-btn:hover { background: #efefef; }
.main .tpc-btn.tpc-btn-primary { background: #E02020; border-color: #E02020; color: #fff; }
.main .tpc-vacant-block { background: #f9f9f9; }
.main .cloture-summary { background: #f7f8fa; }

/* =====================================================================
   VITRINE PUBLIQUE - NOUVELLE MISE EN PAGE
   ===================================================================== */

/* Cartes annonce v2 */
.pub-listing-card {
  background: #fff;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.plc2-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}
.plc2-name { font-size: 1rem; font-weight: 700; color: #111; }
.plc2-meta { font-size: 0.8rem; color: #888; margin-top: 3px; }
.plc2-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.plc2-rent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.plc2-rent { font-size: 1.1rem; font-weight: 700; color: #111; }
.plc2-rent-unit { font-size: 0.75rem; font-weight: 400; color: #888; margin-left: 2px; }
.plc2-detail {
  background: var(--bg-secondary, #f2f2f2);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 0.75rem;
  color: #555;
}
.plc2-reqs {
  background: #fff5f5;
  color: #c41d15;
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}
.plc2-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.plc2-url-label { font-size: 0.75rem; color: #aaa; }
.plc2-url { font-size: 0.78rem; color: #555; font-family: monospace; background: #f5f5f5; padding: 3px 8px; border-radius: 4px; word-break: break-all; }
.plc2-copy-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 0.74rem;
  color: #444;
  cursor: pointer;
  flex-shrink: 0;
}
.plc2-copy-btn:hover { background: #f5f5f5; }
.plc2-desc {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.5;
  margin: 0 0 14px;
}
.plc2-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Source badge sur les demandes */
.prc-source {
  background: #f0f0f0;
  color: #666;
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.68rem;
  font-weight: 500;
  margin-left: 6px;
}

/* Responsive tpc */
@media (max-width: 700px) {
  .tpc-header { flex-direction: column; }
  .tpc-header-right { flex-direction: row; align-items: center; }
  .tpc-details-grid { grid-template-columns: 1fr; }
  .tpc-section { border-right: none; border-bottom: 1px solid var(--border, #f0f0f0); }
  .tpc-section:last-child { border-bottom: none; }
  .tpc-tenant-row { flex-wrap: wrap; }
  .tpc-vacant-block { flex-wrap: wrap; }
}

/* ===== QUITTANCES & SETTINGS ===== */
.tpc-receipt-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; border: 1.5px solid var(--brand); color: var(--brand); background: #fff; cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.tpc-receipt-btn:hover { background: var(--brand); color: #fff; }
.tpc-call-btn { border-color: #c41d15; color: #9b1c1c; }
.tpc-call-btn:hover { background: #c41d15; color: #fff; }
.pay-call { background: #fff7ed; border: 1.5px solid #c41d15; color: #9b1c1c; }
.pay-call:hover { background: #c41d15; color: #fff; }
.tpc-pay-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Settings page */
.settings-page { max-width: 700px; padding: 32px 28px; }
.settings-card { background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 24px 24px; margin-bottom: 20px; }
.settings-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.settings-section-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #999; margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.settings-saved-msg { font-size: 0.85rem; color: #374151; font-weight: 600; }
.settings-info-card { background: #f9fafb; }

/* ===== OWNER SETUP - Première configuration ===== */
.owner-setup-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 28px 60px;
}
.owner-setup-hero {
  text-align: center;
  margin-bottom: 40px;
}
.owner-setup-step {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand, #c0120c);
  margin-bottom: 10px;
}
.owner-setup-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: #050505;
  margin: 0 0 12px;
  line-height: 1.2;
}
.owner-setup-subtitle {
  font-size: 0.95rem;
  color: #666;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

.owner-setup-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) { .owner-setup-layout { grid-template-columns: 1fr; } }

.owner-setup-card {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 16px;
  padding: 32px 28px;
}

.owner-setup-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}
.owner-setup-section-opt { margin-top: 24px; }

.owner-setup-required { color: var(--brand, #c0120c); }

.owner-setup-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff5f4;
  border: 1px solid #fcc;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.83rem;
  color: #c0392b;
  font-weight: 500;
  margin-top: 16px;
}
.owner-setup-error svg { stroke: #c0392b; flex-shrink: 0; }

.owner-setup-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 28px;
}
.owner-setup-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  font-size: 0.95rem;
}
.owner-setup-skip {
  background: none;
  border: none;
  color: #aaa;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: center;
  padding: 4px;
  transition: color .15s;
}
.owner-setup-skip:hover { color: #555; }

/* Aperçu document */
.owner-setup-preview {
  position: sticky;
  top: 20px;
}
.osp-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 10px;
}
.osp-card {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  padding: 22px 20px;
  font-size: 0.83rem;
  color: #333;
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.osp-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #c0120c;
}
.osp-doc-type { font-size: 0.9rem; font-weight: 800; color: #050505; }
.osp-doc-date { font-size: 0.75rem; color: #999; }
.osp-doc-from { margin-bottom: 14px; }
.osp-doc-label { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #aaa; margin-bottom: 6px; }
.osp-doc-name { font-weight: 700; color: #050505; margin-bottom: 3px; }
.osp-doc-line { font-size: 0.8rem; color: #555; line-height: 1.5; }
.osp-doc-iban { font-size: 0.74rem; color: #888; margin-top: 4px; }
.osp-doc-divider { height: 1px; background: #f0f0f0; margin: 14px 0; }
.osp-doc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #555;
  padding: 4px 0;
}
.osp-doc-total {
  font-weight: 800;
  color: #050505;
  font-size: 0.9rem;
  border-top: 1px solid #e8e8e8;
  padding-top: 8px;
  margin-top: 4px;
}
.osp-hint {
  font-size: 0.74rem;
  color: #aaa;
  margin-top: 10px;
  line-height: 1.5;
  text-align: center;
}

/* ── Bandeau profil incomplet sur le dashboard ── */
.owner-profile-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff5f5;
  border: 1px solid #f5d97a;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.84rem;
  color: #7a5100;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.owner-profile-warning svg { stroke: #c41d15; flex-shrink: 0; }
.owner-profile-warning span { flex: 1; min-width: 200px; }
.opw-btn {
  background: #c41d15;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.opw-btn:hover { background: #a06000; }
.settings-info-title { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 700; color: #111; margin-bottom: 10px; }
.settings-info-text { font-size: 0.84rem; color: #555; line-height: 1.6; }
.form-hint { font-size: 0.75rem; color: #aaa; margin-top: 4px; }

/* ===== SUIVI DES TRAVAUX - par bien ===== */
.maint-properties-list { display: flex; flex-direction: column; gap: 20px; margin-top: 4px; }

.maint-prop-section { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }

.maint-prop-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.maint-prop-header-left { flex: 1; min-width: 0; }
.maint-prop-name { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.maint-prop-meta { font-size: 0.77rem; color: var(--text-muted); margin-top: 2px; }
.maint-prop-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.maint-prop-kpis { display: flex; gap: 5px; flex-wrap: wrap; }
.maint-kpi-chip { font-size: 0.71rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.maint-kpi-chip.warn { background: #fff7ed; border-color: #fdba74; color: #c41d15; }
.maint-kpi-chip.ok   { background: #f7f7f8; border-color: #86efac; color: #374151; }

.maint-prop-body { padding: 0; }
.maint-prop-empty { padding: 20px 20px; display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 0.85rem; flex-wrap: wrap; }
.maint-prop-empty p { margin: 0; flex: 1; }

.maint-sub-section { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.maint-sub-section:last-child { margin-bottom: 0; }
.maint-sub-title { font-size: 0.82rem; font-weight: 700; color: var(--ink); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; margin-bottom: 0; }
.maint-sub-count { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; font-size: 0.68rem; padding: 1px 7px; color: #6b7280; font-weight: 600; }
.maint-items-list { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; }
.maint-sub-empty { font-size: 0.82rem; color: var(--muted); font-style: normal; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; text-align: center; }

.maint-item-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.maint-tenant-ticket { border-left: 3px solid #c0120c; }
.maint-tenant-badge {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; background: #f3f4f6; color: #374151;
  border: 1px solid #e5e7eb; border-radius: 4px; padding: 2px 7px;
  white-space: nowrap;
}
.mini-button.success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.mini-button.success:hover { background: #bbf7d0; }
.maint-item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.maint-item-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.maint-item-title { font-size: 0.84rem; font-weight: 600; color: var(--ink); }
.maint-item-badges { display: flex; gap: 5px; align-items: center; flex-shrink: 0; flex-wrap: wrap; }
.maint-item-desc { font-size: 0.77rem; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.maint-item-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.maint-meta-chip { font-size: 0.71rem; color: #6b7280; background: #f9fafb; border: 1px solid var(--border); padding: 2px 7px; border-radius: 6px; }
.maint-item-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.maint-cat-badge { font-size: 0.7rem; background: #f9fafb; border: 1px solid var(--border); padding: 1px 7px; border-radius: 999px; color: #6b7280; white-space: nowrap; }

.maint-qi-type { font-size: 0.7rem; font-weight: 700; padding: 2px 7px; border-radius: 5px; }
.maint-qi-invoice { background: #f7f7f8; color: #374151; }
.maint-qi-quote   { background: #f7f7f8; color: #c41d15; }
.maint-qi-amount  { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }

/* ── Maintenance two-level view ── */

/* Bouton retour */
.maint-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #c0120c; border: 1.5px solid #c0120c; border-radius: 8px;
  padding: 7px 16px; font-size: 0.82rem; font-weight: 700;
  color: #fff; cursor: pointer; margin-bottom: 20px;
  transition: background 150ms, border-color 150ms;
}
.maint-back-btn:hover { background: #a00f09; border-color: #a00f09; color: #fff; }
.maint-back-btn svg { stroke: #fff; }

/* Header vue détail */
.maint-detail-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.maint-detail-name { font-size: 1.2rem; font-weight: 800; color: var(--ink); }
.maint-detail-meta { font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.maint-detail-header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.maint-detail-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.maint-detail-actions .mini-button {
  height: 36px;
  padding: 0 16px;
  background: var(--brand);
  color: #fff;
  border: 1.5px solid var(--brand);
  border-radius: 10px;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  transition: background .15s, border-color .15s;
}
.maint-detail-actions .mini-button:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
  color: #fff;
}

/* KPIs vue détail (6 cases) */
.maint-detail-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 800px) { .maint-detail-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .maint-detail-kpis { grid-template-columns: 1fr; } }

/* État vide vue détail */
.maint-empty-detail {
  text-align: center; padding: 48px 24px;
  color: var(--muted); font-size: 0.9rem;
}
.maint-empty-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px;
}

/* Grille de cartes vue liste — 3 colonnes max */
.maint-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
@media (max-width: 900px) { .maint-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .maint-cards-grid { grid-template-columns: 1fr; } }

/* Carte de bien */
.maint-prop-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; display: flex; flex-direction: column;
  transition: border-color 150ms, box-shadow 150ms;
}
.maint-prop-card:hover { border-color: var(--brand); box-shadow: 0 4px 16px rgba(192,18,12,.06); }

.maint-prop-card-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px;
}
.maint-prop-card-name { font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.maint-prop-card-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.maint-prop-card-addr { font-size: 0.73rem; color: var(--muted); margin-top: 1px; }

.maint-prop-card-divider { height: 1px; background: var(--border); margin-bottom: 10px; }

.maint-prop-card-rows { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.maint-prop-card-row {
  display: flex; justify-content: space-between; align-items: baseline; font-size: 0.83rem;
}
.maint-prop-card-label { color: var(--muted); }
.maint-prop-card-val   { font-weight: 600; color: var(--ink); }
.maint-prop-card-last  { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }
.maint-prop-card-last-val { font-size: 0.75rem; color: var(--muted); font-weight: 400; max-width: 55%; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maint-warn { color: #b91c1c; }

/* Bouton "Voir le suivi" */
.maint-view-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 14px;
  background: var(--brand); color: #fff;
  border: none; border-radius: 8px; padding: 9px 16px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
  transition: opacity 150ms;
}
.maint-view-btn:hover { opacity: 0.88; }

/* ── Planning des interventions ── */
.maintenance-planning-section {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 24px; margin-bottom: 24px;
}
.maintenance-planning-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.maintenance-planning-header-left {}
.maintenance-planning-section-title {
  font-size: 0.95rem; font-weight: 700; color: var(--ink); margin-bottom: 2px;
}
.maintenance-planning-section-sub {
  font-size: 0.78rem; color: var(--muted);
}

.maintenance-planning-list {
  display: flex; flex-direction: column; gap: 0;
}
.maintenance-planning-item {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.maintenance-planning-item:last-child { border-bottom: none; }
@media (max-width: 800px) {
  .maintenance-planning-item { grid-template-columns: 1fr; gap: 6px; }
}

.maintenance-planning-date-col { padding-top: 2px; }
.plan-date { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.plan-overdue { color: #b51818; }
.plan-today   { color: #c0120c; }
.plan-soon    { color: #b91c1c; }
.plan-late-badge  { background: #fef2f2; border: 1px solid #fecaca; color: #b51818; border-radius: 999px; padding: 1px 7px; font-size: 0.68rem; font-weight: 700; margin-left: 4px; }
.plan-today-badge { background: #f5f3ff; border: 1px solid #fecaca; color: #c0120c; border-radius: 999px; padding: 1px 7px; font-size: 0.68rem; font-weight: 700; margin-left: 4px; }
.plan-soon-badge  { background: #fff5f5; border: 1px solid #fecaca; color: #b91c1c; border-radius: 999px; padding: 1px 7px; font-size: 0.68rem; font-weight: 700; margin-left: 4px; }

.maintenance-planning-content {}
.maintenance-planning-title-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px;
}
.plan-source-icon { font-size: 0.85rem; }
.maintenance-planning-title { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
.maintenance-planning-meta {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.plan-chip {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 2px 9px; font-size: 0.72rem; color: var(--muted);
}
.plan-chip-prop   { background: #f7f7f8; border-color: #fecaca; color: #c41d15; }
.plan-chip-status { background: #f7f7f8; border-color: #e5e7eb; color: #374151; }
.maintenance-planning-desc {
  font-size: 0.78rem; color: var(--muted); margin-top: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.maintenance-planning-actions {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; padding-top: 2px;
}

.maintenance-planning-empty {
  font-size: 0.85rem; color: var(--muted); padding: 16px 0; text-align: center;
}

.plan-expand-btn {
  display: block; width: 100%; margin-top: 12px; padding: 8px;
  background: none; border: 1.5px dashed var(--border); border-radius: 8px;
  font-size: 0.82rem; color: var(--muted); cursor: pointer; text-align: center;
  transition: border-color 150ms, color 150ms;
}
.plan-expand-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ── Devis & factures two-level view ── */

/* Bouton retour */
.qi-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #c0120c; border: 1.5px solid #c0120c; border-radius: 8px;
  padding: 7px 16px; font-size: 0.82rem; font-weight: 700;
  color: #fff; cursor: pointer; margin-bottom: 20px;
  transition: background 150ms, border-color 150ms;
}
.qi-back-btn:hover { background: #a00f09; border-color: #a00f09; color: #fff; }
.qi-back-btn svg { stroke: #fff; }

/* Header vue détail */
.qi-detail-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 18px;
}
.qi-detail-name { font-size: 1.2rem; font-weight: 800; color: var(--ink); }
.qi-detail-meta { font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.qi-detail-header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.qi-detail-actions { display: flex; gap: 8px; }

/* KPIs vue détail (8 cases) */
.qi-detail-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 900px) { .qi-detail-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .qi-detail-kpis { grid-template-columns: 1fr; } }

/* Titre de section dans la vue détail */
.qi-detail-section-title {
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted);
  margin: 24px 0 10px; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.qi-count {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 8px; font-size: 0.72rem;
  font-weight: 700; color: var(--muted); text-transform: none; letter-spacing: 0;
}

/* Info fiscale */
.qi-fiscal-info {
  background: #fff5f5; border: 1px solid #fecaca; border-radius: 8px;
  padding: 10px 14px; font-size: 0.82rem; color: #9b1c1c; margin-bottom: 12px;
}

/* État vide inline */
.qi-empty-inline {
  padding: 16px 0; font-size: 0.85rem; color: var(--muted);
  display: flex; align-items: center; gap: 12px;
}
.qi-inline-btn {
  background: none; border: 1.5px solid var(--border); border-radius: 6px;
  padding: 4px 12px; font-size: 0.78rem; font-weight: 600; cursor: pointer;
  color: var(--ink); transition: border-color 150ms;
}
.qi-inline-btn:hover { border-color: var(--brand); color: var(--brand); }

/* KPI strip 5 colonnes pour la vue liste */
.qi-kpi-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 900px) { .qi-kpi-grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .qi-kpi-grid-5 { grid-template-columns: repeat(2, 1fr); } }

/* Grille de cartes biens — 3 colonnes max */
.qi-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
@media (max-width: 900px) { .qi-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .qi-cards-grid { grid-template-columns: 1fr; } }

/* Carte de bien */
.qi-prop-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; display: flex; flex-direction: column;
  transition: border-color 150ms, box-shadow 150ms;
}
.qi-prop-card:hover { border-color: var(--brand); box-shadow: 0 4px 16px rgba(192,18,12,.06); }

.qi-prop-card-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px;
}
.qi-prop-card-name { font-size: 0.95rem; font-weight: 700; color: var(--ink); }
.qi-prop-card-meta { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.qi-prop-card-addr { font-size: 0.73rem; color: var(--muted); margin-top: 1px; }
.qi-prop-card-divider { height: 1px; background: var(--border); margin-bottom: 10px; }
.qi-prop-card-rows { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.qi-prop-card-row {
  display: flex; justify-content: space-between; align-items: baseline; font-size: 0.83rem;
}
.qi-prop-card-row-alert { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 2px; }
.qi-prop-card-label { color: var(--muted); }
.qi-prop-card-val   { font-weight: 600; color: var(--ink); }
.qi-warn            { color: #b91c1c; }

/* Bouton "Voir les devis et factures" */
.qi-view-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 14px;
  background: var(--brand); color: #fff;
  border: none; border-radius: 8px; padding: 9px 16px;
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
  transition: opacity 150ms;
}
.qi-view-btn:hover { opacity: 0.88; }

/* ══════════════════════════════════════════════════════════════
   ESTIMER UN BIEN - localisation & helpers
   ══════════════════════════════════════════════════════════════ */

.eb-loc-fields { display: flex; gap: 10px; margin-top: 10px; }
.eb-loc-fields .market-addr-input { flex: 1; }

.eb-addr-confirmed-msg {
  margin-top: 10px;
  padding: 9px 14px;
  background: #f7f7f8;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.84rem;
  color: #374151;
}

.eb-market-help {
  margin-top: 12px;
  padding: 9px 12px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 0.83rem;
  color: #9b1c1c;
}

.eb-market-hint {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #9ca3af;
  line-height: 1.5;
}

.eb-estimation-missing {
  padding: 10px 14px;
  background: #f3f4f6;
  border-radius: 8px;
  font-size: 0.84rem;
  color: #6b7280;
  margin-bottom: 14px;
}

/* ══════════════════════════════════════════════════════════════
   GUIDE D'UTILISATION
   ══════════════════════════════════════════════════════════════ */

.guide-page { max-width: 820px; margin: 0 auto; padding: 28px 24px 60px; }

/* ── Hero ─────────────────────────────────────────────────── */
.guide-hero { margin-bottom: 28px; }
.guide-hero-eyebrow { font-size: 0.7rem; font-weight: 700; letter-spacing: .1em; color: var(--brand); text-transform: uppercase; margin-bottom: 6px; }
.guide-hero-title { font-size: 1.9rem; font-weight: 800; color: var(--dark); line-height: 1.15; margin: 0 0 10px; }
.guide-hero-sub { font-size: 0.96rem; color: #6b7280; margin: 0 0 20px; line-height: 1.55; }

/* ── Search ───────────────────────────────────────────────── */
.guide-search-wrap { position: relative; display: flex; align-items: center; }
.guide-search-wrap svg { position: absolute; left: 12px; color: #9ca3af; pointer-events: none; }
.guide-search-input { width: 100%; padding: 10px 14px 10px 38px; border: 1.5px solid rgba(15,23,42,.12); border-radius: 10px; font-size: 0.9rem; color: var(--dark); background: #fff; outline: none; transition: border-color 150ms; }
.guide-search-input:focus { border-color: var(--brand); }

/* ── Notice ───────────────────────────────────────────────── */
.guide-empty-notice { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 10px; background: #fff5f5; border: 1px solid #fecaca; color: #9b1c1c; font-size: 0.86rem; margin-bottom: 20px; }
.guide-notice--ok { background: #f7f7f8; border-color: #e5e7eb; color: #374151; }

/* ── Progress ─────────────────────────────────────────────── */
.guide-progress-card { background: #fff; border: 1.5px solid rgba(15,23,42,.1); border-radius: 14px; padding: 18px 20px; margin-bottom: 28px; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.guide-progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.guide-progress-label { font-size: 0.88rem; font-weight: 600; color: var(--dark); }
.guide-progress-pct { font-size: 1rem; font-weight: 800; color: var(--brand); }
.guide-progress-track { height: 7px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.guide-progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), #9ca3af); border-radius: 999px; transition: width 500ms ease; }
.guide-progress-msg { font-size: 0.83rem; margin: 10px 0 0; color: #6b7280; }
.progress-msg--low  { color: #c41d15; }
.progress-msg--mid  { color: #9b1c1c; }
.progress-msg--high { color: #374151; }

/* ── Action grid ─────────────────────────────────────────── */
.guide-action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 32px; }
.guide-action-card { background: #fff; border: 1.5px solid rgba(15,23,42,.1); border-radius: 14px; padding: 20px; cursor: pointer; transition: box-shadow 150ms, transform 120ms; display: flex; flex-direction: column; gap: 8px; }
.guide-action-card:hover { box-shadow: 0 8px 24px rgba(15,23,42,.1); transform: translateY(-2px); }
.guide-action-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; background: var(--brand-light); border-radius: 12px; color: var(--brand); }
.guide-action-title { font-size: 0.95rem; font-weight: 700; color: var(--dark); }
.guide-action-desc { font-size: 0.83rem; color: #6b7280; line-height: 1.45; flex: 1; }
.guide-action-btn { margin-top: 4px; align-self: flex-start; background: var(--brand); color: #fff; border: none; border-radius: 8px; padding: 7px 14px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: opacity 130ms; }
.guide-action-btn:hover { opacity: .88; }

/* ── Section label ─────────────────────────────────────────── */
.guide-section-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: #9ca3af; margin-bottom: 12px; }

/* ── Checklist ───────────────────────────────────────────── */
.guide-checklist { display: flex; flex-direction: column; gap: 10px; }
.guide-step-card { display: flex; align-items: flex-start; gap: 14px; background: #fff; border: 1.5px solid rgba(15,23,42,.1); border-radius: 12px; padding: 16px 18px; transition: border-color 150ms; }
.guide-step-card.guide-step--done { border-color: #e5e7eb; background: #f7f7f8; }
.guide-step-num { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-light); color: var(--brand); font-size: 0.8rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.step-num--done { background: #e5e7eb; color: #374151; }
.guide-step-body { flex: 1; min-width: 0; }
.guide-step-title { font-size: 0.9rem; font-weight: 700; color: var(--dark); margin-bottom: 3px; }
.guide-step-desc { font-size: 0.81rem; color: #6b7280; line-height: 1.45; }
.guide-step-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.guide-step-status { font-size: 0.73rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.guide-status--done { background: #f3f4f6; color: #374151; }
.guide-status--todo { background: #f3f4f6; color: #6b7280; }
.guide-step-btn { background: none; border: 1.5px solid rgba(15,23,42,.15); border-radius: 8px; padding: 5px 12px; font-size: 0.79rem; font-weight: 600; color: var(--dark); cursor: pointer; transition: background 130ms, border-color 130ms; white-space: nowrap; }
.guide-step-btn:hover { background: #f0f0f0; border-color: rgba(15,23,42,.25); }

/* ── Accordion ───────────────────────────────────────────── */
.guide-accordion { display: flex; flex-direction: column; gap: 8px; }
.guide-acc-item { background: #fff; border: 1.5px solid rgba(15,23,42,.1); border-radius: 12px; overflow: hidden; transition: border-color 150ms; }
.guide-acc-item.is-open { border-color: var(--brand); }
.guide-acc-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: none; border: none; cursor: pointer; text-align: left; }
.guide-acc-title { font-size: 0.91rem; font-weight: 700; color: #111; flex: 1; }
.guide-acc-chevron { flex-shrink: 0; color: var(--brand); transition: transform 250ms; }
.guide-acc-item.is-open .guide-acc-chevron { transform: rotate(180deg); }
.guide-acc-body { display: none; padding: 0 16px 16px; font-size: 0.86rem; color: #374151; line-height: 1.6; }
.guide-acc-item.is-open .guide-acc-body { display: block; }
.guide-acc-formula { font-size: 0.82rem; background: #f1f5f9; padding: 8px 12px; border-radius: 8px; margin-bottom: 10px; color: var(--dark); font-family: monospace; }
.guide-formula-label { font-family: inherit; font-weight: 700; color: #6b7280; }
.guide-acc-desc { margin: 0 0 8px; }
.guide-acc-example { font-size: 0.81rem; color: #6b7280; font-style: italic; border-left: 3px solid #e5e7eb; padding-left: 10px; }

/* ── Assistant ───────────────────────────────────────────── */
.guide-assistant { background: #fff; border: 1.5px solid rgba(15,23,42,.1); border-radius: 16px; overflow: hidden; margin-top: 4px; }
.guide-assistant-chat { min-height: 300px; max-height: 460px; overflow-y: auto; padding: 20px 20px 10px; display: flex; flex-direction: column; gap: 14px; }
.guide-assistant-message { display: flex; gap: 10px; align-items: flex-start; }
.guide-msg--user { flex-direction: row-reverse; }
.guide-msg-avatar { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 0.73rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.guide-msg-bubble { background: #f3f4f6; border-radius: 12px; padding: 10px 14px; font-size: 0.87rem; color: var(--dark); line-height: 1.5; max-width: 75%; }
.guide-msg-bubble--user { background: var(--brand); color: #fff; }
.guide-msg-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.guide-msg-action { background: none; border: 1.5px solid var(--brand); color: var(--brand); border-radius: 8px; padding: 4px 12px; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: background 120ms, color 120ms; }
.guide-msg-action:hover { background: var(--brand); color: #fff; }
.guide-assistant-suggestions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-top: 1px solid rgba(15,23,42,.07); }
.guide-suggest-btn { background: #f3f4f6; border: none; border-radius: 20px; padding: 6px 13px; font-size: 0.8rem; color: #374151; cursor: pointer; transition: background 120ms; }
.guide-suggest-btn:hover { background: #e5e7eb; }
.guide-assistant-input-row { display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid rgba(15,23,42,.07); }
.guide-assistant-input { flex: 1; border: 1.5px solid rgba(15,23,42,.12); border-radius: 10px; padding: 9px 14px; font-size: 0.88rem; color: var(--dark); outline: none; transition: border-color 150ms; }
.guide-assistant-input:focus { border-color: var(--brand); }
.guide-assistant-send { background: var(--brand); color: #fff; border: none; border-radius: 10px; padding: 9px 18px; font-size: 0.87rem; font-weight: 700; cursor: pointer; transition: opacity 130ms; }
.guide-assistant-send:hover { opacity: .88; }

/* ── FAQ categories ──────────────────────────────────────── */
.guide-faq-category { border: 1.5px solid rgba(15,23,42,.1); border-radius: 14px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.guide-faq-cat-header { width: 100%; display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: none; border: none; cursor: pointer; text-align: left; border-bottom: 1px solid transparent; transition: border-color 150ms; }
.guide-faq-category.is-open .guide-faq-cat-header { border-bottom-color: rgba(15,23,42,.08); }
.guide-faq-cat-icon { font-size: 1.1rem; }
.guide-faq-cat-label { flex: 1; font-size: 0.95rem; font-weight: 700; color: var(--dark); }
.guide-faq-cat-body { display: none; padding: 8px 12px 12px; }
.guide-faq-category.is-open .guide-faq-cat-body { display: block; }

/* ── FAQ plans ───────────────────────────────────────────── */
.guide-faq-plans { margin-top: 36px; padding: 24px; background: #f8fafc; border-radius: 14px; border: 1.5px solid rgba(15,23,42,.08); }
.guide-faq-plans-title { font-size: 1rem; font-weight: 800; color: var(--dark); margin-bottom: 16px; }
.guide-faq-plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.guide-plan-card { background: #fff; border: 1.5px solid rgba(15,23,42,.1); border-radius: 12px; padding: 16px; }
.guide-plan-card--featured { border-color: var(--brand); background: #fff; position: relative; }
.guide-plan-badge {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  text-transform: uppercase;
}
.guide-plan-name { font-size: 0.92rem; font-weight: 800; color: var(--dark); margin-bottom: 6px; }
.guide-plan-desc { font-size: 0.8rem; color: #6b7280; line-height: 1.45; }

.faq-contact-cta {
  margin-top: 20px;
  padding: 14px 20px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,.07);
  font-size: 0.85rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.faq-contact-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.faq-contact-link:hover { text-decoration: underline; }

/* ── Estimer un bien - price source labels ──────────────── */
.eb-price-source {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  line-height: 1.3;
  font-style: italic;
}
.eb-price-source--auto   { color: #374151; }
.eb-price-source--manual { color: #b91c1c; }

/* ── Market search status messages ─────────────────────── */
.market-success {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 7px;
  background: rgba(22,163,74,.08);
  border: 1px solid rgba(22,163,74,.2);
  color: #374151;
  font-size: 0.83rem;
  font-weight: 500;
  margin-top: 12px;
}

/* ── Form hints + notices (fiscal mode/regime dropdowns) ──── */
.form-hint {
  display: block;
  margin-top: 4px;
  font-size: 0.77rem;
  color: #888;
  line-height: 1.35;
}
.form-notice {
  grid-column: 1 / -1;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 0.81rem;
  line-height: 1.45;
}
.form-notice--warn {
  background: #fff8e1;
  border: 1px solid #ffe08a;
  color: #7a5500;
}
.form-notice--info {
  background: #e8f4fd;
  border: 1px solid #90cdf4;
  color: #1a4a6b;
}

/* ── NAVBAR - liens audiences ── */
.navbar-nav-audience {
  color: rgba(255,255,255,.75) !important;
  transition: color .15s;
}
.navbar-nav-audience:hover { color: #fff !important; }

.navbar-nav-contractor {
  color: rgba(255,255,255,.75) !important;
  transition: color .15s;
}
.navbar-nav-contractor:hover { color: #fff !important; }
.navbar-mobile-contractor {
  font-weight: 700;
  color: rgba(255,255,255,0.82) !important;
}

.hero-contractor-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.hero-contractor-sep {
  font-size: 0.82rem;
  color: var(--muted);
}
.hero-contractor-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.hero-contractor-btn:hover {
  border-color: var(--primary);
  background: rgba(181,24,24,.04);
  color: var(--primary);
}

/* ── SECTION 3 ESPACES ── */
/* ── SECTION "3 ESPACES" - THÈME SOMBRE ── */
.audience-section {
  background: #0a0a0a;
  padding: 56px 24px 104px;
  border-top: 1px solid rgba(255,255,255,.06);
  scroll-margin-top: 80px;
}
.audience-section-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.audience-section-header {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}
.audience-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
}
.audience-title {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 14px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}
.audience-subtitle {
  margin: 0 auto;
  max-width: 700px;
  color: rgba(255,255,255,.52);
  font-size: 18px;
  line-height: 1.7;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.audience-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 28px;
  padding: 34px;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  box-sizing: border-box;
}
.audience-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 28px 72px rgba(0,0,0,.5);
}

/* Propriétaire */
.audience-card-owner {
  border-color: rgba(181,24,24,.4);
}
.audience-card-owner .audience-card-icon { background: rgba(192,18,12,.12); color: var(--brand); }
.audience-card-owner:hover { border-color: rgba(181,24,24,.6); box-shadow: 0 28px 72px rgba(181,24,24,.12); }

/* Entreprise */
.audience-card-contractor {
  border-color: rgba(181,24,24,.5);
  box-shadow: 0 22px 65px rgba(181,24,24,.14);
}
.audience-card-contractor .audience-card-icon { background: rgba(192,18,12,.14); color: var(--brand); }
.audience-card-contractor .audience-card-label { color: #ffffff; }
.audience-card-contractor .audience-card-desc  { color: rgba(255,255,255,.52); }
.audience-card-contractor .audience-card-features li { color: rgba(255,255,255,.8); }
.audience-card-contractor .audience-card-features svg { stroke: var(--brand); }
.audience-card-contractor:hover { border-color: rgba(181,24,24,.7); box-shadow: 0 32px 90px rgba(181,24,24,.18); }

/* Locataire */
.audience-card-tenant {
  background: rgba(255,255,255,.025);
  border-color: rgba(255,255,255,.07);
}
.audience-card-tenant .audience-card-icon { background: rgba(192,18,12,.12); color: var(--brand); }
.audience-card-tenant .audience-card-label { color: rgba(255,255,255,.7); }

.audience-card-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  margin-bottom: 22px;
}
.audience-card-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}
.audience-card-label {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  margin: 0;
}
.audience-card-label-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.audience-badge {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.5);
  border-radius: 20px;
  padding: 3px 9px;
}
.audience-card-desc {
  color: rgba(255,255,255,.52);
  line-height: 1.65;
  margin: 0 0 28px;
  font-size: 0.9rem;
}

/* Features list */
.audience-card-features {
  list-style: none;
  margin: 0 0 30px; padding: 0;
  display: grid;
  gap: 13px;
  flex: 1;
  align-content: flex-start;
}
.audience-card-features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.87rem; color: rgba(255,255,255,.82); font-weight: 600;
}
.audience-card-features svg { stroke: #c0120c; flex-shrink: 0; margin-top: 1px; }
.audience-card-list-muted li { color: rgba(255,255,255,.28); }
.audience-card-list-muted svg { stroke: rgba(255,255,255,.2) !important; }

/* Keep legacy class for compatibility */
.audience-card-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.audience-card-list li { display: flex; align-items: center; gap: 8px; font-size: 0.83rem; color: rgba(255,255,255,.7); font-weight: 500; }
.audience-card-list svg { stroke: #c0120c; flex-shrink: 0; }

/* Actions - ancré en bas */
.audience-card-actions {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

/* Boutons */
.audience-btn-primary {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #c0120c;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 20px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s;
  text-align: center;
  box-sizing: border-box;
}
.audience-btn-primary:hover { background: #b91c1c; }

.audience-btn-secondary {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: rgba(255,255,255,.75);
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 10px;
  padding: 0 20px;
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  text-align: center;
  box-sizing: border-box;
}
.audience-btn-secondary:hover { border-color: rgba(255,255,255,.35); color: #fff; background: rgba(255,255,255,.08); }

/* Note locataire */
.audience-card-note {
  margin-top: auto;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  color: rgba(255,255,255,.45);
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  box-sizing: border-box;
}

.audience-btn-disabled {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.3);
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: not-allowed;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1100px) {
  .audience-grid { grid-template-columns: 1fr; max-width: 720px; margin-left: auto; margin-right: auto; }
  .audience-card { min-height: auto; }
}
@media (max-width: 640px) {
  .audience-section { padding: 40px 18px 80px; }
  .audience-section-header { margin-bottom: 36px; }
  .audience-card { padding: 26px; border-radius: 22px; }
  .audience-title { font-size: 34px; letter-spacing: -0.02em; }
  .audience-subtitle { font-size: 16px; }
}

/* ── MODE ENTREPRISE - SECTION DÉDIÉE (fond noir) ── */
.contractor-landing-section {
  background: #0a0a0a;
  padding: 80px 24px;
}
.contractor-landing-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.contractor-landing-header {
  text-align: center;
  margin-bottom: 52px;
}
.contractor-landing-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
}
.contractor-landing-title {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.25;
}
.contractor-landing-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,.6);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}
.contractor-landing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 44px;
}
@media (max-width: 800px) { .contractor-landing-cards { grid-template-columns: 1fr; } }

.contractor-landing-card {
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 28px 24px;
  transition: border-color .2s;
}
.contractor-landing-card:hover { border-color: #3a3a3a; }
.contractor-landing-icon {
  width: 48px; height: 48px;
  border-radius: 11px;
  background: rgba(181,24,24,.15);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: #ff6b6b;
}
.contractor-landing-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
}
.contractor-landing-card p {
  font-size: 0.84rem;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
  margin: 0;
}
.contractor-landing-note {
  text-align: center;
  font-size: 0.84rem;
  color: rgba(255,255,255,.45);
  margin: 32px 0 0;
  line-height: 1.5;
}
.contractor-landing-link {
  color: rgba(255,255,255,.7);
  text-underline-offset: 3px;
  transition: color .15s;
}
.contractor-landing-link:hover { color: #fff; }

/* Anciens styles compat - gardés pour les cartes qui pourraient rester */
.contractor-section {
  display: none; /* Remplacée par .contractor-landing-section */
}
.contractor-section-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.contractor-btp-cta {
  background: #0a0a0a;
  padding: 60px 24px;
}
.contractor-btp-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.contractor-btp-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
}
.contractor-btp-text h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.25;
  max-width: 560px;
}
.contractor-btp-text p {
  font-size: 0.9rem;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
  max-width: 520px;
  margin: 0;
}
.contractor-btp-action {
  flex-shrink: 0;
}

/* Auth shell - badge Mode Entreprise */
.auth-shell.contractor-mode .auth-badge {
  background: rgba(181,24,24,.12);
  color: var(--primary);
  border-color: rgba(181,24,24,.25);
}

/* ── MODE ENTREPRISE - APP SHELL ── */
.sb-contractor-switch {
  margin-top: 16px;
  padding: 10px 8px 4px;
  border-top: 1px solid var(--border);
}
.sb-switch-btn {
  width: 100%;
  font-size: 0.78rem;
  padding: 7px 10px;
  justify-content: flex-start;
  gap: 6px;
  color: var(--muted);
}
.sb-switch-btn:hover { color: var(--text); }

/* Contractor dashboard */
.ctor-workspace-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 3px 10px;
  border: 1.5px solid var(--primary);
  border-radius: 20px;
  background: rgba(181,24,24,.06);
  align-self: flex-start;
}
.ctor-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.ctor-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
}
.ctor-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 6px;
}
.ctor-stat-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.ctor-stat-sub {
  font-size: 0.73rem;
  color: var(--muted);
}
.ctor-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.ctor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}
.ctor-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.ctor-card-desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 16px;
}
.ctor-btn { font-size: 0.82rem; padding: 8px 16px; }
.ctor-switch-row {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

/* page-header flex pour badge */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ══════════════════════════════════════════════
   Abonnement Entreprise
══════════════════════════════════════════════ */
.contractor-sub-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 0 48px;
}
.contractor-sub-header {
  margin-bottom: 28px;
}
.contractor-sub-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}
.contractor-sub-subtitle {
  font-size: 0.93rem;
  color: var(--muted, #6b7280);
  margin: 0;
}

/* Plan actuel */
.contractor-sub-current-wrap {
  margin-bottom: 28px;
}
.contractor-sub-current-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.contractor-sub-current-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.contractor-sub-current-label {
  font-size: 0.8rem;
  color: var(--muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.contractor-sub-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #c0120c22;
  color: #c0120c;
  border: 1px solid #c0120c44;
}
.contractor-sub-current-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.contractor-sub-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contractor-sub-stat-label {
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
}
.contractor-sub-stat-val {
  font-size: 0.88rem;
  color: var(--ink);
}
.contractor-sub-status-active {
  color: #374151;
}

/* Grille des plans */
.contractor-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.contractor-plan-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  padding: 24px 22px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow .15s;
}
.contractor-plan-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.contractor-plan-card.contractor-plan-recommended {
  border-color: #c0120c;
  box-shadow: 0 0 0 2px #c0120c22;
}
.contractor-plan-card.contractor-plan-current {
  background: #fafafa;
}
.contractor-plan-badge-top {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: #c0120c;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: 20px;
  white-space: nowrap;
}
.contractor-plan-header {
  margin-bottom: 18px;
}
.contractor-plan-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.contractor-plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 6px;
}
.contractor-plan-amount {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}
.contractor-plan-period {
  font-size: 0.85rem;
  color: var(--muted, #6b7280);
}
.contractor-plan-tagline {
  font-size: 0.83rem;
  color: var(--muted, #6b7280);
  line-height: 1.4;
}

/* Liste des fonctionnalités */
.contractor-plan-features {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.contractor-plan-feature-ok {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink);
}
.contractor-plan-feature-ok svg {
  flex-shrink: 0;
}

/* Boutons CTA */
.contractor-plan-cta {
  width: 100%;
  padding: 10px 0;
  border-radius: 7px;
  border: 1px solid var(--line, #e5e7eb);
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  margin-top: auto;
}
.contractor-plan-cta:hover:not(:disabled) {
  background: var(--line, #e5e7eb);
}
.contractor-plan-cta-recommended {
  background: #c0120c !important;
  color: #fff !important;
  border-color: #c0120c !important;
}
.contractor-plan-cta-recommended:hover:not(:disabled) {
  background: #c41c15 !important;
}
.contractor-plan-cta-current {
  background: #f3f4f6 !important;
  color: #9ca3af !important;
  border-color: transparent !important;
  cursor: default !important;
}

/* Footer */
.contractor-sub-footer-note {
  font-size: 0.82rem;
  color: var(--muted, #9ca3af);
  text-align: center;
  padding-top: 8px;
}
.contractor-sub-footer-note a {
  color: #c0120c;
  text-decoration: none;
}
.contractor-sub-footer-note a:hover {
  text-decoration: underline;
}

/* ══════════════════════════════════════════════
   Espace Locataire
══════════════════════════════════════════════ */

/* Landing page - badges (thème sombre) */
.audience-card-invite-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.42);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* Badge "Pour les professionnels" sur la carte Entreprise */
.audience-card-pro-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #f87171;
  background: rgba(251,191,36,.12);
  border: 1px solid rgba(251,191,36,.28);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* Icône contractor propre */
.audience-card-icon--contractor {
  background: rgba(251,191,36,.15);
  color: #f87171;
}
.audience-tenant-invite-note {
  font-size: 0.78rem;
  color: var(--muted, #9ca3af);
  text-align: center;
  margin: 12px 0 0;
  font-style: italic;
}

/* Modal invitation */
.tenant-invite-modal { display: flex; flex-direction: column; gap: 14px; }
.tim-header { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--ink); }
.tim-info-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; gap: 12px; background: var(--card, #f9f9f9); border: 1px solid var(--line, #e5e7eb); border-radius: 6px; padding: 8px 12px; }
.tim-label { color: var(--muted, #6b7280); }
.tim-val { font-weight: 600; color: var(--ink); font-family: monospace; font-size: 0.88rem; }
.tim-msg-label { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.tim-textarea { width: 100%; min-height: 200px; border: 1px solid var(--line, #e5e7eb); border-radius: 6px; padding: 10px 12px; font-size: 0.82rem; font-family: monospace; background: var(--card, #f9f9f9); color: var(--ink); resize: vertical; box-sizing: border-box; }
.tim-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Page base */
.tenant-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 48px;
}
.tenant-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.tenant-page-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
.tenant-page-sub {
  font-size: 0.9rem;
  color: var(--muted, #6b7280);
  margin: 0;
}
.tenant-dashboard { max-width: 860px; margin: 0 auto; padding: 0 0 48px; }

/* Badge notification header */
.tenant-notif-badge {
  display: inline-flex;
  align-items: center;
  background: #c0120c;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Cartes */
.tenant-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 18px 20px;
  cursor: default;
}
.tenant-card[data-route] { cursor: pointer; transition: box-shadow .15s, border-color .15s; }
.tenant-card[data-route]:hover { box-shadow: 0 4px 14px rgba(0,0,0,.07); border-color: #c0120c44; }

/* KPI grid */
.tenant-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.tenant-card-icon { color: #c0120c; margin-bottom: 10px; }
.tenant-card-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #6b7280); margin-bottom: 4px; }
.tenant-card-val { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.tenant-card-sub { font-size: 0.8rem; color: var(--muted, #6b7280); margin-bottom: 6px; }
.tenant-card-body { display: flex; flex-direction: column; gap: 2px; }

/* Dashboard row 2 */
.tenant-dash-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
@media (max-width: 640px) { .tenant-dash-row { grid-template-columns: 1fr; } }
.tenant-dash-section {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 16px 18px;
}
.tenant-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}

/* Doc mini list */
.tenant-doc-mini-list { display: flex; flex-direction: column; gap: 8px; }
.tenant-doc-mini-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.82rem; }
.tenant-doc-mini-type { color: var(--muted, #6b7280); font-size: 0.75rem; min-width: 80px; }
.tenant-doc-mini-title { flex: 1; font-weight: 500; color: var(--ink); }
.tenant-doc-mini-date { color: var(--muted, #6b7280); font-size: 0.75rem; }

/* Notif mini list */
.tenant-notif-mini-list { display: flex; flex-direction: column; gap: 8px; }
.tenant-notif-mini-item { padding: 8px 10px; border-radius: 6px; background: var(--bg, #f9f9f9); border: 1px solid var(--line, #e5e7eb); }
.tenant-notif-mini-item.unread { border-left: 3px solid #c0120c; background: #fff5f5; }
.tenant-notif-mini-title { font-size: 0.83rem; font-weight: 600; color: var(--ink); }
.tenant-notif-mini-msg { font-size: 0.78rem; color: var(--muted, #6b7280); margin-top: 2px; }

/* Status badge */
.tenant-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.tenant-status-ok      { background: #f3f4f6; color: #374151; }
.tenant-status-warn    { background: #fee2e2; color: #b51818; }
.tenant-status-neutral { background: #f3f4f6; color: #4b5563; }
.tenant-status-muted   { background: #f1f5f9; color: #94a3b8; }

/* Empty state */
.tenant-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted, #6b7280);
  font-size: 0.9rem;
}

/* Info rows */
.tenant-info-list { display: flex; flex-direction: column; gap: 0; }
.tenant-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line, #f0f0f0);
  gap: 12px;
  font-size: 0.86rem;
}
.tenant-info-row:last-child { border-bottom: none; }
.tenant-info-row span:first-child { color: var(--muted, #6b7280); }
.tenant-info-row strong { color: var(--ink); text-align: right; }

/* Housing grid */
.tenant-housing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

/* Rent list */
.tenant-rent-list { display: flex; flex-direction: column; gap: 12px; }
.tenant-rent-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 16px 20px;
  flex-wrap: wrap;
}
.tenant-rent-month { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.tenant-rent-due { font-size: 0.78rem; color: var(--muted, #6b7280); margin-top: 2px; }
.tenant-rent-amount { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.tenant-rent-card-center { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tenant-rent-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Document grid */
.tenant-document-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.tenant-document-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tenant-doc-card-type { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #6b7280); }
.tenant-doc-card-title { font-weight: 600; font-size: 0.88rem; color: var(--ink); }
.tenant-doc-card-date { font-size: 0.78rem; color: var(--muted, #6b7280); }
.tenant-doc-card-actions { margin-top: 6px; display: flex; gap: 6px; }

/* Maintenance */
.tenant-maintenance-list { display: flex; flex-direction: column; gap: 12px; }
.tenant-ticket-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tenant-ticket-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tenant-ticket-title { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.tenant-ticket-meta { font-size: 0.78rem; color: var(--muted, #6b7280); display: flex; gap: 6px; flex-wrap: wrap; }
.tenant-ticket-desc { font-size: 0.82rem; color: var(--ink); margin-top: 2px; }
.tenant-ticket-planned { font-size: 0.82rem; color: #c0120c; font-weight: 500; }
.tenant-ticket-ctor { font-size: 0.82rem; color: var(--muted, #6b7280); }

/* New ticket form */
.tenant-new-ticket-form {
  background: var(--card, #fff);
  border: 1px solid #c0120c44;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}
.tenant-form-title { font-size: 1rem; font-weight: 600; margin: 0 0 16px; color: var(--ink); }
.tenant-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .tenant-form-grid { grid-template-columns: 1fr; } }
.tenant-form-field { display: flex; flex-direction: column; gap: 4px; }
.tenant-form-field-full { grid-column: 1 / -1; }
.tenant-form-field label { font-size: 0.78rem; font-weight: 600; color: var(--ink); }
.tenant-input, .tenant-select, .tenant-textarea {
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.85rem;
  background: var(--bg, #fff);
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
}
.tenant-input:focus, .tenant-select:focus, .tenant-textarea:focus { border-color: #c0120c; }
.tenant-textarea { resize: vertical; min-height: 80px; }

/* Insurance */
.tenant-insurance-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 20px;
}
.tenant-insurance-missing { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.tenant-insurance-missing p { font-size: 0.86rem; color: var(--muted, #6b7280); margin: 0; }

/* Notifications */
.tenant-notification-list { display: flex; flex-direction: column; gap: 10px; }
.tenant-notification-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tenant-notification-card.unread { border-left: 3px solid #c0120c; background: #fff8f8; }
.tenant-notif-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tenant-notif-title { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.tenant-notif-msg { font-size: 0.83rem; color: var(--muted, #6b7280); }
.tenant-notif-date { font-size: 0.75rem; color: var(--muted, #9ca3af); }

/* Profile card */
.tenant-profile-card {
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 20px;
}

/* Important list */
.tenant-important-list { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.tenant-important-item { display: flex; align-items: center; justify-content: space-between; font-size: 0.86rem; }
.tenant-important-item span { color: var(--muted, #6b7280); }

/* RGPD */
.tenant-rgpd-note { font-size: 0.83rem; color: var(--muted, #6b7280); line-height: 1.6; margin: 8px 0 0; }

/* Buttons */
.tenant-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border-radius: 8px; font-size: 0.85rem; font-weight: 500;
  border: 1.5px solid #d1d5db; background: #fff; color: #374151;
  cursor: pointer; transition: background 0.12s;
}
.tenant-btn:hover { background: #f3f4f6; }

.tenant-btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 6px;
  background: #c0120c;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.tenant-btn-primary:hover { background: #c41c15; }
.tenant-btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--line, #e5e7eb);
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.tenant-btn-ghost:hover { background: var(--line, #f3f4f6); }
.tenant-btn-danger {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 6px;
  background: transparent;
  color: #b51818;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #b5181833;
  cursor: pointer;
  transition: background .15s;
}
.tenant-btn-danger:hover { background: #fee2e2; }
.tenant-btn-sm { padding: 4px 10px; font-size: 0.75rem; }
.tenant-action-btn {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 5px;
  background: transparent;
  color: #c0120c;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #c0120c44;
  cursor: pointer;
  margin-top: 4px;
  transition: background .15s;
}
.tenant-action-btn:hover { background: #fff0f0; }
.tenant-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}

/* ── Anciens locataires : cartes ── */
.th-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.th-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.th-card-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.th-card-info { flex: 1; min-width: 0; }
.th-card-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.th-card-period {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Badges dépôt */
.th-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.th-badge-green   { background: #e6f5ec; color: #374151; border: 1px solid #a8d9b8; }
.th-badge-orange  { background: #fff3e0; color: #9a5800; border: 1px solid #f0c57a; }
.th-badge-partial { background: #fff0e0; color: #a04000; border: 1px solid #f0b070; }
.th-badge-red     { background: #fce8e8; color: #b91c1c; border: 1px solid #f0b0b0; }
.th-badge-grey    { background: var(--surface-3, #ebebeb); color: var(--text-muted); border: 1px solid var(--border); }

/* Corps de la carte */
.th-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.th-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
}
.th-info-row span  { color: var(--text-muted); }
.th-info-row strong { color: var(--text); }
.th-retenue-row strong { color: #b91c1c; }
.th-notes {
  font-size: 0.79rem;
  color: var(--text-muted);
  border-left: 3px solid var(--border);
  padding-left: 8px;
  margin-top: 6px;
  white-space: pre-line;
}

/* Boutons d'action */
.th-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* Modal Voir */
.th-view-modal { display: flex; flex-direction: column; gap: 14px; }
.th-vm-section { display: flex; flex-direction: column; gap: 6px; }
.th-vm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.th-vm-row span  { color: var(--text-muted); }
.th-vm-row strong { color: var(--text); }
.th-vm-retenue strong { color: #b91c1c; }
.th-vm-notes {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 10px 12px;
  white-space: pre-line;
  border-left: 3px solid var(--border);
}
.th-vm-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
}

/* Modal Modifier & Marquer dépôt */
.th-edit-modal { display: flex; flex-direction: column; gap: 12px; }
.th-edit-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.th-deposit-modal { display: flex; flex-direction: column; gap: 12px; }
.th-dm-intro { font-size: 0.88rem; color: var(--text); }
.th-dm-hint {
  font-size: 0.82rem;
  padding: 6px 10px;
  border-radius: 6px;
  margin-top: -4px;
}
.th-dm-partial { background: #fff3e0; color: #9a5800; }
.th-dm-warn    { background: #fce8e8; color: #b91c1c; }

/* ══════════════════════════════════════════════════════════
   ESPACE ENTREPRISE - PAGES
══════════════════════════════════════════════════════════ */

/* Layout commun */
.ctor-page { max-width: 960px; margin: 0 auto; padding: 0 0 48px; }
.ctor-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 28px;
}
.ctor-page-title { font-size: 1.45rem; font-weight: 800; color: var(--text); margin: 0 0 4px; }
.ctor-page-sub   { font-size: 0.88rem; color: var(--muted); margin: 0; }
.ctor-completion-chip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 14px; font-size: 0.83rem; color: var(--muted);
}
.ctor-completion-chip strong { color: var(--text); }

/* Cards génériques */
.ctor-card        { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; }
.ctor-card-head   { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.ctor-card-desc   { font-size: 0.84rem; color: var(--muted); line-height: 1.55; margin: 0 0 12px; }
.ctor-card-empty  { font-size: 0.85rem; color: var(--muted); font-style: italic; }

/* Pipeline demandes */
.ctor-pipeline { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ctor-request-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .15s;
}
.ctor-request-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.07); }
.ctor-rc-header  { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ctor-rc-title   { font-size: 0.97rem; font-weight: 700; color: var(--text); }
.ctor-rc-meta    { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ctor-urgency         { font-weight: 600; }
.ctor-urgency-high    { color: #b51818; }
.ctor-rc-prop    { font-size: 0.82rem; color: var(--muted); font-style: italic; }
.ctor-rc-desc    { font-size: 0.83rem; color: var(--text); line-height: 1.5; }
.ctor-rc-footer  { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.ctor-rc-date    { font-size: 0.78rem; color: var(--muted); }
.ctor-rc-budget  { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.ctor-rc-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--border); }

/* Devis */
.ctor-quote-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ctor-quote-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.ctor-qc-header  { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ctor-qc-number  { font-size: 0.72rem; color: var(--muted); font-family: monospace; margin-bottom: 2px; }
.ctor-qc-title   { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.ctor-qc-body    { display: flex; flex-direction: column; gap: 6px; }
.ctor-qc-row     { display: flex; align-items: center; justify-content: space-between; font-size: 0.83rem; }
.ctor-qc-row span    { color: var(--muted); }
.ctor-qc-row strong  { color: var(--text); font-weight: 600; }
.ctor-qc-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--border); }

/* Interventions */
.ctor-intervention-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ctor-intervention-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.ctor-ic-header  { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ctor-ic-title   { font-size: 0.97rem; font-weight: 700; color: var(--text); }
.ctor-ic-prop    { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.ctor-ic-body    { display: flex; flex-direction: column; gap: 6px; }
.ctor-ic-row     { display: flex; align-items: center; justify-content: space-between; font-size: 0.83rem; }
.ctor-ic-row span    { color: var(--muted); }
.ctor-ic-row strong  { color: var(--text); font-weight: 600; }
.ctor-ic-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid var(--border); }

/* Profil */
.ctor-profile-grid   { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .ctor-profile-grid { grid-template-columns: 1fr; } }
.ctor-profile-form   { display: flex; flex-direction: column; gap: 20px; }
.ctor-form-section   { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 22px; }
.ctor-form-section-title { font-size: 0.88rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.ctor-trades-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.ctor-trade-check    { display: flex; align-items: center; gap: 6px; font-size: 0.83rem; cursor: pointer; padding: 4px 0; }
.ctor-form-actions   { display: flex; gap: 10px; flex-wrap: wrap; }

/* Profile preview card */
.ctor-profile-preview { position: sticky; top: 20px; }
.ctor-preview-title  { font-size: 0.8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px; }
.ctor-preview-card   { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.ctor-pv-header      { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; position: relative; }
.ctor-pv-avatar      { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 800; flex-shrink: 0; }
.ctor-pv-name        { font-size: 1rem; font-weight: 800; color: var(--text); }
.ctor-pv-trade       { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
.ctor-pv-body        { display: flex; flex-direction: column; gap: 6px; }
.ctor-pv-row         { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.ctor-pv-desc        { font-size: 0.82rem; color: var(--text); line-height: 1.5; }

/* Plan badges */
.ctor-plan-badge          { font-size: 0.67rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.ctor-plan-pro            { background: rgba(107,114,128,.12); color: #6b7280; }
.ctor-plan-premium        { background: rgba(234,179,8,.14); color: #a16207; }

/* Visibilité */
.ctor-visibility-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.ctor-vis-score        { font-size: 3rem; font-weight: 900; color: var(--text); line-height: 1; }
.ctor-vis-max          { font-size: 1.2rem; font-weight: 600; color: var(--muted); }
.ctor-vis-hint         { font-size: 0.83rem; color: var(--muted); margin: 8px 0 0; }
.ctor-completion-bar   { height: 8px; background: var(--border); border-radius: 20px; overflow: hidden; }
.ctor-completion-fill  { height: 100%; border-radius: 20px; transition: width .4s; }
.ctor-fill-green  { background: #374151; }
.ctor-fill-orange { background: #b91c1c; }
.ctor-fill-red    { background: #b51818; }
.ctor-stat-list   { display: flex; flex-direction: column; gap: 8px; }
.ctor-stat-row    { display: flex; align-items: center; justify-content: space-between; font-size: 0.84rem; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.ctor-stat-row:last-child { border-bottom: none; padding-bottom: 0; }
.ctor-stat-row span  { color: var(--muted); }
.ctor-stat-row strong { color: var(--text); font-weight: 600; }
.ctor-tips-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ctor-tips-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 0.84rem; color: var(--text); }
.ctor-tips-list li svg { flex-shrink: 0; margin-top: 2px; color: #b91c1c; }

/* Abonnement */
.ctor-plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 20px; }
.ctor-plan-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px;
  padding: 24px 22px; display: flex; flex-direction: column; gap: 14px; position: relative;
}
.ctor-plan-active  { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(181,24,24,.1); }
.ctor-plan-featured { border-color: #b91c1c; }
.ctor-plan-badge-top { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: #b91c1c; color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 14px; border-radius: 20px; white-space: nowrap; }
.ctor-plan-name  { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.ctor-plan-price { font-size: 2rem; font-weight: 900; color: var(--text); line-height: 1; }
.ctor-plan-price span { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.ctor-plan-tagline { font-size: 0.83rem; color: var(--muted); margin: -4px 0 0; }
.ctor-plan-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ctor-plan-features li { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; color: var(--text); }
.ctor-plan-features li svg { color: #374151; flex-shrink: 0; }
.ctor-plan-note { font-size: 0.8rem; color: var(--muted); font-style: italic; }

/* Paramètres */
.ctor-settings-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.ctor-pref-list      { display: flex; flex-direction: column; gap: 10px; }
.ctor-pref-row       { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; cursor: pointer; }
.ctor-switch-row     { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Modales contractor */
.ctor-request-modal, .ctor-quote-modal { display: flex; flex-direction: column; gap: 16px; }
.crm-header   { display: flex; align-items: center; justify-content: flex-end; }
.crm-grid     { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.crm-row      { display: flex; flex-direction: column; gap: 3px; font-size: 0.85rem; }
.crm-row span { font-size: 0.77rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.crm-row strong { color: var(--text); font-weight: 600; }
.crm-row-full   { grid-column: 1 / -1; }
.crm-desc       { font-size: 0.84rem; color: var(--text); line-height: 1.5; margin: 4px 0 0; }
.crm-history    { background: var(--surface-2, var(--surface)); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; }
.crm-hist-title { font-size: 0.77rem; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 8px; }
.crm-hist-row   { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; font-size: 0.82rem; border-bottom: 1px solid var(--border); }
.crm-hist-row:last-child { border-bottom: none; }
.crm-hist-date  { color: var(--muted); font-size: 0.78rem; }
.crm-actions    { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--border); }
.cqm-intro      { font-size: 0.88rem; color: var(--text); }
.cqm-ttc-preview { font-size: 1.4rem; font-weight: 800; color: var(--text); padding: 10px 0; }

/* Status badges */
.ctor-badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 20px; font-size: 0.72rem; font-weight: 700;
  letter-spacing: .04em; white-space: nowrap;
}
/* names from CTOR_STATUS_CLS mapping */
.ctor-badge-new   { background: rgba(107,107,107,0.10); color: #c41d15; }
.ctor-badge-todo  { background: rgba(245,158,11,.12); color: #9b1c1c; }
.ctor-badge-sent  { background: rgba(99,102,241,.12); color: #3730a3; }
.ctor-badge-ok    { background: rgba(22,163,74,.12);  color: #14532d; }
.ctor-badge-ko    { background: rgba(181,24,24,.12);  color: #7f1d1d; }
.ctor-badge-grey  { background: rgba(107,114,128,.12);color: #4b5563; }
/* aliases kept for backward compat */
.ctor-badge-pending   { background: rgba(245,158,11,.12); color: #9b1c1c; }
.ctor-badge-accepted  { background: rgba(22,163,74,.12);  color: #14532d; }
.ctor-badge-refused   { background: rgba(181,24,24,.12);  color: #7f1d1d; }
.ctor-badge-archived  { background: rgba(107,114,128,.12);color: #4b5563; }
.ctor-badge-progress  { background: rgba(107,107,107,0.10); color: #c41d15; }
.ctor-badge-planned   { background: rgba(139,92,246,.12); color: #4c1d95; }
.ctor-badge-done      { background: rgba(22,163,74,.12);  color: #14532d; }
.ctor-badge-default   { background: var(--border);         color: var(--muted); }

/* ══════════════════════════════════════════════════════════
   CONTRACTOR DASHBOARD - layout & composants premium
══════════════════════════════════════════════════════════ */

.ctor-dashboard-page { max-width: 1100px; margin: 0 auto; padding: 0 0 56px; display: flex; flex-direction: column; gap: 20px; }

/* Header card */
.ctor-header-card {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 16px;
  padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.ctor-header-left   { display: flex; align-items: center; gap: 16px; }
.ctor-header-avatar {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--primary, #b51818); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 900; flex-shrink: 0; letter-spacing: -.02em;
}
.ctor-header-main   { display: flex; flex-direction: column; gap: 4px; }
.ctor-company-title { font-size: 1.35rem; font-weight: 800; color: var(--text, #0a0a0a); line-height: 1.2; }
.ctor-company-meta  { font-size: 0.85rem; color: var(--muted, #6b7280); }
.ctor-company-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ctor-plan-label    { font-size: 0.78rem; color: var(--muted, #6b7280); }
.ctor-rating-chip   {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.78rem; font-weight: 700; color: #9b1c1c;
  background: rgba(234,179,8,.12); border-radius: 20px; padding: 2px 8px;
}
.ctor-rating-chip svg { color: #c41d15; }
.ctor-header-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }

/* Completion banner */
.ctor-completion-banner {
  background: var(--surface, #fff);
  border: 1px solid rgba(181,24,24,.25);
  border-left: 4px solid var(--primary, #b51818);
  border-radius: 12px; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.ctor-completion-info  { flex: 1; min-width: 200px; }
.ctor-completion-title { font-size: 0.97rem; font-weight: 700; color: var(--text, #0a0a0a); margin-bottom: 6px; }
.ctor-completion-hint  { font-size: 0.82rem; color: var(--muted, #6b7280); margin: 6px 0 0; }

/* KPI Grid */
.ctor-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 900px) { .ctor-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ctor-kpi-grid { grid-template-columns: 1fr; } }

.ctor-kpi-card {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  display: flex; flex-direction: column; gap: 6px;
  transition: box-shadow .15s, transform .15s;
}
.ctor-kpi-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); transform: translateY(-1px); }
.ctor-kpi-top   { display: flex; align-items: center; justify-content: space-between; }
.ctor-kpi-icon  { opacity: .55; }
.ctor-kpi-value { font-size: 1.75rem; font-weight: 900; color: var(--text, #0a0a0a); line-height: 1; }
.ctor-kpi-label { font-size: 0.8rem; font-weight: 600; color: var(--muted, #6b7280); }
.ctor-kpi-hint  { font-size: 0.75rem; color: var(--muted, #9ca3af); }

/* KPI color accents */
.ctor-kpi-blue   .ctor-kpi-icon { color: #c0120c; opacity: 1; }
.ctor-kpi-orange .ctor-kpi-icon { color: #b91c1c; opacity: 1; }
.ctor-kpi-green  .ctor-kpi-icon { color: #374151; opacity: 1; }
.ctor-kpi-purple .ctor-kpi-icon { color: #c0120c; opacity: 1; }
.ctor-kpi-red    .ctor-kpi-icon { color: #b51818; opacity: 1; }
.ctor-kpi-teal   .ctor-kpi-icon { color: #555555; opacity: 1; }
.ctor-kpi-indigo .ctor-kpi-icon { color: #c0120c; opacity: 1; }
.ctor-kpi-yellow .ctor-kpi-icon { color: #c41d15; opacity: 1; }
.ctor-kpi-orange .ctor-kpi-value { color: #b91c1c; }
.ctor-kpi-red    .ctor-kpi-value { color: #b51818; }

/* Dashboard grid */
.ctor-dashboard-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 840px) { .ctor-dashboard-grid { grid-template-columns: 1fr; } }

.ctor-dashboard-col { display: flex; flex-direction: column; gap: 20px; }
.ctor-dashboard-section {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px; padding: 20px 22px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.ctor-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 8px;
}
.ctor-section-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.93rem; font-weight: 700; color: var(--text, #0a0a0a);
}
.ctor-link-btn {
  background: none; border: none; padding: 0;
  font-size: 0.8rem; color: var(--primary, #b51818); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.ctor-link-btn:hover { opacity: .75; }

/* Mini list dashboard */
.ctor-mini-list { display: flex; flex-direction: column; gap: 8px; }
.ctor-mini-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2, #f9fafb); border: 1px solid var(--line, #e5e7eb);
  flex-wrap: wrap;
}
.ctor-mc-left  { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ctor-mc-title { font-size: 0.9rem; font-weight: 700; color: var(--text, #0a0a0a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ctor-mc-meta  { font-size: 0.77rem; color: var(--muted, #6b7280); }
.ctor-mc-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.ctor-btn-sm   { font-size: 0.76rem !important; padding: 4px 10px !important; }
.ctor-urgency-chip { font-size: 0.7rem; font-weight: 700; background: rgba(181,24,24,.1); color: #b51818; border-radius: 20px; padding: 2px 8px; }

/* Empty state sections */
.ctor-empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 16px; text-align: center; color: var(--muted, #9ca3af);
}
.ctor-empty-state svg   { opacity: .35; }
.ctor-empty-state p     { font-size: 0.85rem; margin: 0; line-height: 1.55; }
.ctor-empty-state small { font-size: 0.78rem; }

/* Subscription card */
.ctor-sub-plan-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ctor-sub-name     { font-size: 0.9rem; font-weight: 700; color: var(--text, #0a0a0a); }
.ctor-sub-price    { font-size: 0.83rem; color: var(--muted, #6b7280); }
.ctor-sub-text     { font-size: 0.83rem; color: var(--muted, #6b7280); line-height: 1.55; margin: 0 0 14px; }

/* Actions rapides */
.ctor-actions-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
@media (max-width: 900px) { .ctor-actions-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .ctor-actions-grid { grid-template-columns: repeat(2, 1fr); } }

.ctor-action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 8px; border-radius: 12px;
  background: var(--surface-2, #f9fafb); border: 1px solid var(--line, #e5e7eb);
  cursor: pointer; font-size: 0.78rem; font-weight: 600; color: var(--text, #0a0a0a);
  transition: background .15s, border-color .15s, box-shadow .15s;
  text-align: center; line-height: 1.2;
}
.ctor-action-btn:hover {
  background: #fff; border-color: var(--primary, #b51818);
  box-shadow: 0 2px 8px rgba(181,24,24,.12);
  color: var(--primary, #b51818);
}
.ctor-action-btn svg { opacity: .7; }

/* ══════════════════════════════════════════════════════════
   MODALE DÉTAIL ANCIEN LOCATAIRE (.thd-*)
══════════════════════════════════════════════════════════ */

.thd-modal {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 4px 0 0;
}

/* En-tête */
.thd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  margin-bottom: 6px;
}
.thd-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.thd-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary, #b51818);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 800;
  flex-shrink: 0;
  letter-spacing: .02em;
}
.thd-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text, #0a0a0a);
  line-height: 1.2;
}
.thd-subtitle {
  font-size: 0.82rem;
  color: var(--muted, #6b7280);
  margin-top: 3px;
}

/* Badges */
.thd-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.thd-badge-success { background: rgba(22,163,74,.12);   color: #374151; }
.thd-badge-warning { background: rgba(217,119,6,.12);   color: #9b1c1c; }
.thd-badge-danger  { background: rgba(181,24,24,.12);   color: #b91c1c; }
.thd-badge-neutral { background: rgba(107,114,128,.1);  color: #4b5563; }

/* Sections */
.thd-section {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  background: var(--surface, #fff);
}
.thd-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 12px;
}

/* Grille d'info */
.thd-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.thd-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 600px) {
  .thd-grid, .thd-grid-3 { grid-template-columns: 1fr; }
}
.thd-info-card {
  padding: 11px 14px;
  background: var(--surface-2, #f8f8f8);
  border-radius: 9px;
}
.thd-info-card-wide {
  grid-column: 1 / -1;
}
.thd-info-card span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted, #6b7280);
  margin-bottom: 4px;
}
.thd-info-card strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text, #0a0a0a);
}

/* Dépôt de garantie */
.thd-deposit-section { background: var(--surface, #fff); }
.thd-deposit-card {
  background: var(--surface-2, #f8f8f8);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.thd-deposit-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}
.thd-deposit-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.thd-deposit-item span {
  font-size: 0.76rem;
  color: var(--muted, #6b7280);
}
.thd-deposit-item strong {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text, #0a0a0a);
}
.thd-deposit-retenue strong {
  color: #b91c1c;
}
.thd-deposit-status {
  display: flex;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line, #e5e7eb);
}

/* EDL */
.thd-edl-row { display: flex; align-items: center; gap: 10px; }

/* Notes */
.thd-notes {
  font-size: 0.85rem;
  color: var(--text, #0a0a0a);
  line-height: 1.6;
  background: var(--surface-2, #f8f8f8);
  border-radius: 8px;
  padding: 12px 14px;
  border-left: 3px solid var(--line, #e5e7eb);
  white-space: pre-line;
}
.thd-empty-notes {
  font-size: 0.84rem;
  color: var(--muted, #6b7280);
  font-style: italic;
  margin: 0;
}

/* Actions */
.thd-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--line, #e5e7eb);
  margin-top: 18px;
}

/* ══════════════════════════════════════════════════════════
   ESPACE LOCATAIRE - DÉMÉNAGEMENT
══════════════════════════════════════════════════════════ */

/* Card wrapper */
.tmv-card {
  background: var(--surface, #fff); border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px; padding: 22px 24px; margin-top: 16px;
}
.tmv-card-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.tmv-card-title { font-size: 1rem; font-weight: 700; color: var(--text, #0a0a0a); }
.tmv-card-sub {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.81rem; color: var(--muted, #6b7280); margin-top: 4px;
}

/* Progress bar */
.tmv-progress-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; min-width: 130px; }
.tmv-progress-label { font-size: 0.78rem; font-weight: 600; color: var(--muted, #6b7280); }
.tmv-progress-bar {
  width: 130px; height: 6px; background: var(--line, #e5e7eb); border-radius: 99px; overflow: hidden;
}
.tmv-progress-fill { height: 100%; background: #b80000; border-radius: 99px; transition: width .3s ease; }

/* Checklist */
.tmv-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tmv-check-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  transition: background .12s; cursor: default;
}
.tmv-check-item:hover { background: var(--surface-2, #f9f9f9); }
.tmv-check-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  flex-shrink: 0; display: flex; align-items: center; color: #d1d5db;
  transition: color .15s;
}
.tmv-check-icon-empty { display: block; }
.tmv-check-icon-done  { display: none; }
.tmv-check-item.tmv-checked .tmv-check-btn { color: #b80000; }
.tmv-check-item.tmv-checked .tmv-check-icon-empty { display: none; }
.tmv-check-item.tmv-checked .tmv-check-icon-done  { display: block; }
.tmv-check-label {
  flex: 1; font-size: 0.88rem; color: var(--text, #0a0a0a); transition: color .15s;
}
.tmv-check-item.tmv-checked .tmv-check-label { color: var(--muted, #9ca3af); text-decoration: line-through; }
.tmv-check-status {
  font-size: 0.73rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted, #9ca3af); white-space: nowrap;
}
.tmv-check-item.tmv-checked .tmv-check-status { color: #b80000; }

/* Mon départ */
.tmv-departure-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 18px;
}
.tmv-departure-field {
  background: var(--surface-2, #f8f9fa); border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px; padding: 14px 16px;
}
.tmv-departure-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #9ca3af); margin-bottom: 6px; }
.tmv-departure-value { font-size: 0.92rem; font-weight: 700; color: var(--text, #0a0a0a); }
.tmv-departure-empty { font-size: 0.88rem; font-weight: 400; color: var(--muted, #9ca3af); font-style: italic; }
.tmv-departure-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tmv-departure-sent-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.75rem; font-weight: 600; color: #166534;
  background: #dcfce7; border: 1px solid #bbf7d0;
  border-radius: 20px; padding: 3px 10px; margin-top: 4px;
}
.tmv-departure-sent-badge svg { color: #16a34a; flex-shrink: 0; }
.tmv-confirm-label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.83rem; color: #444; line-height: 1.5; cursor: pointer;
}
.tmv-confirm-label input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; accent-color: #c0120c; width: 15px; height: 15px; }

/* Buttons */
.tmv-btn-outline {
  background: #fff; border: 1.5px solid var(--line, #d1d5db); border-radius: 8px;
  padding: 8px 16px; font-size: 0.83rem; font-weight: 600; color: var(--text, #0a0a0a);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.tmv-btn-outline:hover { border-color: #b80000; color: #b80000; }
.tmv-btn-ghost {
  background: none; border: none; padding: 8px 16px;
  font-size: 0.83rem; font-weight: 600; color: var(--muted, #6b7280);
  cursor: pointer; transition: color .15s;
}
.tmv-btn-ghost:hover { color: var(--text, #0a0a0a); }

/* Actions rapides */
.tmv-actions-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.tmv-action-card {
  background: var(--surface-2, #f8f9fa); border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px; padding: 14px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
  text-align: center;
}
.tmv-action-card:hover { border-color: #b80000; box-shadow: 0 2px 10px rgba(170,0,0,.09); }
.tmv-action-icon { color: #b80000; display: flex; }
.tmv-action-label { font-size: 0.78rem; font-weight: 600; color: var(--text, #0a0a0a); line-height: 1.3; }

/* Bientôt disponible */
.tmv-coming-card {
  display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap;
  background: var(--surface-2, #f8f9fa);
}
.tmv-coming-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line, #e5e7eb);
  display: flex; align-items: center; justify-content: center; color: #6b7280;
}
.tmv-coming-body { flex: 1; min-width: 200px; }
.tmv-coming-title { font-size: 1rem; font-weight: 700; color: var(--text, #0a0a0a); margin-bottom: 6px; }
.tmv-coming-text  { font-size: 0.84rem; color: var(--muted, #6b7280); line-height: 1.6; margin: 0; }
.tmv-coming-badge {
  align-self: flex-start; flex-shrink: 0;
  background: rgba(170,0,0,.08); color: #c41d15;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 12px; border-radius: 20px;
}

@media (max-width: 600px) {
  .tmv-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .tmv-card { padding: 16px; }
  .tmv-progress-wrap { min-width: 100%; align-items: flex-start; }
  .tmv-progress-bar { width: 100%; }
}

/* Modale devis déménagement */
.moving-request-modal { display: flex; flex-direction: column; gap: 14px; }
.mrm-intro { font-size: 0.88rem; color: var(--text, #0a0a0a); margin: 0; }
.mrm-services-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-top: 6px;
}
.mrm-service-check { display: flex; align-items: center; gap: 7px; font-size: 0.83rem; cursor: pointer; padding: 4px 0; }

/* ══════════════════════════════════════════════════════════
   FISCAL CONFIG MODAL
══════════════════════════════════════════════════════════ */
.fiscal-config-modal {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fiscal-config-subtitle {
  font-size: 0.83rem;
  color: var(--muted, #6b7280);
  margin: 0;
  padding: 14px 20px 10px;
  line-height: 1.55;
  border-bottom: 1px solid var(--line, #e5e7eb);
}

/* Completion mini-bar at top of modal */
.fiscal-completion-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--surface-2, #f8f9fb);
  border-bottom: 1px solid var(--line, #e5e7eb);
  flex-wrap: wrap;
}
.fiscal-completion-label {
  font-size: 0.82rem;
  color: var(--muted, #6b7280);
  white-space: nowrap;
}
.fiscal-completion-label strong { color: var(--ink, #111); }
.fiscal-completion-bar {
  flex: 1;
  min-width: 80px;
  height: 6px;
  background: var(--line, #e5e7eb);
  border-radius: 3px;
  overflow: hidden;
}
.fiscal-completion-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .3s;
}
.fiscal-completion-fill.fisc-score-ok   { background: #374151; }
.fiscal-completion-fill.fisc-score-warn { background: #c41d15; }
.fiscal-completion-fill.fisc-score-bad  { background: #b51818; }

/* Sections */
.fiscal-config-section {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fiscal-config-section--last {
  border-bottom: none;
}
.fiscal-config-section-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #6b7280);
}

/* Field group (label + input + help) */
.fiscal-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fiscal-field-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink, #111);
}
.fiscal-required { color: var(--brand, #b51818); }
.fiscal-optional { font-weight: 400; color: var(--muted, #9ca3af); font-size: 0.78rem; }

/* 2-column grids inside sections */
.fiscal-config-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fiscal-span-2 { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .fiscal-config-grid-2 { grid-template-columns: 1fr; }
  .fiscal-span-2 { grid-column: auto; }
}

/* Inputs inside fiscal modal */
.fiscal-config-modal input,
.fiscal-config-modal select,
.fiscal-config-modal textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line, #d1d5db);
  border-radius: 8px;
  padding: 8px 11px;
  font-size: 0.85rem;
  color: var(--ink, #111);
  background: var(--surface, #fff);
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.fiscal-config-modal input:focus,
.fiscal-config-modal select:focus,
.fiscal-config-modal textarea:focus {
  border-color: var(--brand, #b51818);
  box-shadow: 0 0 0 3px rgba(181,24,24,0.08);
}
.fiscal-config-modal textarea {
  min-height: 80px;
  resize: vertical;
}

/* Help text */
.fiscal-help-text {
  font-size: 0.77rem;
  color: var(--muted, #9ca3af);
  margin: 0;
  line-height: 1.5;
}

/* Warning list */
.fiscal-warning-list {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}
.fiscal-warning-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #9b1c1c;
  margin-bottom: 2px;
}
.fiscal-warning-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: #78350f;
}
.fiscal-warning-item svg { color: #c41d15; flex-shrink: 0; }
.fiscal-warning-ok {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: #374151;
  padding: 8px 10px;
  background: #f7f7f8;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-top: 2px;
}

/* Document checklist */
.fiscal-doc-checklist {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  overflow: hidden;
}
.fiscal-doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 0.83rem;
  color: var(--ink, #111);
  border-bottom: 1px solid var(--line, #f3f4f6);
}
.fiscal-doc-item:last-child { border-bottom: none; }
.fiscal-doc-item:nth-child(even) { background: var(--surface-2, #f8f9fb); }
.fiscal-doc-label { font-weight: 500; }
.fiscal-doc-status {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}
.fisc-doc-status--ok      { background: rgba(22,163,74,.1);  color: #374151; }
.fisc-doc-status--warn    { background: rgba(245,158,11,.12); color: #9b1c1c; }
.fisc-doc-status--missing { background: rgba(107,114,128,.1); color: #6b7280; }

/* Actions bar at bottom */
.fiscal-config-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface-2, #f8f9fb);
  border-top: 1px solid var(--line, #e5e7eb);
  flex-wrap: wrap;
}
.fiscal-config-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--muted, #9ca3af);
  margin: 0;
  flex: 1;
  line-height: 1.5;
}
.fiscal-config-disclaimer svg { flex-shrink: 0; margin-top: 2px; }
.fiscal-config-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL UI HARMONIZATION - polishing pass
   Overrides only: more air, premium spacing, cleaner radius.
   All additive - no JS selectors renamed, no existing classes removed.
   ══════════════════════════════════════════════════════════════ */

/* ── Main content area: more breathing room ──────────────────── */
.main {
  padding: 28px;
}

/* ── KPI grid ────────────────────────────────────────────────── */
.kpi-grid {
  gap: 16px;
  margin-bottom: 20px;
}

/* ── Cards: rounder, more airy ───────────────────────────────── */
.kpi,
.panel,
.property-card,
.table-panel,
.payment-card,
.ticket-column,
.document-card,
.public-preview {
  border-radius: var(--radius-xl);
}

.kpi {
  padding: 22px;
}

.kpi strong {
  font-size: 1.8rem;
}

.panel {
  padding: 22px;
}

/* ── Property & document grids: more gap ─────────────────────── */
.properties-grid,
.listing-preview,
.documents-grid {
  gap: 18px;
}

/* ── Modal: wider, rounder, better padded ────────────────────── */
.modal-card {
  width: min(700px, calc(100vw - 32px));
  border-radius: 16px;
}

.modal-card-wide {
  width: min(820px, calc(100vw - 32px));
}

.modal-header {
  padding: 22px 26px;
}

.modal-header h2 {
  font-size: 1.25rem;
}

/* ── Form layout: more breathing room ───────────────────────── */
.form-grid {
  gap: 16px;
  padding: 22px 26px;
}

.form-field {
  gap: 8px;
}

/* ── Buttons: slightly taller, rounder ──────────────────────── */
.primary-action,
.secondary-action,
.ghost-action,
.icon-button {
  min-height: 44px;
  border-radius: 10px;
}

.icon-button {
  width: 44px;
}

/* ── Empty states: generous padding, rounder ────────────────── */
.empty-state {
  padding: 36px 24px;
  border-radius: var(--radius-xl);
}

/* ── Page structure utilities (additive) ─────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-eyebrow {
  margin: 0 0 5px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.page-title {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* ── Content card utility (additive) ─────────────────────────── */
.content-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: 0 10px 26px rgba(22, 31, 28, 0.06);
  padding: 22px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.card-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Responsive refinements ──────────────────────────────────── */
@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .main {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
    gap: 12px;
  }

  .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .kpi {
    padding: 16px 18px;
  }

  .panel {
    padding: 18px;
  }

  .modal-card,
  .modal-card-wide {
    width: calc(100vw - 16px);
    border-radius: 14px;
    max-height: calc(100vh - 16px);
  }

  .modal-header {
    padding: 18px 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    padding: 18px 20px;
  }

  .properties-grid,
  .listing-preview,
  .documents-grid {
    grid-template-columns: 1fr;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .empty-state {
    padding: 24px 18px;
  }
}

/* ── Form field states (disabled, error) ── */
.form-field input:disabled,
.form-field select:disabled,
.form-field textarea:disabled {
  background: var(--surface-2);
  color: #9ca3af;
  cursor: not-allowed;
  opacity: 1;
}
.form-field input.is-error,
.form-field select.is-error,
.form-field textarea.is-error {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px var(--brand-light) !important;
  outline: none;
}
.et-error {
  font-size: 0.75rem;
  color: var(--brand);
  line-height: 1.4;
}
.et-field-hint {
  font-size: 0.75rem;
  color: #9ca3af;
  line-height: 1.4;
}

/* ── Custom modal content: add horizontal padding ────────────── */
/* All custom modal wrappers that bypass .form-grid need their own padding */
.preview-listing-modal,
.candidate-form,
.candidate-analysis-modal,
.request-docs-modal,
.tenant-invite-modal,
.th-edit-modal,
.th-deposit-modal,
.ctor-request-modal,
.ctor-quote-modal,
.moving-request-modal,
.thd-modal {
  padding: 20px 24px;
}

/* fiscal-config-modal scrolls through its own sections - keep its zero padding */
.fiscal-config-modal {
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════════
   OWNER ONBOARDING - parcours post-inscription 7 étapes
   ══════════════════════════════════════════════════════════════ */

.owner-onboarding-page {
  min-height: 100vh;
  background: #f4f5f7;
  display: flex;
  flex-direction: column;
}

.owner-onboarding-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 32px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.oob-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  flex-shrink: 0;
}

.oob-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 480px;
}

.oob-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.oob-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f0f1f5;
  color: #9ca3af;
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: all 0.2s;
}

.oob-dot-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(192,18,12,0.15);
}

.oob-dot-done {
  background: #374151;
  color: #fff;
  border-color: #374151;
}

.oob-bar {
  width: 100%;
  height: 4px;
  background: #e8e8e8;
  border-radius: 2px;
  overflow: hidden;
}

.oob-bar-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 2px;
  transition: width 0.35s ease;
}

.oob-step-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.oob-skip-all {
  font-size: 0.8rem;
  min-height: 34px;
  padding: 0 14px;
  flex-shrink: 0;
  color: var(--muted);
  border-color: var(--line);
}

.owner-onboarding-body {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  padding: 32px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.owner-onboarding-main {
  min-width: 0;
}

.owner-onboarding-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 24px rgba(22,31,28,0.06);
}

.oob-step-header {
  margin-bottom: 24px;
}

.oob-step-eyebrow {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 6px;
}

.oob-step-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px;
}

.oob-step-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.oob-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.oob-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 0;
}

.oob-field label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.oob-field input,
.oob-field select,
.oob-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 0.88rem;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 44px;
}

.oob-field input:focus,
.oob-field select:focus,
.oob-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(192,18,12,0.1);
}

.oob-field textarea {
  min-height: 80px;
  resize: vertical;
}

.oob-full {
  grid-column: 1 / -1;
}

.oob-req { color: var(--brand); }
.oob-opt { font-weight: 400; color: var(--muted); font-size: 0.78rem; }

.oob-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff5f4;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.83rem;
  color: #c0392b;
  margin-bottom: 16px;
}

.oob-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.oob-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.oob-later-btn {
  background: none;
  border: none;
  font-size: 0.83rem;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.oob-later-btn:hover { color: var(--ink); }

/* ── Sidebar summary ── */
.owner-onboarding-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
}

.oob-sidebar-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

.oob-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.oob-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--muted);
}

.oob-summary-row.oob-summary-done {
  color: #374151;
}

.oob-summary-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.oob-sidebar-hint {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Document step ── */
.oob-doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.oob-doc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8f9fc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.oob-doc-icon {
  color: var(--muted);
  flex-shrink: 0;
}

.oob-doc-info {
  flex: 1;
  min-width: 0;
}

.oob-doc-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
}

.oob-doc-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  min-height: unset;
  flex-shrink: 0;
}

/* ── Dashboard checklist ── */
.db-onboarding-checklist {
  background: #fff;
  border: 1px solid #fcd34d;
  border-left: 3px solid #c41d15;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 1px 6px rgba(245,158,11,0.07);
}

.db-onb-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.86rem; font-weight: 700;
  color: #9b1c1c; margin-bottom: 10px;
}
.db-onb-header svg { color: #c41d15; flex-shrink: 0; }

.db-onb-list {
  list-style: none; margin: 0 0 10px; padding: 0;
  display: flex; flex-direction: column; gap: 5px;
}

.db-onb-item {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none;
  font-size: 0.82rem; color: #9b1c1c;
  cursor: pointer; padding: 2px 0;
  text-align: left; text-decoration: none;
  transition: color 0.12s;
}
.db-onb-item::before {
  content: "→";
  font-size: 0.75rem; color: #c41d15;
}
.db-onb-item:hover { color: #9b1c1c; }

.db-onb-resume {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff5f5; border: 1px solid #fcd34d;
  border-radius: 8px; padding: 6px 13px;
  font-size: 0.78rem; font-weight: 600;
  color: #9b1c1c; cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.db-onb-resume:hover { background: #f7f7f8; border-color: #c41d15; }

/* ── Responsive ── */
@media (max-width: 860px) {
  .owner-onboarding-body {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }
  .owner-onboarding-sidebar { display: none; }
  .owner-onboarding-topbar { padding: 12px 16px; }
  .oob-dots { display: none; }
  .owner-onboarding-card { padding: 22px 20px; }
  .oob-form-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   ASSISTANT IA
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Sidebar "Nouveau" badge */
.sb-badge-new {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .03em;
  vertical-align: middle;
  line-height: 1.6;
}

/* Page wrapper */
.assistant-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: calc(100vh - 120px);
  min-height: 500px;
}

/* Header */
.ast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.ast-header-left { display: flex; align-items: center; gap: 12px; }
.ast-header-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #c0120c 0%, #c41a12 100%);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(192,18,12,.25);
}
.ast-header-title { font-size: 18px; font-weight: 700; color: #1a1a1a; margin: 0 0 2px; }
.ast-header-sub { font-size: 12px; color: var(--muted); margin: 0; }

/* Mode toggle */
.ast-mode-toggle { display: flex; gap: 6px; }
.ast-mode-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  color: var(--muted);
  font-size: 12px; font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.ast-mode-btn:hover { border-color: #ccc; background: #f0f0f0; color: #333; }
.ast-mode-btn--active {
  background: #fff0ef;
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 600;
}

/* Main layout — collapsed by default, sidebar revealed with .ast-layout--open */
.ast-layout {
  display: grid;
  grid-template-columns: 1fr;
  flex: 1;
  overflow: hidden;
}
.ast-layout--open {
  grid-template-columns: 240px 1fr;
}

/* Sidebar — hidden by default */
.ast-sidebar {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: #fafafa;
  overflow-y: auto;
}
.ast-layout--open .ast-sidebar { display: flex; }

.ast-sidebar-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.ast-sidebar-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.ast-sidebar-hint { font-size: 11px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }

/* Compact topbar above chat (always visible) */
.ast-chat-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  background: #fff;
  flex-shrink: 0;
}
.ast-mode-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 20px; white-space: nowrap;
}
.ast-mode-badge--general  { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.ast-mode-badge--connected { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.ast-topbar-actions { display: flex; align-items: center; gap: 6px; }
.ast-sidebar-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  border: 1.5px solid var(--line); background: #fafafa;
  color: #666; cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.ast-sidebar-toggle-btn:hover { border-color: #bbb; background: #f0f0f0; color: #333; }
.ast-sidebar-toggle-btn.active { background: #fff0ef; border-color: var(--brand); color: var(--brand); }
.ast-new-conv-compact {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 5px 10px;
  border: 1.5px solid var(--line); border-radius: 8px;
  background: #fafafa; color: #555; cursor: pointer; transition: all .15s;
}
.ast-new-conv-compact:hover { border-color: var(--brand); color: var(--brand); background: #fff0ef; }

/* Disclaimer footer line (below input) */
.ast-disclaimer-line {
  font-size: 10px; color: #bbb; padding: 0 20px 8px;
  line-height: 1.4; text-align: center;
}

.ast-mode-desc {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
}
.ast-mode-desc--general { background: #f3f4f6; color: #374151; }
.ast-mode-desc--connected { background: #ecfdf5; color: #065f46; }

/* Suggestions */
.ast-suggestions { display: flex; flex-direction: column; gap: 5px; }
.ast-suggestion-btn {
  text-align: left;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafafa;
  font-size: 11px; color: #444;
  cursor: pointer;
  transition: all .12s;
  line-height: 1.4;
}
.ast-suggestion-btn:hover { background: #fff0ef; border-color: #f9c5c2; color: var(--brand); }

/* New conversation button */
.ast-new-conv-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: auto;
  padding: 9px 14px;
  border: 1.5px dashed var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: all .15s;
}
.ast-new-conv-btn:hover { border-color: var(--brand); color: var(--brand); background: #fff0ef; }

/* Chat area */
.ast-chat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

/* Context banner */
.ast-ctx-banner {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 20px;
  background: #ecfdf5;
  border-bottom: 1px solid #a7f3d0;
  font-size: 11px; color: #065f46;
  font-weight: 500;
  flex-shrink: 0;
}

/* Message list */
.ast-msg-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Empty state */
.ast-empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%;
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}
.ast-empty-icon { color: #e0e0e0; margin-bottom: 16px; }
.ast-empty-title { font-size: 15px; font-weight: 600; color: #555; margin: 0 0 6px; }
.ast-empty-sub { font-size: 12px; color: var(--muted); margin: 0 0 16px; max-width: 300px; text-wrap: balance; }
.ast-suggestions { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 320px; }
.ast-suggest-btn { background: #fff; border: 1.5px solid #e5e7eb; border-radius: 10px; padding: 10px 14px; font-size: .83rem; font-weight: 500; color: #374151; cursor: pointer; text-align: left; font-family: inherit; transition: border-color .15s, background .15s; }
.ast-suggest-btn:hover { border-color: #c0120c; background: #fff5f5; color: #c0120c; }

/* Messages */
.ast-msg { display: flex; }
.ast-msg--user { justify-content: flex-end; }
.ast-msg--ai { justify-content: flex-start; }
.ast-msg-inner { display: flex; align-items: flex-end; gap: 8px; max-width: 78%; }
.ast-msg--user .ast-msg-inner { flex-direction: row-reverse; }

.ast-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #c0120c, #c41a12);
  color: #fff;
  flex-shrink: 0;
}
.ast-avatar--user {
  background: #e8e8e8;
  color: #555;
}

.ast-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.55;
  position: relative;
}
.ast-msg--ai .ast-bubble {
  background: #f4f4f5;
  color: #1a1a1a;
  border-bottom-left-radius: 4px;
}
.ast-msg--user .ast-bubble {
  background: var(--brand);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ast-time {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  opacity: .55;
}

/* Typing indicator */
.ast-msg--typing .ast-bubble {
  padding: 12px 16px;
}
.ast-typing-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: #9ca3af;
  border-radius: 50%;
  margin: 0 2px;
  animation: astTypingBounce 1.2s infinite ease-in-out;
}
.ast-typing-dot:nth-child(1) { animation-delay: 0s; }
.ast-typing-dot:nth-child(2) { animation-delay: .2s; }
.ast-typing-dot:nth-child(3) { animation-delay: .4s; }
@keyframes astTypingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

/* Input area */
.ast-input-area {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}
.ast-input {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 13px;
  font-family: inherit;
  color: #1a1a1a;
  outline: none;
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color .15s;
}
.ast-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(192,18,12,.08); }
.ast-input::placeholder { color: #aaa; }
.ast-send-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s, opacity .15s;
}
.ast-send-btn:hover { background: #c41a12; }
.ast-send-btn:disabled { opacity: .5; cursor: default; }
.ast-input-hint { padding: 0 20px 10px; font-size: 10px; color: #ccc; }

/* AI bubble - markdown-rendered content */
.ast-bubble--ai { line-height: 1.65; }
.ast-bubble--ai p { margin: 0 0 8px; }
.ast-bubble--ai p:last-of-type { margin-bottom: 0; }
.ast-bubble--ai ul { margin: 6px 0 8px 16px; padding: 0; }
.ast-bubble--ai li { margin-bottom: 3px; }
.ast-bubble--ai strong { font-weight: 600; }
.ast-bubble--ai em { font-style: italic; opacity: .85; }
.ast-bubble--ai .ast-quote {
  display: block;
  border-left: 3px solid rgba(192,18,12,.3);
  padding-left: 10px;
  margin: 6px 0;
  color: #555;
  font-style: italic;
}

/* Loading bubble */
.ast-bubble--loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #f4f4f4;
  border-radius: 14px;
  color: #666;
  font-size: 12px;
}
.ast-loading-label { font-size: 12px; color: #888; }

/* Responsive */
@media (max-width: 900px) {
  /* Force sidebar hidden on mobile even if toggled open on desktop */
  .ast-layout--open { grid-template-columns: 1fr; }
  .ast-layout--open .ast-sidebar { display: none; }
  .ast-sidebar-toggle-btn { display: none; }
  .ast-header { padding: 14px 16px 12px; }
  .ast-header-title { font-size: 15px; }
  .ast-chat-topbar { padding: 6px 14px; }
  .ast-msg-list { padding: 14px; }
  .ast-msg-inner { max-width: 90%; }
  .ast-input-area { padding: 10px 14px; }
  .ast-input-hint { padding: 0 14px 8px; }
  .ast-disclaimer-line { padding: 0 14px 8px; }
}

/* ── Problem section ── */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}
.problem-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.9rem;
  color: var(--text, #0a0a0a);
}
.problem-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2, #f3f4f6);
  border-radius: 8px;
  color: var(--text-muted, #6b7280);
}
@media (max-width: 768px) {
  .problem-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .problem-grid { grid-template-columns: 1fr; }
}

/* ===========================================
   PROPERTY CREATE - Formulaire rapide
   =========================================== */
.pc-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}
.pc-back-row {
  margin-bottom: 20px;
}
.pc-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  cursor: pointer;
  padding: 0;
}
.pc-back:hover { color: #fff; }
.pc-header {
  margin-bottom: 36px;
}
.pc-title {
  font-size: 1.7rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 6px;
}
.pc-subtitle {
  color: rgba(255,255,255,0.45);
  font-size: 0.95rem;
}
.pc-form { display: flex; flex-direction: column; gap: 20px; }
.pc-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
}
.pc-section-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pc-section-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.pc-section-head h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 2px;
}
.pc-section-head p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
}
.pc-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px 22px;
}
.pc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pc-field.full { grid-column: 1 / -1; }
.pc-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pc-field label .req { color: var(--brand); margin-left: 2px; }
.pc-field input,
.pc-field select,
.pc-field textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 0.93rem;
  outline: none;
  transition: border-color 0.15s;
}
.pc-field input:focus,
.pc-field select:focus,
.pc-field textarea:focus { border-color: var(--brand); }
.pc-field input::placeholder { color: rgba(255,255,255,0.25); }
.pc-field select option { background: #1a1a1a; }
.pc-field .pc-hint {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.3);
  margin-top: 2px;
}
.pc-rentcc-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(192,18,12,0.08);
  border: 1px solid rgba(192,18,12,0.2);
  border-radius: 8px;
  color: var(--brand);
  font-weight: 700;
  font-size: 1rem;
}
.pc-submit-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

/* Light mode overrides */
.main .pc-section { background: #fff; border-color: #e4e6eb; }
.main .pc-section-head { border-color: #eee; }
.main .pc-section-head h2 { color: #111; }
.main .pc-section-head p { color: #888; }
.main .pc-field label { color: #555; }
.main .pc-back { color: #888; }
.main .pc-back:hover { color: #111; }
.main .pc-title { color: #0d0d0d; }
.main .pc-subtitle { color: #888; }
.main .pc-field input,
.main .pc-field select { background: #fff; border-color: #ddd; color: #111; }
.main .pc-field input::placeholder { color: #bbb; }
.main .pc-field select option { background: #fff; }

/* ===========================================
   PROPERTY DETAIL - 11 onglets horizontaux
   =========================================== */
.pdt-nav-wrap {
  overflow-x: auto;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 24px;
  scrollbar-width: none;
}
.pdt-nav-wrap::-webkit-scrollbar { display: none; }
.pdt-nav {
  display: flex;
  gap: 0;
  min-width: max-content;
}
.pdt-tab {
  padding: 12px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.pdt-tab:hover:not(.active) { color: rgba(255,255,255,0.7); }
.pdt-tab.active {
  color: #fff;
  border-bottom-color: var(--brand);
}
.pdt-body { /* panels container - no extra styles needed */ }
.pdt-panel { display: none; }
.pdt-panel.active { display: block; }

/* Vue d'ensemble */
.pdt-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.pdt-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 20px;
}
.pdt-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

/* Financier - 3 sous-sections */
.pdt-financial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pdt-sub-section { }
.pdt-sub-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.38);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Documents tab */
.pd-docs-list { display: flex; flex-direction: column; gap: 10px; }
.pd-doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  font-size: 0.88rem;
}
.pd-doc-type {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  flex-shrink: 0;
}
.pd-doc-title { flex: 1; color: #fff; }
.pd-doc-status.positive { color: #d1d5db; font-size: 0.78rem; }
.pd-doc-status.warning { color: #c41d15; font-size: 0.78rem; }

/* Photos tab */
.pd-photos-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.pd-photo-item { position: relative; }
.pd-photo-item.main { }
.pd-photo-img {
  width: 200px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.1);
}
.pd-photo-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 6px;
  text-align: center;
}

/* Équipements tab */
.pd-equip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.pd-equip-cat { }
.pd-equip-cat-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pd-equip-items { display: flex; flex-direction: column; gap: 6px; }
.pd-equip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
}
.pd-equip-item input[type="checkbox"] {
  accent-color: var(--brand);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* Accès tab */
.pd-acces-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.pd-acces-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
}
.pd-acces-info { flex: 1; }
.pd-acces-type { font-weight: 700; font-size: 0.9rem; color: #fff; display: block; }
.pd-acces-detail { font-size: 0.82rem; color: rgba(255,255,255,0.4); margin-top: 2px; display: block; }
.pd-acces-del {
  background: none;
  border: none;
  color: rgba(255,255,255,0.25);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.pd-acces-del:hover { color: #ff4b4b; background: rgba(255,75,75,0.1); }
.pd-acces-add { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 16px; }

/* Contacts tab */
.pd-contacts-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.pd-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
}
.pd-contact-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(192,18,12,0.15);
  color: var(--brand);
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pd-contact-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pd-contact-name { font-weight: 700; font-size: 0.93rem; color: #fff; }
.pd-contact-type { font-size: 0.78rem; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.05em; }
.pd-contact-link { font-size: 0.85rem; color: rgba(255,255,255,0.55); text-decoration: none; }
.pd-contact-link:hover { color: var(--brand); }
.pd-contacts-add { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 16px; }

/* Vitrine tab */
.pd-vitrine-status { display: flex; flex-direction: column; gap: 12px; }

/* Utilities */
.mt-8  { margin-top: 8px !important; }
.mt-12 { margin-top: 12px !important; }

/* ── Estimation DVF ──────────────────────────────────────────────────────── */
.pd-est-card {
  margin-top: 20px;
}
.pd-est-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.pd-est-card-sub {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 3px;
}
.pd-est-refresh-btn {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.78rem;
  padding: 6px 14px;
}
.pd-est-range {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.pd-est-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.pd-est-col-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pd-est-col-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}
.pd-est-low  { border-left: 3px solid rgba(255,255,255,0.15); }
.pd-est-high { border-left: 3px solid rgba(255,255,255,0.15); }
.pd-est-med  { border-left: 3px solid var(--brand,#e03838); }
.pd-est-med-val { color: #fff; }
.pd-est-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
}
.pd-est-sep { opacity: 0.4; }
.pd-est-plusval {
  font-weight: 600;
}
.pd-est-positive { color: #4caf81; }
.pd-est-negative { color: #e05252; }
.pd-est-reliability {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pd-est-rel-high   { background: rgba(76,175,129,0.18); color: #4caf81; }
.pd-est-rel-medium { background: rgba(255,193,7,0.15);  color: #ffc107; }
.pd-est-rel-low    { background: rgba(224,82,82,0.15);  color: #e05252; }
.pd-est-source {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.5;
  margin-bottom: 4px;
}
.pd-est-disclaimer {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.22);
  font-style: italic;
}
.pd-est-loading,
.pd-est-unavailable,
.pd-est-stale {
  font-size: 0.82rem;
  padding: 10px 0;
  line-height: 1.5;
}
.pd-est-loading     { color: rgba(255,255,255,0.45); }
.pd-est-unavailable { color: rgba(255,255,255,0.35); }
.pd-est-stale {
  color: #ffc107;
  background: rgba(255,193,7,0.08);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(255,193,7,0.15);
}
/* Badge méthode */
.pd-est-method {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  margin-bottom: 14px;
  line-height: 1.4;
}
.pd-est-method-prox {
  background: rgba(76,175,129,0.12);
  color: #4caf81;
  border: 1px solid rgba(76,175,129,0.2);
}
.pd-est-method-comm {
  background: rgba(255,193,7,0.1);
  color: #ffc107;
  border: 1px solid rgba(255,193,7,0.18);
}
/* Tableau ventes comparables */
.pd-est-comps-toggle {
  display: inline-block;
  font-size: 0.77rem;
  color: rgba(255,255,255,0.45);
  background: none;
  border: none;
  padding: 8px 0 4px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pd-est-comps-toggle:hover { color: rgba(255,255,255,0.7); }
.pd-est-comps-wrap {
  margin-top: 4px;
  max-height: 400px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 6px;
}
.pd-est-comps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}
.pd-est-comps-table thead th {
  position: sticky;
  top: 0;
  background: #111;
  z-index: 1;
}
.pd-est-comps-table th {
  color: rgba(255,255,255,0.38);
  font-weight: 700;
  text-align: left;
  padding: 4px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
}
.pd-est-comps-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
}
.pd-est-comps-table tr:last-child td { border-bottom: none; }
.pd-est-show-more {
  display: block;
  width: 100%;
  padding: 8px 0;
  background: none;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.38);
  font-size: 0.74rem;
  cursor: pointer;
  text-align: center;
  transition: color 0.15s;
}
.pd-est-show-more:hover { color: rgba(255,255,255,0.7); }

/* Light mode overrides for pdt */
.main .pdt-nav-wrap { border-color: #eee; }
.main .pdt-tab { color: #888; }
.main .pdt-tab:hover:not(.active) { color: #333; }
.main .pdt-tab.active { color: #111; border-bottom-color: var(--brand); }
.main .pdt-card { background: #fff; border-color: #e4e6eb; }
.main .pdt-card-title { color: #777; }
.main .pdt-sub-title { color: #888; border-color: #eee; }
.main .pd-acces-item,
.main .pd-contact-item,
.main .pd-doc-item { background: #fafafa; border-color: #e4e6eb; }
.main .pd-acces-type,
.main .pd-contact-name,
.main .pd-doc-title { color: #111; }
.main .pd-acces-detail { color: #888; }
.main .pd-equip-cat-title { color: #888; border-color: #eee; }
.main .pd-equip-item { color: #333; }
.main .pd-photo-img { border-color: #ddd; }
.main .pd-est-card-sub { color: #aaa; }
.main .pd-est-col { background: #f7f7f8; border-color: #e4e6eb; }
.main .pd-est-col-label { color: #999; }
.main .pd-est-col-val { color: #111; }
.main .pd-est-med-val { color: #111; }
.main .pd-est-meta { color: #888; }
.main .pd-est-source { color: #bbb; }
.main .pd-est-disclaimer { color: #ccc; }
.main .pd-est-loading { color: #aaa; }
.main .pd-est-unavailable { color: #aaa; }
.main .pd-est-method-prox { background: rgba(76,175,129,0.08); color: #2e7d52; border-color: rgba(76,175,129,0.2); }
.main .pd-est-method-comm { background: rgba(255,193,7,0.08); color: #a07800; border-color: rgba(255,193,7,0.2); }
.main .pd-est-comps-toggle { color: #999; }
.main .pd-est-comps-toggle:hover { color: #555; }
.main .pd-est-comps-wrap { border-color: #e4e6eb; }
.main .pd-est-comps-table thead th { background: #f8f8f8; }
.main .pd-est-comps-table th { color: #aaa; border-color: #eee; }
.main .pd-est-comps-table td { color: #444; border-color: #f0f0f0; }
.main .pd-est-show-more { color: #aaa; border-color: #eee; }
.main .pd-est-show-more:hover { color: #333; }

/* Responsive */
@media (max-width: 900px) {
  .pdt-overview-grid { grid-template-columns: 1fr; }
  .pdt-financial-grid { grid-template-columns: 1fr 1fr; }
  .pd-equip-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pdt-financial-grid { grid-template-columns: 1fr; }
  .pd-est-range { grid-template-columns: 1fr; }
  .pd-est-card-header { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .pc-fields { grid-template-columns: 1fr; }
  .pc-field.full { grid-column: 1; }
}

/* ── Kit de publication Leboncoin ──────────────────── */
.lbc-kit {
  grid-column: 1 / -1;
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid #eaecf0;
}

.lbc-kit-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.lbc-kit-title-row { display: flex; align-items: center; gap: 10px; }
.lbc-kit-icon { color: #c0120c; flex-shrink: 0; }
.lbc-kit-title { font-size: 0.93rem; font-weight: 700; color: #111827; }
.lbc-kit-sub   { font-size: 0.76rem; color: #6b7280; margin-top: 2px; }

.lbc-missing-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px;
  padding: 8px 12px; margin-bottom: 16px; font-size: 0.78rem;
}
.lbc-missing-title { font-weight: 600; color: #9a3412; }
.lbc-missing-chip {
  font-size: 0.71rem; font-weight: 500; padding: 2px 8px;
  background: #ffedd5; color: #c41d15; border-radius: 20px; border: 1px solid #fed7aa;
}
.lbc-complete-banner {
  display: flex; align-items: center; gap: 6px;
  background: #f7f7f8; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 8px 12px; margin-bottom: 16px;
  font-size: 0.8rem; font-weight: 600; color: #111111;
}

.lbc-steps { display: flex; flex-direction: column; }
.lbc-step {
  display: flex; gap: 14px; padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}
.lbc-step:last-child { border-bottom: none; }
.lbc-step-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: #f0f4ff; color: #c0120c;
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.lbc-step-body { flex: 1; min-width: 0; }
.lbc-step-title { font-size: 0.84rem; font-weight: 700; color: #111827; margin-bottom: 8px; }
.lbc-step-note  { font-size: 0.75rem; color: #6b7280; margin: 6px 0 0; line-height: 1.4; }
.lbc-step-warn  { font-size: 0.75rem; color: #9b1c1c; background: #fff5f5; border: 1px solid #fecaca; border-radius: 6px; padding: 7px 10px; margin: 4px 0 0; }
.lbc-step-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.lbc-copy-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #f9fafb; border: 1px solid #e5e7eb;
  border-radius: 7px; padding: 7px 10px; margin-bottom: 6px; font-size: 0.8rem;
}
.lbc-copy-row--miss { opacity: 0.8; }
.lbc-field-label { color: #6b7280; font-weight: 500; white-space: nowrap; min-width: 90px; }
.lbc-field-val { flex: 1; color: #111827; font-weight: 500; word-break: break-word; }
.lbc-missing-badge {
  font-size: 0.71rem; font-weight: 600; padding: 2px 8px;
  background: #fff7ed; color: #c41d15; border-radius: 20px; border: 1px solid #fed7aa;
}

.lbc-chars-grid { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.lbc-char-row {
  display: flex; gap: 8px; align-items: center; font-size: 0.8rem;
  padding: 5px 8px; border-radius: 6px; background: #f9fafb; border: 1px solid #e5e7eb;
}
.lbc-char-lbl { color: #6b7280; font-weight: 500; min-width: 120px; flex-shrink: 0; }
.lbc-char-val { color: #111827; font-weight: 500; }

.lbc-copy-btn {
  font-size: 0.75rem; font-weight: 600; padding: 5px 11px;
  border-radius: 7px; border: 1px solid #d1d5db;
  background: #fff; color: #374151; cursor: pointer;
  white-space: nowrap; text-decoration: none; display: inline-block;
  transition: background 120ms;
}
.lbc-copy-btn:hover { background: #f3f4f6; }
.lbc-copy-btn--block { display: block; width: 100%; text-align: center; margin-top: 6px; }
.lbc-copy-btn--primary { background: #c0120c; color: #fff; border-color: #c0120c; }
.lbc-copy-btn--primary:hover { background: #2f4ac7; }
.lbc-copy-btn--outline { background: #fff; color: #c0120c; border-color: #c5cff5; }
.lbc-copy-btn--outline:hover { background: #f0f2fc; }

.lbc-toggle-label { display: flex; align-items: center; gap: 6px; font-size: 0.77rem; color: #6b7280; cursor: pointer; margin-top: 6px; }
.lbc-toggle-chk { cursor: pointer; }

.lbc-desc-box {
  font-size: 0.78rem; line-height: 1.6; color: #374151;
  background: #f9fafb; border: 1px solid #e5e7eb;
  border-radius: 8px; padding: 12px 14px; margin-bottom: 8px;
  max-height: 200px; overflow-y: auto; word-break: break-word;
}

.lbc-photo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.lbc-photo-thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e7eb; }
.lbc-photo-caption { font-size: 0.78rem; color: #111111; display: flex; align-items: center; gap: 5px; }

.lbc-checklist { margin: 6px 0 10px 16px; padding: 0; }
.lbc-checklist li { font-size: 0.78rem; color: #374151; margin-bottom: 3px; }

.lbc-pub-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.lbc-pub-badge-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 0.78rem; font-weight: 600; color: #111111;
  background: #f7f7f8; border: 1px solid #e5e7eb;
  border-radius: 7px; padding: 6px 10px; margin-bottom: 8px;
}
.lbc-pub-badge-row a { color: #111111; }

.lbc-ext-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lbc-ext-input {
  flex: 1; min-width: 150px; font-size: 0.76rem; padding: 5px 9px;
  border: 1px solid #d1d5db; border-radius: 7px; outline: none; color: #374151;
}
.lbc-ext-input:focus { border-color: #c0120c; }
.lbc-mark-pub-btn {
  font-size: 0.75rem; font-weight: 600; padding: 5px 11px;
  border-radius: 7px; border: 1px solid #e5e7eb;
  background: #f7f7f8; color: #111111; cursor: pointer; white-space: nowrap;
}
.lbc-mark-pub-btn:hover { background: #f3f4f6; }

/* ═══════════════════════════════════════════════════════════
   TENANT INVITE SHELL
   ═══════════════════════════════════════════════════════════ */
.tenant-invite-shell {
  position: fixed; inset: 0; z-index: 9000;
  background: #f7f7f8;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}
.tenant-invite-shell.is-hidden { display: none; }

.ti-shell-inner { width: 100%; max-width: 440px; }

.ti-card {
  background: #fff; border-radius: 16px; padding: 36px 36px 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.09);
  display: flex; flex-direction: column; gap: 22px;
}

.ti-logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: #111;
}
.ti-logo-mark { width: 28px; height: 28px; display: flex; align-items: center; }
.ti-logo-mark img { width: 28px; height: 28px; object-fit: contain; }
.ti-logo strong { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }

.ti-header { display: flex; align-items: flex-start; gap: 14px; }
.ti-header h2 { font-size: 1.15rem; font-weight: 700; color: #111; margin: 0 0 4px; line-height: 1.3; }
.ti-header-sub { font-size: 0.85rem; color: #555; margin: 0; }

.ti-email-hint { font-size: 0.84rem; color: #666; margin: 0; }
.ti-email-hint strong { color: #111; }

.ti-form { display: flex; flex-direction: column; gap: 14px; }
.ti-field { display: flex; flex-direction: column; gap: 5px; }
.ti-field label { font-size: 0.82rem; font-weight: 600; color: #374151; }
.ti-field input {
  padding: 10px 12px; border: 1.5px solid #e5e7eb; border-radius: 8px;
  font-size: 0.92rem; outline: none; transition: border-color 0.15s;
}
.ti-field input:focus { border-color: #c0120c; }

.ti-error-msg {
  font-size: 0.82rem; color: #c0120c; font-weight: 500;
  background: #fff5f5; border: 1px solid #fecaca;
  border-radius: 6px; padding: 8px 10px; margin: 0;
}

.ti-submit {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
  border-radius: 10px;
  margin-top: 6px;
  min-height: 48px;
  background: var(--brand);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.15s;
}
.ti-submit:hover {
  background: var(--brand-hover);
}
.ti-submit:active {
  background: #7a0906;
}
.ti-submit:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

.ti-state-block {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; text-align: center; padding: 12px 0 8px;
}
.ti-state-block h2 { font-size: 1.2rem; font-weight: 700; color: #111; margin: 0; }
.ti-state-block p  { font-size: 0.88rem; color: #555; margin: 0; line-height: 1.5; max-width: 320px; }
.ti-state-block .primary-action { margin-top: 6px; }

.ti-home-link {
  font-size: 0.84rem; color: #c0120c; text-decoration: none;
  font-weight: 600; margin-top: 4px;
}
.ti-home-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   TENANT INVITE BLOCK (dans les cartes #tenants)
   ═══════════════════════════════════════════════════════════ */
.tpc-invite-block {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 7px 12px; border-radius: 8px; margin: 6px 0 2px;
  background: #f7f7f8; border: 1px solid #e5e7eb;
  font-size: 0.78rem; color: #666;
}
.tpc-invite-block svg { flex-shrink: 0; }
.tpc-invite-block span { flex: 1; min-width: 0; }

.tpc-invite-activated {
  background: #f3f4f6; border-color: #e5e7eb; color: #374151;
}
.tpc-invite-pending {
  background: #f7f7f8; border-color: #e5e7eb; color: #555;
}
.tpc-invite-expired {
  background: #fff5f5; border-color: #fecaca; color: #b91c1c;
}

.tpc-invite-btn {
  font-size: 0.74rem; font-weight: 600; padding: 3px 8px;
  border-radius: 6px; border: 1px solid #e5e7eb;
  background: #fff; color: #374151; cursor: pointer; white-space: nowrap;
}
.tpc-invite-btn:hover { background: #f3f4f6; }
.tpc-invite-btn-primary { background: #c0120c; color: #fff; border-color: #c0120c; }
.tpc-invite-btn-primary:hover { background: #c41d15; border-color: #c41d15; }
.tpc-invite-btn-danger { color: #c0120c; border-color: #fecaca; }
.tpc-invite-btn-danger:hover { background: #fff5f5; }

/* ═══════════════════════════════════════════════════════════
   TENANT INVITATION MODAL - updated layout
   ═══════════════════════════════════════════════════════════ */
.tim-invite-link-wrap { display: flex; flex-direction: column; gap: 6px; }
.tim-link-box {
  display: flex; align-items: center; gap: 8px;
  background: #f7f7f8; border: 1px solid #e5e7eb;
  border-radius: 8px; padding: 8px 10px;
}
.tim-link-val {
  flex: 1; min-width: 0; font-size: 0.78rem; color: #555;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: monospace;
}
.tim-expires-note { font-size: 0.78rem; color: #888; margin: 0; line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════
   ESPACE LOCATAIRE - design system tp-*
   ═══════════════════════════════════════════════════════════ */

/* ── Page wrapper ── */
.tp-page {
  max-width: 1100px; margin: 0 auto; padding: 0 0 40px;
}
.tp-page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
}
.tp-page-title {
  font-size: 1.45rem; font-weight: 800; color: #111; margin: 0 0 3px;
  letter-spacing: -0.02em; line-height: 1.2;
}
.tp-page-sub { font-size: 0.87rem; color: #777; margin: 0; }

/* ── Cards ── */
.tp-card {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 14px; padding: 20px 22px;
}
.tp-card-title {
  font-size: 0.88rem; font-weight: 700; color: #374151;
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: 0.03em;
  margin: 0 0 14px;
}

/* ── Buttons ── */
.tp-btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: #c0120c; color: #fff; border: none;
  border-radius: 8px; padding: 9px 18px;
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background 0.15s;
}
.tp-btn-primary:hover { background: #c41d15; }
.tp-btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: #374151;
  border: 1.5px solid #d1d5db; border-radius: 8px; padding: 8px 16px;
  font-size: 0.875rem; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: background 0.15s;
}
.tp-btn-ghost:hover { background: #f3f4f6; }
.tp-btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: #c0120c;
  border: 1.5px solid #fecaca; border-radius: 8px; padding: 8px 16px;
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
}
.tp-btn-danger:hover { background: #fff5f5; }
.tp-btn-sm { padding: 5px 11px; font-size: 0.78rem; }

/* ── Status badges ── */
.tp-status-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}
.tp-status-ok      { background: #dcfce7; color: #166534; }
.tp-status-warn    { background: #fff1f1; color: #b91c1c; }
.tp-status-danger  { background: #fee2e2; color: #991b1b; }
.tp-status-neutral { background: #f3f4f6; color: #374151; }
.tp-status-muted   { background: #f3f4f6; color: #9ca3af; }
.tp-notif-badge {
  background: #c0120c; color: #fff; border: none;
  border-radius: 20px; padding: 5px 14px;
  font-size: 0.8rem; font-weight: 700; cursor: pointer;
}

/* ── Dashboard grid ── */
.tp-dash-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-bottom: 28px;
}
@media (max-width: 900px) { .tp-dash-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tp-dash-grid { grid-template-columns: 1fr; } }

.tp-dash-card {
  background: #fff; border: 1.5px solid #e5e7eb;
  border-radius: 14px; padding: 18px 18px 14px;
  cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s;
  display: flex; flex-direction: column; gap: 5px;
}
.tp-dash-card:hover { border-color: #c0120c; box-shadow: 0 3px 12px rgba(192,18,12,.08); }
.tp-dash-card-label {
  font-size: 0.73rem; font-weight: 700; color: #888;
  text-transform: uppercase; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 5px;
}
.tp-dash-card-label svg { width: 13px; height: 13px; }
.tp-dash-card-val {
  font-size: 1rem; font-weight: 700; color: #111; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tp-dash-card-sub { font-size: 0.79rem; color: #777; line-height: 1.4; }

.tp-dash-section-title {
  font-size: 0.85rem; font-weight: 700; color: #374151;
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: 0.03em;
  margin: 0 0 10px;
}
.tp-dash-docs { display: flex; flex-direction: column; gap: 2px; }
.tp-dash-doc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px; background: #fafafa;
  border: 1px solid #f0f0f0; flex-wrap: wrap;
}
.tp-doc-type-tag {
  font-size: 0.72rem; background: #f3f4f6; color: #374151;
  border-radius: 5px; padding: 2px 8px; font-weight: 600; white-space: nowrap;
}
.tp-dash-doc-title { flex: 1; font-size: 0.85rem; color: #111; font-weight: 500; }
.tp-dash-doc-date  { font-size: 0.78rem; color: #888; white-space: nowrap; }

/* ── Info grid (housing, bail…) ── */
.tp-info-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px;
}
@media (max-width: 600px) { .tp-info-grid { grid-template-columns: 1fr; } }
.tp-info-item { display: flex; flex-direction: column; gap: 2px; }
.tp-info-label { font-size: 0.72rem; color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.tp-info-val   { font-size: 0.9rem; color: #111; font-weight: 500; }

/* ── Housing sections ── */
.tp-housing-sections { display: flex; flex-direction: column; gap: 16px; }
.tp-housing-section {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 18px 20px;
}
.tp-housing-section-title {
  font-size: 0.82rem; font-weight: 700; color: #374151;
  text-transform: uppercase; letter-spacing: 0.03em;
  display: flex; align-items: center; gap: 6px;
  margin: 0 0 14px;
}
.tp-housing-section-title svg { width: 14px; height: 14px; }

/* ── Rent page ── */
.tp-rent-summary {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: #fff; border: 1.5px solid #e5e7eb; border-radius: 12px;
  padding: 16px 20px; margin-bottom: 16px;
}
.tp-rent-summary-label { font-size: 0.8rem; color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.tp-rent-summary-amount { font-size: 1.5rem; font-weight: 800; color: #111; margin: 2px 0; }
.tp-rent-summary-meta   { font-size: 0.82rem; color: #666; }
.tp-rent-list { display: flex; flex-direction: column; gap: 8px; }
.tp-rent-row {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  display: flex; flex-direction: column; overflow: hidden;
}
.tp-rent-grid {
  display: grid;
  grid-template-columns: 160px 200px 210px 1fr;
  align-items: center;
  gap: 0 24px;
  padding: 18px 20px;
  min-height: 76px;
}
.tp-rent-col-period  { display: flex; flex-direction: column; gap: 3px; }
.tp-rent-col-amount  { display: flex; flex-direction: column; gap: 3px; }
.tp-rent-col-due     { display: flex; flex-direction: column; gap: 4px; }
.tp-rent-col-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.tp-rent-period-label,
.tp-rent-due-label { font-size: 0.7rem; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.tp-rent-period-month { font-size: 0.95rem; font-weight: 700; color: #111; }
.tp-rent-total  { font-size: 1.1rem; font-weight: 800; color: #111; }
.tp-rent-detail { font-size: 0.76rem; color: #6b7280; }
.tp-rent-due-date { font-size: 0.88rem; font-weight: 600; color: #111; }
@media (max-width: 860px) {
  .tp-rent-grid { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .tp-rent-col-actions { justify-content: flex-start; }
}
@media (max-width: 540px) {
  .tp-rent-grid { grid-template-columns: 1fr; row-gap: 10px; }
}

/* ── Documents ── */
.tp-doc-filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.tp-doc-search {
  flex: 1; min-width: 160px; max-width: 260px;
  padding: 8px 12px; border: 1.5px solid #e5e7eb;
  border-radius: 8px; font-size: 0.85rem; outline: none;
}
.tp-doc-search:focus { border-color: #c0120c; }
.tp-doc-filter-btn {
  padding: 6px 14px; font-size: 0.78rem; font-weight: 600;
  border: 1.5px solid #e5e7eb; border-radius: 20px;
  background: #fff; color: #374151; cursor: pointer; transition: all 0.12s;
}
.tp-doc-filter-btn:hover { background: #f3f4f6; }
.tp-doc-filter-btn.active { background: #c0120c; color: #fff; border-color: #c0120c; }

.tp-doc-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.tp-doc-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 6px;
}
.tp-doc-card-type {
  font-size: 0.72rem; font-weight: 700; color: #888;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.tp-doc-card-title    { font-size: 0.88rem; font-weight: 600; color: #111; line-height: 1.3; }
.tp-doc-card-filename { font-size: 0.77rem; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-doc-card-date     { font-size: 0.78rem; color: #888; }
.tp-doc-card-actions  { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Documents - category folder navigation ── */
.tdd-total-count { font-size: 0.84rem; font-weight: 600; color: #6b7280; white-space: nowrap; align-self: center; }
.tdd-search-bar  { margin-bottom: 18px; }
.tdd-search-full { width: 100%; max-width: 100%; box-sizing: border-box; }
.tdd-no-results  { font-size: 0.84rem; color: #9ca3af; text-align: center; padding: 24px 0; margin: 0; }
.tdd-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .tdd-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .tdd-cat-grid { grid-template-columns: 1fr; } }
.tdd-cat-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: 18px 20px; display: flex; flex-direction: column; gap: 8px;
  cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s;
}
.tdd-cat-card:hover { box-shadow: 0 2px 14px rgba(0,0,0,0.08); border-color: #d1d5db; }
.tdd-cat-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tdd-cat-icon {
  width: 40px; height: 40px; background: #fff1f1; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; color: #c0120c; flex-shrink: 0;
}
.tdd-cat-badge {
  font-size: 0.73rem; font-weight: 700; color: #6b7280;
  background: #f3f4f6; border-radius: 12px; padding: 2px 8px;
}
.tdd-cat-title  { font-size: 0.92rem; font-weight: 700; color: #111; }
.tdd-cat-desc   { font-size: 0.79rem; color: #6b7280; line-height: 1.45; flex: 1; }
.tdd-cat-foot   { margin-top: 2px; }
.tdd-cat-count  { font-size: 0.78rem; font-weight: 600; color: #374151; }
.tdd-cat-last   { font-size: 0.72rem; color: #9ca3af; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tdd-cat-btn    { margin-top: 6px; width: 100%; justify-content: center; }
.tdd-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #c0120c; border: 1.5px solid #c0120c; border-radius: 8px;
  padding: 7px 16px; font-size: 0.82rem; font-weight: 700; color: #fff;
  cursor: pointer; white-space: nowrap; transition: background 150ms, border-color 150ms; flex-shrink: 0;
}
.tdd-back-btn:hover { background: #a00f09; border-color: #a00f09; color: #fff; }
.tdd-back-btn:active { transform: translateY(1px); }
.tdd-doc-list { display: flex; flex-direction: column; gap: 8px; }
.tdd-doc-item {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 12px 16px; display: flex; justify-content: space-between;
  align-items: center; gap: 16px;
}
.tdd-doc-item-main  { flex: 1; min-width: 0; }
.tdd-doc-item-title { font-size: 0.88rem; font-weight: 600; color: #111; }
.tdd-doc-item-meta  { font-size: 0.75rem; color: #6b7280; margin-top: 2px; }
.tdd-doc-item-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.tdd-doc-item-actions { display: flex; gap: 6px; }
@media (max-width: 580px) {
  .tdd-doc-item { flex-direction: column; align-items: flex-start; gap: 10px; }
  .tdd-doc-item-right { justify-content: flex-start; }
}

/* ── Documents - sections layout (kept for compat) ── */
.tdd-toolbar {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 20px;
}
.tdd-filter-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.tdd-filter-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; font-size: 0.78rem; font-weight: 600;
  border: 1.5px solid #e5e7eb; border-radius: 20px;
  background: #fff; color: #374151; cursor: pointer;
  white-space: nowrap; transition: all 0.12s;
}
.tdd-filter-btn:hover { background: #f3f4f6; }
.tdd-filter-btn.active { background: #c0120c; color: #fff; border-color: #c0120c; }
.tdd-filter-btn.active .tdd-filter-count { background: rgba(255,255,255,0.25); color: #fff; }
.tdd-filter-count {
  display: inline-block; padding: 1px 6px; border-radius: 10px;
  background: #f3f4f6; color: #6b7280; font-size: 0.72rem; font-weight: 700;
}
.tdd-sections { display: flex; flex-direction: column; gap: 16px; }
.tdd-section {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: 16px 18px;
}
.tdd-section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.tdd-section-title { font-size: 0.9rem; font-weight: 700; color: #111; }
.tdd-section-count {
  padding: 2px 8px; border-radius: 10px;
  background: #f3f4f6; color: #6b7280; font-size: 0.75rem; font-weight: 600;
}
.tdd-section-empty { font-size: 0.84rem; color: #9ca3af; margin: 0; }

/* ── Tenant Maintenance rewrite ── */
.tm-kpi-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 600px) { .tm-kpi-row { grid-template-columns: 1fr; } }
.tm-kpi-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; }
.tm-kpi-label { font-size: 0.72rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.tm-kpi-val { font-size: 1.1rem; font-weight: 700; color: #111; line-height: 1.2; }
.tm-kpi-val.tm-kpi-muted { font-size: 0.88rem; font-weight: 500; color: #9ca3af; }
.tm-kpi-sub { font-size: 0.75rem; color: #6b7280; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tm-tab-bar { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.tm-tab-btn {
  padding: 5px 13px; font-size: 0.78rem; font-weight: 600;
  border: 1.5px solid #e5e7eb; border-radius: 20px;
  background: #fff; color: #374151; cursor: pointer; white-space: nowrap; transition: all 0.12s;
}
.tm-tab-btn:hover { background: #f3f4f6; }
.tm-tab-btn.active { background: #c0120c; color: #fff; border-color: #c0120c; }
.tm-tab-count { font-size: 0.7rem; font-weight: 700; opacity: 0.82; }
.tm-search {
  padding: 8px 12px; border: 1.5px solid #e5e7eb; border-radius: 8px;
  font-size: 0.85rem; outline: none; min-width: 180px; max-width: 240px;
}
.tm-search:focus { border-color: #c0120c; }
.tm-ticket-list { display: flex; flex-direction: column; gap: 10px; }
.tm-ticket-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; }
.tm-ticket-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.tm-ticket-main  { flex: 1; min-width: 0; }
.tm-ticket-title { font-size: 0.9rem; font-weight: 700; color: #111; margin-bottom: 3px; }
.tm-ticket-meta  { font-size: 0.78rem; color: #6b7280; }
.tm-ticket-desc  { font-size: 0.83rem; color: #555; margin: 6px 0; line-height: 1.4; }
.tm-ticket-info  { font-size: 0.8rem; color: #374151; margin: 4px 0; }
.tm-ticket-update{ font-size: 0.73rem; color: #9ca3af; margin-top: 6px; }
.tm-ticket-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tm-btn-cancel { color: #c0120c !important; border-color: #fca5a5 !important; }
.tm-btn-cancel:hover { background: #fff1f1 !important; }
.tm-btn-delete { color: #9ca3af !important; }
.tm-status-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.tm-s-new       { background: #f3f4f6; color: #374151; }
.tm-s-review    { background: #fff1f1; color: #c0120c; }
.tm-s-planned   { background: #fff1f1; color: #c41d15; }
.tm-s-active    { background: #1f2937; color: #fff; }
.tm-s-done      { background: #f3f4f6; color: #6b7280; }
.tm-s-cancelled { background: #fff; border: 1px solid #c0120c; color: #c0120c; }
.tm-empty-state { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 40px 24px; text-align: center; }
.tm-empty-title { font-size: 1rem; font-weight: 700; color: #111; margin-bottom: 8px; }
.tm-empty-text  { font-size: 0.85rem; color: #6b7280; margin: 0 0 18px; line-height: 1.5; }
.tm-no-results  { font-size: 0.84rem; color: #9ca3af; text-align: center; padding: 24px 0; margin: 0; }
.tm-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 16px;
}
.tm-modal {
  background: #fff; border-radius: 16px; width: 100%; max-width: 540px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.tm-modal-detail { max-width: 620px; }
.tm-modal-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 20px 22px 14px; border-bottom: 1px solid #f3f4f6; gap: 12px;
}
.tm-modal-title  { font-size: 1rem; font-weight: 700; color: #111; margin: 0 0 6px; }
.tm-modal-close  { background: none; border: none; cursor: pointer; color: #9ca3af; font-size: 1rem; padding: 4px 6px; line-height: 1; border-radius: 6px; }
.tm-modal-close:hover { background: #f3f4f6; color: #111; }
.tm-modal-body   { flex: 1; overflow-y: auto; padding: 18px 22px; }
.tm-modal-footer { padding: 14px 22px 20px; border-top: 1px solid #f3f4f6; display: flex; justify-content: flex-end; gap: 8px; }
.tm-detail-grid  { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px 16px; margin-bottom: 20px; }
.tm-detail-field { display: flex; flex-direction: column; gap: 3px; }
.tm-detail-full  { grid-column: 1 / -1; }
.tm-detail-label { font-size: 0.72rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.03em; }
.tm-detail-val   { font-size: 0.85rem; color: #111; line-height: 1.4; }
.tm-timeline     { border-top: 1px solid #f3f4f6; padding-top: 16px; }
.tm-timeline-title { font-size: 0.72rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; }
.tm-timeline-step { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; opacity: 0.38; }
.tm-timeline-step.done { opacity: 1; }
.tm-timeline-dot { width: 10px; height: 10px; border-radius: 50%; background: #e5e7eb; flex-shrink: 0; margin-top: 3px; }
.tm-timeline-step.done .tm-timeline-dot { background: #c0120c; }
.tm-timeline-content { display: flex; flex-direction: column; gap: 1px; }
.tm-timeline-label { font-size: 0.83rem; font-weight: 600; color: #111; }
.tm-timeline-date  { font-size: 0.73rem; color: #9ca3af; }

/* ── Tenant ticket detail modal (enrichi) ── */
.tm-modal-lg { max-width: 700px; }
.tm-modal-footer-wrap { flex-wrap: wrap; justify-content: flex-start; }
.tm-detail-section { margin-bottom: 18px; }
.tm-detail-section-title {
  font-size: 0.72rem; font-weight: 700; color: #9ca3af;
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px;
}
.tm-detail-desc-box {
  font-size: 0.85rem; color: #374151; line-height: 1.6;
  background: #f9fafb; border: 1px solid #e5e7eb;
  border-radius: 8px; padding: 10px 12px;
}
.tm-detail-comment { border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.tm-comment-owner  { background: #f9fafb; border: 1px solid #e5e7eb; }
.tm-comment-tenant { background: #fff8f8; border: 1px solid #fde8e8; }
.tm-comment-label  { font-size: 0.7rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 3px; }
.tm-comment-text   { font-size: 0.85rem; color: #374151; line-height: 1.5; }
.tm-detail-terminated-banner {
  display: flex; align-items: center; gap: 8px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px;
  padding: 10px 14px; font-size: 0.83rem; color: #166534;
  font-weight: 600; margin-bottom: 14px;
}
.tm-source-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.tm-src-tenant { background: #fff1f1; color: #c0120c; }
.tm-src-owner  { background: #f1f5f9; color: #475569; }
.tm-priority-badge { display: inline-block; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.tm-p-urgent { background: #fff0f0; color: #c0120c; border: 1px solid #fecaca; }
.tm-p-high   { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
/* Inline action form */
.tkd-inline-form {
  background: #f9fafb; border: 1.5px solid #e5e7eb;
  border-radius: 10px; padding: 14px 16px; margin-top: 14px;
}
.tkd-inline-form-title { font-size: 0.88rem; font-weight: 700; color: #111; margin-bottom: 10px; }
.tkd-inline-label      { display: block; font-size: 0.8rem; font-weight: 600; color: #374151; margin-bottom: 5px; }
.tkd-inline-textarea   { width: 100%; min-height: 80px; resize: vertical; }
.tkd-inline-actions    { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ── Tenant ticket detail modal — rich sections ── */
.tkd-section { margin-bottom: 18px; }
.tkd-section:last-child { margin-bottom: 0; }
.tkd-section-title {
  font-size: 0.72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #9ca3af; margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid #f3f4f6;
}
.tkd-info-grid { display: flex; flex-direction: column; gap: 6px; }
.tkd-info-row  { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tkd-info-label {
  font-size: 0.78rem; color: #9ca3af; font-weight: 500;
  min-width: 140px; flex-shrink: 0;
}
.tkd-info-val { font-size: 0.85rem; color: #111; font-weight: 500; }
.tkd-info-val-strong { font-weight: 700; color: #111; }
.tkd-info-val-ok      { color: #16a34a; font-weight: 600; }
.tkd-info-val-required{ color: #c0120c; font-weight: 600; }
.tkd-text-box {
  font-size: 0.85rem; color: #374151; line-height: 1.6;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 12px 14px;
}
.tkd-empty-note { font-size: 0.82rem; color: #9ca3af; font-style: italic; margin: 0; }
/* Comment blocks */
.tkd-comment-block {
  border-radius: 10px; padding: 10px 14px; font-size: 0.83rem; line-height: 1.6;
  margin-bottom: 8px; border-left: 3px solid transparent;
}
.tkd-comment-block:last-child { margin-bottom: 0; }
.tkd-comment-lbl  { font-size: 0.72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 4px; }
.tkd-comment-txt  { color: #374151; }
.tkd-cb-owner   { background: #f0f4ff; border-color: #6b7cf6; }
.tkd-cb-owner   .tkd-comment-lbl { color: #4338ca; }
.tkd-cb-tenant  { background: #f0fdf4; border-color: #22c55e; }
.tkd-cb-tenant  .tkd-comment-lbl { color: #16a34a; }
.tkd-cb-neutral { background: #f9fafb; border-color: #d1d5db; }
.tkd-cb-neutral .tkd-comment-lbl { color: #6b7280; }
.tkd-cb-alert   { background: #fff8f8; border-color: #fca5a5; }
.tkd-cb-alert   .tkd-comment-lbl { color: #c0120c; }
/* Badges */
.tkd-prop-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600; color: #374151;
  background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 20px; padding: 2px 10px;
}
.tkd-cat-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600; color: #6b7280;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 20px; padding: 2px 9px;
}
/* Links inside modal */
.tkd-link { color: #c0120c; text-decoration: none; }
.tkd-link:hover { text-decoration: underline; }
/* Photos grid */
.tkd-photos-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.tkd-photo-thumb {
  width: 80px; height: 80px; object-fit: cover; border-radius: 8px;
  border: 1.5px solid #e5e7eb; cursor: pointer;
  transition: transform 0.15s; flex-shrink: 0;
}
.tkd-photo-thumb:hover { transform: scale(1.06); }
/* Photo upload inline */
.tkd-photo-upload-btn {
  display: inline-block; padding: 9px 16px; background: #f3f4f6; border: 1.5px dashed #d1d5db;
  border-radius: 10px; font-size: 0.83rem; color: #374151; cursor: pointer; margin-bottom: 10px;
  transition: background 0.15s, border-color 0.15s;
}
.tkd-photo-upload-btn:hover { background: #e9eaec; border-color: #9ca3af; }
.tkd-photo-preview { width: 100%; max-height: 220px; object-fit: contain; border-radius: 10px; border: 1px solid #e5e7eb; margin-bottom: 10px; display: block; }
/* Warn button variant */
.tkd-btn-warn { color: #c0120c !important; border-color: #fecaca !important; }
.tkd-btn-warn:hover { background: #fff8f8 !important; }
/* Footer wrap */
.tm-modal-footer-wrap { flex-wrap: wrap; gap: 8px; }

/* Calendar dots cliquables */
.tcal-m-dot-link { cursor: pointer; }
.tcal-m-dot-link:hover { opacity: 0.8; }

/* ── Maintenance (legacy inline form) ── */
.tp-new-ticket-form {
  background: #fafafa; border: 1.5px solid #e5e7eb;
  border-radius: 14px; padding: 18px 20px; margin-bottom: 16px;
}
.tp-form-title { font-size: 0.95rem; font-weight: 700; color: #111; margin: 0 0 14px; }
.tp-form-grid  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 16px; }
.tp-form-full  { grid-column: 1 / -1; }
@media (max-width: 600px) { .tp-form-grid { grid-template-columns: 1fr; } }
.tp-form-field { display: flex; flex-direction: column; gap: 4px; }
.tp-form-field label { font-size: 0.8rem; font-weight: 600; color: #374151; }
.tp-input {
  padding: 9px 11px; border: 1.5px solid #e5e7eb; border-radius: 8px;
  font-size: 0.88rem; color: #111; background: #fff; outline: none;
  transition: border-color 0.15s; width: 100%; box-sizing: border-box;
}
.tp-input:focus { border-color: #c0120c; }
.tp-select {
  padding: 9px 11px; border: 1.5px solid #e5e7eb; border-radius: 8px;
  font-size: 0.88rem; color: #111; background: #fff; outline: none;
  cursor: pointer; width: 100%; box-sizing: border-box;
}
.tp-select:focus { border-color: #c0120c; }
.tp-textarea {
  padding: 9px 11px; border: 1.5px solid #e5e7eb; border-radius: 8px;
  font-size: 0.88rem; color: #111; background: #fff; outline: none;
  resize: vertical; width: 100%; box-sizing: border-box;
  font-family: inherit; transition: border-color 0.15s;
}
.tp-textarea:focus { border-color: #c0120c; }
.tp-action-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.tp-maintenance-list { display: flex; flex-direction: column; gap: 10px; }
.tp-ticket-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px 16px;
}
.tp-ticket-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 6px;
}
.tp-ticket-title { font-size: 0.9rem; font-weight: 700; color: #111; }
.tp-ticket-meta  { font-size: 0.78rem; color: #777; margin-bottom: 4px; }
.tp-ticket-desc  { font-size: 0.83rem; color: #555; margin: 4px 0; line-height: 1.4; }
.tp-ticket-info  { font-size: 0.82rem; color: #555; margin: 3px 0; }
.tp-ticket-planned { font-size: 0.82rem; color: #374151; font-weight: 500; margin: 4px 0; }

/* ── Insurance ── */
.tp-insurance-status-card { margin-bottom: 0; }
.tp-insurance-status-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.tp-insurance-missing { display: flex; flex-direction: column; gap: 8px; }

/* ── Tenant Calendar ── */
.tcal-kpi-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px;
}
@media (max-width: 600px) { .tcal-kpi-row { grid-template-columns: 1fr; } }
.tcal-kpi-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px;
}
.tcal-kpi-label { font-size: 0.75rem; color: #888; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.tcal-kpi-val   { font-size: 1.5rem; font-weight: 700; color: #111; line-height: 1.1; }
.tcal-kpi-sub   { font-size: 0.78rem; color: #888; margin-top: 3px; }

.tcal-toolbar   { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 14px; }
.tcal-counter   { font-size: 0.82rem; color: #555; font-weight: 500; background: #f3f4f6; padding: 3px 10px; border-radius: 20px; }

.tcal-view-toggle { display: flex; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.tcal-view-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; font-size: 0.82rem; font-weight: 500; color: #555;
  background: #fff; border: none; cursor: pointer; transition: background .12s, color .12s; font-family: inherit;
}
.tcal-view-btn + .tcal-view-btn { border-left: 1px solid #e5e7eb; }
.tcal-view-btn.active  { background: #111; color: #fff; }
.tcal-view-btn:hover:not(.active) { background: #f9fafb; color: #111; }

.tcal-content { display: flex; flex-direction: column; gap: 0; }

/* Group labels */
.tcal-group       { margin-bottom: 20px; }
.tcal-group-label {
  font-size: 0.72rem; font-weight: 700; color: #888; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 4px 0 8px; border-bottom: 1px solid #f0f0f0; margin-bottom: 10px;
}

/* Event card */
.tcal-event-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 8px; cursor: pointer;
  transition: border-color .14s, box-shadow .14s;
}
.tcal-event-card:hover { border-color: #c0120c; box-shadow: 0 2px 8px rgba(192,18,12,.06); }
.tcal-ev-left    { min-width: 72px; text-align: center; border-right: 1px solid #f0f0f0; padding-right: 12px; margin-right: 2px; flex-shrink: 0; }
.tcal-ev-date    { font-size: 0.82rem; font-weight: 600; color: #111; line-height: 1.3; }
.tcal-ev-time    { font-size: 0.76rem; color: #888; margin-top: 3px; }
.tcal-ev-body    { flex: 1; min-width: 0; }
.tcal-ev-title   { font-size: 0.9rem; font-weight: 600; color: #111; margin-bottom: 5px; }
.tcal-ev-meta    { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 5px; }
.tcal-ev-desc    { font-size: 0.82rem; color: #555; line-height: 1.4; }
.tcal-ev-loc     { display: flex; align-items: center; gap: 4px; font-size: 0.78rem; color: #888; margin-top: 4px; }
.tcal-ev-company { font-size: 0.82rem; color: #555; margin-top: 4px; }
.tcal-ev-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; padding-left: 8px; }

/* Type & status badges */
.tcal-type-badge {
  display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 600;
  background: #f3f4f6; color: #374151;
}
.tcal-badge         { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; }
.tcal-badge-planned   { background: #f3f4f6; color: #374151; }
.tcal-badge-confirmed { background: #111; color: #fff; }
.tcal-badge-progress  { background: #c0120c; color: #fff; }
.tcal-badge-done      { background: #d1d5db; color: #374151; }
.tcal-badge-cancelled { background: #fee2e2; color: #b91c1c; }

/* Empty state */
.tcal-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 48px 24px; text-align: center; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
}
.tcal-empty-title { font-size: 1rem; font-weight: 600; color: #111; }
.tcal-empty-sub   { font-size: 0.85rem; color: #888; line-height: 1.5; max-width: 320px; }

/* Month view */
.tcal-month-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 12px; margin-bottom: 4px;
}
.tcal-month-label { font-size: 1rem; font-weight: 600; color: #111; }
.tcal-month-grid  {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; background: #f0f0f0; border-radius: 10px; overflow: hidden;
}
.tcal-m-hdr {
  background: #f9fafb; padding: 6px 0; text-align: center; font-size: 0.7rem;
  font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.05em;
}
.tcal-m-cell {
  background: #fff; min-height: 72px; padding: 6px; cursor: pointer; transition: background .12s;
}
.tcal-m-cell:hover { background: #fafafa; }
.tcal-m-empty { background: #fafafa; cursor: default; }
.tcal-m-today .tcal-m-daynum { background: #c0120c; color: #fff; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.tcal-m-daynum { font-size: 0.8rem; color: #374151; font-weight: 500; margin-bottom: 4px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.tcal-m-dot    { background: #c0120c; border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; cursor: pointer; }
.tcal-m-dot-label { font-size: 0.65rem; color: #fff; font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tcal-m-more   { font-size: 0.65rem; color: #888; margin-top: 2px; }

/* Day detail panel */
.tcal-day-detail { margin-top: 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; }
.tcal-day-detail-title { font-size: 0.88rem; font-weight: 600; color: #111; margin-bottom: 10px; text-transform: capitalize; }
.tcal-day-evt {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 0; border-bottom: 1px solid #f0f0f0;
}
.tcal-day-evt:last-child { border-bottom: none; }
.tcal-day-evt-title { font-size: 0.85rem; font-weight: 500; color: #111; flex: 1; min-width: 0; }
.tcal-day-evt-time  { font-size: 0.78rem; color: #888; flex-shrink: 0; }

/* Detail modal */
.tcal-modal-row  { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: #374151; }
.tcal-modal-desc { font-size: 0.85rem; color: #555; line-height: 1.5; padding: 10px 12px; background: #f9fafb; border-radius: 8px; }
.tcal-modal-notes { padding: 10px 12px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; }
.tcal-modal-notes-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #92400e; margin-bottom: 4px; }
.tcal-modal-notes-body  { font-size: 0.84rem; color: #374151; line-height: 1.5; }

/* ── Generic modal overlay (calendar event detail) ──────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  z-index: 9000; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-box {
  background: #fff; border-radius: 18px;
  width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.18);
  display: flex; flex-direction: column;
}
.modal-title { font-size: 1.05rem; font-weight: 700; color: #111; margin: 0; }
.modal-close {
  background: none; border: none; font-size: 1.3rem; cursor: pointer;
  color: #9ca3af; padding: 4px 8px; line-height: 1; border-radius: 6px;
  transition: background 0.15s, color 0.15s; flex-shrink: 0;
}
.modal-close:hover { background: #f3f4f6; color: #374151; }
.modal-body {
  padding: 16px 20px; flex: 1;
  display: flex; flex-direction: column; gap: 12px;
}
.modal-footer {
  padding: 14px 20px; border-top: 1px solid #f0f0f0;
  display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
}
/* Tenant clickable intervention card */
.cal-det-card[data-tenant-view-ticket] { cursor: pointer; }
.cal-det-card[data-tenant-view-ticket]:hover { border-color: #c0120c22; box-shadow: 0 2px 14px rgba(192,18,12,0.09); }

/* ── Intervention detail cards (Calendar / Tenant-calendar) ────────────────── */

/* Section container */
.cal-det-section { margin-top: 28px; }

.cal-det-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}
.cal-det-title { font-size: 1.05rem; font-weight: 700; color: #111; margin: 0; }
.cal-det-clear-btn {
  font-size: 0.82rem; font-weight: 500; color: #c0120c;
  background: none; border: 1px solid transparent; border-radius: 6px;
  cursor: pointer; padding: 4px 10px; white-space: nowrap; transition: background 0.12s;
}
.cal-det-clear-btn:hover { background: #fff1f1; border-color: #fecaca; }

/* Filter pill bar */
.cal-det-filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.cal-det-filter-btn {
  padding: 5px 14px; font-size: 0.82rem; font-weight: 500;
  background: #f3f4f6; color: #374151;
  border: 1px solid transparent; border-radius: 20px;
  cursor: pointer; transition: all 0.12s;
}
.cal-det-filter-btn:hover { background: #e5e7eb; }
.cal-det-filter-btn.active { background: #111; color: #fff; border-color: #111; }

/* List + empty */
.cal-det-list { display: flex; flex-direction: column; gap: 8px; }
.cal-day-events-wrap { margin-bottom: 4px; }
.cal-day-section-lbl {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: #9ca3af; margin: 0 0 8px; padding: 0;
}
.cal-det-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 44px 20px; color: #9ca3af; text-align: center;
}
.cal-det-empty p { margin: 0; font-size: 0.9rem; }

/* Card */
.cal-det-card {
  display: flex; align-items: stretch;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  overflow: hidden; min-height: 72px;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.cal-det-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,.07); border-color: #d1d5db; }

/* Left color strip */
.cal-det-card-strip { width: 4px; flex-shrink: 0; }

/* Date / category column */
.cal-det-card-left {
  width: 160px; flex-shrink: 0;
  padding: 14px 16px;
  border-right: 1px solid #f3f4f6;
  display: flex; flex-direction: column; justify-content: center; gap: 3px;
}
.cal-det-card-cat {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: #6b7280;
}
.cal-det-card-date { font-size: 0.88rem; font-weight: 600; color: #111; line-height: 1.3; }
.cal-det-card-time { font-size: 0.77rem; color: #6b7280; }
.cal-det-date-muted { color: #9ca3af !important; font-weight: 400 !important; font-style: italic; }

/* Main body */
.cal-det-card-body {
  flex: 1; padding: 12px 16px; min-width: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
}
.cal-det-card-title {
  font-size: 0.95rem; font-weight: 600; color: #111;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-det-card-badges { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.cal-det-card-company {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.78rem; color: #6b7280;
}
.cal-det-card-desc { font-size: 0.78rem; color: #9ca3af; line-height: 1.4; }

/* Actions column */
.cal-det-card-actions {
  display: flex; flex-direction: column; justify-content: center;
  gap: 6px; padding: 12px 14px; flex-shrink: 0;
  border-left: 1px solid #f3f4f6; min-width: 128px;
}
.cal-det-action-btn {
  padding: 5px 12px; font-size: 0.8rem; font-weight: 500;
  background: #fff; border: 1.5px solid #d1d5db; color: #374151;
  border-radius: 6px; cursor: pointer; white-space: nowrap;
  transition: all 0.12s; text-align: center; display: block; width: 100%;
}
.cal-det-action-btn:hover { border-color: #9ca3af; background: #f9fafb; }
.cal-det-action-plan { border-color: #c0120c; color: #c0120c; }
.cal-det-action-plan:hover { background: #fff1f1; border-color: #c41d15; }
.cal-det-action-cancel { border-color: #d97706; color: #92400e; }
.cal-det-action-cancel:hover { background: #fffbeb; border-color: #d97706; }
.cal-det-action-del { border-color: #fca5a5; color: #b91c1c; }
.cal-det-action-del:hover { background: #fef2f2; border-color: #f87171; }

/* Selected day - owner calendar */
.cal-day-selected {
  background: #fef2f2 !important;
  outline: 2px solid #c0120c;
  outline-offset: -2px;
}
.cal-day-selected .cal-day-num { color: #c0120c; font-weight: 700; }

/* Selected day - tenant calendar */
.tcal-m-selected { background: #fef2f2 !important; outline: 2px solid #c0120c; outline-offset: -1px; }
.tcal-m-selected .tcal-m-daynum { color: #c0120c !important; font-weight: 700 !important; }

/* Responsive: stack card on narrow screens */
@media (max-width: 640px) {
  .cal-det-card { flex-wrap: wrap; }
  .cal-det-card-left {
    width: 100%; border-right: none; border-bottom: 1px solid #f3f4f6;
    flex-direction: row; gap: 14px; align-items: center;
  }
  .cal-det-card-actions {
    width: 100%; border-left: none; border-top: 1px solid #f3f4f6;
    flex-direction: row; justify-content: flex-end;
    min-width: unset;
  }
  .cal-det-action-btn { width: auto; }
}

/* Ticket card: planned info */
.tm-ticket-planned {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.82rem; color: #374151; font-weight: 500; margin: 4px 0;
  padding: 5px 10px; background: #f0fdf4; border: 1px solid #86efac; border-radius: 6px;
}

/* ── Insurance redesign badges & cards ── */
.ins-badge {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap;
}
.ins-badge-ins-ok       { background: #f3f4f6; color: #111111; }
.ins-badge-ins-pending  { background: #fff1f1; color: #b91c1c; }
.ins-badge-ins-expiring { background: #fff1f1; color: #b91c1c; }
.ins-badge-ins-expired  { background: #fee2e2; color: #b91c1c; }
.ins-badge-ins-refused  { background: #fee2e2; color: #b91c1c; }
.ins-badge-ins-none     { background: #f3f4f6; color: #6b7280; }

/* Status card (Bloc 1) */
.ins-status-card {
  border-radius: 12px; padding: 18px 20px;
  border: 1.5px solid #e5e7eb; background: #fff; margin-bottom: 0;
}
.ins-status-card.ins-sc-ins-ok      { border-color: #e5e7eb; background: #f9fafb; }
.ins-status-card.ins-sc-ins-pending { border-color: rgba(229,57,53,0.35); background: #fff1f1; }
.ins-status-card.ins-sc-ins-expiring{ border-color: rgba(229,57,53,0.35); background: #fff1f1; }
.ins-status-card.ins-sc-ins-expired { border-color: #fca5a5; background: #fef2f2; }
.ins-status-card.ins-sc-ins-refused { border-color: #fca5a5; background: #fef2f2; }
.ins-status-card.ins-sc-ins-none    { border-color: #e5e7eb; background: #f9fafb; }
.ins-sc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ins-sc-left   { display: flex; align-items: center; gap: 10px; }
.ins-sc-title  { font-size: 0.9rem; font-weight: 600; color: #111; margin-bottom: 4px; }
.ins-sc-desc   { font-size: 0.84rem; color: #555; line-height: 1.5; margin: 10px 0 0; }
.ins-sc-expiry { text-align: right; font-size: 0.82rem; color: #555; }
.ins-sc-expiry strong { color: #111; }
.ins-sc-date   { font-size: 0.78rem; color: #888; margin-top: 2px; }
.ins-refusal-box {
  display: flex; align-items: flex-start; gap: 6px; margin-top: 10px;
  padding: 8px 12px; background: #fff0f0; border: 1px solid #fca5a5; border-radius: 8px;
  font-size: 0.82rem; color: #b91c1c; line-height: 1.4;
}
.ins-refusal-box svg { flex-shrink: 0; margin-top: 1px; }

/* Attestation card (Bloc 2) */
.ins-doc-card { margin-top: 16px !important; }
.ins-doc-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ins-doc-header-title { display: flex; align-items: center; gap: 6px; font-size: 0.95rem; font-weight: 600; color: #111; }
.ins-doc-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ins-expired-val { color: #b91c1c; font-weight: 500; }
.ins-no-file     { color: #9ca3af; font-size: 0.8rem; }

/* Tenant Settings - Privacy & Session cards */
.ts-privacy-actions { display: flex; flex-direction: column; gap: 0; }
.ts-privacy-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #f3f4f6; flex-wrap: wrap; }
.ts-privacy-item:last-child { border-bottom: none; padding-bottom: 0; }
.ts-privacy-item-body { flex: 1; min-width: 0; }
.ts-privacy-item-title { font-size: 0.88rem; font-weight: 600; color: #111; margin-bottom: 4px; }
.ts-privacy-item-desc { font-size: 0.8rem; color: #6b7280; margin: 0; line-height: 1.5; }
.ts-btn-danger { color: #b91c1c !important; border-color: #fecaca !important; }
.ts-btn-danger:hover { background: #fff1f1 !important; }
/* Sidebar nav separator */
.sb-nav-sep { height: 1px; background: rgba(255,255,255,0.07); margin: 6px 12px; }

/* Dashboard financial summary */
.tp-dash-finance { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; }
.tp-dash-finance-title { font-size: 0.78rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.tp-dash-finance-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 480px) { .tp-dash-finance-grid { grid-template-columns: repeat(4, 1fr); } }
.tp-dash-finance-item { display: flex; flex-direction: column; gap: 2px; }
.tp-dash-finance-label { font-size: 0.72rem; color: #9ca3af; }
.tp-dash-finance-val { font-size: 1rem; font-weight: 700; color: #111; }

.ts-session-actions { display: flex; flex-direction: column; gap: 0; }
.ts-session-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid #f3f4f6; flex-wrap: wrap; }
.ts-session-item:last-child { border-bottom: none; padding-bottom: 0; }
.ts-session-item-body { flex: 1; min-width: 0; }
.ts-session-item-title { font-size: 0.88rem; font-weight: 600; color: #111; margin-bottom: 4px; }
.ts-session-item-desc { font-size: 0.8rem; color: #6b7280; margin: 0; line-height: 1.5; }

/* Replace CTA (Bloc 2.5) */
.ins-replace-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 16px 20px; margin-top: 16px;
}
.ins-replace-cta-body { flex: 1; min-width: 0; }
.ins-replace-cta-title { font-size: 0.95rem; font-weight: 600; color: #111; margin-bottom: 4px; }
.ins-replace-cta-text { font-size: 0.82rem; color: #6b7280; margin: 0; }
.ins-replace-cta-btn {
  flex-shrink: 0; background: #b51818; color: #fff; border: none;
  border-radius: 8px; padding: 9px 18px; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.ins-replace-cta-btn:hover { background: #b91c1c; }

/* Insurance status row in tenant cards (#tenants) */
.tpc-ins-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 12px; background: #f9fafb; border-radius: 8px;
  margin: 6px 0 2px; border: 1px solid #f0f0f0;
}
.tpc-ins-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.78rem; color: #555; font-weight: 500; white-space: nowrap;
}

/* ── Notification Bell (topbar) ── */
.notif-bell-wrap { position: relative; display: flex; align-items: center; }
.notif-bell-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; background: transparent; border: none; cursor: pointer;
  border-radius: 8px; color: #555; transition: background 0.15s, color 0.15s; flex-shrink: 0;
}
.notif-bell-btn:hover { background: #f0f0f0; color: #111; }
.notif-badge {
  position: absolute; top: 3px; right: 3px;
  min-width: 16px; height: 16px; padding: 0 3px;
  background: #c0120c; color: #fff;
  font-size: 0.6rem; font-weight: 700; line-height: 16px; text-align: center;
  border-radius: 8px; pointer-events: none; box-sizing: border-box;
}
.notif-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px; max-height: 480px; overflow-y: auto;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06); z-index: 999;
}
.notif-dd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #f0f0f0; position: sticky; top: 0; background: #fff;
}
.notif-dd-title { font-size: 0.88rem; font-weight: 700; color: #111; }
.notif-dd-mark-all { font-size: 0.78rem; color: #c0120c; background: none; border: none; cursor: pointer; padding: 0; }
.notif-dd-mark-all:hover { text-decoration: underline; }
.notif-dd-list { padding: 4px 0; }
.notif-dd-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 16px; cursor: pointer; transition: background 0.1s;
}
.notif-dd-item:hover { background: #f9f9f9; }
.notif-dd-item.unread { background: #fff9f9; }
.notif-dd-item.unread:hover { background: #fef2f2; }
.notif-dd-dot { width: 8px; height: 8px; border-radius: 50%; background: #c0120c; flex-shrink: 0; margin-top: 5px; }
.notif-dd-dot.read { background: transparent; }
.notif-dd-body { flex: 1; min-width: 0; }
.notif-dd-item-title { font-size: 0.82rem; font-weight: 600; color: #111; margin-bottom: 2px; }
.notif-dd-item-msg { font-size: 0.78rem; color: #666; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-dd-item-date { font-size: 0.72rem; color: #aaa; margin-top: 3px; }
.notif-dd-footer { padding: 10px 16px; border-top: 1px solid #f0f0f0; text-align: center; }
.notif-dd-see-all { font-size: 0.82rem; color: #c0120c; background: none; border: none; cursor: pointer; font-weight: 600; padding: 0; }
.notif-dd-see-all:hover { text-decoration: underline; }
.notif-dd-empty { padding: 28px 16px; text-align: center; color: #999; font-size: 0.82rem; }

/* ── Sidebar notification badge ── */
.sb-notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #c0120c; color: #fff; font-size: 0.62rem; font-weight: 700;
  border-radius: 8px; margin-left: auto; box-sizing: border-box;
}

/* ── Notification filter tabs ── */
.notif-filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.notif-filter-tab {
  padding: 5px 13px; border: 1px solid #e5e7eb; background: #fff;
  border-radius: 20px; font-size: 0.78rem; color: #555; cursor: pointer;
  transition: all 0.12s; white-space: nowrap;
}
.notif-filter-tab:hover { border-color: #c0120c; color: #c0120c; }
.notif-filter-tab.active { background: #c0120c; border-color: #c0120c; color: #fff; font-weight: 600; }
.notif-filter-count { font-weight: 400; opacity: 0.75; }

/* ── Owner notification cards ── */
.notif-cards-list { display: flex; flex-direction: column; gap: 10px; }
.owner-notif-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1.5px solid #e5e7eb; border-radius: 12px; padding: 16px 18px;
  transition: border-color 0.12s;
}
.owner-notif-card.unread { border-color: #fecaca; background: #fff9f9; }
.owner-notif-dot { width: 9px; height: 9px; border-radius: 50%; background: #c0120c; flex-shrink: 0; margin-top: 6px; }
.owner-notif-dot.read { background: #d1d5db; }
.owner-notif-body { flex: 1; min-width: 0; }
.owner-notif-header { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.owner-notif-icon { display: flex; color: #c0120c; }
.owner-notif-icon svg { width: 15px; height: 15px; }
.owner-notif-title { font-size: 0.9rem; font-weight: 700; color: #111; flex: 1; }
.owner-notif-read-btn {
  font-size: 0.75rem; color: #999; background: none; border: 1px solid #e5e7eb;
  border-radius: 6px; cursor: pointer; padding: 2px 8px; white-space: nowrap;
}
.owner-notif-read-btn:hover { color: #555; border-color: #bbb; }
.owner-notif-msg { font-size: 0.84rem; color: #444; line-height: 1.5; margin-bottom: 8px; }
.owner-notif-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.owner-notif-date { font-size: 0.75rem; color: #aaa; }
.tp-notif-read-label { font-size: 0.75rem; color: #aaa; }

/* ── Tenant Notifications ── */
.tp-notif-list { display: flex; flex-direction: column; gap: 10px; }
.tp-notif-card {
  background: #fff; border: 1.5px solid #e5e7eb; border-radius: 12px; padding: 14px 16px;
}
.tp-notif-card.unread { border-color: #fecaca; background: #fff9f9; }
.tp-notif-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.tp-notif-title-row { display: flex; align-items: center; gap: 7px; }
.tp-notif-icon { display: flex; }
.tp-notif-icon svg { width: 14px; height: 14px; color: #c0120c; }
.tp-notif-title { font-size: 0.88rem; font-weight: 700; color: #111; }
.tp-notif-msg { font-size: 0.83rem; color: #555; line-height: 1.45; margin-bottom: 6px; }
.tp-notif-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tp-notif-date { font-size: 0.75rem; color: #999; }

/* ── Profile ── */
.tp-profile-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: #f3f4f6; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700; color: #374151; flex-shrink: 0;
}

/* ── Profil locataire ── */
.tpp-readonly-note { margin: 12px 0 0; font-size: 0.78rem; color: #9ca3af; line-height: 1.5; }
.tpp-help-text     { font-size: 0.8rem; color: #6b7280; margin: 10px 0 0; line-height: 1.55; }
.tpp-optional      { font-size: 0.72rem; color: #9ca3af; font-weight: 400; margin-left: 4px; }
/* Préférences d'affichage — valeurs fixes */
.tp-disp-fixed-row  { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tp-disp-fixed-item { display: flex; flex-direction: column; gap: 3px; background: #f8f8f8; border: 1px solid #efefef; border-radius: 8px; padding: 10px 16px; min-width: 110px; }
.tp-disp-fixed-label { font-size: 0.68rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; }
.tp-disp-fixed-val   { font-size: 0.88rem; font-weight: 600; color: #111; }

.tpp-notif-list { display: flex; flex-direction: column; }
.tpp-toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid #f3f4f6; cursor: pointer; gap: 12px;
}
.tpp-toggle-row:last-child { border-bottom: none; }
.tpp-toggle-label { font-size: 0.88rem; color: #111; flex: 1; }
.tpp-toggle-wrap  { flex-shrink: 0; position: relative; }
.tpp-toggle-input { position: absolute; opacity: 0; width: 0; height: 0; }
.tpp-toggle-track {
  display: block; width: 40px; height: 22px;
  background: #e5e7eb; border-radius: 20px;
  transition: background 0.2s; position: relative;
}
.tpp-toggle-track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18); transition: transform 0.2s;
}
.tpp-toggle-input:checked ~ .tpp-toggle-track { background: #b51818; }
.tpp-toggle-input:checked ~ .tpp-toggle-track::after { transform: translateX(18px); }

/* ── Settings ── */
.tp-notif-prefs { display: flex; flex-direction: column; gap: 10px; }
.tp-pref-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: #374151; cursor: pointer;
}
.tp-pref-row input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: #c0120c;
}
.tp-rgpd-note { font-size: 0.82rem; color: #666; line-height: 1.6; margin: 0; }

/* ── Shared form field ── */
.tp-form-field.tp-form-full { grid-column: 1 / -1; }

/* ── Tenant doc preview modal ─────────────────────────────────────────────── */
.tdp-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.55);
  align-items: center; justify-content: center;
  padding: 16px;
}
.tdp-modal {
  display: flex; flex-direction: column;
  background: #fff; border-radius: 10px;
  width: 100%; max-width: 860px;
  max-height: calc(100vh - 32px);
  box-shadow: 0 8px 40px rgba(0,0,0,.28);
  overflow: hidden;
}
.tdp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid #e5e7eb;
  background: #fafafa; gap: 12px; flex-shrink: 0;
}
.tdp-title {
  font-weight: 700; font-size: 1rem; color: #111; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tdp-header-actions { display: flex; gap: 8px; flex-shrink: 0; }
.tdp-body { flex: 1; overflow: hidden; background: #f3f4f6; }
.tdp-iframe {
  width: 100%; height: 100%; min-height: 520px;
  border: none; display: block;
}

/* ── Insurance file dropzone ──────────────────────────────────────────────── */
.tp-ins-dropzone {
  position: relative; border: 2px dashed #d1d5db; border-radius: 8px;
  background: #fafafa; cursor: pointer; transition: border-color .18s;
  overflow: hidden;
}
.tp-ins-dropzone:hover,
.tp-ins-dropzone.drag-over { border-color: #c0120c; background: #fff5f5; }
.tp-ins-dropzone.drag-over .tp-ins-dropzone-inner { opacity: 0.7; }
.tp-ins-file-input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  width: 100%; height: 100%; z-index: 1;
}
.tp-ins-dropzone-inner {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 28px 16px; pointer-events: none;
}
.tp-ins-drop-title { font-weight: 600; font-size: 0.92rem; color: #111; text-align: center; }
.tp-ins-drop-sub   { font-size: 0.8rem; color: #777; text-align: center; }
.tp-ins-file-preview { padding: 12px 14px; }
.tp-ins-file-info {
  display: flex; align-items: center; gap: 12px;
  background: #f3f4f6; border-radius: 6px; padding: 10px 14px;
}
.tp-ins-file-icon { font-size: 1.5rem; flex-shrink: 0; }
.tp-ins-file-meta { flex: 1; min-width: 0; }
.tp-ins-file-name {
  font-weight: 600; font-size: 0.88rem; color: #111;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tp-ins-file-size { font-size: 0.77rem; color: #777; margin-top: 2px; }

/* Owner-side insurance review bar */
.doc-insurance-review-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 8px 12px;
  background: #fff7f7; border: 1px solid #fecaca; border-radius: 6px;
}
.doc-insurance-review-label { font-size: 0.8rem; font-weight: 600; color: #b51818; flex: 1; min-width: 120px; }
.doc-btn-ok { color: #16a34a !important; border-color: #16a34a !important; }





/* ═══════════════════════════════════════════════════════════════
   V1 SUIVI PAIEMENT - styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Bloc info sous chaque ligne de loyer ── */
.tp-rent-info-block {
  width: 100%; margin-top: 8px; padding: 9px 13px;
  border-radius: 6px; font-size: 0.82rem; color: #374151; line-height: 1.55;
}
.tp-rent-info-block.warn    { background: #fffbeb; border-left: 3px solid #f59e0b; color: #92400e; }
.tp-rent-info-block.danger  { background: #fef2f2; border-left: 3px solid #c0120c; color: #991b1b; }
.tp-rent-info-block.ok      { background: #f0fdf4; border-left: 3px solid #22c55e; color: #166534; }

/* ── Modal signalement locataire ── */
.tp-signal-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.46);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.tp-signal-modal {
  background: #fff; border-radius: 12px;
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.tp-signal-header {
  padding: 18px 20px 14px; border-bottom: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between;
}
.tp-signal-title { font-size: 1.05rem; font-weight: 700; color: #111; }
.tp-signal-body  { padding: 18px 20px; }
.tp-signal-intro {
  font-size: 0.84rem; color: #6b7280; line-height: 1.55;
  margin-bottom: 16px; padding: 10px 14px;
  background: #f9fafb; border-radius: 8px;
}
.tp-signal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tp-signal-field { display: flex; flex-direction: column; gap: 4px; }
.tp-signal-field.full { grid-column: 1 / -1; }
.tp-signal-label { font-size: 0.79rem; font-weight: 600; color: #374151; }
.tp-signal-input, .tp-signal-select, .tp-signal-textarea {
  border: 1.5px solid #e5e7eb; border-radius: 7px;
  padding: 8px 11px; font-size: 0.875rem; font-family: inherit; color: #111;
  background: #fff; transition: border-color .15s;
}
.tp-signal-input:focus, .tp-signal-select:focus, .tp-signal-textarea:focus {
  outline: none; border-color: #c0120c;
}
.tp-signal-input[readonly], .tp-signal-input[disabled] {
  background: #f9fafb; color: #9ca3af; cursor: default;
}
.tp-signal-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 20px; padding-top: 16px; border-top: 1px solid #f0f0f0;
}
@media (max-width: 520px) {
  .tp-signal-grid { grid-template-columns: 1fr; }
}

/* ── Alerte paiement signalé (côté propriétaire) ── */

/* Bannière rouge en haut de liste */
.payment-alert-banner {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 16px; margin-bottom: 14px;
  background: #fff1f1; border: 1px solid #fecaca;
  border-radius: 10px; font-size: 0.84rem; font-weight: 500;
  color: #991b1b; line-height: 1.5;
}
.pab-icon { flex-shrink: 0; margin-top: 1px; color: #c0120c; }

/* Carte alerte rouge */
.payment-alert-card {
  background: #fff;
  border: 1.5px solid #fca5a5;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 2px 14px rgba(192,18,12,0.07);
  margin-bottom: 10px;
}
.pac-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.pac-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 11px;
  background: #fff1f1; border: 1px solid #fca5a5; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700; color: #c0120c;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.pac-signaled-date { font-size: 0.78rem; color: #9ca3af; }

.pac-body {
  display: grid; grid-template-columns: 1fr 1.6fr 1fr;
  gap: 20px; align-items: start;
}

/* Colonne gauche - infos bien / locataire */
.pac-prop { font-size: 0.95rem; font-weight: 700; color: #111; margin-bottom: 2px; }
.pac-city { font-size: 0.79rem; color: #6b7280; margin-bottom: 3px; }
.pac-tenant { font-size: 0.82rem; color: #374151; font-weight: 500; margin-bottom: 8px; }
.pac-period { font-size: 0.82rem; font-weight: 600; color: #374151; }
.pac-due { font-size: 0.77rem; color: #9ca3af; margin-bottom: 8px; }
.pac-amount { font-size: 1.18rem; font-weight: 800; color: #111; }
.pac-expected { font-size: 0.77rem; color: #9ca3af; margin-top: 2px; }

/* Colonne centrale - message + détails */
.pac-center-title { font-size: 0.87rem; font-weight: 600; color: #111; margin-bottom: 3px; }
.pac-center-sub   { font-size: 0.8rem; color: #6b7280; margin-bottom: 12px; line-height: 1.4; }
.pac-detail-row {
  display: flex; gap: 8px; align-items: baseline;
  padding: 4px 0; font-size: 0.8rem; color: #374151;
  border-bottom: 1px solid #f3f4f6;
}
.pac-detail-row:last-child { border-bottom: none; }
.pac-detail-label {
  font-weight: 600; color: #9ca3af; min-width: 90px; flex-shrink: 0;
  font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.02em;
}
.pac-proof-btn {
  padding: 2px 8px; border: 1px solid #d1d5db;
  background: #fff; color: #374151; border-radius: 4px;
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  font-family: inherit; margin-left: 6px; transition: border-color .12s, color .12s;
}
.pac-proof-btn:hover { border-color: #111; color: #111; }

/* Colonne droite - actions */
.pac-right {
  display: flex; flex-direction: column; gap: 8px; align-items: stretch;
}
.pac-btn-confirm {
  padding: 10px 16px; background: #c0120c; color: #fff;
  border: none; border-radius: 8px; font-size: 0.875rem; font-weight: 600;
  cursor: pointer; font-family: inherit; text-align: center;
  transition: background .15s;
}
.pac-btn-confirm:hover { background: #c41d15; }
.pac-btn-reject {
  padding: 9px 16px; background: #fff; color: #c0120c;
  border: 1.5px solid #c0120c; border-radius: 8px; font-size: 0.875rem; font-weight: 600;
  cursor: pointer; font-family: inherit; text-align: center;
  transition: background .15s, color .15s;
}
.pac-btn-reject:hover { background: #c0120c; color: #fff; }
.pac-btn-delete {
  padding: 6px 12px; background: transparent; color: #9ca3af;
  border: 1px solid #e5e7eb; border-radius: 6px; font-size: 0.78rem; font-weight: 500;
  cursor: pointer; font-family: inherit; text-align: center;
  transition: color .12s, border-color .12s;
}
.pac-btn-delete:hover { color: #374151; border-color: #9ca3af; }
.pac-btn-email {
  padding: 6px 12px; background: #fff; color: #374151;
  border: 1px solid #d1d5eb; border-radius: 6px; font-size: 0.78rem; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: border-color .12s, color .12s;
}
.pac-btn-email:hover { border-color: #c0120c; color: #c0120c; }

@media (max-width: 720px) {
  .pac-body { grid-template-columns: 1fr; gap: 14px; }
}

/* ===== PLAN DÉCOUVERTE - DASHBOARD ===== */
.db-plan-banner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  background: #fff; border: 1.5px solid #e5e7eb; border-radius: 12px;
  padding: 18px 24px; margin-bottom: 20px;
}
.db-plan-banner-left { display: flex; flex-direction: column; gap: 4px; }
.db-plan-banner-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #aaa;
}
.db-plan-banner-name {
  font-size: 1.05rem; font-weight: 800; color: #111;
}
.db-plan-banner-desc { font-size: 0.8rem; color: #888; margin: 0; }
.db-plan-banner-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.db-plan-banner-hint { font-size: 0.78rem; color: #aaa; margin: 0; text-align: right; }
.db-plan-banner-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #111; color: #fff; border: none; border-radius: 8px;
  padding: 8px 18px; font-size: 0.82rem; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: background 0.15s;
  white-space: nowrap;
}
.db-plan-banner-btn:hover { background: #c0120c; }

/* Cards découverte rapide */
.db-discover-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px;
}
@media (max-width: 1100px) { .db-discover-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .db-discover-cards { grid-template-columns: 1fr; } }

.db-disc-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;
  min-height: 100px;
}
.db-disc-card--locked {
  background: #fafafa; border-style: dashed;
}
.db-disc-card--cta { border-style: dashed; }
.db-disc-card-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #bbb;
}
.db-disc-card-val {
  font-size: 1.05rem; font-weight: 800; color: #111; line-height: 1.2;
}
.db-disc-card--locked .db-disc-card-val { color: #ccc; }
.db-disc-locked-label { color: #ccc !important; }
.db-disc-card-sub { font-size: 0.78rem; color: #999; }
.db-disc-unlock-btn {
  margin-top: auto; display: inline-flex; align-items: center;
  background: none; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 4px 10px; font-size: 0.72rem; font-weight: 600; color: #555;
  cursor: pointer; font-family: inherit; width: fit-content;
  transition: border-color 0.15s, color 0.15s;
}
.db-disc-unlock-btn:hover { border-color: #c0120c; color: #c0120c; }

/* ── Nudge upgrade discrète (remplace le gros bandeau Découverte) ── */
.db-upgrade-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
}
.db-upgrade-nudge-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.db-upgrade-nudge-plan {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #444;
}
.db-upgrade-nudge-desc {
  font-size: 0.78rem;
  color: #999;
}
.db-upgrade-nudge-btn {
  font-size: 0.78rem;
  font-weight: 600;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 5px 12px;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.db-upgrade-nudge-btn:hover { border-color: #c0120c; color: #c0120c; }

/* ===== SIDEBAR - ITEMS VERROUILLÉS ===== */
.sb-link-locked {
  opacity: 0.55;
  pointer-events: auto;
}

.sb-group-all-locked > .sb-group-label {
  opacity: 0.55;
}

/* ===== PATRIMOINE - carte upgrade discrète ===== */
.pat-upgrade-hint {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  background: #fafafa; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 14px 20px; margin-bottom: 16px;
}
.pat-upgrade-hint-content {
  display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0;
}
.pat-upgrade-hint-content svg { flex-shrink: 0; color: #aaa; margin-top: 2px; }
.pat-upg-title {
  display: block; font-size: 0.85rem; font-weight: 700; color: #111; margin-bottom: 2px;
}
.pat-upg-desc { font-size: 0.78rem; color: #888; }
.pat-upgrade-hint-btn {
  flex-shrink: 0; background: #111; color: #fff; border: none; border-radius: 7px;
  padding: 7px 16px; font-size: 0.78rem; font-weight: 700; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: background 0.15s;
}
.pat-upgrade-hint-btn:hover { background: #c0120c; }

/* Legacy classes (conservées pour compatibilité) */
.payment-reported-banner { display: none; }
.payment-reported-details { display: none; }
.pay-action-validate, .pay-action-reject, .pay-action-proof { display: inline-flex; }
.pay-action-validate {
  padding: 7px 16px; border: 1.5px solid #111; border-radius: 6px;
  background: #f0faf4; color: #111; font-size: 0.84rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.pay-action-reject {
  padding: 7px 16px; border: 1.5px solid #c0120c; border-radius: 6px;
  background: #fff8f8; color: #c0120c; font-size: 0.84rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.pay-action-proof {
  padding: 5px 12px; border: 1.5px solid #9ca3af; border-radius: 6px;
  background: #fff; color: #6b7280; font-size: 0.79rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
}

/* ══════════════════════════════════════════
   TENANT LIST  (.tl-*)
   ══════════════════════════════════════════ */

.tl-kpi-strip {
  display: flex; align-items: center; gap: 0;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 0 4px; margin-bottom: 24px; overflow-x: auto;
}
.tl-kpi-item { display: flex; flex-direction: column; gap: 2px; padding: 16px 24px; min-width: 130px; flex: 1; }
.tl-kpi-label { font-size: 0.72rem; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tl-kpi-val { font-size: 1.35rem; font-weight: 800; color: #111; line-height: 1.1; }
.tl-kpi-val.tl-kpi-ok   { color: #16a34a; }
.tl-kpi-val.tl-kpi-warn { color: #c0120c; }
.tl-kpi-sub { font-size: 0.70rem; color: #9ca3af; }
.tl-kpi-sep { width: 1px; height: 36px; background: #e5e7eb; flex-shrink: 0; }

.tl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

/* ── Tenant card — redesign premium ── */
.tl-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: box-shadow .15s, border-color .15s;
  overflow: hidden;
}
.tl-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.09); border-color: #d4d4d4; }
.tl-card-accent { display: none; } /* kept for compat, hidden */
.tl-card-inner { padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Header */
.tl-card-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.tl-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: #c0120c;
  color: #fff; font-size: 1.05rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tl-card-titles { min-width: 0; text-align: center; }
.tl-tenant-name { font-size: 0.97rem; font-weight: 700; color: #111; text-align: center; }
.tl-tenant-prop { font-size: 0.76rem; color: #9ca3af; margin-top: 3px; text-align: center; }

/* Status — petit point + texte, pas de pill lourde */
.tl-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
  flex-shrink: 0; margin-top: 3px;
}
.tl-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.tl-status--success { color: #15803d; }
.tl-status--success::before { background: #22c55e; }
.tl-status--danger  { color: #b91c1c; }
.tl-status--danger::before  { background: #c0120c; }
.tl-status--warning { color: #b45309; }
.tl-status--warning::before { background: #f59e0b; }
.tl-status--neutral { color: #6b7280; }
.tl-status--neutral::before { background: #d1d5db; }

/* Alertes — seulement pour les vraies alertes (retards, départ) */
.tl-alert-row { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.tl-alert {
  font-size: 0.67rem; font-weight: 700;
  padding: 2px 8px; border-radius: 4px;
  display: inline-flex; align-items: center; gap: 4px;
}
.tl-alert--warn   { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.tl-alert--danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Infos (3 colonnes) — sans fond gris lourd, ligne de séparateurs fins */
.tl-info-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: 1px solid #f0f0f0; border-radius: 10px; overflow: hidden;
  background: #fafafa;
}
.tl-info-item {
  display: flex; flex-direction: column; gap: 3px;
  padding: 10px 12px; border-right: 1px solid #f0f0f0;
}
.tl-info-item:last-child { border-right: none; }
.tl-info-label {
  font-size: 0.63rem; color: #b0b0b0; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
}
.tl-info-val { font-size: 0.83rem; color: #1a1a1a; font-weight: 600; line-height: 1.35; }

/* Statut de paiement en ligne — texte coloré discret, pas de badge */
.tl-pay-st { font-size: 0.65rem; font-weight: 700; font-style: normal; }
.tl-pay-st--success { color: var(--success); }
.tl-pay-st--danger  { color: var(--danger); }
.tl-pay-st--warning { color: var(--warning); }
.tl-pay-st--neutral { color: #9ca3af; }

/* Contact */
.tl-card-contact { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.tl-contact-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 0.73rem; color: #6b7280; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tl-contact-item svg { flex-shrink: 0; }

/* Actions — hauteur uniforme 34px, cohérence visuelle */
.tl-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tl-action-primary {
  height: 34px; padding: 0 16px;
  background: #c0120c; color: #fff; border: 1.5px solid #c0120c;
  border-radius: 8px; font-size: 0.79rem; font-weight: 700;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .15s, border-color .15s;
}
.tl-action-primary:hover { background: #a50f09; border-color: #a50f09; }
.tl-action {
  height: 34px; padding: 0 14px;
  background: #fff; color: #374151; border: 1.5px solid #e5e7eb;
  border-radius: 8px; font-size: 0.77rem; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: border-color .15s, background .15s;
}
.tl-action:hover { border-color: #374151; background: #f9fafb; }

/* Responsive mobile */
@media (max-width: 520px) {
  .tl-info-row { grid-template-columns: repeat(2, 1fr); }
  .tl-info-item:nth-child(2) { border-right: none; }
  .tl-info-item:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid #f0f0f0; border-right: none; }
  .tl-card-actions { gap: 6px; }
  .tl-action-primary, .tl-action { font-size: 0.74rem; padding: 0 11px; }
}

.tl-empty {
  grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 60px 24px; text-align: center;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; color: #9ca3af;
}
.tl-empty-title { font-size: 1rem; font-weight: 700; color: #374151; margin: 0; }
.tl-empty-sub   { font-size: 0.82rem; color: #9ca3af; max-width: 400px; margin: 0; }

.tl-vacants-section {
  grid-column: 1 / -1; border: 1px solid #e5e7eb; border-radius: 12px;
  background: #fff; padding: 16px 20px; margin-top: 4px;
}
.tl-vacants-title { font-size: 0.78rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.tl-vacants-list { display: flex; flex-direction: column; gap: 8px; }
.tl-vacant-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.tl-vacant-item:last-child { border-bottom: none; padding-bottom: 0; }
.tl-vacant-info { display: flex; flex-direction: column; gap: 2px; }
.tl-vacant-name { font-size: 0.85rem; font-weight: 600; color: #111; }
.tl-vacant-meta { font-size: 0.72rem; color: #9ca3af; }

/* ══════════════════════════════════════════
   TENANT DETAIL  (.td-*)
   ══════════════════════════════════════════ */

.td-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 24px; }
.td-back {
  display: flex; align-items: center; gap: 4px;
  background: none; border: none; padding: 4px 0; cursor: pointer; font-family: inherit;
  font-size: 0.82rem; font-weight: 600; color: #9ca3af; transition: color 0.15s;
}
.td-back:hover { color: #111; }
.td-breadcrumb-sep { color: #d1d5db; font-size: 0.85rem; }
.td-breadcrumb-current { font-size: 0.82rem; font-weight: 600; color: #374151; }

/* Bouton retour fiche locataire — même style que .crd-back-btn / .arb-back-btn */
.ten-back-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); border: 1.5px solid var(--brand); border-radius: 8px; color: #fff; font-size: 0.82rem; font-weight: 700; cursor: pointer; padding: 7px 16px; margin-bottom: 16px; transition: background 150ms, border-color 150ms; font-family: inherit; }
.ten-back-btn:hover { background: #a00f09; border-color: #a00f09; color: #fff; }
.ten-back-btn svg { stroke: #fff; }

.td-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; margin-bottom: 16px; flex-wrap: wrap;
}
.td-header-left { display: flex; align-items: center; gap: 16px; }
.td-avatar-lg {
  width: 52px; height: 52px; border-radius: 50%; background: #c0120c;
  color: #fff; font-size: 1.3rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.td-name { font-size: 1.4rem; font-weight: 800; color: #111; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.td-prop-line { font-size: 0.82rem; color: #9ca3af; margin: 0; }
.td-header-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.td-rent-block { font-size: 1.2rem; font-weight: 800; color: #111; }
.td-rent-unit { font-size: 0.78rem; font-weight: 400; color: #9ca3af; margin-left: 2px; }
.td-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.td-info-strip {
  display: flex; flex-wrap: wrap; gap: 0;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 0 4px; margin-bottom: 16px;
}
.td-info-item { display: flex; flex-direction: column; gap: 3px; padding: 14px 20px; }
.td-info-label { font-size: 0.68rem; color: #9ca3af; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.td-info-val { font-size: 0.85rem; color: #111; font-weight: 600; }

.td-invite-ins-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }

.tpc-details-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; }
.tpc-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; padding: 16px 18px; }
.tpc-section-title {
  display: flex; align-items: center; gap: 7px; font-size: 0.75rem; font-weight: 700;
  color: #6b7280; text-transform: uppercase; letter-spacing: .05em;
  margin-bottom: 12px;
}
.tpc-section-count { background: #f3f4f6; color: #374151; border-radius: 9999px; padding: 1px 7px; font-size: 0.68rem; font-weight: 700; }
.tpc-list { display: flex; flex-direction: column; gap: 8px; }
.tpc-more { font-size: 0.72rem; color: #9ca3af; padding: 4px 0; text-align: center; }

.tpc-doc-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.tpc-doc-item:last-child { border-bottom: none; padding-bottom: 0; }
.tpc-doc-info { flex: 1; min-width: 0; }
.tpc-doc-title { font-size: 0.82rem; font-weight: 600; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpc-doc-meta  { font-size: 0.71rem; color: #9ca3af; }

.tpc-pay-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.tpc-pay-item:last-child { border-bottom: none; }
.tpc-pay-month  { flex: 1; font-size: 0.82rem; color: #374151; font-weight: 500; }
.tpc-pay-amount { font-size: 0.88rem; font-weight: 700; color: #111; }
.tpc-receipt-btn {
  display: flex; align-items: center; gap: 4px; background: none; border: 1px solid #e5e7eb;
  border-radius: 5px; padding: 3px 8px; font-size: 0.70rem; font-weight: 600; color: #6b7280;
  cursor: pointer; font-family: inherit; transition: border-color 0.12s, color 0.12s;
}
.tpc-receipt-btn:hover { border-color: #374151; color: #111; }

.tpc-retard-badge {
  font-size: 0.65rem; font-weight: 700; background: #fef2f2; color: #c0120c;
  border: 1px solid #fca5a5; border-radius: 999px; padding: 2px 8px; vertical-align: middle;
}

.tpc-avatar { width: 38px; height: 38px; border-radius: 50%; background: #c0120c; color: #fff; font-size: 1rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tpc-avatar-sm { width: 30px; height: 30px; font-size: 0.82rem; }

.ins-badge { font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.ins-badge-ins-ok       { background: #f0fdf4; color: #15803d; }
.ins-badge-ins-pending  { background: #f3f4f6; color: #374151; }
.ins-badge-ins-refused  { background: #fef2f2; color: #c0120c; }
.ins-badge-ins-none     { background: #f3f4f6; color: #6b7280; }
.ins-badge-ins-expired  { background: #fef2f2; color: #c0120c; }
.ins-badge-ins-expiring { background: #fff7ed; color: #c2410c; }

/* ============================================================
   pm-* - Loyers et paiements : vue par bien
   pmd-* - Détail des paiements d'un bien
   ============================================================ */

/* KPI row */
.pm-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.pm-kpi-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pm-kpi-card.pm-kpi-ok  { border-left: 3px solid #22c55e; }
.pm-kpi-card.pm-kpi-warn { border-left: 3px solid #f97316; }
.pm-kpi-icon { color: #9ca3af; flex-shrink: 0; padding-top: 2px; }
.pm-kpi-body { display: flex; flex-direction: column; gap: 2px; }
.pm-kpi-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; }
.pm-kpi-val { font-size: 1.35rem; font-weight: 700; color: #111; line-height: 1.2; }
.pm-kpi-sub { font-size: 0.75rem; color: #9ca3af; }
.pm-kpi-card.pm-kpi-ok  .pm-kpi-val { color: #16a34a; }
.pm-kpi-card.pm-kpi-warn .pm-kpi-val { color: #ea580c; }

/* Property cards grid */
.pm-property-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 16px;
}
.pm-property-card {
  background: #fff;
  border: 1px solid #e4e6eb;
  border-radius: 14px;
  padding: 22px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  transition: box-shadow .15s;
}
.pm-property-card:hover { box-shadow: 0 6px 22px rgba(0,0,0,.10); }

.pm-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f3f4f6;
}
.pm-card-name { font-size: .97rem; font-weight: 700; color: #111; line-height: 1.3; }
.pm-card-meta { font-size: .76rem; color: #6b7280; margin-top: 4px; }
.pm-card-tenant { font-size: .82rem; color: #374151; margin-top: 7px; font-weight: 600; }
.muted-sm { color: #9ca3af; font-style: italic; font-weight: 400; }
.pm-no-tenant-msg { font-size: 0.79rem; color: #9ca3af; font-style: italic; padding: 4px 0; }

/* Stats grid */
.pm-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}
.pm-stat { display: flex; flex-direction: column; gap: 4px; }
.pm-stat-label { font-size: .69rem; text-transform: uppercase; letter-spacing: .05em; color: #9ca3af; }
.pm-stat-val { font-size: 1.05rem; font-weight: 700; color: #111; }
.pm-stat-val.pm-ok { color: #16a34a; }

/* Progress bar */
.pm-card-progress { display: flex; flex-direction: column; gap: 7px; }
.pm-progress-track { height: 7px; background: #f0f0f0; border-radius: 99px; overflow: hidden; }
.pm-progress-fill { height: 100%; border-radius: 99px; transition: width .3s; }
.pm-progress-fill.full     { background: #22c55e; }
.pm-progress-fill.progress { background: #c0120c; }
.pm-progress-fill.partial  { background: #f97316; }
.pm-progress-label { font-size: .71rem; color: #aaa; }

/* Card actions */
.pm-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 14px;
  border-top: 1px solid #f0f0f0;
  margin-top: auto;
}
.pm-action-primary {
  background: #c0120c; color: #fff; border: 1.5px solid #c0120c; border-radius: 8px;
  padding: 8px 18px; font-size: .82rem; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.pm-action-primary:hover { background: #a00f09; border-color: #a00f09; }
.pm-action-primary--full { width: 100%; justify-content: center; }
.pm-action {
  background: #f9fafb; color: #374151; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 8px 14px; font-size: .82rem; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.pm-action:hover { background: #f3f4f6; border-color: #d1d5db; }

/* Empty state */
.pm-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 64px 24px; color: #9ca3af; text-align: center;
}
.pm-empty-title { font-size: 1rem; font-weight: 600; color: #374151; }
.pm-empty-sub { font-size: 0.85rem; }

/* ── Payment detail (pmd-*) ── */
.pmd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pmd-header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.pmd-header-title-block { min-width: 0; }
.pmd-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.pmd-title { font-size: 1.4rem; font-weight: 700; color: #111; margin: 0; }
.pmd-subtitle { font-size: 0.88rem; color: #6b7280; margin: 4px 0 0; }
@media (max-width: 600px) {
  .pmd-header { flex-direction: column; align-items: flex-start; }
  .pmd-header-right { align-self: flex-start; }
}

.pmd-toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}

.pmd-table-wrap {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  overflow-x: auto; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.pmd-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; table-layout: fixed; }
.pmd-th {
  padding: 12px 16px; text-align: left; font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: #6b7280;
  border-bottom: 1px solid #f3f4f6; background: #fafafa;
}
/* Largeurs des colonnes : proportions calibrées */
.pmd-th:nth-child(1) { width: 18%; }   /* Période */
.pmd-th:nth-child(2) { width: 14%; }   /* Échéance */
.pmd-th:nth-child(3) { width: 11%; }   /* Attendu */
.pmd-th:nth-child(4) { width: 11%; }   /* Encaissé */
.pmd-th:nth-child(5) { width: 10%; }   /* Statut */
.pmd-th:nth-child(6) { width: 36%; text-align: right; }  /* Actions */
.pmd-cell { padding: 13px 16px; border-bottom: 1px solid #f9fafb; color: #374151; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; }
.pmd-pay-row:hover .pmd-cell { background: #fafafa; }
.pmd-amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.pmd-empty-row { text-align: center; color: #9ca3af; padding: 32px 16px !important; }
.pmd-actions-cell { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; }
.pmd-btn {
  background: #f9fafb; color: #374151; border: 1px solid #e5e7eb; border-radius: 6px;
  padding: 5px 10px; font-size: 0.78rem; cursor: pointer; white-space: nowrap;
}
.pmd-btn:hover { background: #f3f4f6; }
.pmd-btn.pmd-btn-danger { color: #c0120c; border-color: #fecaca; }
.pmd-btn.pmd-btn-danger:hover { background: #fef2f2; }
.pmd-btn.pmd-btn-ok { color: #15803d; border-color: #bbf7d0; font-weight: 600; }
.pmd-btn.pmd-btn-ok:hover { background: #f0fdf4; }
.pmd-pay-row--signal .pmd-cell { background: #fffbeb; }
.pmd-pay-row--signal:hover .pmd-cell { background: #fef9c3; }
.pmd-signal-detail { font-size: 0.75rem; color: #92400e; margin-top: 4px; font-weight: 500; }
@media (max-width: 600px) {
  .pmd-table { table-layout: auto; }
  .pmd-th:nth-child(n) { width: auto; }
  .pmd-actions-cell { flex-wrap: wrap; }
}

/* Responsive */
@media (max-width: 1100px) {
  .pm-property-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .pm-kpi-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .pm-property-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .pm-kpi-row { grid-template-columns: 1fr; }
}


/* ─────────────────────────────────────────
   BOUTON RETOUR PAIEMENT DETAIL
   ───────────────────────────────────────── */
.td-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #c0120c;
  color: #fff;
  border: 1.5px solid #c0120c;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 150ms, border-color 150ms;
}
.td-back-btn svg { stroke: #fff; }
.td-back-btn:hover { background: #a00f09; border-color: #a00f09; }

/* ─────────────────────────────────────────
   TABLEAU DES DERNIERS PAIEMENTS
   ───────────────────────────────────────── */
.pm-recent-section { margin-top: 28px; }
.pm-recent-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #111;
  margin-bottom: 12px;
}
.pm-recent-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.pm-recent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.pm-recent-table th {
  background: #f9fafb;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}
.pm-recent-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  vertical-align: middle;
}
.pm-recent-table tr:last-child td { border-bottom: none; }
.pm-recent-table tr:hover td { background: #fafafa; }
.pm-recent-empty {
  padding: 24px;
  text-align: center;
  color: #9ca3af;
  font-size: 0.82rem;
}

/* ─────────────────────────────────────────
   ONGLET INFORMATIONS - carte blanche
   ───────────────────────────────────────── */
.pd-info-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  width: 100%;
  box-sizing: border-box;
}

.pd-info-card-header {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.pd-info-card-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #111;
}

.pd-info-card-subtitle {
  font-size: 0.76rem;
  color: #9ca3af;
  margin-top: 3px;
}

/* "Non renseigné" en italique discret */
.pd-info-empty {
  font-style: italic;
  color: #c4c4c4 !important;
  font-weight: 400 !important;
}

@media (max-width: 640px) {
  .pd-info-card { padding: 18px 16px; }
}

/* ─────────────────────────────────────────
   PROJECTION YEARS - select natif visible
   ───────────────────────────────────────── */
.projection-years-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 11px;
  padding-right: 28px;
  cursor: pointer;
}
.projection-years-select:focus {
  outline: none;
  border-color: #c0120c;
  box-shadow: 0 0 0 3px rgba(192,18,12,0.10);
}

/* ─────────────────────────────────────────
   KEYMMO CUSTOM SELECT - km-sdrop
   ───────────────────────────────────────── */

/* Wrapper */
.km-sdrop {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  box-sizing: border-box;
}
.km-sdrop.km-sdrop--full,
.km-sdrop.km-sdrop--tp-input,
.km-sdrop.km-sdrop--tp-select {
  width: 100%;
  display: flex;
}

/* Native select hidden inside wrapper */
.km-sdrop > select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  pointer-events: none;
}

/* ── Trigger button ── */
.km-sdrop-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  color: #111;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.87rem;
  font-weight: 400;
  min-height: 40px;
  padding: 0 10px 0 13px;
  min-width: 120px;
  text-align: left;
  white-space: nowrap;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
  user-select: none;
  outline: none;
}
.km-sdrop-btn:hover { border-color: #d1d5db; }
.km-sdrop-btn:focus-visible { border-color: #c0120c; box-shadow: 0 0 0 3px rgba(192,18,12,.10); }
.km-sdrop.is-open .km-sdrop-btn {
  border-color: #c0120c;
  box-shadow: 0 0 0 3px rgba(192,18,12,.10);
}

/* Variants */
.km-sdrop--filter-select .km-sdrop-btn,
.km-sdrop--cand-filter-select .km-sdrop-btn {
  min-height: 36px;
  font-size: 0.85rem;
  border-radius: 8px;
  min-width: 110px;
}
.km-sdrop--tp-input .km-sdrop-btn,
.km-sdrop--tp-select .km-sdrop-btn {
  min-height: 40px;
  font-size: 0.88rem;
  border-width: 1.5px;
  border-radius: 8px;
  min-width: 0;
}
.km-sdrop--pd-fisc-tmi-select .km-sdrop-btn {
  min-height: 34px;
  font-size: 0.84rem;
  border-radius: 8px;
  min-width: 90px;
}
.toolbar-actions .km-sdrop .km-sdrop-btn {
  min-height: 42px;
  font-weight: 700;
}

/* Label span */
.km-sdrop-lbl {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

/* Chevron SVG */
.km-sdrop-chev {
  flex-shrink: 0;
  color: #9ca3af;
  transition: transform .18s;
}
.km-sdrop.is-open .km-sdrop-chev { transform: rotate(180deg); }

/* ── Dropdown Panel ── */
.km-sdrop-list {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 100%;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  z-index: 9999;
  padding: 5px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}
.km-sdrop-list.km-sdrop-list--up {
  top: auto;
  bottom: calc(100% + 5px);
}
.km-sdrop.is-open .km-sdrop-list {
  display: block;
  animation: kmFadeIn .12s ease;
}
@keyframes kmFadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Options ── */
.km-sdrop-opt {
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.86rem;
  color: #374151;
  line-height: 1.35;
  transition: background .09s;
  white-space: nowrap;
}
.km-sdrop-opt:hover,
.km-sdrop-opt.km-focus { background: #f4f5f7; color: #111; }
.km-sdrop-opt.is-active {
  background: #fff1f1;
  color: #c0120c;
  font-weight: 700;
}
.km-sdrop-opt.is-disabled { color: #d1d5db; cursor: default; }

/* Mobile */
@media (max-width: 600px) {
  .km-sdrop-btn { min-width: 0; }
  .km-sdrop-list { max-height: 220px; }
}

/* Dark-overlay overrides: sim-overlay context */
.sim-overlay .km-sdrop-btn {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}
.sim-overlay .km-sdrop-btn:hover { border-color: rgba(255, 255, 255, 0.28); }
.sim-overlay .km-sdrop.is-open .km-sdrop-btn {
  border-color: #c0120c;
  box-shadow: 0 0 0 3px rgba(192, 18, 12, 0.20);
}
.sim-overlay .km-sdrop-chev { color: rgba(255, 255, 255, 0.5); }
.sim-overlay .km-sdrop-list {
  background: #1e1e1e;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}
.sim-overlay .km-sdrop-opt { color: #e5e7eb; }
.sim-overlay .km-sdrop-opt:hover,
.sim-overlay .km-sdrop-opt.km-focus { background: rgba(255, 255, 255, 0.10); color: #fff; }
.sim-overlay .km-sdrop-opt.is-active { background: rgba(192, 18, 12, 0.25); color: #f87171; }

/* ─────────────────────────────────────────
   ONGLET FINANCIER - items en ligne
   ───────────────────────────────────────── */
.pdt-financial-grid .pd-info-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

.pdt-financial-grid .pd-info-item {
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f3f4f6;
}

.pdt-financial-grid .pd-info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.pdt-financial-grid .pd-info-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: none;
  letter-spacing: 0;
  flex: 1;
}

.pdt-financial-grid .pd-info-value {
  font-size: 0.87rem;
  font-weight: 600;
  color: #111;
  text-align: right;
  flex-shrink: 0;
}

.pdt-financial-grid .pd-info-value.pd-info-empty {
  color: #d1d5db !important;
  font-weight: 400 !important;
  font-style: italic;
}

.pdt-financial-grid .pdt-sub-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #111;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

/* ══════════════════════════════════════════════════════════════
   PUBLIC LISTING PAGE  —  pls-*
   Shell, header, listing detail, form, success
   ══════════════════════════════════════════════════════════════ */

.public-listing-shell {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  background: #f4f4f6;
  z-index: 1000;
}
.public-listing-shell.is-hidden { display: none; }

.pls-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.pls-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #111;
  color: #fff;
  padding: 0 32px;
  height: 60px;
  flex-shrink: 0;
}
.pls-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
}
.pls-brand-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}
.pls-brand strong {
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}
.pls-header-tag {
  font-size: 0.75rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Main layout */
.pls-main {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
  max-width: 1100px;
  width: 100%;
  margin: 32px auto;
  padding: 0 24px;
  flex: 1;
}

/* Listing column */
.pls-listing-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.pls-listing-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 24px;
}
.pls-listing-title-block { flex: 1; }
.pls-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 8px;
  line-height: 1.3;
}
.pls-location {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #777;
  font-size: 0.875rem;
}
.pls-price-block {
  text-align: right;
  flex-shrink: 0;
}
.pls-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: #c0392b;
}
.pls-price-unit {
  font-size: 0.9rem;
  color: #888;
  margin-left: 2px;
}
.pls-charges {
  font-size: 0.8rem;
  color: #999;
  margin-top: 2px;
}

/* Chips */
.pls-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pls-chip {
  display: inline-flex;
  align-items: center;
  background: #f0f0f2;
  color: #333;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
}
.pls-chip-dpe {
  background: #e6f4ec;
  color: #1a7c3e;
}

/* Sections */
.pls-section {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 20px 24px;
}
.pls-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #888;
  margin: 0 0 14px;
}
.pls-desc-text {
  font-size: 0.9rem;
  color: #444;
  line-height: 1.65;
  margin: 0;
}

/* Equipements grid */
.pls-eq-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pls-eq-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #333;
  background: #f7f7f9;
  border: 1px solid #e8e8e8;
  padding: 5px 12px;
  border-radius: 6px;
}
.pls-eq-item svg { color: #1a7c3e; flex-shrink: 0; }

/* Conditions */
.pls-conditions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pls-conditions li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}
.pls-conditions li:last-child { border-bottom: none; padding-bottom: 0; }
.pls-cond-key { color: #777; }
.pls-cond-val { color: #111; font-weight: 600; }

/* Form column */
.pls-form-col { display: flex; flex-direction: column; }
.pls-form-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 28px;
  position: sticky;
  top: 24px;
}
.pls-form-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111;
  margin: 0 0 6px;
}
.pls-form-sub {
  font-size: 0.82rem;
  color: #888;
  margin: 0 0 20px;
  line-height: 1.5;
}
.pls-form { display: flex; flex-direction: column; gap: 14px; }
.pls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pls-field { display: flex; flex-direction: column; gap: 5px; }
.pls-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pls-req { color: #c0392b; }
.pls-input {
  min-height: 40px;
  padding: 9px 12px;
  border: 1.5px solid #d8d8dc;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #111;
  background: #fafafa;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}
.pls-input:focus {
  outline: none;
  border-color: #c0392b;
  background: #fff;
}
.pls-textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  min-height: 90px;
}
.pls-form-error {
  background: #fef0ef;
  border: 1px solid #f5c6c3;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: #c0392b;
  line-height: 1.6;
}
.pls-submit-btn {
  height: 44px;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, opacity 0.18s;
  margin-top: 4px;
}
.pls-submit-btn:hover:not(:disabled) { background: #a93226; }
.pls-submit-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Success state */
.pls-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 10px;
  gap: 14px;
}
.pls-success-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a7c3e;
  margin: 0;
}
.pls-success-text {
  font-size: 0.875rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* Error / not-found states */
.pls-state-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 80px 24px;
  flex: 1;
}
.pls-state-page h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #111;
  margin: 0;
}
.pls-state-page p {
  color: #888;
  font-size: 0.9rem;
  margin: 0;
}
.pls-cta-btn {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 22px;
  background: #c0392b;
  color: #fff;
  text-decoration: none;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 8px;
  transition: background 0.18s;
}
.pls-cta-btn:hover { background: #a93226; }

/* Footer */
.pls-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: #111;
  color: #aaa;
  font-size: 0.8rem;
  padding: 16px 32px;
  margin-top: auto;
}
.pls-footer-link {
  color: #c0392b;
  text-decoration: none;
}
.pls-footer-link:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
  .pls-main { grid-template-columns: 1fr; }
  .pls-form-card { position: static; }
  .pls-listing-top { flex-direction: column; gap: 12px; }
  .pls-price-block { text-align: left; }
}
@media (max-width: 540px) {
  .pls-main { padding: 0 12px; margin: 16px auto; }
  .pls-row { grid-template-columns: 1fr; }
  .pls-header { padding: 0 16px; }
  .pls-listing-top, .pls-section, .pls-form-card { padding: 16px; }
}

/* ─── Tenant detail header — harmonized action buttons ─────────────── */
.td-header-actions button {
  min-height: 44px;
  height: 44px;
  padding: 0 18px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
}
.td-header-actions button.btn-primary {
  box-shadow: 0 2px 6px rgba(192, 18, 12, 0.22);
}
.td-header-actions button svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}


/* ══════════════════════════════════════════════════════════
   DASHBOARD — bouton demo
   ═══════════════════════════════════════════════════════ */
.db-empty-demo {
  display: block; margin: 10px auto 0;
  background: none; border: 1px solid var(--border, #e0e0e0);
  border-radius: 8px; padding: 0.55rem 1.4rem;
  font-size: 0.82rem; color: var(--text-muted, #888);
  cursor: pointer; transition: border-color .2s, color .2s;
}
.db-empty-demo:hover { border-color: var(--accent, #E02020); color: var(--accent, #E02020); }

/* ══════════════════════════════════════════════════════════
   SETTINGS — section sauvegarde & zone de danger
   ═══════════════════════════════════════════════════════ */
.sp-backup-section { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.sp-backup-info {
  font-size: .84rem; color: var(--text-secondary, #666);
  margin: 0 0 16px; line-height: 1.55;
}
.sp-backup-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-backup-btn { font-size: .84rem; padding: 0.5rem 1.2rem; }
.sp-import-label { cursor: pointer; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--border, #d1d5db);
  border-radius: 8px; padding: 0.5rem 1.1rem;
  font-size: .875rem; font-weight: 500;
  color: var(--text-primary, #111); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.btn-secondary:hover { border-color: #9ca3af; background: var(--hover-bg, #f5f5f5); }
.btn-danger {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1.5px solid #fca5a5;
  border-radius: 8px; padding: 0.5rem 1.1rem;
  font-size: .875rem; font-weight: 500;
  color: #b91c1c; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.btn-danger:hover { background: #fef2f2; border-color: #f87171; }
.sp-danger-card { border-color: #fde8e8; }
.sp-danger-title { color: #b91c1c; }
.sp-danger-title svg { color: #b91c1c; }
/* ── Ticket card redesign ── */
.maint-item-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.maint-item-header .maint-item-title { font-size: 0.95rem; font-weight: 700; color: var(--ink); flex: 1; min-width: 0; }
.maint-cancel-btn { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #ddd; background: transparent; color: #bbb; font-size: 0.68rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; padding: 0; line-height: 1; transition: background 0.12s, color 0.12s, border-color 0.12s; }
.maint-cancel-btn:hover { background: rgba(192,18,12,0.07); color: var(--brand); border-color: var(--brand); }
.maint-item-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.maint-meta-dot { font-size: 0.74rem; color: var(--muted); }
.maint-meta-dot::before { content: '\00B7'; margin-right: 4px; opacity: 0.5; }
.maint-item-meta-row > .maint-meta-dot:first-of-type::before { display: none; }

/* ── Badges de priorité ── */
.maint-prio-badge { display: inline-flex; align-items: center; font-size: 0.7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.maint-prio-low  { background: #f3f4f6; color: #6b7280; }
.maint-prio-med  { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; }
.maint-prio-high { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }

/* ── Boutons d'action compacts ── */
.maint-action-primary { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; background: var(--brand); color: #fff; border: none; border-radius: var(--radius-sm); font-size: 0.79rem; font-weight: 700; cursor: pointer; font-family: inherit; transition: opacity 0.15s; white-space: nowrap; }
.maint-action-primary:hover { opacity: 0.85; }
.maint-action-done { background: #16a34a; }
.maint-action-done:hover { opacity: 0.85; }
.maint-action-secondary { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 500; cursor: pointer; font-family: inherit; transition: background 0.12s, border-color 0.12s, color 0.12s; white-space: nowrap; }
.maint-action-secondary:hover { background: var(--surface-2); color: var(--ink); border-color: #bbb; }
.maint-action-danger { color: var(--brand); }
.maint-action-danger:hover { background: rgba(192,18,12,0.06); border-color: var(--brand); color: var(--brand); }

/* ── États vides ── */
.maint-empty-ico { color: #9ca3af; }
.maint-empty-cta { display: inline-flex; align-items: center; margin-top: 4px; height: 30px; padding: 0 14px; background: transparent; color: var(--brand); border: 1px solid var(--brand); border-radius: var(--radius-sm); font-size: 0.79rem; font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.12s; }
.maint-empty-cta:hover { background: rgba(192,18,12,0.06); }

/* ── Filtre reset masqué ── */
.works-reset-hidden { display: none !important; }

/* ── Responsive mobile 380px ── */
@media (max-width: 480px) {
  .maint-item-header { flex-wrap: wrap; }
  .maint-action-primary, .maint-action-secondary { flex: 1; justify-content: center; }
  .works-filters { flex-direction: column; align-items: stretch; }
  .filter-select, .tenant-reset-btn { width: 100%; }
}

/* ══════════════════════════════════════════════════════════
   FORM CONTROLS — modales formulaires
   ═══════════════════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
}
.form-control {
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(192,18,12,0.08);
}
textarea.form-control {
  height: auto;
  padding: 9px 11px;
  resize: vertical;
  line-height: 1.5;
}
.form-required { color: var(--brand); margin-left: 1px; }
.form-field-error {
  display: none;
  font-size: 0.76rem;
  color: var(--brand);
  margin-top: 2px;
}
.form-field-error.visible { display: block; }

/* ── Planifier intervention — helpers ── */
.modal-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.45;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.modal-subtitle strong { font-weight: 700; color: var(--ink); }
.modal-subtitle-prop { color: var(--muted); }

.pt-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pt-share-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.pt-share-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  font-weight: 500;
}
.pt-share-label input[type="checkbox"] {
  accent-color: var(--brand);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}
.pt-share-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 23px;
  line-height: 1.4;
}

/* Bouton confirmer désactivé tant que date vide */
.btn-primary:disabled,
.btn-primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 480px) {
  .pt-time-grid { grid-template-columns: 1fr; }
}

/* ── Inline SVG icons (icon() helper) ── */
.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.status-pill .ic { vertical-align: -1px; }

/* ── Auth shell mini-footer ── */
.auth-legal-footer {
  text-align: center;
  padding: 16px 20px;
  font-size: 0.72rem;
  color: #9ca3af;
  border-top: 1px solid rgba(15,23,42,.07);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-legal-footer a { color: #9ca3af; text-decoration: none; }
.auth-legal-footer a:hover { color: var(--brand); }

/* ── Pages légales publiques ── */
.legal-shell {
  min-height: calc(100vh - 80px);
  padding: 110px 24px 100px;
  background: #0a0a0a;
}
.legal-page {
  max-width: 940px;
  margin: 0 auto;
}

/* Bouton "Retour" — hérite primary-action + override spécifique */
.legal-back {
  margin-bottom: 26px;
  font-size: 0.83rem;
  padding: 10px 20px;
  text-decoration: none;
  display: inline-flex;
}
.legal-back:hover { text-decoration: none; opacity: 1; }

.legal-page h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.2;
}
.legal-date {
  font-size: 0.78rem;
  color: rgba(255,255,255,.35);
  margin-bottom: 48px;
  display: block;
}
.legal-page section { margin-bottom: 40px; }
.legal-page h2 {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.legal-page h3 {
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  margin: 20px 0 8px;
}
.legal-page p {
  font-size: 0.88rem;
  color: rgba(255,255,255,.55);
  line-height: 1.7;
  margin-bottom: 12px;
}
.legal-page ul { margin: 8px 0 14px 20px; }
.legal-page li {
  font-size: 0.88rem;
  color: rgba(255,255,255,.55);
  line-height: 1.7;
  margin-bottom: 6px;
}
.legal-page strong { color: rgba(255,255,255,.82); font-weight: 600; }

/* Liens internes uniquement — exclure le bouton primary-action */
.legal-page a:not(.primary-action) { color: #e55050; text-decoration: none; }
.legal-page a:not(.primary-action):hover { text-decoration: underline; color: #ff7070; }

@media (max-width: 480px) {
  .legal-shell { padding: 90px 18px 80px; }
  .legal-page h1 { font-size: 1.5rem; }
  .legal-back { padding: 9px 16px; font-size: 0.8rem; margin-bottom: 36px; }
}

/* ── Badge "Bientôt" ── */
.badge-bientot {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(192,18,12,.12);
  color: var(--brand);
  vertical-align: middle;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-bientot--dark {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.4);
}

/* ── Footer "Mode Entreprise" désactivé ── */
.footer-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.25);
  font-size: 0.88rem;
  cursor: default;
  user-select: none;
}
/* ═══════════════════════════════════════════════════════════════
   KEYMMO DATE PICKER — Calendrier custom, desktop uniquement
   ═══════════════════════════════════════════════════════════════ */
.km-dp-wrap { display: block; width: 100%; position: relative; }
.km-dp-input { cursor: pointer; caret-color: var(--ink,#050505); box-sizing: border-box; }
.km-dp-input[readonly] { cursor: pointer; }

.km-dp {
  position: fixed;
  z-index: 99999;
  background: var(--bg,#fff);
  border: 1px solid var(--line,#e8e8e8);
  border-radius: var(--radius-lg,12px);
  box-shadow: 0 8px 32px rgba(22,31,28,.18), 0 2px 8px rgba(22,31,28,.08);
  width: 272px;
  padding: 14px 12px 10px;
  display: none;
  font-family: inherit;
  font-size: .85rem;
  color: var(--ink,#050505);
  user-select: none;
  -webkit-user-select: none;
}
.km-dp.is-open { display: block; }

/* En-tête */
.km-dp-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.km-dp-nav {
  width: 28px; height: 28px;
  border: none; background: none; cursor: pointer;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink,#050505); font-size: .95rem; line-height: 1;
  transition: background .12s; flex-shrink: 0; font-family: inherit;
}
.km-dp-nav:hover { background: var(--surface-2,#f6f6f6); }
.km-dp-title {
  border: none; background: none; cursor: pointer;
  font-weight: 700; font-size: .85rem; color: var(--ink,#050505);
  padding: 4px 8px; border-radius: var(--radius-sm,6px);
  transition: background .12s; flex: 1; text-align: center; font-family: inherit;
}
.km-dp-title:hover { background: var(--surface-2,#f6f6f6); }

/* Ligne jours de semaine */
.km-dp-weekdays { display: grid; grid-template-columns: repeat(7,1fr); margin-bottom: 2px; }
.km-dp-weekdays span {
  text-align: center; font-size: .67rem; font-weight: 700;
  color: var(--muted,#5f5f5f); padding: 3px 0;
  text-transform: uppercase; letter-spacing: .04em;
}

/* Grille des jours */
.km-dp-days { display: grid; grid-template-columns: repeat(7,1fr); gap: 1px; }
.km-dp-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; cursor: pointer; font-size: .8rem; border: none;
  background: none; color: inherit; font-family: inherit;
  transition: background .1s, color .1s;
}
.km-dp-day:hover:not(.km-dp-day--sel):not(.km-dp-day--dis):not(.km-dp-day--other) {
  background: rgba(192,18,12,.09);
}
.km-dp-day--other { color: var(--muted,#5f5f5f); opacity: .35; pointer-events: none; }
.km-dp-day--today:not(.km-dp-day--sel) {
  color: var(--brand,#c0120c); font-weight: 700;
  box-shadow: inset 0 0 0 1.5px var(--brand,#c0120c);
}
.km-dp-day--sel { background: var(--brand,#c0120c); color: #fff; font-weight: 700; }
.km-dp-day--dis { opacity: .25; cursor: not-allowed; pointer-events: none; }

/* Grille des mois */
.km-dp-months { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; }
.km-dp-month {
  padding: 9px 4px; border-radius: var(--radius-sm,6px);
  text-align: center; cursor: pointer; font-size: .8rem;
  border: none; background: none; color: inherit; font-family: inherit;
  transition: background .1s;
}
.km-dp-month:hover:not(.km-dp-month--sel) { background: rgba(192,18,12,.09); }
.km-dp-month--sel { background: var(--brand,#c0120c); color: #fff; font-weight: 600; }

/* Grille des années */
.km-dp-years { display: grid; grid-template-columns: repeat(4,1fr); gap: 3px; max-height: 168px; overflow-y: auto; }
.km-dp-year {
  padding: 7px 2px; border-radius: var(--radius-sm,6px);
  text-align: center; cursor: pointer; font-size: .78rem;
  border: none; background: none; color: inherit; font-family: inherit;
  transition: background .1s;
}
.km-dp-year:hover:not(.km-dp-year--sel) { background: rgba(192,18,12,.09); }
.km-dp-year--sel { background: var(--brand,#c0120c); color: #fff; font-weight: 600; }

/* Pied */
.km-dp-ft {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line,#e8e8e8);
}
.km-dp-ft-btn {
  border: none; background: none; cursor: pointer;
  font-size: .75rem; font-weight: 600; color: var(--brand,#c0120c);
  padding: 2px 0; font-family: inherit; transition: opacity .12s;
}
.km-dp-ft-btn:hover { opacity: .72; }

/* ── Datepicker — icône calendrier + saisie manuelle ─────────────────
   Le champ texte laisse de la place à droite pour le bouton icône.
   L'icône est positionnée en absolu dans .km-dp-wrap (position:relative).
──────────────────────────────────────────────────────────────────────── */
.km-dp-wrap .km-dp-input { padding-right: 34px; }

.km-dp-cal-btn {
  position: absolute;
  right: 5px;
  top: 0;
  height: var(--input-height, 44px);
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  color: var(--muted, #5f5f5f);
  border-radius: var(--radius, 8px);
  transition: color 0.15s;
  flex-shrink: 0;
}
.km-dp-cal-btn:hover { color: var(--brand, #c0120c); }
.km-dp-cal-btn:focus-visible {
  outline: 2px solid var(--brand, #c0120c);
  outline-offset: 1px;
}

.km-dp-input.km-dp-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}
.km-dp-err {
  display: block;
  font-size: 0.72rem;
  color: #dc2626;
  margin-top: 3px;
  line-height: 1.3;
}

/* ── Checkbox & radio — thème Keymmo ──────────────────────────────────
   Sources du halo corrigées : .form-field input:focus, .oob-field input:focus,
   .fiscal-config-modal input:focus appliquent box-shadow à TOUS les inputs.
   Ces règles sont plus spécifiques ou en cascade-finale, donc elles gagnent.
──────────────────────────────────────────────────────────────────────── */
input[type="checkbox"],
input[type="radio"] {
  accent-color: #c0120c;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  outline: none;
  box-shadow: none;
}

input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible {
  outline: 2px solid #c0120c;
  outline-offset: 2px;
  box-shadow: none;
}

/* ── Galerie photos / carrousel (annonce publique + aperçu modal) ─────── */
.pls-gallery        { margin: 0 0 28px; }

/* Conteneur principal — ratio 16/10, coins ronds, overflow caché */
.pls-gallery-main {
  position: relative; aspect-ratio: 16/10;
  overflow: hidden; border-radius: 10px;
  background: #e8e8e8; outline: none;
}
.pls-gallery-main img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  cursor: zoom-in; transition: opacity .18s;
}

/* Flèches latérales */
.pls-gal-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff;
  border: none; cursor: pointer; padding: 0;
  font-size: 1.6rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: background .15s; user-select: none;
}
.pls-gal-arrow:hover { background: rgba(0,0,0,.72); }
.pls-gal-prev { left: 10px; }
.pls-gal-next { right: 10px; }

/* Compteur "1 / 4" */
.pls-gal-counter {
  position: absolute; top: 9px; right: 10px;
  background: rgba(0,0,0,.45); color: rgba(255,255,255,.9);
  font-size: .68rem; font-weight: 500;
  padding: 2px 9px; border-radius: 99px;
  pointer-events: none;
}

/* Points indicateurs */
.pls-gal-dots {
  position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 2;
}
.pls-gal-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.45); cursor: pointer;
  transition: background .15s, transform .15s;
}
.pls-gal-dot.active { background: #fff; transform: scale(1.25); }

/* Thumbnails */
.pls-gallery-thumbs {
  display: flex; gap: 6px; margin-top: 6px;
  overflow-x: auto; scrollbar-width: thin;
}
.pls-gal-thumb {
  width: 72px; height: 54px; object-fit: cover; border-radius: 4px;
  cursor: pointer; opacity: .55; flex-shrink: 0;
  border: 2px solid transparent;
  transition: opacity .15s, border-color .15s;
}
.pls-gal-thumb.active,
.pls-gal-thumb:hover  { opacity: 1; border-color: #c0120c; }

/* Placeholder sans photos */
.pls-gallery-empty {
  aspect-ratio: 16/10; background: #f4f4f4; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px;
  color: #bbb; font-size: .82rem; margin-bottom: 24px;
}
@media (prefers-color-scheme: dark) {
  .pls-gallery-main { background: #1a1a1a; }
  .pls-gallery-empty { background: #1e1e1e; color: #555; }
}

/* ── Lightbox plein écran ─────────────────────────────────────────────── */
.pls-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.pls-lightbox-bg   { position: absolute; inset: 0; background: rgba(0,0,0,.92); cursor: pointer; }
.pls-lightbox-img  {
  position: relative; max-width: 92vw; max-height: 88vh;
  object-fit: contain; border-radius: 6px;
}
.pls-lightbox-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; color: #fff;
  font-size: 1.6rem; line-height: 1; padding: 4px 8px;
  cursor: pointer; z-index: 1;
}
.pls-lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.14); color: #fff; border: none;
  font-size: 2rem; width: 50px; height: 50px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 1; transition: background .15s; user-select: none; padding: 0;
}
.pls-lightbox-arrow:hover { background: rgba(255,255,255,.28); }
.pls-lightbox-prev { left: 18px; }
.pls-lightbox-next { right: 18px; }
.pls-lightbox-counter {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.6); font-size: .78rem; pointer-events: none;
}
/* ── Multi-photo grid (modal bien) ───────────────────────────────────── */
.mphotos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.mphoto-item {
  position: relative; border-radius: 6px; overflow: hidden;
  border: 1px solid #e0e0e0;
}
.mphoto-thumb {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block;
}
.mphoto-badge {
  position: absolute; top: 5px; left: 5px;
  background: #c0120c; color: #fff;
  font-size: .6rem; font-weight: 700; padding: 2px 6px;
  border-radius: 3px; text-transform: uppercase; letter-spacing: .03em;
  pointer-events: none;
}
.mphoto-setmain {
  position: absolute; top: 5px; left: 5px;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: .6rem; border: none; padding: 2px 6px;
  border-radius: 3px; cursor: pointer; display: none;
}
.mphoto-item:hover .mphoto-setmain { display: block; }
.mphoto-delete {
  position: absolute; top: 5px; right: 5px;
  background: rgba(0,0,0,.5); color: #fff;
  font-size: .7rem; border: none; padding: 1px 5px;
  border-radius: 3px; cursor: pointer; display: none; line-height: 1.4;
}
.mphoto-item:hover .mphoto-delete { display: block; }

.mphotos-storage       { font-size: .76rem; color: #888; }
.mphotos-storage--warn { color: #c0120c; font-weight: 600; }

/* ── Convert-to-tenant modal (ctm-*) ───────────────────────── */
.ctm-box { max-width: 580px; }
.ctm-section-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #9ca3af; margin: 16px 0 10px; }
.ctm-err { color: #c0120c; font-size: 0.82rem; margin-top: 8px; }

.ctm-success-row { display: flex; align-items: flex-start; gap: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; padding: 12px 14px; font-size: 0.88rem; color: #374151; }

.ctm-invite-block { background: var(--bg-2,#f9fafb); border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ctm-invite-url-row { display: flex; gap: 8px; }
.ctm-invite-url-input { flex: 1; min-width: 0; font-size: 0.78rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface,#fff); color: #374151; }
.ctm-copy-btn { font-size: 0.8rem; min-height: 36px; padding: 0 12px; flex-shrink: 0; }
.ctm-invite-hint { font-size: 0.78rem; color: #6b7280; line-height: 1.5; margin: 0; }

.ctm-check-row { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: #374151; cursor: pointer; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface,#fff); }
.ctm-check-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); flex-shrink: 0; cursor: pointer; }

/* Pending-tenant CTA inside candidate card */
.cand-tenant-cta { display: flex; align-items: center; gap: 8px; padding-top: 4px; }
.cand-tenant-cta-label { font-size: 0.7rem; font-weight: 700; color: #c0120c; background: #fff1f1; border-radius: 5px; padding: 2px 7px; white-space: nowrap; flex-shrink: 0; }
.cand-btn-create-tenant { flex: 1; padding: 5px 8px; border-radius: 7px; background: #E02020; color: #fff; border: none; font-size: 0.75rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cand-btn-create-tenant:hover { background: #c0120c; }
.cand-btn-view-tenant { padding: 5px 10px; border-radius: 7px; background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; font-size: 0.75rem; cursor: pointer; white-space: nowrap; width: 100%; text-align: center; }
.cand-btn-view-tenant:hover { background: #e5e7eb; }

/* ── Delete-tenant modal (dtm-*) ───────────────────────── */
.dtm-box { max-width: 500px; }
.dtm-warning { font-size: 0.88rem; color: #374151; line-height: 1.6; margin: 0 0 4px; }
.dtm-section { margin-top: 14px; }
.dtm-section-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #9ca3af; margin: 0 0 8px; }
.dtm-doc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 180px; overflow-y: auto; }
.dtm-doc-item { display: flex; align-items: baseline; gap: 6px; font-size: 0.83rem; color: #374151; padding: 5px 8px; background: #f9fafb; border-radius: 6px; }
.dtm-doc-date { font-size: 0.75rem; color: #9ca3af; }
.dtm-no-docs { font-size: 0.85rem; color: #6b7280; margin: 8px 0 0; }
.dtm-choice { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.dtm-choice-opt { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line, #e5e7eb); border-radius: 8px; cursor: pointer; transition: border-color .12s; }
.dtm-choice-opt input[type="radio"] { margin-top: 3px; flex-shrink: 0; accent-color: var(--brand, #E02020); }
.dtm-choice-opt > div { display: flex; flex-direction: column; gap: 2px; }
.dtm-choice-opt strong { font-size: 0.87rem; color: #111; }
.dtm-choice-opt span { font-size: 0.78rem; color: #6b7280; }
.dtm-choice-selected { border-color: var(--brand, #E02020) !important; background: #fff8f8; }
.dtm-confirm-btn { background: #c0120c; color: #fff; border: none; border-radius: 8px; padding: 0 16px; min-height: 40px; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.dtm-confirm-btn:hover { background: #a00f09; }

/* ── Orphan-docs block in settings (sp-orphan-*) ─────── */
.sp-orphan-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; max-height: 200px; overflow-y: auto; }
.sp-orphan-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.82rem; color: #374151; padding: 5px 8px; background: #f9fafb; border-radius: 6px; }
.sp-orphan-meta { font-size: 0.74rem; color: #9ca3af; flex-shrink: 0; }
.sp-orphan-clean { font-size: 0.85rem; color: #6b7280; margin: 4px 0 0; }
.sp-orphan-delete-btn { background: none; border: 1.5px solid #fca5a5; border-radius: 8px; padding: 0.5rem 1.1rem; font-size: .875rem; font-weight: 500; color: #b91c1c; cursor: pointer; }
.sp-orphan-delete-btn:hover { background: var(--danger-bg); border-color: #f87171; }

/* ── Copropriété — formulaire modal (mp-copro-*) ─────── */
.mp-copro-block { margin-top: 4px; }
.mp-copro-toggle-row { display: flex; align-items: center; margin-bottom: 4px; }
.mp-copro-toggle-label { display: flex; align-items: center; gap: 8px; font-size: 0.87rem; font-weight: 600; color: #111; cursor: pointer; user-select: none; }
.mp-copro-toggle-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand, #E02020); flex-shrink: 0; cursor: pointer; }
.mp-copro-fields { margin-top: 12px; padding: 14px; background: var(--bg-2, #f9fafb); border: 1px solid var(--line, #e5e7eb); border-radius: 10px; display: flex; flex-direction: column; gap: 0; }
.mp-copro-subheader { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #9ca3af; margin: 0 0 6px; }

/* ── Thème sombre — couleurs sémantiques ──────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --success: #4ade80;
    --success-bg: #052e16;
    --warning: #fbbf24;
    --warning-bg: #231c00;
    --danger-bg: #450a0a;
  }
}
:root[data-theme="dark"] {
  --success: #4ade80;
  --success-bg: #052e16;
  --warning: #fbbf24;
  --warning-bg: #231c00;
  --danger-bg: #450a0a;
}

/* ── Modale d'avertissement d'inactivité ────────────────────────────────────── */
#idle-warn-modal { display: none; position: fixed; inset: 0; z-index: 99999; }
.idle-warn-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: center; justify-content: center;
}
.idle-warn-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px 28px 28px;
  max-width: 360px; width: 90%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.18);
  text-align: center;
}
.idle-warn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: #fff3f3; color: var(--brand);
  margin-bottom: 16px;
}
.idle-warn-title {
  margin: 0 0 10px; font-size: 1.05rem; font-weight: 700; color: #1e293b;
}
.idle-warn-body {
  margin: 0 0 24px; color: #64748b; font-size: 0.9rem; line-height: 1.55;
}
.idle-warn-btn {
  display: block; width: 100%;
  background: var(--brand); color: #fff; border: none; border-radius: 9px;
  padding: 12px 24px; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: background 150ms;
  font-family: inherit;
}
.idle-warn-btn:hover { background: #a00f09; }
@media (prefers-color-scheme: dark) {
  .idle-warn-card { background: #1e293b; }
  .idle-warn-icon { background: rgba(192,18,12,0.15); }
  .idle-warn-title { color: #f1f5f9; }
  .idle-warn-body { color: #94a3b8; }
}
:root[data-theme="dark"] .idle-warn-card { background: #1e293b; }
:root[data-theme="dark"] .idle-warn-icon { background: rgba(192,18,12,0.15); }
:root[data-theme="dark"] .idle-warn-title { color: #f1f5f9; }
:root[data-theme="dark"] .idle-warn-body { color: #94a3b8; }

/* ══════════════════════════════════════════════════════
   BIBLIOTHÈQUE DE MODÈLES DE DOCUMENTS
   ══════════════════════════════════════════════════════ */

/* Onglets catégories */
.dm-tabs {
  display: flex; gap: 6px; margin: 0 0 28px; flex-wrap: wrap;
}
.dm-tab {
  background: #f1f3f5; border: 1px solid #e2e5e9; color: #555;
  font-size: 0.88rem; font-weight: 600; padding: 8px 18px;
  border-radius: 99px; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background 160ms, color 160ms, border-color 160ms;
}
.dm-tab--active {
  background: #c0120c; color: #fff; border-color: #c0120c;
}
.dm-tab:not(.dm-tab--active):not(:disabled):hover {
  background: #e2e5e9; color: #222;
}
.dm-tab--soon, .dm-tab:disabled {
  opacity: 0.45; cursor: default;
}
.dm-tab-badge {
  font-size: 0.68rem; font-weight: 700; background: #e9ecef;
  color: #666; padding: 1px 7px; border-radius: 99px;
}

/* Grille modèles */
.dm-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 28px;
}
.dm-card {
  display: flex; align-items: center; gap: 16px;
  background: #fff; border: 1px solid #e2e5e9; border-radius: 12px;
  padding: 18px 16px; text-align: left; cursor: pointer;
  font-family: inherit; transition: border-color 160ms, box-shadow 160ms;
  width: 100%;
}
.dm-card:hover:not(:disabled) {
  border-color: #bbb; box-shadow: 0 3px 12px rgba(0,0,0,.07);
}
.dm-card:disabled, .dm-card--soon {
  opacity: 0.45; cursor: default;
}
.dm-card-icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px;
  background: #f7f8f9; border: 1px solid #e8eaed;
  display: flex; align-items: center; justify-content: center; color: #333;
}
.dm-card-body { flex: 1; min-width: 0; }
.dm-card-title {
  font-size: 0.92rem; font-weight: 700; color: #111; margin: 0 0 4px; line-height: 1.3;
}
.dm-card-desc {
  font-size: 0.8rem; color: #777; line-height: 1.4; margin: 0;
}
.dm-card-arrow { flex-shrink: 0; color: #bbb; }

/* Disclaimer */
.dm-disclaimer {
  font-size: 0.78rem; color: #aaa; text-align: center; margin-top: 8px;
}

/* Modal formulaire */
#dmFormModal {
  display: none; position: fixed; inset: 0; z-index: 9000;
}
.dm-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px; overflow-y: auto;
}
.dm-modal-panel {
  background: #fff; border-radius: 16px; width: 100%; max-width: 640px;
  box-shadow: 0 12px 48px rgba(0,0,0,.2); display: flex; flex-direction: column;
  margin: auto;
}
.dm-modal-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 24px 24px 16px; border-bottom: 1px solid #f0f0f0;
}
.dm-modal-title { font-size: 1.05rem; font-weight: 700; color: #111; margin: 0 0 4px; }
.dm-modal-subtitle { font-size: 0.82rem; color: #888; margin: 0; }
.dm-modal-close {
  flex-shrink: 0; background: none; border: none; font-size: 1.4rem; color: #aaa;
  cursor: pointer; line-height: 1; padding: 2px 6px; border-radius: 6px;
}
.dm-modal-close:hover { background: #f0f0f0; color: #555; }
.dm-modal-body { padding: 20px 24px; overflow-y: auto; max-height: 60vh; }
.dm-modal-footer {
  padding: 16px 24px; border-top: 1px solid #f0f0f0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.dm-modal-footer-btns { display: flex; gap: 10px; }

/* Formulaire */
.dm-form { display: flex; flex-direction: column; gap: 14px; }
.dm-form-row { display: flex; gap: 14px; }
.dm-form-row .dm-form-group { flex: 1; }
.dm-form-group { display: flex; flex-direction: column; gap: 5px; }
.dm-form-label { font-size: 0.82rem; font-weight: 600; color: #444; }
.dm-form-input, .dm-form-select {
  border: 1px solid #d8dde2; border-radius: 8px; padding: 9px 12px;
  font-size: 0.88rem; color: #111; font-family: inherit; background: #fff;
  transition: border-color 150ms, box-shadow 150ms; width: 100%;
}
.dm-form-input:focus, .dm-form-select:focus {
  outline: none; border-color: #333; box-shadow: 0 0 0 3px rgba(0,0,0,.07);
}
.dm-form-ta { resize: vertical; min-height: 64px; }
.dm-form-hint { font-size: 0.78rem; color: #888; font-weight: 600; margin-top: 4px; }
.dm-charges-line .dm-form-group:first-child { flex: 2; }
.dm-form-hint--warn { color: #c0120c; font-weight: 600; }
.dm-form-warning {
  background: #fff3cd; border-left: 4px solid #e65100;
  padding: 10px 14px; margin-bottom: 2px; font-size: 12.5px; border-radius: 4px;
}
.dm-form-warning strong { display: block; margin-bottom: 4px; }
.dm-form-half { flex: 0 0 calc(50% - 7px); max-width: calc(50% - 7px); }
.dm-irl-preview {
  background: #f0f7ff; border: 1px solid #b8d8f8; border-radius: 8px;
  padding: 10px 14px; font-size: 0.85rem; color: #1a4f8a;
}
.dm-save-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: #666; cursor: pointer;
}
.dm-save-label input[type=checkbox] { accent-color: #111; }

/* ── États des lieux ──────────────────────────────────────────────────────── */
.edl-section { margin-bottom: 16px; }
.edl-section-title {
  font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; color: #333; border-bottom: 1px solid #ddd;
  padding-bottom: 4px; margin-bottom: 8px;
}
.edl-piece {
  border: 1px solid #ddd; border-radius: 6px;
  padding: 10px 12px; margin-bottom: 10px; background: #fafafa;
}
.edl-piece-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.edl-piece-header .edl-piece-name { flex: 1; font-weight: 600; }
.edl-elem-header {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 4px; font-size: 0.72rem; font-weight: 700;
  color: #555; margin-bottom: 4px; padding: 0 2px;
}
.edl-piece[data-sortie="1"] .edl-elem-header {
  grid-template-columns: 140px 1fr 1fr 1fr;
}
.edl-elem-row {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 4px; margin-bottom: 4px; align-items: center;
}
.edl-piece[data-sortie="1"] .edl-elem-row {
  grid-template-columns: 140px 1fr 1fr 1fr;
}
.edl-elem-label { font-size: 0.82rem; color: #333; }
.edl-etat-select, .edl-etat-entree, .edl-commentaire {
  font-size: 0.8rem !important; padding: 3px 6px !important; height: auto !important;
}
.edl-remove-btn {
  background: none; border: 1px solid #ccc; color: #888;
  border-radius: 4px; cursor: pointer; font-size: 0.75rem;
  padding: 1px 6px; line-height: 1.4; flex-shrink: 0;
}
.edl-remove-btn:hover { background: #fee; border-color: #c00; color: #c00; }
.edl-add-piece-btn {
  background: #f4f4f4; border: 1px dashed #bbb; color: #555;
  border-radius: 6px; cursor: pointer; font-size: 0.8rem;
  padding: 6px 14px; margin-top: 4px; width: 100%;
  transition: background .15s;
}
.edl-add-piece-btn:hover { background: #e8e8e8; }

/* ═══════════════════════════════════════════════════════════════════
   HARMONISATION DES BOUTONS D'ACTION — gabarit unique
   Référence : #logoutButtonTopbar (.secondary-action topbar)
   Gabarit   : font-size 0.875rem | font-weight 600 | min-height 44px
               padding 0 14px | border-radius 10px | gap 8px
   → Seule la typo + le gabarit sont unifiés ; couleurs inchangées.
   Exceptions : .icon-button, .mini-button, .auth-*, landing-page CTAs,
                toggles (.pbt-btn/.sbt-btn), sidebar nav, .tp-btn-sm,
                .tpc-btn, .cal-action-btn, .fex-btn, .maint-action-*,
                templates impression (pb-btn, cl-btn, inline print).
   ════════════════════════════════════════════════════════════════════ */

/* 1. .btn-primary — padding, radius et font-size cohérents */
.btn-primary {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.875rem;
}

/* 2. .btn-secondary — height, radius, font-weight harmonisés */
.btn-secondary {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
}

/* 3. .btn-danger — idem .btn-secondary */
.btn-danger {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
}

/* 4. .sp-backup-btn ne réduit plus la taille héritée de .btn-secondary */
.sp-backup-btn {
  font-size: 0.875rem;
  padding: 0 14px;
}

/* 5. Empty-state CTA dashboard */
.db-empty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.875rem;
}

/* 6. Bouton démo (dashboard) — même gabarit, reste moins prominent par sa couleur */
.db-empty-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* 7. Bouton retour / action dans le panneau Documents */
.documents-back-button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* 8. Boutons pied de modale documents (fex-fdoc) */
.fex-fdoc-modal-foot button {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* 9. Header fiche locataire — padding et radius alignés */
.td-header-actions button {
  padding: 0 14px;
  border-radius: 10px;
}

/* 10. Boutons portail locataire (espace propriétaire côté owner) */
.tp-btn-primary,
.tp-btn-ghost,
.tp-btn-danger {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* 11. Modales verrouillage fiscal */
.fisc-lock-btn-primary,
.fisc-lock-btn-sec {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* 12. Modale suppression locataire */
.dtm-confirm-btn {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.875rem;
}

/* 13. .tp-btn-sm (boutons "Fermer ✕" / "Annuler" compacts dans les en-têtes de modales)
       Doit rester petit — on réaffirme ses valeurs après les règles ci-dessus */
.tp-btn-sm {
  min-height: 0;
  padding: 5px 11px;
  font-size: 0.78rem;
}
