/* ============================================
   Publications Page — Refonte v3
   ============================================ */

/* ── Hero ── */
.pub-hero {
  padding: calc(var(--nav-height, 80px) + 4rem) 0 2.5rem;
  background: var(--navy-deep, #0F1D35);
  color: var(--text-light-on-dark, #ffffff);
  text-align: center;
}
.pub-hero .breadcrumb { margin-bottom: 1.5rem; }
.pub-hero .breadcrumb, .pub-hero .breadcrumb a, .pub-hero .breadcrumb .sep {
  color: rgba(255,255,255,.5);
}
.pub-hero .breadcrumb a:hover { color: rgba(255,255,255,.9); }

.pub-hero__inner { max-width: 640px; margin: 0 auto; }
.pub-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: .75rem;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.pub-hero__subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.pub-hero__sublink {
  color: rgba(255,255,255,.92);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.35);
  text-underline-offset: 3px;
  transition: text-decoration-color .2s ease, color .2s ease;
}
.pub-hero__sublink:hover,
.pub-hero__sublink:focus {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}
.pub-hero__count {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ── Sticky Filter Bar ── */
.pub-filters {
  position: sticky;
  top: var(--nav-height, 80px);
  z-index: var(--z-sticky, 500);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border, #E2E8F0);
  padding: .75rem 0;
  transition: box-shadow .3s ease;
}
.pub-filters.is-scrolled {
  box-shadow: 0 2px 12px rgba(27,42,74,.08);
}
.pub-filters__row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

/* Search */
.pub-filters__search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.pub-filters__search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--steel, #94a3b8);
  pointer-events: none;
}
.pub-filters__search-input {
  width: 100%;
  padding: .55rem .75rem .55rem 2.4rem;
  border: 1.5px solid var(--border, #E2E8F0);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: .88rem;
  color: var(--ink, #1e293b);
  background: var(--card-bg, #fff);
  transition: border-color .2s, box-shadow .2s;
}
.pub-filters__search-input::placeholder { color: var(--steel, #94a3b8); }
.pub-filters__search-input:focus {
  outline: none;
  border-color: var(--sky, #4A90D9);
  box-shadow: 0 0 0 3px rgba(45, 91, 215,.12);
}

/* Theme multi-select dropdown */
.pub-filters__themes {
  position: relative;
  flex-shrink: 0;
}
.pub-multiselect__toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .75rem;
  min-width: 180px;
  font-size: .82rem;
  font-family: var(--font-display);
  font-weight: 500;
  border: 1.5px solid var(--border, #E2E8F0);
  border-radius: 8px;
  background: var(--card-bg, #fff);
  color: var(--navy, #1B2A4A);
  cursor: pointer;
  transition: border-color .2s;
}
.pub-multiselect__toggle:hover {
  border-color: var(--sky, #4A90D9);
}
.pub-multiselect__toggle:focus-visible {
  outline: none;
  border-color: var(--sky, #4A90D9);
  box-shadow: 0 0 0 3px rgba(45, 91, 215,.12);
}
.pub-multiselect__toggle[aria-expanded="true"] {
  border-color: var(--sky, #4A90D9);
}
.pub-multiselect__label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pub-multiselect__chevron {
  flex-shrink: 0;
  transition: transform .2s ease;
}
.pub-multiselect__toggle[aria-expanded="true"] .pub-multiselect__chevron {
  transform: rotate(180deg);
}
.pub-multiselect__menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 10;
  min-width: 220px;
  padding: .35rem;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(27, 42, 74, .12);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pub-multiselect__menu[hidden] { display: none; }
.pub-multiselect__option {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .45rem .55rem;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink, #1e293b);
  cursor: pointer;
  transition: background-color .15s ease;
}
.pub-multiselect__option:hover {
  background: var(--bg-alt, #F3F4F6);
}
.pub-multiselect__option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--navy, #1B2A4A);
  cursor: pointer;
  flex-shrink: 0;
}
.pub-multiselect__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pub-multiselect__dot--ecologie { background: var(--color-ecologie); }
.pub-multiselect__dot--economie { background: var(--color-economie); }
.pub-multiselect__dot--institutions { background: var(--color-institutions); }
.pub-multiselect__dot--social { background: var(--color-social); }
.pub-multiselect__dot--international { background: var(--color-international); }
.pub-multiselect__dot--culture { background: var(--color-culture); }
.pub-multiselect__name { flex: 1; }
.pub-multiselect__clear {
  margin-top: .25rem;
  padding: .4rem .55rem;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted, #64748b);
  background: transparent;
  border: none;
  border-top: 1px solid var(--border, #E2E8F0);
  text-align: left;
  cursor: pointer;
  border-radius: 0 0 6px 6px;
  transition: color .15s ease;
}
.pub-multiselect__clear:hover {
  color: var(--navy, #1B2A4A);
}
.pub-multiselect__clear:disabled {
  opacity: .5;
  cursor: default;
}

/* Type & sort selects */
.pub-filters__type,
.pub-filters__sort {
  flex-shrink: 0;
}
.pub-filters__type select,
.pub-filters__sort select {
  padding: .4rem .75rem;
  font-size: .82rem;
  font-family: var(--font-display);
  font-weight: 500;
  border: 1.5px solid var(--border, #E2E8F0);
  border-radius: 8px;
  background: var(--card-bg, #fff);
  color: var(--navy, #1B2A4A);
  cursor: pointer;
  transition: border-color .2s;
}
.pub-filters__type select:focus,
.pub-filters__sort select:focus {
  outline: none;
  border-color: var(--sky, #4A90D9);
}

/* Result count */
.pub-filters__count {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 500;
  color: var(--muted, #64748b);
  margin-top: .5rem;
}

/* ── Publications Grid ── */
.pub-listing {
  padding: 2.5rem 0 4rem;
  background: var(--color-bg-alt);
  min-height: 400px;
}
.pub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* ── Card enhancements ── */
.pub-card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg, #ffffff);
  border-radius: 8px;
  border: 1px solid var(--border, #E2E8F0);
  overflow: hidden;
  box-shadow: var(--sh-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.pub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}
.pub-card-link { text-decoration: none; display: block; }

/* Image */
.pub-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-alt, #F3F4F6);
}
.pub-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.pub-card:hover .pub-card-img img { transform: scale(1.03); }
.pub-card-img--gradient {
  aspect-ratio: 16 / 9;
}

/* Type badge on image */
.pub-card-type-badge {
  position: absolute;
  top: .6rem;
  right: .6rem;
  padding: .15rem .55rem;
  font-family: var(--font-display);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: 4px;
  background: rgba(255,255,255,.92);
  color: var(--navy, #1B2A4A);
  backdrop-filter: blur(4px);
  z-index: 2;
}
.pub-card-type-badge--note { color: #0d9488; }
.pub-card-type-badge--point-de-vue { color: var(--color-accent); }
.pub-card-type-badge--rapport { color: var(--color-economie, #2563eb); }
.pub-card-type-badge--rapport-phare { color: var(--navy-deep, #0F1D35); font-weight: 800; }

/* Card body */
.pub-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pub-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: .6rem;
}
.pub-card-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .1rem .4rem;
  font-size: .6rem;
  font-weight: 500;
  border-radius: 50px;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .03em;
  text-decoration: none;
  transition: opacity .2s;
}
.pub-card-tag:hover { opacity: .7; }
.pub-card-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Tag theme colors */
.tag-ecologie { color: var(--color-ecologie-dark); }
.tag-ecologie::before { background: var(--color-ecologie); }
.tag-economie { color: var(--color-economie-dark); }
.tag-economie::before { background: var(--color-economie); }
.tag-institutions { color: var(--color-institutions-dark); }
.tag-institutions::before { background: var(--color-institutions); }
.tag-social { color: var(--color-social-dark); }
.tag-social::before { background: var(--color-social); }
.tag-international { color: var(--color-international-dark); }
.tag-international::before { background: var(--color-international); }
.tag-culture { color: var(--color-culture-dark); }
.tag-culture::before { background: var(--color-culture); }

.pub-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink, #1e293b);
  line-height: 1.3;
  margin-bottom: .4rem;
}
.pub-card-title a { color: inherit; text-decoration: none; }
.pub-card-title a:hover { color: var(--sky, #4A90D9); }

.pub-card-author {
  font-size: .8rem;
  color: var(--steel, #94a3b8);
  font-style: italic;
  font-family: var(--font-serif);
  margin-bottom: .35rem;
}
.pub-card-author-img {
  width: 16px; height: 16px;
  object-fit: contain;
  vertical-align: -2px;
  margin-right: .25rem;
}

.pub-card-desc {
  font-size: .88rem;
  color: var(--muted, #64748b);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.pub-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--muted, #64748b);
  margin-top: auto;
  padding-top: .75rem;
  border-top: 1px solid var(--border, #E2E8F0);
  font-family: var(--font-display);
}

/* ── Empty state ── */
.pub-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted, #64748b);
}
.pub-empty svg {
  opacity: .3;
  margin-bottom: 1rem;
}
.pub-empty__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--navy, #1B2A4A);
  margin-bottom: 1rem;
}

/* ── Pagination ── */
.pub-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.pub-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 .5rem;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 600;
  border: 1.5px solid var(--border, #E2E8F0);
  border-radius: 8px;
  background: var(--card-bg, #fff);
  color: var(--navy, #1B2A4A);
  cursor: pointer;
  transition: all .2s ease;
}
.pub-page-btn:hover:not(:disabled) {
  background: var(--navy, #1B2A4A);
  color: #fff;
  border-color: var(--navy, #1B2A4A);
}
.pub-page-btn.active {
  background: var(--navy, #1B2A4A);
  color: #fff;
  border-color: var(--navy, #1B2A4A);
}
.pub-page-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
}
.pub-page-info {
  font-family: var(--font-display);
  font-size: .78rem;
  color: var(--muted, #64748b);
  margin-left: .75rem;
}

/* ============================================
   Article / Individual Publication Pages
   ============================================ */

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 3px;
  background: var(--cyan, #4A90D9);
  z-index: 9999;
  transition: none;
}

/* Article Content */
.article-content { max-width: 720px; margin: 0 auto; }

/* Drop Cap — opt-in via class */
.article-content p.dropcap::first-letter {
  font-family: var(--font-heading, 'Cormorant Garamond', serif);
  font-size: 3.5em;
  float: left;
  line-height: 0.8;
  margin-right: 8px;
  margin-top: 4px;
  color: var(--navy, #1B2A4A);
  font-weight: 700;
}

/* ── Skeleton loader ── */
@keyframes pub-skeleton-pulse {
  0%, 100% { opacity: .15; }
  50% { opacity: .25; }
}
.pub-skeleton {
  background: var(--card-bg, #fff);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.pub-skeleton__img {
  width: 100%;
  aspect-ratio: 16/9;
  background: #e2e8f0;
  animation: pub-skeleton-pulse 1.5s ease-in-out infinite;
}
.pub-skeleton__lines {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.pub-skeleton__lines div {
  height: .85rem;
  border-radius: 4px;
  background: #e2e8f0;
  animation: pub-skeleton-pulse 1.5s ease-in-out infinite;
}
.pub-skeleton__lines div:nth-child(1) { width: 40%; }
.pub-skeleton__lines div:nth-child(2) { width: 90%; }
.pub-skeleton__lines div:nth-child(3) { width: 65%; }

/* ── Error state ── */
.pub-error {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted, #64748b);
}
.pub-error svg {
  opacity: .3;
  margin-bottom: 1rem;
}
.pub-error p {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--navy, #1B2A4A);
  margin-bottom: 1.5rem;
}

/* Chapô — opt-in via class */
.article-content p.chapo {
  border-left: 3px solid var(--color-accent);
  padding-left: 20px;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--body);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* H2 in articles */
.article-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  color: var(--navy, #1B2A4A);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-left: 16px;
  border-left: 3px solid var(--color-accent);
  line-height: 1.3;
}
.article-content h2 strong { font-weight: inherit; }

/* H3 in articles */
.article-content h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--navy, #1B2A4A);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

/* Section separator */
.article-content hr.section-break,
.article-content .editorial-separator {
  border: none;
  width: 60px; height: 1px;
  background: rgba(27,42,74,0.15);
  margin: 3rem auto;
}

/* Reset paragraph styles inside table cells */
.article-content td p, .article-content th p { margin-bottom: 0.5em; font-size: inherit; line-height: inherit; color: inherit; }
.article-content td p:last-child, .article-content th p:last-child { margin-bottom: 0; }

/* Article Tables */
.article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0 2rem;
  font-size: .88rem;
  line-height: 1.5;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.article-content table thead tr,
.article-content table tbody tr:first-child {
  background: var(--navy-deep, #0F1D35);
}
.article-content table thead th,
.article-content table thead td,
.article-content table tbody tr:first-child td,
.article-content table tbody tr:first-child th {
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: .75rem .85rem;
  border-bottom: 2px solid var(--color-accent);
  text-align: left;
  white-space: normal;
}
.article-content table thead th *,
.article-content table thead td *,
.article-content table tbody tr:first-child td *,
.article-content table tbody tr:first-child th * { color: inherit; }
/* Single-cell tables */
.article-content table tbody tr:first-child:last-child td:only-child {
  background: var(--bg-alt, #f8fafc);
  color: var(--ink, #1e293b);
  font-family: var(--font-body);
  font-weight: normal;
  font-size: .88rem;
  text-transform: none;
  letter-spacing: normal;
  border-bottom: none;
  padding: 1.25rem 1.5rem;
  line-height: 1.7;
}
.article-content table tbody tr:first-child:last-child td:only-child strong { color: var(--navy, #1B2A4A); }
.article-content table tbody tr:first-child:last-child:has(td:only-child) { background: var(--bg-alt, #f8fafc); }
.article-content table tbody tr:not(:first-child) td:first-child {
  font-weight: 600;
  color: var(--navy, #1e3a8a);
  background: var(--bg-alt, #f8fafc);
  white-space: normal;
}
.article-content .table-wrapper + p > em:only-child,
.article-content .table-wrapper + p > em:first-child:last-child {
  display: block;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.5;
  margin-top: -.5rem;
  margin-bottom: 1.5rem;
}
.article-content table td, .article-content table th {
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  vertical-align: top;
}
.article-content table tbody tr:last-child td { border-bottom: none; }
.article-content table tbody tr:hover { background: rgba(59, 130, 246, .03); }
.article-content table, .article-content table td, .article-content table th { width: auto !important; height: auto !important; }
.article-content .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.5rem -1rem 2rem; padding: 0 1rem; }
.article-content .table-wrapper table { min-width: 500px; }
.article-content table td strong, .article-content table td em { font-size: inherit; color: inherit; }
.article-content table td[style*="background-color"], .article-content table td[style*="background-color"] * { color: var(--ink); }
.article-content table tbody tr:first-child td[style*="background-color"], .article-content table tbody tr:first-child td[style*="background-color"] * { color: var(--ink); }

/* Article Images */
.article-content img {
  max-width: 100%; height: auto !important;
  border-radius: var(--radius-sm, 8px);
  margin: 1rem auto; display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.article-content .wp-image-center, .article-content .aligncenter { margin-left: auto; margin-right: auto; }
.article-content figure { margin: 1.5rem 0 2rem; text-align: center; }
.article-content figcaption, .article-content .wp-caption-text { font-size: .82rem; color: var(--muted); margin-top: .5rem; font-style: italic; line-height: 1.5; }
.article-content .img-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem;
  min-height: 160px; background: var(--bg-alt); border: 2px dashed var(--border); border-radius: var(--radius-md);
  color: var(--muted); margin: 1.5rem 0; padding: 2rem;
}
.article-content .img-placeholder svg { opacity: .4; }
.article-content .img-placeholder span { font-size: .85rem; font-style: italic; }

/* Article Separator */
.article-content .article-separator, .article-content hr {
  border: none; height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 2.5rem 0;
}

/* Figure / Table Labels */
.article-content .figure-label {
  font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  color: var(--navy); margin: 2rem 0 .5rem; padding-left: .75rem;
  border-left: 3px solid var(--color-accent); line-height: 1.4;
}
.article-content .figure-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: 1.5rem 0 2rem; }
.article-content .figure-grid img { margin: 0; width: 100%; }
.article-content .figure-note { font-size: .82rem; color: var(--muted); font-style: italic; text-align: center; margin-top: .5rem; line-height: 1.5; }
@media (max-width: 480px) { .article-content .figure-grid { grid-template-columns: 1fr; } }

/* Footnote references */
.article-content a[href^="#_ftn"], .article-content a[href^="#_edn"], .article-content a[href^="#fn"] {
  font-size: 0.75em; vertical-align: super; color: var(--sky); text-decoration: none; line-height: 0; transition: color 0.2s;
}
.article-content a[href^="#_ftn"]:hover, .article-content a[href^="#_edn"]:hover, .article-content a[href^="#fn"]:hover { text-decoration: underline; }
.article-content sup a { font-size: inherit; color: var(--sky); text-decoration: none; }
.article-content sup a:hover { text-decoration: underline; }

/* Footnotes Section */
.article-content .footnotes-section {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(27,42,74,0.12);
  position: relative;
}
.article-content .footnotes-section::before {
  content: 'Notes et références'; display: block;
  font-family: var(--font-heading); font-weight: 600; font-size: 1.25rem;
  color: var(--navy); margin-bottom: 1rem;
}
.article-content .footnotes-title { font-family: var(--font-heading); font-size: 1.25rem; color: var(--navy); margin-bottom: 1rem; }
.article-content .footnotes-section p { font-size: .875rem; line-height: 1.6; margin-bottom: .6rem; color: var(--muted); padding-left: 1.5rem; text-indent: -1.5rem; }
.article-content .footnotes-section a { color: var(--sky); font-weight: 600; }
.article-content .footnotes-section sup { font-weight: 600; color: var(--navy); }

.article-back {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 2.5rem; font-family: var(--font-display);
  font-weight: 600; font-size: .95rem; color: var(--ink);
  transition: color var(--transition), transform var(--transition);
}
.article-back:hover { color: var(--sky); transform: translateX(-3px); }

/* Article hero */
.article-hero {
  padding: calc(var(--nav-height) + 5.5rem) 0 3rem;
  background: var(--navy-deep); color: var(--text-light-on-dark);
  position: relative; overflow: hidden;
}
.article-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 120px;
  background: linear-gradient(to top, rgba(10,42,47,.4), transparent); pointer-events: none;
}
.article-hero h1 { font-family: var(--font-heading); font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--text-light-on-dark); margin-bottom: .75rem; max-width: 720px; }
.article-hero .article-meta { font-size: .9rem; color: rgba(255,255,255,.65); font-family: var(--font-display); }
.article-hero .article-meta strong { color: rgba(255,255,255,.85); }

/* Author block */
.article-author-block {
  display: flex; gap: 1.25rem; align-items: flex-start;
  margin-bottom: 2rem; padding: 1rem 1.25rem;
  background: rgba(250,248,245,0.8); border-radius: 8px;
  border: 1px solid rgba(27,42,74,0.08);
}
.article-author-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; color: white; overflow: hidden; }
.article-author-avatar img,
.article-author-avatar-photo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: block; }
.article-author-block picture { flex-shrink: 0; line-height: 0; }
.article-author-info { flex: 1; }
.article-author-name { font-weight: 700; font-size: 1.05rem; color: var(--ink); margin-bottom: 0.25rem; }
.article-author-bio { font-size: 0.85rem; color: var(--muted); line-height: 1.5; font-style: italic; }
.article-author-link { display: inline-block; margin-top: 0.35rem; font-size: 0.8rem; font-style: normal; font-weight: 600; color: var(--sky); transition: color var(--transition); }
.article-author-link:hover { color: var(--primary-dark); }
.article-type-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.2rem 0.6rem; border-radius: 4px; margin-bottom: 0.5rem; }
.article-type-badge--note { background: rgba(13, 148, 136, 0.1); color: var(--teal); }
.article-type-badge--pdv { background: rgba(193, 18, 31, 0.1); color: #C1121F; }
.article-official-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 2rem; padding: 0.75rem 1.25rem;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; color: var(--navy); transition: all var(--transition);
}
.article-official-link:hover { background: var(--navy); color: white; border-color: var(--navy); }

@media (max-width: 640px) { .article-author-block { flex-direction: column; align-items: center; text-align: center; } }

/* Article hero image */
.article-hero-img { width: 100%; margin: 0 0 2rem; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 7; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.article-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform var(--transition-slow); }
.article-hero-img:hover img { transform: scale(1.02); }
.article-hero-img + .img-caption, .article-hero-caption { font-size: 0.85rem; color: #9CA3AF; text-align: center; margin-top: 0.5rem; margin-bottom: 1.5rem; }

/* Social sharing */
.article-share {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 2rem 0; padding: 1.25rem 0;
  border-top: 1px solid rgba(27,42,74,0.08);
}
.article-share-label { font-size: 0.85rem; color: var(--steel); font-weight: 500; font-family: var(--font-display); }
.article-share a, .article-share button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: transparent; color: var(--navy); border: none; cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease; text-decoration: none;
}
.article-share a:hover, .article-share button:hover { color: var(--sky); background: var(--ice); }
.article-share svg { width: 20px; height: 20px; }

/* Reading time */
.reading-time { display: inline-block; font-size: 0.85rem; color: var(--steel); font-family: var(--font-display); margin-top: 0.35rem; }

/* Related publications */
.related-pubs { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(27,42,74,0.08); }
.related-pubs h3 { font-family: var(--font-heading); font-size: 1.5rem; color: var(--navy); margin-bottom: 1.25rem; }
.related-pubs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.related-pub-card {
  display: block; padding: 1.25rem;
  background: var(--bg-alt); border-radius: 8px;
  border: 1px solid var(--border); text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease;
}
.related-pub-card:hover { border-color: var(--sky); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(27,42,74,0.1); }
.related-pub-card-title { font-family: var(--font-heading); font-size: 0.95rem; color: var(--ink); margin-bottom: 0.5rem; line-height: 1.4; }
.related-pub-card-meta { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 640px) { .related-pubs-grid { grid-template-columns: 1fr; } }

/* Callout */
.callout {
  border-left: 4px solid var(--blue); background: rgba(37, 99, 235, 0.04);
  padding: 16px 20px; margin: 24px 0; font-family: var(--font-display);
  font-size: 0.95rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink); line-height: 1.6;
}
.callout strong { color: var(--primary-dark); }

/* External source */
.article-external-source {
  margin: 2rem 0; padding: 1.5rem 1.75rem;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.06), rgba(37, 99, 235, 0.04));
  border: 1px solid rgba(13, 148, 136, 0.2); border-left: 4px solid #0d9488;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.article-external-source .external-source-label { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: #0d9488; margin-bottom: 0.75rem; }
.article-external-source .external-source-label svg { width: 16px; height: 16px; flex-shrink: 0; }
.article-external-source p { font-size: 1rem; line-height: 1.75; color: var(--ink); margin: 0 0 1rem; }
.article-external-source p:last-child { margin-bottom: 0; }
.article-external-source .btn-external { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem; padding: 0.5rem 1.25rem; font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; color: #fff; background: #0d9488; border-radius: var(--radius-sm); text-decoration: none; transition: background 0.2s, transform 0.15s; }
.article-external-source .btn-external:hover { background: #0f766e; transform: translateY(-1px); }
.article-external-source .btn-external svg { width: 14px; height: 14px; }

/* Skeleton loading */
.skeleton-card { height: 120px; border-radius: 12px; background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ============================================
   Responsive
   ============================================ */

/* Tablet */
@media (max-width: 1200px) {
  .pub-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
  .pub-hero { padding-top: calc(var(--nav-height, 80px) + 2.5rem); padding-bottom: 2rem; }
  .pub-hero h1 { font-size: 2rem; }

  .pub-filters__row { flex-direction: column; align-items: stretch; }
  .pub-filters__search { max-width: none; }
  .pub-filters__themes { width: 100%; }
  .pub-multiselect__toggle { width: 100%; }
  .pub-multiselect__menu { width: 100%; }

  .pub-grid { grid-template-columns: 1fr; }

  .article-content p.dropcap::first-letter { font-size: 2.5em; margin-right: 6px; }
  .article-content h2 { margin-top: 2.5rem; }
  .article-content p.chapo { padding-left: 16px; font-size: 1.1rem; }
  .article-content p { font-size: 1rem; }
}

/* ============================================
   Dark Mode
   ============================================ */
@media (prefers-color-scheme: dark) {
  .pub-hero { background: #0a1628; }
  .pub-hero h1 { color: #f1f5f9; }
  .pub-hero__subtitle { color: rgba(203, 213, 225, .8); }
  .pub-hero__count { color: var(--color-accent); }

  .pub-filters {
    background: rgba(15, 23, 42, .97);
    border-bottom-color: var(--border, #334155);
  }
  .pub-filters__search-input {
    background: var(--card-bg, #1e293b);
    border-color: var(--border, #334155);
    color: var(--ink, #e2e8f0);
  }
  .pub-multiselect__toggle {
    background: var(--card-bg, #1e293b);
    color: var(--ink, #e2e8f0);
    border-color: var(--border, #334155);
  }
  .pub-multiselect__toggle:hover { border-color: var(--sky, #60a5fa); }
  .pub-multiselect__menu {
    background: var(--card-bg, #1e293b);
    border-color: var(--border, #334155);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
  }
  .pub-multiselect__option { color: var(--ink, #e2e8f0); }
  .pub-multiselect__option:hover { background: rgba(255,255,255,.04); }
  .pub-multiselect__clear { color: var(--muted, #94a3b8); border-top-color: var(--border, #334155); }
  .pub-multiselect__clear:hover { color: var(--sky, #60a5fa); }

  .pub-filters__type select, .pub-filters__sort select {
    background: var(--card-bg, #1e293b);
    color: var(--ink, #e2e8f0);
    border-color: var(--border, #334155);
  }

  .pub-listing { background: var(--bg-white, #0f172a); }

  .pub-card { background: var(--card-bg, #1e293b); border-color: var(--border, #334155); }
  .pub-card-title, .pub-card-title a { color: var(--ink, #e2e8f0); }
  .pub-card-title a:hover { color: var(--sky, #60a5fa); }
  .pub-card-desc { color: var(--muted, #94a3b8); }
  .pub-card-author { color: var(--steel, #94a3b8); }
  .pub-card-meta { color: var(--muted, #94a3b8); border-top-color: var(--border, #334155); }
  .pub-card-type-badge { background: rgba(30,41,59,.9); color: var(--sky, #60a5fa); }

  .pub-page-btn { background: var(--card-bg, #1e293b); border-color: var(--border, #334155); color: var(--ink, #e2e8f0); }
  .pub-page-btn:hover:not(:disabled), .pub-page-btn.active { background: var(--sky, #60a5fa); color: #0f172a; border-color: var(--sky, #60a5fa); }

  .pub-empty__title { color: var(--ink, #e2e8f0); }

  /* Skeleton dark mode */
  .skeleton-card { background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%); background-size: 200% 100%; }

  /* Article pages dark mode */
  .article-author-block { background: var(--card-bg, #1e293b); border-left-color: var(--sky, #60a5fa); }
  .article-official-link { background: var(--card-bg, #1e293b); border-color: var(--border, #334155); color: var(--sky, #60a5fa); }
  .related-pub-card { background: var(--card-bg, #1e293b); border-color: var(--border, #334155); }
  .callout { background: rgba(96, 165, 250, .08); border-left-color: var(--sky, #60a5fa); color: var(--ink, #e2e8f0); }
  .callout strong { color: var(--sky, #60a5fa); }
  .article-external-source { background: linear-gradient(135deg, rgba(13, 148, 136, 0.1), rgba(96, 165, 250, 0.06)); border-color: rgba(13, 148, 136, 0.3); }
  .article-external-source p { color: var(--ink, #e2e8f0); }
  .article-external-source .btn-external { background: #0d9488; }
  .article-external-source .btn-external:hover { background: #14b8a6; }

  .article-content table { background: var(--card-bg, #1e293b); border-color: var(--border, #334155); }
  .article-content table thead tr, .article-content table tbody tr:first-child { background: #0a1628; }
  .article-content table thead th, .article-content table thead td, .article-content table tbody tr:first-child td { color: #f1f5f9; border-bottom-color: var(--color-accent); }
  .article-content table td:first-child { background: rgba(255,255,255,.04); color: var(--sky, #60a5fa); }
  .article-content table td, .article-content table th { color: var(--ink, #e2e8f0); border-bottom-color: var(--border, #334155); }
  .article-content table tbody tr:hover { background: rgba(96, 165, 250, .05); }
  .article-content img { box-shadow: 0 2px 8px rgba(0,0,0,.2); }
  .article-content .img-placeholder { background: rgba(255,255,255,.03); border-color: var(--border, #334155); color: var(--muted); }
  .article-content .figure-label { color: var(--sky, #60a5fa); border-left-color: var(--color-accent); }
  .article-content .footnotes-section { border-top-color: var(--border, #334155); }
  .article-content .footnotes-section::before { color: var(--sky, #7ab3e8); }
  .article-content .footnotes-section p { color: var(--muted, #94a3b8); }
  .article-content .footnotes-section sup { color: var(--sky, #60a5fa); }
  .article-content hr, .article-content .article-separator { background: linear-gradient(to right, transparent, var(--border, #334155), transparent); }
}
