/* montagneur.com — single stylesheet.
   Design tokens = EXACTLY the Workout Tracker's (static/style.css) so that
   www.montagneur.com and tracker.montagneur.com read as one brand.
   Dark theme only, single blue accent — do not reintroduce raw hex below,
   everything goes through the :root variables. */

:root {
  color-scheme: dark;
  --bg: #0f1419;                      /* page background */
  --bg-raised: #1a2028;               /* cards / sections */
  --bg-card: #11161d;                 /* inner blocks */
  --text: #e6e9ef;
  --text-bright: #f3f4f6;             /* headings */
  --text-soft: #c6cdd8;
  --text-2: #9ca3af;                  /* secondary */
  --text-3: #6b7280;                  /* hints */
  --muted: #555a66;                   /* neutral borders */
  --border: #2a313c;
  --border-soft: #1f2733;
  --accent: #4a9eff;                  /* interactive: links, focus, primary */
  --accent-hover: #6cb2ff;
  --on-accent: #0a1018;
  --accent-soft: rgba(74, 158, 255, 0.27);
  --radius: 8px;
  --radius-lg: 12px;
  --max: 46rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI",
        Roboto, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* --- Header (same grammar as the tracker's) ----------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}
.site-header nav {
  max-width: var(--max); margin: 0 auto; padding: 0.75rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 1.12rem; letter-spacing: 0.01em;
  color: var(--text-bright);
}
.brand:hover { color: var(--text-bright); text-decoration: none; }
.brand img { display: block; border-radius: 7px; }
.tracker-link {
  font-size: 0.88rem; font-weight: 600; white-space: nowrap;
  padding: 0.38rem 0.9rem; border-radius: 6px;
  background: var(--accent); color: var(--on-accent);
}
.tracker-link:hover { background: var(--accent-hover); color: var(--on-accent);
                      text-decoration: none; }

/* --- Structure ---------------------------------------------------------- */
main { max-width: var(--max); margin: 0 auto; padding: 1.4rem 1.2rem 3rem; }
.crumbs {
  max-width: var(--max); margin: 0 auto; padding: 0.75rem 1.2rem 0;
  font-size: 0.84rem; color: var(--text-3);
}
.crumbs a { color: var(--text-2); }
.crumbs span { color: var(--text-soft); }

/* Hero : carte relevée à liseré accent, comme le header du tracker */
.hero {
  background: var(--bg-raised);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
  margin: 1.4rem 0 1.8rem;
}
.hero h1 {
  font-size: 2.1rem; margin: 0 0 0.5rem; letter-spacing: -0.02em;
  color: var(--text-bright);
}
.hero p { margin: 0.5rem 0 0; color: var(--text-soft); font-size: 1.02rem; }

h1 { font-size: 1.85rem; line-height: 1.25; margin: 1.1rem 0 0.8rem;
     letter-spacing: -0.015em; color: var(--text-bright); }
h2 { font-size: 1.4rem; margin: 2.1rem 0 0.6rem; letter-spacing: -0.01em;
     color: var(--text-bright); }
h3 { font-size: 1.14rem; margin: 1.6rem 0 0.45rem; color: var(--text-bright); }
h4 { font-size: 1rem; margin: 1.3rem 0 0.4rem; color: var(--text-bright); }
p { margin: 0.75rem 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
ul, ol { padding-left: 1.4rem; }
li { margin: 0.32rem 0; }
li::marker { color: var(--accent); }
strong { color: var(--text-bright); }
blockquote {
  margin: 1rem 0; padding: 0.2rem 1.1rem;
  border-left: 3px solid var(--accent); background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0; color: var(--text-soft);
}
code {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 5px; padding: 0.08em 0.35em; font-size: 0.88em;
}
pre { background: var(--bg-card); border: 1px solid var(--border);
      border-radius: var(--radius); padding: 0.9rem 1.1rem; overflow-x: auto; }
pre code { background: none; border: 0; padding: 0; }

.badge {
  display: inline-block; vertical-align: 0.22em; margin-right: 0.2rem;
  font-size: 0.6em; font-weight: 700; letter-spacing: 0.05em;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 6px; padding: 0.16em 0.55em;
}

/* --- Home: chapters ------------------------------------------------------ */
.chapter { margin-top: 1.7rem; }
.chapter h2 { border-bottom: 1px solid var(--border); padding-bottom: 0.4rem; }
.chapter > p { color: var(--text-2); }
.cards {
  display: grid; gap: 0.6rem; margin-top: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
}
.card {
  display: flex; align-items: center; gap: 0.65rem;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.75rem 0.95rem;
  color: var(--text); font-weight: 550;
  transition: border-color 0.12s, background 0.12s;
}
.card:hover { border-color: var(--accent); background: var(--bg-card);
              color: var(--text-bright); text-decoration: none; }
.card-icon { font-size: 1.15rem; width: 1.5rem; text-align: center; flex: none; }

/* --- Article ------------------------------------------------------------- */
.article-link {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 0.7rem 1rem;
}
.article-link a { font-weight: 600; }
.soon { color: var(--text-3); }
.soon small { font-size: 0.82em; }
.attachment { color: var(--text-3); font-style: italic; }

details {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.55rem 1rem; margin: 0.8rem 0;
}
details summary { cursor: pointer; font-weight: 600; color: var(--text-bright); }
details summary:hover { color: var(--accent); }
details[open] summary { margin-bottom: 0.4rem; }

figure { margin: 1.4rem 0; }
figure img { max-width: 100%; height: auto; border-radius: var(--radius);
             border: 1px solid var(--border); }
figure figcaption { font-size: 0.85rem; color: var(--text-2); margin-top: 0.4rem; }
figure.placeholder {
  border: 1px dashed var(--muted); border-radius: var(--radius);
  padding: 1.6rem 1rem; text-align: center; background: var(--bg-card);
}
figure.placeholder figcaption { margin: 0; color: var(--text-3); }

.toc {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 1rem 0 1.6rem; padding: 0.9rem;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.toc a {
  font-size: 0.83rem; padding: 0.2rem 0.65rem; border-radius: 999px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-soft);
}
.toc a:hover { border-color: var(--accent); color: var(--accent);
               text-decoration: none; }

.pager { display: flex; justify-content: space-between; gap: 1rem;
         margin-top: 2.4rem; padding-top: 1.2rem;
         border-top: 1px solid var(--border); }
.pager a { font-weight: 600; font-size: 0.94rem; }
.pager .next { margin-left: auto; text-align: right; }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border); margin-top: 2rem;
  background: var(--bg-raised);
  color: var(--text-2); font-size: 0.88rem;
}
.site-footer p { max-width: var(--max); margin: 0 auto; padding: 0.35rem 1.2rem; }
.site-footer p:first-child { padding-top: 1.1rem; }
.site-footer p:last-child { padding-bottom: 1.3rem; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding: 1.2rem 1.1rem; }
  .hero h1 { font-size: 1.7rem; }
  h1 { font-size: 1.5rem; }
  .cards { grid-template-columns: 1fr; }
}
