:root {
  --bg: #fcf8fa;
  --surface: #ffffff;
  --text: #2a1822;
  --muted: #755c69;
  --line: #ecdde5;
  --brand: #8e2a63;
  --brand-dark: #6b1d4a;
  --brand-soft: #f8e8f1;
  --accent: #c2306f;
  --on-brand: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(60, 20, 45, .06), 0 4px 16px rgba(60, 20, 45, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a0f15; --surface: #26161f; --text: #f3e8ee; --muted: #c0a5b3; --line: #45283a;
    --brand: #e58ab8; --brand-dark: #f0aed0; --brand-soft: #3a1f2f; --accent: #b8306c;
    --on-brand: #1a0f15;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6; font-size: 17px; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: .4em 0 .4em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.1rem; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }
.ico { width: 26px; height: 26px; flex: none; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; color: var(--text); font-size: 1.1rem; }
.logo .ico { color: var(--brand); }
.main-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.main-nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--brand); }

.hero { background: linear-gradient(135deg, var(--brand-soft), var(--bg)); padding: 48px 0 40px; border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 760px; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600;
  padding: 10px 18px; border-radius: 8px; text-align: center; border: 2px solid var(--accent); }
.btn:hover { filter: brightness(1.08); color: #fff; }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); color: var(--brand); }

.problems, .tiles, .guides { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.problem, .tile, .guide-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px;
  transition: border-color .15s, transform .15s; }
.problem:hover, .tile:hover, .guide-card:hover { border-color: var(--brand); transform: translateY(-2px); color: var(--text); }
.problem .ico, .tile .ico { color: var(--brand); }
.problem span, .tile span, .guide-card p { color: var(--muted); font-size: .95rem; margin: 0; }
.guide-card h2, .guide-card h3 { margin: 0; font-size: 1.15rem; }
.guide-card .link { color: var(--brand); font-weight: 600; margin-top: auto; }
.more { margin-top: 12px; font-weight: 600; }

.crumbs { font-size: .88rem; color: var(--muted); padding: 16px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 2px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin: 16px 0 32px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card[hidden] { display: none; }
.card-img { position: relative; aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.noimg { color: #999; font-size: .85rem; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--accent); color: #fff; font-weight: 700; font-size: .8rem;
  padding: 3px 8px; border-radius: 99px; }
.card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { margin: 0; font-size: 1rem; }
.brand { margin: 0; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.desc { margin: 0; font-size: .87rem; color: var(--muted); }
.price { margin: auto 0 4px; font-size: 1.15rem; }
.price s { color: var(--muted); font-size: .9rem; margin-left: 6px; }
.card .btn { font-size: .9rem; padding: 8px 12px; }

.cat-head .intro { max-width: 800px; }
.cat-guides ul { margin: 6px 0 0; }
.count { color: var(--muted); font-size: .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 6px 14px;
  cursor: pointer; font: inherit; font-size: .9rem; }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }

.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 0 40px; }
.article-wrap .crumbs { grid-column: 1 / -1; }
.article { min-width: 0; }
.meta { color: var(--muted); font-size: .9rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 20px 0; }
.toc ol { margin: 6px 0 0; padding-left: 20px; }
.related { align-self: start; position: sticky; top: 80px; margin-top: 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.related h2 { margin: 0 0 8px; font-size: 1.05rem; }
.related ul { padding-left: 18px; margin: 0; }
@media (max-width: 900px) {
  .article-wrap { grid-template-columns: 1fr; }
  .related { position: static; }
}

.prose { max-width: 740px; }
.prose table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--brand-soft); }
.prose .grid { max-width: none; }
.cat-body { margin-top: 32px; }
.note { background: var(--brand-soft); border-left: 4px solid var(--brand); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; }
.note.warn { border-left-color: var(--accent); }
.cta { display: flex; gap: 14px; background: var(--brand-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 24px 0; }
.cta .ico { color: var(--brand); width: 34px; height: 34px; }
.cta p { margin: 4px 0 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 8px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 0; }

/* calculator */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.calc .fields { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.calc label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .95rem; }
.calc label small { font-weight: 400; color: var(--muted); }
.calc input, .calc select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); }
.calc .inline { display: flex; gap: 8px; }
.calc .inline input { flex: 1; min-width: 0; }
.result { margin-top: 20px; padding: 18px; border-radius: var(--radius); background: var(--brand-soft); }
.result .big { font-size: 2rem; font-weight: 800; color: var(--brand); margin: 0; }
.result dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 12px 0 0; }
.result dt { color: var(--muted); }
.result dd { margin: 0; font-weight: 600; }

.site-footer { background: var(--surface); border-top: 1px solid var(--line); margin-top: 48px; padding: 24px 0; font-size: .9rem; color: var(--muted); }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0; }
.small { font-size: .82rem; }

.spec { margin: 0; font-size: .88rem; color: var(--muted); }
.spec strong { color: var(--text); }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; max-width: 560px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .18); display: flex; flex-direction: column; gap: 10px; }
.consent[hidden] { display: none; }
.consent p { margin: 0; font-size: .92rem; }
.consent div { display: flex; gap: 10px; justify-content: flex-end; }

.card .alt { margin: 0; font-size: .85rem; color: var(--muted); }
.compare { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: .95rem; }
.compare th, .compare td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: middle; }
.compare th { background: var(--brand-soft); }
.compare .btn { font-size: .85rem; padding: 6px 10px; margin: 2px 0; }

/* filtre categorie */
.filters { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; }
.filters[hidden] { display: none; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; }
.filters input, .filters select { font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg, #fff); color: var(--text); min-width: 0; }
.chips + .filters, .back + .filters { margin-top: 16px; }
.more-wrap { text-align: center; margin: 0 0 40px; }
.more-wrap [hidden] { display: none; }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 12px 0 28px; }
.tile { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; color: var(--text); text-decoration: none; }
a.tile:hover { border-color: var(--brand); }
.tile .ico { width: 28px; height: 28px; color: var(--brand); }
.tile-name { font-weight: 600; }
