/* ==========================================================================
   ASSOCIATION DE SAUVEGARDE DU PATRIMOINE DE LA BOURDINIERE SAINT LOUP
   Official Institutional Stylesheet
   ========================================================================== */

:root {
  --primary-purple: #4F2683;
  --primary-purple-hover: #3E1D68;
  --dark-navy: #3A1B63;
  --text-charcoal: #1E1E24;
  --body-grey: #475569;
  --off-white: #F4F5F7;
  --pure-white: #FFFFFF;
  --border-line: #E2E8F0;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
}

*, *::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: var(--font-body);
  color: var(--body-grey);
  background-color: var(--pure-white);
  line-height: 1.65;
  font-size: 1rem;
}

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

h1 { font-size: 2.75rem; margin-bottom: 1.25rem; }
h2 { font-size: 2.15rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.2rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1.25rem;
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* ==========================================================================
   BUTTON SYSTEM (STRICT MAXIMUM 2 BUTTONS PER ROW)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-purple);
  color: var(--pure-white) !important;
  border-color: 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: var(--primary-purple);
  color: var(--pure-white) !important;
}

.btn-white {
  background-color: var(--pure-white);
  color: var(--primary-purple) !important;
  border-color: var(--pure-white);
}

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

.btn-white-outline {
  background-color: transparent;
  color: var(--pure-white) !important;
  border: 2px solid var(--pure-white);
}

.btn-white-outline:hover {
  background-color: var(--pure-white);
  color: var(--primary-purple) !important;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* ==========================================================================
   STATUTORY NOTICE & PILLS
   ========================================================================== */

.pill {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  margin-bottom: 12px;
  white-space: nowrap;
}

.pill-purple {
  background-color: rgba(79, 38, 131, 0.1);
  color: var(--primary-purple);
}

.pill-white {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--pure-white);
}

.statutory-banner {
  background-color: #FAF5FF;
  border-bottom: 1px solid #E9D5FF;
  color: #581C87;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 0;
  text-align: center;
}

.fee-reinvestment-callout {
  background-color: var(--off-white);
  border-left: 4px solid var(--primary-purple);
  padding: 16px 20px;
  margin: 24px 0;
  font-style: italic;
  font-weight: 600;
  color: var(--text-charcoal);
}

/* ==========================================================================
   STICKY HEADER (80px)
   ========================================================================== */

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

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

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

.shield-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  fill: var(--primary-purple);
}

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

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-charcoal);
  line-height: 1.15;
}

.logo-sub {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-purple);
}

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

.nav-link {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-charcoal);
  padding: 8px 4px;
  position: relative;
}

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-toggle-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-line);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-charcoal);
}

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

.mobile-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--border-line);
  border-radius: 4px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-charcoal);
}

/* ==========================================================================
   HERO BANNER & OVERLAY CARD
   ========================================================================== */

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 30, 36, 0.75) 0%, rgba(30, 30, 36, 0.35) 100%);
}

.hero-card {
  position: relative;
  z-index: 2;
  background: var(--pure-white);
  padding: 40px;
  border-radius: 6px;
  max-width: 620px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-line);
}

.hero-card h1 {
  font-size: 2.15rem;
  color: var(--text-charcoal);
  margin-bottom: 1rem;
}

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

/* ==========================================================================
   INNER PAGE HERO
   ========================================================================== */

.page-hero {
  background-color: var(--dark-navy);
  color: var(--pure-white);
  padding: 60px 0 50px;
  position: relative;
  border-bottom: 4px solid var(--primary-purple);
}

.page-hero h1 {
  color: var(--pure-white);
  font-size: 2.6rem;
  margin-bottom: 0.75rem;
}

.page-hero .lead {
  font-size: 1.15rem;
  color: #E2E8F0;
  max-width: 800px;
  line-height: 1.6;
}

.page-hero-meta {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  font-size: 0.85rem;
  color: #CBD5E1;
}

/* ==========================================================================
   STATISTICS & MISSION SECTION
   ========================================================================== */

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

.mission-block {
  max-width: 900px;
  margin: 0 auto 50px auto;
  text-align: center;
}

.mission-text-callout {
  font-size: 1.12rem;
  line-height: 1.85;
  color: var(--text-charcoal);
  background: var(--off-white);
  padding: 36px 40px;
  border-radius: 6px;
  border: 1px solid var(--border-line);
  text-align: left;
}

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

.stat-item {
  padding: 30px 24px;
  text-align: center;
}

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

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

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

.stat-desc {
  font-size: 0.85rem;
  color: var(--body-grey);
}

/* ==========================================================================
   CAMPAIGN SECTION
   ========================================================================== */

.campaign-section {
  background-color: var(--primary-purple);
  color: var(--pure-white);
  padding: 90px 0;
}

.campaign-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.campaign-title {
  font-family: var(--font-heading);
  font-size: 5rem;
  color: var(--pure-white);
  line-height: 1;
  margin-bottom: 20px;
}

.campaign-subtitle {
  font-size: 1.3rem;
  font-weight: 600;
  color: #E9D5FF;
  margin-bottom: 20px;
}

.campaign-text {
  font-size: 1.05rem;
  color: #F3E8FF;
  line-height: 1.7;
  margin-bottom: 30px;
}

.focus-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.focus-item {
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  padding: 16px 0;
  text-align: right;
  transition: all 0.3s ease;
}

.focus-item:hover {
  border-top-color: var(--pure-white);
  transform: translateX(-8px);
}

.focus-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--pure-white);
  margin-bottom: 4px;
}

.focus-desc {
  font-size: 0.85rem;
  color: #E9D5FF;
}

/* ==========================================================================
   ACTIVITY & INITIATIVE CARDS (HORIZONTAL GRID)
   ========================================================================== */

.activities-section {
  padding: 80px 0;
  background-color: var(--off-white);
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 50px auto;
}

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

.section-subtitle {
  font-size: 1.05rem;
  color: var(--body-grey);
}

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

.activity-card {
  display: flex;
  background: var(--pure-white);
  border: 1px solid var(--border-line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.activity-img-wrap {
  width: 40%;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

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

.activity-content {
  width: 60%;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.activity-content h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-charcoal);
}

.activity-summary {
  font-size: 0.92rem;
  color: var(--body-grey);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ==========================================================================
   CONTENT LAYOUT & EDITORIAL ARCHITECTURE
   ========================================================================== */

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

.content-grid-2col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 50px;
}

.content-article {
  max-width: 800px;
}

.content-article h2 {
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-line);
}

.content-article h3 {
  margin-top: 24px;
  margin-bottom: 12px;
}

.sidebar-card {
  background: var(--pure-white);
  border: 1px solid var(--border-line);
  border-radius: 6px;
  padding: 28px;
  margin-bottom: 24px;
}

.sidebar-card h3 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-line);
}

/* ==========================================================================
   TABLES & DATA MATRICES
   ========================================================================== */

.data-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--border-line);
  border-radius: 6px;
}

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

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

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

.data-table tr:hover td {
  background-color: #FAF5FF;
}

/* ==========================================================================
   FORM STYLES & MODAL
   ========================================================================== */

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

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

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--text-charcoal);
  background-color: var(--pure-white);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--body-grey);
  cursor: pointer;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(30, 30, 36, 0.7);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-dialog {
  background: var(--pure-white);
  width: 100%;
  max-width: 500px;
  border-radius: 8px;
  padding: 36px;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-line);
  animation: modalPop 0.3s ease;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

/* ==========================================================================
   FOOTER (4-COLUMN INSTITUTIONAL & PRE-FOOTER)
   ========================================================================== */

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

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

.contact-snippet {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-charcoal);
  font-weight: 600;
}

.site-footer {
  background-color: var(--dark-navy);
  color: var(--pure-white);
  padding: 70px 0 40px 0;
}

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

.footer-col h4 {
  color: var(--pure-white);
  font-size: 1.15rem;
  margin-bottom: 20px;
  letter-spacing: 0.03em;
  position: relative;
  padding-bottom: 8px;
}

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

.footer-disclosure {
  font-size: 0.85rem;
  color: #CBD5E1;
  line-height: 1.7;
}

.footer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav a {
  color: #E2E8F0;
  font-size: 0.9rem;
  display: inline-block;
  min-height: 24px;
}

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

.sub-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 30px;
  text-align: center;
}

.sub-footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.sub-footer-links a {
  color: #CBD5E1;
  font-size: 0.85rem;
}

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

.copyright-text {
  font-size: 0.82rem;
  color: #94A3B8;
  line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE DESIGN BREAKPOINTS
   ========================================================================== */

@media (max-width: 992px) {
  .hero-section {
    height: auto;
    padding: 60px 0;
  }
  
  .campaign-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .focus-item {
    text-align: left;
  }
  
  .activity-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  
  .content-grid-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: flex;
  }
  
  .nav-matrix {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--pure-white);
    flex-direction: column;
    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.active {
    display: flex;
  }
  
  .nav-link {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-item:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--border-line);
  }
  
  .activity-card {
    flex-direction: column;
  }
  
  .activity-img-wrap, .activity-content {
    width: 100%;
  }
  
  .activity-img-wrap {
    height: 220px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .campaign-title {
    font-size: 3.5rem;
  }
  
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  
  .btn-row {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-row .btn {
    width: 100%;
  }
}
