/* =====================================================
   JMN Pro - Application Feuilles de Route
   Charte graphique moderne inspirée de JMN Électrique
   ===================================================== */

/* Variables CSS */
:root {
  /* Couleurs principales */
  --primary-dark: #0a1628;
  --primary: #1e3a5f;
  --primary-light: #2d5a87;
  --primary-lighter: #3d7ab0;
  
  /* Accent (électrique/énergie) */
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #d97706;
  
  /* Succès/Validation */
  --success: #10b981;
  --success-light: #34d399;
  
  /* Danger/Attention */
  --danger: #ef4444;
  --warning: #f59e0b;
  
  /* Neutres */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Dimensions */
  --header-height: 64px;
  --bottom-nav-height: 70px;
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--primary-dark);
  color: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
  border: none;
  outline: none;
}

.hidden {
  display: none !important;
}

/* =====================================================
   Splash Screen
   ===================================================== */
.splash-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-content {
  text-align: center;
}

.splash-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  animation: pulse 2s ease-in-out infinite;
}

.logo-icon {
  width: 100%;
  height: 100%;
  color: var(--accent);
}

.splash-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.splash-subtitle {
  font-size: 1rem;
  color: var(--gray-400);
  margin-bottom: 32px;
}

.splash-loader {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 3px solid var(--gray-700);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* =====================================================
   Application Container
   ===================================================== */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-height) + var(--safe-area-top));
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
}

/* =====================================================
   Header
   ===================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-height) + var(--safe-area-top));
  padding-top: var(--safe-area-top);
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.header-content {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

.header-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast);
}

.header-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

.header-btn svg {
  width: 24px;
  height: 24px;
}

.header-title-group {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  width: 36px;
  height: 36px;
}

.logo-icon-small {
  width: 100%;
  height: 100%;
  color: var(--accent);
}

.header-titles {
  display: flex;
  flex-direction: column;
}

.header-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 0.75rem;
  color: var(--gray-400);
  line-height: 1.2;
}

/* =====================================================
   Main Content
   ===================================================== */
.main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.view {
  display: none;
  padding: 16px;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   Calendar View
   ===================================================== */
.week-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
}

.week-nav-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.week-nav-btn:active {
  background: var(--primary-light);
  transform: scale(0.95);
}

.week-nav-btn svg {
  width: 20px;
  height: 20px;
}

.week-display {
  text-align: center;
}

.week-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
}

.week-dates {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-400);
}

/* Days Grid */
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.day-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.day-card:active {
  transform: scale(0.95);
}

.day-card.today {
  border-color: var(--accent);
}

.day-card.selected {
  background: var(--primary-light);
  border-color: var(--accent);
}

.day-card.has-work::after {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
  margin-top: 6px;
}

.day-card.weekend {
  opacity: 0.6;
}

.day-name {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.day-number {
  font-size: 1.125rem;
  font-weight: 600;
}

.day-card.today .day-number {
  color: var(--accent);
}

/* Day Summary */
.day-summary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}

.summary-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.summary-date {
  font-size: 0.875rem;
  color: var(--gray-300);
}

.summary-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

.stat-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.stat-icon.clients {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.stat-icon.hours {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent);
}

.stat-icon.distance {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
}

.stat-value {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-400);
}

/* Workload Bar */
.workload-section {
  margin-bottom: 20px;
}

.workload-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.workload-label {
  font-size: 0.875rem;
  color: var(--gray-300);
}

.workload-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.workload-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.workload-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success) 0%, var(--accent) 70%, var(--danger) 100%);
  border-radius: var(--radius-full);
  transition: width var(--transition-slow);
}

/* Primary Button */
.primary-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--accent);
  color: var(--gray-900);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.primary-btn:active {
  background: var(--accent-dark);
  transform: scale(0.98);
}

.primary-btn svg {
  width: 20px;
  height: 20px;
}

/* =====================================================
   Clients List View
   ===================================================== */
.clients-header {
  margin-bottom: 20px;
}

.clients-date-info h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.clients-date-info p {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.clients-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.client-card:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.98);
}

.client-card.completed {
  border-left-color: var(--success);
  opacity: 0.7;
}

.client-card.in-progress {
  border-left-color: var(--accent);
  background: rgba(245, 158, 11, 0.1);
}

.client-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
}

.client-time-start {
  font-size: 1rem;
  font-weight: 600;
}

.client-time-duration {
  font-size: 0.75rem;
  color: var(--gray-400);
}

.client-info {
  flex: 1;
  min-width: 0;
}

.client-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-address {
  font-size: 0.875rem;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-type {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--gray-300);
}

.client-status {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
}

.client-status svg {
  width: 18px;
  height: 18px;
}

.client-status.completed {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

/* =====================================================
   Client Detail View (Feuille de Route)
   ===================================================== */
.client-detail-content {
  padding-bottom: 20px;
}

.feuille-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
}

.feuille-number {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent);
  color: var(--gray-900);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.feuille-client-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feuille-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.feuille-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--gray-300);
}

.feuille-meta-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

/* Sections de la feuille */
.feuille-section {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
}

.feuille-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.feuille-section-title svg {
  width: 18px;
  height: 18px;
}

.material-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.material-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
}

.material-qty {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.material-desc {
  flex: 1;
  font-size: 0.9375rem;
}

.labour-grid {
  display: grid;
  gap: 8px;
}

.labour-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
}

.labour-desc {
  font-size: 0.9375rem;
}

.labour-hours {
  font-weight: 600;
  color: var(--accent);
}

.notes-content {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--gray-300);
  white-space: pre-wrap;
}

/* Actions de la feuille */
.feuille-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.action-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.action-btn.secondary:active {
  background: rgba(255, 255, 255, 0.2);
}

.action-btn.primary {
  background: var(--accent);
  color: var(--gray-900);
}

.action-btn.primary:active {
  background: var(--accent-dark);
}

.action-btn svg {
  width: 18px;
  height: 18px;
}

.chat-btn-full {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-lighter) 100%);
  color: var(--white);
}

.chat-btn-full:active {
  opacity: 0.9;
}

/* =====================================================
   Chat View
   ===================================================== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - var(--safe-area-top) - var(--safe-area-bottom) - 32px);
  min-height: 400px;
}

.chat-header-info {
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.chat-client-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 6px;
}

.chat-client-badge svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.chat-context {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.chat-message.assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 4px;
}

.chat-message.user {
  align-self: flex-end;
  background: var(--primary-light);
  border-bottom-right-radius: 4px;
}

.chat-message.typing {
  display: flex;
  gap: 4px;
  padding: 16px 20px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--gray-400);
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.chat-input-container {
  padding-top: 12px;
}

.chat-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 12px;
}

.suggestion-chip {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  text-align: left;
  color: var(--gray-300);
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.suggestion-chip:active {
  background: var(--primary-light);
  color: var(--white);
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
}

.chat-input {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  color: var(--white);
  font-size: 1rem;
}

.chat-input::placeholder {
  color: var(--gray-500);
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--gray-900);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.chat-send-btn:active {
  background: var(--accent-dark);
  transform: scale(0.95);
}

.chat-send-btn svg {
  width: 20px;
  height: 20px;
}

/* =====================================================
   Bottom Navigation
   ===================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  padding-bottom: var(--safe-area-bottom);
  background: var(--primary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 8px;
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  color: var(--gray-400);
  transition: all var(--transition-fast);
}

.nav-item.active {
  color: var(--accent);
}

.nav-item svg {
  width: 24px;
  height: 24px;
}

.nav-item span {
  font-size: 0.6875rem;
  font-weight: 500;
}

/* =====================================================
   Menu Overlay
   ===================================================== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  justify-content: flex-end;
  animation: fadeIn 0.2s ease;
}

.menu-overlay.hidden {
  display: none;
}

.menu-panel {
  width: 280px;
  max-width: 85%;
  height: 100%;
  background: var(--primary-dark);
  padding: 20px;
  padding-top: calc(20px + var(--safe-area-top));
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.menu-header {
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--gray-900);
  font-size: 1.125rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 1rem;
  font-weight: 600;
}

.user-role {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.menu-items {
  flex: 1;
}

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  transition: background var(--transition-fast);
}

.menu-item:active {
  background: rgba(255, 255, 255, 0.1);
}

.menu-item svg {
  width: 20px;
  height: 20px;
  color: var(--gray-400);
}

.menu-item.sync {
  justify-content: flex-start;
}

.sync-status {
  margin-left: auto;
  font-size: 0.75rem;
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
  border-radius: var(--radius-full);
}

.menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}

.menu-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.version {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* =====================================================
   Toast Notifications
   ===================================================== */
.toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--safe-area-bottom) + 16px);
  left: 16px;
  right: 16px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--gray-800);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast-message {
  flex: 1;
  font-size: 0.9375rem;
}

@keyframes toastIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* =====================================================
   Desktop Enhancements
   ===================================================== */
@media (min-width: 768px) {
  :root {
    --header-height: 72px;
    --bottom-nav-height: 0px;
  }
  
  .app {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 0;
  }
  
  .header-content {
    padding: 0 24px;
  }
  
  .bottom-nav {
    display: none;
  }
  
  .main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }
  
  .view {
    padding: 0;
  }
  
  /* Calendar view desktop */
  .days-grid {
    gap: 12px;
  }
  
  .day-card {
    padding: 16px 8px;
  }
  
  .day-name {
    font-size: 0.75rem;
  }
  
  .day-number {
    font-size: 1.375rem;
  }
  
  .summary-stats {
    gap: 16px;
  }
  
  .stat-card {
    padding: 16px 12px;
  }
  
  /* Clients list desktop */
  .clients-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  /* Chat desktop */
  .chat-container {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .chat-message {
    max-width: 70%;
  }
  
  .chat-suggestions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .suggestion-chip {
    border-radius: var(--radius-full);
  }
}

@media (min-width: 1024px) {
  .main-content {
    padding: 32px;
  }
  
  .clients-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =====================================================
   Print Styles
   ===================================================== */
@media print {
  .header,
  .bottom-nav,
  .feuille-actions,
  .chat-input-container,
  .chat-suggestions {
    display: none !important;
  }
  
  .app {
    padding: 0;
  }
  
  .view {
    display: block !important;
  }
  
  body {
    background: white;
    color: black;
  }
}
