/* ==========================================================================
   STYLE.CSS - THE REVOLUTIONARY ARCHIVE CIVIC DESIGN SYSTEM
   UNION SPORTIVE D'ECOLE PRIMAIRE LES COMBES (U.S.E.P) LES COMBES
   Association Loi 1901 - RNA: W044000678 - SIREN: 924286925
   ========================================================================== */

:root {
  --color-slate: #0F172A;
  --color-terracotta: #C2593F;
  --color-terracotta-dark: #9F432C;
  --color-parchment: #F8F5EE;
  --color-alabaster: #FFFFFF;
  --color-sandstone: #E2D9CC;
  --color-charcoal: #1E293B;
  --color-muted: #64748B;
  --color-border: #E2D9CC;

  --font-serif: "Newsreader", "Georgia", "Cambria", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-subtle: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 10px 30px -4px rgba(15, 23, 42, 0.08);
}

*, *::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);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--color-parchment);
  color: var(--color-charcoal);
  padding-top: 125px; /* Sticky offset protection */
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
}

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

/* ==========================================================================
   HEADER ARCHITECTURE (LEVEL 1 + LEVEL 2)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background-color: var(--color-alabaster);
  box-shadow: 0 2px 15px rgba(15, 23, 42, 0.07);
}

/* Level 1: Civic Ledger Utility Strip */
.civic-ledger-strip {
  background-color: var(--color-slate);
  color: #E2E8F0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  padding: 6px 24px;
  border-bottom: 1px solid rgba(226, 217, 204, 0.2);
}

.ledger-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ledger-items {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.ledger-item strong {
  color: var(--color-terracotta);
  font-weight: 600;
}

.ledger-link {
  color: #E2E8F0;
  text-decoration: none;
  border-bottom: 1px dashed #94A3B8;
  transition: color 0.2s;
}

.ledger-link:hover {
  color: var(--color-terracotta);
  border-color: var(--color-terracotta);
}

/* Level 2: Split Navigation Bar */
.main-nav-strip {
  background-color: var(--color-alabaster);
  border-bottom: 1px solid var(--color-sandstone);
  padding: 0 24px;
}

.nav-container {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

/* Left Brand Badge */
.brand-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.badge-tag {
  background-color: var(--color-terracotta);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

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

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-slate);
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--color-muted);
  letter-spacing: 0.02em;
}

/* Nav Menu & Dropdowns */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 6px;
  align-items: center;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: var(--color-charcoal);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s, color 0.2s;
  min-height: 44px;
}

.nav-link:hover, .nav-link.active {
  background-color: var(--color-parchment);
  color: var(--color-terracotta);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background-color: var(--color-alabaster);
  border: 1px solid var(--color-sandstone);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  list-style: none;
  z-index: 10001;
}

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

.dropdown-link {
  display: block;
  padding: 10px 18px;
  color: var(--color-charcoal);
  font-size: 0.88rem;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.dropdown-link:hover {
  background-color: var(--color-parchment);
  color: var(--color-terracotta);
}

.nav-btn-contact {
  background-color: var(--color-slate);
  color: #FFFFFF !important;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background-color 0.2s;
}

.nav-btn-contact:hover {
  background-color: var(--color-terracotta) !important;
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-sandstone);
  padding: 8px 12px;
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--color-slate);
  min-width: 44px;
  min-height: 44px;
}

/* ==========================================================================
   ASYMMETRIC STRUCTURAL CANVAS
   ========================================================================== */
.main-wrapper {
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px 80px;
  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 {
  position: sticky;
  top: 150px;
  background-color: var(--color-alabaster);
  border: 1px solid var(--color-sandstone);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  font-family: var(--font-mono);
}

.side-rail-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-slate);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-terracotta);
}

.side-rail-meta {
  list-style: none;
  font-size: 0.82rem;
  margin-bottom: 24px;
}

.side-rail-meta li {
  margin-bottom: 10px;
  line-height: 1.4;
  color: var(--color-charcoal);
}

.side-rail-meta strong {
  color: var(--color-terracotta);
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.side-rail-quote {
  background-color: var(--color-parchment);
  border-left: 3px solid var(--color-terracotta);
  padding: 14px;
  margin: 20px 0;
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--color-charcoal);
}

.side-rail-nav {
  list-style: none;
  font-size: 0.82rem;
  border-top: 1px solid var(--color-sandstone);
  padding-top: 16px;
}

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

.side-rail-nav a {
  color: var(--color-slate);
  text-decoration: none;
  display: block;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s, color 0.15s;
}

.side-rail-nav a:hover {
  background-color: var(--color-parchment);
  color: var(--color-terracotta);
}

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

/* ==========================================================================
   TYPOGRAPHY & CONTENT ELEMENTS
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-slate);
  font-family: var(--font-serif);
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-sandstone);
  padding-bottom: 8px;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--color-charcoal);
  font-size: 1.05rem;
  line-height: 1.75;
}

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

li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Hero Section */
.hero-block {
  margin-bottom: 36px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-sandstone);
  background-color: var(--color-parchment);
}

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

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

.hero-text-content {
  padding: 32px;
}

.hero-summary-2sentences {
  background-color: var(--color-alabaster);
  border-left: 4px solid var(--color-terracotta);
  padding: 16px 20px;
  margin: 18px 0 24px;
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--color-slate);
}

/* Mandatory Mission Callout Frame */
.mission-statement-callout {
  background-color: #F4EFEB;
  border: 2px solid var(--color-terracotta);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin: 32px 0;
  position: relative;
}

.mission-callout-badge {
  display: inline-block;
  background-color: var(--color-terracotta);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.mission-statement-callout p {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  line-height: 1.8;
  color: var(--color-slate);
  margin-bottom: 0;
}

/* Inline Photographs */
.inline-photo-card {
  margin: 32px 0;
  border: 1px solid var(--color-sandstone);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--color-alabaster);
  box-shadow: var(--shadow-subtle);
}

.inline-photo-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.photo-meta-strip {
  padding: 10px 16px;
  background-color: var(--color-parchment);
  border-top: 1px solid var(--color-sandstone);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--color-muted);
  display: flex;
  justify-content: space-between;
}

/* Statistical Grids & Data Tables */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.stat-card {
  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-terracotta);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-slate);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

.civic-table th {
  background-color: var(--color-slate);
  color: #FFFFFF;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

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

.civic-table tr:nth-child(even) td {
  background-color: var(--color-parchment);
}

/* Call To Action (CTA) Non-Commercial Buttons */
.cta-banner {
  background-color: var(--color-parchment);
  border: 1px solid var(--color-sandstone);
  border-left: 6px solid var(--color-terracotta);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.cta-banner-text h3 {
  margin: 0 0 6px 0;
  font-size: 1.25rem;
}

.cta-banner-text p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.btn-civic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--color-terracotta);
  color: #FFFFFF !important;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  min-height: 44px;
  white-space: nowrap;
}

.btn-civic:hover {
  background-color: var(--color-terracotta-dark);
}

.btn-civic-slate {
  background-color: var(--color-slate);
}

.btn-civic-slate:hover {
  background-color: #1E293B;
}

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

.btn-civic-outline:hover {
  background-color: var(--color-slate);
  color: #FFFFFF !important;
}

/* Forms (Contact, Bénévolat) */
.civic-form-card {
  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-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-slate);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-sandstone);
  border-radius: var(--radius-sm);
  background-color: var(--color-alabaster);
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  min-height: 44px;
}

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

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

/* Slider Component (Vanilla JS for index.php) */
.hero-slider-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-sandstone);
  margin-bottom: 32px;
  background-color: var(--color-slate);
  color: #FFFFFF;
}

.slider-slide {
  display: none;
  padding: 40px;
  min-height: 220px;
  flex-direction: column;
  justify-content: center;
}

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

.slider-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-terracotta);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.slider-headline {
  color: #FFFFFF;
  font-family: var(--font-serif);
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.slider-desc {
  color: #E2E8F0;
  font-size: 1.05rem;
  margin-bottom: 0;
  max-width: 800px;
}

.slider-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  background-color: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(226, 217, 204, 0.2);
}

.slider-btn {
  background: transparent;
  border: 1px solid #94A3B8;
  color: #FFFFFF;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  min-height: 44px;
  min-width: 44px;
}

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

.slider-indicator {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #CBD5E1;
}

/* ==========================================================================
   FOOTER ARCHITECTURE
   ========================================================================== */
.site-footer {
  background-color: var(--color-slate);
  color: #E2E8F0;
  border-top: 3px solid var(--color-terracotta);
  padding: 60px 24px 30px;
  margin-top: auto;
}

.footer-container {
  max-width: 1360px;
  margin: 0 auto;
}

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

.footer-col h4 {
  color: #FFFFFF;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(226, 217, 204, 0.2);
  padding-bottom: 8px;
}

.footer-col p {
  color: #CBD5E1;
  font-size: 0.92rem;
  line-height: 1.6;
}

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

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

.footer-col a {
  color: #CBD5E1;
  text-decoration: none;
  font-size: 0.92rem;
  display: inline-block;
  padding: 4px 0;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--color-terracotta);
}

.footer-reinvestment-box {
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--color-terracotta);
  padding: 14px 16px;
  margin-top: 16px;
  font-size: 0.86rem;
  color: #F8F5EE;
  font-style: italic;
}

/* Mandatory Un-Truncated Disclosure Strip */
.footer-mandatory-disclosure {
  border-top: 1px solid rgba(226, 217, 204, 0.2);
  padding-top: 24px;
  margin-top: 24px;
  text-align: center;
}

.footer-mandatory-disclosure p {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #94A3B8;
  line-height: 1.6;
  max-width: 1000px;
  margin: 0 auto;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  body {
    padding-top: 135px;
  }

  #reading-progress-bar {
    display: none !important;
  }

  .asymmetric-canvas {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .side-rail-logbook {
    position: static;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-alabaster);
    border-bottom: 2px solid var(--color-terracotta);
    box-shadow: var(--shadow-card);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px;
    gap: 8px;
  }

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

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--color-sandstone);
    margin-left: 12px;
    padding-left: 12px;
    display: block;
  }

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

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

  .civic-ledger-strip {
    font-size: 0.72rem;
    padding: 6px 16px;
  }

  .nav-container {
    height: 64px;
  }

  .brand-title {
    font-size: 0.95rem;
  }

  .analytical-canvas {
    padding: 24px 18px;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.4rem;
  }

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

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