/*
 * AAPPMA DEUX VALLEES DOUBS ET DESSOUBRE
 * Official Salado Design System Stylesheet
 * Color Palette: #1B2232 (Navy), #FF5B2E (Coral), #F8F9FA (Off-White)
 */

:root {
  --navy: #1B2232;
  --navy-light: #263147;
  --navy-dark: #121722;
  --coral: #FF5B2E;
  --coral-hover: #E0481D;
  --coral-light: #FFF0EB;
  --off-white: #F8F9FA;
  --white: #FFFFFF;
  --slate-dark: #334155;
  --slate: #64748B;
  --slate-light: #E2E8F0;
  --slate-border: #E5E7EB;
  --emerald: #10B981;
  --emerald-light: #ECFDF5;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 15px rgba(27, 34, 50, 0.06);
  --shadow-lg: 0 10px 30px rgba(27, 34, 50, 0.1);
  --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-family);
  background-color: var(--off-white);
  color: var(--slate-dark);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--navy);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2.25rem; letter-spacing: -0.02em; }
h2 { font-size: 1.75rem; letter-spacing: -0.015em; margin-top: 1.5rem; }
h3 { font-size: 1.35rem; margin-top: 1.25rem; }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  color: #3f4d67;
}

strong {
  color: var(--navy);
  font-weight: 600;
}

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

a:hover {
  color: var(--coral-hover);
  text-decoration: underline;
}

ul, ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
  color: #3f4d67;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-main {
  flex: 1 0 auto;
}

.section-padding {
  padding: 4rem 0;
}

.section-padding-sm {
  padding: 2.5rem 0;
}

/* Top Utility Bar */
.top-bar {
  background-color: var(--navy-dark);
  color: #94A3B8;
  font-size: 0.8125rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.top-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.top-bar-badge strong {
  color: #E2E8F0;
}

.top-bar-link {
  color: #CBD5E1;
  font-weight: 500;
}

.top-bar-link:hover {
  color: var(--coral);
  text-decoration: none;
}

/* Primary Header & Navigation */
.site-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--slate-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none !important;
}

.logo-badge {
  width: 44px;
  height: 44px;
  background-color: var(--navy);
  color: var(--white);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  border: 2px solid var(--coral);
  flex-shrink: 0;
}

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

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

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--slate);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Nav Menu */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-block;
  padding: 0.6rem 0.85rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--navy);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  background-color: #F1F5F9;
  color: var(--coral);
  text-decoration: none;
}

.nav-link.active {
  color: var(--coral);
  background-color: var(--coral-light);
}

.nav-cta-btn {
  background-color: var(--coral);
  color: var(--white) !important;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: background-color 0.2s ease, transform 0.1s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
}

.nav-cta-btn:hover {
  background-color: var(--coral-hover);
  transform: translateY(-1px);
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--slate-border);
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  color: var(--navy);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
  min-height: 44px;
  line-height: 1.2;
}

.btn-primary {
  background-color: var(--coral);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(255, 91, 46, 0.25);
}

.btn-primary:hover {
  background-color: var(--coral-hover);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--navy);
  color: var(--white);
}

.btn-secondary:hover {
  background-color: var(--navy-light);
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

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

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, #1B2232 0%, #263147 100%);
  color: var(--white);
  padding: 4.5rem 0 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-banner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--coral);
}

.hero-banner h1 {
  color: var(--white);
  font-size: 2.75rem;
  max-width: 900px;
  margin-bottom: 1.25rem;
}

.hero-summary-block {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #E2E8F0;
  max-width: 820px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--coral);
  padding-left: 1.25rem;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  background-color: rgba(255, 91, 46, 0.15);
  color: #FF8F6B;
  border: 1px solid rgba(255, 91, 46, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

/* Reinvestment & Mission Boxes */
.reinvestment-banner {
  background-color: var(--coral-light);
  border: 1px solid #FFD4C4;
  border-left: 6px solid var(--coral);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  color: var(--navy);
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mission-callout {
  background-color: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
  margin: 2.5rem 0;
  position: relative;
}

.mission-callout-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mission-callout-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.5rem;
}

.mission-badge {
  background-color: var(--navy);
  color: var(--white);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.mission-text-exact {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #1F2937;
  font-weight: 500;
}

/* Document Cards & Action Pillars */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin: 2.5rem 0;
}

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

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin: 2rem 0;
}

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

.card {
  background-color: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-icon-box {
  width: 48px;
  height: 48px;
  background-color: var(--coral-light);
  color: var(--coral);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--slate-dark);
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1 0 auto;
}

.status-tag {
  display: inline-block;
  background-color: var(--emerald-light);
  color: #065F46;
  border: 1px solid #A7F3D0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

/* Stats Bar */
.stats-bar {
  background-color: var(--navy);
  color: var(--white);
  padding: 3rem 0;
  border-radius: var(--radius-lg);
  margin: 3rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat-item {
  padding: 1rem;
}

.stat-number {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--coral);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.95rem;
  color: #CBD5E1;
  font-weight: 500;
}

/* Progress Bars */
.progress-group {
  margin: 1.25rem 0;
}

.progress-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--navy);
}

.progress-track {
  background-color: var(--slate-light);
  border-radius: 50px;
  height: 10px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--navy) 0%, var(--coral) 100%);
  height: 100%;
  border-radius: 50px;
}

/* Image Frames & Figcaption Standards */
.doc-figure {
  margin: 2rem 0;
  width: 100%;
}

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

.doc-caption {
  font-size: 0.875rem;
  color: #64748B;
  margin-bottom: 20px;
  font-style: italic;
  line-height: 1.4;
  padding: 0 0.25rem;
}

/* Content Columns & Text Blocks */
.content-section {
  background-color: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.content-lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--navy);
  font-weight: 500;
  margin-bottom: 1.75rem;
}

/* Forms */
.form-card {
  background-color: var(--white);
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
}

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

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--slate-border);
  border-radius: var(--radius-sm);
  background-color: #FAFAFA;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 44px;
}

.form-control:focus {
  outline: none;
  border-color: var(--coral);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(255, 91, 46, 0.15);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* Modal Popup */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(27, 34, 50, 0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.modal-box {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  text-align: center;
  border-top: 6px solid var(--coral);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-icon {
  width: 64px;
  height: 64px;
  background-color: var(--coral-light);
  color: var(--coral);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem auto;
}

.modal-title {
  font-size: 1.65rem;
  margin-bottom: 0.75rem;
}

.modal-desc {
  color: var(--slate-dark);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-border);
}

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

.table-custom th {
  background-color: var(--navy);
  color: var(--white);
  padding: 0.85rem 1rem;
  font-weight: 600;
}

.table-custom td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--slate-border);
  color: var(--slate-dark);
}

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

/* CTA Bar */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.75rem;
  margin: 3rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cta-banner h3 {
  color: var(--white);
  font-size: 1.65rem;
  margin-bottom: 0.5rem;
}

.cta-banner p {
  color: #CBD5E1;
  margin: 0;
  max-width: 650px;
}

/* Footer Standard */
.site-footer {
  background-color: #1B2232;
  color: #94A3B8;
  padding: 4rem 0 2rem 0;
  margin-top: 4rem;
  border-top: 4px solid var(--coral);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h4 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.footer-brand p {
  color: #94A3B8;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-col h5 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-nav a {
  color: #94A3B8;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--coral);
  text-decoration: none;
}

.footer-disclosure-box {
  background-color: #121722;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2.5rem 0 2rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #CBD5E1;
}

.footer-disclosure-box p {
  margin: 0;
  color: #CBD5E1;
}

.footer-bottom {
  padding-top: 1.5rem;
  font-size: 0.8125rem;
  color: #64748B;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Media Queries */
@media (max-width: 992px) {
  .hero-banner h1 {
    font-size: 2.2rem;
  }
  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    border-bottom: 2px solid var(--coral);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
  }

  .main-nav.active {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 100%;
  }

  .nav-cta-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }

  .hero-banner {
    padding: 3rem 0;
  }

  .hero-banner h1 {
    font-size: 1.85rem;
  }

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

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

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

  .form-row {
    grid-template-columns: 1fr;
  }

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