/* =========================================
   QUIZ PARRAIN — STYLES GLOBAUX
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #6C5CE7;
  --secondary:  #00B894;
  --accent:     #FDCB6E;
  --danger:     #FF7675;
  --bg:         #F8F7FF;
  --card:       #FFFFFF;
  --text:       #2D3436;
  --text-light: #636E72;
  --radius:     20px;
  --shadow:     0 20px 60px rgba(108,92,231,.15);
  --shadow-sm:  0 4px 20px rgba(108,92,231,.10);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── SCREENS ─── */
.screen {
  display: none;
  min-height: 100vh;
}
.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* ─── BLOBS ─── */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  pointer-events: none;
  z-index: 0;
}
.blob-1 { width: 500px; height: 500px; background: #6C5CE7; top: -150px; left: -150px; }
.blob-2 { width: 400px; height: 400px; background: #00B894; bottom: -100px; right: -100px; }
.blob-3 { width: 300px; height: 300px; background: #FDCB6E; bottom: 100px; left: 30%; }
.blob-r1 { width: 450px; height: 450px; background: #6C5CE7; top: -100px; right: -100px; }
.blob-r2 { width: 350px; height: 350px; background: #00B894; bottom: -80px; left: -80px; }

/* =========================================
   ÉCRAN INTRO
   ========================================= */
#screen-intro { position: relative; overflow: hidden; }
.intro-bg { position: fixed; inset: 0; z-index: 0; }

.intro-card {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(20px);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 56px 48px;
  max-width: 560px;
  width: 100%;
  text-align: center;
  animation: fadeUp .6s ease both;
}

.badge-tag {
  display: inline-block;
  background: linear-gradient(135deg, #6C5CE7, #a29bfe);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .5px;
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.emoji-hero {
  font-size: 72px;
  margin-bottom: 16px;
  animation: bounce 2s infinite;
}

h1 {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}
.highlight {
  background: linear-gradient(135deg, #6C5CE7, #fd79a8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-sub {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 28px;
}

.intro-pills {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.pill {
  background: var(--bg);
  border: 2px solid #e8e4ff;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #6C5CE7, #a29bfe);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 40px;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(108,92,231,.4);
  transition: transform .2s, box-shadow .2s;
  margin-bottom: 16px;
}
.btn-start:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(108,92,231,.5);
}

.intro-note {
  font-size: .82rem;
  color: #b2bec3;
}

/* =========================================
   ÉCRAN QUIZ
   ========================================= */
#screen-quiz {
  background: var(--bg);
  padding: 0;
  justify-content: flex-start;
}

.quiz-header {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px 0;
}
.quiz-logo {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary);
}
.quiz-progress-info {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text-light);
  background: #fff;
  padding: 6px 18px;
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
}

.progress-bar-wrap {
  width: 100%;
  max-width: 700px;
  margin: 16px auto 0;
  padding: 0 32px;
  height: 8px;
  background: #e8e4ff;
  border-radius: 100px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6C5CE7, #a29bfe);
  border-radius: 100px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
  width: 10%;
}

.quiz-body {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 40px 32px;
  flex: 1;
}

.question-category {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  background: #f0edff;
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}

.question-text {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 36px;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.option-btn {
  background: #fff;
  border: 2.5px solid #e8e4ff;
  border-radius: 18px;
  padding: 20px 18px;
  cursor: pointer;
  text-align: left;
  transition: all .25s ease;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-family: 'Poppins', sans-serif;
  box-shadow: 0 2px 12px rgba(108,92,231,.06);
}
.option-btn:hover {
  border-color: var(--primary);
  background: #f0edff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(108,92,231,.15);
}
.option-btn.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f0edff, #e8e4ff);
  box-shadow: 0 6px 24px rgba(108,92,231,.2);
}
.option-btn.selected .opt-emoji {
  background: var(--primary);
  color: #fff;
}

.opt-emoji {
  font-size: 1.3rem;
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  background: #f0edff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s, color .25s;
}

.opt-content {}
.opt-label {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}
.opt-sub {
  font-size: .78rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* ─── NAVIGATION QUIZ ─── */
.quiz-nav {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-back, .btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: .92rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 100px;
  cursor: pointer;
  transition: all .2s;
  border: none;
}
.btn-back {
  background: #fff;
  color: var(--text-light);
  box-shadow: var(--shadow-sm);
}
.btn-back:hover { background: #f0edff; color: var(--primary); }
.btn-back:disabled { opacity: .35; cursor: not-allowed; }

.btn-next {
  background: linear-gradient(135deg, #6C5CE7, #a29bfe);
  color: #fff;
  box-shadow: 0 6px 24px rgba(108,92,231,.35);
}
.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(108,92,231,.45);
}
.btn-next:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.dots {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 100px;
  background: #ddd;
  transition: all .25s;
}
.dot.active { background: var(--primary); width: 24px; }
.dot.done   { background: var(--secondary); }

/* =========================================
   ÉCRAN RÉSULTAT
   ========================================= */
#screen-result { position: relative; overflow: hidden; }
.result-bg { position: fixed; inset: 0; z-index: 0; }

.result-card {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(20px);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 52px 48px;
  max-width: 600px;
  width: 100%;
  text-align: center;
  animation: fadeUp .6s ease both;
}

.result-badge {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 6px 20px;
  border-radius: 100px;
  margin-bottom: 20px;
  color: #fff;
}

.result-emoji {
  font-size: 80px;
  margin-bottom: 12px;
  animation: bounce 2s infinite;
}

.result-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  margin-bottom: 4px;
}

.result-profile {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #6C5CE7, #fd79a8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-desc {
  font-size: .97rem;
  color: var(--text-light);
  line-height: 1.75;
  margin-bottom: 28px;
}

.result-strengths {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}
.strength-tag {
  background: #f0edff;
  color: var(--primary);
  font-size: .82rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 100px;
  border: 2px solid #e0daff;
}

/* ─── SCORE BARS ─── */
.score-bar-section {
  background: var(--bg);
  border-radius: 20px;
  padding: 28px 24px;
  margin-bottom: 32px;
  text-align: left;
}
.score-bar-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}
.score-bars { display: flex; flex-direction: column; gap: 16px; }

.score-item {}
.score-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.score-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.score-val {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
}
.score-track {
  height: 10px;
  background: #e8e4ff;
  border-radius: 100px;
  overflow: hidden;
}
.score-track-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

/* ─── CTA RÉSULTAT ─── */
.result-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.btn-restart, .btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: .92rem;
  font-weight: 600;
  padding: 13px 28px;
  border-radius: 100px;
  cursor: pointer;
  transition: all .2s;
  border: none;
}
.btn-restart {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
  border: 2px solid #e0daff;
}
.btn-restart:hover { background: #f0edff; transform: translateY(-2px); }

.btn-share {
  background: linear-gradient(135deg, #00B894, #00cec9);
  color: #fff;
  box-shadow: 0 6px 24px rgba(0,184,148,.35);
}
.btn-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0,184,148,.45);
}

.result-note {
  font-size: .82rem;
  color: #b2bec3;
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 640px) {
  .intro-card, .result-card { padding: 36px 24px; }
  h1 { font-size: 1.7rem; }
  .question-text { font-size: 1.25rem; }
  .options-grid { grid-template-columns: 1fr; }
  .quiz-body, .quiz-header, .quiz-nav, .progress-bar-wrap { padding-left: 20px; padding-right: 20px; }
  .result-profile { font-size: 1.7rem; }
  .result-card { padding: 36px 20px; }
}

/* ─── PRINT ─── */
@media print {
  body { background: #fff; }
  .intro-bg, .result-bg { display: none; }
  .result-cta { display: none; }
  .result-card { box-shadow: none; border: 2px solid #eee; }
}
