/* MoroccanChapter Host — palette black & gold */
:root {
  --bg: #0A0A0A;
  --surface: #131313;
  --surface-2: #1C1C1C;
  --border: #2A2A2A;
  --accent: #C9A84C;
  --accent-soft: rgba(201, 168, 76, 0.14);
  --text: #FFFFFF;
  --muted: #9A9A9A;
  --error: #E56B5A;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.20); border-radius: 2px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin-top: 0; }

a { color: var(--accent); text-decoration: none; }

/* ---------- Layout avec sidebar ---------- */
.app { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 232px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  z-index: 30;
}
.sidebar--open { transform: translateX(0); }

.sidebar__brand {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 28px;
}
.brand-accent { color: var(--accent); }

.sidebar__nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }

.nav-link {
  color: var(--text);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
  border-left: 3px solid transparent;
}
.nav-link:hover { background: rgba(255,255,255,0.05); color: var(--accent); }
.nav-link--active { background: rgba(201,168,76,0.15); color: var(--accent); border-left: 3px solid var(--accent); }
.nav-link--logout { color: var(--muted); margin-top: auto; border-top: 1px solid rgba(255,255,255,0.10); border-left: none; padding-top: 14px; }
.nav-link--logout:hover { color: var(--error); background: transparent; }

.content {
  padding: 24px;
  min-height: 100vh;
  margin-left: 0;
}

.sidebar__toggle {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 18px;
  margin-bottom: 18px;
}

/* ---------- Page / dashboard ---------- */
.page-title { font-size: 28px; margin-bottom: 8px; }

.role-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.page-text { color: var(--muted); max-width: 560px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-card__value { font-family: var(--font-display); font-size: 30px; color: var(--accent); }
.stat-card__label { color: var(--muted); font-size: 13px; }

/* ---------- Login ---------- */
.app--auth .content { display: flex; align-items: center; justify-content: center; }

.login { width: 100%; display: flex; justify-content: center; padding: 24px; }

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 34px 30px;
}

.login-brand {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  text-align: center;
}

.login-tagline {
  color: var(--muted);
  text-align: center;
  margin: 6px 0 24px;
  font-size: 14px;
}

.login-form { display: flex; flex-direction: column; gap: 8px; }
.login-form label { font-size: 13px; color: var(--muted); font-weight: 500; }
.login-form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 11px 12px;
  font-size: 14px;
  margin-bottom: 12px;
}
.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  background: var(--accent);
  color: #1A1400;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}
.btn:hover { filter: brightness(1.08); }
.btn--block { width: 100%; margin-top: 6px; }

.alert {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert--error { background: rgba(229, 107, 90, 0.12); border: 1px solid var(--error); color: var(--error); }
.alert--info { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent); }

.login-hint { color: var(--muted); font-size: 12px; text-align: center; margin-top: 18px; }

/* ---------- Dashboard widgets (Phase 2) ---------- */
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.updated-at { color: var(--muted); font-size: 12px; padding-top: 6px; }

.widgets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 24px;
  min-height: 120px;
}
.card__title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.40);
  margin: 0 0 14px;
}
.card__value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
}
.card__sub { color: rgba(255, 255, 255, 0.50); font-size: 12px; margin: 8px 0 0; }
.card__empty { color: rgba(255, 255, 255, 0.50); font-size: 14px; margin: 0; }

.unavailable { font-family: var(--font-display); font-size: 28px; color: var(--muted); margin: 0; }
.badge {
  display: inline-block;
  vertical-align: middle;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-family: var(--font-body);
  font-weight: 500;
}

/* Barre de progression occupation */
.progress {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 12px;
}
.progress__bar { height: 100%; background: var(--accent); border-radius: 999px; }

/* Tableau prochaines réservations */
.table-wrap { overflow-x: auto; }
.bookings { width: 100%; border-collapse: collapse; font-size: 13px; }
.bookings th {
  text-align: left;
  color: rgba(255, 255, 255, 0.40);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.bookings td { padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.bookings tr:hover td { background: rgba(201, 168, 76, 0.05); }
.bookings tr:last-child td { border-bottom: none; }
.bookings .num { text-align: right; white-space: nowrap; font-weight: 600; }

/* Avis récents */
.reviews { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.review { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.review:last-child { border-bottom: none; padding-bottom: 0; }
.review__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review__author { font-weight: 600; }
.review__stars { color: var(--accent); letter-spacing: 2px; font-size: 13px; }
.review__listing { color: var(--muted); font-size: 12px; margin-left: auto; }
.review__text { color: var(--text); font-size: 13px; margin: 6px 0 0; line-height: 1.5; }

/* Responsive */
@media (min-width: 768px) {
  .sidebar { transform: none; }
  .content { margin-left: 232px; }
  .sidebar__toggle { display: none; }
  .widgets { grid-template-columns: 1fr 1fr; }
  .card--wide { grid-column: 1 / -1; }
}

/* ---------- Réservations (Phase 3) ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters select, .filters input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  font-family: var(--font-body);
}
.filters select:focus, .filters input:focus { border-color: var(--accent); outline: none; }

.flash { border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.flash--success { background: rgba(46,204,113,.12); border: 1px solid #2ECC71; color: #2ECC71; }
.flash--error { background: rgba(231,76,60,.12); border: 1px solid #E74C3C; color: #E74C3C; }

.badge-status {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-status--pending-confirmation,
.badge-status--unconfirmed,
.badge-status--unpaid { background: #2A2A1A; color: #FBBF24; }
.badge-status--confirmed,
.badge-status--active { background: #1A3A1A; color: #4ADE80; }
.badge-status--paid { background: #1A2A3A; color: #60A5FA; }
.badge-status--cancelled,
.badge-status--inactive { background: #2A1A1A; color: #F87171; }
.badge-status--complete { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.45); }

.actions { white-space: nowrap; }
.inline { display: inline; }
.btn-mini {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: none;
  display: inline-block;
  margin-right: 4px;
  transition: background 0.15s ease;
}
.btn-mini--confirm { background: #C9A84C; color: #0A0A0A; }
.btn-mini--confirm:hover { background: #D9B95E; }
.btn-mini--cancel { background: transparent; color: rgba(255, 99, 99, 0.8); border: 1px solid rgba(255, 99, 99, 0.5); }
.btn-mini--cancel:hover { background: rgba(255, 99, 99, 0.1); }
.btn-mini--contact { background: #25D366; color: #0A2A18; }
.btn-mini--contact:hover { background: #3DDE77; }

.cell-sub { display: block; color: var(--muted); font-size: 11px; }

.res-count { color: var(--muted); font-size: 12px; margin-top: 10px; }

.pagination { display: flex; align-items: center; gap: 14px; margin-top: 18px; justify-content: flex-end; }
.pagination a { color: var(--accent); }
.pagination span { color: var(--muted); font-size: 13px; }

/* ---------- Listings & Revenus (Phase 4) ---------- */
.widgets--4 { grid-template-columns: 1fr; }
.card__unit { font-size: 14px; color: var(--muted); font-weight: 500; }

.listing-thumb {
  width: 56px; height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: inline-block;
}
.listing-thumb--empty { background: var(--surface-2); }

.price-input {
  width: 80px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
}

.btn-mini--price { background: transparent; color: rgba(255,255,255,0.70); border: 1px solid rgba(255,255,255,0.20); }

.payout { margin-top: 22px; }
.payout__form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.payout__form input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
}
.payout__form input:focus { border-color: var(--accent); outline: none; }

@media (min-width: 768px) {
  .widgets--4 { grid-template-columns: repeat(4, 1fr); }
  .widgets--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Avis & Profil (Phase 5) ---------- */
.widgets--3 { grid-template-columns: 1fr; }

.reply-text { color: var(--muted); font-size: 13px; }
.reply-box { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.reply-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
  font-family: var(--font-body);
  resize: vertical;
}
.reply-textarea:focus { border-color: var(--accent); outline: none; }
.link { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 12px; padding: 0; margin-left: 4px; }

.profile { display: flex; flex-direction: column; gap: 16px; max-width: 560px; }
.profile__user { display: flex; align-items: center; gap: 16px; }
.profile__avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); }
.profile__avatar--empty { display: flex; align-items: center; justify-content: center; background: var(--surface-2); font-size: 28px; }
.profile__name { font-family: var(--font-display); font-size: 20px; margin: 0; }
.profile__email { color: var(--muted); font-size: 13px; margin: 2px 0 0; }

.profile__form { display: flex; flex-direction: column; gap: 8px; }
.profile__form label { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 8px; }
.profile__form input[type="text"] {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}
.profile__form input[type="text"]:focus { border-color: var(--accent); outline: none; }
.profile__checks { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin: 4px 0; }
.profile__checks label { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; }
.profile__radios { gap: 18px; }
.profile__save { margin-top: 18px; }

/* ---------- Langue (Phase 6) ---------- */
.lang-switcher { display: flex; gap: 4px; margin: 12px 0; }
.lang-switcher--top { justify-content: flex-end; margin-bottom: 16px; }
.lang-switcher__link {
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
  font-family: var(--font-body);
}
.lang-switcher__link--active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* ---------- RTL overrides ---------- */
[dir="rtl"] body { font-family: 'Noto Naskh Arabic', serif; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { font-family: 'Noto Naskh Arabic', serif; }
[dir="rtl"] .card__value { font-family: 'Noto Naskh Arabic', serif; }

[dir="rtl"] .sidebar {
  right: 0;
  left: auto;
  border-right: none;
  border-left: 1px solid #C9A84C;
  transform: translateX(100%);
}
[dir="rtl"] .sidebar--open { transform: translateX(0); }

[dir="rtl"] .content { margin-left: 0; }

[dir="rtl"] .bookings th,
[dir="rtl"] .bookings td { text-align: right; }
[dir="rtl"] .bookings .num { text-align: left; }
[dir="rtl"] .filters { direction: rtl; }

@media (min-width: 768px) {
  [dir="rtl"] .sidebar { transform: none; }
  [dir="rtl"] .content { margin-left: 0; margin-right: 232px; }
}

/* ---------- UX polish (phases 5-10) ---------- */

/* Cellules principales / secondaires */
.cell-main { font-weight: 600; display: block; }
.cell-sub { display: block; color: rgba(255,255,255,0.50); font-size: 11px; margin-top: 2px; }

/* Miniature avec initiale (fallback) */
.listing-thumb--initials {
  display: flex; align-items: center; justify-content: center;
  background: rgba(201,168,76,0.18); color: var(--accent);
  font-weight: 700; font-size: 14px;
}

/* Note : étoiles + chiffre */
.rating { display: inline-flex; align-items: center; gap: 6px; }
.rating__num { color: rgba(255,255,255,0.70); font-size: 12px; }

/* Éditeur de prix inline */
.price-edit { display: inline-flex; gap: 4px; align-items: center; margin-left: 6px; }

/* Toggle switch */
.toggle {
  width: 40px; height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  border: none;
  position: relative;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease;
  vertical-align: middle;
}
.toggle:disabled { cursor: not-allowed; opacity: 0.6; }
.toggle--on { background: #4ADE80; }
.toggle__knob {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s ease;
}
.toggle--on .toggle__knob { left: 21px; }
[dir="rtl"] .toggle__knob { left: auto; right: 3px; }
[dir="rtl"] .toggle--on .toggle__knob { right: 21px; left: auto; }

/* Avatars (initiales client) */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(201,168,76,0.18); color: var(--accent);
  font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.avatar--sm { width: 28px; height: 28px; font-size: 11px; margin-right: 8px; }
.client-cell { display: inline-flex; flex-direction: column; vertical-align: middle; }

/* Stats réservations */
.stats-res { margin-bottom: 4px; }

/* Filtres rapides (pills) */
.quick-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pill {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.60);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s ease, color 0.15s ease;
  min-height: 36px;
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill--active { background: rgba(201,168,76,0.15); border-color: var(--accent); color: var(--accent); }

/* Toasts */
.toasts {
  position: fixed;
  bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 100;
}
.toast {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  max-width: 320px;
}
.toast--success { background: #1A3A1A; color: #4ADE80; border: 1px solid rgba(74,222,128,0.4); }
.toast--error { background: #2A1A1A; color: #F87171; border: 1px solid rgba(248,113,113,0.4); }
.toast--info { background: #2A2A1A; color: #FBBF24; border: 1px solid rgba(251,191,36,0.4); }
[dir="rtl"] .toasts { right: auto; left: 20px; }

/* Page Today */
.today-cards { display: flex; flex-direction: column; gap: 12px; }
.today-card {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-left: 3px solid rgba(255,255,255,0.25);
  border-radius: 10px;
  padding: 14px 16px;
}
.today-card--checkin { border-left-color: #C9A84C; }
.today-card--ongoing { border-left-color: #4ADE80; }
.today-card--checkout { border-left-color: #F87171; }
.today-card--upcoming { border-left-color: rgba(255,255,255,0.25); }
.today-card__body { flex: 1; min-width: 0; }
.today-card__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.today-card__status { font-size: 13px; font-weight: 600; margin-top: 4px; display: block; }
.today-status--checkin { color: #C9A84C; }
.today-status--ongoing { color: #4ADE80; }
.today-status--checkout { color: #F87171; }
.today-card__dates { color: rgba(255,255,255,0.60); font-size: 12px; margin-top: 4px; display: block; }
.today-empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 40px 20px; text-align: center; color: rgba(255,255,255,0.50);
}
.today-empty__icon { font-size: 40px; }

/* Header mobile + overlay */
.mobile-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.mobile-brand { font-family: var(--font-display); font-weight: 600; flex: 1; }
.mobile-user { color: var(--muted); font-size: 13px; }
.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  width: 44px; height: 44px;
  font-size: 20px;
  cursor: pointer;
}
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 25;
}

/* Masquage de colonnes sur mobile */
@media (max-width: 767px) {
  .col-hide-md { display: none; }
  .mobile-header { display: flex; }
  .content { padding: 12px; }
  .page-title { font-size: 24px; }
  .widgets, .widgets--4, .widgets--3 { grid-template-columns: 1fr !important; }
  .card { padding: 16px; }
  .card--wide { grid-column: auto; }
  .bookings td, .bookings th { padding: 8px 6px; }
  .actions .btn-mini { min-height: 44px; margin-bottom: 4px; }
  .filters select, .filters input { min-height: 44px; }
  .payout__form input { min-height: 44px; }
  .btn { min-height: 44px; }
  .profile__form input[type="text"] { min-height: 44px; }
}
@media (min-width: 768px) {
  .mobile-header { display: none; }
}

/* ---------- Calendrier (phases 11-13) ---------- */
.calendar { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 992px) {
  .calendar { grid-template-columns: 1fr 260px; }
  .calendar-body { grid-column: 1; }
  .calendar-sidebar { grid-column: 2; grid-row: 1 / span 3; }
}

.calendar-toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  grid-column: 1 / -1;
}
.calendar-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  text-decoration: none;
}
.cal-nav-btn:hover { border-color: var(--accent); color: var(--accent); }
.calendar-month { font-family: var(--font-display); font-size: 18px; min-width: 130px; text-align: center; }
.calendar-price { display: flex; align-items: center; gap: 6px; }
.price-display { display: inline-flex; align-items: center; gap: 6px; }
.price-num { font-weight: 700; color: var(--accent); }

/* Popover confirmation */
.block-popover {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 40;
}
.block-popover__actions { display: flex; gap: 8px; }

/* Grille */
.cal-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.cal-wd {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.40); text-align: center; padding: 4px 0;
}
.day-cell {
  position: relative;
  min-height: 80px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 6px 8px;
  vertical-align: top;
  cursor: default;
  background: transparent;
  transition: background 0.15s ease;
}
.day-cell__num { font-size: 14px; font-weight: 600; display: block; }
.day-cell__client {
  display: block; font-size: 11px; color: var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px;
}
.day-cell__price {
  position: absolute; bottom: 6px; right: 8px;
  font-size: 11px; color: rgba(255,255,255,0.40);
  cursor: pointer;
}
.day-cell__price--custom { color: var(--accent); font-weight: 700; }
[dir="rtl"] .day-cell__price { right: auto; left: 8px; }
.day-cell__blocked-mark {
  position: absolute; top: 6px; right: 8px; color: rgba(255,255,255,0.30); font-size: 14px;
}
[dir="rtl"] .day-cell__blocked-mark { right: auto; left: 8px; }

.day-cell--padding { cursor: default; color: rgba(255,255,255,0.10); }
.day-cell--past { background: rgba(255,255,255,0.03); }
.day-cell--past .day-cell__num { color: rgba(255,255,255,0.20); }
.day-cell--past .day-cell__price { color: rgba(255,255,255,0.20); }
.day-cell--today { border: 1px solid var(--accent); }
.day-cell--free { cursor: pointer; }
.day-cell--free:hover { background: rgba(255,255,255,0.05); }
.day-cell--booked { background: rgba(201,168,76,0.20); }
.day-cell--booked .day-cell__num { color: var(--accent); }
.day-cell--booked-start { border-radius: 8px 0 0 8px; }
.day-cell--booked-end { border-radius: 0 8px 8px 0; }
.day-cell--booked-mid { border-radius: 0; }
.day-cell--blocked { background: rgba(255,255,255,0.06); cursor: pointer; }
.day-cell--blocked .day-cell__num { color: rgba(255,255,255,0.30); }
.day-cell--blocked .day-cell__price { color: rgba(255,255,255,0.30); text-decoration: line-through; }
.day-cell--loading { opacity: 0.5; cursor: wait; }

.price-input--mini { width: 60px; padding: 4px 6px; }

/* Sidebar réservations du mois */
.cal-bookings { display: flex; flex-direction: column; gap: 10px; }
.cal-booking {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 10px;
}
.cal-booking__body { flex: 1; min-width: 0; }
.cal-blocked { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.08); }

/* ---------- Slide-over éditeur listing (Phase 14) ---------- */
[x-cloak] { display: none !important; }

.slide-over { position: fixed; inset: 0; z-index: 50; display: none; }
.slide-over--open { display: block; }
.slide-over__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.slide-over__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 420px; max-width: 94vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}
.slide-over--open .slide-over__panel { transform: translateX(0); }
.slide-over__head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.slide-over__head .page-title { font-size: 20px; margin: 0; }
.slide-over__body { flex: 1; overflow-y: auto; padding: 20px; }
.slide-over__foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}

.editor-section { margin-bottom: 22px; }
.editor-title {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.40); margin-bottom: 10px;
}
.editor-label { display: block; font-size: 12px; color: rgba(255,255,255,0.60); margin: 12px 0 4px; }
.editor-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font-body);
}
.editor-input:focus { border-color: var(--accent); outline: none; }
.editor-textarea { resize: vertical; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

[dir="rtl"] .slide-over__panel {
  right: auto; left: 0;
  border-left: none; border-right: 1px solid var(--border);
  transform: translateX(-100%);
}
[dir="rtl"] .slide-over--open .slide-over__panel { transform: translateX(0); }

/* ---------- Payout + stats (phases 17-18) ---------- */
.payout-grid { display: grid; gap: 16px; margin-top: 22px; grid-template-columns: 1fr; }
@media (min-width: 992px) { .payout-grid { grid-template-columns: 1fr 1fr; } }
.payout-disabled { color: rgba(255,255,255,0.40); font-size: 13px; }
.chart-wrap { position: relative; height: 220px; }

.modal-payout {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 24px;
  width: 360px; max-width: 92vw;
  display: flex; flex-direction: column; gap: 12px;
}
.badge-status--payout-pending { background: #2A2A1A; color: #FBBF24; }
.badge-status--payout-processed { background: #1A3A1A; color: #4ADE80; }
.badge-status--payout-rejected { background: #2A1A1A; color: #F87171; }

/* ---------- Admin (Phase 22) ---------- */
.admin-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 992px) { .admin-grid { grid-template-columns: 1fr 1fr; } }
.admin-grid .card--wide { grid-column: 1 / -1; }
.assign-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 300px; overflow-y: auto;
  margin: 10px 0; padding: 6px;
  border: 1px solid var(--border); border-radius: 8px;
}
.assign-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border-radius: 6px;
}
.assign-item:hover { background: rgba(255,255,255,0.05); }
.assign-item--taken { opacity: 0.4; }
.assign-item input { accent-color: var(--accent); }
