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

/* ============================================================
   REKO — charte graphique (reprise de src/index.css)
   ============================================================ */

:root {
  --font-sora: 'Sora', sans-serif;

  --indigo: #3D3B8E;
  --amber:  #F5A623;
  --ink:    #1A2B4A;
  --cream:  #F5F2EC;
  --red:    #E53E3E;

  --ink-90: rgba(26, 43, 74, 0.90);
  --ink-66: rgba(26, 43, 74, 0.66);
  --ink-55: rgba(26, 43, 74, 0.55);
  --ink-44: rgba(26, 43, 74, 0.44);
  --ink-18: rgba(26, 43, 74, 0.18);
  --ink-15: rgba(26, 43, 74, 0.15);
  --ink-08: rgba(26, 43, 74, 0.08);
  --ink-05: rgba(26, 43, 74, 0.05);
  --ink-04: rgba(26, 43, 74, 0.04);

  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sora);
  background-color: var(--cream);
  color: var(--ink);
  background-image:
    linear-gradient(var(--ink-04) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-04) 1px, transparent 1px);
  background-size: 40px 40px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap    { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.wrap-sm { max-width: 56rem; margin: 0 auto; padding: 0 1.5rem; }
.hidden  { display: none !important; }

/* ---------- Nav ---------- */
nav.topbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 72rem; margin: 0 auto; padding: 2rem 1.5rem 1rem;
}
.logo { display: inline-flex; align-items: center; gap: 1px; text-decoration: none; font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; color: var(--ink); }
.logo .dot { color: var(--amber); }
.logo-sm { font-size: 1.25rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-sora); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; font-size: 0.875rem;
  padding: 1rem 2rem; border: none; border-radius: var(--radius);
  background: var(--indigo); color: #fff; cursor: pointer;
  text-decoration: none; transition: opacity .2s;
}
.btn:hover { opacity: 0.9; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm { padding: 0.625rem 1.25rem; font-size: 0.875rem; font-weight: 600; text-transform: none; letter-spacing: normal; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 2px solid var(--ink-18);
  font-weight: 600; text-transform: none; letter-spacing: normal;
  padding: 0.75rem 2rem;
}
.btn-ghost:hover { opacity: 0.8; }

/* ---------- Home ---------- */
.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 0.375rem 0.75rem; border-radius: var(--radius);
  background: #3D3B8E15; color: var(--indigo); margin-bottom: 2rem;
}
.hero { padding: 5rem 1.5rem 6rem; max-width: 72rem; margin: 0 auto; }
.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4.5rem); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 1.5rem; max-width: 48rem;
}
.hero h1 .accent { color: var(--indigo); }
.hero p.lead {
  font-size: clamp(1.125rem, 2vw, 1.25rem); font-weight: 400;
  line-height: 1.65; color: var(--ink-90); margin-bottom: 2.5rem; max-width: 36rem;
}
.cta-row { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.cta-note { font-size: 0.75rem; color: var(--ink-66); }

.steps { display: grid; gap: 1.5rem; padding: 0 1.5rem 6rem; max-width: 72rem; margin: 0 auto; }
.step {
  padding: 1.5rem; border-radius: var(--radius);
  background: rgba(255,255,255,0.6); border: 1px solid var(--ink-08);
}
.step-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.step-num { font-size: 1.875rem; font-weight: 700; color: var(--amber); line-height: 1; }
.step-icon { width: 20px; height: 20px; margin-top: 4px; color: var(--indigo); flex-shrink: 0; }
.step h3 { font-weight: 700; font-size: 1rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.875rem; font-weight: 400; line-height: 1.6; color: var(--ink-66); }

.conviction { background: var(--ink); padding: 3rem 1.5rem; }
.conviction p {
  max-width: 56rem; margin: 0 auto; text-align: center;
  font-size: clamp(1.125rem, 2vw, 1.25rem); font-weight: 600;
  line-height: 1.6; color: var(--cream);
}
.conviction .accent { color: var(--amber); }

footer.site {
  background: var(--cream); padding: 1.5rem; text-align: center;
  font-size: 0.75rem; font-weight: 400; color: var(--ink-66);
}
footer.site a { color: inherit; text-decoration: underline; }
footer.site a:hover { opacity: 0.7; }

/* ---------- Questionnaire ---------- */
.q-screen { max-width: 44rem; margin: 0 auto; padding: 1rem 1.5rem 5rem; }
.progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.75rem; font-weight: 600; color: var(--ink-66); margin-bottom: 0.5rem;
}
.progress-track { height: 4px; background: var(--ink-08); border-radius: 999px; overflow: hidden; margin-bottom: 3rem; }
.progress-fill { height: 100%; background: var(--indigo); transition: width .3s ease; }

.q-axis {
  font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--indigo); margin-bottom: 0.75rem;
}
.q-text {
  font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 700;
  line-height: 1.35; letter-spacing: -0.01em; margin-bottom: 2rem;
}
.options { display: flex; flex-direction: column; gap: 0.75rem; }
.option {
  display: flex; align-items: center; gap: 0.875rem; width: 100%; text-align: left;
  font-family: var(--font-sora); font-size: 0.9375rem; font-weight: 400; color: var(--ink);
  padding: 1rem 1.25rem; border-radius: var(--radius);
  border: 2px solid var(--ink-15); background: rgba(255,255,255,0.6);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.option:hover { border-color: var(--indigo); }
.option.selected { border-color: var(--indigo); background: #3D3B8E0D; }
.option .mark {
  width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid var(--ink-18); position: relative;
}
.option.selected .mark { border-color: var(--indigo); }
.option.selected .mark::after {
  content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--indigo);
}
.option.check .mark { border-radius: 3px; }
.option.check.selected .mark::after { border-radius: 1px; }

.text-input, .email-input {
  width: 100%; font-family: var(--font-sora); font-size: 1rem; font-weight: 400;
  padding: 1rem 1.25rem; border-radius: var(--radius);
  border: 2px solid var(--ink-15); background: rgba(255,255,255,0.8);
  color: var(--ink); outline: none; transition: border-color .15s;
}
.text-input:focus, .email-input:focus { border-color: var(--indigo); }
.email-input { text-align: center; }

.q-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 2.5rem; gap: 1rem; }
.link-back {
  background: none; border: none; font-family: var(--font-sora);
  font-size: 0.875rem; font-weight: 600; color: var(--ink-55);
  cursor: pointer; display: inline-flex; align-items: center; gap: 0.375rem;
}
.link-back:hover { color: var(--ink); }
.link-back:disabled { opacity: 0.3; cursor: not-allowed; }

/* ---------- Email collect ---------- */
.email-screen {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 0 1.5rem; text-align: center;
}
.email-inner { width: 100%; max-width: 28rem; }
.email-icon {
  width: 56px; height: 56px; margin: 0 auto 1.5rem;
  display: flex; align-items: center; justify-content: center;
  background: #3D3B8E12; border-radius: var(--radius); color: var(--indigo);
}
.email-screen h1 { font-size: clamp(1.875rem, 4vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
.email-screen .sub { font-size: 1rem; font-weight: 400; color: var(--ink-66); margin-bottom: 2.5rem; }
.email-form { display: flex; flex-direction: column; gap: 1rem; }
.privacy { margin-top: 2rem; font-size: 0.75rem; font-weight: 400; line-height: 1.6; color: rgba(26,43,74,0.33); }

/* ---------- Results ---------- */
.card {
  background: rgba(255,255,255,0.7); border: 1px solid rgba(26,43,74,0.1);
  border-radius: var(--radius); padding: 24px;
}
.results-wrap { max-width: 56rem; margin: 0 auto; padding: 1rem 1.5rem 5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.results-title h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -0.02em; }
.rule { width: 40px; height: 4px; background: var(--amber); margin-top: 0.75rem; }
.card h2 { font-size: 1rem; font-weight: 700; margin-bottom: 1.5rem; }
.card h2.center { text-align: center; margin-bottom: 1rem; }

.axis-row { margin-bottom: 1.25rem; }
.axis-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.375rem; }
.axis-name { font-size: 0.875rem; font-weight: 600; }
.axis-score { font-size: 1rem; font-weight: 700; }
.axis-ref { font-size: 0.75rem; font-weight: 400; color: var(--ink-66); }
.axis-ref .val { color: var(--ink-44); }
.axis-track { position: relative; height: 8px; border-radius: 999px; overflow: hidden; background: var(--ink-08); }
.axis-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; opacity: 0.8; transition: width .7s ease; }
.axis-marker { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--amber); }

.profile-box { padding: 1.5rem; border-radius: var(--radius); border-width: 2px; border-style: solid; }
.profile-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.profile-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; }
.profile-msg { font-size: 0.9375rem; font-weight: 400; line-height: 1.7; }

.contact-box { padding: 1.5rem; border: 2px solid var(--indigo); border-radius: var(--radius); background: #3D3B8E06; }
.contact-kicker { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--indigo); margin-bottom: 0.25rem; }
.contact-name { font-size: 1rem; font-weight: 700; margin-bottom: 1.5rem; }
.contact-list { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-list a { display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; font-weight: 400; color: var(--ink); text-decoration: none; }
.contact-list a:hover { opacity: 0.7; }
.contact-list svg { color: var(--indigo); flex-shrink: 0; }

#radar { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.radar-legend { display: flex; justify-content: center; gap: 1.5rem; margin-top: 0.75rem; font-size: 0.75rem; color: var(--ink-66); }
.radar-legend span { display: inline-flex; align-items: center; gap: 0.375rem; }
.swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .cta-row { flex-direction: row; align-items: center; gap: 1rem; }
  .step { padding: 1.5rem; }
}

/* ---------- Admin ---------- */
.admin-body { padding: 2rem 1.5rem 5rem; max-width: 90rem; margin: 0 auto; }
.admin-login { max-width: 24rem; margin: 6rem auto; text-align: center; }
.admin-login h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.admin-head h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.admin-count { font-size: 0.875rem; color: var(--ink-66); }
table.admin { width: 100%; border-collapse: collapse; font-size: 0.8125rem; background: rgba(255,255,255,0.7); }
table.admin th, table.admin td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--ink-08); }
table.admin th { font-weight: 700; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-66); }
table.admin tr:hover td { background: rgba(255,255,255,0.5); }
.pill { display: inline-block; padding: 0.125rem 0.5rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 700; }
.pill-1 { background: #3D3B8E15; color: var(--indigo); }
.pill-2 { background: #F5A62320; color: #8a5b00; }
.pill-3 { background: rgba(229,62,62,0.12); color: var(--red); }
.error { color: var(--red); font-size: 0.875rem; margin-top: 0.75rem; }
.table-scroll { overflow-x: auto; }
