/* Styles pour le conteneur principal du Dashboard */
#qcm-dashboard-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#qcm-dashboard-container h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  text-align: center;
}

#dashboard-content, #qcm-viewer {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  overflow: hidden;
  padding: 20px;
}

#dashboard-content h3, #qcm-viewer h3 {
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 2px solid #ecf0f1;
  padding-bottom: 10px;
}

#courses-list ul, #results-summary ul {
  list-style-type: none;
  padding-left: 0;
}

#courses-list li, #results-summary li {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}

#courses-list a {
  text-decoration: none;
  color: #3498db;
  font-weight: bold;
  cursor: pointer;
}

#courses-list a:hover {
  text-decoration: underline;
}

#courses-list ul ul {
  padding-left: 20px;
}

.back-btn {
  background: #2c3e50;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 20px;
  display: inline-block;
}

.back-btn:hover {
  background: #1a252f;
}

/* Cacher le contenu non actif */
.hidden {
  display: none;
}

/* Styles pour le conteneur principal du QCM (hérités du précédent CSS) */
#qcm-container-<?php echo $course_id; ?>-<?php echo $difficulty; ?> {
  max-width: 900px;
  margin: 20px auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ... (Le reste du CSS reste inchangé) ... */
/* Styles pour le conteneur principal du QCM */

/* Styles pour l'en-tête */
.qcm-header {
  background: #2c3e50;
  color: white;
  padding: 20px;
  text-align: center;
}

.qcm-header h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.qcm-timer {
  font-size: 1.4rem;
  font-weight: bold;
  background: #3498db;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-block;
  margin-top: 10px;
  transition: background 0.3s;
}

.qcm-timer.warning {
  background: #e74c3c;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Styles pour les groupes de questions */
.qcm-group-title {
  font-size: 1.4rem;
  padding: 20px 20px 10px;
  color: #2c3e50;
  border-bottom: 2px solid #ecf0f1;
}

/* Styles pour chaque question */
.qcm-question {
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.qcm-stem {
  font-weight: bold;
  margin-bottom: 12px;
  color: #2980b9;
  font-size: 1.1rem;
}

.qcm-question-image {
  max-height: 400px;
  width: auto;
  display: block;
  margin: 0 auto 15px auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.qcm-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qcm-option {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: all 0.2s;
}

.qcm-option:hover {
  background: #edf7ff;
  border-color: #3498db;
}

.qcm-option input[type="checkbox"] {
  margin-right: 12px;
  transform: scale(1.3);
}

.qcm-option label {
  cursor: pointer;
  flex: 1;
  line-height: 1.4;
}

/* Styles pour les contrôles */
.qcm-controls {
  padding: 20px;
  text-align: center;
  background: #f8f9fa;
}

.qcm-controls button {
  background: #27ae60;
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1.1rem;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.3s;
}

.qcm-controls button:hover {
  background: #219653;
}

.qcm-controls button:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

/* Styles pour la boîte de score */
.qcm-score-box {
  text-align: center;
  margin-bottom: 25px;
  padding: 15px;
  background: #e8f4f8;
  border-radius: 12px;
  font-size: 1.2rem;
}

.qcm-score {
  font-weight: bold;
  color: #27ae60;
  font-size: 1.4rem;
}

.qcm-time-used {
  margin-top: 8px;
  color: #7f8c8d;
}

/* Styles pour les résultats individuels des questions */
.qcm-item-result {
  padding: 15px;
  margin-bottom: 25px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.qcm-feedback-box {
  background: #3498db;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  margin: 12px 0;
  font-weight: 500;
}

.qcm-original-question {
  font-size: 0.85rem;
  color: #555;
  margin: 8px 0 4px;
  font-style: italic;
}

.qcm-answer-line.correct {
  color: #27ae60;
  font-weight: bold;
}

.qcm-answer-line.incorrect {
  color: #e74c3c;
  font-weight: bold;
}

.qcm-explanation-box {
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
}

.qcm-explanation-box::before {
  content: "ℹ️ Explication :";
  font-weight: bold;
  color: #1565c0;
  display: block;
  margin-bottom: 6px;
}

.qcm-trap-box {
  background: #fff3e0;
  border: 1px solid #ffcc80;
  border-radius: 10px;
  padding: 12px;
  margin: 12px 0;
}

.qcm-trap-box::before {
  content: "⚠️ Piège :";
  font-weight: bold;
  color: #e65100;
  display: block;
  margin-bottom: 6px;
}

.hidden {
  display: none;
}

/* Styles pour le pied de page */
.qcm-footer {
  text-align: center;
  padding: 15px;
  color: #7f8c8d;
  font-size: 0.9rem;
}

/* --- Styles pour le tableau de bord (à implémenter dans une page dédiée ou shortcode) --- */
.qcm-dashboard {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
}

.qcm-dashboard h2 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.qcm-course-overview {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.qcm-course-overview h3 {
  color: #2980b9;
}

.qcm-progress-bar {
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
  margin: 10px 0;
}

.qcm-progress-bar-inner {
  height: 20px;
  background-color: #3498db;
  transition: width 0.3s ease;
}