/* ═══════════════════════════════════════════════════
   BOUSSOLE POLITIQUE QUÉBEC 2026
   Palette principale : Bleu du Québec (institutionnel)
   Palette sombre : Nuit québécoise
   ═══════════════════════════════════════════════════ */

/* ── DESIGN TOKENS (Light) ── */
:root {
  /* Primary, Bleu du Québec */
  --primary-50:  #EBF2FA;
  --primary-100: #D2E3F4;
  --primary-200: #A5C7E9;
  --primary-300: #6DA3D9;
  --primary-400: #3D7FC4;
  --primary-500: #1B5A9E;
  --primary-600: #164A82;
  --primary-700: #113B67;
  --primary-800: #0C2B4D;
  --primary-900: #081C34;

  /* Accent, Vert du Québec */
  --accent-500: #00805E;
  --accent-600: #006B4F;
  --accent-400: #00A078;

  /* Neutrals */
  --gray-50:  #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;

  /* Semantic */
  --success: #2E7D32;
  --warning: #ED6C02;
  --danger:  #D32F2F;

  /* Surface */
  --bg-primary:   #FFFFFF;
  --bg-secondary: #F5F7FA;
  --bg-tertiary:  #EDF0F5;
  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted:     var(--gray-500);
  --border-color:   var(--gray-200);
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.15);

  /* Typography */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* Sizing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Transitions */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   500ms;
}

/* ── DARK THEME, Bleu du Québec ── */
[data-theme="dark"] {
  --primary-50:  #0A1628;
  --primary-100: #0F1F38;
  --primary-200: #162D50;
  --primary-300: #1F4170;
  --primary-400: #2D5F9A;
  --primary-500: #4A8ECF;
  --primary-600: #6AACE0;
  --primary-700: #94C6EC;
  --primary-800: #C0DFF5;
  --primary-900: #E8F1FB;

  --accent-500: #00C48C;
  --accent-600: #00A078;
  --accent-400: #40D9A8;

  --gray-50:  #0B1422;
  --gray-100: #101C2E;
  --gray-200: #18283E;
  --gray-300: #243750;
  --gray-400: #365170;
  --gray-500: #5A7B9E;
  --gray-600: #8FAABE;
  --gray-700: #C2D5E4;
  --gray-800: #DCE8F0;
  --gray-900: #F0F5F9;

  --success: #4CAF50;
  --warning: #FFA726;
  --danger:  #EF5350;

  --bg-primary:   #091320;
  --bg-secondary: #0E1A2C;
  --bg-tertiary:  #142338;
  --text-primary:   #F0F5F9;
  --text-secondary: #8FAABE;
  --text-muted:     #5A7B9E;
  --border-color:   #18283E;
  --shadow-sm:  0 1px 2px rgba(0,8,30,0.4);
  --shadow-md:  0 4px 12px rgba(0,8,30,0.5);
  --shadow-lg:  0 8px 30px rgba(0,8,30,0.6);
  --shadow-xl:  0 20px 60px rgba(0,8,30,0.7);
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-secondary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color var(--duration-normal) var(--ease-out),
              color var(--duration-normal) var(--ease-out);
}

h1, h2, h3 {
  font-family: var(--font-serif);
  line-height: 1.25;
  color: var(--text-primary);
}

a {
  color: var(--primary-500);
  text-decoration: none;
  transition: color var(--duration-fast);
}
a:hover { color: var(--primary-600); }

/* ── FOCUS STATES ── */
:focus-visible {
  outline: 3px solid var(--primary-400);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ═══════════════ NAVBAR ═══════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
}

.navbar-logo {
  width: 32px;
  height: 32px;
}

.navbar-title {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.navbar-title strong {
  font-weight: 700;
  color: var(--primary-500);
}

.navbar-actions {
  display: flex;
  gap: 0.5rem;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0.65rem 1.4rem;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary-500);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  opacity: 0.9;
}

.btn-lg {
  padding: 0.85rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast);
}
.btn-icon:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.btn-icon svg {
  width: 20px;
  height: 20px;
}

/* Theme toggle icon swap */
[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* ═══════════════ SCREENS ═══════════════ */
.main-container {
  position: relative;
  min-height: calc(100vh - 60px);
}

.screen {
  display: none !important;
  opacity: 0;
  transform: translateY(12px);
  padding: 2rem 1.25rem 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.screen--active {
  display: block !important;
  animation: screenEnter var(--duration-slow) var(--ease-out) forwards;
}

.screen--exiting {
  animation: screenExit var(--duration-normal) var(--ease-out) forwards;
}

@keyframes screenEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes screenExit {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-12px); }
}

/* ═══════════════ LANDING ═══════════════ */
.landing {
  padding-top: 2rem;
}

.landing-hero {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.landing-badge {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary-500);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  animation: fadeInDown 0.6s var(--ease-out) both;
}

.landing-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInDown 0.7s var(--ease-out) 0.1s both;
}
.landing-title em {
  font-style: normal;
  color: var(--primary-500);
}

.landing-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2rem;
  animation: fadeInDown 0.7s var(--ease-out) 0.2s both;
}

.landing-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  animation: fadeInDown 0.7s var(--ease-out) 0.3s both;
}

.stat { text-align: center; }
.stat-number {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-500);
  font-family: var(--font-serif);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border-color);
}

.landing-hero .btn-primary {
  animation: fadeInUp 0.6s var(--ease-out) 0.4s both;
}

.btn-arrow {
  transition: transform var(--duration-fast);
}
.btn:hover .btn-arrow {
  transform: translateX(3px);
}

.landing-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  animation: fadeInUp 0.6s var(--ease-out) 0.5s both;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  animation: fadeInUp 0.7s var(--ease-out) 0.6s both;
}

.feature-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.feature-icon svg {
  width: 22px;
  height: 22px;
  color: var(--primary-500);
}

.feature-card h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.feature-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.landing-attribution {
  margin-top: 2.5rem;
  padding: 1.5rem 2rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  animation: fadeInUp 0.8s var(--ease-out) 0.7s both;
}
.landing-attribution p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: left;
  margin: 0;
}
.landing-attribution strong {
  color: var(--text-primary);
}

.methode-attribution {
  border-top: 2px solid var(--primary-500);
  padding-top: 1.5rem;
  margin-top: 2rem;
}

/* ═══════════════ CONSENT ═══════════════ */
.consent-card {
  max-width: 560px;
  margin: 2rem auto;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.consent-icon svg {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
}

.consent-card h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.consent-body {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.consent-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
}
.consent-item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.consent-card .btn-lg {
  width: 100%;
  margin-bottom: 0.75rem;
}
.consent-card .btn-ghost {
  width: 100%;
}

/* ═══════════════ QUIZ ═══════════════ */
.quiz-container {
  max-width: 680px;
  margin: 0 auto;
}

/* Progress */
.progress-wrapper {
  margin-bottom: 2rem;
  animation: fadeInDown 0.5s var(--ease-out) both;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.progress-section {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.progress-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
  border-radius: 100px;
  width: 0%;
  transition: width var(--duration-slow) var(--ease-out);
}

.progress-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.35rem;
}

/* Question Card */
.question-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.question-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary-50);
  color: var(--primary-500);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.question-text {
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1rem;
  min-height: 3.2rem;
}

/* Tooltip */
.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  color: var(--primary-500);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-bottom: 0.75rem;
  transition: opacity var(--duration-fast);
}
.tooltip-trigger:hover { opacity: 0.7; }
.tooltip-trigger svg {
  width: 16px;
  height: 16px;
}

.tooltip-content {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
  animation: tooltipIn var(--duration-normal) var(--ease-spring) both;
}

@keyframes tooltipIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Likert Scale */
.likert-scale {
  margin-top: 1.5rem;
}

.likert-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
  padding: 0 0.25rem;
}

.likert-options {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.likert-btn {
  aspect-ratio: 1;
  max-height: 56px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
}
.likert-btn:hover {
  border-color: var(--primary-400);
  color: var(--primary-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.likert-btn--selected {
  border-color: var(--primary-500);
  background: var(--primary-500);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(27,90,158,0.3);
}
.likert-btn--selected:hover {
  color: #fff;
  transform: scale(1.05) translateY(-1px);
}

/* Likert animation on select */
@keyframes likertPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.12); }
  100% { transform: scale(1.05); }
}
.likert-btn--pop {
  animation: likertPop var(--duration-normal) var(--ease-spring);
}

.btn-skip {
  display: block;
  width: 100%;
  background: none;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-fast);
}
.btn-skip:hover {
  border-color: var(--gray-400);
  color: var(--text-secondary);
  background: var(--bg-tertiary);
}
.btn-skip--selected {
  border-color: var(--gray-500);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* Quiz Nav */
.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.quiz-nav .btn { min-width: 130px; }
.quiz-nav .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Question transition */
.question-card--slide-out-left {
  animation: slideOutLeft var(--duration-normal) var(--ease-out) forwards;
}
.question-card--slide-in-right {
  animation: slideInRight var(--duration-normal) var(--ease-out) forwards;
}
.question-card--slide-out-right {
  animation: slideOutRight var(--duration-normal) var(--ease-out) forwards;
}
.question-card--slide-in-left {
  animation: slideInLeft var(--duration-normal) var(--ease-out) forwards;
}

@keyframes slideOutLeft {
  to { opacity: 0; transform: translateX(-30px); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
  to { opacity: 0; transform: translateX(30px); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ═══════════════ RESULTS ═══════════════ */
.results-container {
  max-width: 780px;
  margin: 0 auto;
}

.results-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.results-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 0.5rem;
}
.results-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

.section-heading {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

/* Compass */
.compass-section {
  margin-bottom: 3rem;
}

.compass-wrapper {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

#compassCanvas {
  width: 100%;
  max-width: 520px;
  height: auto;
  aspect-ratio: 1;
}

.compass-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid;
}

/* Party matches */
.matches-section {
  margin-bottom: 3rem;
}

.matches-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
  animation: fadeInUp 0.4s var(--ease-out) both;
}
.match-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.match-card--top {
  border-left: 4px solid;
  background: var(--bg-primary);
}

.match-rank {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--text-muted);
  min-width: 2rem;
  text-align: center;
}
.match-card--top .match-rank {
  color: var(--primary-500);
}

.match-info {
  flex: 1;
  min-width: 0;
}
.match-name {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}
.match-fullname {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.match-score-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 140px;
}
.match-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 100px;
  overflow: hidden;
}
.match-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1s var(--ease-out);
  width: 0%;
}
.match-percent {
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 3rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Factors */
.factors-section {
  margin-bottom: 3rem;
}

.factors-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.factor-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  animation: fadeInUp 0.35s var(--ease-out) both;
}

.factor-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-50);
  color: var(--primary-500);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.factor-text {
  flex: 1;
  color: var(--text-secondary);
}

.factor-direction {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  white-space: nowrap;
}
.factor-direction--left {
  background: #EDE7F6;
  color: #5E35B1;
}
.factor-direction--right {
  background: #E3F2FD;
  color: #1565C0;
}
[data-theme="dark"] .factor-direction--left {
  background: #311B92;
  color: #B39DDB;
}
[data-theme="dark"] .factor-direction--right {
  background: #0D47A1;
  color: #90CAF9;
}

/* Axes */
.axes-section {
  margin-bottom: 3rem;
}

.axes-grid {
  display: grid;
  gap: 1rem;
}

.axis-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.axis-card h3 {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.axis-bar-container {
  position: relative;
  margin-bottom: 0.5rem;
}

.axis-bar {
  height: 12px;
  background: linear-gradient(90deg, #7E57C2, var(--gray-300), #1E88E5);
  border-radius: 100px;
  position: relative;
}

.axis-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  background: var(--bg-primary);
  border: 3px solid var(--primary-500);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  transition: left 1s var(--ease-out);
}

.axis-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Actions */
.results-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.results-disclaimer {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}
.results-disclaimer svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--warning);
  margin-top: 2px;
}
.results-disclaimer p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ═══════════════ METHODE ═══════════════ */
.methode-container {
  max-width: 700px;
  margin: 0 auto;
}

.methode-back {
  margin-bottom: 1.5rem;
}

.methode-container h1 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.methode-section {
  margin-bottom: 2.5rem;
}

.methode-section h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--primary-500);
}

.methode-section p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.methode-section ul {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}
.methode-section li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.35rem;
}

.methode-axis {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}
.methode-axis h3 {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

/* ═══════════════ MODAL ═══════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn var(--duration-fast) var(--ease-out);
}
.modal-overlay[hidden] {
  display: none !important;
}
.toast[hidden] {
  display: none !important;
}

.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: modalIn var(--duration-normal) var(--ease-spring);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}
.modal p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ═══════════════ TOAST ═══════════════ */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray-900);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-out);
}
.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

[data-theme="dark"] .toast {
  background: var(--gray-200);
  color: var(--gray-900);
}

/* ═══════════════ LOADING ═══════════════ */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--duration-slow);
}
.loading-overlay--hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  text-align: center;
}

.spinner-ring {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-500);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-spinner p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ═══════════════ HELPERS ═══════════════ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 640px) {
  .navbar-inner { height: 52px; }
  .navbar-title { font-size: 0.85rem; }

  .screen { padding: 1.25rem 1rem 3rem; }

  .landing-stats { gap: 1rem; }
  .stat-number { font-size: 1.3rem; }

  .question-card { padding: 1.5rem 1.25rem; }
  .question-text { font-size: 1.05rem; }

  .likert-options { gap: 0.35rem; }
  .likert-btn {
    font-size: 0.85rem;
    max-height: 48px;
  }

  .quiz-nav .btn {
    min-width: 0;
    flex: 1;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }

  .match-card { padding: 1rem; flex-wrap: wrap; }
  .match-score-wrapper { width: 100%; min-width: 0; }

  .compass-wrapper { padding: 1rem; }

  .results-actions { flex-direction: column; }
  .results-actions .btn { width: 100%; }

  .consent-card { padding: 1.5rem; }

  .modal { padding: 1.5rem; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn { width: 100%; }
}

@media (max-width: 380px) {
  .likert-options { gap: 0.25rem; }
  .likert-btn { font-size: 0.75rem; border-width: 1.5px; }
  .likert-labels { font-size: 0.6rem; }
}
