/* ═══ MÉMORABILITÉ — Style inspiré nature.com ═══ */
/* Clean, académique, lisible, élégant */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface2: #f7f7f7;
  --border: #e8e8e8;
  --border-strong: #ccc;
  --text: #222222;
  --text2: #555555;
  --text3: #888888;
  --accent: #c05046;
  --accent-hover: #a03a32;
  --accent-light: rgba(192, 80, 70, 0.08);
  --green: #2e7d32;
  --blue: #1565c0;
  --cat-info: #1a5276;
  --cat-cosmo: #6c3483;
  --cat-vivant: #1e8449;
  --cat-sciences: #b7950b;
  --radius: 0;
  --radius-sm: 0;
  --max-w: 1200px;
  --narrow: 700px;
  --header-bg: #ffffff;
  --header-border: #c05046;
  --card-shadow: none;
  --icon-sun: block;
  --icon-moon: none;
}

[data-theme="dark"] {
  --bg: #1a1a1a;
  --surface: #222222;
  --surface2: #2a2a2a;
  --border: #3a3a3a;
  --border-strong: #555;
  --text: #e8e8e8;
  --text2: #b0b0b0;
  --text3: #777777;
  --accent: #e07060;
  --accent-hover: #f08878;
  --accent-light: rgba(224, 112, 96, 0.1);
  --header-bg: #1a1a1a;
  --header-border: #e07060;
  --card-shadow: none;
  --icon-sun: none;
  --icon-moon: block;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 2rem; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  border-bottom: 3px solid var(--header-border);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  font-family: 'Playfair Display', Georgia, serif;
}
.logo:hover { color: var(--text); }
.logo-icon {
  font-size: 1.1rem;
  color: var(--accent);
}
.main-nav { display: flex; gap: 0.2rem; }
.nav-link {
  color: var(--text2);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 3px;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nav-link:hover {
  color: var(--accent);
  background: var(--accent-light);
}
.nav-link.active {
  color: var(--accent);
  font-weight: 600;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.3s;
}

/* ── Hero / Page Header ── */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}
.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.hero-desc {
  color: var(--text2);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Featured Article (Homepage) ── */
.featured {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.featured-link {
  display: block;
  color: var(--text);
}
.featured-link:hover { color: var(--text); }
.featured-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.featured-img {
  overflow: hidden;
  aspect-ratio: 16/10;
}
.featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.featured-link:hover .featured-img img {
  transform: scale(1.03);
}
.featured-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}
.featured-meta time {
  font-size: 0.75rem;
  color: var(--text3);
}
.featured-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
}
.featured-excerpt {
  color: var(--text2);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.featured-footer {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text3);
}

/* ── Home Sections ── */
.home-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
}
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.home-grid .card {
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.home-grid .card:hover {
  border-color: var(--border-strong);
}
.home-grid .card-link {
  padding: 1.2rem;
}

/* ── Rubrics (Homepage) ── */
.rubrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.rubric-col {
  display: flex;
  flex-direction: column;
}
.rubric-name {
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--border);
}
.rubric-name a { color: inherit; }
.rubric-name .card-cat {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
}
.rubric-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: color 0.2s;
}
.rubric-item:hover { color: var(--accent); }
.rubric-item-title {
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
}
.rubric-item-time {
  font-size: 0.72rem;
  color: var(--text3);
  white-space: nowrap;
}
.rubric-more {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.rubric-more:hover { color: var(--accent-hover); }

.section-footer { text-align: center; margin-top: 2rem; }
.section-more {
  display: inline-block;
  padding: 0.6rem 1.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent);
  letter-spacing: 0.02em;
  transition: all 0.2s;
}
.section-more:hover { background: var(--accent); color: #fff; }

/* ── Home Search ── */
.home-search {
  padding: 3rem 0;
}
.home-search-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.home-search-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.home-search-desc {
  font-size: 0.85rem;
  color: var(--text3);
  margin-bottom: 1.2rem;
}

.hero-search {
  margin: 1.5rem auto 0;
  max-width: 600px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}
.hero-search-input {
  min-height: 48px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  padding: 0 1rem;
  font-size: 0.95rem;
  font-family: inherit;
}
.hero-search-input:focus {
  outline: none;
  border-color: var(--accent);
}
.hero-search-submit {
  min-height: 48px;
  border: none;
  padding: 0 1.2rem;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.hero-search-submit:hover {
  background: var(--accent-hover);
}

/* ── Article Grid ── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0;
  padding: 2rem 0 3rem;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.card:hover {
  background: var(--surface2);
}
.card-link {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.5rem 0;
  color: var(--text);
  height: 100%;
}
.card-link:hover { color: var(--text); }
.card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.card-cat {
  padding: 0.15rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: white;
}
.cat-informatique { background: var(--cat-info); }
.cat-cosmologie { background: var(--cat-cosmo); }
.cat-vivant { background: var(--cat-vivant); }
.cat-sciences { background: var(--cat-sciences); }
.card-cat:not(.cat-informatique):not(.cat-cosmologie):not(.cat-vivant):not(.cat-sciences) {
  background: var(--text3);
}
.card-meta time {
  font-size: 0.75rem;
  color: var(--text3);
}
.card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.card-excerpt {
  color: var(--text2);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.8rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text3);
}
.card-author { font-style: italic; color: var(--text2); }
.card-score {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid var(--accent);
  letter-spacing: 0.02em;
  margin-left: auto;
}
.card-tags {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.card-tag {
  font-size: 0.7rem;
  color: var(--text3);
  transition: color 0.2s;
  cursor: pointer;
}
.card-tag:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Article hero image ── */
.article-hero {
  margin: 0 auto 2rem;
}
.article-hero img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  border-radius: 2px;
}
.image-credit {
  font-size: 0.75rem;
  color: var(--text2);
  text-align: right;
  margin-top: 0.4rem;
  font-style: italic;
}

/* ── Card image ── */
.card-img {
  overflow: hidden;
  margin-bottom: 0.8rem;
}
.card-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 2px;
  transition: transform 0.3s;
}
.card:hover .card-img img {
  transform: scale(1.03);
}

/* ── Semantic Search ── */
.search-shell { padding-bottom: 3rem; }
.search-panel {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.semantic-search-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.search-label {
  color: var(--text2);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.search-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}
.search-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  padding: 0 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus {
  border-color: var(--accent);
}
.search-submit {
  min-height: 48px;
  border: none;
  padding: 0 1.2rem;
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.search-submit:hover { background: var(--accent-hover); }
.search-meta {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.search-status { color: var(--text); font-weight: 600; font-size: 0.9rem; }
.search-hint { color: var(--text3); max-width: 46rem; font-size: 0.85rem; }
.search-suggestions {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.suggestion-chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text2);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-size: 0.82rem;
  transition: all 0.2s;
}
.suggestion-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.search-empty {
  padding: 2rem;
  border: 1px dashed var(--border-strong);
  color: var(--text2);
  text-align: center;
}
.search-results-head {
  margin-bottom: 1rem;
  color: var(--text2);
  font-size: 0.9rem;
}
.search-results-head strong,
.search-results-head span { color: var(--text); }
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.2rem;
  transition: border-color 0.2s;
}
.search-card:hover { border-color: var(--accent); }
.search-card-top,
.search-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}
.search-card-top { margin-bottom: 0.6rem; }
.search-card h2 { font-size: 1.05rem; line-height: 1.35; margin-bottom: 0.5rem; }
.search-card p { color: var(--text2); margin-bottom: 0.8rem; font-size: 0.9rem; }
.search-card-footer { color: var(--text3); font-size: 0.85rem; }
.search-chip,
.search-score {
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
}
.search-chip {
  display: inline-flex;
  align-items: center;
  margin-right: 0.3rem;
  margin-bottom: 0.3rem;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}
.search-score {
  background: rgba(46, 125, 50, 0.1);
  color: var(--green);
  font-weight: 700;
}

/* ── Article Single ── */
.article-single {
  animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.article-header {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
}
.article-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 0.8rem 0 0.6rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.article-subtitle {
  font-size: 1.1rem;
  color: var(--text2);
  font-style: italic;
  line-height: 1.6;
}
.article-info {
  display: flex;
  gap: 1.5rem;
  font-size: 0.82rem;
  color: var(--text3);
  margin-top: 0.3rem;
}
.article-author { font-weight: 500; color: var(--text2); }
.article-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.6rem;
  background: var(--accent-light);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.article-trust-badge svg { stroke: var(--accent); flex-shrink: 0; }

/* ── Pipeline compact (article header) ── */
.article-pipeline-header {
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.pipeline-steps-compact {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.pipeline-step-sm {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text3);
  padding: 0.1rem 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pipeline-step-sm.active {
  color: var(--accent);
  background: var(--accent-light);
}
.pipeline-arrow-sm {
  color: var(--text3);
  font-size: 0.55rem;
  opacity: 0.5;
}
.pipeline-badge-sm {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}
.pipeline-badge-sm.pipeline-passes {
  background: rgba(255, 193, 7, 0.15);
  color: #d4a017;
}
.pipeline-badge-sm.pipeline-debate {
  background: rgba(156, 39, 176, 0.12);
  color: #9c27b0;
}
.pipeline-label-sm {
  font-size: 0.72rem;
  color: var(--text3);
  margin-left: auto;
}
.pipeline-label-sm a { color: var(--accent); }

/* ── Reading Progress Bar ── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ── Article Audio Player ── */
.article-audio { margin-top: 1.5rem; }
.article-audio details {
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.article-audio summary {
  padding: 0.8rem 1.2rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  user-select: none;
  transition: background 0.2s;
}
.article-audio summary:hover { background: var(--accent-light); }
.article-audio audio {
  display: block;
  width: 100%;
  padding: 0.5rem 1.2rem 1rem;
  outline: none;
}

/* ── Article Body ── */
.article-body {
  padding: 2.5rem 0;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}
.article-body h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
}
.article-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 0.8rem;
  color: var(--text);
}
.article-body p { margin-bottom: 1.3rem; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body em { color: var(--text2); }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.8rem 1.2rem;
  margin: 1.5rem 0;
  background: var(--surface2);
  font-style: italic;
  color: var(--text2);
  line-height: 1.7;
}
.article-body code {
  font-family: 'JetBrains Mono', monospace;
  background: var(--surface2);
  color: var(--accent);
  padding: 0.1rem 0.4rem;
  font-size: 0.88em;
}
.article-body pre {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1.2rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}
.article-body pre code {
  background: none;
  color: var(--text);
  padding: 0;
}
.article-body img {
  max-width: 100%;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.article-body .article-illustration {
  margin: 2.5rem 0;
  padding: 0;
}
.article-body .article-illustration img {
  width: 100%;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin: 0;
}
.article-body .article-illustration figcaption {
  font-size: 0.85rem;
  color: var(--text2);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
  line-height: 1.4;
}
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(192, 80, 70, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.article-body a:hover {
  text-decoration-color: var(--accent);
}
.article-body ul, .article-body ol {
  margin: 0.8rem 0 1.3rem 1.5rem;
}
.article-body li { margin-bottom: 0.4rem; }

/* ── Article Footer ── */
.article-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
}
.article-sources { margin-bottom: 1.5rem; }
.article-sources h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-bottom: 0.6rem;
  font-weight: 700;
}
.article-sources ul { list-style: none; padding: 0; }
.article-sources li {
  font-size: 0.85rem;
  color: var(--text2);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}
.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}
.pdf-link:hover {
  background: var(--accent-hover);
  color: white;
}
.article-license {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1rem 0;
}
.license-badge {
  font-size: 0.78rem;
  color: var(--text3);
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--border);
}
.license-badge a { color: var(--accent); }
.license-badge a:hover { text-decoration: underline; }
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.5rem 0;
}
.tag {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text3);
  transition: all 0.2s;
}
.tag:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Pipeline provenance ── */
.article-pipeline {
  margin-bottom: 1.5rem;
  padding: 1rem 1.2rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}
.pipeline-steps {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.pipeline-step {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text3);
  padding: 0.15rem 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pipeline-step.active {
  color: var(--accent);
  background: var(--accent-light);
}
.pipeline-arrow {
  color: var(--text3);
  font-size: 0.6rem;
  opacity: 0.5;
}
.pipeline-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}
.pipeline-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.pipeline-score {
  background: var(--accent-light);
  color: var(--accent);
}
.pipeline-passes {
  background: rgba(255, 193, 7, 0.15);
  color: #d4a017;
}
.pipeline-debate {
  background: rgba(156, 39, 176, 0.12);
  color: #9c27b0;
}
.pipeline-note {
  font-size: 0.78rem;
  color: var(--text3);
  line-height: 1.5;
}
.pipeline-note a { color: var(--accent); text-decoration: underline; }

/* ── Coulisses de production ── */
.pipeline-coulisses {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.pipeline-coulisses summary {
  cursor: pointer;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text2);
  background: var(--bg2, rgba(255,255,255,0.03));
  user-select: none;
}
.pipeline-coulisses summary:hover {
  color: var(--accent);
}
.pipeline-coulisses[open] summary {
  border-bottom: 1px solid var(--border);
}
.coulisses-content {
  padding: 1rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text2);
}
.critique-verdict {
  margin-bottom: 0.8rem;
}
.critique-remarks h4,
.debate-details h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  margin-bottom: 0.4rem;
}
.critique-remarks ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}
.critique-remarks li {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.critique-remarks li:last-child {
  border-bottom: none;
}
.debate-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.4rem 0;
}
.debate-consensus {
  font-weight: 600;
  color: var(--accent);
}
.debate-angle {
  font-style: italic;
  color: var(--text3);
}

/* ── Related articles ── */
.related-articles { padding: 2rem 0; }
.related-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  margin-bottom: 0.8rem;
  font-weight: 700;
}
.related-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: color 0.2s;
}
.related-card:hover { color: var(--accent); }
.related-cat {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  white-space: nowrap;
  min-width: 90px;
}
.related-name {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
}
.related-time {
  font-size: 0.72rem;
  color: var(--text3);
  white-space: nowrap;
}
.related-excerpt { color: var(--text2); line-height: 1.55; }
.semantic-related-card { align-items: flex-start; }
.semantic-related-score { align-self: flex-start; }

/* ── Newsletter ── */
.newsletter-box { padding: 0 0 2rem; }
.newsletter-inner {
  padding: 1.2rem 1.5rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
}
.newsletter-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.8rem;
}
.newsletter-text strong { font-size: 0.95rem; color: var(--text); }
.newsletter-text span { font-size: 0.82rem; color: var(--text2); }
.newsletter-form { display: flex; gap: 0.5rem; }
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.5rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.newsletter-form input[type="email"]:focus { border-color: var(--accent); }
.newsletter-form input[type="email"]::placeholder { color: var(--text3); }
.newsletter-form button {
  padding: 0.5rem 1.2rem;
  background: var(--accent);
  color: white;
  border: none;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--accent-hover); }
.newsletter-status { font-size: 0.78rem; margin-top: 0.4rem; min-height: 1rem; }

/* ── Article Nav ── */
.article-nav {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 0 3rem;
  gap: 1rem;
}
.nav-prev, .nav-next {
  font-size: 0.85rem;
  color: var(--accent);
  max-width: 45%;
  padding: 0.5rem 0;
  transition: color 0.2s;
}
.nav-prev:hover, .nav-next:hover { color: var(--accent-hover); }

/* ── Pagination ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 3rem;
}
.page-btn {
  padding: 0.5rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 0.82rem;
  color: var(--text);
  transition: all 0.2s;
}
.page-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.page-info { font-size: 0.82rem; color: var(--text3); }

/* ── Footer ── */
.site-footer {
  background: var(--surface2);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}
.footer-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.footer-brand .logo-icon { color: var(--accent); }
.footer-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--text3);
  margin-top: 0.3rem;
  line-height: 1.5;
}
.footer-links {
  display: flex;
  gap: 4rem;
  margin-bottom: 2rem;
}
.footer-col { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col h4 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  margin-bottom: 0.3rem;
  font-weight: 700;
}
.footer-col a {
  font-size: 0.85rem;
  color: var(--text2);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text3);
  line-height: 1.5;
}
.footer-bottom a { color: var(--text2); }

/* ── Section Description ── */
.section-desc {
  color: var(--text2);
  font-size: 1rem;
  margin-top: 0.4rem;
}

/* ── Theme Toggle ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text3);
  transition: all 0.2s;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.theme-toggle .icon-sun { display: var(--icon-sun); }
.theme-toggle .icon-moon { display: var(--icon-moon); }

/* ── Transitions ── */
html, body,
.site-header, .site-footer,
.card, .article-body, .article-header,
.tag, .pdf-link, .nav-link, .page-btn {
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ── Reactions ── */
.engage {
  margin: 2rem auto 1.2rem;
  padding: 1rem;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.engage-prompt {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.engage-subtext {
  font-size: 0.8rem;
  color: var(--text3);
  margin-bottom: 0.7rem;
  line-height: 1.4;
}
.engage-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.engage-row-share {
  grid-template-columns: 1fr;
  margin-top: 0.5rem;
}
.react-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 40px;
  padding: 0.5rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 560;
  color: var(--text2);
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.react-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.react-btn:active { transform: scale(0.97); }
.react-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.react-num {
  display: inline-block;
  min-width: 1.4rem;
  padding: 0.1rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  text-align: center;
  border-radius: 2px;
}
.react-num { opacity: 0.6; }
.react-num:not(:empty) { opacity: 1; }

@keyframes reactPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.react-btn.pop { animation: reactPop 0.2s ease; }

@media (min-width: 760px) {
  .engage-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .engage-row-share { grid-template-columns: 1fr; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem;
    gap: 0.2rem;
  }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero-title { font-size: 2rem; }
  .page-header { padding: 2rem 0 1.5rem; }
  .hero-search { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; gap: 0; padding-top: 1.5rem; }
  .article-header h1 { font-size: 1.4rem; }
  .article-body { font-size: 1rem; }
  .search-input-row { grid-template-columns: 1fr; }
  .search-submit { width: 100%; }
  .footer-links { flex-direction: column; gap: 1.5rem; }
  .card-link { padding: 1.2rem 0; }
  .container, .container-narrow { padding: 0 1.2rem; }
  .header-inner { padding: 0.7rem 1.2rem; }
  .newsletter-form { flex-direction: column; }
  .newsletter-inner { padding: 1rem 1.2rem; }
  .related-card { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .related-cat { min-width: auto; }
  .pipeline-arrow { display: none; }
  .featured-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .featured-title { font-size: 1.4rem; }
  .featured { padding: 1.5rem 0; }
  .home-grid { grid-template-columns: 1fr; gap: 0; }
  .home-grid .card { border-bottom: 1px solid var(--border); }
  .rubrics-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .home-section { padding: 1.5rem 0; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .featured-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .home-grid { grid-template-columns: repeat(2, 1fr); }
  .rubrics-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Read indicator ── */
.card-read { position: relative; }
.card-read .card-title { color: var(--text3); }
.card-read::after {
  content: "Lu";
  position: absolute;
  top: 1.5rem;
  right: 0.8rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  background: rgba(46, 125, 50, 0.1);
  padding: 0.1rem 0.45rem;
}

/* ── Lightbox (click-to-zoom images) ── */
.article-body img {
  cursor: zoom-in;
}
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-overlay img {
  max-width: 94vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  transition: transform 0.25s ease;
}
.lightbox-overlay.active img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
}
.lightbox-close:hover { opacity: 1; }

/* ── Selection ── */
::selection {
  background: rgba(192, 80, 70, 0.2);
  color: var(--text);
}

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }
