/* ==========================================================================
   ESPACE CORPS PLURIEL - ARCHIVE CIVIQUE & DESIGN SYSTEM (STYLE.CSS)
   Design System: "The Revolutionary Archive"
   Colors:
     - Imperial Deep Slate: #0F172A
     - Terracotta Rust:     #C2593F
     - Warm Paper Parchment:#F8F5EE
     - Pure Alabaster White:#FFFFFF
     - Muted Sandstone:     #E2D9CC
     - Deep Charcoal:       #1E293B
   ========================================================================== */

:root {
  --color-slate: #0F172A;
  --color-slate-light: #1E293B;
  --color-terracotta: #C2593F;
  --color-terracotta-hover: #A7452E;
  --color-parchment: #F8F5EE;
  --color-white: #FFFFFF;
  --color-sandstone: #E2D9CC;
  --color-charcoal: #1E293B;
  --color-charcoal-muted: #475569;
  --font-serif: "Newsreader", "Merriweather", "Georgia", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Consolas", monospace;
  --header-height: 125px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--color-parchment);
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--color-parchment);
  color: var(--color-charcoal);
  padding-top: var(--header-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   READING PROGRESS TRACKER
   ========================================================================== */
#reading-progress-track {
  position: fixed;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  background: rgba(15, 23, 42, 0.08);
  z-index: 10001;
}

#reading-progress-bar {
  width: 100%;
  height: 0%;
  background: var(--color-terracotta);
  transition: height 0.05s linear;
}

/* ==========================================================================
   STICKY HEADER ARCHITECTURE
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.09);
  background-color: var(--color-white);
}

/* Level 1: Civic Ledger Utility Strip */
.civic-ledger-strip {
  background-color: var(--color-slate);
  color: #CBD5E1;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.02em;
}

.civic-ledger-strip a {
  color: #CBD5E1;
  text-decoration: none;
  transition: color 0.15s ease;
}

.civic-ledger-strip a:hover {
  color: var(--color-terracotta);
}

.ledger-left, .ledger-right {
  display: flex;
  gap: 18px;
  align-items: center;
}

.ledger-badge {
  background: rgba(194, 89, 63, 0.25);
  color: #F87171;
  border: 1px solid var(--color-terracotta);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* Level 2: Split Navigation Bar */
.split-nav-bar {
  background-color: var(--color-white);
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  border-bottom: 1px solid var(--color-sandstone);
}

.brand-badge-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-badge {
  background-color: var(--color-terracotta);
  color: var(--color-white);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.brand-title-wrap {
  display: flex;
  flex-direction: column;
}

.brand-org-name {
  color: var(--color-slate);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-family: var(--font-serif);
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--color-charcoal-muted);
  font-family: var(--font-mono);
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  color: var(--color-charcoal);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  min-height: 44px;
}

.nav-link:hover, .nav-item:hover > .nav-link {
  background-color: var(--color-parchment);
  color: var(--color-terracotta);
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-white);
  border: 1px solid var(--color-sandstone);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  min-width: 250px;
  padding: 8px 0;
  z-index: 10010;
  list-style: none;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 9px 18px;
  color: var(--color-charcoal);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.nav-dropdown a:hover {
  background-color: var(--color-parchment);
  color: var(--color-terracotta);
  padding-left: 22px;
}

.nav-cta-btn {
  background-color: var(--color-terracotta);
  color: var(--color-white) !important;
  font-weight: 700;
  border-radius: 6px;
  padding: 9px 18px;
  margin-left: 8px;
}

.nav-cta-btn:hover {
  background-color: var(--color-terracotta-hover) !important;
  color: var(--color-white) !important;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-sandstone);
  padding: 8px 12px;
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 6px;
  color: var(--color-slate);
  min-width: 44px;
  min-height: 44px;
}

/* ==========================================================================
   ASYMMETRIC CANVAS & STRUCTURAL GRID
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.asymmetric-canvas {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  margin-top: 32px;
  margin-bottom: 64px;
  align-items: start;
}

/* Left Rail: Administrative Logbook & Side-Nav */
.logbook-rail {
  background: var(--color-white);
  border: 1px solid var(--color-sandstone);
  border-radius: 12px;
  padding: 24px;
  position: sticky;
  top: calc(var(--header-height) + 20px);
}

.logbook-header {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-terracotta);
  font-weight: 700;
  border-bottom: 2px solid var(--color-sandstone);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.logbook-meta-list {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 24px;
}

.logbook-meta-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--color-sandstone);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  color: var(--color-charcoal-muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.meta-value {
  color: var(--color-slate);
  font-weight: 600;
}

.logbook-quote {
  background: var(--color-parchment);
  border-left: 3px solid var(--color-terracotta);
  padding: 14px;
  border-radius: 0 8px 8px 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--color-charcoal);
  margin-bottom: 20px;
}

.logbook-toc {
  list-style: none;
  font-size: 0.84rem;
}

.logbook-toc li {
  margin-bottom: 8px;
}

.logbook-toc a {
  color: var(--color-charcoal);
  text-decoration: none;
  display: block;
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.logbook-toc a:hover {
  background: var(--color-parchment);
  color: var(--color-terracotta);
  padding-left: 14px;
}

/* Right Column: Primary Analytical Canvas */
.analytical-canvas {
  min-width: 0;
}

/* ==========================================================================
   HERO BANNER & SLIDER SYSTEM
   ========================================================================== */
.hero-wrapper {
  position: relative;
  background-color: var(--color-slate);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 36px;
  border: 1px solid var(--color-sandstone);
}

.hero-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 480px;
  overflow: hidden;
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.88) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
  color: var(--color-white);
}

.hero-category-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #FCA5A5;
  background: rgba(194, 89, 63, 0.35);
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid var(--color-terracotta);
  margin-bottom: 14px;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--color-white);
}

.hero-summary-2sent {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #E2E8F0;
  max-width: 820px;
  margin-bottom: 24px;
}

/* Vanilla JS Hero Text Slider */
.slider-container {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 22px;
  position: relative;
}

.slide-item {
  display: none;
  font-size: 0.95rem;
  color: #F1F5F9;
}

.slide-item.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.slider-controls {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.slider-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.slider-btn:hover {
  background: var(--color-terracotta);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CTAs */
.hero-cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-civic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 0.94rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  min-height: 44px;
  cursor: pointer;
  border: none;
}

.btn-terracotta {
  background-color: var(--color-terracotta);
  color: var(--color-white);
}

.btn-terracotta:hover {
  background-color: var(--color-terracotta-hover);
  color: var(--color-white);
}

.btn-slate-outline {
  background-color: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-slate-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
}

.btn-charcoal {
  background-color: var(--color-slate);
  color: var(--color-white);
}

.btn-charcoal:hover {
  background-color: #1E293B;
  color: var(--color-white);
}

/* ==========================================================================
   MANDATORY 'NOTRE MISSION' CALLOUT BLOCK
   ========================================================================== */
.mission-callout-block {
  background: var(--color-white);
  border: 2px solid var(--color-terracotta);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 40px;
  box-shadow: 0 6px 20px rgba(194, 89, 63, 0.08);
}

.mission-callout-title {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  color: var(--color-terracotta);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  margin-bottom: 12px;
}

.mission-statement-text {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.75;
  color: var(--color-slate);
  font-weight: 500;
}

/* ==========================================================================
   CONTENT CARDS & ANALYTICAL SECTIONS
   ========================================================================== */
.content-section {
  background: var(--color-white);
  border: 1px solid var(--color-sandstone);
  border-radius: 12px;
  padding: 36px;
  margin-bottom: 36px;
}

.content-section h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--color-slate);
  margin-bottom: 20px;
  line-height: 1.25;
}

.content-section h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--color-slate);
  margin-top: 32px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-sandstone);
  padding-bottom: 8px;
}

.content-section h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-slate-light);
  margin-top: 24px;
  margin-bottom: 12px;
}

.content-section p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-charcoal);
  margin-bottom: 18px;
}

.lead-paragraph {
  font-size: 1.15rem;
  line-height: 1.8;
  color: var(--color-slate);
  font-weight: 500;
}

/* Reinvestment Statement Banner */
.reinvestment-banner {
  background-color: var(--color-slate);
  color: var(--color-white);
  border-left: 6px solid var(--color-terracotta);
  padding: 20px 24px;
  border-radius: 8px;
  margin: 28px 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Visual Image Grids */
.photo-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 28px 0;
}

.photo-card {
  background: var(--color-white);
  border: 1px solid var(--color-sandstone);
  border-radius: 8px;
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.photo-card-body {
  padding: 16px;
}

.photo-card-body h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-slate);
  margin-bottom: 8px;
}

.photo-card-body p {
  font-size: 0.9rem;
  color: var(--color-charcoal-muted);
  margin-bottom: 0;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0;
}

.stat-box {
  background: var(--color-parchment);
  border: 1px solid var(--color-sandstone);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-terracotta);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-charcoal-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Financial & Data Tables */
.data-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--color-sandstone);
  border-radius: 8px;
}

.civic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--color-white);
}

.civic-table th {
  background: var(--color-slate);
  color: var(--color-white);
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.civic-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-sandstone);
  color: var(--color-charcoal);
}

.civic-table tr:nth-child(even) {
  background: var(--color-parchment);
}

.civic-table tr:hover {
  background: rgba(194, 89, 63, 0.05);
}

/* Monospace Form Styling */
.form-card {
  background: var(--color-white);
  border: 1px solid var(--color-sandstone);
  border-radius: 12px;
  padding: 32px;
  margin: 28px 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-slate);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  border: 1px solid var(--color-sandstone);
  border-radius: 6px;
  background: var(--color-parchment);
  color: var(--color-charcoal);
  transition: border-color 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-terracotta);
  background: var(--color-white);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.form-alert {
  padding: 14px 18px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}

.form-alert-success {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
}

/* Accordion / FAQ */
.faq-item {
  border: 1px solid var(--color-sandstone);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--color-white);
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-slate);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question:hover {
  background: var(--color-parchment);
  color: var(--color-terracotta);
}

.faq-answer {
  padding: 0 20px 18px;
  color: var(--color-charcoal);
  font-size: 0.96rem;
  line-height: 1.7;
}

/* ==========================================================================
   FOOTER ARCHITECTURE
   ========================================================================== */
.site-footer {
  background-color: var(--color-slate);
  color: #CBD5E1;
  margin-top: auto;
  border-top: 4px solid var(--color-terracotta);
}

.footer-top {
  padding: 48px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
}

.footer-col h4 {
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 8px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--color-terracotta);
}

.footer-disclosure-bar {
  background-color: #080D1A;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-mandatory-statement {
  font-size: 0.85rem;
  line-height: 1.65;
  color: #94A3B8;
  text-align: center;
  max-width: 1020px;
  margin: 0 auto;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  :root {
    --header-height: 115px;
  }

  body {
    padding-top: var(--header-height);
  }

  #reading-progress-track {
    display: none;
  }

  .asymmetric-canvas {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .logbook-rail {
    position: static;
  }

  .split-nav-bar {
    padding: 0 16px;
  }

  .mobile-nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--color-white);
    border-bottom: 2px solid var(--color-terracotta);
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 16px 24px rgba(0, 0, 0, 0.15);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-menu {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 4px;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    padding: 12px;
  }

  .nav-dropdown {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    background: var(--color-parchment);
    padding-left: 12px;
    margin-top: 4px;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-grid-2x2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 120px;
  }

  .civic-ledger-strip {
    flex-direction: column;
    gap: 4px;
    padding: 6px 12px;
    font-size: 0.72rem;
    text-align: center;
  }

  .ledger-left, .ledger-right {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .hero-headline {
    font-size: 1.7rem;
  }

  .hero-summary-2sent {
    font-size: 1rem;
  }

  .hero-overlay {
    padding: 20px;
  }

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

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

  .content-section {
    padding: 20px;
  }
}
