@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&family=Cinzel:wght@400;600&display=swap');

:root {
  --navy: #1a2744;
  --navy-light: #253461;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-faint: rgba(201,168,76,0.08);
  --cream: #f9f5ee;
  --cream-dark: #ede8dd;
  --text: #2c2c2c;
  --text-light: #777;
  --border: #ddd5c4;
  --white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
}

/* ── Header ── */
header {
  background: var(--navy);
  color: var(--white);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 2px solid var(--gold);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.logo {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark {
  width: 18px;
  height: 22px;
  flex-shrink: 0;
}

.logo span {
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  font-size: 0.7rem;
  display: block;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 1px;
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  white-space: nowrap;
}

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

/* ── Hamburger (CSS-only) ── */
.nav-cb { display: none; }

.nav-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-ham span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-cb:checked ~ .nav-ham span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-cb:checked ~ .nav-ham span:nth-child(2) {
  opacity: 0;
}
.nav-cb:checked ~ .nav-ham span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Hero ── */
.hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-light) 55%, #2a3d7a 100%);
  color: var(--white);
  padding: 7rem 2rem 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Chi-Rho watermark */
.hero::after {
  content: '☧';
  position: absolute;
  right: 4%;
  bottom: -8%;
  font-size: 24rem;
  color: rgba(201, 168, 76, 0.055);
  font-family: 'Crimson Pro', serif;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* Subtle dot grid texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='1' fill='%23c9a84c' fill-opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(201,168,76,0.8);
  margin-bottom: 1.75rem;
  position: relative;
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  position: relative;
  letter-spacing: 0.06em;
}

.hero-subtitle {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: rgba(255,255,255,0.65);
  margin-bottom: 2rem;
  position: relative;
}

.hero-divider {
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 2.25rem;
  opacity: 0.7;
}

.hero-desc {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.65);
  max-width: 580px;
  margin: 0 auto 3rem;
  position: relative;
  line-height: 1.9;
}

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  padding: 0.85rem 2.2rem;
  border-radius: 2px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.15s;
  position: relative;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.7);
  padding: 0.85rem 2.2rem;
  border-radius: 2px;
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  margin-left: 1rem;
  letter-spacing: 0.04em;
  transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ── Main content ── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

/* ── Section titles ── */
.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 1rem;
  line-height: 1.25;
}

.section-intro {
  font-family: 'Crimson Pro', serif;
  font-size: 1.15rem;
  color: var(--text-light);
  max-width: 640px;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

/* ── Partie cards ── */
.parties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 2.75rem;
}

.partie-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 3px;
  padding: 1.75rem 2rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-left-color 0.2s;
  display: block;
}

.partie-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(26,39,68,0.1);
  border-left-color: var(--gold);
}

.partie-num {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.partie-card h3 {
  font-family: 'Crimson Pro', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.partie-card p {
  font-family: 'Crimson Pro', serif;
  font-size: 0.975rem;
  color: var(--text-light);
  line-height: 1.65;
}

/* Chapter count */
.partie-count {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  color: rgba(201,168,76,0.6);
  letter-spacing: 0.08em;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cream-dark);
}

/* ── Article page ── */
.article-header {
  background: var(--navy);
  color: var(--white);
  padding: 4rem 2rem 3rem;
}

.article-header-inner {
  max-width: 800px;
  margin: 0 auto;
}

.breadcrumb {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.breadcrumb a { color: var(--gold); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 0.4rem; opacity: 0.5; }

.article-header h1 {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
  align-items: center;
}

/* ── Article body ── */
.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  font-family: 'Crimson Pro', serif;
  color: var(--navy);
  margin-top: 2.5rem;
  margin-bottom: 0.9rem;
  line-height: 1.3;
}

.article-body h1 { font-size: 2rem; font-weight: 600; }
.article-body h2 {
  font-size: 1.45rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.article-body h3 { font-size: 1.2rem; font-weight: 600; color: var(--navy-light); }
.article-body h4 { font-size: 1rem; font-weight: 600; color: var(--text-light); }

.article-body p {
  font-family: 'Crimson Pro', serif;
  font-size: 1.1rem;
  line-height: 1.88;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.article-body ul, .article-body ol {
  font-family: 'Crimson Pro', serif;
  font-size: 1.1rem;
  padding-left: 1.75rem;
  margin-bottom: 1.25rem;
}

.article-body li { margin-bottom: 0.4rem; line-height: 1.75; }

.article-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.75rem;
  margin: 2rem 0;
  background: var(--gold-faint);
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--navy);
  border-radius: 0 3px 3px 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.88rem;
}

.article-body th {
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.article-body td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
}

.article-body tr:nth-child(even) td { background: var(--cream); }

/* ── Sources section ── */
.sources-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.sources-section h2 {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.sources-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

.sources-list li { font-size: 0.8rem; font-family: 'Inter', sans-serif; }
.sources-list a { color: var(--navy-light); text-decoration: none; word-break: break-all; }
.sources-list a:hover { color: var(--gold); text-decoration: underline; }

/* ── Nav between chapters ── */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.chapter-nav a {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 3px;
  text-decoration: none;
  color: inherit;
  max-width: 45%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chapter-nav a:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 12px rgba(26,39,68,0.07);
}

.chapter-nav .nav-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.chapter-nav .nav-title {
  font-family: 'Crimson Pro', serif;
  font-size: 1rem;
  color: var(--navy);
  line-height: 1.4;
}

.chapter-nav .next { text-align: right; margin-left: auto; }

/* ── Charte page ── */
.charte-body { max-width: 720px; margin: 0 auto; padding: 4rem 2rem; }

.charte-body h1 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.charte-body .subtitle {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.charte-section { margin-bottom: 2.5rem; }

.charte-section h2 {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.charte-section p, .charte-section li {
  font-family: 'Crimson Pro', serif;
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--text);
}

.charte-quotes {
  background: var(--navy);
  color: var(--white);
  padding: 3.5rem 2rem;
  text-align: center;
  margin-top: 3rem;
}

.charte-quote {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 0.5rem;
}

.charte-quote-author {
  font-size: 0.78rem;
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.12em;
}

/* ── Footer ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.4);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  margin-top: 5rem;
  border-top: 2px solid var(--gold);
  line-height: 1.8;
}

footer a { color: var(--gold); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Publication number badge ── */
.pub-number-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: block;
}

.pub-number-faint { opacity: 0.4; }

/* ── Publications index ── */
.publications-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 3.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.pub-item {
  padding: 2rem 2.25rem;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.pub-item-featured {
  background: var(--white);
  border-left: 3px solid var(--gold);
}

.pub-item-forthcoming {
  background: var(--cream);
  opacity: 0.7;
}

.pub-item h2 {
  font-family: 'Crimson Pro', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.3rem;
}

.pub-item h2 a {
  color: inherit;
  text-decoration: none;
}

.pub-item h2 a:hover { color: var(--gold); }

.pub-subtitle {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.pub-desc {
  font-family: 'Crimson Pro', serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 1rem;
}

.pub-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--text-light);
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
}

.pub-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.pub-forthcoming-label {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  color: var(--text-light);
  font-size: 1rem;
}

/* ── Contact ── */
.contact-body .contact-email {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.contact-body .contact-email:hover { text-decoration: underline; }

/* ── Footer inner ── */
.footer-inner { max-width: 800px; margin: 0 auto; }
.footer-inner a { color: var(--gold); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

/* ── Ornament ── */
.ornament {
  text-align: center;
  color: var(--gold);
  font-size: 1.2rem;
  margin: 2rem 0;
  opacity: 0.4;
  letter-spacing: 0.5em;
}

/* ── Rapport TOC ── */
.rapport-header { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); }

.rapport-subtitle {
  font-family: 'Crimson Pro', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: rgba(255,255,255,0.65);
  margin-top: 0.5rem;
}

.rapport-actions { margin-top: 1.75rem; }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: var(--navy);
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65rem 1.3rem;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-download:hover { background: var(--gold-light); }

/* Version compacte pour les headers d'article */
.btn-download-sm {
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 500;
  opacity: 0.9;
}

.btn-download-sm:hover { opacity: 1; }

.rapport-toc { max-width: 800px; margin: 0 auto; padding: 3.5rem 2rem; }

.toc-part {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.toc-part:last-child { border-bottom: none; }

.toc-part h3 {
  font-family: 'Crimson Pro', serif;
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0.4rem 0 1rem;
  line-height: 1.3;
}

.toc-chapters { list-style: none; padding: 0; margin: 0; }

.toc-chapters li {
  font-family: 'Crimson Pro', serif;
  font-size: 1.05rem;
  line-height: 1.6;
  padding: 0.4rem 0;
  border-bottom: 1px dotted var(--border);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.toc-chapters li:last-child { border-bottom: none; }

.toc-chapters a { color: var(--navy); text-decoration: none; }
.toc-chapters a:hover { color: var(--gold); text-decoration: underline; }

.toc-intro { margin-bottom: 2rem; }
.pending-chapter { color: var(--text-light); font-style: italic; }

.chapter-rapport-link, .research-link, .rapport-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0.85;
}

.chapter-rapport-link:hover, .research-link:hover, .rapport-link:hover {
  text-decoration: underline;
  opacity: 1;
}

/* ── Recherche notes ── */
.recherche-header { background: #2c3a2c; }

.recherche-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.8);
  padding: 0.2rem 0.65rem;
  border-radius: 2px;
  margin-bottom: 0.75rem;
}

.recherche-intro {
  font-family: 'Crimson Pro', serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.research-body { background: var(--cream); }
.research-body h2 { font-size: 1.3rem; }
.research-body h3 { font-size: 1.1rem; }

/* ── Status badges ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
}

.status-available, .status-done { background: #e8f4ec; color: #2d6a4f; }
.status-pending { background: var(--cream-dark); color: var(--text-light); }

/* ── Extras ── */
.article-body hr { display: none; }

/* ── Print ── */
@media print {
  header, footer, nav, .chapter-nav, .article-header .breadcrumb,
  .btn-download, .research-link, .rapport-link { display: none !important; }
  body { background: white; color: black; font-size: 11pt; }
  .article-body { max-width: 100%; padding: 0; }
  h1 { font-size: 18pt; page-break-after: avoid; }
  h2 { font-size: 14pt; page-break-after: avoid; }
  p  { orphans: 3; widows: 3; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-ham { display: flex; }

  nav {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: #111d36;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(201,168,76,0.25);
    border-bottom: 2px solid var(--gold);
    z-index: 99;
  }

  nav a {
    padding: 0.9rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.88rem;
  }

  .nav-cb:checked ~ nav { display: flex; }

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

  .chapter-nav { flex-direction: column; }
  .chapter-nav a { max-width: 100%; }

  .hero { padding: 5rem 1.5rem 4rem; }

  .hero::after {
    font-size: 14rem;
    right: -5%;
    bottom: -3%;
  }

  main { padding: 3rem 1.25rem; }
  .article-body { padding: 2.5rem 1.25rem; }
  .rapport-toc { padding: 2.5rem 1.25rem; }

  .btn-secondary {
    margin-left: 0;
    margin-top: 0.75rem;
    display: inline-block;
  }
}
