@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --blue: #185FA5;
  --blue-dark: #0C447C;
  --blue-glacier: #F5FAFE;
  --blue-glacier-2: #EAF3FB;
  --blue-pastel: #E6F1FB;
  --green: #639922;
  --green-pastel: #EAF3DE;
  --green-dark: #3B6D11;
  --amber-pastel: #FAEEDA;
  --amber-dark: #633806;
  --text-primary: #0C243B;
  --text-secondary: #5F6B75;
  --text-muted: #93A0AA;
  --border: #E4EAF0;
  --white: #FFFFFF;
  --radius-card: 16px;
  --radius-pill: 999px;
  --shadow-soft: 0 2px 14px rgba(12, 36, 59, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, sans-serif;
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.leaves-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.leaf {
  position: absolute;
  opacity: 0.18;
  animation: float-leaf linear infinite;
}

@keyframes float-leaf {
  0%   { transform: translateY(-10vh) translateX(0) rotate(0deg); }
  50%  { transform: translateY(50vh) translateX(30px) rotate(180deg); }
  100% { transform: translateY(110vh) translateX(-10px) rotate(360deg); }
}

.snowflake {
  position: absolute;
  opacity: 0.18;
  animation: float-snow linear infinite;
}

@keyframes float-snow {
  0%   { transform: translateY(-10vh) translateX(0) rotate(0deg); }
  50%  { transform: translateY(50vh) translateX(-30px) rotate(-180deg); }
  100% { transform: translateY(110vh) translateX(10px) rotate(-360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .leaf, .snowflake { animation: none; display: none; }
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Nav */
header.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  text-decoration: none;
}

.logo svg { flex-shrink: 0; }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--blue-glacier) 0%, var(--blue-glacier-2) 100%);
  border-radius: 24px;
  text-align: center;
  padding: 64px 24px 52px;
  margin: 12px 0 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--green-dark);
  background: var(--green-pastel);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

h1.hero-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 14px;
  color: var(--text-primary);
}

.hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 460px;
  margin: 0 auto 28px;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 15px 32px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn-primary:hover { background: var(--blue-dark); }

.hero-timer {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 14px;
}

.showcase-section { margin: 50px 0 40px; }
.showcase-section h3 { font-size: 20px; font-weight: 600; text-align: center; margin: 0 0 6px; }
.showcase-section p { font-size: 13px; color: var(--text-secondary); text-align: center; margin: 0 0 24px; }
.showcase-cards .result-image { height: 130px; }
.showcase-cards .result-image svg { width: 78px; height: 78px; }

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.feature-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 22px;
}

.feature-card h3 { font-size: 15px; font-weight: 500; margin: 12px 0 6px; }
.feature-card p { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* Questionnaire */
.quiz-panel {
  max-width: 460px;
  margin: 0 auto 60px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  padding: 36px 30px 30px;
}

.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}
.quiz-step-label { color: var(--text-muted); font-weight: 500; }
.quiz-percent { color: var(--blue); font-weight: 500; }

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--blue-pastel);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 30px;
}
.progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

.quiz-question { font-size: 19px; font-weight: 600; margin: 0 0 4px; }
.quiz-hint { font-size: 13px; color: var(--text-secondary); margin: 0 0 22px; }

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.option-btn:hover { border-color: var(--blue); }
.option-btn.selected {
  background: var(--blue-glacier);
  border: 1.5px solid var(--blue);
  font-weight: 500;
}
.option-btn .check { margin-left: auto; color: var(--blue); display: none; }
.option-btn.selected .check { display: inline; }

.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
}
.btn-back {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-next {
  background: var(--blue);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 24px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.btn-next:disabled { opacity: 0.4; cursor: not-allowed; }

/* Results */
.results-section { display: none; margin-bottom: 60px; }
.results-intro { text-align: center; margin-bottom: 32px; }
.results-intro h2 { font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.results-intro p { font-size: 14px; color: var(--text-secondary); margin: 0; }

.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 22px;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}
.tab-btn:hover { border-color: var(--blue); color: var(--blue); }
.tab-btn.active { background: var(--text-primary); border-color: var(--text-primary); color: #fff; }

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.result-image {
  position: relative;
  height: 150px;
  background: linear-gradient(180deg, var(--blue-glacier) 0%, var(--blue-glacier-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-image svg { width: 92px; height: 92px; }

.rank-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  color: #fff;
}
.rank-1 .rank-pill { background: #EF9F27; }
.rank-2 .rank-pill { background: #6B7784; }
.rank-3 .rank-pill { background: var(--green); }

.result-body { flex: 1; display: flex; flex-direction: column; padding: 18px; }
.result-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.result-name { font-size: 15px; font-weight: 600; line-height: 1.3; }
.result-brand { font-size: 11px; color: var(--text-muted); margin: 0 0 8px; }
.badge {
  font-size: 10px; font-weight: 500; padding: 3px 10px; border-radius: var(--radius-pill);
  background: var(--amber-pastel); color: var(--amber-dark);
  white-space: nowrap;
}
.type-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}
.type-portatif { background: #E9F4E0; color: #4A7A1E; }
.type-mural { background: #FBEFE0; color: #A2610F; }

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  margin: 6px 0 14px;
  padding: 12px;
  background: var(--blue-glacier);
  border-radius: 10px;
}
.stat { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.stat svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--blue); }
.stat b { color: var(--text-primary); font-weight: 500; }

.result-footer { margin-top: auto; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.price-value { font-size: 20px; font-weight: 600; color: var(--text-primary); }
.score-badge { font-size: 13px; font-weight: 600; color: var(--green-dark); }
.score-badge span { font-size: 11px; color: var(--text-muted); font-weight: 400; }

.link-btn {
  font-size: 12px; color: var(--blue); text-decoration: none; font-weight: 500;
  cursor: pointer; background: none; border: none; font-family: inherit; padding: 0; margin-bottom: 10px; display: inline-block;
}
.buy-btn {
  display: block;
  text-align: center;
  background: var(--blue); color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 500; padding: 12px 18px; border-radius: var(--radius-pill);
}
.buy-btn:hover { background: var(--blue-dark); }

.restart-link {
  display: block; text-align: center; margin-top: 24px; font-size: 13px; color: var(--text-muted);
  cursor: pointer; background: none; border: none; font-family: inherit;
}

/* Product detail */
.detail-panel {
  display: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-top: 14px;
  background: var(--blue-glacier);
}
.db-scale { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; }
.db-row { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.db-bar { width: 60px; height: 6px; border-radius: 999px; background: var(--border); }
.db-row.active { font-weight: 600; }
.db-row.active .db-bar { background: var(--blue); }

footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 30px 0 50px;
}

@media (max-width: 600px) {
  .quiz-panel { padding: 28px 20px; }
  .result-card { flex-direction: column; }
  .buy-btn { margin-left: 0; }
}
