/* ==========================================================================
   ASSOCIATION DES COMMUNES FORESTIERES DU CANTAL - OFFICIAL STYLESHEET
   100% Non-Profit Public Interest Portal (Association Loi 1901)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

:root {
  --top-bar-bg: #E64A19;
  --primary-navy: #0A4260;
  --primary-navy-hover: #073046;
  --action-blue: #0082AD;
  --action-blue-hover: #00688B;
  --magenta-accent: #C2185B;
  --magenta-accent-hover: #9C1045;
  --green-accent: #2E7D32;
  --green-accent-hover: #1B5E20;
  --alert-cta: #D32F2F;
  --alert-cta-hover: #B71C1C;
  --heading-dark: #0F172A;
  --body-slate: #475569;
  --light-bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --border-light: #E2E8F0;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --container-max: 1200px;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--body-slate);
  background-color: #FAFCFE;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--heading-dark);
  line-height: 1.3;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

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

h2 {
  font-size: 1.85rem;
  margin-top: 2rem;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.5rem;
}

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

p {
  margin-bottom: 1.4rem;
  font-size: 1.05rem;
}

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

a:hover {
  color: var(--action-blue-hover);
}

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

.site-container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* ==========================================================================
   TOP BAR & NAVIGATION
   ========================================================================== */

.top-bar {
  background-color: var(--top-bar-bg);
  color: #FFFFFF;
  font-size: 0.875rem;
  padding: 0.6rem 0;
  font-weight: 500;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.top-bar-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-bar-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.top-bar-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.top-bar-links a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.85rem;
}

.top-bar-links a:hover {
  color: #FFF3E0;
}

.main-header {
  background-color: var(--primary-navy);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(10, 66, 96, 0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #FFFFFF;
  text-decoration: none;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  background: #FFFFFF;
  color: var(--primary-navy);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-heading);
  font-size: 1.35rem;
}

.brand-text h1 {
  font-size: 1.15rem;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.75rem;
  color: #B0BEC5;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  color: #ECEFF1;
  padding: 0.65rem 0.95rem;
  font-weight: 600;
  font-size: 0.925rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-item:hover > .nav-link, .nav-link.active {
  background-color: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #FFFFFF;
  min-width: 250px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  border: 1px solid var(--border-light);
  list-style: none;
  padding: 0.5rem 0;
  z-index: 1001;
}

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

.dropdown-item a {
  display: block;
  padding: 0.65rem 1.25rem;
  color: var(--heading-dark);
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 44px;
  line-height: 1.4;
  transition: all 0.15s ease;
}

.dropdown-item a:hover {
  background-color: var(--light-bg);
  color: var(--action-blue);
  padding-left: 1.45rem;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
}

/* ==========================================================================
   HERO BANNER & MANDATORY PARAGRAPHS
   ========================================================================== */

.page-hero {
  background: linear-gradient(135deg, #0A4260 0%, #003248 100%);
  color: #FFFFFF;
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.page-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.page-hero-single {
  text-align: center;
  max-width: 860px;
  margin: 0 auto;
}

.page-hero h1 {
  color: #FFFFFF;
  font-size: 2.6rem;
  margin-bottom: 1rem;
}

.page-hero-subtitle {
  font-size: 1.2rem;
  color: #E0F2FE;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.hero-summary-box {
  background: rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--top-bar-bg);
  padding: 1.25rem 1.5rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.75rem;
  font-size: 1.1rem;
  color: #FFFFFF;
  line-height: 1.65;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--alert-cta);
  color: #FFFFFF;
  padding: 0.85rem 1.75rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  min-height: 48px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--alert-cta-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
  padding: 0.85rem 1.75rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  min-height: 48px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.hero-image-wrap {
  position: relative;
}

.hero-image-wrap img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   DOCUMENTARY PHOTOGRAPHY & FIGCAPTION PROTOCOL
   ========================================================================== */

figure.doc-figure {
  margin: 2rem 0;
  display: block;
}

figure.doc-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;
}

figcaption.doc-caption {
  font-size: 0.875rem;
  color: #64748B;
  margin-bottom: 20px;
  font-style: italic;
  line-height: 1.45;
  display: block;
  text-align: left;
}

.photo-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin: 2.5rem 0;
}

.photo-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
}

/* ==========================================================================
   CONTENT LAYOUT & TYPOGRAPHY
   ========================================================================== */

.content-section {
  padding: 3.5rem 0;
}

.content-section.bg-alt {
  background-color: var(--light-bg);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-kicker {
  color: var(--top-bar-bg);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
  display: block;
}

.section-header h2 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
  font-size: 2.15rem;
}

.article-body {
  font-size: 1.05rem;
  color: var(--body-slate);
}

.article-body p {
  margin-bottom: 1.45rem;
  text-align: justify;
}

.article-body ul, .article-body ol {
  margin: 1.25rem 0 1.5rem 1.75rem;
}

.article-body li {
  margin-bottom: 0.6rem;
}

/* Mandatory Notre Mission Callout Box */
.notre-mission-box {
  background: #FFFFFF;
  border-left: 6px solid var(--green-accent);
  border-radius: 8px;
  padding: 2rem 2.25rem;
  margin: 2.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.notre-mission-box h3 {
  color: var(--green-accent);
  margin-top: 0;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notre-mission-box p {
  font-size: 1.08rem;
  line-height: 1.8;
  color: #1E293B;
  margin-bottom: 0;
  font-weight: 500;
}

/* Funding Transparency Box */
.funding-transparency-card {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  padding: 1.75rem;
  margin: 2.5rem 0;
}

.funding-transparency-card h4 {
  color: var(--primary-navy);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.funding-transparency-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
  color: #334155;
}

/* Cards & Feature Modules */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-card h3 {
  margin-top: 0;
  color: var(--primary-navy);
  font-size: 1.25rem;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 3rem 0;
}

.stat-item {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--action-blue);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #64748B;
  font-weight: 600;
}

/* ==========================================================================
   FORMS & AJAX MODAL
   ========================================================================== */

.form-wrapper {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin: 2.5rem 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--heading-dark);
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: #1E293B;
  min-height: 46px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--action-blue);
  box-shadow: 0 0 0 3px rgba(0, 130, 173, 0.15);
}

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

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--body-slate);
  cursor: pointer;
}

.form-checkbox-label input[type="checkbox"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
}

/* Modal Popup */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 66, 96, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 520px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #E8F5E9;
  color: var(--green-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 2rem;
}

.modal-card h3 {
  font-size: 1.6rem;
  color: var(--primary-navy);
  margin-bottom: 0.75rem;
}

.modal-card p {
  color: var(--body-slate);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.modal-close-btn {
  background-color: var(--primary-navy);
  color: #FFFFFF;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
}

.modal-close-btn:hover {
  background-color: var(--primary-navy-hover);
}

/* ==========================================================================
   FOOTER (STRICT COMPLIANCE)
   ========================================================================== */

.site-footer {
  background-color: #072333;
  color: #ECEFF1;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  border-top: 4px solid var(--top-bar-bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-heading);
}

.footer-col p {
  color: #B0BEC5;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

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

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: #CFD8DC;
  font-size: 0.95rem;
  transition: color 0.15s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

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

.footer-disclosure-block {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
}

.footer-disclosure-block p {
  color: #ECEFF1;
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.footer-disclosure-block p:last-child {
  margin-bottom: 0;
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #90A4AE;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 992px) {
  .page-hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

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

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

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .top-bar-inner {
    flex-direction: column;
    text-align: center;
  }

  .mobile-menu-btn {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary-navy);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.25);
  }

  .nav-menu.mobile-open {
    display: flex;
  }

  .nav-item {
    width: 100%;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: static;
    display: none;
    background-color: #072e42;
    box-shadow: none;
    border: none;
    margin-left: 1rem;
  }

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

  .dropdown-item a {
    color: #ECEFF1;
  }

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

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

  .stat-strip {
    grid-template-columns: 1fr;
  }
}
