@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=DM+Sans:wght@400;500;700&display=swap");

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #f0f4f8; font-family: "DM Sans", sans-serif; color: #1a2533; min-height: 100vh; padding: 32px 16px; }
.quiz-wrap { max-width: 620px; margin: 0 auto; }
.header { background: linear-gradient(135deg, #212639 0%, #A0C4F2 100%); border-radius: 16px 16px 0 0; padding: 32px 36px; text-align: center; }
.overtitle { font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: #A0C4F2; margin-bottom: 8px; }
.header h1 { font-family: "Inter", sans-serif; font-size: 20px; font-weight: 800; color: #fff; line-height: 1.3; margin-bottom: 10px; }
.header p { color: #d0e8ff; font-size: 13px; }
.progress-bar-wrap { background: #e2e8f0; height: 6px; }
.progress-bar { background: linear-gradient(90deg, #C6FD68, #a8e050); height: 6px; width: 0%; transition: width 0.4s ease; }
.quiz-body { background: #fff; border-radius: 0 0 16px 16px; padding: 32px 36px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.question-block { display: none; }
.question-block.active { display: block; }
.q-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.q-num { background: #212639; color: #fff; font-family: "Inter",sans-serif; font-weight: 800; font-size: 13px; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.q-text { font-family: "Inter",sans-serif; font-size: 15px; font-weight: 700; color: #1a2533; line-height: 1.4; }
.q-coeff-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #3730a3;
  background: #e0e7ff;
  border-radius: 6px;
  vertical-align: middle;
}
.q-figure {
  margin: 0 0 20px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  box-shadow: 0 2px 12px rgba(33, 38, 57, 0.06);
}
.q-image {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #fff;
}
.q-multi-hint { font-size: 11px; font-weight: 600; color: #C6FD68; background: #f0ffe0; border: 1px solid #d4f7a0; border-radius: 6px; padding: 4px 10px; margin-bottom: 16px; display: inline-block; }
.options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.option { display: flex; align-items: center; gap: 12px; border: 2px solid #e2e8f0; border-radius: 10px; padding: 12px 16px; cursor: pointer; transition: all 0.18s; background: #fff; font-size: 14px; color: #334155; font-weight: 500; }
.option:hover { border-color: #A0C4F2; background: #f0f5fd; }
.option.selected { border-color: #A0C4F2; background: #f0ffe0; color: #212639; }
.option.correct { border-color: #16a34a; background: #f0fdf4; color: #14532d; }
.option.wrong { border-color: #dc2626; background: #fef2f2; color: #7f1d1d; }
.option-marker { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbd5e1; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.option-marker.sq { border-radius: 4px; }
.option.selected .option-marker { border-color: #A0C4F2; background: #A0C4F2; color: #fff; }
.option.correct .option-marker { border-color: #16a34a; background: #16a34a; color: #fff; }
.option.wrong .option-marker { border-color: #dc2626; background: #dc2626; color: #fff; }
.option.confirmed { border-color: #212639; background: #f0f2f8; }
.option.confirmed .option-marker { border-color: #212639; background: #212639; color: #C6FD68; }
.feedback { display: none; border-radius: 10px; padding: 12px 16px; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.feedback.show { display: none; }
.feedback.ok { background: #f0fdf4; border: 1.5px solid #86efac; color: #14532d; }
.feedback.ko { background: #fef2f2; border: 1.5px solid #fca5a5; color: #7f1d1d; }
.btn { font-family: "Inter",sans-serif; font-weight: 700; font-size: 14px; padding: 13px 28px; border-radius: 8px; border: none; cursor: pointer; transition: all 0.18s; }
.btn-validate { background: #212639; color: #fff; }
.btn-validate:hover { background: #161b2b; }
.btn-next { display: none !important; }
.btn-next.is-visible {
  display: inline-block !important;
  background: #212639;
  color: #fff;
}
.btn-next.is-visible:hover { background: #161b2b; }
.btn-back {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #212639;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
}
.btn-back:hover {
  border-color: #A0C4F2;
  background: #f0f5fd;
  color: #161b2b;
}
.btn-back:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(160, 196, 242, 0.45);
}
.btn-row { display: flex; gap: 12px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.q-timer {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}
.q-timer.is-warning {
  color: #b91c1c;
}
.q-counter { font-size: 12px; color: #94a3b8; margin-left: auto; }
.result-block { display: none; text-align: center; padding: 16px 0; }
.result-block.show { display: block; }
.r-emoji { font-size: 52px; margin-bottom: 8px; }
.r-stars { color: #C6FD68; font-size: 30px; margin-bottom: 12px; }
.r-score { font-family: "Inter",sans-serif; font-size: 68px; font-weight: 800; color: #212639; line-height: 1; }
.r-score span { font-size: 28px; color: #64748b; }
.r-msg { font-size: 17px; font-weight: 700; color: #1a2533; margin: 12px 0 6px; }
.r-sub { font-size: 13px; color: #64748b; margin-bottom: 28px; }
.r-cta { display: inline-block; background: #C6FD68; color: #212639; font-family: "Inter",sans-serif; font-weight: 700; font-size: 14px; padding: 14px 32px; border-radius: 8px; text-decoration: none; }
.r-cta:hover { background: #b0f040; }
.r-cta-group { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 12px; }
.r-cta-secondary { display: inline-block; background: transparent; color: #212639; font-family: "Inter",sans-serif; font-weight: 700; font-size: 14px; padding: 13px 32px; border-radius: 8px; text-decoration: none; border: 2.5px solid #212639; }
.r-cta-secondary:hover { background: #f0f2f8; }
.r-restart { display: block; font-size: 13px; color: #94a3b8; cursor: pointer; margin-top: 14px; text-decoration: underline; background: none; border: none; }
.email-block { margin: 24px auto 0; max-width: 520px; text-align: left; }
.email-title { font-size: 14px; font-weight: 700; color: #212639; margin-bottom: 12px; }
.email-form { display: grid; gap: 10px; }
.email-form input[type="email"] { width: 100%; min-height: 48px; border-radius: 10px; border: 1px solid #d1d5db; padding: 12px 14px; font-size: 14px; color: #1f2937; }
.email-form input[type="email"]:focus { outline: none; border-color: #A0C4F2; box-shadow: 0 0 0 4px rgba(160,196,242,0.18); }
.email-status { min-height: 20px; font-size: 13px; margin-top: 8px; color: #14532d; }

/* Hub public (/) */
.quiz-hub-wrap { max-width: 720px; }
.quiz-hub-list { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.quiz-hub-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}
.quiz-hub-card.is-inactive { opacity: 0.72; }
.quiz-hub-over { font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: 0.04em; margin: 0 0 4px; }
.quiz-hub-title { font-size: 18px; font-weight: 800; color: #212639; margin: 0 0 6px; }
.quiz-hub-desc { font-size: 13px; color: #64748b; margin: 0 0 8px; line-height: 1.45; }
.quiz-hub-meta { font-size: 12px; color: #94a3b8; margin: 0; }
.quiz-hub-badge-off {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 600;
}
.btn-primary-card {
  display: inline-block;
  background: #212639;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
}
.btn-primary-card:hover { background: #161b2b; color: #fff; }
.quiz-hub-unavailable { font-size: 13px; color: #94a3b8; font-weight: 600; }
.quiz-hub-empty { text-align: center; color: #64748b; margin: 32px 0; }
.quiz-admin-link { text-align: center; margin-top: 32px; font-size: 13px; }
.quiz-admin-link a { color: #64748b; }
.quiz-empty-msg {
  text-align: center;
  color: #64748b;
  font-size: 15px;
  padding: 48px 24px;
}

/* Page compte (/compte) */
.account-wrap { max-width: 480px; }
.account-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0 16px;
}
.account-tab {
  flex: 1;
  text-align: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  font-weight: 700;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
}
.account-tab.is-active {
  border-color: #212639;
  background: #212639;
  color: #fff;
}
.account-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.account-form label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}
.account-form input {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 10px 12px;
  font-size: 14px;
}
.account-form input:focus {
  outline: none;
  border-color: #a0c4f2;
  box-shadow: 0 0 0 3px rgba(160, 196, 242, 0.25);
}
.btn-block { width: 100%; text-align: center; }
.btn-secondary-card {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  border: 2px solid #212639;
  color: #212639;
  font-weight: 700;
  text-decoration: none;
}
.btn-secondary-card:hover { background: #f0f2f8; }
.btn-ghost-account {
  background: none;
  border: none;
  color: #64748b;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 16px;
}
.account-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.account-hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  margin-top: 14px;
}
.account-lead { font-size: 14px; color: #475569; margin-bottom: 16px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.email-logged-as { font-size: 14px; color: #334155; margin: 0 0 12px; }
.email-guest-hint { font-size: 12px; color: #64748b; margin: 10px 0 0; line-height: 1.4; }
.email-guest-hint a { color: #212639; font-weight: 600; }
