/* Charte NQT : bleu marine #29276F, doré du logo, cyan #35BDEF, police Montserrat. */
@font-face {
  font-family: "Montserrat";
  src: url("assets/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #29276f;
  --navy-700: #1e1c55;
  --blue: #3366cc;
  --cyan: #35bdef;
  --gold: #d9ae3f;
  --sky: #eaf6fd;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #1c1b3a;
  --muted: #5d6178;
  --border: #e3e6ef;
  --danger: #c4314b;
  --ok: #1f8a5a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(41, 39, 111, .06), 0 8px 28px rgba(41, 39, 111, .08);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }

/* En-tête */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 880px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { display: block; height: 52px; width: auto; }
.product { font-weight: 700; color: var(--navy); font-size: 15px; }
.progress { height: 4px; background: var(--sky); }
.progress-bar { height: 100%; width: 0; background: var(--cyan); transition: width .35s ease; }

main { max-width: 880px; margin: 0 auto; padding: 28px 16px 64px; }

/* Bandeau */
.hero {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 32px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  border: 28px solid rgba(53, 189, 239, .18);
}
.hero h1 { color: #fff; margin: 6px 0 10px; }
.hero .lead { color: rgba(255, 255, 255, .86); font-size: 17px; max-width: 600px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--gold); }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; position: relative; z-index: 1; }
.facts li { display: flex; gap: 12px; align-items: flex-start; background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 14px; font-size: 14px; color: rgba(255, 255, 255, .85); }
.facts strong { display: block; color: #fff; font-size: 15px; }
.facts svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Cartes et formulaires */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; margin-bottom: 20px; }
.card > h2 + .muted { margin: 6px 0 20px; }
.field { display: block; font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 16px; }
select, textarea {
  display: block; width: 100%; margin-top: 6px;
  font: inherit; font-weight: 400; color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 11px 12px;
  transition: border-color .15s;
}
select:hover, textarea:hover { border-color: #c8cde0; }
select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(53, 189, 239, .2); }
textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 4px 0 8px; cursor: pointer; }
.consent input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--navy); }
.error { color: var(--danger); min-height: 1.5em; font-size: 14px; font-weight: 500; }

/* Boutons (pilule, comme le site NQT) */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-weight: 700; font-size: 15px;
  border-radius: 999px; padding: 12px 24px; cursor: pointer;
  border: 2px solid var(--navy); background: transparent; color: var(--navy);
  transition: background .15s, color .15s, transform .15s;
}
.btn:hover { background: var(--sky); }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-700); transform: translateX(2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.small { padding: 6px 14px; font-size: 13px; border-width: 1.5px; }
.btn:focus-visible, .scale input:focus-visible + span, .choice input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }

/* Étapes */
.step-head { margin-bottom: 8px; }
.step-count { font-size: 13px; font-weight: 700; color: var(--blue); }
.step-head h2 { margin: 4px 0 4px; font-size: 26px; }
.q { padding: 22px 0; border-top: 1px solid var(--border); }
.step-head + .q { border-top: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; color: var(--text); margin-bottom: 12px; padding: 0; }
.q-kind { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.q.invalid legend { color: var(--danger); }
.q.invalid textarea { border-color: var(--danger); }

/* Échelle 1-5 */
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale label { cursor: pointer; }
.scale input, .choice input { position: absolute; opacity: 0; pointer-events: none; }
.scale span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 6px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--muted);
  transition: all .15s;
}
.scale label:hover span { border-color: var(--cyan); color: var(--navy); }
.scale input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Mises en situation */
.choice { display: grid; gap: 8px; }
.choice label { cursor: pointer; }
.choice span {
  display: block; padding: 13px 16px 13px 44px; position: relative;
  border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface);
  font-size: 15px; transition: all .15s;
}
.choice span::before {
  content: ""; position: absolute; left: 16px; top: 50%; translate: 0 -50%;
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid #b9bfd3; background: #fff;
}
.choice label:hover span { border-color: var(--cyan); }
.choice input:checked + span { border-color: var(--navy); background: var(--sky); }
.choice input:checked + span::before { border: 5px solid var(--navy); background: #fff; }

.hint { font-size: 13px; color: var(--muted); margin: -4px 0 8px; }
.counter { text-align: right; font-size: 12px; color: var(--muted); margin-top: 6px; }
.counter.ok { color: var(--ok); }

/* Résultats */
.hero-results { padding-bottom: 30px; }
.status-busy::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%;
  background: var(--cyan); animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.skill-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: var(--surface); }
.skill-card h3 { font-size: 16px; margin-bottom: 10px; }
.level { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; margin-bottom: 10px; }
.level.l4 { background: var(--navy); color: #fff; }
.level.l3 { background: var(--sky); color: var(--navy); }
.level.l2 { background: #fff4dc; color: #8a6511; }
.level.l1 { background: #fde8ec; color: var(--danger); }
.meter { height: 6px; border-radius: 99px; background: var(--sky); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 99px; background: var(--cyan); }
.tip { font-size: 14px; color: var(--muted); margin-top: 10px; }

.copy-block { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-top: 12px; }
.copy-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.copy-head strong { color: var(--navy); font-size: 15px; }
.copy-text { white-space: pre-line; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { border-radius: 999px; padding: 5px 14px; font-size: 14px; font-weight: 600; background: var(--sky); color: var(--navy); }
.cv-line { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.cv-line:first-of-type { border-top: 0; padding-top: 4px; }
.cv-line small { display: block; font-size: 12px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.mentor { border-left: 4px solid var(--gold); }
.mentor ul { margin: 10px 0 0; padding-left: 18px; }
.mentor li { margin: 4px 0; }
.advice { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.advice li { margin: 4px 0; }
.advice strong { color: var(--text); }

.detail { margin-top: 8px; font-size: 14px; }
.detail summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.detail table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.detail th, .detail td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.detail td.n, .detail th.n { text-align: right; font-variant-numeric: tabular-nums; }
.ref { font-size: 12px; color: var(--muted); text-align: center; margin-top: 16px; }

/* Pied de page */
.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { max-width: 880px; margin: 0 auto; padding: 22px 16px; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--navy); }
.footer-inner .muted { flex-basis: 100%; }

@media (max-width: 680px) {
  .hero { padding: 28px 20px; }
  .card { padding: 22px 18px; }
  .facts, .grid2 { grid-template-columns: 1fr; }
  .scale { grid-template-columns: 1fr; }
  .scale span { min-height: 42px; justify-content: flex-start; padding-left: 14px; }
  .product { display: none; }
  .actions .btn { padding: 11px 18px; }
  .cv-line { flex-direction: column; gap: 8px; }
}
