@charset "UTF-8";
/* ========================================
   mkdocs-superquiz - THEME CLAIR
   ======================================== */
/* ========================================
   VARIABLES GÉNÉRALES
   ======================================== */
:root {
  --mkq-primary: #1976d2;
  --mkq-success: #4caf50;
  --mkq-error: #f44336;
  --mkq-warning: #ff9800;
  --mkq-bg: #ffffff;
  --mkq-border: #e0e0e0;
  --mkq-text: #212121;
  --mkq-text-secondary: #757575;
  --mkq-hover: #f5f5f5;
  --mkq-shadow: rgba(0, 0, 0, 0.1);
}

/* ========================================
   STYLES COMMUNS - TOUS LES QUIZ
   ======================================== */
.mkdocs-superquiz {
  background: var(--mkq-bg);
  border: 2px solid var(--mkq-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 4px var(--mkq-shadow);
}
.mkdocs-superquiz .admonition-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--mkq-text);
  margin-bottom: 1rem;
}
.mkdocs-superquiz .MathJax {
  margin-left: 0.4em;
  margin-right: 0.4em;
}

/* ========================================
   ICÔNES DE VERROUILLAGE
   ======================================== */
.mkq-unlock-btn,
.mkq-lock-indicator {
  background: transparent;
  border: none;
  font-size: 1.2rem;
  padding: 0.25rem 0.5rem;
  transition: transform 0.2s, opacity 0.2s;
}
.mkq-unlock-btn.unlocked,
.mkq-lock-indicator.unlocked {
  color: var(--mkq-success);
  cursor: default;
}
.mkq-unlock-btn.unlocked:hover,
.mkq-lock-indicator.unlocked:hover {
  transform: none;
}
.mkq-unlock-btn.locked,
.mkq-lock-indicator.locked {
  color: var(--mkq-warning);
  cursor: pointer;
}
.mkq-unlock-btn.locked:hover,
.mkq-lock-indicator.locked:hover {
  transform: scale(1.2);
}
.mkq-unlock-btn.locked-permanent,
.mkq-lock-indicator.locked-permanent {
  color: var(--mkq-error);
  cursor: not-allowed;
  opacity: 0.6;
}
.mkq-unlock-btn.locked-permanent:hover,
.mkq-lock-indicator.locked-permanent:hover {
  transform: none;
}

.mkq-lock-indicator {
  display: inline-block;
  cursor: default;
}

/* ========================================
   QUESTIONS
   ======================================== */
.mkq-question {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--mkq-hover);
  border-radius: 6px;
}
.mkq-question .mkq-question-text {
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
}
.mkq-question .mkq-question-text .mkq-number {
  color: var(--mkq-primary);
  font-weight: 700;
  margin-right: 0.5rem;
}
.mkq-question .mkq-answers {
  margin-left: 2rem;
}

/* ========================================
   RICH CONTENT (images, iframes, markdown)
   preamble  : before all questions in the quiz
   per-question rich content : between question text and answers
   ======================================== */
.mkq-rich-content {
  margin: 0.5rem 0 1rem 0;
  font-size: 1rem;
}
.mkq-rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
  margin: 0.5rem auto;
}
.mkq-rich-content iframe {
  max-width: 100%;
  display: block;
  margin: 0.5rem auto;
  border: none;
  border-radius: 4px;
}
.mkq-rich-content p {
  margin: 0.4rem 0;
}

/* Preamble (before all questions) gets a bit more bottom spacing */
.mkdocs-superquiz > .mkq-rich-content {
  margin-bottom: 1.25rem;
}

/* ========================================
   RÉPONSES (CHOIX)
   ======================================== */
.mkq-answer {
  display: flex;
  align-items: center;
  padding: 0.1rem;
  margin: 0.1rem 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 1rem;
}
.mkq-answer:hover {
  background: var(--mkq-border);
}
.mkq-answer input[type=checkbox],
.mkq-answer input[type=radio] {
  margin-right: 0.75rem;
  cursor: pointer;
}
.mkq-answer .mkq-answer-text {
  flex: 1;
  color: var(--mkq-text);
}
.mkq-answer .mkq-answer-feedback {
  margin-left: 0.5rem;
  font-weight: 600;
}
.mkq-answer .mkq-answer-feedback.correct {
  color: var(--mkq-success);
}
.mkq-answer .mkq-answer-feedback.correct::before {
  content: "✓ ";
}
.mkq-answer .mkq-answer-feedback.incorrect {
  color: var(--mkq-error);
}
.mkq-answer .mkq-answer-feedback.incorrect::before {
  content: "✗ ";
}
.mkq-answer.correct {
  background: rgba(76, 175, 80, 0.1);
  border-left: 3px solid var(--mkq-success);
}
.mkq-answer.incorrect {
  background: rgba(244, 67, 54, 0.1);
  border-left: 3px solid var(--mkq-error);
}

/* ========================================
   INPUTS (FILLBLANKS)
   ======================================== */
.mkq-blank-input {
  min-width: 150px;
  padding: 0.25rem 0.5rem;
  border: 2px solid var(--mkq-border);
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
}
.mkq-blank-input:focus {
  outline: none;
  border-color: var(--mkq-primary);
}
.mkq-blank-input.correct {
  border-color: var(--mkq-success);
  background: rgba(76, 175, 80, 0.05);
}
.mkq-blank-input.incorrect {
  border-color: var(--mkq-error);
  background: rgba(244, 67, 54, 0.05);
}

/* ========================================
   FILLBLANKS CORRECTIONS - CUSTOM MATHJAX SCDROPDOWN
   ======================================== */
/* Wrapper for label + scdropdown */
.mkq-blank-correction-wrapper {
  display: inline-flex;
  flex-direction: column;
  position: relative;
  min-width: 180px;
  vertical-align: middle;
  margin: 0 0.25rem;
}

/* Red strikethrough badge — floats above the scdropdown */
.mkq-blank-wrong-label {
  position: absolute;
  top: -0.7rem;
  left: 0.75rem;
  background: var(--mkq-bg);
  padding: 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mkq-error);
  z-index: 2;
  animation: mkq-slide-down 0.3s ease-out;
  opacity: 0.85;
}
.mkq-blank-wrong-label s {
  text-decoration: none;
}
.mkq-blank-wrong-label mjx-container {
  position: relative;
  display: inline-block;
}
.mkq-blank-wrong-label mjx-container::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.2em;
  right: -0.2em;
  background: linear-gradient(-45deg, transparent 0, transparent calc(50% - 2px), currentColor 50%, transparent calc(50% + 2px), transparent 100%);
  opacity: 0.7;
  pointer-events: none;
}
.mkq-blank-wrong-label:not(:has(mjx-container)) {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: currentColor;
}

/* Only when the badge contains MathJax, lift it up a bit */
.mkq-blank-wrong-label:has(mjx-container) {
  top: 0;
  transform: translateY(-67%);
}

/* Custom Select Container */
.mkq-custom-select {
  position: relative;
  width: 100%;
  display: inline-block;
}

/* Button */
.mkq-custom-select-btn {
  width: 100%;
  text-align: left;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 2px solid var(--mkq-success);
  border-radius: 6px;
  background: rgba(76, 175, 80, 0.05);
  color: var(--mkq-text);
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(76, 175, 80, 0.15);
  transition: all 0.2s;
}
.mkq-custom-select-btn:hover {
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.25);
}
.mkq-custom-select-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.mkq-custom-select-value {
  display: inline-block;
  min-height: 1.2em;
}

/* Arrow */
.mkq-custom-select-arrow {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--mkq-success);
  font-size: 1rem;
  pointer-events: none;
  transition: transform 0.2s;
}

.mkq-custom-select[aria-expanded=true] .mkq-custom-select-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* Listbox */
.mkq-custom-select-listbox {
  position: absolute;
  z-index: 100;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  border: 2px solid var(--mkq-success);
  background: var(--mkq-bg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  display: none;
  max-height: 240px;
  overflow-y: auto;
}

.mkq-custom-select[aria-expanded=true] .mkq-custom-select-listbox {
  display: block;
}

/* Options */
.mkq-custom-select-option {
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}
.mkq-custom-select-option:hover {
  background: rgba(76, 175, 80, 0.1);
}
.mkq-custom-select-option[aria-selected=true] {
  background: rgba(76, 175, 80, 0.2);
  font-weight: 500;
}

/* Animation */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Correct input styling */
.mkq-blank-input.correct {
  border-color: var(--mkq-success);
  background: rgba(76, 175, 80, 0.05);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* ========================================
   CUSTOM SCDROPDOWN (MathJax compatible)
   ======================================== */
.mkq-custom-scdropdown {
  display: inline-block;
  position: relative;
  min-width: 200px;
  vertical-align: middle;
  margin: 0 0.5rem;
}

.mkq-custom-scdropdown-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--mkq-border);
  border-radius: 6px;
  background: var(--mkq-bg);
  color: var(--mkq-text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.mkq-custom-scdropdown-btn:hover {
  border-color: var(--mkq-primary);
}

.mkq-custom-scdropdown-value {
  flex: 1;
  text-align: left;
}

.mkq-custom-scdropdown-arrow {
  margin-left: 0.5rem;
  color: var(--mkq-text-secondary);
}

.mkq-custom-scdropdown-options {
  display: none;
  position: absolute;
  z-index: 100;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0;
  background: var(--mkq-bg);
  border: 2px solid var(--mkq-border);
  border-radius: 6px;
  box-shadow: 0 4px 12px var(--mkq-shadow);
  max-height: 300px;
  overflow-y: auto;
}

.mkq-custom-scdropdown-option {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}
.mkq-custom-scdropdown-option:hover {
  background: var(--mkq-hover);
}
.mkq-custom-scdropdown-option.selected {
  background: rgba(25, 118, 210, 0.1);
  font-weight: 500;
}

.mkq-custom-scdropdown.correct .mkq-custom-scdropdown-btn {
  border-color: var(--mkq-success);
  background: rgba(76, 175, 80, 0.05);
}

.mkq-custom-scdropdown.incorrect .mkq-custom-scdropdown-btn {
  border-color: var(--mkq-error);
  background: rgba(244, 67, 54, 0.05);
}

/* Dropdown correction wrapper - mirrors fillblanks style */
.mkq-scdropdown-correction-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  position: relative;
}

.mkq-custom-scdropdown.correct .mkq-custom-scdropdown-btn {
  border-color: var(--mkq-correct-color, #4caf50);
  background-color: var(--mkq-correct-bg, #e8f5e9);
  color: var(--mkq-correct-color, #2e7d32);
}

.mkq-custom-scdropdown.incorrect .mkq-custom-scdropdown-btn {
  border-color: var(--mkq-incorrect-color, #f44336);
  background-color: var(--mkq-incorrect-bg, #ffebee);
  color: var(--mkq-incorrect-color, #c62828);
}

/* ========================================
   CUSTOM MCDROPDOWN (choix multiples inline)
   ======================================== */
.mkq-custom-mcdropdown {
  display: inline-block;
  position: relative;
  min-width: 200px;
  vertical-align: middle;
  margin: 0 0.5rem;
}

.mkq-custom-mcdropdown-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--mkq-border);
  border-radius: 6px;
  background: var(--mkq-bg);
  color: var(--mkq-text);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.mkq-custom-mcdropdown-btn:hover {
  border-color: var(--mkq-primary);
}

.mkq-custom-mcdropdown-value {
  flex: 1;
  text-align: left;
}

.mkq-custom-mcdropdown-arrow {
  margin-left: 0.5rem;
  color: var(--mkq-text-secondary);
}

.mkq-custom-mcdropdown-options {
  display: none;
  position: absolute;
  z-index: 100;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0;
  background: var(--mkq-bg);
  border: 2px solid var(--mkq-border);
  border-radius: 6px;
  box-shadow: 0 4px 12px var(--mkq-shadow);
  max-height: 300px;
  overflow-y: auto;
}

.mkq-custom-mcdropdown-option {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}
.mkq-custom-mcdropdown-option:hover {
  background: var(--mkq-hover);
}
.mkq-custom-mcdropdown-option.selected {
  background: rgba(25, 118, 210, 0.15);
  font-weight: 500;
}
.mkq-custom-mcdropdown-option.selected::before {
  content: "✓ ";
  color: var(--mkq-primary);
  font-weight: 700;
}

.mkq-custom-mcdropdown.correct .mkq-custom-mcdropdown-btn {
  border-color: var(--mkq-success);
  background-color: rgba(76, 175, 80, 0.05);
}

.mkq-custom-mcdropdown.incorrect .mkq-custom-mcdropdown-btn {
  border-color: var(--mkq-error);
  background-color: rgba(244, 67, 54, 0.05);
}

/* Correction wrapper mcdropdown */
.mkq-mcdropdown-correction-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  position: relative;
}

/* ========================================
   ACTIONS ET SCORE
   ======================================== */
.quiz-actions {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--mkq-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.quiz-actions .mkq-validate-btn {
  background: var(--mkq-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s, transform 0.1s;
  position: relative;
  z-index: 3;
}
.quiz-actions .mkq-validate-btn:hover {
  background: rgb(19.5744680851, 92.3914893617, 164.4255319149);
  transform: translateY(-2px);
}
.quiz-actions .mkq-validate-btn:active {
  transform: translateY(0);
}
.quiz-actions .mkq-score {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
}
.quiz-actions .mkq-score.good {
  color: var(--mkq-success);
  background: rgba(76, 175, 80, 0.1);
}
.quiz-actions .mkq-score.medium {
  color: var(--mkq-warning);
  background: rgba(255, 152, 0, 0.1);
}
.quiz-actions .mkq-score.bad {
  color: var(--mkq-error);
  background: rgba(244, 67, 54, 0.1);
}

/* ========================================
   MODAL DE DÉBLOCAGE
   ======================================== */
.mkq-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.mkq-modal.active {
  display: flex;
}
.mkq-modal .mkq-modal-content {
  background: var(--mkq-bg);
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 20px var(--mkq-shadow);
  position: relative;
}
.mkq-modal .mkq-modal-content h3 {
  margin-top: 0;
  color: var(--mkq-text);
}
.mkq-modal .mkq-modal-content .qr-code-section {
  text-align: center;
  margin: 1.5rem 0;
}
.mkq-modal .mkq-modal-content .qr-code-section #qr-code-container {
  display: inline-block;
  padding: 1rem;
  background: white;
  border-radius: 8px;
}
.mkq-modal .mkq-modal-content .unlock-input-section {
  margin-top: 1.5rem;
}
.mkq-modal .mkq-modal-content .unlock-input-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--mkq-text);
}
.mkq-modal .mkq-modal-content .unlock-input-section input[type=text] {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--mkq-border);
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.mkq-modal .mkq-modal-content .unlock-input-section input[type=text]:focus {
  outline: none;
  border-color: var(--mkq-primary);
}
.mkq-modal .mkq-modal-content .unlock-input-section button {
  width: 100%;
  background: var(--mkq-primary);
  color: white;
  border: none;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}
.mkq-modal .mkq-modal-content .unlock-input-section button:hover {
  background: rgb(19.5744680851, 92.3914893617, 164.4255319149);
}
.mkq-modal .mkq-modal-content .mkq-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--mkq-text-secondary);
}
.mkq-modal .mkq-modal-content .mkq-modal-close:hover {
  color: var(--mkq-text);
}

/* ========================================
   SECTION MCQUIZ - CHOIX MULTIPLES
   ======================================== */
.mkdocs-superquiz[data-quiz-type=mcquiz] {
  border-color: #2196f3;
}
.mkdocs-superquiz[data-quiz-type=mcquiz] .admonition-title {
  color: #2196f3;
}
.mkdocs-superquiz[data-quiz-type=mcquiz] .mkq-number {
  color: #2196f3;
}

/* ========================================
   SECTION SCQUIZ - CHOIX UNIQUE
   ======================================== */
.mkdocs-superquiz[data-quiz-type=scquiz] {
  border-color: #ff9800;
}
.mkdocs-superquiz[data-quiz-type=scquiz] .admonition-title {
  color: #ff9800;
}
.mkdocs-superquiz[data-quiz-type=scquiz] .mkq-number {
  color: #ff9800;
}

/* ========================================
   SECTION FILLBLANKS - À TROUS
   ======================================== */
.mkdocs-superquiz[data-quiz-type=fillblanks] {
  border-color: #9c27b0;
}
.mkdocs-superquiz[data-quiz-type=fillblanks] .admonition-title {
  color: #9c27b0;
}
.mkdocs-superquiz[data-quiz-type=fillblanks] .mkq-number {
  color: #9c27b0;
}
.mkdocs-superquiz[data-quiz-type=fillblanks] .mkq-blank-input {
  display: inline-block;
  margin: 0 0.25rem;
  vertical-align: baseline;
}

/* ========================================
   SECTION SCDROPDOWN
   ======================================== */
.mkdocs-superquiz[data-quiz-type=scdropdown] {
  border-color: #00897b;
}
.mkdocs-superquiz[data-quiz-type=scdropdown] .admonition-title {
  color: #00897b;
}
.mkdocs-superquiz[data-quiz-type=scdropdown] .mkq-number {
  color: #00897b;
}

/* ========================================
   SECTION MCDROPDOWN
   ======================================== */
.mkdocs-superquiz[data-quiz-type=mcdropdown] {
  border-color: #e91e63;
}
.mkdocs-superquiz[data-quiz-type=mcdropdown] .admonition-title {
  color: #e91e63;
}
.mkdocs-superquiz[data-quiz-type=mcdropdown] .mkq-number {
  color: #e91e63;
}

/* ========================================
   CORRECTIONS
   ======================================== */
.mkq-question-correction {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(33, 150, 243, 0.05);
  border-left: 4px solid var(--mkq-primary);
  border-radius: 4px;
}
.mkq-question-correction::before {
  content: "💡 Correction : ";
  font-weight: 600;
  color: var(--mkq-primary);
}

/* ========================================
   PAGE BUTTONS (Unlock All + Reset All)
   dans le <h1> de la page
   ======================================== */
.mkq-page-buttons {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.md-content h1:has(.mkq-page-buttons) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.mkq-refresh-page-btn,
.mkq-unlock-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.mkq-refresh-page-btn:active,
.mkq-unlock-page-btn:active {
  transform: translateY(0);
}
.mkq-refresh-page-btn .mkq-btn-icon,
.mkq-unlock-page-btn .mkq-btn-icon {
  font-size: 1.2em;
  line-height: 1;
}
.mkq-refresh-page-btn .mkq-btn-text,
.mkq-unlock-page-btn .mkq-btn-text {
  line-height: 1;
}

.mkq-unlock-page-btn {
  background: var(--mkq-primary);
}
.mkq-unlock-page-btn:hover {
  background: #1565c0;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mkq-refresh-page-btn {
  background: var(--mkq-success);
}
.mkq-refresh-page-btn:hover {
  background: #43a047;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ========================================
   HEADER BUTTONS (icônes uniquement dans le nav)
   ======================================== */
.mkq-header-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
}

.mkq-header-unlock-btn,
.mkq-header-refresh-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 6px;
  border-radius: 4px;
  line-height: 1;
  opacity: 0.75;
  transition: opacity 0.2s, background 0.2s;
}
.mkq-header-unlock-btn:hover,
.mkq-header-refresh-btn:hover {
  opacity: 1;
  background: rgba(128, 128, 128, 0.2);
}

.mkq-header-refresh-btn {
  filter: hue-rotate(150deg) saturate(3) brightness(0.9);
}

/* ========================================
   SECTION ORDERQUIZ — DRAG & DROP
   ======================================== */
/* Couleur accent orderquiz */
.mkdocs-superquiz[data-quiz-type=orderquiz] {
  border-color: #f57c00;
}
.mkdocs-superquiz[data-quiz-type=orderquiz] .admonition-title {
  color: #f57c00;
}
.mkdocs-superquiz[data-quiz-type=orderquiz] .mkq-number {
  color: #f57c00;
}

/* Conteneur des items */
.mkq-order-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0;
  min-height: 2rem;
}

/* Bloc draggable */
.mkq-order-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--mkq-bg);
  border: 2px solid var(--mkq-border);
  border-radius: 8px;
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s, opacity 0.15s;
}
.mkq-order-item:hover {
  border-color: #f57c00;
  box-shadow: 0 2px 8px rgba(245, 124, 0, 0.15);
}
.mkq-order-item:active {
  cursor: grabbing;
}
.mkq-order-item {
  /* En cours de drag — desktop */
}
.mkq-order-item.dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.mkq-order-item {
  /* Cible du drop */
}
.mkq-order-item.drag-over {
  border-color: #f57c00;
  background: rgba(245, 124, 0, 0.07);
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(245, 124, 0, 0.25);
}
.mkq-order-item {
  /* Après correction */
}
.mkq-order-item.correct {
  border-color: var(--mkq-success);
  background: rgba(76, 175, 80, 0.08);
}
.mkq-order-item.incorrect {
  border-color: var(--mkq-error);
  background: rgba(244, 67, 54, 0.08);
}

/* Poignée de drag */
.mkq-order-handle {
  color: var(--mkq-text-secondary);
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  cursor: grab;
  opacity: 0.6;
}
.mkq-order-item:hover .mkq-order-handle {
  opacity: 1;
}

/* Texte de l'item (peut contenir MathJax) */
.mkq-order-text {
  flex: 1;
  color: var(--mkq-text);
  font-size: 1rem;
}

/* Badge position correcte (affiché après validation si incorrect) */
.mkq-order-position-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--mkq-error);
  flex-shrink: 0;
  min-width: 2rem;
  text-align: right;
}

/* Clone fantôme touch */
.mkq-order-ghost {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: #f57c00 !important;
  background: var(--mkq-bg) !important;
}

.mkq-order-placeholder {
  background: rgba(245, 124, 0, 0.15);
  border: 2px dashed #f57c00;
  border-radius: 6px;
  margin: 4px 0;
  pointer-events: none;
  transition: height 0.1s ease;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .mkdocs-superquiz {
    padding: 1rem;
  }
  .mkq-question {
    padding: 0.75rem;
  }
  .mkq-answers {
    margin-left: 1rem;
  }
  .quiz-actions {
    flex-direction: column;
    gap: 1rem;
  }
  .quiz-actions .mkq-validate-btn,
  .quiz-actions .mkq-score {
    width: 100%;
  }
  .mkq-modal-content {
    padding: 1.5rem;
  }
  .md-content h1:has(.mkq-page-buttons) {
    flex-direction: column;
    align-items: flex-start;
  }
  .mkq-page-buttons {
    align-self: stretch;
    width: 100%;
  }
  .mkq-page-buttons button {
    flex: 1;
  }
  .mkq-rich-content iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }
}