/* ==========================================================================
   A.S.P.A.H.C. - INSTITUTIONAL STYLESHEET
   Association pour la Sauvegarde du Patrimoine Archéologique et Historique
   de Castelnau-de-Guers (Loi 1901)
   Palette: Royal Blue (#002366), Deep Gold (#FFD700), Light Grey (#F4F6F9), White (#FFFFFF)
   ========================================================================== */

:root {
  --primary-color: #002366;
  --primary-dark: #001744;
  --primary-light: #0d388f;
  --accent-gold: #c69214;
  --accent-gold-bright: #ffd700;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --text-light: #6b7280;
  --bg-light: #f4f6f9;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --border-dark: #cbd5e1;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", Cambria, "Times New Roman", Times, serif;
}

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

html {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-light);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover, a:focus {
  color: var(--accent-gold);
}

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

/* ==========================================================================
   HEADER SYSTEM - DOUBLE-DECKER TRUST GRID
   ========================================================================== */

.header-wrapper {
  background: var(--bg-white);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 9990;
  box-shadow: var(--shadow-sm);
}

/* Row 1: Top Utility Strip */
.top-utility-strip {
  background: #f4f6f9;
  color: #333333;
  min-height: 42px;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
}

.top-utility-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.rna-badge {
  font-weight: 600;
  color: var(--primary-color);
  background: #e6edf8;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.siren-badge {
  color: var(--text-muted);
  font-weight: 500;
}

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

.search-simulation {
  display: flex;
  align-items: center;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 10px;
}

.search-simulation input {
  border: none;
  outline: none;
  font-size: 12px;
  width: 160px;
  background: transparent;
  color: var(--text-main);
}

.search-simulation button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
}

.lang-selector {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Row 2: Main Navigation Bar */
.main-nav-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

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

.brand-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

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

/* Dropdown styling */
.nav-item {
  position: relative;
}

.nav-item > a, .nav-item > .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.2px;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background-color 0.2s, color 0.2s;
  cursor: pointer;
  border: none;
  background: transparent;
  min-height: 44px;
}

.nav-item:hover > a, .nav-item:hover > .dropdown-toggle,
.nav-item.active > a {
  background-color: #eaf0fa;
  color: var(--primary-dark);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 270px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  list-style: none;
  z-index: 9999;
}

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

.dropdown-menu li a {
  display: block;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  text-transform: none;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
  background-color: var(--bg-light);
  color: var(--primary-color);
  border-left-color: var(--accent-gold);
  padding-left: 22px;
}

.nav-cta-btn {
  background: var(--primary-color);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary-color);
  min-height: 44px;
  transition: all 0.2s ease;
  margin-left: 12px;
}

.nav-cta-btn:hover {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #000000 !important;
}

/* Mobile Toggle */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 18px;
  cursor: pointer;
  color: var(--primary-color);
  min-width: 44px;
  min-height: 44px;
}

/* ==========================================================================
   LAYOUT CONTAINERS & GRIDS
   ========================================================================== */

.page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 64px 24px;
  flex: 1;
  width: 100%;
}

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

.main-column {
  min-width: 0;
}

.sidebar-column {
  min-width: 0;
}

/* Sidebar Cards */
.side-rail-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.side-rail-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-color);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.key-metric-item {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.key-metric-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.metric-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.1;
}

.metric-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* ==========================================================================
   INSTITUTIONAL HERO FRAMEWORK
   ========================================================================== */

.hero-banner-section {
  position: relative;
  background: #001744;
  color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow-md);
}

.hero-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 520px;
  overflow: hidden;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.65);
}

.hero-content-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  background: linear-gradient(180deg, rgba(0, 23, 68, 0) 0%, rgba(0, 23, 68, 0.95) 80%);
}

.hero-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 14px;
  max-width: 900px;
}

.hero-summary-sentence {
  font-size: 17px;
  line-height: 1.6;
  color: #e2e8f0;
  max-width: 850px;
  margin-bottom: 24px;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--accent-gold);
  color: #000000;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent-gold);
  min-height: 44px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--accent-gold-bright);
  border-color: var(--accent-gold-bright);
  color: #000000;
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  min-height: 44px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #ffffff;
  color: var(--primary-color);
}

/* ==========================================================================
   CONTENT SECTIONS & TYPOGRAPHY
   ========================================================================== */

.content-section {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.section-header {
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 14px;
}

.section-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1.3;
}

.section-lead {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 6px;
}

h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
  margin-top: 28px;
  margin-bottom: 14px;
}

h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 20px;
  margin-bottom: 10px;
}

p {
  margin-bottom: 16px;
  line-height: 1.7;
  color: var(--text-main);
}

.lead-text {
  font-size: 17px;
  font-weight: 500;
  color: var(--primary-color);
  line-height: 1.65;
}

/* Callout & Disclosure Boxes */
.institutional-callout {
  background: #eef4fc;
  border-left: 4px solid var(--primary-color);
  padding: 20px 24px;
  border-radius: 0 6px 6px 0;
  margin: 24px 0;
}

.institutional-callout p {
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.institutional-callout p:last-child {
  margin-bottom: 0;
}

.funding-disclosure-banner {
  background: #fdfaf0;
  border: 1px solid #f6e05e;
  border-radius: 6px;
  padding: 20px 24px;
  margin: 24px 0;
}

.funding-disclosure-banner h4 {
  color: #744210;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.funding-disclosure-banner p {
  color: #744210;
  font-size: 14.5px;
  margin-bottom: 0;
}

/* 3-Step Transparency Roadmap */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 28px 0;
}

.roadmap-step {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 22px;
  position: relative;
}

.step-badge {
  display: inline-block;
  background: var(--primary-color);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.roadmap-step h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.roadmap-step p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Program Logs & Cards */
.program-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.program-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.program-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
}

.status-badge {
  background: #e6f4ea;
  color: #137333;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}

.program-meta {
  display: flex;
  gap: 18px;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}

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

.institutional-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  font-size: 14.5px;
}

.institutional-table th {
  background: var(--primary-color);
  color: #ffffff;
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
}

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

.institutional-table tr:nth-child(even) td {
  background: var(--bg-light);
}

.institutional-table tr:hover td {
  background: #edf2f7;
}

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

.form-label {
  display: block;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  background: var(--bg-white);
  color: var(--text-main);
  outline: none;
  min-height: 44px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 35, 102, 0.15);
}

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

.form-help {
  font-size: 12.5px;
  color: var(--text-light);
  margin-top: 4px;
}

/* Image Showcase Component */
.image-showcase {
  border-radius: 8px;
  overflow: hidden;
  margin: 24px 0;
  border: 1px solid var(--border-color);
  background: var(--bg-white);
}

.image-showcase img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: #001744;
  color: #e2e8f0;
  border-top: 4px solid var(--accent-gold);
  padding: 48px 24px 24px 24px;
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

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

.footer-col h4 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 8px;
}

.footer-col p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
}

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

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

.footer-links a {
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s;
  display: inline-block;
  min-height: 24px;
}

.footer-links a:hover {
  color: var(--accent-gold-bright);
}

.footer-notice-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.footer-notice-text {
  font-size: 13px;
  line-height: 1.6;
  color: #94a3b8;
  margin-bottom: 0;
}

.footer-bottom {
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
}

/* ==========================================================================
   RESPONSIVE DESIGN & MEDIA QUERIES
   ========================================================================== */

@media (max-width: 992px) {
  .two-column-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

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

@media (max-width: 768px) {
  .top-utility-strip {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 16px;
    gap: 6px;
  }

  .top-utility-right {
    width: 100%;
    justify-content: space-between;
  }

  .search-simulation input {
    width: 110px;
  }

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

  .nav-links-wrapper {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px 20px;
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    gap: 12px;
  }

  .nav-links-wrapper.open {
    display: flex;
  }

  .nav-item {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: 1px solid var(--border-color);
    margin-top: 6px;
    background: var(--bg-light);
  }

  .nav-cta-btn {
    margin-left: 0;
    width: 100%;
  }

  .hero-content-overlay {
    position: relative;
    background: #001744;
    padding: 24px 20px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-summary-sentence {
    font-size: 15px;
  }

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

  .page-container {
    padding: 20px 16px 40px 16px;
  }

  .content-section {
    padding: 20px 16px;
  }
}
