/* Styles pour OMAS Externat */

:root {
  --teal-primary: #0f7c8c;
  --teal-dark: #0a5d6a;
  --teal-light: #e0f2f4;
  --gray-light: #f5f5f5;
  --gray-medium: #d1d5db;
  --gray-dark: #374151;
  --white: #ffffff;
  --error: #dc2626;
  --success: #059669;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--gray-light);
  color: var(--gray-dark);
  line-height: 1.6;
}

/* Header */
.header {
  background-color: var(--white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.3s ease;
  width: 100%;
}

.header:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--gray-dark);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background-color: var(--teal-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.logo-container:hover .logo-icon {
  transform: scale(1.05);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--gray-dark);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--teal-primary);
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--teal-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.btn-connexion {
  background-color: var(--teal-primary);
  color: var(--white);
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(15, 124, 140, 0.2);
  cursor: pointer;
  border: none;
}

.btn-connexion:hover {
  background-color: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(15, 124, 140, 0.3);
}

/* Profile Dropdown */
.profile-container {
  position: relative;
  display: inline-block;
}

.profile-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  background-color: var(--white);
  min-width: 220px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  z-index: 1000;
  overflow: hidden;
  animation: fadeInDown 0.3s ease;
}

.profile-dropdown.active {
  display: block;
}

.profile-dropdown-header {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-medium);
  background-color: var(--teal-light);
}

.profile-dropdown-header p {
  margin: 0;
  font-weight: 600;
  color: var(--teal-dark);
}

.profile-dropdown-header small {
  color: var(--gray-dark);
  font-size: 0.85rem;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--gray-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 1rem;
}

.profile-dropdown-item:hover {
  background-color: var(--gray-light);
  color: var(--teal-primary);
}

.profile-dropdown-item i {
  width: 20px;
  text-align: center;
}

.profile-dropdown-divider {
  height: 1px;
  background-color: var(--gray-medium);
  margin: 0.5rem 0;
}

/* Login Card */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.login-card {
  background-color: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 2.5rem;
  width: 100%;
  max-width: 450px;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.login-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  text-align: center;
  color: var(--teal-primary);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.tabs {
  display: flex;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--gray-medium);
}

.tab {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--gray-dark);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab.active {
  color: var(--teal-primary);
  border-bottom-color: var(--teal-primary);
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--gray-dark);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-medium);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--teal-primary);
}

.btn-primary {
  width: 100%;
  padding: 0.875rem 2rem;
  background-color: var(--teal-primary);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 200px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(15, 124, 140, 0.2);
}

.btn-primary:hover {
  background-color: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(15, 124, 140, 0.3);
}

.btn-primary:disabled {
  background-color: var(--gray-medium);
  cursor: not-allowed;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--teal-light) 0%, var(--white) 100%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  color: var(--teal-primary);
  font-weight: 600;
  font-size: 0.9rem;
  animation: fadeInDown 0.8s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 1rem;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

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

.hero-title .highlight {
  color: var(--teal-primary);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--gray-dark);
  margin-bottom: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.btn-secondary {
  display: inline-block;
  padding: 0.875rem 2rem;
  background-color: var(--white);
  color: var(--teal-primary);
  border: 2px solid var(--teal-primary);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 200px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background-color: var(--teal-primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(15, 124, 140, 0.2);
}

.stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  animation: fadeInUp 0.8s ease backwards;
}

.stat-item:nth-child(1) { animation-delay: 0.6s; }
.stat-item:nth-child(2) { animation-delay: 0.7s; }
.stat-item:nth-child(3) { animation-delay: 0.8s; }

.stat-icon {
  width: 60px;
  height: 60px;
  background-color: var(--teal-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  color: var(--teal-primary);
  font-size: 1.75rem;
  transition: all 0.3s ease;
}

.stat-item:hover .stat-icon {
  transform: scale(1.1) rotate(5deg);
  background-color: var(--teal-primary);
  color: var(--white);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--gray-dark);
  font-size: 0.95rem;
}

/* Features Section */
.features {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease backwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  width: 50px;
  height: 50px;
  background-color: var(--teal-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--teal-primary);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  background-color: var(--teal-primary);
  color: var(--white);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-dark);
  margin-bottom: 0.75rem;
}

.feature-description {
  color: var(--gray-dark);
  line-height: 1.6;
}

/* QCM Cards */
.qcm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.qcm-card {
  background-color: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease backwards;
}

.qcm-card:nth-child(1) { animation-delay: 0.1s; }
.qcm-card:nth-child(2) { animation-delay: 0.2s; }
.qcm-card:nth-child(3) { animation-delay: 0.3s; }
.qcm-card:nth-child(4) { animation-delay: 0.4s; }
.qcm-card:nth-child(5) { animation-delay: 0.5s; }
.qcm-card:nth-child(6) { animation-delay: 0.6s; }

.qcm-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.qcm-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-medium);
}

.qcm-badge {
  display: inline-block;
  background-color: var(--teal-light);
  color: var(--teal-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  transition: all 0.3s ease;
}

.qcm-card:hover .qcm-badge {
  background-color: var(--teal-primary);
  color: var(--white);
  transform: scale(1.05);
}

.qcm-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 0.5rem;
}

.qcm-description {
  color: var(--gray-dark);
  font-size: 0.95rem;
}

.qcm-body {
  padding: 1.5rem;
}

.qcm-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.qcm-info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-dark);
  font-size: 0.9rem;
}

.qcm-info-item i {
  color: var(--teal-primary);
}

.qcm-action {
  text-align: center;
}

.btn-qcm {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--teal-primary);
  color: var(--white);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(15, 124, 140, 0.2);
}

.btn-qcm:hover {
  background-color: var(--teal-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(15, 124, 140, 0.3);
}

.btn-qcm i {
  transition: transform 0.3s ease;
}

.btn-qcm:hover i {
  transform: translateX(5px);
}

/* FAQ */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.faq-item {
  background-color: var(--white);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-question {
  width: 100%;
  padding: 1.25rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}

.faq-question:hover {
  background-color: var(--gray-light);
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  color: var(--gray-dark);
  line-height: 1.7;
  display: none;
}

.faq-answer.active {
  display: block;
}

/* Footer */
.footer {
  background-color: var(--white);
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--gray-medium);
  margin-top: 4rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-text {
  color: var(--gray-dark);
  font-size: 0.9rem;
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.alert-error {
  background-color: #fee2e2;
  color: var(--error);
  border: 1px solid var(--error);
}

.alert-success {
  background-color: #d1fae5;
  color: var(--success);
  border: 1px solid var(--success);
}

/* Loading Spinner */
.spinner {
  border: 3px solid var(--gray-medium);
  border-top: 3px solid var(--teal-primary);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-menu {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .stats {
    gap: 2rem;
  }

  .qcm-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ============================================
   STYLES DASHBOARD ENSEIGNANT
   ============================================ */

.teacher-dashboard {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-dark);
}

.teacher-qcm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
}

.teacher-qcm-card {
  background-color: var(--white);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}

.teacher-qcm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.teacher-qcm-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-medium);
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.status-badge.published {
  background-color: #d1fae5;
  color: var(--success);
}

.status-badge.draft {
  background-color: #fee2e2;
  color: #dc2626;
}

.qcm-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-dark);
}

.btn-icon:hover {
  background-color: var(--gray-light);
  color: var(--teal-primary);
}

.btn-icon.btn-danger:hover {
  background-color: #fee2e2;
  color: var(--error);
}

.teacher-qcm-body {
  padding: 1.5rem;
}

.qcm-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--gray-dark);
}

.qcm-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Formulaire de création de QCM */
.create-qcm-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.form-section {
  background-color: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.form-section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-dark);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--gray-medium);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

#questions-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.question-item {
  background-color: var(--gray-light);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--teal-primary);
}

.question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.question-header h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--teal-primary);
}

.btn-add-question {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--teal-primary);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-add-question:hover {
  background-color: var(--teal-dark);
  transform: translateY(-2px);
}

.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.btn-cancel {
  padding: 0.875rem 2rem;
  background-color: var(--gray-medium);
  color: var(--gray-dark);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-cancel:hover {
  background-color: var(--gray-dark);
  color: var(--white);
}

/* Résultats QCM Styles */
.results-container {
  max-width: 900px;
  margin: 2rem auto;
  animation: fadeInUp 0.6s ease-out;
}

.results-header {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-teal) 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 8px 20px rgba(15, 124, 140, 0.3);
}

.results-header.result-poor {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.results-header.result-average {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.results-header.result-good {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
}

.results-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: scaleIn 0.5s ease-out 0.2s backwards;
}

.results-header h2 {
  margin: 0 0 1.5rem 0;
  font-size: 2rem;
  font-weight: 700;
}

.results-score {
  margin: 1.5rem 0;
  animation: fadeInUp 0.5s ease-out 0.3s backwards;
}

.score-big {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.score-percentage {
  font-size: 2rem;
  font-weight: 600;
  opacity: 0.9;
}

.results-message {
  font-size: 1.3rem;
  font-weight: 500;
  margin: 1rem 0 0 0;
  opacity: 0.95;
}

.results-details {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.results-details h3 {
  color: var(--text-dark);
  font-size: 1.5rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--light-gray);
}

.result-item {
  background: white;
  border: 2px solid var(--light-gray);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  animation: fadeInUp 0.4s ease-out backwards;
}

.result-item:nth-child(1) { animation-delay: 0.1s; }
.result-item:nth-child(2) { animation-delay: 0.15s; }
.result-item:nth-child(3) { animation-delay: 0.2s; }
.result-item:nth-child(4) { animation-delay: 0.25s; }
.result-item:nth-child(5) { animation-delay: 0.3s; }

.result-item.correct {
  border-color: #27ae60;
  background: linear-gradient(to right, rgba(39, 174, 96, 0.05), rgba(255, 255, 255, 0));
}

.result-item.incorrect {
  border-color: #e74c3c;
  background: linear-gradient(to right, rgba(231, 76, 60, 0.05), rgba(255, 255, 255, 0));
}

.result-item:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.result-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--light-gray);
}

.result-item-number {
  font-weight: 700;
  color: var(--text-dark);
  font-size: 1rem;
}

.result-item-status {
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-item.correct .result-item-status {
  color: #27ae60;
}

.result-item.incorrect .result-item-status {
  color: #e74c3c;
}

.result-item-question {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin: 1rem 0;
  line-height: 1.6;
  font-weight: 500;
}

.result-item-answers {
  background: var(--light-bg);
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

.result-item-answers p {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-medium);
}

.result-item-answers strong {
  color: var(--text-dark);
}

.result-item-explanation {
  background: linear-gradient(to right, rgba(15, 124, 140, 0.05), rgba(255, 255, 255, 0));
  padding: 1rem;
  border-left: 4px solid var(--primary-color);
  border-radius: 4px;
  margin-top: 1rem;
}

.result-item-explanation strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.5rem;
}

.multiple-choice-badge {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-medium);
  font-style: italic;
}

/* Dashboard Étudiant Styles */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.dashboard-header {
  margin-bottom: 2rem;
  animation: fadeInDown 0.6s ease-out;
}

.dashboard-header h1 {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-header h1 i {
  color: var(--primary-color);
}

.dashboard-subtitle {
  font-size: 1.1rem;
  color: var(--text-medium);
  margin: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.3s ease;
  animation: fadeInUp 0.6s ease-out backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-icon {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-medium);
  font-weight: 500;
}

.chart-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

.chart-container h2 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chart-container h2 i {
  color: var(--primary-color);
}

.chart-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 0;
}

.chart-note {
  text-align: center;
  color: var(--text-medium);
  font-size: 0.9rem;
  margin-top: 1.5rem;
  font-style: italic;
}

.chart-note i {
  color: var(--primary-color);
}

.recent-qcm-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  animation: fadeInUp 0.6s ease-out 0.6s backwards;
}

.recent-qcm-container h2 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.recent-qcm-container h2 i {
  color: var(--primary-color);
}

.qcm-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.qcm-history-card {
  background: var(--light-bg);
  border: 2px solid var(--light-gray);
  border-radius: 10px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  animation: fadeInUp 0.4s ease-out backwards;
}

.qcm-history-card:nth-child(1) { animation-delay: 0.1s; }
.qcm-history-card:nth-child(2) { animation-delay: 0.15s; }
.qcm-history-card:nth-child(3) { animation-delay: 0.2s; }
.qcm-history-card:nth-child(4) { animation-delay: 0.25s; }
.qcm-history-card:nth-child(5) { animation-delay: 0.3s; }

.qcm-history-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(15, 124, 140, 0.15);
}

.qcm-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.qcm-specialite-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.qcm-semaine {
  font-size: 0.85rem;
  color: var(--text-medium);
  font-weight: 600;
}

.qcm-history-title {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.qcm-history-score {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.qcm-history-score.score-good {
  color: #27ae60;
}

.qcm-history-score.score-average {
  color: #f39c12;
}

.qcm-history-score.score-poor {
  color: #e74c3c;
}

.qcm-history-score i {
  font-size: 1.5rem;
}

.score-percentage {
  font-size: 1rem;
  opacity: 0.8;
}

.qcm-history-date {
  font-size: 0.9rem;
  color: var(--text-medium);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-medium);
}

.empty-state i {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 1rem;
  display: block;
}

.empty-state p {
  font-size: 1.2rem;
  margin: 0;
}

.loading-spinner {
  text-align: center;
  padding: 3rem;
  font-size: 1.2rem;
  color: var(--text-medium);
}

.loading-spinner i {
  font-size: 2rem;
  color: var(--primary-color);
}

/* Animation scaleIn */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .teacher-qcm-grid {
    grid-template-columns: 1fr;
  }

  .create-qcm-container {
    padding: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .results-header {
    padding: 2rem 1rem;
  }
  
  .score-big {
    font-size: 3rem;
  }
  
  .score-percentage {
    font-size: 1.5rem;
  }
  
  .results-details {
    padding: 1rem;
  }
}

/* Profile Menu Styles */
.profile-menu {
  position: relative;
  display: inline-block;
}

.profile-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--gray-light);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--gray-dark);
  font-size: 1rem;
  font-family: inherit;
}

.profile-btn:hover {
  background: var(--gray-light);
  border-color: var(--teal-primary);
}

.profile-btn i.fa-user-circle {
  font-size: 1.5rem;
  color: var(--teal-primary);
}

.profile-btn #user-name,
.profile-btn span {
  font-weight: 600;
  color: var(--gray-dark);
  white-space: nowrap;
}

.profile-btn #chevron-icon,
.profile-btn i.fa-chevron-down {
  font-size: 0.75rem;
  transition: transform 0.2s;
  color: var(--gray-dark);
  margin-left: auto;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease-in-out;
  z-index: 9999;
}

.profile-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--gray-dark);
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
}

.dropdown-item:hover {
  background: var(--gray-light);
}

.dropdown-item i {
  color: var(--teal-primary);
  width: 20px;
  font-size: 1rem;
}

.dropdown-divider {
  height: 1px;
  background: var(--gray-light);
  margin: 0.5rem 0;
}

/* ==================== SYSTÈME QZP CLICK-TO-SPAWN ==================== */

/* Container principal QZP */
.qzp-container {
  margin-top: 1.5rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  padding: 1.5rem;
  background: #fafbfc;
}

.qzp-main-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  min-height: 400px;
}

/* Image principale avec overlay */
.qzp-image-container {
  position: relative;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  min-width: 300px;
  flex: 1;
  cursor: crosshair;
  background: white;
}

#qzp-overlay-* {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Éléments spawnés sur l'image */
.qzp-spawned-element {
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(102, 126, 234, 0.9);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  user-select: none;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border: 3px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  pointer-events: auto;
  z-index: 10;
}

.qzp-spawned-element:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.qzp-spawned-element:active {
  cursor: grabbing;
  transform: scale(1.1);
}

/* Panel des vignettes cliquables */
.qzp-elements-panel {
  flex: 0 0 220px;
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid #e1e5e9;
  max-height: 400px;
  overflow-y: auto;
}

.qzp-elements-panel h4 {
  margin-bottom: 1rem;
  color: var(--gray-dark);
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qzp-elements-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Vignettes cliquables rondes */
.qzp-element-clickable {
  background: rgba(102, 126, 234, 0.85);
  color: white;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  user-select: none;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1.2;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.2);
  margin: 0 auto;
}

.qzp-element-clickable:hover {
  transform: scale(1.05);
  background: rgba(102, 126, 234, 0.95);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.qzp-element-clickable:active {
  transform: scale(0.95);
}

/* Vignettes utilisées (opacité réduite) */
.qzp-element-clickable[style*="opacity: 0.6"] {
  background: rgba(102, 126, 234, 0.4);
  transform: scale(0.95);
  cursor: default;
}

.qzp-element-clickable[style*="opacity: 0.6"]:hover {
  transform: scale(0.95);
  background: rgba(102, 126, 234, 0.4);
}

/* Statistiques de placement */
.qzp-stats {
  margin-top: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e9ecef;
}

.qzp-stats i {
  color: #667e74;
  margin-right: 0.5rem;
}

/* Feedback de validation */
#qzp-feedback-* {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
}

.qzp-feedback-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.qzp-feedback-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* ==================== CORRECTION QZP ==================== */

.qzp-correction {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 8px;
  background: #f8f9fa;
}

.qzp-correction-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.qzp-correction-image {
  position: relative;
  border: 2px solid #666;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 300px;
}

.qzp-correction-image img {
  max-width: 100%;
  height: auto;
  display: block;
}

.qzp-correct-zones {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.qzp-correct-zone {
  position: absolute;
  border: 3px solid #28a745;
  border-radius: 50%;
  background: rgba(40, 167, 69, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #155724;
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.2;
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.qzp-correction-legend {
  flex: 1;
  min-width: 200px;
}

.qzp-correction-legend h5 {
  margin-bottom: 1rem;
  color: #155724;
  font-size: 1.1rem;
}

.qzp-correction-legend ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.qzp-correction-legend li {
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: rgba(40, 167, 69, 0.1);
  border-radius: 6px;
  border-left: 4px solid #28a745;
}

.qzp-correction-legend li strong {
  font-size: 0.9rem;
}

.qzp-correction-legend li small {
  color: #666;
  font-size: 0.8rem;
}

/* ==================== RESPONSIVE QZP ==================== */

@media (max-width: 768px) {
  .qzp-main-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .qzp-elements-panel {
    flex: none;
    max-height: none;
  }
  
  .qzp-elements-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .qzp-element-clickable {
    width: 70px;
    height: 70px;
    font-size: 0.75rem;
  }
  
  .qzp-spawned-element {
    width: 70px;
    height: 70px;
    font-size: 0.75rem;
  }
  
  .qzp-correction-layout {
    flex-direction: column;
  }
  
  .qzp-correction-image {
    flex: none;
    max-width: 100%;
  }
}

/* ==================== DOSSIER PROGRESSIF ==================== */

/* Style pour les questions en mode DP */
.question-container.dp-mode {
  border-left: 4px solid #7c3aed;
  background: linear-gradient(135deg, #faf7ff 0%, #f0f4f8 100%);
}

.question-container.dp-mode .question-header {
  background: linear-gradient(135deg, #7c3aed 0%, #667e74 100%);
  color: white;
}

/* Checkbox pour activer le mode DP */
.checkbox-group {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e1e5e9;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  transform: scale(1.2);
}

/* Groupe d'infos d'étape */
.infos-etape-group {
  background: #f0f4f8;
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid #7c3aed;
}

.infos-etape-group .form-label {
  color: #7c3aed;
  font-weight: 600;
}

/* Badge DP dans l'interface étudiant */
.badge-dp {
  background: linear-gradient(135deg, #7c3aed 0%, #667e74 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Interface étudiant - Mode DP */
.dp-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.dp-contexte {
  background: linear-gradient(135deg, #faf7ff 0%, #f0f4f8 100%);
  border: 2px solid #7c3aed;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.dp-contexte h3 {
  color: #7c3aed;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dp-etape {
  background: white;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.dp-etape.active {
  border-color: #7c3aed;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
}

.dp-etape.completed {
  background: #f8f9fa;
  border-color: #28a745;
}

.dp-etape-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e1e5e9;
}

.dp-etape-number {
  background: #7c3aed;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

.dp-etape-number.completed {
  background: #28a745;
}

.dp-etape-title {
  flex: 1;
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
}

.dp-infos-nouvelles {
  background: #e8f4fd;
  border: 1px solid #b3d9f2;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.dp-infos-nouvelles h4 {
  color: #2563eb;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dp-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e1e5e9;
}

.dp-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #666;
  font-weight: 600;
}

.dp-btn-valider {
  background: linear-gradient(135deg, #7c3aed 0%, #667e74 100%);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dp-btn-valider:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.dp-btn-valider:disabled {
  background: #cccccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.dp-reponse-verrouille {
  background: #f8f9fa;
  border: 2px solid #6c757d;
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
}

.dp-reponse-verrouille .form-label {
  color: #6c757d;
}

.dp-reponse-verrouille input,
.dp-reponse-verrouille textarea,
.dp-reponse-verrouille select {
  background: #e9ecef;
  color: #6c757d;
  cursor: not-allowed;
}

/* ==================== GESTION DES ÉTUDIANTS ==================== */

/* Filtres */
.filters-container {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.filters-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  white-space: nowrap;
}

/* Grid des étudiants */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

/* Carte étudiant */
.student-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.student-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  border-color: var(--teal-primary);
}

.student-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e1e5e9;
}

.student-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--teal-primary) 0%, #7c3aed 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.student-info h4 {
  margin: 0 0 0.25rem 0;
  color: #333;
  font-size: 1.1rem;
}

.student-email {
  margin: 0 0 0.5rem 0;
  color: #666;
  font-size: 0.9rem;
}

.student-niveau {
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.niveau-dfgsm2 { background: #e3f2fd; color: #1976d2; }
.niveau-dfgsm3 { background: #e8f5e8; color: #388e3c; }
.niveau-dfasm1 { background: #fff3e0; color: #f57c00; }
.niveau-dfasm2 { background: #fce4ec; color: #c2185b; }
.niveau-dfasm3 { background: #f3e5f5; color: #7b1fa2; }

/* Statistiques étudiant */
.student-stats {
  margin-bottom: 1rem;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.stat i {
  color: var(--teal-primary);
  width: 16px;
}

.score-excellent { color: #28a745; font-weight: 600; }
.score-good { color: #17a2b8; font-weight: 600; }
.score-average { color: #ffc107; font-weight: 600; }
.score-poor { color: #dc3545; font-weight: 600; }

/* Actions étudiant */
.student-actions {
  padding-top: 1rem;
  border-top: 1px solid #e1e5e9;
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-sm.btn-primary {
  background: var(--teal-primary);
  color: white;
}

.btn-sm.btn-primary:hover {
  background: #5a6b64;
  transform: translateY(-1px);
}

/* Modal détails étudiant */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e1e5e9;
}

.modal-header h3 {
  margin: 0;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.modal-body {
  padding: 1.5rem;
}

/* Sections de détails */
.detail-section {
  margin-bottom: 2rem;
}

.detail-section h4 {
  color: #333;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--teal-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.detail-item {
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 3px solid var(--teal-primary);
}

.detail-item strong {
  color: #333;
  display: block;
  margin-bottom: 0.25rem;
}

.niveau-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Grid des statistiques */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s;
}

.stat-card:hover {
  border-color: var(--teal-primary);
  transform: translateY(-2px);
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--teal-primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: #666;
  font-size: 0.9rem;
}

/* Table des résultats */
.results-table {
  overflow-x: auto;
}

.results-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.results-table th {
  background: var(--teal-primary);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.results-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e1e5e9;
}

.results-table tr:last-child td {
  border-bottom: none;
}

.results-table tr:hover {
  background: #f8f9fa;
}

/* Badges de type */
.type-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
}

.type-badge.dp {
  background: linear-gradient(135deg, #7c3aed 0%, #667e74 100%);
  color: white;
}

.type-badge.qcm {
  background: #e3f2fd;
  color: #1976d2;
}

/* Badges de score */
.score-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.score-badge.score-excellent {
  background: #d4edda;
  color: #155724;
}

.score-badge.score-good {
  background: #d1ecf1;
  color: #0c5460;
}

.score-badge.score-average {
  background: #fff3cd;
  color: #856404;
}

.score-badge.score-poor {
  background: #f8d7da;
  color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
  .students-grid {
    grid-template-columns: 1fr;
  }
  
  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    justify-content: space-between;
  }
  
  .modal {
    padding: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
  
  .results-table {
    font-size: 0.85rem;
  }
}

/* Styles pour les nouveaux types de questions */

/* QROC - Questions à Réponse Ouverte Courte */
.qroc-input-container {
  margin-top: 1.5rem;
}

.qroc-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.qroc-input:focus {
  outline: none;
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 3px rgba(15, 124, 140, 0.1);
}

.qroc-input:valid {
  border-color: var(--success);
}

/* QZP - Questions à Zones à Pointer */
.qzp-container {
  margin-top: 1.5rem;
}

.qzp-main-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.qzp-image-container {
  position: relative;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s;
  min-width: 300px;
}

.qzp-image-container:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.qzp-image-container img {
  max-width: 100%;
  height: auto;
  display: block;
}

.qzp-elements-panel {
  flex: 1;
  min-width: 200px;
}

.qzp-element {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: grab;
  user-select: none;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.2s;
}

.qzp-element-round {
  background: rgba(102, 126, 234, 0.85) !important;
  border-radius: 50% !important;
  width: 80px !important;
  height: 80px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.85rem !important;
  line-height: 1.2 !important;
  padding: 0.5rem !important;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.qzp-element:hover, .qzp-element-round:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.qzp-element:active, .qzp-element-round:active {
  cursor: grabbing;
  opacity: 0.7;
  transform: scale(0.95);
}

.qzp-drop-zone {
  position: absolute;
  border-radius: 50%;
  border: 2px dashed transparent;
  background: rgba(102, 126, 234, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #667eea;
  font-weight: 600;
  transition: all 0.3s;
  pointer-events: auto;
}

.qzp-drop-zone:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}

.qzp-drop-zone.filled {
  border-color: #28a745;
  background: rgba(40, 167, 69, 0.2);
  cursor: pointer;
}

.qzp-reset-zone {
  margin-top: 1rem;
  padding: 1rem;
  border: 2px dashed #ccc;
  border-radius: 8px;
  text-align: center;
  color: var(--gray-medium);
  font-style: italic;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qzp-reset-zone:hover {
  border-color: #dc3545;
  color: #dc3545;
  background: rgba(220, 53, 69, 0.05);
}

/* Badges pour types de questions */
.badge-multiple {
  background-color: var(--teal-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-qroc {
  background-color: #2196F3;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-qzp {
  background-color: #9C27B0;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Feedback pour QZP */
.qzp-feedback {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid var(--success);
}

.qzp-feedback.error {
  border-left-color: var(--error);
  background: #fef2f2;
}

/* Responsive pour les questions */
@media (max-width: 768px) {
  .qzp-main-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .qzp-image-container {
    max-width: 100%;
    min-width: auto;
  }
  
  .qzp-elements-panel {
    min-width: auto;
  }
  
  .qzp-elements-list {
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem !important;
  }
  
  .qzp-element-round {
    width: 70px !important;
    height: 70px !important;
    font-size: 0.75rem !important;
  }
  
  .qroc-input {
    font-size: 16px; /* Évite le zoom sur iOS */
  }
}

/* Animation pour les feedbacks */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.qzp-feedback {
  animation: fadeIn 0.3s ease-out;
}

/* ===== GESTION DES ÉTUDIANTS ===== */

.students-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1.5rem;
}

.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

.student-card {
  background: white;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.student-card:hover {
  border-color: var(--teal-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 124, 140, 0.15);
}

.student-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.student-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-primary), var(--teal-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.student-info h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--gray-dark);
  font-weight: 600;
}

.student-level {
  margin: 0.2rem 0 0 0;
  font-size: 0.85rem;
  color: var(--teal-primary);
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  background: var(--teal-light);
  border-radius: 12px;
  display: inline-block;
}

.student-stats-mini {
  display: flex;
  gap: 0.8rem;
  margin-left: auto;
}

.mini-stat {
  text-align: center;
}

.mini-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal-primary);
}

.mini-label {
  display: block;
  font-size: 0.7rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.student-details {
  margin-bottom: 1rem;
}

.detail-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.detail-row i {
  width: 16px;
  color: var(--teal-primary);
}

.student-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.btn-action {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-action.btn-primary {
  background: var(--teal-primary);
  color: white;
}

.btn-action.btn-primary:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}

/* Filtres */
.filters-container {
  margin-bottom: 2rem;
}

.filters-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-weight: 600;
  color: var(--gray-dark);
  white-space: nowrap;
}

.filter-group .form-input {
  margin: 0;
  min-width: 200px;
}

.filter-group .btn-secondary {
  white-space: nowrap;
  padding: 0.6rem 1.2rem;
}

/* Modal détails étudiant */
.modal {
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background-color: white;
  margin: 2% auto;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.3s ease;
}

.modal-header {
  background: linear-gradient(135deg, var(--teal-primary), var(--teal-dark));
  color: white;
  padding: 1.5rem;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 2rem;
}

.student-details-section {
  margin-bottom: 2rem;
}

.student-details-section h4 {
  color: var(--teal-primary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.info-item label {
  font-weight: 600;
  color: #666;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-item span {
  color: var(--gray-dark);
  font-weight: 500;
}

.niveau-badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  background: var(--teal-light);
  color: var(--teal-primary);
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.stat-box {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.stat-box:hover {
  border-color: var(--teal-primary);
  background: var(--teal-light);
}

.stat-box .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-box .stat-label {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.results-table {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
}

.results-header {
  display: grid;
  grid-template-columns: 2fr 1fr 0.8fr 1fr 1fr;
  background: var(--teal-primary);
  color: white;
  padding: 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.results-row {
  display: grid;
  grid-template-columns: 2fr 1fr 0.8fr 1fr 1fr;
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
  transition: background-color 0.3s ease;
}

.results-row:hover {
  background-color: #f8f9fa;
}

.results-row:last-child {
  border-bottom: none;
}

.results-row strong {
  color: var(--gray-dark);
  display: block;
  margin-bottom: 0.2rem;
}

.results-row small {
  color: #666;
  font-size: 0.8rem;
}

.score-badge {
  padding: 0.3rem 0.7rem;
  border-radius: 15px;
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-block;
  margin-bottom: 0.2rem;
}

.score-badge.excellent {
  background: #d4edda;
  color: #155724;
}

.score-badge.good {
  background: #d1ecf1;
  color: #0c5460;
}

.score-badge.average {
  background: #fff3cd;
  color: #856404;
}

.score-badge.poor {
  background: #f8d7da;
  color: #721c24;
}

.badge {
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.badge-purple {
  background: #e9d5ff;
  color: #7c3aed;
}

.badge-blue {
  background: #dbeafe;
  color: #2563eb;
}

.no-results {
  text-align: center;
  padding: 2rem;
  color: #666;
}

.no-results i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #ccc;
}

/* Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .students-grid {
    grid-template-columns: 1fr;
  }
  
  .student-header {
    flex-wrap: wrap;
  }
  
  .student-stats-mini {
    margin-left: 0;
    margin-top: 0.5rem;
    justify-content: flex-start;
  }
  
  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }
  
  .filter-group {
    justify-content: space-between;
  }
  
  .filter-group .form-input {
    min-width: 0;
    flex: 1;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .results-header,
  .results-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .results-header {
    display: none;
  }
  
  .results-row {
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 1rem;
  }
}

/* ===== SUPER ADMIN DASHBOARD ===== */

.admin-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
  margin: 0;
  color: var(--teal-primary);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

.teacher-card {
  background: white;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.teacher-card:hover {
  border-color: var(--teal-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 124, 140, 0.15);
}

.teacher-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.teacher-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.teacher-info h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--gray-dark);
  font-weight: 600;
}

.teacher-email {
  margin: 0.2rem 0 0 0;
  font-size: 0.85rem;
  color: var(--teal-primary);
  font-weight: 500;
}

.teacher-stats-mini {
  display: flex;
  gap: 0.8rem;
  margin-left: auto;
}

.teacher-details {
  margin-bottom: 1rem;
}

.teacher-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.btn-info {
  background: #17a2b8;
  color: white;
}

.btn-info:hover {
  background: #138496;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #c82333;
}

.system-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.system-stat-card {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.5rem;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.system-stat-card:hover {
  border-color: var(--teal-primary);
  background: var(--teal-light);
}

.system-stat-card h4 {
  margin: 0 0 1rem 0;
  color: var(--teal-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e9ecef;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-info {
  flex: 1;
}

.activity-info strong {
  display: block;
  color: var(--gray-dark);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.activity-info span {
  display: block;
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 0.1rem;
}

.activity-info small {
  color: #999;
  font-size: 0.8rem;
}

.activity-item small {
  color: #999;
  font-size: 0.8rem;
  white-space: nowrap;
  margin-left: 1rem;
}

.role-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-badge.teacher {
  background: #e9d5ff;
  color: #7c3aed;
}

.role-badge.student {
  background: var(--teal-light);
  color: var(--teal-primary);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.form-actions .btn-secondary {
  background: #6c757d;
  color: white;
  border: none;
}

.form-actions .btn-secondary:hover {
  background: #5a6268;
}

/* Responsive Super Admin */
@media (max-width: 768px) {
  .teachers-grid {
    grid-template-columns: 1fr;
  }
  
  .teacher-header {
    flex-wrap: wrap;
  }
  
  .teacher-stats-mini {
    margin-left: 0;
    margin-top: 0.5rem;
    justify-content: flex-start;
  }
  
  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .system-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .activity-item {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .activity-item small {
    margin-left: 0;
  }
  
  .form-actions {
    flex-direction: column;
  }
}

/* ========================================== */
/* SUPER ADMIN - ONGLETS ET NOUVELLES FONCTIONNALITÉS */
/* ========================================== */

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--gray-light);
  padding-bottom: 0;
}

.admin-tab {
  background: transparent;
  border: none;
  padding: 1rem 2rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--gray-dark);
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-tab:hover {
  color: var(--teal-primary);
  background: var(--teal-light);
}

.admin-tab.active {
  color: var(--teal-primary);
  border-bottom-color: var(--teal-primary);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

/* Styles pour les actions sur les cartes utilisateurs */
.teacher-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.action-btn {
  background: transparent;
  border: 2px solid;
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn.reset {
  color: #ffc107;
  border-color: #ffc107;
}

.action-btn.reset:hover {
  background: #ffc107;
  color: white;
}

.action-btn.delete {
  color: #dc3545;
  border-color: #dc3545;
}

.action-btn.delete:hover {
  background: #dc3545;
  color: white;
}

/* Styles pour les informations utilisateur dans les modals */
.user-info {
  margin-bottom: 1rem;
}

.user-info .fas {
  margin-right: 0.5rem;
}

/* Animations pour les alertes */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Amélioration des cartes enseignant/étudiant */
.teacher-card {
  background: white;
  border: 1px solid var(--gray-medium);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 280px;
}

.teacher-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-color: var(--teal-primary);
}

.teacher-info {
  display: flex;
  gap: 1rem;
  flex: 1;
}

.teacher-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667e74 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.teacher-details h3 {
  margin: 0 0 0.5rem 0;
  color: var(--gray-dark);
  font-size: 1.1rem;
}

.teacher-details p {
  margin: 0.25rem 0;
  color: #666;
  font-size: 0.9rem;
}

.teacher-details .fas {
  width: 16px;
  color: var(--teal-primary);
  margin-right: 0.5rem;
}

.teacher-status {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.teacher-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-light);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--teal-primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  font-weight: 600;
}

/* Responsive pour les onglets */
@media (max-width: 768px) {
  .admin-tabs {
    flex-wrap: wrap;
  }
  
  .admin-tab {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .teacher-card {
    min-height: auto;
  }
  
  .teacher-info {
    flex-direction: column;
    text-align: center;
  }
  
  .teacher-avatar {
    align-self: center;
  }
}

/* Styles pour les comptes en attente */
.pending-account {
  border-left: 4px solid #ffc107;
  background: linear-gradient(90deg, #fffbf0 0%, #ffffff 20%);
}

.pending-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.action-btn.approve {
  color: #28a745;
  border-color: #28a745;
}

.action-btn.approve:hover {
  background: #28a745;
  color: white;
}

.action-btn.reject {
  color: #dc3545;
  border-color: #dc3545;
}

.action-btn.reject:hover {
  background: #dc3545;
  color: white;
}
