/* MedBridge — Styles complémentaires */

/* Scrollbar personnalisée */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Sidebar fixe avec défilement interne */
aside { overflow-y: auto; }
aside::-webkit-scrollbar { width: 3px; }
aside::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }

/* Tables responsive */
.table-auto { table-layout: auto; }
th { background: #f8fafc !important; }

/* Transitions douces globales */
button, a, input, select, textarea {
  transition: all 0.15s ease;
}

/* Focus styles accessibles */
input:focus, select:focus, textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Cards avec ombre douce */
.card { 
  background: white;
  border-radius: 1rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Badges statut */
.badge-success { background: #ecfdf5; color: #059669; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-danger  { background: #fef2f2; color: #dc2626; }
.badge-info    { background: #eff6ff; color: #2563eb; }
.badge-purple  { background: #f5f3ff; color: #7c3aed; }
.badge-cyan    { background: #ecfeff; color: #0891b2; }

/* Boutons */
.btn-primary { 
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: white;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.875rem;
}
.btn-primary:hover { opacity: 0.9; }

.btn-outline {
  border: 1px solid #e2e8f0;
  color: #374151;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  background: white;
}
.btn-outline:hover { background: #f8fafc; }

/* Loader IA */
.ai-loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Progress circulaire */
.ring-progress { transform: rotate(-90deg); }

/* Tooltip */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  white-space: nowrap;
  z-index: 100;
}

/* Responsive mobile */
@media (max-width: 768px) {
  aside { 
    width: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  aside.open { width: 256px; transform: translateX(0); }
  main { margin-left: 0 !important; }
  .grid-cols-4, .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-5 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .grid-cols-2, .grid-cols-4, .grid-cols-3 { grid-template-columns: 1fr; }
  main { padding: 1rem !important; }
  h1 { font-size: 1.125rem !important; }
}

/* Animations de chargement */
.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Print styles pour les rapports */
@media print {
  aside, header, .no-print { display: none !important; }
  main { margin: 0 !important; }
  .bg-white { box-shadow: none !important; }
}

/* Couleurs médicales */
.text-medical-blue { color: #1e40af; }
.text-medical-green { color: #059669; }
.bg-medical-light { background: #f0f9ff; }

/* Urgences */
.urgency-critical { border-left: 4px solid #dc2626; }
.urgency-high     { border-left: 4px solid #f59e0b; }
.urgency-medium   { border-left: 4px solid #3b82f6; }
.urgency-low      { border-left: 4px solid #10b981; }

/* AI glow effect */
.ai-glow {
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}

/* Hover sur les lignes de tableau */
tbody tr:hover { background: #f8fafc; cursor: pointer; }

/* Step indicators */
.step-connector { height: 2px; background: #e5e7eb; flex: 1; margin-top: -20px; }
.step-connector.done { background: #22c55e; }
