@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;
  --cream: #f9f5ee;
  --cream-dark: #ede8dd;
  --text: #2c2c2c;
  --text-light: #666;
  --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;
}

.logo {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.logo span {
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  display: block;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

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

nav a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

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

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

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  position: relative;
}

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

.hero-divider {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 0 auto 2rem;
}

.hero-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  position: relative;
  line-height: 1.8;
}

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  padding: 0.8rem 2rem;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.2s;
  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.3);
  color: rgba(255,255,255,0.8);
  padding: 0.8rem 2rem;
  border-radius: 3px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  margin-left: 1rem;
  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: 4rem 2rem; }

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

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

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

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

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

.partie-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(26,39,68,0.12);
  border-color: var(--gold);
}

.partie-num {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

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

.partie-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
}

.partie-chapters {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chapter-tag {
  font-size: 0.7rem;
  background: var(--cream);
  color: var(--navy);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  font-weight: 500;
}

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

/* ── 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.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.5rem;
}

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

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

.article-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
}

/* ── Article body ── */
.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 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: 1rem;
  line-height: 1.3;
}

.article-body h1 { font-size: 1.9rem; font-weight: 600; }
.article-body h2 { font-size: 1.5rem; 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.85;
  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.7; }

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

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

.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.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  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: 3rem;
  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: 4px;
  text-decoration: none;
  color: inherit;
  max-width: 45%;
  transition: border-color 0.2s;
}

.chapter-nav a:hover { border-color: var(--gold); }
.chapter-nav .nav-label { font-size: 0.7rem; 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); }
.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: 1rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.1em;
  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: 3rem 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.85);
  margin-bottom: 0.5rem;
}

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

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

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

/* ── Illustration ornaments ── */
.ornament {
  text-align: center;
  color: var(--gold);
  font-size: 1.5rem;
  margin: 2rem 0;
  opacity: 0.5;
}

.partie-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.7;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .parties-grid { grid-template-columns: 1fr; }
  nav { display: none; }
  .chapter-nav { flex-direction: column; }
  .chapter-nav a { max-width: 100%; }
  .hero { padding: 4rem 1.5rem 3rem; }
}

/* ── Loading state ── */
.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 { background: #e8f4ec; color: #2d6a4f; }
.status-pending { background: var(--cream-dark); color: var(--text-light); }
