/* Correction des puces dans les QCM et contenus riches */

/* Styles pour les listes dans les contenus riches */
.prose ul {
  list-style-type: disc !important;
  padding-left: 1.5rem !important;
  margin: 1rem 0 !important;
}

.prose ol {
  list-style-type: decimal !important;
  padding-left: 1.5rem !important;
  margin: 1rem 0 !important;
}

.prose li {
  margin: 0.5rem 0 !important;
  display: list-item !important;
}

/* Styles pour les listes dans les boîtes colorées */
.list-disc {
  list-style-type: disc !important;
}

.list-inside {
  list-style-position: inside !important;
}

/* Correction spécifique pour les QCM */
#qcm-a .prose ul,
#qcm-b .prose ul,
.qcm-content .prose ul {
  list-style-type: disc !important;
  padding-left: 1.5rem !important;
  margin: 1rem 0 !important;
}

#qcm-a .prose ol,
#qcm-b .prose ol,
.qcm-content .prose ol {
  list-style-type: decimal !important;
  padding-left: 1.5rem !important;
  margin: 1rem 0 !important;
}

#qcm-a .prose li,
#qcm-b .prose li,
.qcm-content .prose li {
  margin: 0.5rem 0 !important;
  display: list-item !important;
}

/* Layout 67/33 pour les QCM */
.qcm-layout-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .qcm-layout-media {
    grid-template-columns: 2fr 1fr;
  }
}

.qcm-text-content {
  grid-column: 1;
}

.qcm-media-content {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 1023px) {
  .qcm-text-content,
  .qcm-media-content {
    grid-column: 1;
  }
}

/* Styles spécifiques pour les images QCM */
.qcm-image {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  display: block;
}

/* Empêche l'image de déborder et gère SVG/original proprement */
.qcm-media-wrap {
  width: 100%;
  max-width: 400px;   /* adapte si tu veux */
}
.qcm-media-wrap img, .qcm-media-wrap picture, .qcm-media-wrap svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Debug styles */
.qcm-debug {
  background-color: #f3f4f6;
  padding: 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}

/* Fallback styles */
.qcm-fallback {
  background-color: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.qcm-fallback p {
  color: #92400e;
  font-size: 0.875rem;
  margin: 0;
}

/* Styles pour les tableaux Wagtail */
.wagtail-table {
  width: 100% !important;
  margin-bottom: 1.5rem !important;
  background-color: #dbeafe !important; /* bg-blue-100 */
  border-radius: 0.5rem !important;
  overflow: hidden !important;
  border: none !important;
}

.wagtail-table thead {
  background-color: #2563eb !important; /* bg-blue-600 */
}

.wagtail-table thead th {
  color: white !important;
  font-weight: 600 !important;
  padding: 0.75rem 1rem !important;
  text-align: left !important;
  border-bottom: 1px solid #1d4ed8 !important; /* border-blue-700 */
  font-size: 0.875rem !important;
}

.wagtail-table tbody tr:nth-child(odd) {
  background-color: #dbeafe !important; /* bg-blue-100 */
}

.wagtail-table tbody tr:nth-child(even) {
  background-color: #eff6ff !important; /* bg-blue-50 */
}

.wagtail-table tbody tr:hover {
  background-color: #bfdbfe !important; /* bg-blue-200 */
}

.wagtail-table tbody td {
  padding: 0.75rem 1rem !important;
  border-bottom: 1px solid #bfdbfe !important; /* border-blue-200 */
  font-size: 0.875rem !important;
  color: #374151 !important; /* text-gray-700 */
  vertical-align: top !important;
}
