/* ==========================================================================
   MELODY SQUAD - ASSOCIATION LOI 1901 (RNA: W313037107)
   Feuille de style institutionnelle et muséale
   Palette: Raw Charcoal (#1C1A17), Earth Ocher (#C87D55), Alabaster (#F9F6F0)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --color-charcoal: #1C1A17;
  --color-charcoal-light: #2D2A26;
  --color-ocher: #C87D55;
  --color-ocher-hover: #b46b44;
  --color-ocher-light: rgba(200, 125, 85, 0.12);
  --color-alabaster: #F9F6F0;
  --color-white: #FFFFFF;
  --color-border: #D9D2C9;
  --color-border-dark: #A39B90;
  --color-muted: #5E584F;
  --color-light-gray: #ECE7DE;
  
  --font-serif: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, 'Courier New', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --container-max: 1240px;
  --header-height: 110px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --shadow-subtle: 0 2px 8px rgba(28, 26, 23, 0.05);
  --shadow-card: 0 4px 16px rgba(28, 26, 23, 0.07);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--color-alabaster);
  color: var(--color-charcoal);
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  background-color: var(--color-alabaster);
  color: var(--color-charcoal);
  padding-top: var(--header-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   HEADER & NAVIGATION
   -------------------------------------------------------------------------- */
.header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background-color: var(--color-alabaster);
  box-shadow: 0 1px 0 var(--color-border);
}

/* Row 1: Utility Bar */
.utility-bar {
  background: var(--color-charcoal);
  color: var(--color-alabaster);
  height: 38px;
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.utility-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  white-space: nowrap;
}

.utility-meta {
  display: flex;
  gap: 18px;
  align-items: center;
}

.utility-tag {
  background: rgba(200, 125, 85, 0.25);
  color: #ffcbb0;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.utility-links a {
  color: #ffcbb0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.utility-links a:hover {
  color: #FFFFFF;
}

/* Row 2: Main Navigation */
.main-nav-bar {
  height: 72px;
  background: var(--color-alabaster);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-block {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-charcoal);
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-charcoal);
  line-height: 1.1;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--color-ocher);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-charcoal);
  text-decoration: none;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover, .nav-item.active .nav-link {
  background-color: var(--color-light-gray);
  color: var(--color-charcoal);
}

.nav-link.cta-btn {
  background-color: var(--color-ocher);
  color: var(--color-white);
  padding: 9px 18px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.nav-link.cta-btn:hover {
  background-color: var(--color-ocher-hover);
  color: var(--color-white);
}

/* Dropdown styling */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 8px 0;
  list-style: none;
  z-index: 10002;
}

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

.dropdown-link {
  display: block;
  padding: 8px 18px;
  font-size: 0.85rem;
  color: var(--color-charcoal);
  text-decoration: none;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.dropdown-link:hover {
  background-color: var(--color-alabaster);
  color: var(--color-ocher);
}

.dropdown-link .badge-indicator {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--color-muted);
  margin-right: 6px;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  padding: 8px 12px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--color-charcoal);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
}

/* Reading Progress Bar */
.reading-progress-track {
  position: fixed;
  right: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: rgba(200, 125, 85, 0.2);
  z-index: 10001;
}

.reading-progress-fill {
  width: 100%;
  height: 0%;
  background: var(--color-ocher);
  transition: height 0.05s linear;
}

/* --------------------------------------------------------------------------
   LAYOUT & CONTAINER
   -------------------------------------------------------------------------- */
.main-content {
  flex: 1 0 auto;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 36px 24px 60px;
  width: 100%;
}

.asymmetrical-grid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 36px;
  align-items: start;
}

.sidebar-col {
  position: sticky;
  top: 130px;
}

.content-col {
  min-width: 0;
}

/* Monospace Institutional Card */
.inst-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-subtle);
}

.inst-card-dark {
  background: var(--color-charcoal);
  color: var(--color-alabaster);
  border: 1px solid var(--color-charcoal-light);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-log {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
}

.sidebar-log dt {
  color: var(--color-ocher);
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  margin-top: 12px;
}

.sidebar-log dt:first-child {
  margin-top: 0;
}

.sidebar-log dd {
  color: var(--color-charcoal);
  margin-bottom: 4px;
}

.sidebar-nav-list {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 12px;
}

.sidebar-nav-list li {
  margin-bottom: 8px;
}

.sidebar-nav-list a {
  color: var(--color-charcoal);
  text-decoration: none;
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--color-alabaster);
  border: 1px solid var(--color-border);
  transition: all 0.15s ease;
}

.sidebar-nav-list a:hover {
  background: var(--color-ocher);
  color: var(--color-white);
  border-color: var(--color-ocher);
}

/* --------------------------------------------------------------------------
   TYPOGRAPHY & HEADINGS
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--color-charcoal);
  line-height: 1.2;
  margin-bottom: 16px;
  font-weight: 700;
}

h1 {
  font-size: 2.35rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.85rem;
  margin-top: 36px;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

h3 {
  font-size: 1.35rem;
  margin-top: 24px;
  margin-bottom: 12px;
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

p {
  margin-bottom: 18px;
  color: #2F2B26;
  font-size: 1.02rem;
  line-height: 1.7;
}

.lead-paragraph {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--color-charcoal);
  font-weight: 400;
}

.nonprofit-hero-declaration {
  background-color: var(--color-ocher-light);
  border-left: 4px solid var(--color-ocher);
  padding: 16px 20px;
  margin: 20px 0 28px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-charcoal);
  line-height: 1.6;
}

.institutional-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--color-charcoal);
  color: var(--color-alabaster);
  padding: 4px 10px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   IMAGES & FIGURES (NO CAPTIONS, NO OVERLAYS)
   -------------------------------------------------------------------------- */
img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.image-frame {
  margin: 24px 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-subtle);
}

.hero-slider-wrap {
  position: relative;
  margin-bottom: 36px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.hero-slider-wrap img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: none;
  border-radius: 0;
}

/* --------------------------------------------------------------------------
   BUTTONS & CALLS TO ACTION (NON-COMMERCIAL)
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  min-height: 44px;
  min-width: 44px;
}

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

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

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

.btn-secondary:hover {
  background-color: var(--color-light-gray);
  border-color: var(--color-border-dark);
}

.btn-dark {
  background-color: var(--color-charcoal);
  color: var(--color-alabaster);
}

.btn-dark:hover {
  background-color: #000000;
  color: #FFFFFF;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

/* --------------------------------------------------------------------------
   METRICS & PILLARS GRIDS
   -------------------------------------------------------------------------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 32px 0;
}

.metric-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
}

.metric-number {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--color-ocher);
  line-height: 1.1;
  margin-bottom: 6px;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 32px 0;
}

.pillar-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pillar-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid var(--color-border);
}

.pillar-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   DATA TABLES & FINANCIAL LEDGERS
   -------------------------------------------------------------------------- */
.table-container {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

th {
  background: var(--color-alabaster);
  color: var(--color-charcoal);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--color-border);
}

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

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(249, 246, 240, 0.6);
}

td.amount {
  font-family: var(--font-mono);
  text-align: right;
  font-weight: 500;
}

th.amount {
  text-align: right;
}

/* --------------------------------------------------------------------------
   FORMS & INTAKE
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-charcoal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-charcoal);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-ocher);
  box-shadow: 0 0 0 3px var(--color-ocher-light);
}

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

.form-hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   TIMELINE & MODULES
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 28px;
  margin: 32px 0;
  border-left: 2px solid var(--color-border);
}

.timeline-step {
  position: relative;
  margin-bottom: 28px;
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: -35px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-ocher);
  border: 2px solid var(--color-alabaster);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-ocher);
  margin-bottom: 4px;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-charcoal);
  color: var(--color-alabaster);
  padding: 50px 0 30px;
  border-top: 3px solid var(--color-ocher);
  margin-top: auto;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

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

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1.05rem;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.footer-col p {
  color: #D9D2C9;
  font-size: 0.92rem;
  line-height: 1.6;
}

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

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

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

.footer-links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-administrative-block {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #BDB6AC;
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-disclosure {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
  margin-top: 24px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #BDB6AC;
  text-align: center;
}

/* --------------------------------------------------------------------------
   RESPONSIVENESS (BREAKPOINTS 992px & 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  :root {
    --header-height: auto;
  }
  
  body {
    padding-top: 116px;
  }
  
  .utility-inner {
    font-size: 11px;
    gap: 12px;
  }
  
  .utility-meta span:nth-child(2) {
    display: none;
  }
  
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--color-white);
    border-bottom: 2px solid var(--color-border);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    gap: 8px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    overflow-y: auto;
  }
  
  .nav-menu.open {
    display: flex;
  }
  
  .dropdown-menu {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
    background: var(--color-alabaster);
    margin-left: 12px;
    padding: 4px 0;
  }
  
  .nav-item.open-mobile .dropdown-menu {
    display: block;
  }
  
  .reading-progress-track {
    display: none !important;
  }
  
  .asymmetrical-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  
  .sidebar-col {
    position: static;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.85rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .pillars-grid {
    grid-template-columns: 1fr;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .utility-bar {
    height: auto;
    padding: 6px 0;
  }
  
  .utility-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
