/* ==========================================================
   Diagnostic QG - Stylesheet
   Palette : #c49e58 (or) / #0e1722 (nuit) / #f5f1e8 (crème)
   Typo    : Montserrat
   ========================================================== */

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

:root {
  --gold: #c49e58;
  --gold-soft: #d9bc82;
  --gold-dark: #8d6f38;
  --night: #0e1722;
  --night-soft: #1a2532;
  --night-line: #2a3647;
  --cream: #f5f1e8;
  --cream-soft: #ece6d5;
  --text: #1a2532;
  --muted: #6c7a8a;
  --danger: #c96055;
  --warn: #d8a84a;
  --ok: #6ab07a;
  --shadow: 0 10px 30px rgba(14,23,34,0.08);
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ----- Header ----- */
.hdr {
  background: var(--night);
  color: var(--cream);
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 2px solid var(--gold);
}
.hdr .brand { display: flex; align-items: center; gap: 14px; }
.hdr .brand img { height: 44px; width: auto; border-radius: 6px; }
.hdr .brand .title { font-weight: 700; font-size: 15px; letter-spacing: 0.5px; }
.hdr .brand .sub { font-size: 12px; color: var(--gold); font-weight: 500; letter-spacing: 0.8px; text-transform: uppercase; }
.hdr .right { font-size: 13px; color: var(--gold-soft); }

/* ----- Layout ----- */
.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px 44px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
}

/* ----- Typography ----- */
h1, h2, h3 { font-family: 'Montserrat', sans-serif; color: var(--night); margin-top: 0; }
h1 { font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; }
h2 { font-size: 22px; font-weight: 600; margin-bottom: 12px; }
h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.lead { font-size: 17px; color: var(--muted); margin-bottom: 32px; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.5px; font-size: 11px; color: var(--gold); font-weight: 700; margin-bottom: 10px; }

/* ----- Progress bar ----- */
.progress {
  display: flex; gap: 6px; margin-bottom: 28px;
}
.progress .step {
  flex: 1; height: 5px; background: var(--cream-soft); border-radius: 3px; position: relative; overflow: hidden;
}
.progress .step.active { background: var(--gold); }
.progress .step.done { background: var(--night); }

/* ----- Forms ----- */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-weight: 500; margin-bottom: 6px; font-size: 14px; color: var(--night);
}
.field label .req { color: var(--danger); margin-left: 3px; }
.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=url],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit; font-size: 14px;
  border: 1px solid #d6d2c6;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196,158,88,0.15);
}
.field textarea { min-height: 90px; resize: vertical; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }

/* ----- Radio / Checkbox blocks ----- */
.options { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.opt {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e3ddd0;
  border-radius: 8px;
  background: #fffdf9;
  cursor: pointer;
  transition: all .15s;
  font-size: 14px;
}
.opt:hover { border-color: var(--gold-soft); background: #fdf8ed; }
.opt input { margin-top: 3px; accent-color: var(--gold); cursor: pointer; }
.opt.checked { border-color: var(--gold); background: #fdf5e4; }

/* ----- Question block ----- */
.q {
  padding: 22px 0;
  border-bottom: 1px solid var(--cream-soft);
}
.q:last-child { border-bottom: none; }
.q .q-head {
  display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px;
}
.q .q-id {
  font-size: 12px; font-weight: 700; color: var(--gold);
  background: rgba(196,158,88,0.12);
  padding: 2px 8px; border-radius: 4px; letter-spacing: 0.5px;
}
.q .q-text { font-weight: 500; color: var(--night); font-size: 15px; }

/* ----- Dimension header ----- */
.dim-hdr {
  display: flex; gap: 16px; align-items: center;
  padding: 22px 24px;
  background: var(--night);
  color: var(--cream);
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.dim-hdr .dim-num {
  width: 48px; height: 48px; flex-shrink: 0;
  background: var(--gold);
  color: var(--night);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-weight: 700; font-size: 20px;
}
.dim-hdr .dim-title { font-size: 18px; font-weight: 600; margin: 0; color: var(--cream); }
.dim-hdr .dim-desc { font-size: 13px; color: var(--gold-soft); margin-top: 4px; }

/* ----- Buttons ----- */
.btn-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }
.btn {
  font-family: inherit; font-weight: 600; font-size: 14px;
  padding: 13px 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.4px;
  transition: all .15s;
}
.btn-primary {
  background: var(--gold); color: var(--night);
}
.btn-primary:hover { background: var(--gold-dark); color: var(--cream); }
.btn-primary:disabled { background: #d6d2c6; cursor: not-allowed; color: var(--muted); }
.btn-ghost {
  background: transparent; color: var(--night); border: 1px solid var(--night-line);
}
.btn-ghost:hover { background: var(--cream-soft); }
.btn-dark {
  background: var(--night); color: var(--cream);
}
.btn-dark:hover { background: var(--night-soft); }

/* ----- Landing ----- */
.landing .hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
}
@media (max-width: 820px) { .landing .hero { grid-template-columns: 1fr; } }
.landing h1 { font-size: 36px; line-height: 1.15; }
.landing h1 .accent { color: var(--gold); }
.landing .pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 28px; }
.landing .pill {
  font-size: 12px; padding: 6px 12px; border-radius: 20px;
  background: var(--cream-soft); color: var(--night); font-weight: 500;
}
.landing .steps {
  margin-top: 24px; display: flex; flex-direction: column; gap: 16px;
}
.landing .step-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px; border-left: 3px solid var(--gold); background: #fffdf9;
}
.landing .step-item .n {
  width: 26px; height: 26px; flex-shrink: 0;
  background: var(--night); color: var(--gold);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.landing .step-item .t { font-weight: 600; font-size: 14px; }
.landing .step-item .d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.landing .visual {
  background: var(--night);
  border-radius: var(--radius);
  padding: 32px;
  color: var(--cream);
  border: 1px solid var(--gold);
}
.landing .visual .dim-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.landing .visual .dim-line {
  display: flex; gap: 10px; align-items: center; font-size: 13px;
  padding: 8px 10px;
  background: var(--night-soft);
  border-radius: 6px;
}
.landing .visual .dim-line .i {
  width: 26px; height: 26px; background: var(--gold); color: var(--night);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}

/* ----- Scorecard ----- */
.scorecard .global {
  text-align: center;
  padding: 28px;
  background: linear-gradient(135deg, var(--night) 0%, var(--night-soft) 100%);
  color: var(--cream);
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.scorecard .global .big-score {
  font-size: 56px; font-weight: 800; color: var(--gold); line-height: 1;
}
.scorecard .global .big-verdict {
  font-size: 16px; font-weight: 600; margin-top: 8px;
}
.scorecard .global .big-sub {
  font-size: 13px; color: var(--gold-soft); margin-top: 6px;
}
.scorecard .radar-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center;
  padding: 20px 0 24px;
}
@media (max-width: 820px) { .scorecard .radar-wrap { grid-template-columns: 1fr; } }
.scorecard .radar { display: block; margin: 0 auto; max-width: 360px; }
.scorecard .legend { font-size: 13px; }
.scorecard .legend .row {
  display: grid; grid-template-columns: 14px 1fr auto auto; gap: 8px; align-items: center;
  padding: 6px 0; border-bottom: 1px dashed var(--cream-soft);
}
.scorecard .legend .row:last-child { border-bottom: none; }
.scorecard .legend .dot { width: 10px; height: 10px; border-radius: 50%; }
.scorecard .legend .dot.gold { background: var(--gold); }
.scorecard .legend .dot.dark { background: var(--night); }
.scorecard .legend .name { font-weight: 500; }
.scorecard .legend .val { font-weight: 700; color: var(--night); min-width: 42px; text-align: right; }
.scorecard .legend .tgt { font-size: 11px; color: var(--muted); min-width: 72px; text-align: right; }

.dim-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 720px) { .dim-cards { grid-template-columns: 1fr; } }
.dim-card {
  padding: 16px;
  border: 1px solid var(--cream-soft);
  border-radius: 8px;
  background: #fffdf9;
}
.dim-card .dc-head { display: flex; justify-content: space-between; align-items: baseline; }
.dim-card .dc-name { font-weight: 600; font-size: 14px; }
.dim-card .dc-score { font-weight: 700; color: var(--night); font-size: 18px; }
.dim-card .dc-bar {
  height: 6px; background: var(--cream-soft); border-radius: 3px; margin: 8px 0 6px; position: relative; overflow: hidden;
}
.dim-card .dc-bar .fill { height: 100%; background: var(--gold); border-radius: 3px; }
.dim-card .dc-bar .tgt-mark { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--night); }
.dim-card .dc-meta { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.dim-card .dc-verdict { font-size: 12px; font-weight: 600; margin-top: 4px; }
.dim-card.v-nul .dc-verdict { color: var(--danger); }
.dim-card.v-trav .dc-verdict { color: #c2893f; }
.dim-card.v-progr .dc-verdict { color: var(--warn); }
.dim-card.v-bon .dc-verdict { color: var(--ok); }
.dim-card.v-exc .dc-verdict { color: #3c8d4f; }

/* ----- Verdict banners ----- */
.banner {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 20px 0;
  border-left: 4px solid var(--gold);
  background: #fdf5e4;
  font-size: 14px;
}
.banner.info { background: #eef4fa; border-color: #6b8db3; }
.banner.soft { background: var(--cream-soft); border-color: var(--gold); }
.banner .title { font-weight: 700; margin-bottom: 4px; color: var(--night); }

/* ----- Final ----- */
.final .icon-ok {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--gold); color: var(--night);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; font-size: 42px; font-weight: 700;
}
.final .mail-info {
  background: var(--cream-soft); padding: 18px; border-radius: 8px;
  margin-top: 22px; font-size: 14px;
}

/* ----- Misc ----- */
.hidden { display: none !important; }
.error-msg {
  background: #fcecea; color: var(--danger);
  padding: 10px 14px; border-radius: 6px; font-size: 13px;
  margin-bottom: 16px;
  border-left: 3px solid var(--danger);
}
.loading {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid var(--night); border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer {
  text-align: center; color: var(--muted); font-size: 12px;
  padding: 24px; margin-top: 40px;
  border-top: 1px solid var(--cream-soft);
}
.footer a { color: var(--gold-dark); text-decoration: none; }

/* Print */
@media print {
  .hdr, .btn-row, .footer { display: none; }
  .card { box-shadow: none; }
}
