/* ==========================================================================
   LES AMIS DE SAINT JEAN DES VIGNES - STYLE.CSS
   Neo-Brutalist Editorial Hybrid Architecture (Loi 1901 Institutional Design)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --bg-pure: #FFFFFF;
  --bg-cream: #F5F5F0;
  --bg-tint: #F9F9F6;
  --ink-charcoal: #1E293B;
  --ink-muted: #475569;
  --ink-light: #64748B;
  --accent-terracotta: #C2410C;
  --accent-terracotta-hover: #9A3412;
  --accent-ochre: #4D7C0F;
  --border-structural: #1E293B;
  --shadow-brutal: 4px 4px 0px #1E293B;
  --shadow-brutal-sm: 2px 2px 0px #1E293B;
  --shadow-brutal-lg: 6px 6px 0px #1E293B;
  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-width: 280px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-cream);
  color: var(--ink-charcoal);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  background-color: var(--bg-cream);
  color: var(--ink-charcoal);
  min-height: 100vh;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ==========================================================================
   MASTER LAYOUT GRID (Strict 2-Column Framework)
   ========================================================================== */

.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================================================================
   LEFT SIDEBAR NAVIGATION FRAMEWORK (Column 1)
   ========================================================================== */

.sidebar-container {
  width: var(--sidebar-width);
  background: var(--bg-pure);
  border-right: 2px solid var(--border-structural);
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-structural) var(--bg-cream);
  z-index: 900;
}

.sidebar-container::-webkit-scrollbar {
  width: 5px;
}
.sidebar-container::-webkit-scrollbar-thumb {
  background: var(--border-structural);
}

.brand-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 2px solid var(--border-structural);
  padding-bottom: 20px;
}

.brand-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ink-charcoal);
  color: var(--bg-pure);
  padding: 4px 8px;
  border-radius: 0px;
  width: fit-content;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--ink-charcoal);
  text-decoration: none;
  display: block;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-terracotta);
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Metadata Registry Sub-Card */
.meta-registry-card {
  background: var(--bg-tint);
  border: 1px solid var(--border-structural);
  padding: 14px 12px;
  box-shadow: var(--shadow-brutal-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.registry-label {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-light);
}

.registry-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-charcoal);
  font-family: monospace;
}

.registry-link {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 4px;
  display: inline-block;
}
.registry-link:hover {
  color: var(--ink-charcoal);
}

/* Directory Tree Navigation */
.nav-tree-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.nav-category {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-heading {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
  border-bottom: 1px solid #E2E8F0;
  padding-bottom: 4px;
}

.category-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item-link {
  display: flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-charcoal);
  text-decoration: none;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 44px;
  box-sizing: border-box;
}

.nav-item-link:hover {
  background: var(--bg-pure);
  border-color: var(--border-structural);
  box-shadow: var(--shadow-brutal-sm);
  color: var(--accent-terracotta);
}

.nav-item-link.active {
  background: var(--ink-charcoal);
  color: var(--bg-pure);
  border-color: var(--border-structural);
  box-shadow: var(--shadow-brutal-sm);
}

/* Mobile Header Bar (hidden on desktop) */
.mobile-top-bar {
  display: none;
  background: var(--bg-pure);
  border-bottom: 2px solid var(--border-structural);
  padding: 14px 20px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.mobile-brand-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink-charcoal);
  text-decoration: none;
}

.mobile-nav-toggle {
  background: var(--bg-pure);
  border: 2px solid var(--border-structural);
  box-shadow: var(--shadow-brutal-sm);
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-charcoal);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-toggle:active {
  box-shadow: none;
  transform: translate(1px, 1px);
}

/* ==========================================================================
   MAIN CONTENT AREA CANVAS (Column 2)
   ========================================================================== */

.main-content-canvas {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-cream);
}

.site-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 40px 80px 40px;
  box-sizing: border-box;
}

/* ==========================================================================
   PAGE HERO & SECTION ARCHITECTURE
   ========================================================================== */

.page-hero-container {
  background: var(--bg-pure);
  border: 2px solid var(--border-structural);
  box-shadow: var(--shadow-brutal);
  padding: 44px 40px;
  margin-bottom: 48px;
  position: relative;
}

.page-hero-container::after {
  content: "LOI 1901 INSTITUTIONNEL";
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--accent-terracotta);
  color: var(--bg-pure);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border: 1px solid var(--border-structural);
}

.hero-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  background: var(--bg-tint);
  border: 1px solid var(--border-structural);
  padding: 4px 10px;
  margin-bottom: 16px;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink-charcoal);
  margin-bottom: 20px;
}

.homepage-summary-block {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.7;
  color: var(--ink-charcoal);
  border-left: 4px solid var(--accent-terracotta);
  padding-left: 20px;
  margin-bottom: 28px;
  background: var(--bg-tint);
  padding-top: 14px;
  padding-bottom: 14px;
  padding-right: 18px;
  border-top: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
  border-right: 1px solid #E2E8F0;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* Call to Action Button */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  background: var(--accent-terracotta);
  color: var(--bg-pure);
  border: 2px solid var(--border-structural);
  box-shadow: var(--shadow-brutal);
  cursor: pointer;
  min-height: 48px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-cta:hover {
  background: var(--accent-terracotta-hover);
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-brutal-sm);
  color: var(--bg-pure);
}

.btn-cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  background: var(--bg-pure);
  color: var(--ink-charcoal);
  border: 2px solid var(--border-structural);
  box-shadow: var(--shadow-brutal);
  cursor: pointer;
  min-height: 48px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-cta-secondary:hover {
  background: var(--bg-tint);
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-brutal-sm);
}

/* Dedicated Notre Mission Box (Exact 120+ words block) */
.mission-highlight-card {
  background: #FFFBEB;
  border: 2px solid var(--border-structural);
  box-shadow: var(--shadow-brutal);
  padding: 36px 32px;
  margin: 40px 0;
  position: relative;
}

.mission-card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink-charcoal);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mission-card-title::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background: var(--accent-terracotta);
  border: 1px solid var(--border-structural);
}

.mission-paragraph {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #1F2937;
  font-weight: 500;
  text-align: justify;
}

/* Asymmetric Image Showcase */
.hero-image-wrapper {
  margin: 32px 0;
  border: 2px solid var(--border-structural);
  box-shadow: var(--shadow-brutal);
  background: var(--bg-pure);
  overflow: hidden;
}

.hero-image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ==========================================================================
   CONTENT CARD GRIDS & OFFSETS
   ========================================================================== */

.content-section {
  margin-bottom: 56px;
}

.section-header {
  border-bottom: 2px solid var(--border-structural);
  padding-bottom: 16px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink-charcoal);
  letter-spacing: 0.01em;
}

.section-subtitle {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-terracotta);
}

/* 4-Block Grid */
.grid-4-blocks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* 3-Column Grid */
.grid-3-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* 2-Column Grid */
.grid-2-blocks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.editorial-card {
  background: var(--bg-pure);
  border: 2px solid var(--border-structural);
  box-shadow: var(--shadow-brutal);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.card-image-box {
  border: 1px solid var(--border-structural);
  margin-bottom: 18px;
  overflow: hidden;
  background: var(--bg-tint);
}

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

.card-meta {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  margin-bottom: 8px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink-charcoal);
  margin-bottom: 14px;
}

.card-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-muted);
  flex-grow: 1;
  margin-bottom: 18px;
}

/* Editorial Article Layout (1,500+ words pages) */
.editorial-prose-container {
  background: var(--bg-pure);
  border: 2px solid var(--border-structural);
  box-shadow: var(--shadow-brutal);
  padding: 44px 40px;
  margin-bottom: 40px;
}

.editorial-prose-container h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--ink-charcoal);
  margin-top: 36px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border-structural);
  padding-bottom: 8px;
}

.editorial-prose-container h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-terracotta);
  margin-top: 26px;
  margin-bottom: 12px;
}

.editorial-prose-container p {
  font-size: 1.025rem;
  line-height: 1.8;
  color: #334155;
  margin-bottom: 22px;
  text-align: justify;
}

.editorial-prose-container ul, .editorial-prose-container ol {
  margin: 18px 0 24px 24px;
  line-height: 1.75;
}

.editorial-prose-container li {
  margin-bottom: 10px;
  color: #334155;
}

/* Impact Statistics Matrix */
.stats-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 36px 0;
}

.stat-box {
  background: var(--bg-pure);
  border: 2px solid var(--border-structural);
  box-shadow: var(--shadow-brutal);
  padding: 24px 18px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-terracotta);
  line-height: 1.1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-charcoal);
}

/* Funding & Non-Profit Reinvestment Callout */
.reinvestment-banner {
  background: #EFF6FF;
  border: 2px solid var(--border-structural);
  box-shadow: var(--shadow-brutal);
  padding: 28px 24px;
  margin: 36px 0;
}

.reinvestment-banner h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink-charcoal);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.reinvestment-banner p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #1E3A8A;
  font-weight: 600;
}

/* Form Styles for Contact and Membership */
.form-card {
  background: var(--bg-pure);
  border: 2px solid var(--border-structural);
  box-shadow: var(--shadow-brutal);
  padding: 36px 32px;
  margin-top: 32px;
}

.form-group {
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-charcoal);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  background: var(--bg-pure);
  border: 2px solid var(--border-structural);
  color: var(--ink-charcoal);
  box-sizing: border-box;
  box-shadow: var(--shadow-brutal-sm);
  outline: none;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-terracotta);
  box-shadow: var(--shadow-brutal);
}

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

/* ==========================================================================
   UNIVERSAL ARCHITECTURAL MEGA FOOTER
   ========================================================================== */

.mega-footer {
  background: var(--bg-pure);
  border-top: 2px solid var(--border-structural);
  padding: 60px 40px 30px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  box-sizing: border-box;
  width: 100%;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-charcoal);
  border-bottom: 2px solid var(--border-structural);
  padding-bottom: 8px;
}

.footer-col p {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-charcoal);
  text-decoration: none;
  transition: color 0.15s ease;
  line-height: 1.4;
}

.footer-links a:hover {
  color: var(--accent-terracotta);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Bottom Trust Baseline Block */
.footer-bottom-trust {
  grid-column: 1 / -1;
  border-top: 2px solid var(--border-structural);
  padding-top: 28px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trust-entities {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-charcoal);
}

.trust-entities span {
  background: var(--bg-tint);
  border: 1px solid var(--border-structural);
  padding: 4px 10px;
}

.trust-notice {
  font-size: 0.78rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

.trust-notice a {
  color: var(--accent-terracotta);
  font-weight: 700;
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS & MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1024px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .mobile-top-bar {
    display: flex;
  }

  .sidebar-container {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    border-right: none;
    border-bottom: 2px solid var(--border-structural);
    display: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  }

  .sidebar-container.active {
    display: flex;
  }

  .mega-footer {
    grid-template-columns: repeat(2, 1fr);
    padding: 40px 24px 24px 24px;
  }

  .site-main {
    padding: 32px 20px 60px 20px;
  }

  .stats-matrix {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-4-blocks, .grid-3-blocks, .grid-2-blocks {
    grid-template-columns: 1fr;
  }

  .page-hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .page-hero-container {
    padding: 28px 20px;
  }

  .editorial-prose-container {
    padding: 28px 20px;
  }

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

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

@media (max-width: 480px) {
  .page-hero-title {
    font-size: 1.65rem;
  }

  .btn-cta, .btn-cta-secondary {
    width: 100%;
    text-align: center;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }
}
