/* Page Quiz – styles spécifiques */

/* Page centrée sur le quiz : pas de header ni de footer du site */
.quiz-body {
  padding-top: 0;
}

/* Wrapper avec le background partagé des pages programmes */
.quiz-page-wrapper {
  background: linear-gradient(169deg, #E8F5E1 -1.09%, #EFE3D2 47.74%, #DDE9F5 100.12%);
  min-height: 100vh;
  padding-top: 16px;
}

/* Barre du quiz : retour au site et titre */
.quiz-bar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 36px;
  background: #FFF;
  border-radius: 20px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.05);
}

.quiz-bar-back {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F90;
  color: #FFF;
  transition: all 0.3s ease;
}

.quiz-bar-back:hover {
  background: #E68500;
  transform: translateX(-2px);
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.4);
}

.quiz-bar-back svg {
  width: 20px;
  height: 20px;
}

.quiz-bar-title {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  font-size: 24px;
  font-weight: 700;
  color: #172735;
  line-height: 34px;
  text-align: center;
}

.quiz-bar-deco {
  flex-shrink: 0;
  width: 48px;
  height: auto;
  opacity: 0.9;
}

/* Équilibre le bouton retour pour centrer le titre */
.quiz-bar-spacer {
  flex-shrink: 0;
  width: 40px;
}

.quiz-section {
  padding: 40px 0 80px;
  margin: 0;
  overflow-x: hidden;
}

.quiz-shell {
  max-width: 720px;
  margin: 0 auto;
}

/* En-tête */
.quiz-header {
  text-align: center;
  margin-bottom: 38px;
}

.quiz-title {
  font-size: 40px;
  font-weight: 700;
  color: #172735;
  margin: 0 0 12px 0;
  line-height: 54px;
}

.quiz-description {
  font-size: 14px;
  line-height: 27px;
  color: #223245;
  margin: 0 auto;
  max-width: 600px;
}

.quiz-empty-action {
  display: flex;
  justify-content: center;
}

/* Progression */
.quiz-progress {
  margin-bottom: 24px;
}

.quiz-progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 27px;
}

.quiz-progress-step {
  color: #5B6878;
}

.quiz-progress-score {
  color: #172735;
}

.quiz-progress-track {
  height: 8px;
  border-radius: 30px;
  background: #FFF;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  width: 0;
  border-radius: 30px;
  background: #F90;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Carte question / résultat */
.quiz-card {
  background: #FFF;
  border-radius: 20px;
  border: 2px solid #E8F5E1;
  padding: 36px 40px 40px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.05);
}

.quiz-question-title {
  font-size: 20px;
  font-weight: 700;
  color: #172735;
  line-height: 32px;
  text-align: center;
  margin: 0 0 28px 0;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quiz-option {
  width: 100%;
  text-align: left;
  border-radius: 15px;
  border: 1px solid #E2E7EA;
  background: #FFF;
  padding: 14px 20px;
  color: #172735;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  cursor: pointer;
  transition: all .25s ease-in;
}

.quiz-option:hover:not(:disabled) {
  border-color: #F90;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.15);
}

.quiz-option:focus-visible {
  outline: 2px solid #F90;
  outline-offset: 2px;
}

.quiz-option:disabled {
  cursor: default;
}

.quiz-option.is-correct {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #065F46;
  font-weight: 600;
}

.quiz-option.is-wrong {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #991B1B;
  font-weight: 600;
}

.quiz-option.is-muted {
  color: #5B6878;
  opacity: 0.6;
}

/* Encart « Le saviez-vous ? » */
.quiz-fact {
  margin-top: 24px;
  border-radius: 15px;
  border: 1px solid rgba(255, 153, 0, 0.35);
  background: rgba(255, 153, 0, 0.08);
  padding: 18px 22px;
}

.quiz-fact-title {
  font-size: 14px;
  font-weight: 700;
  color: #E68500;
  line-height: 24px;
  margin: 0 0 4px 0;
}

.quiz-fact-text {
  font-size: 14px;
  line-height: 24px;
  color: #172735;
  margin: 0;
}

/* Boutons */
.btn-quiz-primary {
  display: inline-block;
  background: #F90;
  border: 1px solid #F90;
  border-radius: 30px;
  padding: 11px 40px;
  line-height: 28px;
  color: #FFF;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(255, 153, 0, 0.3);
}

.btn-quiz-primary:hover:not(:disabled) {
  background: #E68500;
  border-color: #E68500;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.4);
}

.btn-quiz-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-quiz-next {
  width: 100%;
  margin-top: 28px;
}

.btn-quiz-outline {
  display: inline-block;
  border-radius: 30px;
  border: 1px solid #1D252B;
  padding: 11px 40px;
  line-height: 28px;
  color: #1D252B;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  background: transparent;
  cursor: pointer;
  transition: all .25s ease-in;
}

.btn-quiz-outline:hover {
  background: #1D252B;
  color: #FFF;
}

.btn-quiz-outline--muted {
  border-color: #E2E7EA;
  color: #5B6878;
}

.btn-quiz-outline--muted:hover {
  background: #E2E7EA;
  color: #172735;
}

/* Résultat : profil */
.quiz-profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}

.quiz-profile-emoji {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 20px;
  background: #E8F5E1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  line-height: 1;
}

.quiz-profile-title {
  font-size: 24px;
  font-weight: 700;
  color: #172735;
  line-height: 34px;
  margin: 0;
}

.quiz-profile-tagline {
  font-size: 14px;
  font-weight: 600;
  font-style: italic;
  color: #F90;
  line-height: 27px;
  margin: 0 0 8px 0;
}

.quiz-badge {
  display: inline-block;
  border-radius: 30px;
  padding: 2px 14px;
  font-size: 12px;
  font-weight: 600;
  line-height: 24px;
}

.quiz-badge-score {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.quiz-profile-headline {
  border-radius: 15px;
  background: #E8F5E1;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  color: #172735;
  text-align: center;
  margin: 0 0 20px 0;
}

.quiz-profile-description {
  font-size: 14px;
  line-height: 28px;
  color: #172735;
  margin: 0 0 20px 0;
}

.quiz-profile-note {
  border-radius: 15px;
  border: 1px solid #E2E7EA;
  padding: 14px 20px;
  font-size: 14px;
  line-height: 24px;
  color: #223245;
  margin-bottom: 14px;
}

.quiz-profile-note-label {
  font-weight: 700;
}

.quiz-profile-note-label--strength {
  color: #065F46;
}

.quiz-profile-note-label--weakness {
  color: #991B1B;
}

.quiz-next-step {
  margin-top: 14px;
  border-radius: 15px;
  background: radial-gradient(50% 50% at 50% 50%, #263038 0%, #1D252B 100%);
  padding: 18px 22px;
}

.quiz-next-step-title {
  font-size: 14px;
  font-weight: 700;
  color: #F90;
  line-height: 24px;
  margin: 0 0 4px 0;
}

.quiz-next-step-text {
  font-size: 14px;
  line-height: 24px;
  color: #FFF;
  margin: 0;
}

/* Résultat : partage */
.quiz-share {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #E2E7EA;
  text-align: center;
}

.quiz-share-title {
  font-size: 14px;
  line-height: 24px;
  color: #5B6878;
  margin: 0 0 12px 0;
}

.quiz-share-text {
  border-radius: 15px;
  border: 1px solid rgba(255, 153, 0, 0.35);
  background: rgba(255, 153, 0, 0.08);
  padding: 12px 20px;
  font-size: 14px;
  line-height: 24px;
  color: #172735;
  margin: 0 0 14px 0;
}

.quiz-share-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.btn-quiz-share {
  border-radius: 30px;
  border: 1px solid #E2E7EA;
  padding: 8px 16px;
  line-height: 24px;
  color: #172735;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all .25s ease-in;
}

.btn-quiz-share:hover {
  border-color: #F90;
  color: #E68500;
}

.quiz-result-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}

/* Responsive */
@media (max-width: 768px) {
  .quiz-page-wrapper {
    padding-top: 10px;
  }

  .quiz-bar {
    top: 10px;
    margin: 0 10px;
    padding: 10px 14px;
    border-radius: 15px;
  }

  .quiz-bar-title {
    gap: 10px;
    font-size: 18px;
    line-height: 26px;
  }

  .quiz-bar-deco {
    width: 32px;
  }

  .quiz-section {
    padding: 20px 0 50px;
    margin: 0;
  }

  .quiz-title {
    font-size: 28px;
    line-height: 38px;
  }

  .quiz-card {
    padding: 24px 20px 28px;
  }

  .quiz-question-title {
    font-size: 18px;
    line-height: 28px;
  }

  .quiz-profile-header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .quiz-share-links {
    grid-template-columns: 1fr;
  }

  .btn-quiz-primary,
  .btn-quiz-outline {
    padding: 11px 20px;
  }
}
