/* ==================== VARIABLES ==================== */
:root {
  --bg: #0e3a5b;
  --panel: #ffffff;
  --soft: #f4f7fb;
  --accent: #2e7df6;
  --ok: #0db27f;
  --warn: #ffae00;
  --text: #0d1b2a;
  --muted: #546079;
  --border: #e6ecf5;
  --shadow: 0 12px 30px rgba(13, 27, 42, 0.12);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

/* ==================== BODY & BACKGROUND ==================== */
body,
html {
  background: linear-gradient(135deg, #c4a2d5, #d2cbd5);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden !important;
}

#custom-test {
  padding: 0px !important;
}

.hidden {
  display: none !important;
}
.qsm-quiz-container {
  background: transparent !important;
}
/* ==================== LAYOUT 2 COLONNES ==================== */

/* Conteneur principal de la question en 2 colonnes */
.quiz_section.qsm-question-wrapper,
.qsm-question-wrapper {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 0 !important;
  max-width: 1200px;
  min-height: 680px;
  height: 680px;
  margin: 0 auto !important;
  margin-bottom: 30px !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 10;
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
}

/* Colonne gauche - Vidéo */
.left-side {
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  position: relative;
  height: 100%;
  min-height: 680px;
}

.left-side video,
.left-side img {
  width: 100%;
  max-width: 100%;
  max-height: 450px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.left-side .question-number {
  background: linear-gradient(135deg, #3a7bd5, #3a6073);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  text-align: center;
  margin: 0;
}

.left-side .question-number .colored {
  color: white;
  font-weight: 800;
}

/* Colonne droite - Questions */
.parent-questions {
  padding: 40px 35px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: white;
  height: 100%;
  min-height: 680px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Scrollbar personnalisée pour webkit (Chrome, Safari, Edge) */
.parent-questions::-webkit-scrollbar {
  width: 8px;
}

.parent-questions::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.parent-questions::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 10px;
}

.parent-questions::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #5568d3, #653a8b);
}

/* Titre de la question principale */
.mlw_qmn_new_question {
  font-size: 20px;
  font-weight: 700 !important;
  color: #2d3748;
  line-height: 1.4;
  margin-bottom: 30px !important;
  padding: 0 !important;
  text-align: left;
}

/* Sous-questions */
.sub-question1,
.sub-question2 {
  font-size: 16px;
  font-weight: 600;
  color: #4a5568;
  margin: 20px 0 15px 0;
  padding-left: 0;
}

/* Sections de questions */
.section-question-1,
.section-question-2 {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

/* Style des réponses checkbox */
.qsm_check_answer {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.qsm_check_answer:hover {
  border-color: #667eea;
  background: rgba(102, 126, 234, 0.05);
  transform: translateX(3px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

/* Lettre de la réponse */
.letter {
  font-size: 16px;
  font-weight: 700;
  color: #667eea;
  min-width: 28px;
  height: 28px;
  background: #eef2ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Checkbox caché */
.qsm-multiple-response-input {
  display: none;
}

/* Label de la réponse */
.qsm-input-label {
  display: block;
  width: 100%;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #2d3748;
  text-align: left;
  margin: 0;
}

/* État coché */
.qsm_check_answer:has(input:checked) {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.12), rgba(118, 75, 162, 0.12));
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 4px 20px rgba(102, 126, 234, 0.25);
}

.qsm_check_answer:has(input:checked) .letter {
  background: linear-gradient(135deg, #3a7bd5, #3a6073);
  color: white;
}

.qsm_check_answer:has(input:checked)::after {
  content: "✓";
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #10b981, #17c4a6);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* ==================== PAGINATION & NAVIGATION ==================== */
.qmn_pagination {
  background: transparent;
  backdrop-filter: blur(10px);
  border-radius: 20px;
  max-width: 1200px;
  margin: 0 auto !important;
  margin-top: 30px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

#custom-test .qmn_btn {
  background: white !important;
  color: #3a6073 !important;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.qmn_btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
  text-decoration: none;
  color: white !important;
  background: linear-gradient(135deg, #3a7bd5, #3a6073) !important;
}

.qmn_btn:active {
  transform: translateY(0);
}

/* ==================== MASQUER ÉLÉMENTS INUTILES ==================== */
.qsm_hint,
.qsm-featured-image,
fieldset,
.quiz_begin,
.quiz_end,
.qsm-progress-bar,
.qsm-hint {
  display: none !important;
}

.qsm-auto-page-row[style*="display: none"] {
  display: none !important;
}

/* ==================== ÉLÉMENTS DÉCORATIFS ==================== */
.qsm-quiz-container::before {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  top: 10%;
  left: -5%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 1));
  border-radius: 50%;
  animation: float-slow 15s ease-in-out infinite;
  z-index: -1;
  user-select: none;
}

.qsm-quiz-container::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  top: 60%;
  right: -3%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 1));
  border-radius: 50%;
  animation: float-medium 12s ease-in-out infinite reverse;
  z-index: -1;
  user-select: none;
}

.qsm-quiz-container .qsm-quiz-form::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  top: 30%;
  right: 10%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 1));
  border-radius: 50%;
  animation: float-fast 8s ease-in-out infinite;
  z-index: -1;
  user-select: none;
}

/* ==================== ANIMATIONS ==================== */
@keyframes float-slow {
  0%, 100% {
    transform: translateY(0px) translateX(0px) scale(1);
    opacity: 0.15;
  }
  25% {
    transform: translateY(-30px) translateX(20px) scale(1.1);
    opacity: 0.2;
  }
  50% {
    transform: translateY(-10px) translateX(-15px) scale(0.9);
    opacity: 0.1;
  }
  75% {
    transform: translateY(-40px) translateX(10px) scale(1.05);
    opacity: 0.18;
  }
}

@keyframes float-medium {
  0%, 100% {
    transform: translateY(0px) translateX(0px) rotate(0deg);
    opacity: 0.12;
  }
  33% {
    transform: translateY(-25px) translateX(-20px) rotate(120deg);
    opacity: 0.18;
  }
  66% {
    transform: translateY(-15px) translateX(25px) rotate(240deg);
    opacity: 0.08;
  }
}

@keyframes float-fast {
  0%, 100% {
    transform: translateY(0px) translateX(0px) scale(1);
    opacity: 0.1;
  }
  20% {
    transform: translateY(-20px) translateX(15px) scale(1.2);
    opacity: 0.15;
  }
  40% {
    transform: translateY(-35px) translateX(-10px) scale(0.8);
    opacity: 0.5;
  }
  60% {
    transform: translateY(-10px) translateX(20px) scale(1.1);
    opacity: 0.12;
  }
  80% {
    transform: translateY(-25px) translateX(-5px) scale(0.9);
    opacity: 0.08;
  }
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 4px 20px rgba(102, 126, 234, 0.25);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.3), 0 6px 30px rgba(102, 126, 234, 0.35);
  }
}

.qsm_check_answer:has(input:checked) {
  animation: glow-pulse 2s ease-in-out infinite;
}

/* ==================== RESPONSIVE ==================== */

/* Tablette (≤ 1024px) */
@media (max-width: 1024px) {
  .qsm-question-wrapper {
    max-width: 950px;
  }
}

/* Tablette portrait (≤ 900px) */
@media (max-width: 900px) {
  .quiz_section.qsm-question-wrapper,
  .qsm-question-wrapper {
    grid-template-columns: 1fr !important;
    max-width: 700px;
    height: auto;
    min-height: auto;
  }

  .left-side {
    padding: 25px;
    border-radius: 24px 24px 0 0;
    min-height: auto;
    height: auto;
  }

  .left-side video,
  .left-side img {
    max-height: 350px;
  }

  .parent-questions {
    padding: 30px 25px;
    min-height: auto;
    height: auto;
  }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
  .left-side {
    padding: 20px;
  }

  .parent-questions {
    padding: 25px 20px;
  }

  .mlw_qmn_new_question {
    font-size: 18px;
    margin-bottom: 25px !important;
  }

  .sub-question1,
  .sub-question2 {
    font-size: 15px;
    margin: 15px 0 12px 0;
  }

  .qsm_check_answer {
    padding: 12px 14px;
  }

  .qsm-input-label {
    font-size: 14px;
  }

  .qmn_pagination {
    padding: 15px;
    margin-top: 20px !important;
  }
}

/* Petit mobile (≤ 480px) */
@media (max-width: 480px) {
  .left-side,
  .parent-questions {
    padding: 18px 15px;
  }

  .mlw_qmn_new_question {
    font-size: 16px;
    margin-bottom: 20px !important;
  }

  .left-side .question-number {
    font-size: 13px;
    padding: 8px 16px;
  }

  .qsm_check_answer {
    padding: 10px 12px;
    gap: 10px;
  }

  .letter {
    min-width: 24px;
    height: 24px;
    font-size: 14px;
  }

  .qsm-input-label {
    font-size: 13px;
  }

  .qmn_pagination {
    flex-direction: column;
    gap: 10px;
  }

  #custom-test .qmn_btn {
    width: 100%;
    padding: 13px 14px;
    font-size: 0.95rem;
  }
}

/* ==================== CACHE ÉLÉMENTS SPÉCIFIQUES ==================== */

/* ==================== PAGE RÉSULTATS ==================== */

.qsm-results-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Titre principal */
.big-title {
 font-size: 2.5rem;
    font-weight: 800;
    color: white;
    text-align: center;
    margin-bottom: 40px;
}

/* Conteneur des questions/réponses en grille 2 colonnes */
.qsm_questions_answers_section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

/* Chaque question (carte) */
.qmn_question_answer {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.qmn_question_answer:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* Bordure verte pour les bonnes réponses */
.qmn_question_answer_correct {
  border-color: #10b981;
  background: linear-gradient(to bottom, #f0fdf4, #ffffff);
}

/* Bordure rouge pour les mauvaises réponses */
.qmn_question_answer_incorrect {
  border-color: #ef4444;
  background: linear-gradient(to bottom, #fef2f2, #ffffff);
}

/* Image ou vidéo */
.qmn_question_answer .qsm-featured-image {
  display: block !important;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  position: relative;
}

.qmn_question_answer .qsm-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.qmn_question_answer video {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: block;
}

/* Contenu de la question */
.qmn_question_answer .parent-questions {
  padding: 20px;
  min-height: auto;
  height: auto;
  overflow: visible;
}

.qmn_question_answer .mlw_qmn_question {
  font-size: 15px;
  line-height: 1.5;
}

/* Titre de la question */
.qsm-result-question-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 12px;
}

.qsm-result-question-title b {
  font-weight: 700;
}

/* Sous-questions dans les résultats */
.qmn_question_answer .sub-question1,
.qmn_question_answer .sub-question2 {
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  margin: 12px 0 8px 0;
  padding-left: 0;
}

/* Réponses */
.qsm-text-simple-option,
.qsm-text-correct-option,
.qsm-text-wrong-option {
  display: inline-block;
      padding: 10px 25px !important;
  margin: 4px 4px 4px 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  border: 2px solid transparent;
}

/* Réponse simple (non sélectionnée) */
.qsm-text-simple-option {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

/* Réponse correcte */
.qsm-text-correct-option {
     background: #f1dfc8;
    color: #e37f00 !important;
    border-color: #e7b06a;
    font-weight: 600;
}

/* Réponse de l'utilisateur correcte */
.qsm-text-user-correct-answer {
    background: #dcfce7;
    color: green !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    border-color: green !important;
}

/* Réponse incorrecte */
.qsm-text-wrong-option {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
  font-weight: 600;
  text-decoration: line-through;
}

/* Résultat final */
.one-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  margin-top: 40px;
}

.one-line p {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 0px !important;
  color: #2d3748;
}

.big-yellow {
  font-size: 3rem !important;
  font-weight: 800 !important;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
      line-height: 50px;
}

/* Masquer les bordures inutiles */
.qsm-add-border-bottom,
.qsm-remove-border-bottom {
  border-bottom: none !important;
}

/* ==================== RESPONSIVE RÉSULTATS ==================== */

@media (max-width: 1200px) {
  .qsm_questions_answers_section {
    gap: 20px;
  }
  
  .qmn_question_answer .qsm-featured-image,
  .qmn_question_answer video {
    height: 200px;
  }
}

@media (max-width: 900px) {
  .qsm_questions_answers_section {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .qmn_question_answer .qsm-featured-image,
  .qmn_question_answer video {
    height: 250px;
  }
  
  .big-title {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .qsm-results-page {
    padding: 30px 15px;
  }
  
  .qmn_question_answer .parent-questions {
    padding: 16px;
  }
  
  .qsm-result-question-title {
    font-size: 15px;
  }
  
  .one-line {
    flex-direction: column;
    gap: 10px;
    padding: 25px;
  }
  
  .one-line p {
    font-size: 1.3rem;
  }
  
  .big-yellow {
    font-size: 2.5rem !important;
  }
}

@media (max-width: 480px) {
  .big-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }
  
  .qmn_question_answer .qsm-featured-image,
  .qmn_question_answer video {
    height: 200px;
  }
  
  .qmn_question_answer .parent-questions {
    padding: 14px;
  }
  
  .qsm-text-simple-option,
  .qsm-text-correct-option,
  .qsm-text-wrong-option {
    font-size: 12px;
    padding: 5px 10px;
  }
  
  .one-line p {
    font-size: 1.1rem;
  }
  
  .big-yellow {
    font-size: 2rem !important;
  }
}