  /* ============================================
   BOOKINGMANAG - DESIGN SYSTEM V2.0
   Modern, Clean, Professional
   ============================================ */

:root {
  /* Primary - Modern Green */
  --primary-color: #10B981;
  --primary-hover: #059669;
  --primary-light: #D1FAE5;
  --primary-dark: #047857;
  
  /* Secondary - Blue */
  --secondary-color: #3B82F6;
  --secondary-hover: #2563EB;
  --secondary-light: #DBEAFE;
  
  /* Backgrounds - Light Theme */
  --bg-primary: #FFFFFF;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #FFFFFF;
  --bg-hover: #F3F4F6;
  
  /* Text Colors */
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --text-inverse: #FFFFFF;
  
  /* Borders */
  --border-color: #E5E7EB;
  --border-color-subtle: #F3F4F6;
  --border-hover: #D1D5DB;
  
  /* Status */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
  
  /* iOS Safe Area (Capacitor) */
  --sat: env(safe-area-inset-top);
  --sar: env(safe-area-inset-right);
  --sab: env(safe-area-inset-bottom);
  --sal: env(safe-area-inset-left);
  --mobile-header-h: 60px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--bg-secondary);
  line-height: 1.5;
  /* Respect iOS notch / Dynamic Island */
  padding-top: 0;
  padding-right: var(--sar);
  padding-bottom: var(--sab);
  padding-left: var(--sal);
}

/* ============================================
   LAYOUT
   ============================================ */

.app-container {
  display: flex;
  min-height: 100dvh;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-primary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 8px;
  border-radius: var(--radius-lg);
  transition: var(--transition-fast);
}

.sidebar-logo:hover {
  background: var(--bg-hover);
}

.sidebar-logo i {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.sidebar-logo-text {
  flex: 1;
}

.sidebar-logo-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sidebar-logo-subtitle {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.sidebar-nav-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 12px 8px;
  margin: 16px 0 4px;
}

.sidebar-nav-label:first-child {
  margin-top: 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 2px 0;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-fast);
  cursor: pointer;
  position: relative;
}

.nav-item i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateX(2px);
}

.nav-item:hover i {
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.nav-item.active i {
  color: white;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-full);
  min-width: 20px;
  text-align: center;
}

.nav-item.active .nav-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border-color);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: var(--transition-fast);
}

.user-profile:hover {
  background: var(--bg-hover);
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: #10B981;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 100px; /* Force une largeur minimale pour éviter width: 0 */
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-logout {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-shrink: 0;
}

.user-logout:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100dvh;
  background: var(--bg-secondary);
}

/* Header */
.main-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

.header-left {
  flex: 1;
}

.page-kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 600px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Page Content */
.page-content {
  padding: 24px 32px;
}

/* ============================================
   CARDS
   ============================================ */

.card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  /* transition supprimée car elle fait bouger tous les cadres */
}

/* Si tu veux un effet hover uniquement sur certaines cartes cliquables, 
   ajoute la classe .card-clickable et utilise :
   .card.card-clickable:hover { box-shadow: var(--shadow-md); }
*/

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
/* DASHBOARD - PROCHAINES ARRIVÉES & DÉPARTS */

.upcoming-list {
  margin-top: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color-subtle);
  overflow: hidden;
}

.upcoming-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.2fr 0.8fr 0.9fr;
  gap: 8px;
  padding: 8px 10px;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.upcoming-row:nth-child(odd) {
  background: var(--bg-secondary);
}

.upcoming-row:nth-child(even) {
  background: var(--bg-primary);
}

.upcoming-row-header {
  background: var(--bg-tertiary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.upcoming-row-header span {
  white-space: nowrap;
}

.upcoming-col-date {
  font-weight: 500;
  color: var(--text-primary);
}

.upcoming-col-guest {
  font-weight: 500;
}

.upcoming-col-property {
  color: var(--text-secondary);
}

.upcoming-col-type,
.upcoming-col-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.upcoming-badge {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-subtle);
}

/* Petites pastilles type Arrivée / Départ */
.upcoming-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.upcoming-chip-checkin {
  background: var(--secondary-light);
  color: var(--secondary-hover);
}

.upcoming-chip-checkout {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* Statuts à droite */
.upcoming-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.upcoming-status-ok {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
}

.upcoming-status-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.upcoming-status-info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

/* Responsive */
@media (max-width: 900px) {
  .upcoming-row,
  .upcoming-row-header {
    grid-template-columns: 1.4fr 1.2fr 0.9fr;
  }
  .upcoming-col-property {
    display: none;
  }
}

@media (max-width: 600px) {
  .upcoming-row,
  .upcoming-row-header {
    grid-template-columns: 1.5fr 1fr;
  }
  .upcoming-col-property,
  .upcoming-col-type {
    display: none;
  }
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  font-size: 18px;
  color: var(--primary-color);
}
/* DASHBOARD - KPI PRINCIPAUX */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kpi-card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 12px 14px 10px;
  border: 1px solid var(--border-color-subtle);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.kpi-pill i {
  font-size: 11px;
}

.kpi-pill-success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.6);
}

.kpi-pill-info {
  background: rgba(59, 130, 246, 0.12);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.6);
}

.kpi-pill-neutral {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color-subtle);
}

.kpi-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Responsive KPI */
@media (max-width: 960px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-xs {
  padding: 6px 10px;
  font-size: 13px;
}

/* ============================================
   MOBILE HEADER (visible uniquement <1024px)
   ============================================ */

.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--mobile-header-h) + var(--sat));
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 0 16px;
  padding-top: var(--sat);
  align-items: center;
  justify-content: space-between;
  z-index: 110;
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 16px;
}

.mobile-logo i {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.mobile-menu-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
}

.mobile-menu-btn:hover {
  background: var(--bg-hover);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  /* Afficher le header mobile */
  .mobile-header {
    display: flex;
  }
  
  /* Cacher la sidebar par défaut */
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.active {
    transform: translateX(0);
  }
  
  .sidebar-overlay {
    display: block;
  }
  
  /* Ajuster le contenu */
  .main-content {
    margin-left: 0;
    padding-top: calc(var(--mobile-header-h) + var(--sat));
  }
  
  .main-header {
    padding: 20px 16px;
  }
  
  .page-content {
    padding: 20px 16px;
  }
  
  .page-title {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .header-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .page-title {
    font-size: 22px;
  }
}

/* ============================================
   UTILITIES
   ============================================ */

.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: 16px;
}

.mb-6 {
  margin-bottom: 24px;
}

.mt-4 {
  margin-top: 16px;
}

.flex {
  display: flex;
}

.gap-4 {
  gap: 16px;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}



/* DASHBOARD - ÉTAT DES CONNEXIONS */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.status-card {
  background: var(--bg-primary);
  border-radius: 18px;
  padding: 14px 14px 12px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

.status-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.status-card h3 {
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.status-card p {
  font-size: 12px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.status-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  overflow: hidden; /* important pour les logos */
}

.status-icon .status-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

/* Couleurs de fond brandées (optionnel mais joli) */
.status-icon-airbnb {
  background: #FF5A5F;
}

.status-icon-booking {
  background: #003580;
}

.status-icon-stripe {
  background: #635BFF;
}

.status-icon-whatsapp {
  background: #25D366;
}


.status-icon-ai {
  background: radial-gradient(circle at 30% 0%, #22C55E, #16A34A);
  color: #ECFDF5;
}

.status-label {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.status-ok {
  background: rgba(22, 163, 74, 0.15);
  color: #4ade80;
}

.status-warning {
  background: rgba(234, 179, 8, 0.15);
  color: #fbbf24;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 11px;
}



/* DASHBOARD - ONBOARDING */
.onboarding-section {
  margin-bottom: 24px;
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 16px 16px 14px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.onboarding-header h2 {
  font-size: 16px;
  margin-bottom: 2px;
}

.onboarding-header p {
  font-size: 12px;
  margin: 0;
}

.onboarding-progress-badge {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--secondary-color);
  border: 1px solid var(--secondary-hover);
  color: #ffffff;
  font-weight: 600;
}

.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid var(--border-color-subtle);
  background: var(--bg-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.onboarding-step:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.onboarding-step-icon {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.onboarding-step-icon.done {
  background: rgba(22, 163, 74, 0.16);
  color: #4ade80;
}

.onboarding-step-icon.todo {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.onboarding-step-content h3 {
  font-size: 13px;
  margin-bottom: 2px;
}

.onboarding-step-content p {
  font-size: 11px;
  margin: 0;
  color: var(--text-secondary);
}

.onboarding-step-status {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.onboarding-step-status.done {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

.onboarding-step-status.todo {
  background: var(--warning);
  color: #111827;
  border-color: var(--warning);
}



/* TOASTS / NOTIFICATIONS GLOBAL */
.toast-container {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  min-width: 240px;
  max-width: 320px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
}

.toast-icon {
  margin-top: 2px;
  font-size: 14px;
}

.toast-message {
  flex: 1;
  color: var(--text-primary);
}

.toast-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
}

.toast-success .toast-icon {
  color: #4ade80;
}

.toast-info .toast-icon {
  color: #38bdf8;
}

.toast-error .toast-icon {
  color: #f97373;
}


/* Sidebar logo image */
.sidebar-logo-img {
  height: 32px;
  width: auto;
  display: block;
}


/* Statuts planning ménage */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.8);
  color: #e5e7eb;
  cursor: pointer;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f97316;
}
.status-pending .status-dot {
  background: #f97316;
}
.status-inprogress {
  border-color: rgba(59,130,246,0.8);
  background: rgba(37,99,235,0.15);
  color: #bfdbfe;
}
.status-inprogress .status-dot {
  background: #3b82f6;
}
.status-done {
  border-color: rgba(22,163,74,0.9);
  background: rgba(22,163,74,0.15);
  color: #bbf7d0;
}
.status-done .status-dot {
  background: #22c55e;
}

.planning-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
/* ===== Correction clics bloqués sur mobile ===== */

/* Overlay : invisible et non cliquable par défaut */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45); /* ou ce que tu veux */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Quand on ouvre le menu (classe .active ajoutée en JS),
   l’overlay devient visible et cliquable */
.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
/* En-tête du calendrier façon "channel manager" */
.fc .fc-toolbar.fc-header-toolbar {
  margin-bottom: 12px;
}

.fc .fc-toolbar-title {
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
}

/* Jours en haut : jour + date bien visibles */
.fc .fc-col-header-cell-cushion {
  padding: 6px 4px;
  font-size: 12px;
  font-weight: 600;
}

/* Cells du mois */
.fc-daygrid-day-frame {
  padding: 2px;
}

/* Évènements style barres rouges comme ton screen */
.bh-event {
  border-radius: 6px;
  border: none;
  padding: 0;
}

/* Couleur par source */
.bh-event-airbnb {
  background: #d4202b;
  color: #fff;
}

.bh-event-booking {
  background: #003580;
  color: #fff;
}

.bh-event-direct {
  background: #4b5563;
  color: #fff;
}

/* Contenu interne des événements */
.bh-event-inner {
  padding: 4px 6px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bh-event-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.bh-event-property {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bh-event-guest {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Pastilles source (A / B / D) */
.bh-event-source {
  display: inline-flex;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.2);
}

.bh-source-airbnb {
  background: #fff;
  color: #d4202b;
}

.bh-source-booking {
  background: #fff;
  color: #003580;
}
/* ===========================
   LOADING OVERLAY GLOBAL
   =========================== */

.loading-overlay {
  position: fixed;
  inset: 0;
  display: none;                /* caché par défaut */
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.25); /* léger voile */
  z-index: 9998;
}

.loading-overlay.active {
  display: flex;                /* affiché seulement avec .active */
}

.loading-spinner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg-primary, #ffffff);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  color: var(--text-primary, #111827);
  font-size: 14px;
}

.loading-spinner i {
  font-size: 16px;
}


.bh-source-direct {
  background: rgba(255, 255, 255, 0.2);
}
/* Masquer l’assistant IA libre et la partie e-mail si tu veux alléger */
.ai-section {
  display: none;
}

.email-messaging-section {
  display: none;
}

/* Et/ou la section messages ménage si tu veux */
.cleaning-messages-section {
  display: none;
}
/* Améliorations globales mobile */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    padding-top: calc(var(--mobile-header-h) + var(--sat)); /* déjà présent, mais on renforce l'intention */
  }

  .page-content {
    padding: 16px 12px;
  }

  .card {
    border-radius: 16px;
    padding: 14px 14px;
    box-shadow: var(--shadow-md);
  }

  /* Le bloc calendrier prend toute la largeur */
  #calendarSection {
    margin-left: -12px;
    margin-right: -12px;
  }
}

/* Micro-ajustement du calendrier pour petit écran */
@media (max-width: 768px) {
  .calendar-wrapper {
    border-radius: 0;
    box-shadow: none;
  }

  .calendar-container {
    flex-direction: column;
  }

  .calendar-grid-wrapper {
    width: 100%;
    overflow-x: auto;
  }

  /* On s'assure que la grille est un peu plus large que l'écran,
     pour que les cases restent lisibles */
  .calendar-grid {
    min-width: 720px;
  }

  .calendar-cell {
    height: 32px;
  }

  .booking-block {
    font-size: 10px;
    padding: 2px 6px;
  }
}
/* Empêche la page complète de glisser horizontalement */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* On s'assure aussi que le conteneur principal ne déborde pas */
.app-container,
.main-content,
.page-content {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
/* --- NAV ITEMS : style uniforme "pill" --- */
.nav-item{
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  padding:14px 16px;
  margin:6px 12px;
  border-radius:999px;
  text-decoration:none;
  color:#6b7280;
  font-weight:600;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.nav-item i{
  width:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  color: inherit; /* l'icône suit la couleur du texte */
}

/* hover (sur tous) */
.nav-item:hover{
  background:#f3f4f6;
}

/* ACTIVE : exactement le style "Factures clients" */
.nav-item.active{
  background:#10B981;
  color:#ffffff;
  box-shadow: 0 12px 25px rgba(16,185,129,.25);
}

/* petit effet optionnel */
.nav-item.active:hover{
  transform: translateY(-1px);
}

/* badge à droite (Calendrier) */
.nav-badge{
  margin-left:auto;
  background: rgba(255,255,255,.25);
  color:#ffffff;
  font-weight:800;
  padding:6px 12px;
  border-radius:999px;
}
/* ====== TITRES DE SECTIONS (comme Factures clients) ====== */
.nav-section-title{
  margin: 22px 16px 10px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  color: #9CA3AF !important;
}

/* ====== LIENS (inactifs = simples, pas de pill gris) ====== */
.nav-item{
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;

  padding: 14px 18px !important;
  margin: 6px 12px !important;

  border-radius: 999px !important;

  background: transparent !important;     /* <-- clé : enlève le gris */
  box-shadow: none !important;            /* <-- enlève les ombres résiduelles */
  color: #6B7280 !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.nav-item i{
  width: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  color: inherit !important;
}

/* Hover discret (tu peux retirer si tu veux 0 fond) */
.nav-item:hover{
  background: rgba(16,185,129,.08) !important;
  color: #111827 !important;
}

/* ====== ACTIVE (le seul en pill vert + ombre, comme Factures clients) ====== */
.nav-item.active{
  background: #10B981 !important;
  color: #ffffff !important;
  box-shadow: 0 18px 30px rgba(16,185,129,.25) !important;
}

.nav-item.active i{
  color: #ffffff !important;
}

/* Badge calendrier : reste lisible en actif */
.nav-item.active .nav-badge{
  background: rgba(255,255,255,.25) !important;
  color: #ffffff !important;
}

/* Badge normal */
.nav-badge{
  margin-left: auto !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
}


/* =========================
   WHATSAPP CHAT STYLE (OWNER)
   ========================= */

/* Background */
#chatMessages, .chat-messages, .chat-modal-messages{
  background: #efeae2 !important;
  background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* Hide avatar + sender label */
.chat-avatar{ display:none !important; }
.chat-sender{ display:none !important; }

/* Layout */
.chat-message{
  display:flex;
  flex-direction:column;
  max-width:72%;
  margin: 0 0 8px 0;
}

/* Right for owner */
.chat-message.owner{ margin-left:auto !important; align-items:flex-end; }
/* Left for guest */
.chat-message.guest{ margin-right:auto !important; align-items:flex-start; }

/* Bubble */
.chat-bubble{
  width: fit-content;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 18px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.08);
  position: relative;
  line-height: 1.25;
}

/* Colors */
.chat-message.owner .chat-bubble{ background:#dcf8c6 !important; }
.chat-message.guest .chat-bubble{ background:#ffffff !important; }

/* Bubble tail */
.chat-message.owner .chat-bubble::before{
  content:"";
  position:absolute;
  right:-6px;
  bottom:6px;
  border-top:6px solid transparent;
  border-bottom:6px solid transparent;
  border-left:6px solid #dcf8c6;
}
.chat-message.guest .chat-bubble::before{
  content:"";
  position:absolute;
  left:-6px;
  bottom:6px;
  border-top:6px solid transparent;
  border-bottom:6px solid transparent;
  border-right:6px solid #ffffff;
}

/* Meta (heure + statut) */
.chat-meta{
  display:flex;
  gap:6px;
  align-items:center;
  font-size:10px !important;
  opacity:.7 !important;
  margin-top:3px !important;
}
.chat-time, .chat-status{
  font-size:inherit !important;
  font-weight:400 !important;
}
/* ✅ Fix global mobile : éviter le contenu sous le header */
@media (max-width: 768px) {

  .app-container {
    min-height: 100dvh;
  }

  /* Sécurise le header et le menu */
  .mobile-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1300;
  }

  #sidebarOverlay.sidebar-overlay {
    z-index: 1100;
  }

  aside.sidebar {
    z-index: 1200;
  }
}

/* ================================
   Logo mobile : version "desktop-like"
   ================================ */
.mobile-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.mobile-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mobile-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.mobile-logo-title {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
}

.mobile-logo-subtitle {
  font-size: 10px;
  color: #6B7280;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.logo-green { color: #10B981; font-weight: 800; }
.logo-dark  { color: #111827; font-weight: 600; }

@media (max-width: 360px) {
  .mobile-logo-subtitle { display: none; }
}
