/* ============================================================
   QUADRANT — design system
   Ivoire chaud, encre aubergine, indigo, 4 couleurs DISC.
   Bricolage Grotesque (display) · Source Sans 3 (texte) · IBM Plex Mono (données)
   ============================================================ */

:root {
  --bg: #FBF8F3;
  --surface: #FFFFFF;
  --ink: #262133;
  --muted: #6E6879;
  --line: #E7E1D6;
  --soft: #F2EEE6;
  --accent: #4B44C0;
  --accent-ink: #FFFFFF;
  --hover: #F6F4FC;
  --d: #D95B2B;
  --i: #DE9F1F;
  --s: #35996B;
  --c: #3E7DBF;
  --shadow: 0 1px 2px rgba(38,33,51,.05), 0 10px 30px rgba(38,33,51,.07);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16131F;
    --surface: #1F1B2C;
    --ink: #EDE9F3;
    --muted: #A39CB3;
    --line: #332D45;
    --soft: #262038;
    --accent: #948CFF;
    --accent-ink: #16131F;
    --hover: #282239;
    --d: #F0784A;
    --i: #E9B84C;
    --s: #4FBA8B;
    --c: #6AA5E4;
    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16131F;
  --surface: #1F1B2C;
  --ink: #EDE9F3;
  --muted: #A39CB3;
  --line: #332D45;
  --soft: #262038;
  --accent: #948CFF;
  --accent-ink: #16131F;
  --hover: #282239;
  --d: #F0784A;
  --i: #E9B84C;
  --s: #4FBA8B;
  --c: #6AA5E4;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: 700px; margin: 0 auto; padding: 0 22px; }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 16px; padding-bottom: 16px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: "Bricolage Grotesque", Georgia, serif;
  font-weight: 700; font-size: 1.2rem; color: var(--ink);
  text-decoration: none;
}
.mark {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; flex: none;
}
.mark span:nth-child(1){background:var(--d)}
.mark span:nth-child(2){background:var(--i)}
.mark span:nth-child(3){background:var(--c)}
.mark span:nth-child(4){background:var(--s)}
.site-nav { display: flex; gap: 4px 22px; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 4px 2px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

/* ---------- typography ---------- */
h1, h2, h3, .display {
  font-family: "Bricolage Grotesque", Georgia, serif;
  line-height: 1.15; text-wrap: balance; margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 5.4vw, 3rem); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 3.4vw, 1.9rem); font-weight: 600; margin-top: 1.8em; }
h3 { font-size: 1.15rem; font-weight: 600; margin-top: 1.6em; }
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 14px;
}
.lead { font-size: 1.16rem; color: var(--muted); max-width: 36em; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 700; font-size: 1.02rem;
  background: var(--accent); color: var(--accent-ink);
  border: none; border-radius: 12px; padding: 14px 28px;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: transform .12s ease, filter .12s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost {
  background: none; color: var(--ink);
  border: 1.5px solid var(--line); font-weight: 600;
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.btn.big { font-size: 1.1rem; padding: 16px 34px; }

/* ---------- prix transparent ---------- */
.price-strip {
  display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center;
  margin: 18px 0 26px;
}
.price-strip .chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--soft); border: 1px solid var(--line); border-radius: 99px;
  padding: 6px 14px; font-size: .88rem; font-weight: 600; color: var(--ink);
}
.price-strip .chip .ok { color: var(--s); font-weight: 700; }
.price-strip .chip .euro { font-family: "IBM Plex Mono", monospace; font-size: .84rem; }

/* ---------- sections & cards ---------- */
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 30px 0 6px; }
.card, .test-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 24px; box-shadow: var(--shadow);
}
.test-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); transition: transform .14s ease, border-color .14s ease; }
.test-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.test-card .emblem { width: 46px; height: 46px; margin-bottom: 4px; }
.test-card h3 { margin: 0; font-size: 1.22rem; }
.test-card p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.test-card .meta {
  font-family: "IBM Plex Mono", monospace; font-size: .74rem; color: var(--muted);
  display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px;
}
.test-card .go { font-weight: 700; color: var(--accent); font-size: .95rem; }

.notice {
  background: var(--soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; font-size: .93rem; color: var(--muted); margin: 22px 0;
}
.notice b { color: var(--ink); }

/* ---------- moteur de test ---------- */
.test-app { max-width: 660px; margin: 0 auto; }
.progress { display: flex; gap: 4px; margin-bottom: 10px; }
.progress i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); transition: background .25s ease; }
.progress i.done { background: var(--accent); }
.count { font-family: "IBM Plex Mono", monospace; font-size: .74rem; color: var(--muted); margin-bottom: 26px; }
.q-text {
  font-family: "Bricolage Grotesque", Georgia, serif;
  font-weight: 600; font-size: clamp(1.25rem, 3.6vw, 1.55rem);
  line-height: 1.25; text-wrap: balance; margin: 0 0 24px;
}
.q-figure { margin: 0 0 24px; display: flex; justify-content: center; }
.q-figure svg { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opts.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.opt {
  font: inherit; text-align: left; display: flex; align-items: center; gap: 14px;
  width: 100%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 17px;
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.opts.grid .opt { flex-direction: column; text-align: center; gap: 8px; padding: 14px 10px; }
.opt:hover { border-color: var(--accent); background: var(--hover); transform: translateY(-1px); }
.opt.picked { border-color: var(--accent); background: var(--hover); }
.opt .key {
  font-family: "IBM Plex Mono", monospace; font-size: .72rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px;
  min-width: 22px; height: 22px; display: grid; place-items: center; flex: none;
}
.opt.picked .key { border-color: var(--accent); color: var(--accent); }
.quiz-anim { animation: qin .28s ease; }
@keyframes qin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- résultats ---------- */
.res-style {
  font-family: "Bricolage Grotesque", Georgia, serif;
  font-weight: 700; font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.15; margin: 4px 0 8px;
}
.res-sub { color: var(--muted); max-width: 38em; margin: 0 0 30px; }
.bars { display: flex; flex-direction: column; gap: 16px; margin-bottom: 36px; }
.bar-row { display: grid; grid-template-columns: minmax(34px,auto) 1fr 52px; align-items: center; gap: 14px; }
.bar-letter { font-family: "Bricolage Grotesque", Georgia, serif; font-weight: 700; font-size: 1.1rem; }
.bar-track { height: 14px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 99px; transition: width .9s cubic-bezier(.2,.7,.2,1); }
.bar-pct { font-family: "IBM Plex Mono", monospace; font-size: .82rem; text-align: right; font-variant-numeric: tabular-nums; }
.bar-name { grid-column: 2 / 4; font-size: .8rem; color: var(--muted); margin-top: -10px; }

.pay {
  background: var(--surface); border: 1.5px solid var(--accent);
  border-radius: 16px; box-shadow: var(--shadow);
  padding: 26px 24px; margin: 10px 0 18px;
}
.pay h2 { margin-top: 0; font-size: 1.25rem; }
.pay .price { font-family: "IBM Plex Mono", monospace; font-size: 1.5rem; margin: 0 0 16px; }
.pay .price small { font-size: .8rem; color: var(--muted); }
.pay ul { margin: 0 0 22px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: .95rem; }
.pay li { display: flex; gap: 10px; align-items: baseline; }
.pay li::before { content: "✓"; color: var(--s); font-weight: 700; }
.pay-note { font-size: .82rem; color: var(--muted); margin-top: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- article éditorial ---------- */
article { padding: 46px 0 20px; }
article p, article li { max-width: 66ch; }
article ul, article ol { padding-left: 1.3em; }
article li { margin-bottom: .45em; }
article blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 18px;
  border-left: 3px solid var(--accent); color: var(--muted); font-size: 1.05rem;
}
.toc {
  background: var(--soft); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 20px; margin: 26px 0; font-size: .95rem;
}
.toc ul { margin: 8px 0 0; padding-left: 1.2em; }

/* ---------- FAQ ---------- */
details {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); margin-bottom: 10px; padding: 0 18px;
}
details summary {
  cursor: pointer; font-weight: 700; padding: 15px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
details summary::after { content: "+"; font-family: "IBM Plex Mono", monospace; color: var(--muted); }
details[open] summary::after { content: "–"; }
details p { margin-top: 0; color: var(--muted); }

/* ---------- tableaux ---------- */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 70px; padding: 36px 0 44px; font-size: .88rem; color: var(--muted); }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 24px 60px; margin-bottom: 22px; }
.site-footer a { color: var(--muted); }
.site-footer .legal { font-size: .8rem; max-width: 72ch; }

@media (max-width: 640px) {
  .section { padding: 40px 0; }
  .site-nav { gap: 2px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- emplacements publicitaires ----------
   Conteneurs vides = invisibles. Coller le code AdSense (<ins class="adsbygoogle">…)
   à l'intérieur pour les activer. */
.ad-slot { margin: 30px auto; text-align: center; }
.ad-slot:empty { display: none; }
.ad-slot::before { content: "Publicité"; display: block; font-family: "IBM Plex Mono", monospace; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.ad-slot:empty::before { content: none; }
