/* ======== STYLES DE BASE ======== */
#introBanner {
  background: #f9b653;
  max-width: 1200px;
  margin: auto;
}

.filter-controls {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-label {
  font-weight: 600;
  color: #333;
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  background: white;
  border: 2px solid #feb14f;
  color: #333;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9em;
  font-weight: 500;
}

.filter-btn:hover {
  background: #fff5e6;
}

.filter-btn.active {
  background: #feb14f;
  color: white;
}

.vignettes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 30px;
}

.vignette {
  background: white;
  border-radius: 7px;
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.vignette.hidden {
  display: none;
}

.vignette:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.vignette-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
}

.vignette-content {
  padding: 20px 20px 50px 20px;
}

.vignette-title {
  font-size: 1.3em;
  font-weight: 500;
  color: #ff7060;
  margin-bottom: 30px;
  text-align: left;
}

.vignette-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.keyword {
  background: #feb14f;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.85em;
  font-weight: 500;
}

.vignette-resume {
  color: #666;
  line-height: 1.6;
  font-size: 0.95em;
}

/* ======== MODAL ======== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  /* padding: 20px; */
}

.modal-content {
  background: white;
  border-radius: 15px;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  background: #eee;
  padding: 30px;
  border-radius: 15px 15px 0 0;
}

.modal-title {
  font-size: 2em;
  margin-bottom: 10px;
  line-height: initial;
  text-align: center;
}

.modal-body {
  padding: 30px;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgb(0 0 0 / 50%);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
}

/* ======== ONGLETS ======== */
.activity-tabs {
  display: flex;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 10px 16px;
  border-radius: 20px;
  border: 2px solid #feb14f;
  background: white;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: #fff5e6;
}

.tab-btn.active {
  background: #feb14f;
  color: white;
}

.activity-tab {
  display: none;
  margin-top: 20px;
  animation: fadeIn 0.3s;
}

.activity-tab.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ======== EXERCICES COMMUNS ======== */
.exercise-question {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border-left: 4px solid #feb14f;
}

.exercise-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.option-item:hover {
  border-color: #feb14f;
  background: #fff5e6;
}

.option-item input {
  cursor: pointer;
}

.btn-check {
  background: #feb14f;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1em;
  margin-top: 15px;
  transition: all 0.3s;
}

.btn-check:hover {
  background: #ff9f2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.result-message {
  margin-top: 15px;
  padding: 15px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
}

.result-success {
  background: #d4edda;
  color: #155724;
  border: 2px solid #c3e6cb;
}

.result-error {
  background: #f8d7da;
  color: #721c24;
  border: 2px solid #f5c6cb;
}

.result-partial {
  background: #fff3cd;
  color: #856404;
  border: 2px solid #ffeaa7;
}

/* ======== MATCHING ======== */
.match-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.match-left,
.match-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.match-item {
  padding: 15px;
  border: 2px solid #feb14f;
  border-radius: 8px;
  background: white;
  cursor: move;
  transition: all 0.2s;
}

.match-item:hover {
  background: #fff5e6;
  transform: scale(1.02);
}

.match-target {
  padding: 15px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  background: #f8f9fa;
  min-height: 50px;
  display: flex;
  align-items: center;
}

.match-target.filled {
  background: #e8f5e9;
  border-color: #4caf50;
}

/* ======== GRILLE À REMPLIR ======== */
.grid-container {
  overflow-x: auto;
  margin: 20px 0;
}

.fill-grid {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.fill-grid th,
.fill-grid td {
  border: 2px solid #e0e0e0;
  padding: 12px;
  text-align: left;
}

.fill-grid th {
  background: #feb14f;
  color: white;
  font-weight: 600;
}

.fill-grid input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.95em;
}

.fill-grid input:focus {
  outline: none;
  border-color: #feb14f;
}

/* ======== VIDÉO ======== */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 20px 0;
  border-radius: 8px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* ======== GALERIE D'IMAGES ======== */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 20px 0;
}

.gallery-item-exercices {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.gallery-item-exercices:hover {
  transform: scale(1.05);
}

.gallery-item-exercices img {
  width: 100%;
  object-fit: cover;
  display: block;
  max-width: 250px;
  height: 100%;
  margin: auto;
}

.gallery-caption {
  padding: 10px;
  background: #f8f9fa;
  text-align: center;
  font-size: 0.9em;
  color: #666;
}

/* ======== CANVAS DESSIN ======== */
.canvas-container {
  text-align: center;
  margin: 20px 0;
}

#drawCanvas {
  border: 2px solid #ccc;
  border-radius: 8px;
  cursor: crosshair;
  background: white;
  width: 100%;
}

.canvas-controls {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-canvas {
  padding: 8px 20px;
  border: 2px solid #feb14f;
  background: white;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-canvas:hover {
  background: #feb14f;
  color: white;
}

/* ======== TEXTAREA ======== */
.text-area-input {
  width: 95%;
  min-height: 100px;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1em;
  font-family: inherit;
  resize: vertical;
  min-height: 400px;
}

.text-area-input:focus {
  outline: none;
  border-color: #feb14f;
}

/* ======== CORRECTION ASSISTÉE ======== */
.correction-zone {
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
}

.correction-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.correction-suggestions {
  margin-top: 15px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  border-left: 4px solid #4caf50;
}

.suggestion-item {
  margin: 10px 0;
  padding: 10px;
  background: #e8f5e9;
  border-radius: 6px;
}

/* ======== LIGHTBOX POUR IMAGES ======== */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: white;
  color: #333;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}

.gallery-item-exercices {
  cursor: pointer;
}

/* ======== CORRECTIONS VISUELLES ======== */
.answer-feedback {
  display: inline-block;
  margin-left: 10px;
  font-weight: bold;
}

.correct-answer {
  color: #4caf50;
}

.wrong-answer {
  color: #f44336;
}

.option-item.correct {
  background: #e8f5e9;
  border-color: #4caf50;
}

.option-item.wrong {
  background: #ffebee;
  border-color: #f44336;
}

.show-correction {
  background: #2196f3;
  color: white;
  border: none;
  padding: 10px 25px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  margin-left: 10px;
  transition: all 0.3s;
}

.show-correction:hover {
  background: #1976d2;
}

.correction-detail {
  margin-top: 15px;
  padding: 15px;
  background: #e3f2fd;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
}
