/* ==========================================================================
   STYLE.CSS - ASSOCIATION SPORTIVE ROQUEFORT LES CASCADES
   Design System: "The Revolutionary Archive"
   Loi 1901 Public Benefit Civic Platform Architecture
   ========================================================================== */

:root {
  --color-slate-deep: #0F172A;
  --color-rust: #C2593F;
  --color-rust-hover: #A7472E;
  --color-parchment: #F8F5EE;
  --color-white: #FFFFFF;
  --color-sandstone: #E2D9CC;
  --color-charcoal: #1E293B;
  --color-muted: #64748B;
  --color-ledger-bg: #141E33;
  
  --font-serif: "Newsreader", "Merriweather", "Georgia", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Fira Code", "Courier New", monospace;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--color-parchment);
  color: var(--color-charcoal);
}

body {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  background-color: var(--color-parchment);
  color: var(--color-charcoal);
  padding-top: 125px; /* Sticky Offset Protection */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dynamic Reading Progress Tracker */
#reading-progress-bar {
  position: fixed;
  top: 0;
  right: 0;
  width: 5px;
  height: 0%;
  background: var(--color-rust);
  z-index: 10001;
  transition: height 0.05s ease-out;
}

@media (max-width: 992px) {
  #reading-progress-bar {
    display: none !important;
  }
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-slate-deep);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.35rem;
  line-height: 1.2;
}

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

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

p {
  margin-bottom: 1.25rem;
  max-width: 78ch;
}

a {
  color: var(--color-rust);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease-in-out;
}

a:hover, a:focus {
  color: var(--color-slate-deep);
}

/* Header Architecture */
header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--color-sandstone);
}

/* Level 1: Civic Ledger Utility Strip */
.civic-ledger-strip {
  background-color: var(--color-slate-deep);
  color: #E2E8F0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 6px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.civic-ledger-strip a {
  color: #F8FAFC;
  text-decoration: none;
  font-weight: 500;
}

.civic-ledger-strip a:hover {
  text-decoration: underline;
}

.ledger-left, .ledger-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ledger-tag {
  background-color: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Level 2: Split Navigation Bar */
.split-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 28px;
  background-color: var(--color-white);
}

.org-brand-badge {
  background-color: var(--color-rust);
  color: var(--color-white) !important;
  text-decoration: none !important;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  transition: background-color 0.2s ease;
}

.org-brand-badge:hover {
  background-color: var(--color-rust-hover);
}

.org-brand-badge .badge-sub {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 400;
  opacity: 0.92;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Primary Navigation Menu */
nav.primary-nav {
  display: flex;
  align-items: center;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-slate-deep);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover, .nav-item:focus-within > .nav-link, .nav-link.active {
  background-color: rgba(15, 23, 42, 0.06);
  color: var(--color-rust);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--color-white);
  border: 1px solid var(--color-sandstone);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  min-width: 250px;
  list-style: none;
  padding: 6px 0;
  margin-top: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1000;
}

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

.dropdown-menu li a {
  display: block;
  padding: 9px 16px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-charcoal);
  text-decoration: none;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
  background-color: var(--color-parchment);
  color: var(--color-rust);
}

.nav-cta-btn {
  background-color: var(--color-slate-deep);
  color: var(--color-white) !important;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  transition: background-color 0.15s ease;
  margin-left: 8px;
}

.nav-cta-btn:hover {
  background-color: var(--color-rust);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-sandstone);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--color-slate-deep);
}

/* Asymmetric Structural Canvas */
.main-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 60px;
  width: 100%;
  flex: 1;
}

.asymmetric-canvas {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  align-items: start;
}

/* Left Column: Monospace Side-Rail Logbook */
.side-rail-logbook {
  background-color: var(--color-white);
  border: 1px solid var(--color-sandstone);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 140px;
}

.side-rail-header {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--color-rust);
  letter-spacing: 0.08em;
  font-weight: 700;
  border-bottom: 1px dashed var(--color-sandstone);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.logbook-entry {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--color-charcoal);
  margin-bottom: 16px;
  border-left: 2px solid var(--color-slate-deep);
  padding-left: 10px;
}

.logbook-label {
  font-weight: 700;
  color: var(--color-slate-deep);
  display: block;
}

.logbook-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.55;
  background-color: var(--color-parchment);
  border: 1px solid var(--color-sandstone);
  padding: 14px;
  border-radius: var(--radius-sm);
  margin: 18px 0;
  color: var(--color-slate-deep);
}

.side-rail-links {
  list-style: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 16px;
  border-top: 1px dashed var(--color-sandstone);
  padding-top: 12px;
}

.side-rail-links li {
  margin-bottom: 8px;
}

.side-rail-links a {
  text-decoration: none;
  color: var(--color-slate-deep);
}

.side-rail-links a:hover {
  color: var(--color-rust);
  text-decoration: underline;
}

/* Right Column: Primary Analytical Canvas */
.analytical-canvas {
  background-color: var(--color-white);
  border: 1px solid var(--color-sandstone);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

/* Hero Section Styles */
.hero-block {
  margin-bottom: 32px;
}

.hero-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border: 1px solid var(--color-sandstone);
  background-color: var(--color-slate-deep);
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.headline-summary {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-slate-deep);
  background-color: var(--color-parchment);
  border-left: 4px solid var(--color-rust);
  padding: 16px 20px;
  margin: 20px 0 28px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 500;
}

/* Mandatory 'Notre Mission' Callout Frame */
.mission-statement-frame {
  background-color: #F5F1E8;
  border: 2px solid var(--color-rust);
  padding: 24px 28px;
  border-radius: var(--radius-md);
  margin: 30px 0;
  position: relative;
}

.mission-statement-frame::before {
  content: "DÉCLARATION STATUTAIRE D'INTÉRÊT GÉNÉRAL";
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-rust);
  margin-bottom: 10px;
}

.mission-statement-frame p {
  font-size: 1.05rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--color-slate-deep);
  margin-bottom: 0;
}

/* Statutory Reinvestment Callout */
.reinvestment-callout {
  background-color: var(--color-slate-deep);
  color: var(--color-white);
  padding: 18px 24px;
  border-radius: var(--radius-md);
  margin: 28px 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  border-left: 6px solid var(--color-rust);
}

.reinvestment-callout strong {
  color: #FCD34D;
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-sans);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

/* Content Grid & Photos */
.photo-story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 32px 0;
}

.photo-card {
  background-color: var(--color-parchment);
  border: 1px solid var(--color-sandstone);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.photo-card-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--color-slate-deep);
}

.photo-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.photo-card:hover .photo-card-img-wrap img {
  transform: scale(1.02);
}

.photo-card-body {
  padding: 16px 20px;
}

.photo-card-body h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.photo-card-body p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

/* Statistics Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 30px 0;
}

.stat-box {
  background-color: var(--color-parchment);
  border: 1px solid var(--color-sandstone);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-rust);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-label {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-slate-deep);
  font-weight: 600;
}

/* Tables */
.data-table-container {
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--color-sandstone);
  border-radius: var(--radius-md);
}

table.civic-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background-color: var(--color-white);
}

table.civic-data-table th,
table.civic-data-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-sandstone);
  text-align: left;
}

table.civic-data-table th {
  background-color: var(--color-slate-deep);
  color: var(--color-white);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

table.civic-data-table tr:hover td {
  background-color: rgba(248, 245, 238, 0.6);
}

/* Action Buttons & CTAs */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0;
}

.cta-btn {
  display: inline-block;
  padding: 12px 24px;
  min-height: 44px;
  min-width: 44px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none !important;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  border: none;
}

.cta-primary {
  background-color: var(--color-rust);
  color: var(--color-white) !important;
}

.cta-primary:hover {
  background-color: var(--color-rust-hover);
}

.cta-secondary {
  background-color: var(--color-slate-deep);
  color: var(--color-white) !important;
}

.cta-secondary:hover {
  background-color: #1E293B;
}

.cta-outline {
  background-color: transparent;
  color: var(--color-slate-deep) !important;
  border: 1px solid var(--color-slate-deep);
}

.cta-outline:hover {
  background-color: var(--color-slate-deep);
  color: var(--color-white) !important;
}

/* Forms */
.civic-form-container {
  background-color: var(--color-parchment);
  border: 1px solid var(--color-sandstone);
  border-radius: var(--radius-md);
  padding: 28px;
  margin: 32px 0;
}

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

.form-group label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-slate-deep);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background-color: var(--color-white);
  border: 1px solid var(--color-sandstone);
  border-radius: var(--radius-sm);
  color: var(--color-charcoal);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--color-rust);
  box-shadow: 0 0 0 2px rgba(194, 89, 63, 0.2);
}

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

/* Slider Component for Homepage */
.hero-slider-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--color-sandstone);
  background-color: var(--color-slate-deep);
}

.slider-slide {
  display: none;
  position: relative;
  aspect-ratio: 16 / 9;
}

.slider-slide.active {
  display: block;
}

.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-overlay-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0) 100%);
  padding: 30px 24px 20px;
  color: var(--color-white);
}

.slider-overlay-text h3 {
  color: var(--color-white);
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.slider-overlay-text p {
  font-size: 0.95rem;
  margin-bottom: 0;
  opacity: 0.9;
}

.slider-controls {
  position: absolute;
  bottom: 15px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-btn {
  background-color: rgba(15, 23, 42, 0.7);
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 12px;
  min-height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transition: background-color 0.2s;
}

.slider-btn:hover {
  background-color: var(--color-rust);
}

/* Footer Architecture */
footer.site-footer {
  background-color: var(--color-slate-deep);
  color: #CBD5E1;
  font-size: 0.92rem;
  border-top: 3px solid var(--color-rust);
  margin-top: auto;
}

.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 36px;
}

.footer-col h4 {
  color: var(--color-white);
  font-size: 1.1rem;
  margin-bottom: 14px;
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
}

.footer-col p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #94A3B8;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #CBD5E1;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}

.footer-col ul li a:hover {
  color: #F8FAFC;
  text-decoration: underline;
}

.footer-bottom {
  background-color: var(--color-ledger-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: #94A3B8;
  text-align: center;
}

.footer-disclosure-text {
  max-width: 980px;
  margin: 0 auto;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  body {
    padding-top: 150px;
  }
  
  .split-nav-bar {
    padding: 10px 18px;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  nav.primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    border-bottom: 2px solid var(--color-sandstone);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
  }
  
  nav.primary-nav.nav-open {
    display: block;
  }
  
  .nav-links-list {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--color-rust);
    padding-left: 12px;
    margin: 6px 0 10px 10px;
    background-color: var(--color-parchment);
  }
  
  .nav-cta-btn {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
  }
  
  /* Collapse Asymmetric Grid */
  .asymmetric-canvas {
    grid-template-columns: 1fr;
  }
  
  .side-rail-logbook {
    position: static;
    margin-bottom: 24px;
  }
  
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 170px;
  }

  .civic-ledger-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 6px 14px;
  }
  
  .ledger-left, .ledger-right {
    gap: 10px;
    flex-wrap: wrap;
  }
  
  .analytical-canvas {
    padding: 24px 18px;
  }
  
  h1 {
    font-size: 1.85rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .photo-story-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}
