/* Custom Admin CSS for EduPilote */
/* ================================ */

/* Header branding */
#header {
  background: linear-gradient(135deg, #1B4F72 0%, #2874A6 100%);
  color: white;
  padding: 10px 20px;
}

#header h1#site-name a {
  color: white;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

#header h1#site-name a:hover {
  color: #D5E8F0;
}

/* FIX: User tools links (VOIR LE SITE, DÉCONNEXION, etc.) */
#header #user-tools {
  color: white;
}

#header #user-tools a,
#header #user-tools a:link,
#header #user-tools a:visited {
  color: white !important;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  padding-bottom: 2px;
  margin-left: 15px;
  transition: all 0.2s ease;
}

#header #user-tools a:hover,
#header #user-tools a:focus {
  color: #D5E8F0 !important;
  border-bottom-color: #D5E8F0;
}

/* Sidebar and modules */
#nav-sidebar {
  background: #f7f9fb;
}

.module, .dashboard-module {
  background: #f7f9fb;
  border-radius: 8px;
  margin-bottom: 15px;
}

/* Module headers (AUTHENTIFICATION, COMPTABILITÉ, CORE...) */
.module caption,
.module h2,
.dashboard-module h2 {
  background: linear-gradient(135deg, #5DADE2 0%, #3498DB 100%);
  color: white;
  padding: 10px 15px;
  font-weight: 600;
  border-radius: 6px 6px 0 0;
}

/* Buttons */
a.button, 
input[type=submit], 
.button,
.submit-row input[type=submit] {
  background: linear-gradient(135deg, #1B4F72 0%, #2874A6 100%);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

a.button:hover, 
input[type=submit]:hover, 
.button:hover,
.submit-row input[type=submit]:hover {
  background: linear-gradient(135deg, #2874A6 0%, #3498DB 100%);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(27, 79, 114, 0.3);
}

/* Delete button */
.deletelink,
a.deletelink {
  background: #e74c3c !important;
  color: white !important;
}

.deletelink:hover,
a.deletelink:hover {
  background: #c0392b !important;
}

/* Table styling */
#changelist table {
  border-collapse: collapse;
  width: 100%;
}

#changelist table th {
  background: #f0f4f7;
  color: #2c3e50;
  font-weight: 600;
  padding: 12px 10px;
  border-bottom: 2px solid #ddd;
}

#changelist table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

#changelist table tr:hover {
  background: #f8f9fa;
}

/* Links in tables */
#changelist table a {
  color: #2874A6;
  text-decoration: none;
}

#changelist table a:hover {
  color: #1B4F72;
  text-decoration: underline;
}

/* Breadcrumbs */
.breadcrumbs {
  background: #f0f4f7;
  padding: 10px 20px;
  color: #666;
}

.breadcrumbs a {
  color: #2874A6;
}

/* Actions récentes sidebar */
#recent-actions-module h2 {
  background: linear-gradient(135deg, #27AE60 0%, #2ECC71 100%);
}

/* Object tools (Ajouter, Historique...) */
.object-tools a {
  background: #5DADE2;
  color: white !important;
  border-radius: 4px;
  padding: 8px 12px;
}

.object-tools a:hover {
  background: #3498DB;
}

/* Search bar */
#toolbar form input[type=text],
#changelist-search input[type=text] {
  border: 2px solid #ddd;
  border-radius: 6px;
  padding: 8px 12px;
  transition: border-color 0.2s;
}

#toolbar form input[type=text]:focus,
#changelist-search input[type=text]:focus {
  border-color: #5DADE2;
  outline: none;
}

/* Filter sidebar */
#changelist-filter {
  background: #f7f9fb;
  border-radius: 8px;
  padding: 15px;
}

#changelist-filter h2 {
  color: #1B4F72;
  border-bottom: 2px solid #5DADE2;
  padding-bottom: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #header {
    padding: 10px;
    flex-wrap: wrap;
  }
  
  #header h1#site-name {
    font-size: 16px;
  }
  
  #header #user-tools {
    font-size: 12px;
    margin-top: 5px;
  }
  
  #header #user-tools a {
    margin-left: 8px;
  }
}
