/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #fafaf8;
  --bg-alt: #f0efe8;
  --text: #2c2c2c;
  --text-light: #6b6b6b;
  --accent: #2d5016;
  --accent-light: #4a7c28;
  --border: #e0dfd8;
  --max-width: 720px;
  --font-body: 'Georgia', 'Times New Roman', serif;
  --font-heading: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Menlo', 'Consolas', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --bg-alt: #242424;
    --text: #e0e0e0;
    --text-light: #999;
    --accent: #7cb342;
    --accent-light: #9ccc65;
    --border: #333;
  }
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-light);
}

img {
  max-width: 100%;
  height: auto;
}

/* === Header === */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
}

.logo-emoji {
  font-size: 1.6rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent);
}

/* === Main === */
.site-main {
  flex: 1;
  padding: 3rem 0;
}

/* === Hero === */
.hero {
  text-align: center;
  padding: 3rem 0 4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  font-style: italic;
}

/* === Articles List === */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.article-card time {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-card h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0.3rem 0 0.5rem;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.article-card h2 a {
  color: var(--text);
}

.article-card h2 a:hover {
  color: var(--accent);
}

.article-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* === Tags === */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  background: var(--bg-alt);
  color: var(--text-light);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* === Article Full === */
.article-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.article-header time {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0.5rem 0;
  line-height: 1.2;
}

.article-lead {
  font-size: 1.15rem;
  color: var(--text-light);
  font-style: italic;
  line-height: 1.6;
  margin-top: 0.5rem;
}

/* === Article Content === */
.article-content h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.article-content h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.8rem;
}

.article-content p {
  margin-bottom: 1.3rem;
}

.article-content ul, .article-content ol {
  margin: 1rem 0 1.3rem 1.5rem;
}

.article-content li {
  margin-bottom: 0.4rem;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.8rem 1.2rem;
  margin: 1.5rem 0;
  background: var(--bg-alt);
  font-style: italic;
  color: var(--text-light);
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-alt);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.article-content pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.2rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-content pre code {
  background: none;
  padding: 0;
}

.article-content a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* === Article Footer === */
.article-footer {
  margin-top: 3rem;
  color: var(--text-light);
  font-size: 0.85rem;
}

.article-footer hr {
  border: none;
  border-top: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.back-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
}

/* === Section Header === */
.section-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.section-header h1 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
  font-family: var(--font-heading);
}

.footer-meta {
  margin-top: 0.3rem;
  font-size: 0.7rem;
  opacity: 0.7;
}

/* === Responsive === */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 2rem; }
  .article-header h1 { font-size: 1.7rem; }
  .hero { padding: 2rem 0 3rem; }
  .site-main { padding: 2rem 0; }
}

/* === Page (À propos, etc.) === */
.page-content {
  max-width: var(--max-width);
}

.page-content h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.page-content p {
  margin-bottom: 1.3rem;
}
