/* ------------------------------------------------------------------ */
/* Reset & base                                                         */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #f8fafc;
  --surface:  #ffffff;
  --surface2: #f1f5f9;
  --border:   #e2e8f0;
  --accent:   #1e7e8e;
  --accent-h: #166070;
  --accent-lt:#e6f4f6;
  --text:     #0f172a;
  --muted:    #64748b;
  --radius:   10px;
  --shadow-sm: 0 1px 4px rgba(15,23,42,.07);
  --shadow:    0 4px 20px rgba(15,23,42,.09);
  --shadow-lg: 0 8px 32px rgba(15,23,42,.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ */
/* Navbar                                                              */
/* ------------------------------------------------------------------ */
.navbar {
  display: flex;
  align-items: center;
  padding: 0 2.5rem;
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand { text-decoration: none; display: flex; align-items: center; }

.navbar-logo { height: 36px; width: auto; display: block; }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.hero {
  padding: 5rem 1.5rem 4.5rem;
  text-align: center;
  background: linear-gradient(160deg, #ffffff 0%, #e6f4f6 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 680px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: var(--accent-lt);
  color: var(--accent);
  border: 1px solid #9dd0d8;
  border-radius: 999px;
  padding: .3rem 1rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.18;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -.02em;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2.25rem;
}

.hero-hint {
  margin-top: 1.1rem;
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .02em;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: .65rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: none;
  transition: background .18s, box-shadow .18s, transform .15s;
  text-decoration: none;
  letter-spacing: .01em;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30,126,142,.3);
}

.btn-primary:hover {
  background: var(--accent-h);
  box-shadow: 0 4px 14px rgba(30,126,142,.35);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface2);
  border-color: #cbd5e1;
  text-decoration: none;
}

.btn-lg { padding: .85rem 2rem; font-size: 1.05rem; }

/* ------------------------------------------------------------------ */
/* Pillars section                                                     */
/* ------------------------------------------------------------------ */
.pillars {
  padding: 5rem 1.5rem;
  max-width: 1040px;
  margin: 0 auto;
}

.pillars h2 {
  text-align: center;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: .6rem;
}

.pillars-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 2.5rem;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1.25rem;
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}

.pillar-card:hover {
  box-shadow: var(--shadow);
  border-color: #9dd0d8;
  transform: translateY(-2px);
}

.pillar-icon {
  font-size: 1.75rem;
  margin-bottom: .65rem;
  display: block;
}

.pillar-card h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .4rem;
}

.pillar-card p {
  font-size: .8rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ------------------------------------------------------------------ */
/* CTA section                                                        */
/* ------------------------------------------------------------------ */
.cta-section {
  background: var(--accent);
  padding: 5rem 1.5rem;
  text-align: center;
}

.cta-inner { max-width: 580px; margin: 0 auto; }

.cta-inner h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.75rem;
  letter-spacing: -.01em;
  line-height: 1.3;
}

.cta-section .btn-primary {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}

.cta-section .btn-primary:hover {
  background: #e6f4f6;
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}

/* ------------------------------------------------------------------ */
/* Quiz / Question page                                                */
/* ------------------------------------------------------------------ */
.quiz-section {
  flex: 1;
  padding: 3.5rem 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: var(--bg);
}

.quiz-container {
  width: 100%;
  max-width: 680px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}

.pillar-tag {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .07em;
}

.progress-counter {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 500;
}

.progress-bar-wrap {
  width: 100%;
  height: 5px;
  background: var(--border);
  border-radius: 99px;
  margin-bottom: 2.75rem;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width .4s ease;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.75rem;
  line-height: 1.4;
  letter-spacing: -.01em;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-bottom: 2.25rem;
}

.option-card {
  display: block;
  cursor: pointer;
}

.option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: .95rem 1.2rem;
  transition: border-color .15s, background .15s, box-shadow .15s;
  box-shadow: var(--shadow-sm);
}

.option-card:hover .option-inner {
  border-color: #7ec4cc;
  background: #f0f8f9;
  box-shadow: var(--shadow-sm);
}

.option-card.selected .option-inner {
  border-color: var(--accent);
  background: var(--accent-lt);
  box-shadow: 0 0 0 3px rgba(30,126,142,.1);
}

.option-letter {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  transition: background .15s, color .15s, border-color .15s;
}

.option-card.selected .option-letter {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.option-text {
  font-size: .92rem;
  color: var(--text);
  line-height: 1.5;
  padding-top: 3px;
}

.quiz-actions { display: flex; justify-content: flex-end; }

/* ------------------------------------------------------------------ */
/* Contact form                                                        */
/* ------------------------------------------------------------------ */
.form-hint {
  font-size: .87rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.contact-form { width: 100%; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.form-group label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.form-group input,
.form-group select {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: .65rem .9rem;
  font-size: .93rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}

.form-group input::placeholder { color: #b0bec5; }

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30,126,142,.1);
}

/* ------------------------------------------------------------------ */
/* Merci page                                                         */
/* ------------------------------------------------------------------ */
.merci-section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: var(--bg);
}

.merci-container {
  max-width: 720px;
  width: 100%;
  text-align: center;
}

.merci-icon { font-size: 2.75rem; margin-bottom: 1rem; }

.merci-container h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: .65rem;
}

.merci-sub {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 2rem;
}

.score-card {
  background: var(--accent-lt);
  border: 2px solid #c0674f;
  border-radius: 14px;
  padding: 1.25rem 2rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.score-label {
  font-size: 1.25rem;
  font-weight: 800;
  color: #c0674f;
  letter-spacing: -.01em;
}

/* ── Pillar chart ── */
.pillar-chart-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.section-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .875rem;
}

.pillar-chart { width: 100%; }

.chart-row {
  display: grid;
  grid-template-columns: 38% 1fr 10%;
  align-items: center;
  gap: .5rem;
  padding: .3rem 0;
}

.chart-header-row { padding-bottom: .1rem; }

.chart-label {
  font-size: .82rem;
  color: var(--text);
  text-align: right;
  padding-right: .75rem;
  line-height: 1.3;
}

.chart-score-col {
  font-size: .78rem;
  color: var(--muted);
  padding-left: .4rem;
}

.chart-row.weakest .chart-score-col {
  color: #c0674f;
  font-weight: 700;
}

/* Level name header */
.level-header {
  display: flex;
  width: 100%;
}

.level-header span {
  flex: 1;
  font-size: .62rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  text-align: center;
  padding: .25rem .1rem;
  border-right: 2px solid #4aa8b8;
}

.level-header span:last-child { border-right: none; }

/* Bar */
.chart-bar-wrap {
  position: relative;
  height: 18px;
  background: #e8edf2;
  border-radius: 3px;
  overflow: hidden;
}

.zone-bg {
  position: absolute;
  inset: 0;
  display: flex;
  z-index: 2;
  pointer-events: none;
}

.zone {
  flex: 1;
  border-right: 2px solid #fff;
}

.last-zone { border-right: none; }

.bar-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 3px 0 0 3px;
  z-index: 1;
  transition: width .4s ease;
}

.chart-row.weakest .bar-fill { background: #c0674f; }

/* Methodological note */
.methodological-note {
  margin-top: 1rem;
  font-size: .8rem;
  color: var(--muted);
  font-style: italic;
  border-left: 2px solid #cbd5e1;
  padding-left: .75rem;
  line-height: 1.55;
}

.recommendations-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.recommendations-box > h3 {
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1rem;
}

.rec-item {
  padding: .75rem 0;
  border-top: 1px solid var(--border);
}

.rec-item:first-of-type { border-top: none; padding-top: 0; }

.rec-pillar {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.rec-score {
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-lt);
  border-radius: 20px;
  padding: .1rem .5rem;
}

.rec-item p { font-size: .9rem; color: var(--muted); line-height: 1.6; margin: 0; }

.analysis-box {
  background: #f8fafc;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.analysis-box h3 {
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .5rem;
}

.analysis-box p { font-size: .91rem; color: var(--text); line-height: 1.6; }

.merci-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}

.merci-cta > p { color: var(--muted); font-size: .9rem; }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer a { color: var(--muted); }
.footer a:hover { color: var(--accent); }
