/* ==========================================================================
   L' AUTHRE VALLEE DES POETES - INSTITUTIONAL STYLESHEET
   Statutory Non-Profit Association (Loi 1901) - RNA: W151002645 - SIREN: 489343632
   Design Architecture: Donit Modern Civic Aesthetic
   ========================================================================== */

:root {
  --primary-purple: #4F2683;
  --primary-purple-hover: #3e1e68;
  --dark-navy: #3A1B63;
  --dark-navy-hover: #2d144e;
  --text-charcoal: #1E1E24;
  --body-grey: #475569;
  --body-muted: #64748B;
  --off-white: #F4F5F7;
  --pure-white: #FFFFFF;
  --border-color: #E2E8F0;
  --card-border: #E5E7EB;
  --success-green: #15803D;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--body-grey);
  background-color: var(--pure-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-charcoal);
  line-height: 1.3;
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--primary-purple);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-purple-hover);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

.site-header {
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--pure-white);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

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

.brand-icon-shield {
  width: 44px;
  height: 44px;
  background-color: var(--primary-purple);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon-shield svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--primary-purple);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-subtitle {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--body-muted);
  text-transform: uppercase;
}

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

.nav-link {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-charcoal);
  text-transform: uppercase;
  padding: 8px 0;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-purple);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary-purple);
}

.btn-header-cta {
  background-color: var(--primary-purple);
  color: #FFF !important;
  padding: 10px 22px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.875rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-header-cta:hover {
  background-color: var(--primary-purple-hover);
  transform: translateY(-1px);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  color: var(--text-charcoal);
}

.mobile-menu-toggle svg {
  width: 28px;
  height: 28px;
}

/* ==========================================================================
   BUTTONS (STRICT MAX 2 BUTTONS RULE)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  min-height: 46px;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-purple);
  color: #FFFFFF !important;
  border: 2px solid var(--primary-purple);
}

.btn-primary:hover {
  background-color: var(--primary-purple-hover);
  border-color: var(--primary-purple-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-purple) !important;
  border: 2px solid var(--primary-purple);
}

.btn-secondary:hover {
  background-color: rgba(79, 38, 131, 0.06);
}

.btn-white-outline {
  background-color: transparent;
  color: #FFFFFF !important;
  border: 2px solid #FFFFFF;
}

.btn-white-outline:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.btn-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-purple);
  margin-top: 14px;
}

.btn-learn-more:hover {
  text-decoration: underline;
}

.cta-dual-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */

.hero-banner {
  height: 520px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-overlay-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(26, 12, 45, 0.78) 0%, rgba(26, 12, 45, 0.4) 100%);
}

.hero-card {
  position: relative;
  z-index: 2;
  background: var(--pure-white);
  padding: 40px;
  border-radius: 12px;
  max-width: 620px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.category-pill {
  display: inline-block;
  background-color: rgba(79, 38, 131, 0.1);
  color: var(--primary-purple);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.hero-headline {
  font-size: 2.25rem;
  color: var(--text-charcoal);
  margin-bottom: 14px;
  line-height: 1.25;
}

.hero-summary {
  font-size: 1.05rem;
  color: var(--body-grey);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Split Hero for Interior Pages */
.page-hero {
  background-color: var(--off-white);
  border-bottom: 1px solid var(--border-color);
  padding: 50px 0;
}

.page-hero-title {
  font-size: 2.5rem;
  color: var(--text-charcoal);
  margin-bottom: 12px;
}

.page-hero-lead {
  font-size: 1.15rem;
  color: var(--body-grey);
  max-width: 820px;
}

/* ==========================================================================
   DONIT PHOTOGRAPHY & FIGCAPTION
   ========================================================================== */

.donit-frame {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin: 20px 0 8px 0;
  object-fit: cover;
  display: block;
}

.donit-caption {
  font-size: 0.875rem;
  color: #64748B;
  margin-bottom: 20px;
  font-style: italic;
  line-height: 1.5;
  display: block;
}

/* ==========================================================================
   STATISTICS MATRIX (3-COLUMN GRID)
   ========================================================================== */

.stats-matrix-section {
  background-color: var(--pure-white);
  padding: 60px 0;
  border-bottom: 1px solid var(--border-color);
}

.mission-highlight-box {
  background-color: #FAF5FF;
  border-left: 4px solid var(--primary-purple);
  padding: 24px 30px;
  border-radius: 0 8px 8px 0;
  margin: 30px 0 45px 0;
}

.mission-highlight-title {
  font-size: 1.2rem;
  color: var(--primary-purple);
  margin-bottom: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mission-paragraph {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-charcoal);
  margin-bottom: 0;
}

.stats-grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--pure-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.stat-cell {
  padding: 40px 30px;
  text-align: center;
}

.stat-cell:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary-purple);
  line-height: 1;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-charcoal);
  margin-bottom: 6px;
}

.stat-description {
  font-size: 0.875rem;
  color: var(--body-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

/* ==========================================================================
   CONTENT BLOCKS & GRIDS
   ========================================================================== */

.content-section {
  padding: 60px 0;
}

.content-section.bg-offwhite {
  background-color: var(--off-white);
}

.section-header {
  margin-bottom: 40px;
}

.section-header.text-center {
  text-align: center;
}

.section-header h2 {
  margin-top: 0;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--body-muted);
  max-width: 760px;
  margin: 0 auto;
}

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

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Content Cards */
.activity-card {
  background: var(--pure-white);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.activity-card h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--text-charcoal);
}

.activity-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
}

/* Horizontal Activity Cards */
.activity-card-horizontal {
  background: var(--pure-white);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px 1fr;
  margin-bottom: 28px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.activity-card-horizontal .card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-card-horizontal .card-body {
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Reinvestment Notice Box */
.reinvestment-banner {
  background-color: #EEF2FF;
  border: 1px solid #C7D2FE;
  border-radius: 8px;
  padding: 20px 26px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 35px 0;
}

.reinvestment-banner svg {
  width: 32px;
  height: 32px;
  color: var(--primary-purple);
  flex-shrink: 0;
}

.reinvestment-banner p {
  margin-bottom: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark-navy);
}

/* Board Governance Cards */
.governance-card {
  background: var(--pure-white);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}

.governance-role {
  color: var(--primary-purple);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.governance-name {
  font-size: 1.25rem;
  font-family: var(--font-serif);
  margin-bottom: 10px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin: 25px 0;
}

.institutional-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--pure-white);
  border: 1px solid var(--border-color);
  font-size: 0.925rem;
}

.institutional-table th {
  background-color: var(--off-white);
  color: var(--text-charcoal);
  font-weight: 700;
  padding: 14px 18px;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
}

.institutional-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  color: var(--body-grey);
}

.institutional-table tr:hover {
  background-color: #F8FAFC;
}

/* Form Styles */
.form-container {
  background: var(--pure-white);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 36px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

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

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-charcoal);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-charcoal);
  background-color: #FFF;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 44px;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(79, 38, 131, 0.15);
}

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

/* Download Cards */
.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--pure-white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 14px;
  transition: border-color 0.2s ease;
}

.download-item:hover {
  border-color: var(--primary-purple);
}

.download-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.download-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(79, 38, 131, 0.08);
  color: var(--primary-purple);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-title {
  font-weight: 700;
  color: var(--text-charcoal);
}

.download-tag {
  font-size: 0.75rem;
  color: var(--body-muted);
}

/* ==========================================================================
   MODAL / POPUP (AJAX CONFIRMATION)
   ========================================================================== */

.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.is-active {
  display: flex;
}

.modal-box {
  background: var(--pure-white);
  border-radius: 12px;
  padding: 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: relative;
}

.modal-icon-circle {
  width: 64px;
  height: 64px;
  background-color: #DCFCE7;
  color: var(--success-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
}

.modal-icon-circle svg {
  width: 32px;
  height: 32px;
}

.modal-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: var(--text-charcoal);
}

.modal-text {
  font-size: 0.95rem;
  color: var(--body-grey);
  margin-bottom: 24px;
}

/* ==========================================================================
   FOOTER (MANDATORY INSTITUTIONAL REQUIREMENTS)
   ========================================================================== */

.pre-footer-utility {
  background-color: var(--off-white);
  border-top: 1px solid var(--border-color);
  padding: 22px 0;
  font-size: 0.9rem;
}

.pre-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.utility-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-charcoal);
}

.utility-item svg {
  width: 18px;
  height: 18px;
  color: var(--primary-purple);
}

.main-institutional-footer {
  background-color: var(--dark-navy);
  color: #FFFFFF;
  padding: 70px 0 40px 0;
}

.footer-matrix-4col {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1.3fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-col h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #FFFFFF;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--primary-purple);
}

.footer-col p {
  color: #D1D5DB;
  font-size: 0.875rem;
  line-height: 1.65;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col a {
  color: #E2E8F0;
  font-size: 0.875rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}

.footer-col a:hover {
  color: #FFFFFF;
  padding-left: 4px;
}

.footer-disclosure-box {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px;
  border-radius: 6px;
  font-size: 0.825rem;
  line-height: 1.6;
  color: #E2E8F0;
  margin-top: 14px;
}

.sub-footer-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.825rem;
  color: #94A3B8;
}

.sub-footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.sub-footer-links a {
  color: #CBD5E1;
  font-weight: 600;
}

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

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE BREAKPOINTS
   ========================================================================== */

@media (max-width: 992px) {
  .nav-matrix {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: var(--pure-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 2px solid var(--primary-purple);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    gap: 16px;
  }

  .nav-matrix.is-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 12px 0;
    font-size: 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  .btn-header-cta {
    display: none;
  }

  .hero-card {
    max-width: 100%;
    margin: 0 15px;
    padding: 28px;
  }

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

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

  .stat-cell:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .grid-2col,
  .grid-3col,
  .grid-4col {
    grid-template-columns: 1fr;
  }

  .activity-card-horizontal {
    grid-template-columns: 1fr;
  }

  .activity-card-horizontal .card-img {
    height: 220px;
  }

  .footer-matrix-4col {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .site-header {
    height: 70px;
  }

  .header-inner {
    height: 70px;
  }

  .nav-matrix {
    top: 70px;
  }

  .brand-title {
    font-size: 0.95rem;
  }

  .brand-subtitle {
    font-size: 0.65rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

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

  .sub-footer-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .sub-footer-links {
    flex-direction: column;
    gap: 10px;
  }

  .pre-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-dual-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-dual-row .btn {
    width: 100%;
  }
}
