/* =====================================================
   SPEAKFLOW AI - STYLES PRINCIPAUX (APP-OLD)
   Inspiré du design moderne de l'application principale
   ===================================================== */

/* Variables CSS personnalisées */
:root {
  /* Couleurs principales - Palette moderne */
  --sf-primary: #2563eb;
  --sf-primary-dark: #1e40af;
  --sf-primary-light: #60a5fa;
  --sf-secondary: #64748b;
  --sf-success: #10b981;
  --sf-danger: #ef4444;
  --sf-warning: #f59e0b;
  --sf-info: #06b6d4;
  --sf-light: #f1f5f9;
  --sf-dark: #0f172a;
  --sf-accent: #8b5cf6;
  
  /* Couleurs spécialisées */
  --sf-voice-male: #4a90e2;
  --sf-voice-female: #e24a90;
  --sf-voice-neutral: #9b59b6;
  --sf-assistant-active: #28a745;
  --sf-assistant-inactive: #6c757d;
  --sf-call-success: #28a745;
  --sf-call-failed: #dc3545;
  --sf-call-pending: #ffc107;
  
  /* Espacements */
  --sf-spacing-xs: 0.25rem;
  --sf-spacing-sm: 0.5rem;
  --sf-spacing-md: 1rem;
  --sf-spacing-lg: 1.5rem;
  --sf-spacing-xl: 3rem;
  
  /* Bordures et ombres */
  --sf-border-radius: 0.375rem;
  --sf-border-radius-lg: 0.5rem;
  --sf-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --sf-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --sf-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  
  /* Transitions */
  --sf-transition: all 0.15s ease-in-out;
  --sf-transition-slow: all 0.3s ease-in-out;
}

/* =====================================================
   STYLES DE BASE
   ===================================================== */

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: var(--sf-dark);
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Contenu principal */
.main-content {
  flex: 1;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Footer sticky */
.footer {
  margin-top: auto;
  background: var(--sf-dark);
  color: white;
  padding: 1rem 0;
  text-align: center;
}

/* =====================================================
   HEADER ET NAVIGATION
   ===================================================== */

.header {
  background: linear-gradient(135deg, var(--sf-primary) 0%, var(--sf-primary-dark) 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: var(--sf-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header.admin-header {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

/* Fallback pour les classes Bootstrap si elles ne se chargent pas */
.me-1 {
  margin-right: 0.25rem !important;
}

.me-2 {
  margin-right: 0.5rem !important;
}

.d-flex {
  display: flex !important;
}

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

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

.gap-3 {
  gap: 1rem !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.text-muted {
  color: #333333 !important;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo:hover {
  color: white;
  text-decoration: none;
}

/* Nouveau système de navigation */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-radius: var(--sf-border-radius);
  font-weight: 500;
  font-size: 0.75rem;
  transition: var(--sf-transition);
  min-width: 70px;
  text-align: center;
}

.nav-btn i {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.nav-btn span {
  font-size: 0.7rem;
  line-height: 1;
}

.nav-btn:hover,
.nav-btn.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-btn.active {
  background-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Menu hamburger */
.nav-hamburger {
  position: relative;
}

.hamburger-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  padding: 0.5rem !important;
  border-radius: var(--sf-border-radius) !important;
  cursor: pointer !important;
  transition: var(--sf-transition) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
}

.hamburger-btn:hover,
.hamburger-btn:focus,
.hamburger-btn.show {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-1px) !important;
  color: white !important;
  box-shadow: none !important;
}

.hamburger-btn i {
  font-size: 1.2rem !important;
}

/* Masquer la flèche du dropdown */
.hamburger-btn::after {
  display: none !important;
}

/* Dropdown menu styles */
.dropdown-menu {
  background: white;
  border: none;
  border-radius: var(--sf-border-radius-lg);
  box-shadow: var(--sf-shadow-lg);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  min-width: 220px;
}

.dropdown-item {
  padding: 0.75rem 1.25rem;
  color: #000000;
  text-decoration: none;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  transition: var(--sf-transition);
}

.dropdown-item:hover {
  background-color: var(--sf-light);
  color: var(--sf-primary);
}

.dropdown-item.text-warning:hover {
  background-color: #fff3cd;
  color: #856404;
}

.dropdown-item.text-danger:hover {
  background-color: #f8d7da;
  color: #721c24;
}

.dropdown-divider {
  margin: 0.5rem 0;
  border-color: #e9ecef;
}

/* Navigation mobile */
@media (max-width: 768px) {
  .header .container {
    padding: 0 0.5rem;
  }
  
  .navbar-nav {
    gap: 0.5rem;
  }
  
  .nav-main {
    gap: 0.125rem;
  }
  
  .nav-btn {
    min-width: 60px;
    padding: 0.4rem 0.5rem;
  }
  
  .nav-btn i {
    font-size: 1rem;
    margin-bottom: 0.2rem;
  }
  
  .nav-btn span {
    font-size: 0.65rem;
  }
  
  .hamburger-btn {
    width: 36px;
    height: 36px;
    padding: 0.4rem;
  }
  
  .hamburger-btn i {
    font-size: 1rem;
  }
  
  .dropdown-menu {
    min-width: 200px;
    margin-top: 0.25rem;
  }
  
  .dropdown-item {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .navbar-nav {
    gap: 0.25rem;
  }
  
  .nav-btn {
    min-width: 50px;
    padding: 0.3rem 0.4rem;
  }
  
  .nav-btn span {
    font-size: 0.6rem;
  }
  
  .hamburger-btn {
    width: 32px;
    height: 32px;
  }
  
  .logo {
    font-size: 1.2rem;
  }
}

/* =====================================================
   CARTES ET COMPOSANTS
   ===================================================== */

.card {
  background: white;
  border: none;
  border-radius: var(--sf-border-radius-lg);
  box-shadow: var(--sf-shadow-sm);
  margin-bottom: var(--sf-spacing-lg);
  overflow: hidden;
  transition: var(--sf-transition);
}

.card:hover {
  box-shadow: var(--sf-shadow);
  transform: translateY(-2px);
}

.card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  padding: 1.5rem;
  font-weight: 600;
}

.card-header h1,
.card-header h2,
.card-header h3 {
  margin: 0;
  color: #000000;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  background-color: #f8f9fa;
  border-top: 1px solid rgba(0, 0, 0, 0.125);
  padding: 1rem 1.5rem;
}

/* Cartes de statistiques */
.stat-card {
  background: linear-gradient(135deg, var(--sf-primary) 0%, var(--sf-primary-dark) 100%);
  color: white;
  border-radius: var(--sf-border-radius-lg);
  padding: 1.5rem;
  text-align: center;
  border: none;
  box-shadow: var(--sf-shadow);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0;
}

/* =====================================================
   FORMULAIRES
   ===================================================== */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #000000;
  font-weight: 600;
  font-size: 0.875rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: var(--sf-border-radius);
  font-size: 1rem;
  line-height: 1.5;
  color: #000000;
  background-color: white;
  transition: var(--sf-transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--sf-primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control:invalid {
  border-color: var(--sf-danger);
}

.form-text {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--sf-secondary);
}

/* =====================================================
   BOUTONS
   ===================================================== */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: var(--sf-border-radius);
  transition: var(--sf-transition);
  user-select: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--sf-primary) 0%, var(--sf-primary-dark) 100%);
  border-color: var(--sf-primary);
  box-shadow: var(--sf-shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--sf-primary-dark) 0%, #004085 100%);
  box-shadow: var(--sf-shadow);
}

.btn-secondary {
  color: white;
  background-color: var(--sf-secondary);
  border-color: var(--sf-secondary);
}

.btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.btn-success {
  color: white;
  background: linear-gradient(135deg, var(--sf-success) 0%, #1e7e34 100%);
  border-color: var(--sf-success);
  box-shadow: var(--sf-shadow-sm);
}

.btn-success:hover {
  background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
  box-shadow: var(--sf-shadow);
}

.btn-danger {
  color: white;
  background: linear-gradient(135deg, var(--sf-danger) 0%, #c82333 100%);
  border-color: var(--sf-danger);
}

.btn-warning {
  color: #000000;
  background-color: var(--sf-warning);
  border-color: var(--sf-warning);
}

.btn-info {
  color: white;
  background-color: var(--sf-info);
  border-color: var(--sf-info);
}

.btn-light {
  color: #000000;
  background-color: var(--sf-light);
  border-color: var(--sf-light);
}

.btn-dark {
  color: white;
  background-color: var(--sf-dark);
  border-color: var(--sf-dark);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* =====================================================
   ALERTES
   ===================================================== */

.alert {
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--sf-border-radius-lg);
  font-size: 0.875rem;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeaa7;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

/* =====================================================
   GRILLE ET LAYOUT
   ===================================================== */

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem;
}

.col,
.col-md-3,
.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12 {
  padding: 0 0.75rem;
  margin-bottom: 1.5rem;
}

.col {
  flex: 1;
}

.col-md-3 {
  flex: 0 0 25%;
}

.col-md-4 {
  flex: 0 0 33.333333%;
}

.col-md-6 {
  flex: 0 0 50%;
}

.col-md-8 {
  flex: 0 0 66.666667%;
}

.col-md-12 {
  flex: 0 0 100%;
}

@media (max-width: 768px) {
  .col-md-3,
  .col-md-4,
  .col-md-6,
  .col-md-8 {
    flex: 0 0 100%;
  }
}

/* =====================================================
   TABLEAUX
   ===================================================== */

.table-responsive {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #000000;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
  background-color: var(--sf-light);
  font-weight: 600;
}

.table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.025);
}

/* =====================================================
   BADGES ET STATUTS
   ===================================================== */

.badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--sf-border-radius);
}

.badge-primary {
  color: white;
  background-color: var(--sf-primary);
}

.badge-secondary {
  color: white;
  background-color: var(--sf-secondary);
}

.badge-success {
  color: white;
  background-color: var(--sf-success);
}

.badge-danger {
  color: white;
  background-color: var(--sf-danger);
}

.badge-warning {
  color: #000000;
  background-color: var(--sf-warning);
}

.badge-info {
  color: white;
  background-color: var(--sf-info);
}

/* =====================================================
   UTILITAIRES
   ===================================================== */

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

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

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

.text-muted {
  color: #333333 !important;
}

.text-primary {
  color: var(--sf-primary) !important;
}

.text-success {
  color: var(--sf-success) !important;
}

.text-danger {
  color: var(--sf-danger) !important;
}

.text-warning {
  color: var(--sf-warning) !important;
}

.text-info {
  color: var(--sf-info) !important;
}

.d-flex {
  display: flex;
}

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

.justify-content-center {
  justify-content: center;
}

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

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 1rem;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.p-3 {
  padding: 1rem;
}

.p-4 {
  padding: 1.5rem;
}

.w-100 {
  width: 100%;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   COMPOSANTS SPÉCIFIQUES SPEAKFLOW
   ===================================================== */

/* =====================================================
   DASHBOARD HEADER - DESIGN MODERNE
   ===================================================== */

.dashboard-header {
  background: linear-gradient(135deg, var(--sf-primary) 0%, var(--sf-primary-dark) 100%);
  color: white;
  padding: 3rem 0 2.5rem 0;
  margin-bottom: 2.5rem;
  border-radius: 0 0 30px 30px;
  box-shadow: 0 10px 40px rgba(37, 99, 235, 0.2);
  position: relative;
  overflow: hidden;
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(30%, -50%);
}

.welcome-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.welcome-content {
  flex: 1;
}

.welcome-title {
  font-size: 2.75rem;
  font-weight: 800;
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  letter-spacing: -0.02em;
}

.welcome-title i {
  font-size: 2.5rem;
  margin-right: 1rem;
  opacity: 0.9;
}

.welcome-subtitle {
  font-size: 1.15rem;
  opacity: 0.95;
  margin: 0;
  font-weight: 400;
  max-width: 600px;
  line-height: 1.6;
}

.welcome-actions {
  display: flex;
  gap: 1rem;
}

.welcome-actions .btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  color: var(--sf-primary);
  border: none;
}

.welcome-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Page Header (version unifiée pour toutes les pages) */
.page-header {
  background: linear-gradient(135deg, var(--sf-primary) 0%, var(--sf-primary-dark) 100%);
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-radius: 0 0 20px 20px;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
}

.page-header .subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  margin: 0.5rem 0 0 0;
}

/* Stats Section */
.stats-section {
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--sf-shadow);
  position: relative;
  overflow: hidden;
  transition: var(--sf-transition);
  border: none;
  margin-bottom: 1rem;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sf-shadow-lg);
}

.stat-card-primary {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
}

.stat-card-success {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.stat-card-info {
  background: linear-gradient(135deg, #17a2b8, #138496);
  color: white;
}

.stat-card-warning {
  background: linear-gradient(135deg, #ffc107, #e0a800);
  color: #212529;
}

.stat-icon {
  font-size: 3rem;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.stat-trend {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.trend-up {
  background: rgba(255, 255, 255, 0.3);
  color: #28a745;
}

.trend-down {
  background: rgba(255, 255, 255, 0.3);
  color: #dc3545;
}

.trend-neutral {
  background: rgba(255, 255, 255, 0.3);
  color: #6c757d;
}

/* Actions rapides */
.quick-actions-card {
  background: white;
  border-radius: 15px;
  box-shadow: var(--sf-shadow);
  overflow: hidden;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.quick-action-item {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 10px;
  text-decoration: none;
  color: var(--sf-dark);
  transition: var(--sf-transition);
  border: 2px solid transparent;
}

.quick-action-item:hover {
  background: var(--sf-primary);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--sf-primary);
}

.action-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background: var(--sf-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

.quick-action-item:hover .action-icon {
  background: white;
  color: var(--sf-primary);
}

.action-content {
  flex: 1;
}

.action-content h6 {
  margin: 0 0 0.25rem 0;
  font-weight: 600;
}

.action-content small {
  color: var(--sf-secondary);
  font-size: 0.85rem;
}

.quick-action-item:hover .action-content small {
  color: rgba(255, 255, 255, 0.8);
}

.action-arrow {
  color: var(--sf-secondary);
  font-size: 1.2rem;
}

.quick-action-item:hover .action-arrow {
  color: white;
}

/* Cartes d'assistant */
.assistant-card {
  position: relative;
  overflow: hidden;
}

.assistant-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sf-primary), var(--sf-accent));
}

.assistant-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
}

.assistant-status.active {
  background-color: var(--sf-assistant-active);
}

.assistant-status.inactive {
  background-color: var(--sf-assistant-inactive);
}

/* Recent Assistants */
.recent-assistants-card {
  background: white;
  border-radius: 15px;
  box-shadow: var(--sf-shadow);
  height: fit-content;
}

.assistants-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.assistant-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 10px;
  text-decoration: none;
  color: var(--sf-dark);
  transition: var(--sf-transition);
  border: 2px solid transparent;
}

.assistant-item:hover {
  background: var(--sf-primary);
  color: white;
  text-decoration: none;
  transform: translateX(5px);
  border-color: var(--sf-primary);
}

.assistant-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--sf-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  flex-shrink: 0;
}

.assistant-item:hover .assistant-avatar {
  background: white;
  color: var(--sf-primary);
}

.assistant-info {
  flex: 1;
}

.assistant-name {
  margin: 0 0 0.25rem 0;
  font-weight: 600;
  font-size: 1rem;
}

.assistant-specialty {
  color: var(--sf-secondary);
  font-size: 0.85rem;
}

.assistant-item:hover .assistant-specialty {
  color: rgba(255, 255, 255, 0.8);
}

.assistant-arrow {
  color: var(--sf-secondary);
  font-size: 1rem;
}

.assistant-item:hover .assistant-arrow {
  color: white;
}

/* Company Info Section */
.company-info-section {
  margin-bottom: 2rem;
}

.company-info-section .card {
  background: white;
  border-radius: 15px;
  box-shadow: var(--sf-shadow);
}

.info-group {
  margin-bottom: 1.5rem;
}

.info-label {
  font-weight: 600;
  color: var(--sf-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.info-value {
  color: var(--sf-dark);
  font-size: 1rem;
  margin: 0;
}

/* Onboarding Section */
.onboarding-section {
  margin-bottom: 2rem;
}

.onboarding-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 3px dashed #007bff;
  border-radius: 20px;
  text-align: center;
}

.onboarding-icon {
  font-size: 5rem;
  color: var(--sf-primary);
  margin-bottom: 1.5rem;
}

.onboarding-title {
  color: var(--sf-primary);
  margin-bottom: 1rem;
  font-size: 2rem;
}

.onboarding-description {
  font-size: 1.1rem;
  color: var(--sf-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.onboarding-features {
  margin: 2rem 0;
}

.feature-item {
  text-align: center;
  padding: 1rem;
}

.feature-icon {
  font-size: 2rem;
  color: var(--sf-primary);
  margin-bottom: 0.5rem;
}

.feature-item h6 {
  color: var(--sf-dark);
  margin-bottom: 0.25rem;
}

.feature-item small {
  color: var(--sf-secondary);
}

.onboarding-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.onboarding-actions .btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Statuts d'appels */
.call-status {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-completed {
  background-color: #d4edda;
  color: #155724;
}

.status-failed {
  background-color: #f8d7da;
  color: #721c24;
}

.status-busy {
  background-color: #fff3cd;
  color: #856404;
}

.status-no-answer {
  background-color: #e2e3e5;
  color: #383d41;
}

/* Lecteur audio */
.audio-player {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: var(--sf-border-radius);
  padding: 1rem;
  margin: 1rem 0;
}

.audio-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--sf-secondary);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: var(--sf-border-radius);
  text-decoration: none;
  color: var(--sf-primary);
  transition: var(--sf-transition);
}

.pagination a:hover {
  background-color: var(--sf-primary);
  color: white;
  text-decoration: none;
}

.pagination .current {
  background-color: var(--sf-primary);
  color: white;
  border-color: var(--sf-primary);
}

/* Avatar utilisateur */
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sf-primary), var(--sf-accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Statuts utilisateur */
.user-status-active {
  color: var(--sf-success);
  font-weight: 600;
}

.user-status-inactive {
  color: var(--sf-secondary);
  font-weight: 600;
}

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

/* Responsive Dashboard Styles */
@media (max-width: 768px) {
  .welcome-section,
  .page-header .container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .welcome-title,
  .page-header h1 {
    font-size: 1.75rem;
    justify-content: center;
  }
  
  .welcome-subtitle,
  .page-header .subtitle {
    font-size: 0.95rem;
  }
  
  .welcome-actions {
    width: 100%;
  }
  
  .welcome-actions .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-actions {
    flex-direction: column;
    align-items: center;
  }

  .stats-section .col-md-6,
  .stats-section .col-lg-3 {
    margin-bottom: 1rem;
  }
  
  .dashboard-header,
  .page-header {
    padding: 1.25rem 0;
    border-radius: 0 0 15px 15px;
  }
  
  /* Cartes */
  .card-header h1,
  .card-header h2,
  .card-header h3 {
    font-size: 1.25rem;
  }
  
  /* Actions rapides */
  .quick-action-item {
    padding: 1rem;
  }
  
  .action-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  /* Assistants */
  .assistant-item {
    padding: 0.75rem;
  }
  
  .assistant-avatar {
    width: 35px;
    height: 35px;
  }
  
  /* Statistiques */
  .stat-card {
    padding: 1rem;
  }
  
  .stat-icon {
    font-size: 2.5rem;
  }
  
  /* Grille responsive */
  .row {
    margin: 0 -0.5rem;
  }

  .col,
  .col-md-3,
  .col-md-4,
  .col-md-6,
  .col-md-8,
  .col-lg-3,
  .col-lg-4,
  .col-lg-8 {
    padding: 0 0.5rem;
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* Fix spécifique pour le dashboard - forcer toutes les colonnes en full width sur mobile */
  .stats-section .row .col-lg-3,
  .stats-section .row .col-md-6,
  .main-dashboard .row .col-lg-8,
  .main-dashboard .row .col-lg-4,
  .onboarding-features .row .col-md-3,
  .company-info-section .row .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  /* Container mobile */
  .container {
    padding: 0 0.75rem;
  }
  
  /* Headers */
  .welcome-title,
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .welcome-subtitle,
  .page-header .subtitle {
    font-size: 0.875rem;
  }
  
  .dashboard-header,
  .page-header {
    padding: 1rem 0;
  }
  
  /* Cartes */
  .card {
    margin-bottom: 1rem;
    border-radius: 10px;
  }
  
  .card-header {
    padding: 1rem;
  }
  
  .card-header h1,
  .card-header h2,
  .card-header h3 {
    font-size: 1.1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Boutons */
  .btn {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
  }
  
  .btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
  
  /* Statistiques */
  .stat-number {
    font-size: 1.75rem;
  }
  
  .stat-label {
    font-size: 0.8rem;
  }
  
  .stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
  
  /* Actions rapides */
  .quick-action-item {
    padding: 0.875rem;
  }
  
  .action-icon {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  .action-content h6 {
    font-size: 0.9rem;
  }
  
  .action-content small {
    font-size: 0.75rem;
  }
  
  /* Formulaires */
  .form-control {
    padding: 0.65rem 0.875rem;
    font-size: 0.9rem;
  }
  
  .form-label {
    font-size: 0.85rem;
  }
  
  /* Tableaux */
  .table-responsive {
    font-size: 0.85rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem;
  }
  
  /* Modales */
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  .modal-header h2 {
    font-size: 1.25rem;
  }
  
  .modal-body {
    padding: 1.25rem;
  }
  
  /* Transfert options */
  .transfer-option {
    padding: 1rem;
  }
  
  .transfer-option h4 {
    font-size: 1rem;
  }
  
  .transfer-option p {
    font-size: 0.85rem;
  }
  
  .code-box {
    font-size: 0.95rem;
    padding: 0.75rem;
  }
  
  /* Navigation fixe pour éviter de masquer le contenu */
  .main-content {
    padding-top: 0.5rem;
  }
  
  /* Onboarding */
  .onboarding-icon {
    font-size: 3.5rem;
  }
  
  .onboarding-title {
    font-size: 1.5rem;
  }
  
  .onboarding-description {
    font-size: 0.95rem;
  }
  
  .feature-icon {
    font-size: 1.5rem;
  }
  
  .feature-item {
    padding: 0.75rem;
  }
  
  .feature-item h6 {
    font-size: 0.9rem;
  }
  
  .feature-item small {
    font-size: 0.75rem;
  }
}

  /* Très petits écrans */
@media (max-width: 380px) {
  .container {
    padding: 0 0.5rem;
  }

  .welcome-title,
  .page-header h1 {
    font-size: 1.25rem;
  }

  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .modal-content {
    width: 98%;
  }
}

/* =====================================================
   DASHBOARD MOBILE OPTIMIZATIONS
   ===================================================== */

/* Layout fixes pour les colonnes Bootstrap du dashboard */
@media (max-width: 768px) {
  /* Stats section - toutes les colonnes en full width */
  .stats-section .col-lg-3,
  .stats-section .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-bottom: 1rem;
  }

  /* Main dashboard layout */
  .main-dashboard .col-lg-8,
  .main-dashboard .col-lg-4 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-bottom: 1.5rem;
  }

  /* Onboarding features - 2 colonnes au lieu de 4 */
  .onboarding-features .col-md-3 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
    margin-bottom: 1rem;
  }

  /* Company info section */
  .company-info-section .col-md-6 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  /* Onboarding features - 1 colonne sur petits écrans */
  .onboarding-features .col-md-3 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }

  /* Dashboard header plus compact */
  .dashboard-header {
    padding: 1rem 0 !important;
  }

  /* Stats cards plus petites */
  .stat-card {
    padding: 1rem !important;
  }

  .stat-icon {
    font-size: 2.5rem !important;
  }

  .stat-number {
    font-size: 1.75rem !important;
  }

  .stat-label {
    font-size: 0.8rem !important;
  }

  /* Onboarding plus compact */
  .onboarding-card {
    padding: 1.5rem !important;
  }

  .onboarding-icon {
    font-size: 3.5rem !important;
  }

  .onboarding-title {
    font-size: 1.5rem !important;
  }

  .onboarding-description {
    font-size: 0.95rem !important;
  }

  /* Assistants récents */
  .assistant-item {
    padding: 0.75rem !important;
  }

  .assistant-avatar {
    width: 35px !important;
    height: 35px !important;
  }

  .assistant-name {
    font-size: 0.9rem !important;
  }

  .assistant-specialty {
    font-size: 0.75rem !important;
  }

  /* Company info plus compact */
  .info-group {
    margin-bottom: 1rem !important;
  }

  .info-label {
    font-size: 0.8rem !important;
  }

  .info-value {
    font-size: 0.9rem !important;
  }
}

/* =====================================================
   AMÉLIORATIONS TACTILES MOBILE
   ===================================================== */

/* Améliorer la zone de toucher pour les éléments interactifs */
@media (hover: none) and (pointer: coarse) {
  /* Boutons et liens tactiles */
  .btn,
  a.btn,
  button {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Navigation tactile */
  .nav-btn {
    min-height: 48px;
    padding: 0.75rem;
  }
  
  /* Cartes cliquables */
  .quick-action-item,
  .assistant-item,
  .category-card,
  .template-card {
    min-height: 60px;
  }
  
  /* Champs de formulaire */
  .form-control,
  .form-select {
    min-height: 44px;
  }
  
  /* Dropdowns */
  .dropdown-item {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
  }
  
  /* Supprimer les effets hover sur tactile */
  .btn:hover,
  .card:hover,
  .quick-action-item:hover,
  .assistant-item:hover {
    transform: none;
  }
  
  /* Effet tactile au clic */
  .btn:active,
  .quick-action-item:active,
  .assistant-item:active {
    opacity: 0.7;
    transform: scale(0.98);
  }
}

/* Optimisations pour Safari iOS */
@supports (-webkit-touch-callout: none) {
  /* Améliorer le scroll momentum sur iOS */
  body,
  .main-content {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix pour les inputs sur iOS */
  input,
  textarea,
  select {
    -webkit-appearance: none;
    border-radius: var(--sf-border-radius);
  }
  
  /* Éviter le zoom sur les inputs sur iOS */
  @media screen and (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    textarea,
    select {
      font-size: 16px !important;
    }
  }
}

/* =====================================================
   FORCER LE MODE CLAIR
   ===================================================== */

/* Forcer le mode clair même si l'utilisateur préfère le mode sombre */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
  
  .card {
    background-color: white !important;
    color: #000000 !important;
  }
  
  .form-control {
    background-color: white !important;
    border-color: #e9ecef !important;
    color: #000000 !important;
  }
  
  .dropdown-menu {
    background-color: white !important;
    color: #000000 !important;
  }
  
  .dropdown-item {
    color: #000000 !important;
  }
}
