/* semawe.us — charte Dark Mode cohérente avec semawe.fr
   Base #1B1B1B · Contraste #fff · Accent 1 jaune #f8e008 · Accent 2 rose #ff5de7
   Typo : Manrope (texte) + Fira Code (détails) */
:root {
  --base: #1B1B1B;
  --surface: #232323;
  --contrast: #ffffff;
  --muted: #D1D0EA;
  --soft: #f1f1f1;
  --line: #353535;
  --accent: #f8e008;
  --accent2: #ff5de7;
  --maxw: 760px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--base);
  color: var(--soft);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  font-weight: 400;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

/* Header */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  max-width: var(--maxw); margin: 0 auto; padding: 1.6rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.5rem; color: var(--contrast); letter-spacing: -0.02em; }
.brand-tag { font-family: "Fira Code", monospace; font-size: 0.75rem; color: var(--accent); margin-top: 2px; }
.site-header nav { display: flex; gap: 1.25rem; font-weight: 500; font-size: 0.95rem; }
.site-header nav a { color: var(--muted); }
.site-header nav a:hover { color: var(--accent2); }

main { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* Hero (home) */
.hero { padding: 3.5rem 0 2rem; border-bottom: 1px solid var(--line); margin-bottom: 2.5rem; }
.hero h1 { font-size: 2.6rem; line-height: 1.1; font-weight: 800; color: var(--contrast); letter-spacing: -0.03em; margin: 0 0 1rem; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 38ch; margin: 0; }

/* Cards (liste articles) */
.cards { list-style: none; padding: 0; margin: 0 0 4rem; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.card { background: var(--base); transition: background 0.15s; }
.card:hover { background: var(--surface); }
.card a { display: block; color: inherit; }
.card.has-thumb a { display: grid; grid-template-columns: 200px 1fr; align-items: stretch; }
.card-thumb { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 140px; }
.card-text { padding: 1.6rem 1.5rem; }
.card:not(.has-thumb) .card-text { padding: 1.6rem 1.5rem; }
.card-date { font-family: "Fira Code", monospace; font-size: 0.72rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.card h2 { font-size: 1.3rem; font-weight: 700; color: var(--contrast); margin: 0.4rem 0 0.5rem; line-height: 1.25; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.card a:hover h2 { color: var(--accent2); }

/* Featured image en tête d'article */
.post-hero { width: 100%; height: auto; border-radius: 12px; margin: 0 0 2rem; display: block; }

@media (max-width: 560px) {
  .card.has-thumb a { grid-template-columns: 1fr; }
  .card-thumb { min-height: 180px; max-height: 200px; }
}

/* Article */
.post { padding: 2.5rem 0 3rem; }
.post-meta, .post-foot { font-family: "Fira Code", monospace; font-size: 0.8rem; color: var(--muted); }
.post-meta a, .post-foot a { color: var(--accent); }
.post h1 { font-size: 2.3rem; line-height: 1.15; font-weight: 800; color: var(--contrast); letter-spacing: -0.02em; margin: 0.6rem 0 1.8rem; }
.post-body { font-size: 1.08rem; }
.post-body h2 { font-size: 1.5rem; font-weight: 700; color: var(--contrast); margin: 2.4rem 0 0.8rem; letter-spacing: -0.01em; }
.post-body h3 { font-size: 1.2rem; font-weight: 700; color: var(--contrast); margin: 1.8rem 0 0.6rem; }
.post-body p { margin: 0 0 1.2rem; }
.post-body ul, .post-body ol { margin: 0 0 1.4rem; padding-left: 1.4rem; }
.post-body li { margin: 0.4rem 0; }
.post-body a { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.post-body blockquote {
  margin: 1.8rem 0; padding: 0.6rem 0 0.6rem 1.4rem;
  border-left: 3px solid var(--accent); color: var(--contrast); font-style: italic;
}
.post-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 1.4rem 0; }
.post-foot { margin-top: 2.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }

/* Footer */
.site-footer { max-width: var(--maxw); margin: 0 auto; padding: 2.5rem 1.25rem 3.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.site-footer a { color: var(--accent); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero h1 { font-size: 2rem; }
  .post h1 { font-size: 1.8rem; }
}
