/* App privée — feuille de styles unique, sans dépendance */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --faint: #98a2b3;

  --primary: #0f766e;
  --primary-600: #0d9488;
  --primary-800: #115e59;
  --primary-50: #f0fdfa;
  --primary-100: #ccfbf1;

  --danger: #b42318;
  --danger-50: #fef3f2;
  --danger-200: #fecdca;
  --warning: #b54708;
  --warning-50: #fffaeb;
  --warning-200: #fedf89;
  --success: #067647;
  --success-50: #ecfdf3;
  --success-200: #abefc6;
  --info: #175cd3;
  --info-50: #eff8ff;
  --info-200: #b2ddff;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .10);
  --sidebar-w: 252px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; line-height: 1.25; margin: 0 0 .2rem; letter-spacing: -.015em; }
h2 { font-size: 1.05rem; margin: 0; display: flex; align-items: center; gap: .45rem; }
h3, .h3 { font-size: .98rem; margin: 0 0 .25rem; }
.h4 { font-size: .9rem; margin: 0 0 .4rem; display: flex; align-items: center; gap: .4rem; }
p { margin: 0 0 .5rem; }
code { font-family: var(--mono); font-size: .84em; background: var(--surface-2); border: 1px solid var(--border); padding: .05rem .35rem; border-radius: 5px; word-break: break-all; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.block { display: block; }
.grow { flex: 1; text-align: left; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.mt-2 { margin-top: .75rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1.5rem; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.stack-lg { display: flex; flex-direction: column; gap: 1.5rem; }
.actions-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------- Structure ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 40; transition: transform .2s ease;
}
.sidebar-head { display: flex; align-items: center; gap: .25rem; padding-right: .6rem; }
.brand { display: flex; align-items: center; gap: .65rem; padding: 1.15rem 1.25rem; font-weight: 700; font-size: 1.05rem; color: var(--text); }
.sidebar-head .brand { flex: 1; min-width: 0; padding-right: .25rem; }
.sidebar-head .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-close { color: var(--muted); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: .78rem; font-weight: 800; letter-spacing: .03em;
}
.nav { padding: .25rem .75rem 1rem; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); padding: 1rem .65rem .35rem; font-weight: 700; }
.nav-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; font-size: .93rem; }
.nav-item:hover { background: var(--surface-2); text-decoration: none; }
.nav-item.active { background: var(--primary-50); color: var(--primary-800); font-weight: 600; }
.nav-item.active .icon { color: var(--primary); }
.nav-item.disabled { color: var(--faint); cursor: default; }
.nav-item.disabled:hover { background: transparent; }
.nav .soon { margin-left: auto; font-size: .66rem; border: 1px solid var(--border); color: var(--faint); padding: 0 .4rem; border-radius: 999px; font-weight: 600; }
.nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: .72rem; border-radius: 999px; padding: 0 .45rem; font-weight: 700; min-width: 1.3rem; text-align: center; }
.sidebar-footer { border-top: 1px solid var(--border); padding: .85rem 1rem; display: flex; align-items: center; gap: .65rem; }
.user-meta { min-width: 0; flex: 1; line-height: 1.3; }
.user-meta strong { display: block; font-size: .87rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: .77rem; color: var(--muted); }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--primary-100); color: var(--primary-800);
  display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; overflow: hidden; flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 30px; height: 30px; font-size: .72rem; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; align-items: center; gap: .6rem; padding: .6rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }

/* Menu latéral fermé sur ordinateur : la barre du haut permet de le rouvrir, la page prend la largeur libérée. */
@media (min-width: 961px) {
  .main { transition: margin-left .2s ease; }
  body.nav-collapsed .sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  body.nav-collapsed .main { margin-left: 0; }
  body.nav-collapsed .topbar { display: flex; padding: .6rem 1.25rem; }
  body.nav-collapsed .content { max-width: 1480px; margin-inline: auto; }
}
.backdrop { display: none; }
.content { padding: 2rem 2.25rem 3rem; max-width: 1240px; width: 100%; }
.demo-banner { background: var(--warning-50); color: var(--warning); border-bottom: 1px solid var(--warning-200); padding: .5rem 2.25rem; font-size: .85rem; display: flex; gap: .5rem; align-items: center; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-header p { margin: 0; color: var(--muted); }
.back-link { display: inline-block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-header p { margin: .15rem 0 0; }
.card-body { padding: 1.25rem; }
.card-footer { display: flex; justify-content: flex-end; gap: .75rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; padding: 0 1.25rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-highlight { border-color: var(--primary-600); box-shadow: 0 0 0 3px var(--primary-50); }
.border-top { border-top: 1px solid var(--border); }
.split { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.danger-zone { border-color: var(--danger-200); }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.card-body.grid { gap: 1.5rem; }

/* ---------- Indicateurs ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .2rem; color: inherit; }
.stat-link:hover { text-decoration: none; border-color: var(--border-strong); }
.stat-label { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.stat-label .icon { width: 16px; height: 16px; }
.stat-value { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-value-sm { font-size: 1.2rem; }
.stat-hint { font-size: .78rem; color: var(--muted); }
.stat.is-alert { border-color: var(--danger-200); }
.stat.is-alert .stat-value { color: var(--danger); }

.progress { width: 160px; height: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }

/* ---------- Étapes ---------- */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: .9rem; align-items: center; padding: .8rem 1.25rem; border-bottom: 1px solid var(--border); }
.steps li:last-child { border-bottom: 0; }
.step-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex: none; font-size: .78rem; font-weight: 700; color: var(--muted); }
.step-dot .icon { width: 15px; height: 15px; stroke-width: 3; }
.steps li.done .step-dot { background: var(--success); border-color: var(--success); color: #fff; }
.steps li.done .step-title { color: var(--muted); }
.step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.step-title { font-weight: 600; }
.step-text { font-size: .85rem; color: var(--muted); }

/* ---------- Listes ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: .85rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list li.wrap { flex-wrap: wrap; }
.list-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.list-icon.in { background: var(--success-50); color: var(--success); }
.list-icon.out { background: var(--warning-50); color: var(--warning); }
.list-icon.teal { background: var(--primary-50); color: var(--primary); }
.list-icon.neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.list-main { flex: 1; min-width: 0; }
.list-main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-main span { font-size: .84rem; color: var(--muted); }
.list-end { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.date-chip { width: 44px; flex: none; text-align: center; border: 1px solid var(--border); border-radius: 10px; padding: .2rem 0; font-size: .7rem; color: var(--muted); line-height: 1.2; text-transform: uppercase; }
.date-chip strong { display: block; font-size: 1.05rem; color: var(--text); }
.day-group { padding: .55rem 1.25rem; background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: .8rem; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }

.empty { text-align: center; padding: 2.5rem 1.25rem; color: var(--muted); font-size: .9rem; }
.empty .icon { width: 30px; height: 30px; margin: 0 auto .5rem; color: var(--faint); display: block; }
.empty strong { display: block; color: var(--text-2); margin-bottom: .2rem; font-size: .95rem; }
.empty.small { padding: 1.5rem; }

.kv { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.5rem; margin: 0; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.kv-4 { grid-template-columns: auto 1fr auto 1fr; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .55rem .95rem; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2); font: inherit; font-weight: 600; font-size: .9rem;
  cursor: pointer; white-space: nowrap; line-height: 1.2; text-decoration: none; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:focus-visible { outline: 3px solid rgba(13, 148, 136, .3); outline-offset: 1px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-800); border-color: var(--primary-800); }
.btn-danger { color: var(--danger); border-color: var(--danger-200); }
.btn-danger:hover { background: var(--danger-50); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: .38rem .7rem; font-size: .82rem; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-icon { padding: .45rem; }
.btn-block { width: 100%; }
.btn-left { justify-content: flex-start; gap: .7rem; }
.btn-google { width: 100%; padding: .8rem; font-size: .97rem; gap: .75rem; }
.btn-google svg { width: 20px; height: 20px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge .icon { width: 13px; height: 13px; stroke-width: 3; }
.badge-lg { font-size: .85rem; padding: .3rem .8rem; }
.badge-green { background: var(--success-50); color: var(--success); border-color: var(--success-200); }
.badge-orange { background: var(--warning-50); color: var(--warning); border-color: var(--warning-200); }
.badge-red { background: var(--danger-50); color: var(--danger); border-color: var(--danger-200); }
.badge-gray { background: #f2f4f7; color: var(--muted); }
.badge-blue { background: #eff8ff; color: #175cd3; border-color: #b2ddff; }
.card-attention { border-color: var(--warning-200); }
.ical-feeds li { align-items: flex-start; gap: 1rem; }
.ical-feeds .list-main { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.ical-url { overflow-wrap: anywhere; }
.statement-note { margin: 0; padding-top: .5rem; }
.amount-inline { display: inline-flex; gap: .35rem; margin-top: .35rem; justify-content: flex-end; }
.amount-inline input { width: 7.5rem; }
.channel-airbnb { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.channel-booking { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.channel-direct { background: var(--primary-50); color: var(--primary-800); border-color: var(--primary-100); }
.channel-vrbo { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }
.channel-other { background: #f2f4f7; color: #475467; border-color: #e4e7ec; }
.role-admin { background: #f4f3ff; color: #5925dc; border-color: #d9d6fe; }
.role-owner { background: var(--info-50); color: var(--info); border-color: var(--info-200); }
.role-provider { background: var(--primary-50); color: var(--primary-800); border-color: var(--primary-100); }

/* ---------- Alertes ---------- */
.alert { display: flex; gap: .65rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid; font-size: .9rem; margin-bottom: 1rem; }
.alert .icon { margin-top: .1rem; }
.alert-success { background: var(--success-50); border-color: var(--success-200); color: #05603a; }
.alert-error { background: var(--danger-50); border-color: var(--danger-200); color: #912018; }
.alert-warning { background: var(--warning-50); border-color: var(--warning-200); color: #93370d; }
.alert-info { background: var(--info-50); border-color: var(--info-200); color: #1849a9; }
.btn-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ---------- Onglets, recherche ---------- */
.tabs { display: flex; gap: .15rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: .8rem .85rem; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--primary-800); border-bottom-color: var(--primary); }
.tab-count { font-size: .72rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0 .4rem; margin-left: .2rem; }
.search { padding: .6rem 0; }
.search input { width: 260px; }
.inline-form { display: flex; gap: .5rem; align-items: center; }
.inline-form select { width: auto; max-width: 100%; padding: .38rem .6rem; font-size: .85rem; }
/* Sur téléphone, le texte d'à côté passe à la ligne au lieu de sortir de l'écran. */
.inline-form-wrap { flex-wrap: wrap; }

/* ---------- Tableaux ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: .65rem 1.25rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.table td { padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table th.num { text-align: right; }
.table .actions { text-align: right; white-space: nowrap; }
.table tr.is-muted td { opacity: .6; }
.table-compact th, .table-compact td { padding: .5rem .9rem; font-size: .84rem; }
.pricing-preview .table-compact th, .pricing-preview .table-compact td { padding: .5rem .2rem; }
.user-cell { display: flex; align-items: center; gap: .7rem; }

/* ---------- Formulaires ---------- */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend.section-title, .section-title { font-size: .95rem; font-weight: 700; margin: 0 0 .75rem; padding: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.field.full { grid-column: 1 / -1; }
label, .label { font-weight: 600; font-size: .87rem; color: var(--text-2); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=time], input[type=date], input[type=search], input:not([type]), select, textarea {
  width: 100%; padding: .58rem .72rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: .93rem; background: #fff; color: var(--text); transition: border-color .12s, box-shadow .12s;
}
textarea { resize: vertical; font-family: var(--mono); font-size: .85rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-600); box-shadow: 0 0 0 3px rgba(13, 148, 136, .15); }
input[readonly] { background: var(--surface-2); }
.hint { font-size: .8rem; color: var(--muted); font-weight: 400; }
.error-text { font-size: .8rem; color: var(--danger); font-weight: 500; }
.has-error input, .has-error select { border-color: var(--danger); }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 2.2rem; }
.input-suffix > span { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; pointer-events: none; }
.checks { display: flex; flex-wrap: wrap; gap: .5rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; font-size: .88rem; background: #fff; }
.check:hover { border-color: var(--border-strong); }
.check:has(input:checked) { border-color: var(--primary-600); background: var(--primary-50); }
.check input, .role-card input { accent-color: var(--primary); margin: 0; }
.mb-0 { margin-bottom: 0; }
.role-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.role-card { border: 1.5px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; cursor: pointer; display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; }
.role-card strong { display: flex; align-items: center; gap: .4rem; color: var(--text); margin-bottom: .15rem; }
.role-card input { margin-top: .25rem; }
.role-card:has(input:checked) { border-color: var(--primary); background: var(--primary-50); }
/* Compte existant : le rôle est affiché, pas modifiable. */
.role-card.is-fixed { justify-content: space-between; max-width: 420px; background: var(--surface-2); cursor: default; }
.role-card.is-fixed > .icon { color: var(--muted); }
.rate-grid { display: flex; flex-direction: column; gap: .6rem; max-width: 520px; }
.rate-row { display: grid; grid-template-columns: 1fr 150px; gap: .75rem; align-items: center; }
.copy-field { display: flex; gap: .5rem; }
.copy-field input { font-family: var(--mono); font-size: .82rem; }
.howto { padding-left: 1.2rem; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.pricing-preview { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .75rem; align-self: start; }
.pricing-preview table { background: transparent; }
.pricing-preview .table th { background: transparent; }
.sticky-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; padding: .9rem 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.demo-tools { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.error-trace { white-space: pre-wrap; font-family: var(--mono); font-size: .75rem; background: var(--surface-2); border: 1px solid var(--border); padding: .75rem; border-radius: var(--radius-sm); max-height: 50vh; overflow: auto; }

/* ---------- Logements ---------- */
.center { justify-content: center; }
.link-plain { color: inherit; }
.req { color: var(--danger); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .35rem !important; }
.tabs-page { border-bottom: 1px solid var(--border); margin: -.5rem 0 1.5rem; }
.tabs-page a { display: inline-flex; align-items: center; gap: .4rem; }
.tabs-page .icon { width: 16px; height: 16px; }
.info-callout { display: flex; gap: .65rem; align-items: flex-start; padding: .85rem 1rem; background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); color: var(--text-2); font-size: .88rem; }
.info-callout .icon { color: var(--info); margin-top: .1rem; }

.property-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.property-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: inherit; transition: box-shadow .15s, transform .15s; }
.property-card:hover { text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.property-cover { position: relative; aspect-ratio: 3 / 2; background: var(--surface-2); display: block; }
.property-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.property-cover-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; color: var(--faint); font-size: .8rem; }
.property-cover-empty .icon { width: 30px; height: 30px; }
.property-status { position: absolute; top: .6rem; left: .6rem; }
.property-body { display: flex; flex-direction: column; gap: .35rem; padding: .9rem 1rem 1rem; }
.property-name { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.property-meta { font-size: .85rem; color: var(--muted); }
.property-owners { display: flex; align-items: center; gap: .35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.property-owners .icon { width: 14px; height: 14px; }
.property-channels { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .15rem; }
.property-channels .badge:not([class*="channel-"]):not(.badge-green) { color: var(--faint); }
.mini-progress { display: flex; align-items: center; gap: .5rem; margin-top: .25rem; }
.mini-progress .bar { flex: 1; height: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.mini-progress .bar span { display: block; height: 100%; background: var(--primary); }

.property-form { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.section-nav { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 2px; }
.section-nav a { padding: .4rem .7rem; border-radius: var(--radius-sm); color: var(--text-2); font-size: .88rem; font-weight: 500; }
.section-nav a:hover { background: var(--surface); text-decoration: none; }
.section-stack { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.section-stack .card { scroll-margin-top: 1rem; }
.property-form .sticky-actions { grid-column: 1 / -1; gap: .75rem; align-items: center; }
.property-form .sticky-actions .muted { margin-right: auto; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.group-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .55rem; padding: 0; }
.hint .icon, .muted .icon { width: 14px; height: 14px; vertical-align: -2px; }

.switch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1.25rem; }
.switch { display: flex; align-items: center; gap: .65rem; cursor: pointer; font-weight: 500; font-size: .9rem; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; flex: none; transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 3px solid rgba(13, 148, 136, .3); outline-offset: 1px; }

.owner-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .4rem; }
.owner-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; gap: .75rem; align-items: center; }
.owner-row .grow-check > span { min-width: 0; overflow-wrap: anywhere; }
.owner-rights { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding-left: 1.6rem; }
.check-sm { padding: .3rem .6rem; font-size: .82rem; }
.rights-help { margin: .7rem 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--muted); }
.rights-help strong { color: var(--text-2); }
.grow-check { width: 100%; }
.share-input input:disabled { background: var(--surface-2); color: var(--faint); }
.provider-table { display: flex; flex-direction: column; gap: .6rem; }
.provider-row { display: grid; grid-template-columns: 160px minmax(0, 1fr) 140px; gap: .75rem; align-items: center; }
.provider-type { font-weight: 600; font-size: .88rem; }
.char-counter { font-size: .75rem; color: var(--faint); text-align: right; margin-top: -.15rem; }
.char-counter.is-over { color: var(--danger); font-weight: 600; }

/* Photos */
.dropzone-label { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 2rem 1rem; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); text-align: center; cursor: pointer; font-weight: 400; transition: border-color .15s, background .15s; }
.dropzone-label:hover, .dropzone.is-over .dropzone-label { border-color: var(--primary-600); background: var(--primary-50); }
.dropzone-label input { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.dropzone-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-100); color: var(--primary-800); }
.upload-list { list-style: none; margin: .75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .85rem; }
.upload-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem .7rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.upload-list .ok { color: var(--success); }
.upload-list .err { color: var(--danger); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; padding: 1.25rem; }
.photo-card { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); cursor: grab; transition: box-shadow .15s, opacity .15s; }
.photo-card.is-dragging { opacity: .4; }
.photo-card.drop-target { box-shadow: 0 0 0 3px var(--primary-600); }
.photo-thumb { position: relative; aspect-ratio: 3 / 2; background: var(--surface-2); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-position { position: absolute; top: .5rem; left: .5rem; min-width: 26px; height: 26px; padding: 0 .4rem; border-radius: 999px; background: rgba(16, 24, 40, .7); color: #fff; font-size: .78rem; font-weight: 700; display: grid; place-items: center; }
.photo-cover-badge { position: absolute; bottom: .5rem; left: .5rem; display: inline-flex; align-items: center; gap: .25rem; padding: .15rem .5rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; }
.photo-cover-badge .icon { width: 12px; height: 12px; }
.photo-warning { position: absolute; top: .5rem; right: .5rem; width: 26px; height: 26px; border-radius: 50%; background: var(--warning-50); color: var(--warning); display: grid; place-items: center; }
.photo-warning .icon { width: 15px; height: 15px; }
.photo-card figcaption { padding: .6rem; display: flex; flex-direction: column; gap: .4rem; }
.photo-card figcaption input { font-size: .84rem; padding: .4rem .55rem; }
.photo-card figcaption input.is-saved { border-color: var(--success); }
.photo-actions { display: flex; gap: .1rem; align-items: center; }
.photo-actions form { display: inline-flex; }
.photo-meta { font-size: .72rem; }
.btn.danger { color: var(--danger); }

/* Diffusion */
.step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-grid; place-items: center; font-size: .78rem; font-weight: 700; }
.todo-item { display: flex; gap: .85rem; align-items: flex-start; padding-bottom: .85rem; border-bottom: 1px dashed var(--border); }
.todo-item:last-child { border-bottom: 0; padding-bottom: 0; }
.todo-item p { margin: .1rem 0 .4rem; }
.todo-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; flex: none; color: var(--muted); }
.copy-block { display: flex; gap: .5rem; align-items: flex-start; }
.copy-block textarea { font-family: inherit; font-size: .84rem; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.choice { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.choice h3 { margin: 0; }
.completion-value { font-size: 1.3rem; color: var(--primary-800); }
.progress-wide { width: 100%; }
.checklist { list-style: none; margin: 0; padding: 0 0 .5rem; }
.checklist li { display: flex; align-items: center; gap: .6rem; padding: .45rem 1.25rem; font-size: .88rem; }
.checklist li a { color: var(--text-2); flex: 1; }
.checklist li.done a { color: var(--muted); }
.check-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.check-dot .icon { width: 12px; height: 12px; stroke-width: 3; }
.checklist li.done .check-dot { background: var(--success); border-color: var(--success); color: #fff; }

/* Espace propriétaire */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, 160px); gap: .5rem; border-radius: var(--radius); overflow: hidden; }
.gallery-item { display: block; background: var(--surface-2); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-main { grid-row: span 2; }
.facts { display: flex; flex-wrap: wrap; gap: .5rem; }
.fact { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 999px; font-size: .85rem; }
.fact .icon { width: 15px; height: 15px; color: var(--muted); }
.amenity-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .45rem 1rem; font-size: .9rem; }
.amenity-list li { display: flex; align-items: center; gap: .45rem; }
.amenity-list .icon { width: 15px; height: 15px; color: var(--success); }
.big-number { font-size: 1.5rem; font-weight: 700; }

@media (max-width: 960px) {
  .property-form { grid-template-columns: 1fr; }
  .section-nav { position: sticky; top: 52px; z-index: 10; flex-direction: row; overflow-x: auto; background: var(--bg); padding: .4rem 0; margin: 0 -1rem; padding-left: 1rem; }
  .section-nav a { white-space: nowrap; background: var(--surface); border: 1px solid var(--border); }
  .switch-grid, .choice-grid { grid-template-columns: 1fr; }
  .provider-row { grid-template-columns: 1fr 1fr; }
  .provider-type { grid-column: 1 / -1; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 110px 110px; }
  .gallery-main { grid-column: 1 / -1; grid-row: auto; }
}

/* ---------- Calendrier et tarifs ---------- */
.sync-bar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .75rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.push-right { margin-left: auto; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .8rem; color: var(--text-2); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--border-strong); }
.lg-free { background: #fff; }
.lg-booked { background: #ccfbf1; border-color: #5eead4; }
.lg-blocked { background: repeating-linear-gradient(45deg, #f2f4f7, #f2f4f7 4px, #e4e7ec 4px, #e4e7ec 8px); }
.lg-manual { background: #fff; box-shadow: inset 0 -3px 0 var(--warning); }
.lg-promo { background: #fdf2fa; border-color: #fcceee; color: #c11574; font-size: .62rem; line-height: 12px; font-weight: 700; font-style: normal; text-align: center; }
.lg-airbnb { background: #fda4af; border-color: #fb7185; }
.lg-booking { background: #93c5fd; border-color: #60a5fa; }
.lg-direct { background: #5eead4; border-color: #2dd4bf; }

.grid-3-pricing { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.pricing-col { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.promo-percent { color: #c11574; white-space: nowrap; }
.season { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .75rem; }
.season summary { display: flex; justify-content: space-between; align-items: center; gap: .75rem; cursor: pointer; list-style: none; }
.season summary::-webkit-details-marker { display: none; }
.season-price { text-align: right; font-weight: 700; }
.season-new { border-style: dashed; }
.link-like { color: var(--primary); font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.rule { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .8rem; display: flex; flex-direction: column; gap: .35rem; }
.rule.is-active { border-color: var(--primary-600); background: var(--primary-50); }
.rule .hint { margin: 0; }
.rule-fields { display: flex; flex-wrap: wrap; gap: .5rem .9rem; }
.rule-field { display: flex; align-items: center; gap: .45rem; font-size: .84rem; font-weight: 500; }
.rule-field .input-suffix input { width: 92px; padding: .35rem 2rem .35rem .5rem; }
.rule-field .suffix-wide input { width: 64px; padding-right: .5rem; }
.rule-field .suffix-wide { display: inline-flex; align-items: center; gap: .35rem; }
.rule-field .suffix-wide > span { position: static; transform: none; }

/* Fenêtres (modales) : centrées à l'écran, fond grisé cliquable pour fermer */
.modal { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 1rem; padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom)); }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 24, 40, .45); }
.modal-dialog { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-radius: 14px; box-shadow: 0 24px 48px rgba(16, 24, 40, .22); }
.modal-dialog:focus { outline: none; }
body.modal-open { overflow: hidden; }
.modal-close { position: absolute; top: .65rem; right: .65rem; z-index: 2; }
.modal-head { padding: 1.1rem 3.4rem .95rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-head h2 { display: block; font-size: 1.15rem; margin: .4rem 0 .15rem; }
.modal-head h2 .icon { vertical-align: -3px; margin-right: .35rem; }
.modal-head h2:first-child { margin-top: 0; }
.modal-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.modal-body { padding: 1rem 1.25rem 1.25rem; }
.modal-body .kv dd { overflow-wrap: anywhere; }
.modal-body .kv + .hint { margin-top: .85rem; }
.modal-section { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1.25rem 0 .45rem; }
.modal-list li { padding: .6rem 0; gap: .7rem; }
.modal-list .list-icon { width: 32px; height: 32px; }
.modal-quote { margin-top: .9rem; }
.modal-foot { padding: .85rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; position: sticky; bottom: 0; background: var(--surface); }
.modal-loading { padding: 2.5rem 1.25rem; text-align: center; }
.pay-amount { display: flex; flex-direction: column; gap: .1rem; padding: .75rem .9rem; border-radius: var(--radius-sm); background: var(--primary-50); }
.pay-amount strong { font-size: 1.5rem; color: var(--primary-800); font-variant-numeric: tabular-nums; }

/* Rémunérations des prestataires (réglées au mois) */
.stat-value .badge { font-size: .85rem; letter-spacing: 0; vertical-align: middle; }
.payment-list { border-bottom: 1px solid var(--border); }
.payment-list li { padding: .6rem 1.25rem; }
.payment-list .list-icon { width: 30px; height: 30px; }
.payment-list .list-main strong { white-space: normal; }
.owed-table .actions .actions-row { justify-content: flex-end; flex-wrap: nowrap; }
.owed-subtotal td { background: var(--surface-2); font-size: .82rem; }
.table tfoot td { border-top: 1px solid var(--border-strong); background: var(--surface-2); }
h2 + .section-title, .card + .section-title { margin-top: 1.5rem; }

/* Fenêtre d'actions du calendrier (prix, séjour minimum, blocage) */
.cal-panel { max-width: 400px; }
.cal-panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; padding: .9rem 1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; background: var(--surface); }
.range-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.range-fields label { display: flex; flex-direction: column; gap: .25rem; font-size: .82rem; }
.range-fields input { padding: .45rem .55rem; }
.cal-panel-body { padding: .5rem 1rem 1rem; display: flex; flex-direction: column; }
.cal-panel-section { display: flex; flex-direction: column; gap: .4rem; padding: .75rem 0; border-bottom: 1px dashed var(--border); }
.cal-panel-section:last-child { border-bottom: 0; }
.panel-row { display: flex; gap: .5rem; align-items: center; }
.panel-row > :first-child { flex: 1; }

/* Réservations */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; padding: .6rem 0; }
.filters select, .filters input { width: auto; min-width: 150px; padding: .45rem .6rem; font-size: .88rem; }
.row-link { cursor: pointer; }
.row-link:hover td { background: var(--surface-2); }
.pager { justify-content: space-between; align-items: center; }
.toolbar-note { padding: .8rem 0; }
.quote { padding: .7rem .9rem; border-left: 3px solid var(--primary-100); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .9rem; }
.message-list { list-style: none; margin: 0; padding: .5rem 1.25rem 1rem; display: flex; flex-direction: column; gap: .6rem; }
.message-list li { padding: .6rem .8rem; border-radius: var(--radius-sm); background: var(--surface-2); max-width: 85%; }
.message-list li.msg-host { align-self: flex-end; background: var(--primary-50); }
.message-list p { margin: .2rem 0 0; font-size: .9rem; }
.kv-amounts { column-gap: 0; }
.kv-amounts dt { padding-right: 1.5rem; }
.kv-amounts dd { text-align: right; font-variant-numeric: tabular-nums; }
.kv-amounts .total { font-weight: 700; font-size: 1rem; color: var(--text); padding-top: .5rem; border-top: 1px solid var(--border); }
.kv-amounts .subtotal { font-weight: 600; color: var(--text); padding-top: .4rem; border-top: 1px dashed var(--border); }
.quote-card { position: sticky; top: 1rem; }
.quote-lines { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; }
.quote-lines .line { display: flex; justify-content: space-between; gap: 1rem; }
.quote-lines .line.total { font-weight: 700; border-top: 1px solid var(--border); padding-top: .4rem; }
.quote-lines .q-error { color: var(--danger); }
.quote-lines .q-warning { color: var(--warning); }

@media (max-width: 1100px) {
  .grid-3-pricing { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .grid-3-pricing { grid-template-columns: 1fr; }
  .quote-card { position: static; }
}

/* ---------- Messagerie ---------- */
.inbox { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.inbox-list { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); display: flex; flex-direction: column; overflow: hidden; }
.inbox-tools { padding: 0 1rem .6rem; border-bottom: 1px solid var(--border); }
.inbox-tools .tabs a { padding: .7rem .55rem; font-size: .84rem; }
.inbox-tools input { margin-top: .5rem; }
.conversation-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.conversation { display: flex; gap: .7rem; align-items: flex-start; padding: .75rem 1rem; border-bottom: 1px solid var(--border); color: inherit; position: relative; }
.conversation:hover { background: var(--surface-2); text-decoration: none; }
.conversation.is-active { background: var(--primary-50); box-shadow: inset 3px 0 0 var(--primary); }
.conversation.is-unread strong { color: var(--text); }
.conversation.is-unread .conversation-last { color: var(--text); font-weight: 600; }
.conversation-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.conversation-top { display: flex; justify-content: space-between; gap: .5rem; }
.conversation-top strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.conversation-meta { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-meta .badge { font-size: .66rem; padding: 0 .4rem; }
.conversation-last { font-size: .82rem; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.count-badge { background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 0 .45rem; min-width: 1.3rem; text-align: center; align-self: center; }
.inbox-thread { display: flex; flex-direction: column; min-height: 60vh; }
.thread-head { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); }
.thread-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.thread-title .badge { font-size: .68rem; }
.cell-link .icon { width: 13px; height: 13px; vertical-align: -2px; }
.thread-followers .icon { width: 13px; height: 13px; vertical-align: -2px; margin-right: .3rem; }
.thread-back { display: none; }
.thread-messages { flex: 1; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; max-height: 62vh; overflow-y: auto; background: var(--surface-2); }
.thread-day { align-self: center; font-size: .72rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .1rem .7rem; margin: .4rem 0; }
.bubble { max-width: 78%; padding: .65rem .85rem; border-radius: 14px; font-size: .92rem; line-height: 1.45; box-shadow: var(--shadow); }
.bubble-guest { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.bubble-host { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.bubble-system { align-self: center; background: #fffaeb; border: 1px dashed var(--warning-200); font-size: .84rem; }
.bubble-meta { font-size: .7rem; opacity: .75; margin-top: .3rem; display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; }
.bubble-meta .icon { width: 11px; height: 11px; }
.bubble-text { overflow-wrap: anywhere; }
.composer { border-top: 1px solid var(--border); padding: .85rem 1.25rem 1rem; display: flex; flex-direction: column; gap: .55rem; }
.composer textarea { font-family: inherit; font-size: .93rem; min-height: 84px; }
.composer-tools { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.composer-tools select { width: auto; max-width: 100%; padding: .4rem .6rem; font-size: .86rem; }
.composer-actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.composer-actions .hint .icon { vertical-align: -2px; }

.template-list { list-style: none; margin: 0; padding: 0; }
.template-list li { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); }
.template-list li:last-child { border-bottom: 0; }
.template-list li.is-active { background: #fbfefd; }
.template-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; color: inherit; }
.template-main:hover { text-decoration: none; }
.template-main:hover strong { color: var(--primary-800); }
.template-preview { font-size: .82rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.template-stats { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.template-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); flex: none; }
.switch-button { background: none; border: 0; padding: 0; cursor: pointer; }
.switch-track.is-on { background: var(--primary); }
.switch-track.is-on::after { transform: translateX(16px); }
.variable-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { font-family: var(--mono); font-size: .74rem; padding: .2rem .5rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.chip:hover { border-color: var(--primary-600); color: var(--primary-800); background: var(--primary-50); }
.preview-card { position: sticky; top: 1rem; }
.preview-bubble { max-width: 100%; white-space: pre-wrap; }
.preview-bubble .var-missing { background: rgba(255, 255, 255, .25); border-radius: 4px; padding: 0 .2rem; font-family: var(--mono); font-size: .82em; }

@media (max-width: 960px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox-list { position: static; max-height: none; }
  .inbox.has-thread .inbox-list { display: none; }
  .thread-back { display: inline-flex; order: 0; padding-left: 0; }
  .thread-head { flex-wrap: wrap; padding: .75rem 1rem; }
  .thread-head > .btn-secondary { order: 1; margin-left: auto; }
  .thread-title { order: 2; flex-basis: 100%; }
  .thread-messages { max-height: none; }
  .bubble { max-width: 90%; }
}

/* ---------- Revenus et relevés ---------- */
.year-label { font-size: 1.05rem; min-width: 70px; text-align: center; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--primary); margin: 0 .25rem 0 .6rem; vertical-align: -1px; }
.legend-dot.is-future { background: var(--primary-100); border: 1px dashed var(--primary-600); }
.bar-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .5rem; height: 220px; align-items: end; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; color: inherit; gap: .3rem; min-width: 0; }
.bar:hover { text-decoration: none; }
.bar:hover .bar-fill { filter: brightness(1.1); }
.bar-fill { width: 100%; max-width: 46px; background: var(--primary); border-radius: 6px 6px 2px 2px; min-height: 0; transition: height .3s; }
.bar.is-future .bar-fill { background: var(--primary-100); border: 1px dashed var(--primary-600); }
.bar-value { font-size: .68rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-label { font-size: .72rem; color: var(--text-2); font-weight: 600; }
.statement { display: flex; flex-direction: column; gap: 1.25rem; }
.statement-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.summary-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; box-shadow: var(--shadow); }
.summary-box span { font-size: .82rem; color: var(--muted); }
.summary-box strong { font-size: 1.45rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.summary-box small { font-size: .76rem; color: var(--muted); }
.summary-box.is-main { background: var(--primary-50); border-color: var(--primary-100); }
.summary-box.is-main strong { color: var(--primary-800); }
.table-statement tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border-strong); }
.table-statement .share-row td { color: var(--primary-800); background: var(--primary-50); }
.statement-due { border: 2px solid var(--primary-100); }
.statement-due .kv { max-width: 34rem; }
.statement-due .total { color: var(--primary-800); }
.statement-check { margin: .85rem 0 0; }
.statement-notes { margin: 0; }
.checks-vertical { flex-direction: column; align-items: stretch; }
.checks-vertical .check { align-items: flex-start; }
.checks-vertical .check input { margin-top: .2rem; }

@media (max-width: 960px) {
  .statement-summary { grid-template-columns: 1fr; }
  .bar-chart { height: 180px; gap: .25rem; }
  .bar-value { display: none; }
}

/* ---------- Connexion ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 15% 0%, var(--primary-50), var(--bg) 50%); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-md); padding: 2rem; }
.auth-card .brand { padding: 0 0 1.5rem; }
.auth-card h1 { font-size: 1.4rem; }
.auth-foot { margin: 1.5rem 0 0; font-size: .8rem; color: var(--muted); text-align: center; }
.auth-card .error-trace { max-height: 40vh; }

/* ---------- Mobile ---------- */
@media (max-width: 1100px) {
  .kv-4 { grid-template-columns: auto 1fr; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-md); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(16, 24, 40, .35); z-index: 30; }
  .main { margin-left: 0; }
  .topbar { display: flex; }
  .content { padding: 1.25rem 1rem 2.5rem; }
  .demo-banner { padding: .5rem 1rem; }
  /* minmax(0, …) : la colonne garde la largeur de l'écran, un tableau large défile dans son cadre au lieu d'élargir la page. */
  .grid-2, .grid-2-1 { grid-template-columns: minmax(0, 1fr); }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .role-cards { grid-template-columns: 1fr; }
  .search, .search input { width: 100%; }
  .card-toolbar { padding: 0 1rem; }

  .table-responsive thead { display: none; }
  .table-responsive tr { display: block; border-bottom: 1px solid var(--border); padding: .5rem 0; }
  .table-responsive tbody tr:last-child { border-bottom: 0; }
  .table-responsive td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border: 0; padding: .3rem 1rem; text-align: right; }
  .table-responsive td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; font-weight: 600; text-align: left; }
  .table-responsive td.actions { justify-content: flex-end; }
  .table-responsive td.actions::before { content: none; }
}
@media (max-width: 520px) {
  h1 { font-size: 1.3rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .stat { padding: .8rem; }
  .stat-value { font-size: 1.3rem; }
  .rate-row { grid-template-columns: 1fr 110px; }
  .property-form .sticky-actions .muted { display: none; }
  .owner-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .copy-field { flex-direction: column; }
  .list li { padding: .7rem 1rem; }
  .auth-card { padding: 1.5rem; }
}

/* ---------------------------------------------------------------------
   Interventions (fiche, checklist, photos, planning)
   --------------------------------------------------------------------- */
.task-title { display: flex; align-items: center; gap: .6rem; }
.task-title .list-icon { width: 40px; height: 40px; }
.task-info dd { overflow-wrap: anywhere; }
.pre-line { white-space: pre-line; }
.checklist { display: flex; flex-direction: column; }
.checklist-item { display: flex; align-items: flex-start; gap: .8rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); cursor: pointer; font-size: .95rem; font-weight: 400; }
.checklist-item:hover { background: var(--surface-2); }
.checklist-item input { width: 22px; height: 22px; margin: .05rem 0 0; accent-color: var(--primary); flex: none; }
.checklist-item input:checked + span { color: var(--muted); text-decoration: line-through; }
.checklist-item.is-saving span { opacity: .6; }
.task-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; padding: 0 1.25rem 1.25rem; }
.task-photos figure { margin: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.task-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.task-photos figcaption { display: flex; justify-content: space-between; align-items: center; gap: .3rem; padding: .25rem .5rem; }
.dropzone-compact .dropzone-label { padding: 1.1rem 1rem; }
.status-actions { display: grid; gap: .6rem; }
.status-actions .btn { padding-top: .8rem; padding-bottom: .8rem; font-size: 1rem; justify-content: center; }
.problem-box summary { cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; color: var(--danger); font-weight: 600; font-size: .9rem; list-style: none; }
.problem-box summary::-webkit-details-marker { display: none; }
.problem-box[open] summary { margin-bottom: .6rem; }
.task-list .list-main a { color: inherit; }
.task-assign select { min-width: 160px; max-width: 260px; }
.task-assign select.is-empty { border-color: var(--warning-200); background: var(--warning-50); }
/* Attribution : fiche d'une intervention, absences des prestataires, logements par défaut d'un prestataire */
.assign-form select { width: 100%; }
.assign-hint { margin: .6rem 0 .9rem; }
.absence-banner a { font-weight: 600; }
.absence-list form { margin: 0; }
.absence-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 150px)) minmax(0, 220px) minmax(0, 1fr); gap: .75rem; align-items: end; margin-bottom: .85rem; }
/* Montant par logement d'un prestataire, comparé au ménage de l'annonce */
.pay-table th, .pay-table td { padding: .5rem .6rem; }
.pay-table th { white-space: normal; line-height: 1.25; }
.pay-table tr.pay-group th { background: transparent; padding-top: .9rem; color: var(--text-2); }
.pay-table td:first-child { min-width: 130px; }
.pay-table td:first-child .small { display: block; }
.pay-table .pay-fee, .pay-table .pay-gap { white-space: nowrap; }
.pay-set { display: flex; align-items: center; gap: .5rem; min-height: 34px; }
.pay-set input[type=checkbox] { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--primary); cursor: pointer; }
.pay-set .input-suffix { width: 88px; flex: none; }
.pay-set .input-suffix input { padding: .35rem 1.5rem .35rem .5rem; font-size: .88rem; text-align: right; }
.pay-set .input-suffix > span { right: .55rem; }
.pay-note { display: block; line-height: 1.2; }
.gap strong { font-variant-numeric: tabular-nums; }
.gap small { display: block; font-size: .74rem; color: var(--muted); }
.gap.is-plus strong, .pay-summary.is-plus, .cleaning-gap.is-plus { color: var(--success); }
.gap.is-minus strong, .pay-summary.is-minus, .cleaning-gap.is-minus { color: var(--danger); }
.gap.is-none { color: var(--faint); }
.gap.is-missing { color: var(--warning); font-size: .8rem; font-weight: 600; white-space: normal; }
@media (max-width: 1180px) {
  .pay-table th, .pay-table td { padding: .45rem .35rem; }
  .pay-table th { font-size: .68rem; letter-spacing: 0; }
  .pay-table td:first-child { min-width: 105px; }
  .pay-set { gap: .35rem; }
  .pay-set .input-suffix { width: 72px; }
  .pay-note { font-size: .74rem; }
}
.pay-summary, .cleaning-gap { margin: .75rem 0 .6rem; padding: .6rem .8rem; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .86rem; font-weight: 600; color: var(--text-2); }
@media (max-width: 960px) {
  .absence-fields { grid-template-columns: 1fr 1fr; }
  .absence-fields .field:nth-child(n+3) { grid-column: 1 / -1; }
  /* Téléphone : le nom du logement en titre de sa carte, sur toute la largeur ; prix et différence seulement si le ménage est coché. */
  .pay-table td:first-child { display: block; text-align: left; padding-top: .4rem; }
  .pay-table td:first-child::before { content: none; }
  .pay-table td:first-child .small { display: inline; }
  .pay-table tr.pay-group { padding: 0; border: 0; }
  .pay-table tr.pay-group th { display: block; border: 0; padding: .9rem .35rem .2rem; }
  .pay-table tr:not(.has-cleaning) .pay-fee, .pay-table tr:not(.has-cleaning) .pay-gap { display: none; }
  .pay-table td.pay-cell { flex-wrap: wrap; row-gap: 0; }
  .pay-set { flex-direction: row-reverse; margin-left: auto; }
  .pay-note { flex-basis: 100%; text-align: right; }
  .gap small { display: inline; }
}
/* Logements et droits d'un propriétaire */
.rights-table th, .rights-table td { padding: .45rem .6rem; }
.rights-table th { white-space: normal; line-height: 1.25; }
.rights-table th:not(:first-child), .rights-table .rights-cell { text-align: center; }
.rights-table tr.rights-group th { background: transparent; padding-top: .9rem; color: var(--text-2); text-align: left; }
.rights-table tr.rights-all td { background: var(--surface-2); font-weight: 600; font-size: .86rem; }
.rights-table input[type=checkbox] { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--primary); cursor: pointer; vertical-align: middle; }
.rights-name { display: flex; align-items: center; gap: .65rem; cursor: pointer; font-weight: 400; min-height: 30px; }
.rights-table tr[data-rights-row]:not(.is-owned) .rights-cell input { visibility: hidden; }
@media (max-width: 960px) {
  .rights-table td:first-child { display: block; text-align: left; padding-top: .4rem; }
  .rights-table td:first-child::before { content: none; }
  .rights-table tr.rights-group { padding: 0; border: 0; }
  .rights-table tr.rights-group th { display: block; border: 0; padding: .9rem .6rem .2rem; }
  .rights-table tr.rights-all { background: var(--surface-2); }
  .rights-table td.rights-cell { padding-left: 2.2rem; }
  .rights-table tr[data-rights-row]:not(.is-owned) .rights-cell { display: none; }
  .owner-rights { padding-left: 0; }
}
.task-flag { display: inline-flex; margin-top: .25rem; }
.list-main .task-flag { color: #93370d; }
.day-group.is-late { color: var(--danger); background: var(--danger-50); }
.filter-date { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--muted); font-weight: 500; }
.filter-date input { min-width: 0; }
.list li.task-item { padding: 0; }
.task-link { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.25rem; width: 100%; color: inherit; }
.task-link:hover { background: var(--surface-2); text-decoration: none; }
.card-alert { border-color: var(--danger-200); }
.input-sm { width: auto; padding: .38rem .6rem; font-size: .85rem; }
@media (max-width: 720px) {
  .task-list li { flex-wrap: wrap; }
  .task-assign { order: 3; width: 100%; padding-left: calc(36px + .85rem); }
  .task-assign select { width: 100%; }
  .task-link { padding: .75rem 1rem; }
}
[data-task-form] textarea, #notes textarea, .problem-box textarea, #checklist_cleaning, #checklist_checkin, #cleaning_checklist { font-family: inherit; font-size: .93rem; }
/* Sur téléphone, le statut et les boutons d'action passent en haut de la fiche. */
@media (max-width: 960px) { .task-grid > aside { order: -1; } }

/* ---------------------------------------------------------------------
   Application installable (téléphone)
   --------------------------------------------------------------------- */
.nav-install { margin: 0 .75rem .5rem; width: calc(100% - 1.5rem); border: 1px dashed var(--primary-100); background: var(--primary-50); color: var(--primary-800); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-align: left; }
.nav-install:hover { background: var(--primary-100); }
.offline-banner { position: sticky; top: 0; z-index: 60; display: flex; gap: .5rem; align-items: center; justify-content: center; padding: .5rem 1rem; background: #1e293b; color: #fff; font-size: .84rem; text-align: center; }
.offline-banner[hidden] { display: none; }
.install-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.1rem; margin-bottom: 1.5rem; border: 1px solid var(--primary-100); background: var(--primary-50); border-radius: var(--radius); }
.install-card[hidden] { display: none; }
.install-card img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.install-card .install-text { flex: 1; min-width: 0; font-size: .9rem; }
.install-card .install-text strong { display: block; color: var(--primary-800); }
.install-card .install-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.share-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -.15em; }
.install-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: .75rem; line-height: 1.5; }
.install-steps .share-icon { color: var(--primary); }
.tabbar { display: none; }
@media (max-width: 960px) {
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(15, 23, 42, .05); }
  .tabbar a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; height: 58px; color: var(--muted); font-size: .68rem; font-weight: 600; text-decoration: none; }
  .tabbar a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 .15rem; }
  .tabbar a .icon { width: 22px; height: 22px; }
  .tabbar a.active { color: var(--primary-800); }
  .tabbar a.active .icon { color: var(--primary); }
  .tabbar a { position: relative; }
  .tabbar-count { position: absolute; top: 5px; left: calc(50% + 4px); min-width: 1.05rem; padding: 0 .25rem; border-radius: 999px; background: var(--danger); color: #fff; font-size: .62rem; line-height: 1.05rem; font-style: normal; font-weight: 700; text-align: center; }
  /* Six onglets (propriétaire avec la messagerie) : libellés un peu plus petits sur les petits téléphones. */
  .tabbar:has(a:nth-child(6)) a { font-size: .6rem; }
  body.has-tabbar .content { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  .install-card { align-items: flex-start; flex-wrap: wrap; }
  .install-card .install-actions { width: 100%; justify-content: flex-start; padding-left: calc(44px + 1rem); }
}
/* Application lancée depuis l'écran d'accueil : pas de bouton d'installation, marges des encoches. */
@media (display-mode: standalone) {
  .nav-install, .install-card { display: none !important; }
  .topbar { padding-top: env(safe-area-inset-top); }
}

/* État de l'installation (Paramètres) */
.health-card summary { cursor: pointer; list-style: none; }
.health-card summary::-webkit-details-marker { display: none; }
.health-card:not([open]) summary { border-bottom: 0; }
.health-list li { padding: .55rem 1.25rem; }
.health-list .list-main strong { white-space: normal; }
.health-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--success); }
.health-dot.is-warn { background: var(--warning); }
.health-dot.is-error { background: var(--danger); }

/* Espace disque (Paramètres, tableau de bord) */
.disk-card { margin: 1rem 0; }
.disk-percent { font-size: 1.5rem; font-variant-numeric: tabular-nums; color: var(--success); }
.disk-percent.is-warn { color: var(--warning); }
.disk-percent.is-error { color: var(--danger); }
.disk-total { font-size: 1.5rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.disk-bar { height: 14px; }
.disk-bar span { background: var(--success); }
.disk-bar.is-warn span { background: var(--warning); }
.disk-bar.is-error span { background: var(--danger); }
.disk-usage { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; font-size: .9rem; }
.disk-usage li { display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr auto; gap: .75rem; align-items: center; }
.disk-usage-bar { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.disk-usage-bar span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.disk-usage-size { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; min-width: 5rem; }
.disk-mini { display: flex; align-items: center; gap: .6rem; }
.disk-mini .progress { width: 120px; }
@media (max-width: 640px) {
  .disk-usage li { grid-template-columns: 1fr auto; }
  .disk-usage-bar { grid-column: 1 / -1; order: 3; }
}

/* Serrures Igloohome : codes de la porte */
.door-code { font-family: var(--mono); font-size: 1.05rem; font-weight: 700; letter-spacing: .08em; color: var(--primary-800); }
.door-code-lg { font-size: 1.6rem; }
.lock-code { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; text-align: right; flex: none; }
form.lock-code { flex-direction: row; align-items: center; gap: .6rem; }
.lock-new-account summary { cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; color: var(--primary-800); font-weight: 600; font-size: .9rem; list-style: none; }
.lock-new-account summary::-webkit-details-marker { display: none; }
@media (max-width: 640px) {
  .list li:has(.lock-code) { flex-wrap: wrap; }
  .lock-code { align-items: flex-start; text-align: left; width: 100%; }
  form.lock-code { flex-wrap: wrap; }
}
.lock-list .list-main strong { white-space: normal; }

/* Calendrier linéaire (comme le multi-calendrier d'Airbnb) : une ligne par logement, défilement continu */
.tl { --tl-day: 64px; --tl-name: 210px; }
.tl-toolbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.tl-toolbar select { width: auto; min-width: 9.5rem; }
.tl-nav { display: inline-flex; gap: .15rem; }
/* Tous les logements l'un sous l'autre : pas de défilement vertical dans le bloc, c'est la page qui défile. */
.tl-scroll { overflow-x: auto; overflow-y: hidden; position: relative; overscroll-behavior-x: contain; outline: none; }
.tl-scroll:focus-visible { box-shadow: inset 0 0 0 2px var(--primary-100); }
/* Mois et jours, hors de la zone qui défile pour rester collés en haut de l'écran (sous la barre du haut, --tl-top
   mesuré par app.js) ; ils défilent de gauche à droite avec les logements, app.js garde l'ensemble aligné. */
.tl-header { position: sticky; top: var(--tl-top, 0px); z-index: 9; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; background: var(--surface-2); outline: none; }
.tl-header::-webkit-scrollbar { display: none; }
.tl-header:empty { display: none; }
/* Barre de défilement du bas : seulement à la souris (au doigt on fait glisser le calendrier), au-dessus des onglets du bas (--tl-bottom). */
.tl-hbar { display: none; }
@media (hover: hover) and (pointer: fine) {
  .tl-hbar { display: block; position: sticky; bottom: var(--tl-bottom, 0px); z-index: 9; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; background: var(--surface); }
  .tl-hbar > div { height: 1px; }
  .tl-scroll { scrollbar-width: none; }
  .tl-scroll::-webkit-scrollbar { display: none; }
}
.tl-grid { width: max-content; min-width: 100%; }
.tl-row { display: flex; border-bottom: 1px solid var(--border); }
.tl-name { position: sticky; left: 0; z-index: 5; width: var(--tl-name); flex: none; background: var(--surface); border-right: 1px solid var(--border); padding: .35rem .7rem; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.tl-name a, .tl-name strong { font-weight: 600; font-size: .86rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-name span { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-track { position: relative; flex: none; }
.tl-head { background: var(--surface-2); }
.tl-head .tl-name { background: var(--surface-2); z-index: 8; }
.tl-months { position: relative; height: 24px; }
.tl-month { position: absolute; top: 0; height: 24px; border-left: 1px solid var(--border); }
.tl-month span { position: sticky; left: calc(var(--tl-name) + 6px); display: inline-block; padding: 4px 8px; font-size: .8rem; font-weight: 700; white-space: nowrap; text-transform: capitalize; color: var(--text); }
.tl-days, .tl-cells { display: grid; grid-template-columns: repeat(var(--tl-n), var(--tl-day)); }
.tl-day { text-align: center; padding: 1px 0 5px; font-size: .7rem; color: var(--muted); display: flex; flex-direction: column; align-items: center; line-height: 1.3; border-left: 1px solid var(--border); }
.tl-day strong { font-size: .9rem; color: var(--text); min-width: 26px; border-radius: 8px; }
.tl-day.is-weekend { color: var(--text-2); }
.tl-day.is-today strong { background: var(--primary); color: #fff; }
.tl-cells { height: 100%; }
.tl-cell { position: relative; border-left: 1px solid var(--border); background: #fff; }
.tl-cell.is-weekend { background: #fafdfc; }
.tl-cell.is-past { background: repeating-linear-gradient(135deg, #f6f7f9, #f6f7f9 7px, #eceef2 7px, #eceef2 8px); }
.tl-cell.is-free[data-day] { cursor: pointer; }
.tl-cell.is-free[data-day]:hover { background: var(--primary-50); }
.tl-cell.is-today { box-shadow: inset 2px 0 0 var(--primary); }
.tl-cell.is-selected { outline: 2px solid var(--primary); outline-offset: -2px; background: var(--primary-50) !important; z-index: 1; }
/* Sélection de nuits à la souris (glisser) : pas de texte surligné. */
.tl-cells, body.is-selecting { -webkit-user-select: none; user-select: none; }
.tl-price { position: absolute; top: 3px; right: 5px; font-size: .72rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.tl-price.is-manual { box-shadow: inset 0 -2px 0 var(--warning); }
.tl-min { position: absolute; bottom: 3px; right: 5px; font-size: .62rem; color: var(--muted); }
.tl-min.is-manual { color: #b54708; font-weight: 700; }
/* Au milieu de la case, à droite : jamais sous la barre d'un séjour qui se termine ce jour-là (elle s'arrête au milieu). */
.tl-promo { position: absolute; top: 19px; right: 4px; padding: 0 2px; border-radius: 4px; background: #fdf2fa; color: #c11574; font-size: .6rem; line-height: 1.35; font-weight: 700; white-space: nowrap; }
.tl-bar { position: absolute; height: 24px; border-radius: 999px; display: flex; align-items: center; gap: .3rem; padding: 0 .65rem; font-size: .74rem; font-weight: 600; white-space: nowrap; overflow: hidden; border: 0; z-index: 2; text-decoration: none; font-family: inherit; text-align: left; box-shadow: 0 1px 2px rgba(16, 24, 40, .12); }
a.tl-bar, button.tl-bar { cursor: pointer; }
a.tl-bar:hover, button.tl-bar:hover { text-decoration: none; filter: brightness(.95); }
/* Nom du voyageur toujours lisible, même quand le début de la barre est sorti de l'écran (overflow: clip ne bloque pas sticky). */
.tl-bar { overflow: clip; }
.tl-bar-label { overflow: hidden; text-overflow: ellipsis; position: sticky; left: calc(var(--tl-name) + 6px); }
.tl-bar b { font-weight: 700; }
/* Étiquette (« En cours »…) au-dessus du nom quand celui-ci glisse vers la droite : pas de textes mélangés. */
.tl-bar em { margin-left: auto; padding-left: .5rem; font-style: normal; font-size: .68rem; font-weight: 700; color: color-mix(in srgb, currentColor 85%, transparent); position: relative; z-index: 1; background: inherit; }
.tl-bar .icon { width: 13px; height: 13px; flex: none; }
.tl-bar.channel-airbnb { background: #fda4af; color: #6b0f24; }
.tl-bar.channel-booking { background: #93c5fd; color: #172554; }
.tl-bar.channel-direct, .tl-bar[class*="channel-"]:not(.channel-airbnb):not(.channel-booking) { background: #5eead4; color: #0f3d38; }
.tl-bar.is-block { background: repeating-linear-gradient(45deg, #e4e7ec, #e4e7ec 6px, #d0d5dd 6px, #d0d5dd 12px); color: var(--text-2); }
.tl-bar.is-request { opacity: .8; outline: 1px dashed currentColor; outline-offset: -1px; }
.tl-bar.is-overlap { box-shadow: 0 0 0 2px var(--danger); }
.tl-bar.cut-left { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tl-bar.cut-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tl-task { position: absolute; bottom: 5px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 3px; font-size: .68rem; font-weight: 700; z-index: 3; text-decoration: none; overflow: hidden; white-space: nowrap; background: var(--primary-50); color: var(--primary-800); border: 1px solid var(--primary-100); }
.tl-task:hover { text-decoration: none; filter: brightness(.96); }
.tl-task .icon { width: 12px; height: 12px; flex: none; }
.tl-task.type-checkin { background: #eef4ff; color: #3538cd; border-color: #c7d7fe; }
.tl-task.type-intervention { background: #fff6ed; color: #b93815; border-color: #fddcab; }
.tl-task.status-done { opacity: .55; }
.tl-task.status-in_progress { box-shadow: inset 0 -2px 0 currentColor; }
.tl-task.status-problem { background: #fef3f2; color: var(--danger); border-color: #fecdca; }
.tl-loading, .tl-empty { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.tl-empty { position: sticky; left: 0; width: min(100%, 100vw); }
@media (max-width: 640px) {
  .tl { --tl-day: 52px; --tl-name: 104px; }
  /* Sur téléphone on fait glisser le calendrier du doigt : sans les flèches, la barre tient sur une ligne. */
  .tl-toolbar { padding: .6rem .75rem; }
  .tl-nav { display: none; }
  /* Nom sur deux lignes + ville : interligne serré pour tenir dans la hauteur d'une ligne sans couper le nom. */
  .tl-name { padding: .25rem .45rem; }
  .tl-name a, .tl-name strong { font-size: .78rem; line-height: 1.2; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .tl-name span { line-height: 1.2; }
  .tl-price { font-size: .66rem; right: 3px; }
  .tl-bar { font-size: .7rem; padding: 0 .5rem; }
}
.tl-legend-task { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 18px; border-radius: 5px; background: var(--primary-50); color: var(--primary-800); border: 1px solid var(--primary-100); }
.tl-legend-task .icon { width: 12px; height: 12px; }
.tl-legend-task.type-checkin { background: #eef4ff; color: #3538cd; border-color: #c7d7fe; }
.tl-legend-task.type-intervention { background: #fff6ed; color: #b93815; border-color: #fddcab; }
