/* ============================================
   BENTO GRID - OWNERS (Propriétaires)
   Modern Bento Grid design inspired by dashboard-bento.css
   with adaptations for Owners management
   ============================================ */

:root {
  /* Couleurs principales Homup */
  --owners-lime: #A8E34F;
  --owners-lime-light: #E8FFB7;
  --owners-lime-dark: #7FC73E;
  --owners-green: #00D97A;
  --owners-green-dark: #00A85E;
  --owners-forest: #0A1A16;
  --owners-forest-light: #0f2621;
  --owners-forest-dark: #061110;

  /* Gris */
  --owners-gray-50: #F9FAFB;
  --owners-gray-100: #F3F4F6;
  --owners-gray-200: #E5E7EB;
  --owners-gray-300: #D1D5DB;
  --owners-gray-400: #9CA3AF;
  --owners-gray-500: #6B7280;
  --owners-gray-600: #4B5563;
  --owners-gray-700: #374151;
  --owners-gray-800: #1F2937;
  --owners-gray-900: #111827;

  /* États */
  --owners-success: #10B981;
  --owners-warning: #F59E0B;
  --owners-danger: #EF4444;
  --owners-info: #3B82F6;
}

/* ============================================
   CONTENEUR PRINCIPAL
   ============================================ */

.owners-bento-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem;
}

/* ============================================
   HEADER
   ============================================ */

.owners-bento-header {
  margin-bottom: 2rem;
}

.owners-bento-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--owners-forest);
  margin-bottom: 0.5rem;
}

.owners-bento-subtitle {
  font-size: 1rem;
  color: var(--owners-gray-600);
}

/* ============================================
   STATS GRID
   ============================================ */

.owners-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.owners-stat-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(10, 26, 22, 0.08);
  border: 1px solid var(--owners-gray-200);
  transition: all 0.3s ease;
}

.owners-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -6px rgba(0, 0, 0, 0.15);
  border-color: var(--owners-lime);
}

.owners-stat-label {
  font-size: 0.875rem;
  color: var(--owners-gray-600);
  margin-bottom: 0.5rem;
}

.owners-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--owners-forest);
}

.owners-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

/* ============================================
   ACTIONS CARD
   ============================================ */

.owners-actions-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(10, 26, 22, 0.08);
  border: 1px solid var(--owners-gray-200);
  margin-bottom: 2rem;
}

/* ============================================
   HARMONISATION : STYLES .tenants-card
   (copié depuis tenants-bento.css pour assurer
   l'application sur toutes les pages)
   ============================================ */

/* Styles de base carte */
.tenants-card {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--owners-gray-200);
  box-shadow: 0 2px 8px rgba(10, 26, 22, 0.08);
  transition: all 0.3s ease;
  overflow: hidden;
}

.tenants-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -6px rgba(0, 0, 0, 0.15);
  border-color: var(--owners-lime);
}

.tenants-card-header {
  padding: 1.25rem;
  border-bottom: 1px solid var(--owners-gray-100);
}

.tenants-card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--owners-gray-900);
  margin-bottom: 0.5rem;
}

.tenants-card-subtitle {
  font-size: 0.875rem;
  color: var(--owners-gray-600);
  margin: 0;
}

.tenants-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tenants-card-body {
  padding: 1.25rem;
}

.tenants-card-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tenants-info-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--owners-gray-600);
}

.tenants-info-row i {
  width: 1rem;
  color: var(--owners-gray-400);
  flex-shrink: 0;
}

.tenants-card-footer {
  padding: 1rem 1.25rem;
  background: var(--owners-gray-50);
  display: flex;
  gap: 0.5rem;
}

/* BADGES */
.tenants-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.tenants-badge-success {
  background: #D1FAE5;
  color: #065F46;
}

.tenants-badge-warning {
  background: #FEF3C7;
  color: #92400E;
}

.tenants-badge-danger {
  background: #FEE2E2;
  color: #991B1B;
}

.tenants-badge-info {
  background: #DBEAFE;
  color: #1E40AF;
}

.tenants-badge-neutral {
  background: var(--owners-gray-100);
  color: var(--owners-gray-700);
}

/* BOUTONS D'ACTION */
.tenants-btn-action {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--owners-gray-300);
  background: white;
  color: var(--owners-gray-700);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tenants-btn-action:hover {
  background: var(--owners-gray-50);
  border-color: var(--owners-gray-400);
}

.tenants-btn-action-primary {
  flex: 1;
  background: var(--owners-lime);
  color: var(--owners-forest);
  border-color: var(--owners-lime);
}

.tenants-btn-action-primary:hover {
  background: var(--owners-lime-dark);
  border-color: var(--owners-lime-dark);
}

/* ============================================
   VUE LISTE : .properties-container.properties-list
   ============================================ */

.properties-container.properties-list .tenants-card {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--owners-gray-200);
  box-shadow: none;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.2s ease;
}

/* Alternance de couleurs */
.properties-container.properties-list .tenants-card:nth-child(even) {
  background: #F9FAFB;
}

.properties-container.properties-list .tenants-card:nth-child(odd) {
  background: white;
}

.properties-container.properties-list .tenants-card:hover {
  background: #F0FDF4;
  transform: translateY(0) translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Premier et dernier élément avec coins arrondis */
.properties-container.properties-list .tenants-card:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.properties-container.properties-list .tenants-card:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border-bottom: 1px solid var(--owners-gray-200);
}

/* Layout horizontal pour vue liste */
.properties-container.properties-list .tenants-card-header {
  border-bottom: none;
  padding: 0;
  min-width: 250px;
  flex-shrink: 0;
}

.properties-container.properties-list .tenants-card-body {
  padding: 0;
  flex: 1;
  min-width: 0;
}

.properties-container.properties-list .tenants-card-footer {
  padding: 0;
  border-top: none;
  flex-shrink: 0;
}

/* Override pour le bouton primaire en mode liste */
.properties-container.properties-list .tenants-btn-action-primary {
  flex: 0 0 auto;
}

.properties-container.properties-list .tenants-btn-action {
  padding: 0.5rem 0.75rem;
}

.properties-container.properties-list .tenants-card-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.properties-container.properties-list .tenants-card-badges {
  margin-top: 0.25rem;
}

.properties-container.properties-list .tenants-card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.properties-container.properties-list .tenants-info-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.875rem;
}

.properties-container.properties-list .tenants-info-row i {
  font-size: 0.875rem;
  opacity: 0.6;
}

/* Style pour les cartes inactives */
.tenants-card.inactive-card {
  opacity: 0.6;
  background: var(--owners-gray-100);
  position: relative;
}

.tenants-card.inactive-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(0, 0, 0, 0.02) 10px,
    rgba(0, 0, 0, 0.02) 20px
  );
  pointer-events: none;
}

/* Responsive mode liste */
@media (max-width: 1024px) {
  .properties-container.properties-list .tenants-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
  }
  
  .properties-container.properties-list .tenants-card-header {
    min-width: auto;
  }
  
  .properties-container.properties-list .tenants-card-info {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* ============================================
   GRID OWNERS
   ============================================ */

.owners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

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

/* Mobile */
@media (max-width: 767px) {
  .owners-bento-container {
    padding: 1rem;
  }
  
  .owners-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .owners-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .owners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
