/* Styles pour l'application d'emploi du temps ENA CI */

/* Styles généraux */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  min-height: 100vh;
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background-color: #343a40;
  color: #fff;
  position: fixed;
  height: 100vh;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s;
}

.sidebar .logo {
  padding: 15px 20px;
  border-bottom: 1px solid #4b545c;
}

.logo h3 {
  margin: 0;
  color: #fff;
  font-weight: 600;
}

.nav-sidebar {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.nav-sidebar a {
  color: #ced4da;
  text-decoration: none;
  padding: 12px 20px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  transition: all 0.3s;
}

.nav-sidebar a:hover {
  color: #fff;
  background-color: #4b545c;
}

.nav-sidebar a.active {
  color: #fff;
  background-color: #0d6efd;
}

.nav-sidebar i {
  margin-right: 10px;
  font-size: 1.1rem;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 250px;
  transition: all 0.3s;
  width: calc(100% - 250px);
}

.navbar {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.sidebar-toggle {
  display: none;
}

.navbar-nav .navbar-text {
  color: #495057;
  font-weight: 500;
}

/* Cartes sur le tableau de bord */
.card {
  transition: all 0.3s;
  margin-bottom: 20px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.5rem;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-title {
  font-weight: 600;
}

.card-body h3 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 10px;
}

.border-primary {
  border-left: 4px solid #0d6efd !important;
}

.border-success {
  border-left: 4px solid #198754 !important;
}

.border-warning {
  border-left: 4px solid #ffc107 !important;
}

.border-info {
  border-left: 4px solid #0dcaf0 !important;
}

.border-secondary {
  border-left: 4px solid #777575 !important;
}

.border-danger {
  border-left: 4px solid #7a0406 !important;
}

.border-dark {
  border-left: 4px solid #000000 !important;
}

.border-violet {
  border-left: 4px solid #6f42c1 !important;
}

/* Formulaires */
.form-container {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  padding: 20px;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  font-weight: 500;
}

.form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.input-group-text {
  background-color: #f8f9fa;
}

/* Tableaux */
.table-container {
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  padding: 20px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.table {
  width: 100%;
  margin-bottom: 0;
}

.table th {
  background-color: #f8f9fa;
  font-weight: 600;
  color: #495057;
}

.table-hover tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

/* Boutons d'action */
.btn-icon {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

/* Page de connexion */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #f5f5f5;
}

.login-container {
  max-width: 400px;
  width: 100%;
  padding: 30px;
  background-color: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-logo {
  text-align: center;
  margin-bottom: 20px;
}

.login-logo h2 {
  color: #343a40;
  font-weight: 700;
}

/* Emploi du temps */
.timetable {
  border-collapse: collapse;
  width: 100%;
}

.timetable th,
.timetable td {
  border: 1px solid #dee2e6;
  padding: 8px;
  text-align: center;
}

.timetable th {
  background-color: #f8f9fa;
  position: sticky;
  top: 0;
  z-index: 10;
}

.timetable-cell {
  min-height: 80px;
  padding: 5px;
  border-radius: 4px;
  margin-bottom: 5px;
}

.timetable-module {
  background-color: #e7f5ff;
  border-left: 3px solid #0d6efd;
}

.timetable-empty {
  background-color: #f8f9fa;
  border-left: 3px solid #dee2e6;
}

/* Styles pour le calendrier */
.calendar-container {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.fc {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.fc-toolbar-title {
  font-weight: 600;
}

.fc-button-primary {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.fc-button-primary:not(:disabled):active,
.fc-button-primary:not(:disabled).fc-button-active {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

/* Styles pour le tableau des emplois du temps */
.timetable-container {
  margin-top: 20px;
}

.timetable {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.timetable th,
.timetable td {
  border: 1px solid #dee2e6;
  padding: 12px;
  text-align: center;
  vertical-align: middle;
}

.timetable th {
  background-color: #f8f9fa;
  font-weight: 600;
}

.timetable .time-slot {
  background-color: #f8f9fa;
  cursor: pointer;
  transition: background-color 0.3s;
}

.timetable .time-slot:hover {
  background-color: #e9ecef;
}

/* Styles pour les messages */
.alert {
  border-radius: 8px;
  margin-bottom: 20px;
}

.alert i {
  margin-right: 8px;
}

/* Styles pour les boutons */
.btn {
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
}

/* Styles pour le modal d'ajout de cours */
.modal-content {
  border-radius: 8px;
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
}

.modal-footer {
  border-top: 1px solid #dee2e6;
}

/* Media Queries */
@media (max-width: 992px) {
  .sidebar {
    margin-left: -250px;
  }

  .sidebar.active {
    margin-left: 0;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .main-content.active {
    margin-left: 250px;
    width: calc(100% - 250px);
  }

  .sidebar-toggle {
    display: block;
  }
}

@media (max-width: 768px) {
  .card {
    margin-bottom: 15px;
  }

  .timetable th,
  .timetable td {
    padding: 5px;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 20px;
  }
}

@media print {
  .no-print {
    display: none;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .container-fluid {
    padding: 0 !important;
  }

  .timetable {
    box-shadow: none;
  }

  .timetable th,
  .timetable td {
    border: 1px solid #000;
  }
}
