:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #14161f;
  --muted: #5b6072;
  --line: #e3e6ef;
  --accent: #3b3fd8;
  --accent-soft: #ecedff;
  --urgent: #c2341f;
  --ok: #157a52;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --surface: #171a23;
    --text: #e9eaf0;
    --muted: #9da2b4;
    --line: #2a2e3b;
    --accent: #8b8ff5;
    --accent-soft: #23264a;
    --urgent: #ff7a63;
    --ok: #4cc597;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
}
a { color: var(--accent); }
h1, h2, h3, p, li, a { overflow-wrap: break-word; }
.hero > *, .cards > *, .stats > *, .steps > * { min-width: 0; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* En-tête */
.top { padding-top: 20px; padding-bottom: 20px; }
.brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); }

/* Accroche */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: start;
  padding: 24px 0 40px;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
h1 {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 16px 0 14px;
  text-wrap: balance;
}
.lead { font-size: 18px; color: var(--muted); margin: 0 0 20px; max-width: 34em; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.facts li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 8px; }

.signup {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 10px 30px rgba(20, 22, 31, 0.06);
}
.signup h2 { font-size: 18px; margin: 0 0 4px; }
.signup p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.signup iframe {
  width: 100%;
  height: 470px;
  border: 0;
  border-radius: 10px;
  background: #fff;
}
.signup .fallback { font-size: 13px; margin-top: 8px; }

/* Chiffres de la semaine */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 32px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.stat b { display: block; font-size: 28px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }
.stat.urgent b { color: var(--urgent); }

/* Aperçu */
h2.section { font-size: 24px; letter-spacing: -0.02em; margin: 8px 0 4px; }
.section-sub { color: var(--muted); margin: 0 0 16px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 40px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.card h3 { font-size: 15px; margin: 0 0 10px; display: flex; justify-content: space-between; gap: 8px; }
.card h3 small { color: var(--muted); font-weight: 400; }
.card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card li a { font-weight: 600; text-decoration: none; color: var(--text); }
.card li a:hover { color: var(--accent); text-decoration: underline; }
.meta { display: block; font-size: 13px; color: var(--muted); }
.meta .late { color: var(--urgent); font-weight: 600; }
.more { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* Étapes + FAQ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 40px; padding: 0; list-style: none; counter-reset: s; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; counter-increment: s; }
.steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.steps b { display: block; }
.steps span { color: var(--muted); font-size: 14px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 8px 0 0; color: var(--muted); }

/* Pied de page */
footer { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; padding-bottom: 40px; font-size: 13px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; }

/* Pages de texte (mentions, confidentialité) */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 760px; }
.doc h1 { font-size: 30px; margin-top: 0; }
.doc h2 { font-size: 18px; margin-top: 24px; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .stats, .cards, .steps { grid-template-columns: 1fr; }
  .stat b { font-size: 24px; }
}

/* Navigation */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.menu { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; font-size: 15px; }
.menu a { color: var(--muted); text-decoration: none; }
.menu a:hover { color: var(--text); }
.btn, .menu a.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
}
.btn:hover, .menu a.btn:hover { filter: brightness(1.1); color: #fff; }
@media (prefers-color-scheme: dark) { .btn, .menu a.btn, .btn:hover, .menu a.btn:hover { color: #0f1117; } }

/* Pages de listes (rubriques, régions, archives) */
.crumb { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.crumb a { color: var(--muted); }
h1.page { font-size: clamp(26px, 4vw, 36px); margin: 8px 0 12px; }
h2.section small { color: var(--muted); font-weight: 400; font-size: 16px; }
.tenders { list-style: none; margin: 0 0 32px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tenders li { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tenders li:last-child { border-bottom: 0; }
.tenders li a { font-weight: 600; color: var(--text); text-decoration: none; }
.tenders li a:hover { color: var(--accent); text-decoration: underline; }
.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; color: var(--muted); }
.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--accent-soft); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0 24px;
}
.cta p { margin: 0; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.chips a {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 14px; text-decoration: none; color: var(--text);
}
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.chips small { color: var(--muted); margin-left: 4px; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.sample { font-weight: 600; font-size: 15px; }

/* Lexique */
.doc.wide { max-width: none; margin-top: 12px; }
.doc dl { margin: 0; }
.doc dt { font-weight: 700; margin-top: 14px; }
.doc dd { margin: 2px 0 0; color: var(--muted); }
