/* ============================================
   VG MANAGER - Styles principaux
   Thème : Vert & Bleu professionnel
   ============================================ */

:root {
  --primary: #0d6efd;
  --primary-dark: #0a58ca;
  --secondary: #198754;
  --secondary-dark: #146c43;
  --gradient: linear-gradient(135deg, #0d6efd 0%, #198754 100%);
  --gradient-soft: linear-gradient(135deg, #e8f4fd 0%, #e8f7ef 100%);
  --sidebar-width: 260px;
  --header-height: 64px;
  --card-shadow: 0 2px 15px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f0f4f8;
  color: #2d3748;
  overflow-x: hidden;
}

/* ===== AUTH PAGE ===== */
.auth-container {
  min-height: 100vh;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-container::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  top: -150px; right: -150px;
}
.auth-container::after {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  bottom: -100px; left: -100px;
}
.auth-card {
  background: white;
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  position: relative;
  z-index: 10;
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo img {
  width: 90px; height: 90px;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(13,110,253,0.3);
}
.auth-title {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}
.auth-subtitle {
  text-align: center;
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 32px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
  background: #f7fafc;
}
.form-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(13,110,253,0.1);
}
.input-icon-group { position: relative; }
.input-icon-group .form-input { padding-left: 44px; }
.input-icon-group .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 1rem;
}
.btn-login {
  width: 100%;
  padding: 14px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}
.btn-login:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(13,110,253,0.3); }
.auth-error {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin-bottom: 16px;
  display: none;
}

/* ===== LAYOUT ===== */
.app-layout { display: flex; min-height: 100vh; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #0d1b2a 0%, #1a2f4e 50%, #0d2e1a 100%);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow: hidden;
}
.sidebar.collapsed { width: 68px; }
.sidebar-header {
  padding: 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-height);
}
.sidebar-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;
}
.sidebar-brand {
  color: white;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition);
}
.sidebar.collapsed .sidebar-brand { opacity: 0; width: 0; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.nav-section-title {
  color: rgba(255,255,255,0.4);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 20px 6px;
  white-space: nowrap;
  overflow: hidden;
  transition: var(--transition);
}
.sidebar.collapsed .nav-section-title { opacity: 0; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: var(--transition);
  border-radius: 0 25px 25px 0;
  margin: 2px 8px 2px 0;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}
.nav-item.active {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(13,110,253,0.3);
}
.nav-item .nav-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
  font-size: 0.95rem;
}
.nav-item.active .nav-icon { background: rgba(255,255,255,0.2); }
.nav-item .nav-label {
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
}
.sidebar.collapsed .nav-label { opacity: 0; width: 0; }
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  overflow: hidden;
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.user-info { transition: var(--transition); }
.sidebar.collapsed .user-info { opacity: 0; width: 0; }
.user-name { font-size: 0.875rem; font-weight: 600; }
.user-role { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  transition: var(--transition);
  min-height: 100vh;
}
.main-content.expanded { margin-left: 68px; }

/* ===== HEADER ===== */
.top-header {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 10px rgba(0,0,0,0.06);
}
.btn-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #4a5568;
  padding: 8px;
  border-radius: 8px;
  transition: var(--transition);
}
.btn-toggle:hover { background: #f0f4f8; }
.page-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2d3748;
  flex: 1;
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-badge {
  background: var(--gradient-soft);
  border: 1px solid #bee3f8;
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* ===== PAGE CONTENT ===== */
.page-content { padding: 24px; }
.page-section { display: none; }
.page-section.active { display: block; }

/* ===== STATS CARDS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  background: white;
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  border-left: 4px solid transparent;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.stat-card.blue { border-left-color: var(--primary); }
.stat-card.green { border-left-color: var(--secondary); }
.stat-card.orange { border-left-color: #f6ad55; }
.stat-card.red { border-left-color: #fc8181; }
.stat-card.purple { border-left-color: #9f7aea; }
.stat-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-icon.blue { background: #ebf8ff; color: var(--primary); }
.stat-icon.green { background: #f0fff4; color: var(--secondary); }
.stat-icon.orange { background: #fffaf0; color: #dd6b20; }
.stat-icon.red { background: #fff5f5; color: #c53030; }
.stat-icon.purple { background: #faf5ff; color: #6b46c1; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: #2d3748; }
.stat-label { font-size: 0.8rem; color: #718096; margin-top: 2px; }

/* ===== DATA TABLE ===== */
.data-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  margin-bottom: 24px;
}
.data-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f0f4f8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.data-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2d3748;
}
.data-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-box {
  position: relative;
}
.search-box input {
  padding: 8px 14px 8px 36px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
  outline: none;
  width: 220px;
  transition: var(--transition);
}
.search-box input:focus { border-color: var(--primary); }
.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  font-size: 0.85rem;
}
.table-wrapper { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
thead th {
  padding: 14px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #718096;
  background: #f7fafc;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}
tbody td {
  padding: 14px 16px;
  font-size: 0.875rem;
  color: #4a5568;
  border-bottom: 1px solid #f0f4f8;
  vertical-align: middle;
}
tbody tr:hover { background: #f7fafc; }
tbody tr:last-child td { border-bottom: none; }

/* ===== BUTTONS ===== */
.btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(13,110,253,0.3); }
.btn-success { background: var(--secondary); color: white; }
.btn-success:hover { background: var(--secondary-dark); box-shadow: 0 4px 12px rgba(25,135,84,0.3); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }
.btn-danger { background: #fc8181; color: white; }
.btn-danger:hover { background: #e53e3e; }
.btn-warning { background: #f6ad55; color: white; }
.btn-warning:hover { background: #dd6b20; }
.btn-info { background: #63b3ed; color: white; }
.btn-info:hover { background: #3182ce; }
.btn-gradient { background: var(--gradient); color: white; }
.btn-gradient:hover { opacity: 0.9; box-shadow: 0 4px 15px rgba(13,110,253,0.3); }

/* ===== BADGE ===== */
.badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}
.badge-success { background: #c6f6d5; color: #276749; }
.badge-warning { background: #fefcbf; color: #744210; }
.badge-danger { background: #fed7d7; color: #742a2a; }
.badge-info { background: #bee3f8; color: #2a4365; }
.badge-secondary { background: #e2e8f0; color: #4a5568; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: white;
  border-radius: 20px;
  padding: 0;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(-20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 22px 28px;
  background: var(--gradient);
  color: white;
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.3); }
.modal-body { padding: 28px; }
.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid #f0f4f8;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full-width { grid-column: 1 / -1; }
.form-group-modal label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 6px;
}
.form-group-modal input,
.form-group-modal select,
.form-group-modal textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
  background: #f7fafc;
  font-family: inherit;
}
.form-group-modal input:focus,
.form-group-modal select:focus,
.form-group-modal textarea:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(13,110,253,0.1);
}
.form-group-modal textarea { resize: vertical; min-height: 80px; }

/* ===== VIEW MODAL ===== */
.view-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.view-field label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a0aec0;
  display: block;
  margin-bottom: 4px;
}
.view-field .value {
  font-size: 0.9rem;
  color: #2d3748;
  font-weight: 500;
  padding: 8px 12px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  word-break: break-word;
}
.view-field.full-width { grid-column: 1 / -1; }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: white;
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  animation: toastIn 0.3s ease;
  border-left: 4px solid;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
.toast.success { border-left-color: var(--secondary); }
.toast.error { border-left-color: #e53e3e; }
.toast.info { border-left-color: var(--primary); }
.toast-icon { font-size: 1.2rem; }
.toast.success .toast-icon { color: var(--secondary); }
.toast.error .toast-icon { color: #e53e3e; }
.toast.info .toast-icon { color: var(--primary); }
.toast-msg { font-size: 0.875rem; font-weight: 500; flex: 1; }

/* ===== KPI / CHARTS ===== */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.chart-card {
  background: white;
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--card-shadow);
}
.chart-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-canvas-wrapper { height: 260px; }

/* ===== AI PANEL ===== */
.ai-panel {
  background: linear-gradient(135deg, #f0f4ff 0%, #f0fff4 100%);
  border: 1px solid #bee3f8;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.ai-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.ai-icon {
  width: 44px; height: 44px;
  background: var(--gradient);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1.2rem;
}
.ai-title { font-size: 1rem; font-weight: 700; color: #2d3748; }
.ai-subtitle { font-size: 0.8rem; color: #718096; }
.ai-insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.ai-insight {
  background: white;
  border-radius: 12px;
  padding: 16px;
  border-left: 3px solid var(--primary);
}
.ai-insight.warning { border-left-color: #f6ad55; }
.ai-insight.danger { border-left-color: #fc8181; }
.ai-insight.success { border-left-color: var(--secondary); }
.ai-insight-title { font-size: 0.8rem; font-weight: 700; color: #4a5568; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.ai-insight-text { font-size: 0.875rem; color: #2d3748; line-height: 1.5; }

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid #f0f4f8;
  flex-wrap: wrap;
  gap: 10px;
}
.page-info { font-size: 0.8rem; color: #718096; }
.page-buttons { display: flex; gap: 6px; }
.page-btn {
  padding: 6px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}
.page-btn:hover, .page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== EDITION PAGE ===== */
.report-card {
  background: white;
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.report-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-filters select, .report-filters input {
  padding: 8px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.875rem;
  outline: none;
}
.report-filters select:focus, .report-filters input:focus { border-color: var(--primary); }

/* ===== ADMIN PAGE ===== */
.admin-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
}
.admin-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f4f8;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar.collapsed { transform: translateX(-100%); }
  .main-content { margin-left: 0 !important; }
  .form-grid { grid-template-columns: 1fr; }
  .view-grid { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .modal { max-height: 95vh; }
  .search-box input { width: 160px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
}

/* ===== DASHBOARD WELCOME ===== */
.welcome-banner {
  background: var(--gradient);
  border-radius: 18px;
  padding: 28px 32px;
  color: white;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}
.welcome-banner::before {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  right: -50px; top: -60px;
}
.welcome-text h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.welcome-text p { font-size: 0.9rem; opacity: 0.85; }
.welcome-icon { font-size: 3.5rem; opacity: 0.3; }

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

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: #a0aec0;
}
.empty-state i { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.empty-state p { font-size: 0.875rem; }

/* ===== MOBILE OVERLAY ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* ===== ALERTS VIDANGE / ENTRETIEN ===== */
.alerts-panel {
  background: white;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
  overflow: hidden;
}
.alerts-panel-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, #fff3cd, #fef9c3);
  border-bottom: 1px solid #fde68a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.alerts-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #92400e;
}
.alerts-count-badge {
  background: #e53e3e;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  display: none;
}
.alerts-list {
  max-height: 280px;
  overflow-y: auto;
}
.alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid #f0f4f8;
  transition: var(--transition);
}
.alert-item:last-child { border-bottom: none; }
.alert-item:hover { background: #f7fafc; }
.alert-item.alert-warning { border-left: 3px solid #f6ad55; }
.alert-item.alert-danger  { border-left: 3px solid #e53e3e; }
.alert-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.alert-warning .alert-icon { background: #fffaf0; color: #dd6b20; }
.alert-danger  .alert-icon { background: #fff5f5; color: #e53e3e; }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-size: 0.85rem; font-weight: 700; color: #2d3748; }
.alert-text  { font-size: 0.78rem; color: #718096; margin-top: 2px; }
.alert-arrow { color: #a0aec0; font-size: 0.8rem; }

/* ===== ONGLETS ENTRETIEN/RÉPARATION ===== */
.module-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 0;
  background: white;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.module-tab {
  flex: 1;
  padding: 14px 20px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: #718096;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.module-tab:hover { color: #2d3748; background: #f7fafc; }
.module-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: #f0f7ff; }
.module-tab.tab-rep.active { color: #e53e3e; border-bottom-color: #e53e3e; background: #fff5f5; }

/* Badge montant total */
.total-montant-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #f0fff4, #f0f7ff);
  border-top: 1px solid #e2e8f0;
  font-size: 0.875rem;
  flex-wrap: wrap;
}
.montant-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.montant-item.ent { color: #198754; }
.montant-item.rep { color: #e53e3e; }

/* ===== PRINT STYLES ===== */
@media print {
  .sidebar, .top-header, .btn, .data-actions, .pagination { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .data-card { box-shadow: none; border: 1px solid #ccc; }
}
