/* ==========================================================================
   COMITE DEPARTEMENTAL D'ATHLETISME DE LA CORREZE - OFFICIAL STYLESHEET
   Conforming to French Non-Profit (Loi 1901) & Google Ad Grants Directives
   Alone Theme Palette:
   - Primary Sunshine Gold: #F3BA2F
   - Primary Accent Coral:  #ED5236
   - Deep Navy Charcoal:   #1F2531
   - Canvas Gray:          #F8F9FA
   - Pure White:           #FFFFFF
   - Border Slate:         #E2E8F0
   - Text Slate Muted:     #64748B
   - Text Slate Dark:      #1E293B
   ========================================================================== */

/* --- CSS Reset & Base Rules --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #1E293B;
  background-color: #F8F9FA;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #F8F9FA;
  color: #1E293B;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  color: #1F2531;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: balance;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: #334155;
  font-size: 1.025rem;
  line-height: 1.75;
}

a {
  color: #ED5236;
  text-decoration: none;
  transition: color 0.18s ease-in-out;
}

a:hover, a:focus-visible {
  color: #C0371E;
}

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

figure {
  margin: 1.75rem 0 1.25rem 0;
}

figure img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin: 0 0 8px 0;
  object-fit: cover;
}

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

ul, ol {
  margin: 0 0 1.5rem 1.5rem;
  color: #334155;
  line-height: 1.75;
}

li {
  margin-bottom: 0.5rem;
}

/* --- Container & Layout --- */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.content-narrow {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.section {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.section-alt {
  background-color: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
}

.section-dark {
  background-color: #1F2531;
  color: #F8F9FA;
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark p {
  color: #F8F9FA;
}

/* --- Utility Strip (Top of Header) --- */
.top-utility-strip {
  background-color: #161A22;
  color: #94A3B8;
  font-size: 0.8125rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.utility-meta-group {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.utility-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.utility-meta-item strong {
  color: #F3BA2F;
  font-weight: 600;
}

.utility-legal-link {
  color: #E2E8F0;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.utility-legal-link:hover {
  color: #F3BA2F;
}

/* --- Main Navigation Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #FFFFFF;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid #E2E8F0;
}

.header-main-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
}

.brand-wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.brand-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1F2531;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.775rem;
  color: #ED5236;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.nav-item {
  position: relative;
}

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

.nav-link:hover,
.nav-link:focus-visible,
.nav-item:hover > .nav-link {
  color: #ED5236;
  background-color: #F8F9FA;
}

.nav-link.active {
  color: #ED5236;
  border-bottom: 2px solid #ED5236;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 0.5rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1010;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  margin: 0;
}

.nav-dropdown-link {
  display: block;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  transition: all 0.15s ease;
  min-height: 44px;
}

.nav-dropdown-link:hover,
.nav-dropdown-link:focus-visible {
  color: #ED5236;
  background-color: #F8F9FA;
  padding-left: 1.5rem;
}

.header-action-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.75rem 1.6rem;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
  white-space: nowrap;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary {
  background-color: #ED5236;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(237, 82, 54, 0.25);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: #D63E24;
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(237, 82, 54, 0.35);
}

.btn-gold {
  background-color: #F3BA2F;
  color: #1F2531;
  box-shadow: 0 4px 12px rgba(243, 186, 47, 0.25);
}

.btn-gold:hover,
.btn-gold:focus-visible {
  background-color: #DF9E12;
  color: #1F2531;
  transform: translateY(-1px);
}

.btn-outline-dark {
  background-color: transparent;
  border-color: #1F2531;
  color: #1F2531;
}

.btn-outline-dark:hover {
  background-color: #1F2531;
  color: #FFFFFF;
}

.btn-outline-light {
  background-color: transparent;
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.btn-outline-light:hover {
  background-color: #FFFFFF;
  color: #1F2531;
}

/* Mobile Hamburger Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  padding: 0.6rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  color: #1F2531;
}

/* --- Hero Banner Component --- */
.hero-banner {
  position: relative;
  background-color: #1F2531;
  color: #FFFFFF;
  padding: 5rem 0;
  overflow: hidden;
  border-bottom: 4px solid #F3BA2F;
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-tagline {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #F3BA2F;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.85rem;
  line-height: 1.15;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
}

.hero-subtitle-lead {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #E2E8F0;
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero-btn-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Mandatory "Notre Mission" Statement Block --- */
.mission-statement-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFFDF8 100%);
  border: 2px solid #F3BA2F;
  border-radius: 14px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(243, 186, 47, 0.12);
  margin: 2.5rem 0;
  position: relative;
}

.mission-statement-card::before {
  content: "★ NOTRE MISSION OFFICIELLE";
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.785rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ED5236;
  margin-bottom: 0.85rem;
}

.mission-statement-text {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #1F2531;
  font-weight: 500;
  margin-bottom: 0;
}

/* --- Content Cards & Grids --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

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

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

.card {
  background-color: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-media {
  margin: -2rem -2rem 1.5rem -2rem;
  border-top-left-radius: 11px;
  border-top-right-radius: 11px;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

.card-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ED5236;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: #1F2531;
}

.card-body {
  flex: 1;
}

.card-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #E2E8F0;
}

/* --- Impact & Metric Displays --- */
.metrics-strip {
  background-color: #1F2531;
  color: #FFFFFF;
  padding: 3.5rem 0;
  border-top: 4px solid #ED5236;
}

.metric-item {
  text-align: center;
  padding: 1rem;
}

.metric-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.75rem;
  font-weight: 800;
  color: #F3BA2F;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.metric-label {
  font-size: 0.95rem;
  color: #E2E8F0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.metric-subtext {
  font-size: 0.8125rem;
  color: #94A3B8;
  margin-top: 0.35rem;
  margin-bottom: 0;
}

/* Progress Tracker Bar */
.progress-bar-container {
  margin: 1rem 0;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 0.35rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  background-color: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #F3BA2F 0%, #ED5236 100%);
  border-radius: 999px;
}

/* --- Tables & Data Ledgers --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background-color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

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

.data-table th {
  background-color: #1F2531;
  color: #FFFFFF;
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.03em;
}

.data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #E2E8F0;
  color: #334155;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

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

.data-table td strong {
  color: #1F2531;
}

/* --- Forms & Contact Elements --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1F2531;
  margin-bottom: 0.5rem;
}

.form-label .required-mark {
  color: #ED5236;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1F2531;
  background-color: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 8px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  min-height: 44px;
}

.form-control:focus {
  outline: none;
  border-color: #ED5236;
  box-shadow: 0 0 0 3px rgba(237, 82, 54, 0.15);
}

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

.form-help {
  font-size: 0.8125rem;
  color: #64748B;
  margin-top: 0.4rem;
  margin-bottom: 0;
}

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

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

.modal-dialog {
  background-color: #FFFFFF;
  border-radius: 14px;
  width: 100%;
  max-width: 540px;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  border: 2px solid #F3BA2F;
}

.modal-icon-badge {
  width: 64px;
  height: 64px;
  background-color: #FEF3C7;
  color: #D97706;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 1.6rem;
  color: #1F2531;
  margin-bottom: 0.75rem;
}

.modal-text {
  font-size: 1rem;
  color: #475569;
  margin-bottom: 1.75rem;
}

/* --- Global Site Footer --- */
.site-footer {
  background-color: #1F2531;
  color: #CBD5E1;
  padding-top: 4rem;
  padding-bottom: 2rem;
  margin-top: auto;
  border-top: 5px solid #F3BA2F;
}

.footer-top-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-col-title {
  color: #F3BA2F;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.footer-desc {
  color: #94A3B8;
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

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

.footer-nav-item {
  margin-bottom: 0.6rem;
}

.footer-nav-link {
  color: #CBD5E1;
  font-size: 0.9375rem;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 36px;
}

.footer-nav-link:hover,
.footer-nav-link:focus-visible {
  color: #F3BA2F;
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9375rem;
  color: #CBD5E1;
  margin-bottom: 0.85rem;
  line-height: 1.5;
}

.footer-contact-item a {
  color: #CBD5E1;
}

.footer-contact-item a:hover {
  color: #F3BA2F;
}

/* Mandatory Non-Commercial Disclosure Box in Footer */
.footer-disclosure-panel {
  background-color: #161A22;
  border-left: 4px solid #ED5236;
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: #94A3B8;
}

.footer-disclosure-panel strong {
  color: #FFFFFF;
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.75rem;
  font-size: 0.8125rem;
  color: #94A3B8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal-inline {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-legal-inline a {
  color: #94A3B8;
}

.footer-legal-inline a:hover {
  color: #F3BA2F;
}

/* Timeline Components (for about.php) */
.timeline-container {
  position: relative;
  padding: 1.5rem 0;
  margin: 2rem 0;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 3px;
  background-color: #E2E8F0;
}

.timeline-entry {
  position: relative;
  padding-left: 65px;
  margin-bottom: 2.5rem;
}

.timeline-badge {
  position: absolute;
  left: 12px;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #ED5236;
  border: 4px solid #FFFFFF;
  box-shadow: 0 0 0 2px #ED5236;
}

.timeline-year {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ED5236;
  margin-bottom: 0.25rem;
}

/* --- Responsive Media Queries (Mobile & Tablet) --- */
@media (max-width: 992px) {
  .footer-top-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
}

@media (max-width: 768px) {
  .top-utility-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .nav-node-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #FFFFFF;
    flex-direction: column;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border-bottom: 2px solid #ED5236;
    gap: 0.5rem;
  }
  
  .nav-node-list.is-open {
    display: flex;
  }
  
  .nav-item {
    width: 100%;
  }
  
  .nav-link {
    width: 100%;
    justify-content: space-between;
  }
  
  .nav-dropdown {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  
  .nav-item.dropdown-open .nav-dropdown {
    display: block;
  }
  
  .header-action-group .btn {
    display: none;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .footer-top-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-banner {
    padding: 3.5rem 0;
  }
  
  .hero-title {
    font-size: 1.85rem;
  }
  
  .hero-subtitle-lead {
    font-size: 1.05rem;
  }
  
  .mission-statement-card {
    padding: 1.5rem;
  }
  
  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
