/* ===== Variables & base ===== */
:root {
  --color-bg: #faf9f7;
  --color-bg-white: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #5c5c5c;
  --color-accent: #e85d2c;
  --color-accent-hover: #d14d20;
  --color-accent-light: rgba(232, 93, 44, 0.12);
  --color-green: #2d5a3d;
  --color-green-bg: #2d5a3d;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

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

/* ===== Bandeau publicité ===== */
.ad-banner {
  background: linear-gradient(90deg, #1a1a1a 0%, #333 100%);
  color: #fff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 14px;
  animation: slideDown 0.6s ease-out;
}

.ad-banner__label {
  background: var(--color-accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
}

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

/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--color-bg-white);
  box-shadow: var(--shadow);
  animation: fadeIn 0.5s ease-out 0.2s both;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo__icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--color-accent), #f0a050);
  border-radius: var(--radius);
  transition: transform var(--transition);
}

.logo:hover .logo__icon {
  transform: scale(1.05) rotate(-3deg);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav__link {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-accent);
}

.btn--header {
  padding: 10px 20px;
  font-size: 0.95rem;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 93, 44, 0.35);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid #ddd;
}

.btn--secondary:hover:not(:disabled) {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn--lg {
  padding: 18px 36px;
  font-size: 1.1rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Disclaimer ===== */
.disclaimer--main {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
  border: 2px solid #e0b000;
  color: #856404;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  font-size: 0.9rem;
  line-height: 1.5;
  animation: pulseBorder 2s ease-in-out infinite;
}

@keyframes pulseBorder {
  0%, 100% { border-color: #e0b000; }
  50% { border-color: #c9a000; }
}

/* ===== Hero / Intro ===== */
.section--hero {
  padding: 48px 0 48px;
  text-align: center;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 20px;
  color: var(--color-text);
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
}

.hero__cta .btn {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===== Animations d'entrée ===== */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.8s ease-out forwards;
}

.animate-in--delay-1 { animation-delay: 0.15s; }
.animate-in--delay-2 { animation-delay: 0.3s; }
.animate-in--delay-3 { animation-delay: 0.45s; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Quiz ===== */
.screen {
  min-height: 0;
}

.screen--quiz {
  padding: 32px 0 48px;
}

.screen--quiz .container--quiz {
  max-width: 700px;
}

.screen.hidden {
  display: none !important;
}

.quiz-step {
  display: none;
  animation: quizSlideIn 0.5s ease-out;
}

.quiz-step.active {
  display: block;
}

.quiz-step.exit {
  animation: quizSlideOut 0.4s ease-out forwards;
}

@keyframes quizSlideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes quizSlideOut {
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

.quiz-step__title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  margin: 0 0 28px;
  line-height: 1.35;
}

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

.option {
  display: flex;
  align-items: center;
  padding: 18px 22px;
  background: var(--color-bg-white);
  border: 2px solid #e8e6e3;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.option:hover {
  border-color: var(--color-accent-light);
  background: var(--color-accent-light);
  transform: translateX(6px);
}

.option input {
  margin: 0 14px 0 0;
  accent-color: var(--color-accent);
  width: 20px;
  height: 20px;
}

.option input:checked + span {
  font-weight: 600;
  color: var(--color-accent);
}

.option:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

/* ===== Page statistiques ===== */
.stats-screen {
  padding: 20px 0;
}

.stats-screen__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 32px;
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--color-bg-white);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: statPop 0.6s ease-out backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.stat-card__value {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.stat-card__label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.stats-screen__source {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  font-style: italic;
}

.stats-screen .btn {
  display: block;
  margin: 0 auto;
}

@keyframes statPop {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===== Résultat ===== */
.result-screen {
  text-align: center;
  padding: 40px 0;
}

.result-screen__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 20px;
}

.result-screen__text {
  color: var(--color-text-muted);
  margin: 0 0 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.result-screen__text--hide {
  display: none;
}

/* ===== Navigation quiz ===== */
/* ===== Footer ===== */
.footer {
  background: var(--color-green-bg);
  color: #fff;
  padding: 40px 0 32px;
  margin-top: 60px;
}

.footer__container {
  text-align: center;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.footer__links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: #fff;
}

.footer__copy {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* ===== Pages légales ===== */
.page-legal {
  padding: 100px 0 80px;
  min-height: 80vh;
}

.page-legal .container {
  max-width: 720px;
}

.page-legal h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 12px;
}

.page-legal .meta {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 40px;
}

.page-legal h2 {
  font-size: 1.35rem;
  margin: 32px 0 12px;
}

.page-legal p,
.page-legal li {
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.page-legal ul {
  padding-left: 24px;
}

.page-legal a {
  color: var(--color-accent);
  text-decoration: none;
}

.page-legal a:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 24px;
  transition: gap var(--transition);
}

.back-link:hover {
  gap: 12px;
}

/* Formulaire contact */
.contact-form {
  max-width: 480px;
  margin: 24px 0 40px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 1rem;
  border: 2px solid #e8e6e3;
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.contact-form p {
  margin-bottom: 20px;
}

.contact-form .btn {
  margin-top: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header {
    padding: 12px 20px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .quiz-nav {
    flex-direction: column;
  }

  .quiz-nav .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .footer__links {
    flex-direction: column;
  }
}

/* ===== Animations avancées ===== */
.header {
  transition: box-shadow var(--transition), transform var(--transition);
}

.header.scrolled {
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.08);
}

.option {
  animation: optionReveal 0.5s ease-out backwards;
}

.quiz-step[data-step="1"] .option:nth-child(1) { animation-delay: 0.05s; }
.quiz-step[data-step="1"] .option:nth-child(2) { animation-delay: 0.1s; }
.quiz-step[data-step="1"] .option:nth-child(3) { animation-delay: 0.15s; }
.quiz-step[data-step="2"] .option:nth-child(1) { animation-delay: 0.05s; }
.quiz-step[data-step="2"] .option:nth-child(2) { animation-delay: 0.1s; }
.quiz-step[data-step="2"] .option:nth-child(3) { animation-delay: 0.15s; }
.quiz-step[data-step="3"] .option:nth-child(1) { animation-delay: 0.05s; }
.quiz-step[data-step="3"] .option:nth-child(2) { animation-delay: 0.1s; }
.quiz-step[data-step="3"] .option:nth-child(3) { animation-delay: 0.15s; }
.quiz-step[data-step="4"] .option:nth-child(1) { animation-delay: 0.05s; }
.quiz-step[data-step="4"] .option:nth-child(2) { animation-delay: 0.1s; }
.quiz-step[data-step="4"] .option:nth-child(3) { animation-delay: 0.15s; }
.quiz-step[data-step="5"] .option:nth-child(1) { animation-delay: 0.05s; }
.quiz-step[data-step="5"] .option:nth-child(2) { animation-delay: 0.1s; }
.quiz-step[data-step="5"] .option:nth-child(3) { animation-delay: 0.15s; }
.quiz-step[data-step="6"] .option:nth-child(1) { animation-delay: 0.05s; }
.quiz-step[data-step="6"] .option:nth-child(2) { animation-delay: 0.1s; }
.quiz-step[data-step="6"] .option:nth-child(3) { animation-delay: 0.15s; }

@keyframes optionReveal {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.quiz-step__title {
  animation: titleReveal 0.5s ease-out;
}

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

.footer__links a {
  position: relative;
}

.footer__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #fff;
  transition: width var(--transition);
}

.footer__links a:hover::after {
  width: 100%;
}

.page-legal h1 {
  animation: fadeUp 0.6s ease-out;
}

.page-legal .back-link {
  animation: fadeIn 0.5s ease-out;
}

/* Result screen animation */
.result-screen.active .result-screen__title {
  animation: fadeUp 0.6s ease-out;
}

.result-screen.active .result-screen__text {
  animation: fadeUp 0.6s ease-out 0.1s backwards;
}

.result-screen.active .btn {
  animation: fadeUp 0.6s ease-out 0.2s backwards;
}
