/* ==========================================================================
   AVENIR DE DONZENAC - Official Non-Profit Association (Association Loi 1901)
   Universal Lightweight Mobile-Responsive Stylesheet (Pure CSS Grid & Flexbox)
   RNA: W191001833 | SIREN: 822659470 | RUE DU DOC LAUBIE, 19270 DONZENAC
   ========================================================================== */

:root {
  --primary-blue: #0B2545;
  --secondary-blue: #134074;
  --accent-gold: #EEB902;
  --accent-gold-hover: #D4A502;
  --surface-white: #FFFFFF;
  --surface-light: #F8FAFC;
  --surface-warm: #FBF9F5;
  --surface-muted: #F1F5F9;
  --text-dark: #0F172A;
  --text-body: #1E293B;
  --text-slate: #475569;
  --text-caption: #64748B;
  --border-color: #E5E7EB;
  --border-strong: #CBD5E1;
  --success-green: #15803D;
  --shadow-soft: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-dropdown: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.05);
  --radius-md: 8px;
  --radius-lg: 12px;
  --container-max: 1240px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--text-body);
  background-color: var(--surface-white);
  line-height: 1.75;
  overflow-x: hidden;
}

/* Clean Sans-Serif for UI, Navigation, Tables, and Metadata */
header,
nav,
.utility-bar,
.btn-cta,
.btn-secondary,
.kicker,
.meta-line,
.data-table,
.form-group label,
.form-control,
.stat-card,
.footer-nav,
.compliance-strip {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   1. TOP UTILITY ANNOUNCEMENT BAR
   ========================================================================== */
.utility-bar {
  background-color: #0B2545;
  color: #FFFFFF;
  padding: 8px 20px;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.utility-bar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.utility-credentials {
  color: #FFFFFF;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.utility-link {
  color: #EEB902;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.utility-link:hover,
.utility-link:focus {
  text-decoration: underline;
  color: #FFFFFF;
}

/* ==========================================================================
   2. MAIN STICKY NAVIGATION BAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #FFFFFF;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand-area {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #0B2545;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0B2545;
  line-height: 1.2;
}

.brand-sublabel {
  font-size: 0.78rem;
  color: #475569;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Navigation Links Menu */
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.nav-item {
  position: relative;
}

.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  color: #0B2545;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease-in-out;
  min-height: 44px;
}

.nav-trigger:hover,
.nav-trigger:focus {
  background-color: #F1F5F9;
  color: #0B2545;
}

/* Dropdown Menu Desktop (> 992px) */
.dropdown-menu {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #E5E7EB;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease-in-out;
  z-index: 1100;
}

@media (min-width: 993px) {
  .nav-item:hover .dropdown-menu,
  .nav-item:focus-within .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.dropdown-menu li a {
  display: block;
  padding: 10px 18px;
  color: #1E293B;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
  background-color: #F8FAFC;
  color: #0B2545;
}

/* Active Page State */
.active,
.dropdown-menu li a.active,
.nav-trigger.active {
  color: #EEB902 !important;
  font-weight: bold !important;
  background-color: #0B2545;
}

/* Primary Action Button (Far Right) */
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #EEB902;
  color: #0B2545;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: 6px;
  text-decoration: none;
  min-height: 44px;
  transition: all 0.2s ease-in-out;
  border: 2px solid #EEB902;
  white-space: nowrap;
}

.header-cta:hover,
.header-cta:focus {
  background-color: #0B2545;
  color: #FFFFFF;
  border-color: #0B2545;
}

/* Hamburger Toggle Menu Icon */
.mobile-menu-toggle {
  display: none;
  background: #0B2545;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* ==========================================================================
   3. LAYOUT CONTAINERS & TYPOGRAPHY
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

main {
  min-height: 70vh;
}

h1, h2, h3, h4 {
  color: #0B2545;
  line-height: 1.25;
  margin-bottom: 16px;
  font-weight: 700;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.85rem;
  margin-top: 40px;
  padding-bottom: 10px;
  border-bottom: 2px solid #E5E7EB;
}

h3 {
  font-size: 1.35rem;
  margin-top: 28px;
  color: #134074;
}

p {
  margin-bottom: 18px;
  font-size: 1.05rem;
  color: var(--text-body);
}

ul.content-list,
ol.content-list {
  margin: 0 0 24px 24px;
}

ul.content-list li,
ol.content-list li {
  margin-bottom: 10px;
  font-size: 1.02rem;
}

/* ==========================================================================
   4. HERO BANNER & DOCUMENTARY MEDIA RULES
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, #0B2545 0%, #134074 100%);
  color: #FFFFFF;
  padding: 56px 0;
  border-bottom: 4px solid #EEB902;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero-kicker {
  display: inline-block;
  color: #EEB902;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.hero-section h1 {
  color: #FFFFFF;
  margin-bottom: 18px;
}

.hero-summary {
  font-size: 1.15rem;
  color: #F1F5F9;
  line-height: 1.65;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #EEB902;
  color: #0B2545;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  min-height: 44px;
  border: 2px solid #EEB902;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  font-size: 1rem;
}

.btn-cta:hover,
.btn-cta:focus {
  background-color: #FFFFFF;
  color: #0B2545;
  border-color: #FFFFFF;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: #FFFFFF;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.2s ease-in-out;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: #FFFFFF;
}

/* Mandatory Documentary Image & Figcaption Styling */
figure {
  margin: 0;
}

img.doc-photo,
figure img {
  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;
  max-height: 460px;
}

figcaption {
  font-size: 0.875rem;
  color: #64748B;
  margin-bottom: 20px;
  font-style: italic;
  line-height: 1.5;
}

.hero-section figcaption {
  color: #CBD5E1;
}

/* ==========================================================================
   5. SECTIONS, GRIDS, CALLOUTS & TABLES
   ========================================================================== */
.section-block {
  padding: 56px 0;
  border-bottom: 1px solid #E5E7EB;
}

.section-alt {
  background-color: #F8FAFC;
}

.mission-highlight-box {
  background-color: #FBF9F5;
  border-left: 5px solid #0B2545;
  border-top: 1px solid #E5E7EB;
  border-right: 1px solid #E5E7EB;
  border-bottom: 1px solid #E5E7EB;
  padding: 32px;
  border-radius: 0 12px 12px 0;
  margin: 28px 0;
}

.reinvestment-banner {
  background-color: #0B2545;
  color: #FFFFFF;
  padding: 24px 28px;
  border-radius: 10px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-left: 6px solid #EEB902;
}

.reinvestment-banner p {
  color: #FFFFFF;
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
}

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

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

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

.info-card {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.info-card h3 {
  margin-top: 0;
  color: #0B2545;
}

.card-link {
  display: inline-block;
  margin-top: 14px;
  color: #0B2545;
  font-weight: 700;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border-bottom: 2px solid #EEB902;
  padding-bottom: 2px;
  align-self: flex-start;
}

.card-link:hover {
  color: #134074;
}

/* Financial & Schedule Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  font-size: 0.95rem;
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #E5E7EB;
}

.data-table th {
  background-color: #0B2545;
  color: #FFFFFF;
  font-weight: 600;
}

.data-table tr:nth-child(even) {
  background-color: #F8FAFC;
}

/* ==========================================================================
   6. INTERACTIVE FORMS & AJAX MODAL
   ========================================================================== */
.form-panel {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  padding: 36px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

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

.form-group label {
  display: block;
  font-weight: 600;
  color: #0B2545;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-size: 1rem;
  color: #0F172A;
  background-color: #FFFFFF;
  min-height: 44px;
}

.form-control:focus {
  outline: 2px solid #0B2545;
  border-color: #0B2545;
}

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

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 37, 69, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-overlay.is-open {
  display: flex;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  padding: 36px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  border-top: 6px solid #EEB902;
  text-align: left;
}

.modal-card h3 {
  margin-top: 0;
  color: #0B2545;
}

/* ==========================================================================
   7. UNIVERSAL 4-COLUMN FOOTER ARCHITECTURE
   ========================================================================== */
.site-footer {
  background-color: #0B2545;
  color: #F1F5F9;
  padding: 64px 0 32px 0;
  margin-top: 64px;
  border-top: 4px solid #EEB902;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.footer-col h3 {
  color: #EEB902;
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

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

.footer-links a,
.footer-col a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.15s ease;
}

.footer-links a:hover,
.footer-col a:hover {
  color: #EEB902;
  text-decoration: underline;
}

.footer-disclosure {
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

.footer-disclosure p {
  color: #F8FAFC;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: #CBD5E1;
}

/* ==========================================================================
   8. RESPONSIVE MEDIA QUERIES (<= 992px and <= 768px)
   ========================================================================== */
@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0 20px 0;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-top: 1px solid #E5E7EB;
    gap: 0;
  }

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

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid #E5E7EB;
  }

  .nav-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 12px 20px;
    min-height: 44px;
    border-radius: 0;
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background-color: #F8FAFC;
    padding: 0;
    display: none;
  }

  .nav-item.open .dropdown-menu {
    display: block;
  }

  .dropdown-menu li a {
    padding: 12px 20px 12px 32px;
    min-height: 44px;
    display: block;
    border-bottom: 1px solid #E5E7EB;
  }

  .header-cta {
    margin: 16px 20px 0 20px;
    text-align: center;
  }

  .hero-grid,
  .grid-3,
  .grid-4,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .utility-bar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  h1 {
    font-size: 1.95rem;
  }

  h2 {
    font-size: 1.5rem;
  }

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

  .reinvestment-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-panel {
    padding: 22px;
  }
}
