/* ============================================================
   POLIBOUSSOLE — Feuille de style principale
   Design : dark/light, mobile-first, moderne et "franchouillard"
   ============================================================ */

/* ---- VARIABLES ---- */
:root {
  --bg:          #0a0a0f;
  --bg-2:        #12121a;
  --bg-3:        #1a1a28;
  --bg-4:        #22223a;
  --border:      rgba(255,255,255,0.08);
  --border-2:    rgba(255,255,255,0.15);
  --text:        #e8e8f0;
  --text-muted:  #8888aa;
  --text-faint:  #555570;
  --primary:     #7c3aed;
  --primary-h:   #9155ff;
  --primary-d:   #5b21b6;
  --accent:      #ef4444;
  --accent-fr:   #e8271b;
  --success:     #22c55e;
  --warning:     #f59e0b;
  --blue-fr:     #0055a4;
  --white-fr:    #ffffff;
  --red-fr:      #ef4135;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.6);
  --font:        'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition:  0.2s ease;
}

[data-theme="light"] {
  --bg:         #f0f0f8;
  --bg-2:       #ffffff;
  --bg-3:       #f5f5fd;
  --bg-4:       #eaeaf5;
  --border:     rgba(0,0,0,0.08);
  --border-2:   rgba(0,0,0,0.15);
  --text:       #1a1a2e;
  --text-muted: #666680;
  --text-faint: #aaaacc;
  --shadow:     0 4px 24px rgba(0,0,0,0.1);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.15);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--primary-h); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- TYPOGRAPHY ---- */
h1, h2, h3 { line-height: 1.2; font-weight: 700; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn--primary:hover { background: var(--primary-h); border-color: var(--primary-h); text-decoration: none; }

.btn--outline {
  background: transparent;
  color: var(--primary-h);
  border-color: var(--primary);
}
.btn--outline:hover { background: var(--primary); color: #fff; text-decoration: none; }

.btn--ghost {
  background: var(--bg-4);
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { background: var(--bg-3); border-color: var(--border-2); text-decoration: none; }

.btn--sm  { padding: 6px 14px; font-size: 12px; }
.btn--lg  { padding: 14px 28px; font-size: 16px; border-radius: var(--radius); }
.btn--full { width: 100%; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- ALERTS ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}
.alert--error   { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.alert--success { background: rgba(34,197,94,0.15); color: #86efac; border: 1px solid rgba(34,197,94,0.3); }

/* ---- FORMS ---- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-hint { font-weight: 400; color: var(--text-faint); text-transform: none; letter-spacing: 0; }
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color var(--transition);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.form-check input { margin-top: 2px; accent-color: var(--primary); }
.input-password-wrapper { position: relative; }
.input-password-wrapper .form-input { padding-right: 44px; }
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
}
.password-strength { font-size: 12px; margin-top: 6px; height: 16px; }

/* ---- HEADER ---- */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}
.logo-icon { font-size: 24px; }
.logo-text { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link:hover { background: var(--bg-4); text-decoration: none; }
.nav-link--muted { color: var(--text-muted); }
.nav-link--active { background: var(--bg-4); }
.nav-avatar { font-size: 18px; }
.theme-toggle {
  background: var(--bg-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.theme-toggle:hover { background: var(--bg-3); }

/* ---- HERO ---- */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  display: flex;
  opacity: 0.04;
}
.hero-stripe { flex: 1; }
.hero-stripe--blue  { background: var(--blue-fr); }
.hero-stripe--white { background: #ffffff; }
.hero-stripe--red   { background: var(--red-fr); }
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(124,58,237,0.2);
  border: 1px solid rgba(124,58,237,0.4);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #c084fc;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero-title-accent {
  background: linear-gradient(135deg, #7c3aed, #3b82f6, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-size: 36px;
  font-weight: 800;
  color: var(--primary-h);
  line-height: 1;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

/* ---- SECTIONS ---- */
.section { padding: 60px 0; }
.section--dark { background: var(--bg-2); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 800;
  margin-bottom: 12px;
}
.section-subtitle { font-size: 16px; color: var(--text-muted); }
.section-title-sm {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ---- DIFFICULTY CARDS ---- */
.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.difficulty-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.difficulty-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 0 24px rgba(124,58,237,0.2);
}
.difficulty-card--featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--bg-2), rgba(124,58,237,0.08));
}
.diff-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  white-space: nowrap;
}
.diff-icon { font-size: 36px; }
.diff-name { font-size: 20px; font-weight: 700; }
.diff-meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.diff-meta span::before { content: '⏱ '; }
.diff-meta span:first-child::before { content: '❓ '; }
.diff-desc { font-size: 14px; color: var(--text-muted); flex: 1; }
.diff-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block;
  background: var(--bg-4);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ---- AXES GRID (homepage) ---- */
.axes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.axis-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}
.axis-icon { font-size: 28px; margin-bottom: 8px; }
.axis-label { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.axis-poles { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; flex-wrap: wrap; }
.pole { font-weight: 600; }
.axis-vs { color: var(--text-faint); }

/* ---- FEATURES ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform var(--transition);
}
.feature-card:hover { transform: translateY(-2px); }
.feature-icon { font-size: 36px; margin-bottom: 14px; }
.feature-card h3 { font-size: 17px; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }

/* ---- FOOTER ---- */
.main-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}
.footer-brand { max-width: 300px; }
.footer-brand .logo { font-size: 20px; margin-bottom: 10px; }
.footer-brand p { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 14px; color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 20px; }
.footer-bottom p { font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }
.footer-bottom a { color: var(--text-muted); }

/* =====================================================================
   QUIZ PAGE
   ===================================================================== */
.page-quiz body, .quiz-layout { height: 100vh; overflow: hidden; }

.quiz-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: 100vh;
}

/* Sidebar */
.quiz-sidebar {
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}
.quiz-brand { margin-bottom: 10px; }
.quiz-meta { display: flex; flex-direction: column; gap: 8px; }
.quiz-level { font-size: 13px; color: var(--text-muted); }
.quiz-progress-label { font-size: 22px; font-weight: 800; }
.quiz-progress-bar {
  height: 6px;
  background: var(--bg-4);
  border-radius: 100px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #3b82f6);
  border-radius: 100px;
  transition: width 0.5s ease;
}
.quiz-progress-pct { font-size: 12px; color: var(--text-muted); text-align: right; }
.quiz-abandon { margin-top: auto; }

/* Main question zone */
.quiz-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
  background: var(--bg);
}
.question-container { width: 100%; max-width: 720px; }

/* Loading state */
.question-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 60px;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Question card */
.question-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}
.question-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.question-type-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(124,58,237,0.2);
  color: #c084fc;
  border: 1px solid rgba(124,58,237,0.3);
}
.question-type-badge--swipe   { background: rgba(239,68,68,0.15); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.question-type-badge--slider  { background: rgba(59,130,246,0.15); color: #93c5fd; border-color: rgba(59,130,246,0.3); }
.question-type-badge--budget  { background: rgba(34,197,94,0.15); color: #86efac; border-color: rgba(34,197,94,0.3); }
.question-type-badge--ranking { background: rgba(245,158,11,0.15); color: #fcd34d; border-color: rgba(245,158,11,0.3); }
.question-category { font-size: 12px; color: var(--text-faint); margin-left: auto; }

.question-text {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 24px;
  color: var(--text);
}
.question-help {
  background: var(--bg-4);
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ---- Scale classique ---- */
.answer-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.scale-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  transition: all var(--transition);
  min-height: 90px;
}
.scale-btn:hover { border-color: var(--primary); background: rgba(124,58,237,0.1); }
.scale-btn.selected { border-color: var(--primary); background: rgba(124,58,237,0.25); }
.scale-btn--2:hover, .scale-btn--2.selected { border-color: #ef4444; background: rgba(239,68,68,0.2); }
.scale-btn--1:hover, .scale-btn--1.selected { border-color: #f97316; background: rgba(249,115,22,0.15); }
.scale-btn-0:hover,  .scale-btn-0.selected  { border-color: #6b7280; background: rgba(107,114,128,0.2); }
.scale-btn-1:hover,  .scale-btn-1.selected  { border-color: #22c55e; background: rgba(34,197,94,0.15); }
.scale-btn-2:hover,  .scale-btn-2.selected  { border-color: #16a34a; background: rgba(22,163,74,0.2); }
.scale-icon { font-size: 24px; }
.scale-label { font-size: 11px; text-align: center; font-weight: 600; color: var(--text-muted); }

/* ---- Swipe ---- */
.swipe-hint { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.swipe-arena { display: flex; justify-content: center; }
.swipe-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  width: 100%;
  align-items: stretch;
}
.swipe-divider {
  display: flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}
.swipe-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  position: relative;
  background: var(--bg-3);
  min-height: 140px;
}
.swipe-option--A:hover, .swipe-option--A.chosen { border-color: #3b82f6; background: rgba(59,130,246,0.15); }
.swipe-option--B:hover, .swipe-option--B.chosen { border-color: #ef4444; background: rgba(239,68,68,0.15); }
.swipe-option-icon { font-size: 32px; }
.swipe-option-text { font-size: 15px; font-weight: 600; }
.swipe-arrow {
  position: absolute;
  bottom: 10px;
  font-size: 18px;
  color: var(--text-faint);
}
.swipe-arrow--left  { left: 10px; }
.swipe-arrow--right { right: 10px; }

/* ---- Slider ---- */
.slider-container { margin: 20px 0; }
.slider-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--primary) 50%, var(--bg-4) 50%);
  outline: none;
  cursor: pointer;
  margin-bottom: 12px;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(124,58,237,0.5);
}
.slider-value-display { text-align: center; font-size: 24px; font-weight: 800; color: var(--primary-h); margin-bottom: 20px; }

/* ---- Budget ---- */
.budget-help { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; text-align: center; }
.budget-help strong { color: var(--warning); font-size: 20px; }
.budget-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.budget-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  gap: 12px;
}
.budget-item-label { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; flex: 1; }
.budget-item-icon { font-size: 20px; }
.budget-item-controls { display: flex; align-items: center; gap: 12px; }
.budget-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-4);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  transition: background var(--transition);
}
.budget-btn:hover { background: var(--primary); border-color: var(--primary); }
.budget-item-value { font-size: 20px; font-weight: 800; color: var(--primary-h); min-width: 28px; text-align: center; }

/* ---- Ranking ---- */
.ranking-hint { text-align: center; font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.ranking-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-3);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: grab;
  transition: all 0.15s ease;
  user-select: none;
}
.ranking-item:active { cursor: grabbing; }
.ranking-item.drag-over { border-color: var(--primary); background: rgba(124,58,237,0.1); }
.ranking-rank { font-size: 18px; font-weight: 800; color: var(--primary-h); min-width: 28px; }
.ranking-handle { font-size: 18px; color: var(--text-faint); cursor: grab; }
.ranking-icon { font-size: 22px; }
.ranking-text { font-size: 15px; font-weight: 600; }

/* ---- End state ---- */
.quiz-end { text-align: center; padding: 60px; }
.end-animation { font-size: 80px; margin-bottom: 24px; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.quiz-end h2 { font-size: 28px; margin-bottom: 12px; }
.quiz-end p { color: var(--text-muted); margin-bottom: 24px; }

/* =====================================================================
   RESULTS PAGE
   ===================================================================== */
.results-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.results-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.results-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.results-main { padding: 40px 0 80px; }
.result-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

/* Archétype */
.archetype-section { background: linear-gradient(135deg, var(--bg-2), rgba(124,58,237,0.08)); }
.archetype-header { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.archetype-icon { font-size: 64px; line-height: 1; }
.archetype-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 6px; }
.archetype-name { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.archetype-meta { font-size: 13px; color: var(--text-muted); }

/* Résultats grid */
.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }

/* Drapeau */
.flag-section { display: flex; flex-direction: column; gap: 16px; }
.flag-container { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
#flagCanvas { border-radius: var(--radius); border: 2px solid var(--border); }
.flag-legend { display: flex; flex-direction: column; gap: 4px; }
.flag-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.flag-legend-color { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }

/* Méta-jauges */
.meta-gauges { display: flex; flex-direction: column; gap: 20px; }
.meta-gauge-label { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.meta-gauge-bar { height: 10px; background: var(--bg-4); border-radius: 100px; overflow: hidden; margin-bottom: 6px; }
.meta-gauge-fill { height: 100%; border-radius: 100px; transition: width 1s ease; }
.meta-gauge-fill--radical  { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.meta-gauge-fill--defiance { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.meta-gauge-desc { font-size: 12px; color: var(--text-muted); }

/* 12 jauges */
.axis-gauge { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.axis-gauge:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.axis-gauge-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.axis-gauge-icon { font-size: 20px; }
.axis-gauge-label { font-size: 14px; font-weight: 700; }
.axis-gauge-score { margin-left: auto; font-size: 13px; font-weight: 700; }
.axis-gauge-track { display: grid; grid-template-columns: 1fr 3fr 1fr; gap: 6px; align-items: center; }
.axis-pole-left, .axis-pole-right {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.axis-pole-label { font-size: 10px; font-weight: 600; }
.axis-gauge-bar-wrapper {
  position: relative;
  height: 12px;
  background: var(--bg-4);
  border-radius: 100px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.axis-gauge-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: var(--border-2);
  z-index: 1;
}
.axis-gauge-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1s ease;
  position: absolute;
}
.axis-gauge-fill--left  { right: 50%; }
.axis-gauge-fill--right { left: 50%; }

/* Badges */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.badge-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.badge-card--rare { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.05); }
.badge-card--legendaire { border-color: rgba(124,58,237,0.5); background: rgba(124,58,237,0.08); }
.badge-icon { font-size: 36px; }
.badge-name { font-size: 14px; font-weight: 700; }
.badge-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.badge-rarity { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.badge-date { font-size: 11px; color: var(--text-faint); }

/* CTA */
.cta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.cta-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cta-card--primary { border-color: rgba(124,58,237,0.4); background: rgba(124,58,237,0.08); }
.cta-icon { font-size: 32px; }
.cta-card h3 { font-size: 16px; }
.cta-card p { font-size: 13px; color: var(--text-muted); flex: 1; }

/* =====================================================================
   AUTH PAGE
   ===================================================================== */
.page-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: radial-gradient(ellipse at top, rgba(124,58,237,0.15) 0%, transparent 60%), var(--bg);
}
.auth-layout { width: 100%; max-width: 440px; }
.auth-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-header .logo { justify-content: center; font-size: 24px; margin-bottom: 16px; }
.auth-title { font-size: 26px; font-weight: 800; margin-bottom: 8px; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); }
.auth-form { display: flex; flex-direction: column; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }

/* =====================================================================
   PROFILE PAGE
   ===================================================================== */
.profile-main { padding: 40px 0 80px; }
.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: flex-start; }
.profile-sidebar { display: flex; flex-direction: column; gap: 20px; }
.profile-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.profile-avatar { font-size: 56px; text-align: center; margin-bottom: 8px; }
.profile-username { font-size: 22px; font-weight: 800; text-align: center; }
.profile-email { font-size: 13px; color: var(--text-muted); text-align: center; }
.profile-since { font-size: 12px; color: var(--text-faint); text-align: center; margin-bottom: 16px; }
.profile-stats { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.profile-stat { text-align: center; }
.profile-stat-num { display: block; font-size: 28px; font-weight: 800; color: var(--primary-h); }
.profile-stat-label { font-size: 12px; color: var(--text-muted); }
.profile-section-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.profile-content { display: flex; flex-direction: column; gap: 24px; }
.profile-section {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.profile-section h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }

/* Avatar picker */
.avatar-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-option { cursor: pointer; display: block; }
.avatar-option input { display: none; }
.avatar-option span {
  display: block;
  width: 36px;
  height: 36px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all 0.15s;
}
.avatar-option.selected span { border-color: var(--primary); background: rgba(124,58,237,0.2); }

/* History list */
.history-list { display: flex; flex-direction: column; gap: 12px; }
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  gap: 16px;
  flex-wrap: wrap;
}
.history-item-left { flex: 1; }
.history-archetype { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.history-meta { font-size: 12px; color: var(--text-muted); }
.history-item-mid { flex: 2; }
.history-scores { display: flex; flex-wrap: wrap; gap: 6px; }
.history-score-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid;
  color: var(--text);
  background: var(--bg-4);
}
.history-item-right { display: flex; gap: 6px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { margin-bottom: 20px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 900px) {
  .quiz-layout { grid-template-columns: 1fr; height: auto; overflow: auto; }
  .quiz-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-2);
  }
  .quiz-brand { display: none; }
  .quiz-axes-mini { display: none; }
  .quiz-abandon { margin-top: 0; }
  .quiz-main { padding: 20px 16px; align-items: flex-start; }
  .question-card { padding: 24px 20px; }
  .results-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .answer-scale { grid-template-columns: 1fr 1fr; }
  .scale-btn:last-child { grid-column: span 2; }
}

@media (max-width: 600px) {
  .hero { padding: 40px 0 40px; }
  .difficulty-grid { grid-template-columns: 1fr; }
  .axes-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .main-nav .btn--outline { display: none; }
  .answer-scale { grid-template-columns: 1fr; }
  .scale-btn:last-child { grid-column: span 1; }
  .swipe-card { grid-template-columns: 1fr; }
  .swipe-divider { display: none; }
  .auth-card { padding: 28px 20px; }
  .axis-gauge-track { grid-template-columns: 1fr; }
  .axis-pole-left, .axis-pole-right { display: none; }
  .results-header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 8px; }
}

/* =====================================================================
   ANIMATIONS GLOBALES
   ===================================================================== */
@keyframes fadeIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform:none; } }
.question-card { animation: fadeIn 0.3s ease; }
.result-section { animation: fadeIn 0.4s ease; }
.difficulty-card { animation: fadeIn 0.3s ease; }
