#cuf-diagnostic-quiz,
#cuf-diagnostic-quiz *,
#cuf-diagnostic-quiz *::before,
#cuf-diagnostic-quiz *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}


#cuf-diagnostic-quiz {
  --cuf-red: #E42F28;
  --cuf-red-hover: #C9261F;
  --cuf-navy: #384693;
  --cuf-navy-light: #4A5AA8;
  --cuf-blue: #384693;
  --cuf-white: #FFFFFF;
  --cuf-offwhite: #F8F7F4;
  --cuf-gray: #6B7280;
  --cuf-gray-light: #E5E7EB;
  --cuf-gray-lighter: #F3F4F6;
  --cuf-text: #1F2937;
  --cuf-success: #059669;
  --cuf-warning: #D97706;
  --cuf-error: #DC2626;
  --shadow-sm: 0 1px 3px rgba(56,70,147,0.08);
  --shadow-md: 0 4px 16px rgba(56,70,147,0.1);
  --shadow-lg: 0 8px 32px rgba(56,70,147,0.12);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Lato', -apple-system, sans-serif;
  color: var(--cuf-text);
  background: var(--cuf-offwhite);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === PROGRESS BAR === */
#cuf-diagnostic-quiz .progress-container {
  background: var(--cuf-gray-light);
  height: 5px;
  width: 95%;
  position: sticky;
  top: 15px;
  z-index: 99;
  margin: 0 auto;
}
#cuf-diagnostic-quiz .progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--cuf-red), #E85D6A);
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 3px 3px 0;
}

/* === MAIN CONTAINER === */
#cuf-diagnostic-quiz .quiz-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
  min-height: calc(100vh - 57px);
  display: flex;
  flex-direction: column;
}

/* === SCREENS === */
#cuf-diagnostic-quiz .screen {
  display: none;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 0.4s ease-out;
}
#cuf-diagnostic-quiz .screen.active { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === INTRO SCREEN === */
#cuf-diagnostic-quiz .intro-screen {
  text-align: center;
  padding: 48px 0 40px;
}
#cuf-diagnostic-quiz .intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(228, 47, 40, 0.08);
  color: var(--cuf-red);
  font-weight: 600;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
#cuf-diagnostic-quiz .intro-title {
  font-family: 'Lato', sans-serif;
  font-size: clamp(30px, 5vw, 42px);
  color: var(--cuf-navy);
  line-height: 1.2;
  margin-bottom: 8px;
  font-weight: 900;
}
#cuf-diagnostic-quiz .intro-title em {
  color: var(--cuf-red);
  font-style: italic;
}
#cuf-diagnostic-quiz .intro-subtitle {
  font-size: 19px;
  color: var(--cuf-gray);
  margin-bottom: 32px;
  line-height: 1.5;
  font-weight: 300;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
#cuf-diagnostic-quiz .intro-card {
  background: var(--cuf-white);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow-md);
  text-align: left;
  margin-bottom: 32px;
  width: 100%;
  border: 1px solid rgba(56,70,147,0.06);
}
#cuf-diagnostic-quiz .intro-card h3 {
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  color: var(--cuf-navy);
  margin-bottom: 20px;
}
#cuf-diagnostic-quiz .intro-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
#cuf-diagnostic-quiz .intro-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15.5px;
  color: var(--cuf-text);
  line-height: 1.45;
}
#cuf-diagnostic-quiz .intro-card li svg {
  flex-shrink: 0;
  margin-top: 3px;
}
#cuf-diagnostic-quiz .intro-time {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--cuf-gray);
  font-size: 14px;
  margin-bottom: 28px;
}

/* === BUTTONS === */
#cuf-diagnostic-quiz .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--cuf-red);
  color: white;
  border: none;
  padding: 16px 40px;
  font-size: 17px;
  font-weight: 600;
  font-family: 'Lato', sans-serif;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(228, 47, 40, 0.25);
}
#cuf-diagnostic-quiz .btn-primary:hover {
  background: var(--cuf-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(228, 47, 40, 0.35);
}
#cuf-diagnostic-quiz .btn-primary:active { transform: translateY(0); }

#cuf-diagnostic-quiz .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--cuf-navy);
  border: 2px solid var(--cuf-gray-light);
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Lato', sans-serif;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}
#cuf-diagnostic-quiz .btn-secondary:hover {
  border-color: var(--cuf-navy);
  background: rgba(56,70,147,0.03);
}

/* === QUESTION SCREEN === */
#cuf-diagnostic-quiz .question-screen { padding: 36px 0 40px; width: 100%; }

#cuf-diagnostic-quiz .question-counter {
  font-size: 13px;
  color: var(--cuf-gray);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: center;
}
#cuf-diagnostic-quiz .question-text {
  font-family: 'Lato', sans-serif;
  font-size: clamp(22px, 4vw, 28px);
  color: var(--cuf-navy);
  text-align: center;
  line-height: 1.35;
  margin-bottom: 28px;
  font-weight: 600;
}

/* === AUDIO PLAYER === */
#cuf-diagnostic-quiz .audio-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  width: 100%;
}
#cuf-diagnostic-quiz .audio-profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--cuf-white);
  box-shadow: var(--shadow-sm);
}
#cuf-diagnostic-quiz .audio-wrapper {
  background: var(--cuf-white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(56,70,147,0.06);
  display: flex;
  align-items: center;
  gap: 16px;
}
#cuf-diagnostic-quiz .play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cuf-navy);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(56,70,147,0.2);
}
#cuf-diagnostic-quiz .play-btn:hover {
  background: var(--cuf-navy-light);
  transform: scale(1.05);
}
#cuf-diagnostic-quiz .play-btn svg { transition: var(--transition); }
#cuf-diagnostic-quiz .play-btn.playing { background: var(--cuf-red); box-shadow: 0 2px 8px rgba(228,47,40,0.3); }

#cuf-diagnostic-quiz .audio-info { flex: 1; }
#cuf-diagnostic-quiz .audio-label {
  font-size: 13px;
  color: var(--cuf-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 4px;
}
#cuf-diagnostic-quiz .audio-hint {
  font-size: 15px;
  color: var(--cuf-text);
  line-height: 1.4;
}
#cuf-diagnostic-quiz .audio-wave {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
  margin-top: 8px;
}
#cuf-diagnostic-quiz .audio-wave span {
  width: 3px;
  background: var(--cuf-gray-light);
  border-radius: 2px;
  transition: all 0.15s ease;
}
#cuf-diagnostic-quiz .audio-wave.active span {
  animation: wave 0.6s ease-in-out infinite alternate;
  background: var(--cuf-red);
}
@keyframes wave {
  from { height: 4px; }
  to { height: 20px; }
}
#cuf-diagnostic-quiz .audio-wave span:nth-child(1) { height: 8px; animation-delay: 0s; }
#cuf-diagnostic-quiz .audio-wave span:nth-child(2) { height: 14px; animation-delay: 0.1s; }
#cuf-diagnostic-quiz .audio-wave span:nth-child(3) { height: 6px; animation-delay: 0.2s; }
#cuf-diagnostic-quiz .audio-wave span:nth-child(4) { height: 18px; animation-delay: 0.05s; }
#cuf-diagnostic-quiz .audio-wave span:nth-child(5) { height: 10px; animation-delay: 0.15s; }
#cuf-diagnostic-quiz .audio-wave span:nth-child(6) { height: 16px; animation-delay: 0.25s; }
#cuf-diagnostic-quiz .audio-wave span:nth-child(7) { height: 7px; animation-delay: 0.08s; }
#cuf-diagnostic-quiz .audio-wave span:nth-child(8) { height: 12px; animation-delay: 0.18s; }
#cuf-diagnostic-quiz .audio-wave span:nth-child(9) { height: 5px; animation-delay: 0.22s; }
#cuf-diagnostic-quiz .audio-wave span:nth-child(10) { height: 15px; animation-delay: 0.12s; }

#cuf-diagnostic-quiz .replay-hint {
  font-size: 13px;
  color: var(--cuf-gray);
  text-align: center;
  margin-top: -16px;
  margin-bottom: 20px;
  font-style: italic;
}

#cuf-diagnostic-quiz .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#cuf-diagnostic-quiz .audio-status {
  font-size: 14px;
  color: var(--cuf-error);
  margin-top: 8px;
  line-height: 1.4;
  min-height: 0;
}
#cuf-diagnostic-quiz .audio-status:not(:empty) {
  min-height: 1.4em;
}

#cuf-diagnostic-quiz .play-btn:focus-visible {
  outline: 3px solid var(--cuf-navy);
  outline-offset: 3px;
}

/* === ANSWER OPTIONS === */
#cuf-diagnostic-quiz .options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
#cuf-diagnostic-quiz .option-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: var(--cuf-white);
  border: 2px solid var(--cuf-gray-light);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 16.5px;
  font-family: 'Lato', sans-serif;
  color: var(--cuf-text);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  line-height: 1.4;
}
#cuf-diagnostic-quiz .option-btn:hover:not(.disabled) {
  border-color: var(--cuf-blue);
  background: rgba(58, 91, 160, 0.03);
  transform: translateX(3px);
}
#cuf-diagnostic-quiz .option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cuf-gray-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--cuf-gray);
  flex-shrink: 0;
  transition: var(--transition);
}
#cuf-diagnostic-quiz .option-btn:hover:not(.disabled) .option-letter {
  background: var(--cuf-blue);
  color: white;
}
#cuf-diagnostic-quiz .option-btn.correct {
  border-color: var(--cuf-success);
  background: rgba(5, 150, 105, 0.05);
}
#cuf-diagnostic-quiz .option-btn.correct .option-letter {
  background: var(--cuf-success);
  color: white;
}
#cuf-diagnostic-quiz .option-btn.wrong {
  border-color: var(--cuf-error);
  background: rgba(220, 38, 38, 0.04);
}
#cuf-diagnostic-quiz .option-btn.wrong .option-letter {
  background: var(--cuf-error);
  color: white;
}
#cuf-diagnostic-quiz .option-btn.disabled {
  cursor: default;
  opacity: 0.5;
}
#cuf-diagnostic-quiz .option-btn.disabled.correct,
#cuf-diagnostic-quiz .option-btn.disabled.wrong { opacity: 1; }

/* === FEEDBACK === */
#cuf-diagnostic-quiz .feedback-box {
  display: none;
  margin-top: 20px;
  padding: 20px 24px;
  border-radius: var(--radius);
  width: 100%;
  animation: scaleIn 0.3s ease-out;
  line-height: 1.55;
}
#cuf-diagnostic-quiz .feedback-box.visible { display: block; }
#cuf-diagnostic-quiz .feedback-box.correct-feedback {
  background: rgba(5, 150, 105, 0.06);
  border: 1px solid rgba(5, 150, 105, 0.15);
}
#cuf-diagnostic-quiz .feedback-box.wrong-feedback {
  background: rgba(228, 47, 40, 0.05);
  border: 1px solid rgba(228, 47, 40, 0.12);
}
#cuf-diagnostic-quiz .feedback-label {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}
#cuf-diagnostic-quiz .correct-feedback .feedback-label { color: var(--cuf-success); }
#cuf-diagnostic-quiz .wrong-feedback .feedback-label { color: var(--cuf-red); }
#cuf-diagnostic-quiz .feedback-text {
  font-size: 15.5px;
  color: var(--cuf-text);
}
#cuf-diagnostic-quiz .feedback-french {
  font-family: 'Lato', sans-serif;
  font-style: italic;
  color: var(--cuf-navy);
}
#cuf-diagnostic-quiz .next-btn-wrapper {
  display: none;
  margin-top: 24px;
  text-align: center;
  width: 100%;
  animation: slideUp 0.3s ease-out;
}
#cuf-diagnostic-quiz .next-btn-wrapper.visible { display: block; }

/* === RESULTS SCREEN === */
#cuf-diagnostic-quiz .results-screen {
  padding: 40px 0;
  width: 100%;
  text-align: center;
}
#cuf-diagnostic-quiz .results-score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--cuf-white);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  border: 4px solid var(--cuf-navy);
  animation: scaleIn 0.5s ease-out;
}
#cuf-diagnostic-quiz .results-score-num {
  font-family: 'Lato', sans-serif;
  font-size: 44px;
  font-weight: 700;
  color: var(--cuf-navy);
  line-height: 1;
}
#cuf-diagnostic-quiz .results-score-label {
  font-size: 13px;
  color: var(--cuf-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
#cuf-diagnostic-quiz .results-profile-name {
  font-family: 'Lato', sans-serif;
  font-size: clamp(26px, 4.5vw, 34px);
  color: var(--cuf-navy);
  font-weight: 700;
  margin-bottom: 8px;
}
#cuf-diagnostic-quiz .results-profile-desc {
  font-size: 17px;
  color: var(--cuf-gray);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.55;
  font-weight: 300;
}

#cuf-diagnostic-quiz .gap-preview {
  background: var(--cuf-white);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  width: 100%;
  margin-bottom: 28px;
  border: 1px solid rgba(56,70,147,0.06);
}
#cuf-diagnostic-quiz .gap-preview h3 {
  font-family: 'Lato', sans-serif;
  font-size: 18px;
  color: var(--cuf-navy);
  margin-bottom: 16px;
}
#cuf-diagnostic-quiz .gap-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--cuf-gray-lighter);
  animation: slideUp 0.3s ease-out backwards;
}
#cuf-diagnostic-quiz .gap-item:last-child { border-bottom: none; }
#cuf-diagnostic-quiz .gap-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
#cuf-diagnostic-quiz .gap-icon.miss { background: rgba(228,47,40,0.1); }
#cuf-diagnostic-quiz .gap-icon.hit { background: rgba(5,150,105,0.1); }
#cuf-diagnostic-quiz .gap-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--cuf-text);
}
#cuf-diagnostic-quiz .gap-teaser {
  font-size: 14px;
  color: var(--cuf-gray);
  margin-top: 2px;
  line-height: 1.4;
}

/* === EMAIL GATE === */
#cuf-diagnostic-quiz .email-gate {
  background: var(--cuf-navy);
  border-radius: var(--radius);
  padding: 32px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
#cuf-diagnostic-quiz .email-gate h3 {
  font-family: 'Lato', sans-serif;
  color: var(--cuf-white);
  font-size: 22px;
  margin-bottom: 8px;
}
#cuf-diagnostic-quiz .email-gate p {
  color: rgba(255,255,255,0.7);
  font-size: 15px;
  margin-bottom: 20px;
  line-height: 1.5;
}
#cuf-diagnostic-quiz .email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  margin: 0 auto;
}
#cuf-diagnostic-quiz .email-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
#cuf-diagnostic-quiz .email-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--cuf-white);
}
#cuf-diagnostic-quiz .email-field-error {
  display: none;
  font-size: 13px;
  font-weight: 600;
  color: #FCA5A5;
  line-height: 1.35;
}
#cuf-diagnostic-quiz .email-field-error.visible {
  display: block;
}
#cuf-diagnostic-quiz .email-input.input-error {
  border-color: #FCA5A5;
  box-shadow: 0 0 0 2px rgba(252, 165, 165, 0.35);
}
#cuf-diagnostic-quiz .email-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: #FFFFFF;
  color: #333333;
  font-size: 16px;
  font-family: 'Lato', sans-serif;
  transition: var(--transition);
}
#cuf-diagnostic-quiz .email-input::placeholder { color: #999999; }
#cuf-diagnostic-quiz .email-input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.4);
  background: #FFFFFF;
}
#cuf-diagnostic-quiz .email-submit {
  background: var(--cuf-red);
  color: white;
  border: none;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: 'Lato', sans-serif;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
}
#cuf-diagnostic-quiz .email-submit:hover:not(:disabled) { background: var(--cuf-red-hover); }
#cuf-diagnostic-quiz .email-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
#cuf-diagnostic-quiz .email-submit:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}
#cuf-diagnostic-quiz .email-consent {
  font-size: 12.5px;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
  line-height: 1.4;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  #cuf-diagnostic-quiz .quiz-container { padding: 0 16px; }
  #cuf-diagnostic-quiz .intro-card { padding: 20px; }
  #cuf-diagnostic-quiz .audio-row {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  #cuf-diagnostic-quiz .audio-profile-img {
    width: 120px;
    height: 120px;
  }
  #cuf-diagnostic-quiz .audio-wrapper {
    width: 100%;
    padding: 16px;
    flex-direction: column;
    text-align: center;
  }
  #cuf-diagnostic-quiz .audio-wave {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
  #cuf-diagnostic-quiz .option-btn { padding: 14px 16px; font-size: 15.5px; }
  #cuf-diagnostic-quiz .email-gate { padding: 24px 20px; }
  #cuf-diagnostic-quiz .gap-preview { padding: 20px; }
}