/* Custom styles for Hydrolor */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary-blue: #2563eb;
  --primary-blue-light: #3b82f6;
  --primary-blue-dark: #1d4ed8;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-900: #0f172a;
}

* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Animations personnalisées */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse-blue {
  0%, 100% { background-color: rgb(59 130 246 / 0.1); }
  50% { background-color: rgb(59 130 246 / 0.2); }
}

/* Classes utilitaires */
.animate-fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

.animate-slide-up {
  animation: slideUp 0.3s ease-out;
}

.pulse-blue {
  animation: pulse-blue 2s infinite;
}

/* Styles pour les graphiques */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Styles pour les notifications */
.notification-enter {
  transform: translateX(100%);
  opacity: 0;
}

.notification-enter-active {
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.notification-exit {
  transform: translateX(0);
  opacity: 1;
}

.notification-exit-active {
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.3s ease-in, opacity 0.3s ease-in;
}

/* Styles pour les modales */
.modal-backdrop {
  backdrop-filter: blur(4px);
}

/* Styles pour les cartes de site */
.site-card:hover {
  transform: translateY(-2px);
  transition: transform 0.2s ease-out;
}

/* Styles pour les alertes */
.alert-critical {
  border-left: 4px solid #dc2626;
}

.alert-warning {
  border-left: 4px solid #d97706;
}

.alert-info {
  border-left: 4px solid #2563eb;
}

/* Styles pour les barres de progression */
.progress-bar {
  background: linear-gradient(90deg, var(--primary-blue-light), var(--primary-blue));
  border-radius: 9999px;
  transition: width 0.5s ease-out;
}

/* Responsive design amélioré */
@media (max-width: 768px) {
  .mobile-hidden {
    display: none;
  }
  
  .mobile-full {
    width: 100%;
  }
  
  .mobile-stack {
    flex-direction: column;
  }
}

/* États de chargement */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Styles pour les tooltips */
.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 1000;
}

.tooltip:hover::before {
  opacity: 1;
}

/* Amélioration de l'accessibilité */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus states améliorés */
.focus-ring:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* Styles pour les tableaux */
.table-hover tbody tr:hover {
  background-color: var(--gray-50);
}

/* Styles pour les badges de statut */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-operational {
  background-color: rgb(220 252 231);
  color: rgb(22 101 52);
}

.status-maintenance {
  background-color: rgb(254 249 195);
  color: rgb(133 77 14);
}

.status-offline {
  background-color: rgb(254 226 226);
  color: rgb(153 27 27);
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
  
  .shadow-sm, .shadow-md, .shadow-lg {
    box-shadow: none !important;
  }
}