/* ===== Charte Esprit Riche ===== */
:root {
  --gold: #EFA836;          /* couleur principale */
  --blue: #0458A2;          /* couleur secondaire */
  --gold-soft: #fdf2dc;
  --blue-soft: #e4eef8;
  --red: #C0392B;           /* faille / danger — seule couleur hors charte, modifiable ici */
  --red-soft: #fbeae8;

  --ink: #1d1d1f;
  --muted: #6c6c70;
  --line: #e9e4d8;
  --card: #ffffff;
  --bg: #faf6ee;

  /* bandes de score */
  --good: var(--blue);
  --warn: var(--gold);
  --bad: var(--red);

  --font-title: "League Spartan", "Century Gothic", "Lato", sans-serif;
  --font-body: "Lato", "Century Gothic", system-ui, sans-serif;

  --radius: 14px;
  --maxw: 640px;
}

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app { max-width: var(--maxw); margin: 0 auto; padding: 24px 18px 64px; min-height: 100vh; }

h1, h2, h3, .title { font-family: var(--font-title); font-weight: 600; letter-spacing: -0.01em; line-height: 1.15; }

/* ===== Progression ===== */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand { font-family: var(--font-title); font-weight: 700; color: var(--blue); font-size: 18px; }
.brand span { color: var(--gold); }
.progress { flex: 1; height: 8px; background: #ece6da; border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--gold); border-radius: 99px; transition: width .3s ease; }
.progress-label { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ===== Boutons ===== */
.btn {
  font-family: var(--font-body); font-weight: 700; font-size: 16px;
  border: none; border-radius: 99px; padding: 14px 26px; cursor: pointer;
  background: var(--gold); color: #fff; transition: filter .15s, transform .05s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px; justify-content: center;
}
.btn:hover { filter: brightness(.96); }
.btn:active { transform: scale(.99); }
.btn-blue { background: var(--blue); }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ===== Intro ===== */
.intro { text-align: center; padding-top: 28px; }
.intro h1 { font-size: 34px; margin-bottom: 16px; }
.intro h1 .hl { color: var(--gold); }
.intro p { color: var(--muted); font-size: 17px; max-width: 460px; margin: 0 auto 28px; }
.intro .meta { display: flex; gap: 22px; justify-content: center; margin: 24px 0 32px; flex-wrap: wrap; }
.intro .meta div { font-size: 14px; color: var(--muted); }
.intro .meta b { display: block; font-family: var(--font-title); font-size: 24px; color: var(--blue); }

/* ===== Question ===== */
.q-cat { font-family: var(--font-title); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.q-title { font-size: 24px; margin-bottom: 6px; }
.q-sub { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; font-size: 16px; color: var(--ink);
  transition: border-color .12s, background .12s;
}
.opt:hover { border-color: var(--gold); }
.opt.sel { border-color: var(--blue); background: var(--blue-soft); }
.opt .box { flex: 0 0 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; }
.opt.round .box { border-radius: 50%; }
.opt.sel .box { border-color: var(--blue); background: var(--blue); color: #fff; }
.opt .box svg { width: 13px; height: 13px; display: none; }
.opt.sel .box svg { display: block; }
.q-nav { display: flex; gap: 12px; }

/* ===== Capture ===== */
.capture { text-align: center; padding-top: 18px; }
.capture h2 { font-size: 26px; margin-bottom: 8px; }
.capture p { color: var(--muted); margin-bottom: 24px; }
.field { text-align: left; margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.field input { width: 100%; font-family: var(--font-body); font-size: 16px; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; }
.field input:focus { outline: none; border-color: var(--blue); }
.consent { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 13px; color: var(--muted); margin: 8px 0 22px; }
.consent input { margin-top: 3px; }

/* aperçu flouté derrière le formulaire de capture */
.tease { position: relative; margin-top: 6px; }
.tease-blur {
  filter: blur(2px); opacity: .95; pointer-events: none; user-select: none;
  max-height: 720px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent);
  mask-image: linear-gradient(to bottom, #000 80%, transparent);
}
.tease-form { position: absolute; top: 24px; left: 0; right: 0; display: flex; justify-content: center; padding: 0 10px; }
.tease-card {
  background: rgba(255, 255, 255, .9); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px 20px; width: 100%; max-width: 360px; box-shadow: 0 16px 44px rgba(20, 20, 20, .22);
}
.tease-card .lock { width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 50%; background: var(--gold-soft); color: #9a6a12; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.tease-card h3 { text-align: center; font-size: 19px; margin-bottom: 4px; }
.tease-card .sub { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 16px; }

/* ===== Résultat ===== */
.result h3 { font-size: 18px; margin: 26px 0 12px; }
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }

.verdict { text-align: center; border-radius: var(--radius); padding: 28px 22px; margin-bottom: 8px; }
.verdict.good { background: var(--blue-soft); border: 1.5px solid var(--blue); }
.verdict.warn { background: var(--gold-soft); border: 1.5px solid var(--gold); }
.verdict.bad  { background: var(--red-soft); border: 1.5px solid var(--red); }
.verdict .badge { display: inline-block; background: #fff; font-family: var(--font-title); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 6px 14px; border-radius: 99px; }
.verdict.good .badge { color: var(--blue); } .verdict.warn .badge { color: #9a6a12; } .verdict.bad .badge { color: var(--red); }
.verdict .score { font-family: var(--font-title); font-weight: 700; font-size: 56px; margin: 12px 0 4px; }
.verdict .score small { font-size: 28px; color: var(--muted); font-weight: 600; }
.verdict .vtitle { font-size: 20px; font-family: var(--font-title); font-weight: 600; max-width: 30ch; margin: 0 auto; }
.verdict .vsub { color: var(--muted); font-size: 15px; margin-top: 8px; max-width: 44ch; margin-left: auto; margin-right: auto; }

.legend { display: flex; justify-content: center; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }

/* cartes catégorie */
.cat-head { display: flex; align-items: center; gap: 12px; }
.cat-ic { flex: 0 0 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.cat-name { font-family: var(--font-title); font-weight: 600; font-size: 16px; }
.cat-tag { font-size: 13px; color: var(--muted); }
.cat-score { font-family: var(--font-title); font-weight: 700; font-size: 22px; }
.cat-score small { font-size: 13px; color: var(--muted); font-weight: 600; }
.dim-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.dim-lab { flex: 0 0 150px; font-size: 14px; }
.dim-track { flex: 1; height: 8px; border-radius: 99px; background: #ece6da; }
.dim-fill { display: block; height: 100%; border-radius: 99px; }
.dim-val { flex: 0 0 46px; text-align: right; font-weight: 700; font-size: 14px; }

/* alertes */
.alert { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.alert.s3 { background: var(--red-soft); border: 1.5px solid var(--red); }
.alert.s2 { background: var(--gold-soft); border: 1.5px solid var(--gold); }
.alert.s1 { background: var(--blue-soft); border: 1.5px solid var(--blue); }
.alert .at { font-weight: 700; font-size: 14px; }
.alert .as { font-size: 13px; margin-top: 2px; }
.alert.s3 .at, .alert.s3 .as { color: #8e271d; }
.alert.s2 .at, .alert.s2 .as { color: #8a5e10; }
.alert.s1 .at, .alert.s1 .as { color: #084a86; }

/* leviers */
.lever { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 10px; display: flex; gap: 14px; }
.lever .n { flex: 0 0 28px; height: 28px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 700; font-size: 14px; }
.lever .lt { font-family: var(--font-title); font-weight: 600; font-size: 15px; }
.lever .imp { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; margin-left: 6px; vertical-align: middle; }
.lever .imp.high { background: var(--red-soft); color: var(--red); }
.lever .imp.med { background: var(--gold-soft); color: #8a5e10; }
.lever .imp.low { background: var(--blue-soft); color: var(--blue); }
.lever .ls { font-size: 14px; color: var(--muted); margin: 4px 0 10px; }
.lever .res { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.res-btn { font-size: 13px; font-weight: 700; text-decoration: none; background: var(--gold); color: #fff; border-radius: 99px; padding: 7px 14px; display: inline-flex; gap: 6px; align-items: center; }
.res-link { font-size: 13px; text-decoration: none; color: var(--blue); }

.cta { background: var(--blue); color: #fff; border-radius: var(--radius); padding: 22px; text-align: center; margin-top: 8px; }
.cta h3 { color: #fff; margin: 0 0 6px; font-size: 19px; }
.cta p { color: #d6e4f3; font-size: 14px; margin-bottom: 16px; }
.cta .btn { background: var(--gold); }

.foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 28px; }
.foot a { color: var(--blue); }

@media (max-width: 480px) {
  .intro h1 { font-size: 28px; }
  .dim-lab { flex-basis: 120px; }
}
