*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --text: #111;
  --muted: #666;
  --border: #e5e5e5;
  --bg: #fff;
  --bg-input: #f5f5f5;
  --max: 700px;
}

[data-theme="dark"] {
  --text: #f0f0f0;
  --muted: #888;
  --border: #2a2a2a;
  --bg: #111;
  --bg-input: #1e1e1e;
}

html { font-size: 17px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  transition: background 0.2s, color 0.2s;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  flex-shrink: 0;
}

nav {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.5rem;
  white-space: nowrap;
}

nav a {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

nav a:hover {
  color: var(--text);
  background: var(--border);
  text-decoration: none;
}

/* Header right actions */
.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.btn-subscribe {
  font-size: 0.82rem;
  padding: 0.4rem 1rem;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.btn-subscribe:hover { opacity: 0.75; }

.btn-theme {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1;
  transition: border-color 0.15s;
}

.btn-theme:hover { border-color: var(--text); color: var(--text); }

/* Subscribe panel */
.subscribe-panel {
  display: none;
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  background: var(--bg);
}

.subscribe-panel.open { display: block; }

.subscribe-panel form {
  display: flex;
  gap: 0.5rem;
  max-width: var(--max);
  margin: 0 auto;
}

.subscribe-panel input {
  flex: 1;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}

.subscribe-panel input:focus { border-color: var(--text); }

.subscribe-panel button {
  padding: 0.55rem 1.3rem;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
}

.subscribe-panel button:hover { opacity: 0.8; }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 5rem 2rem 4rem;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 2rem;
}

.hero-form {
  display: flex;
  gap: 0.5rem;
  max-width: 420px;
  margin: 0 auto;
}

.hero-form input {
  flex: 1;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg-input);
  color: var(--text);
  outline: none;
}

.hero-form input:focus { border-color: var(--text); }

.hero-form button {
  padding: 0.65rem 1.4rem;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
}

.hero-form button:hover { opacity: 0.8; }

/* ── Articles ── */
.articles {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 2rem;
}

.articles h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin-bottom: 2rem;
}

.article-list { list-style: none; }

.article-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.article-list li:first-child { border-top: 1px solid var(--border); }
.article-list a:hover { text-decoration: underline; }

.article-date {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Footer ── */
footer {
  background: #0a0a0a;
  color: #fff;
  margin-top: 5rem;
  padding: 4rem 2.5rem 0;
}

.footer-top {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.2fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-identity { padding-right: 2rem; }

.footer-name {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.footer-bio {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
  margin-bottom: 1.8rem;
  max-width: 320px;
}

.footer-socials { display: flex; gap: 0.75rem; }

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: rgba(255,255,255,0.65);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  text-decoration: none;
}

.footer-socials a:hover {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.3rem;
  letter-spacing: 0;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover { color: #fff; text-decoration: none; }

/* Footer bottom bar */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0 2rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: 1200px;
  margin: 0 auto;
}

/* Theme pill — les deux icônes visibles */
.theme-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 3px;
  cursor: pointer;
  gap: 0;
}

.theme-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: rgba(255,255,255,0.4);
  transition: background 0.15s, color 0.15s;
}

[data-theme="light"] .theme-pill-icon[data-theme-icon="light"],
[data-theme="dark"] .theme-pill-icon[data-theme-icon="dark"] {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Floating Subscribe button */
.floating-subscribe {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.3rem;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  z-index: 1000;
  transition: transform 0.15s, box-shadow 0.15s;
}

.floating-subscribe:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* FR/EN toggle */
.lang-pill {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg);
}

.lang-pill button {
  border: none;
  background: transparent;
  padding: 0.35rem 0.65rem;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.lang-pill button.active {
  background: var(--text);
  color: var(--bg);
}

/* Responsive footer */
@media (max-width: 820px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-identity { grid-column: 1 / -1; padding-right: 0; }
}

@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .floating-subscribe { bottom: 1rem; right: 1rem; padding: 0.65rem 1.1rem; font-size: 0.85rem; }
}

/* ── Page contenu (commencer-ici, about, now...) ── */
.page-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.start-avatar {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.start-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.start-tags {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.start-tags span {
  font-size: 0.82rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

/* Sections prose */
.start-section {
  margin-bottom: 3.5rem;
}

.start-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  margin-top: 0;
}

.start-section p {
  color: var(--muted);
  font-size: 0.97rem;
  margin-bottom: 1rem;
  line-height: 1.75;
}

.start-section p a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Topics grid */
.topics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.topic-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.2rem;
}

.topic-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.topic-card p {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* Entry points */
.entry-points {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.entry-card {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.entry-card:hover {
  border-color: var(--text);
  background: var(--bg-input);
  text-decoration: none;
}

.entry-icon {
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--muted);
}

.entry-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.entry-card p {
  font-size: 0.83rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  nav { display: none; }
  .hero h1 { font-size: 1.8rem; }
  .hero-form { flex-direction: column; }
  .topics-grid { grid-template-columns: 1fr; }
  .start-hero h1 { font-size: 1.6rem; }
}
