/* ==========================================================================
   GONDWANA - ASSOCIATION LOI 1901
   FEUILLE DE STYLE INSTITUTIONNELLE NEO-BRUTALISTE EDITORIALE
   Exercice Opérationnel 2026 | Toulouse (31200)
   ========================================================================== */

:root {
  --bg-cream: #F5F5F0;
  --bg-white: #FFFFFF;
  --charcoal: #1E293B;
  --charcoal-light: #334155;
  --charcoal-muted: #64748B;
  --terracotta: #C2410C;
  --terracotta-dark: #9A3412;
  --terracotta-light: #FFEDD5;
  --ochre: #4D7C0F;
  --ochre-light: #ECFDF5;
  --sand: #E2E8F0;
  --border-width: 1px;
  --border-thick: 2px;
  --border-solid: 1px solid var(--charcoal);
  --border-solid-thick: 2px solid var(--charcoal);
  --shadow-sm: 2px 2px 0px var(--charcoal);
  --shadow-base: 4px 4px 0px var(--charcoal);
  --shadow-lg: 8px 8px 0px var(--charcoal);
  --radius-sm: 4px;
  --radius-md: 8px;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font-display: Georgia, Cambria, "Times New Roman", Times, serif;
}

/* Box sizing and resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  background-color: var(--bg-cream);
  color: var(--charcoal);
  padding-top: 130px; /* Clearance for fixed header */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

/* Typography Rules */
h1, h2, h3, h4, h5, h6 {
  color: var(--charcoal);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.35rem);
  border-bottom: var(--border-solid-thick);
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  margin-top: 1.5rem;
}

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

a {
  color: var(--charcoal);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

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

/* Institutional Tag / Badge */
.inst-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--bg-white);
  border: var(--border-solid);
  box-shadow: var(--shadow-sm);
  color: var(--charcoal);
  margin-bottom: 1rem;
  white-space: nowrap;
}

.inst-badge.terracotta {
  background-color: var(--terracotta-light);
  color: var(--terracotta-dark);
}

.inst-badge.ochre {
  background-color: var(--ochre-light);
  color: var(--ochre);
}

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

.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
  border-bottom: var(--border-solid);
}

.section.bg-white {
  background-color: var(--bg-white);
}

.section.bg-cream {
  background-color: var(--bg-cream);
}

/* ==========================================================================
   HEADER COMPONENTS
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background-color: var(--bg-white);
  border-bottom: var(--border-solid-thick);
}

/* Top Utility Strip */
.top-utility-strip {
  background-color: var(--charcoal);
  color: #F8FAFC;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.4rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-utility-strip a {
  color: #CBD5E1;
  text-decoration: none;
}

.top-utility-strip a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.utility-details {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* Main Nav Bar */
.main-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background-color: var(--bg-white);
}

.brand-logo {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo .brand-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  background-color: var(--terracotta);
  color: #FFFFFF;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--charcoal);
}

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

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--charcoal);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link:focus, .nav-link.active {
  border-bottom: 2px solid var(--terracotta);
  color: var(--terracotta);
}

/* Contact CTA Button */
.btn-neutral-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background-color: var(--terracotta);
  color: #FFFFFF;
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.btn-neutral-cta:hover {
  background-color: var(--terracotta-dark);
  color: #FFFFFF;
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-base);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background-color: var(--bg-white);
  color: var(--charcoal);
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-secondary:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-base);
  color: var(--charcoal);
}

/* Mega Menu Dropdown */
.mega-dropdown {
  position: absolute;
  top: 100%;
  left: -150px;
  width: 780px;
  background-color: var(--bg-white);
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  display: none;
  z-index: 10001;
  text-align: left;
}

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

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

.mega-col-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--charcoal-muted);
  border-bottom: 1px dashed var(--charcoal-muted);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.mega-links {
  list-style: none;
}

.mega-links li {
  margin-bottom: 0.6rem;
}

.mega-links a {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--charcoal);
  padding: 0.35rem 0.4rem;
  border: 1px solid transparent;
}

.mega-links a:hover {
  background-color: var(--bg-cream);
  border-color: var(--charcoal);
  color: var(--terracotta);
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: var(--border-solid);
  padding: 0.5rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  font-weight: 800;
  font-family: var(--font-mono);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   NEO-BRUTALIST CARDS & COMPONENTS
   ========================================================================== */
.neo-card {
  background-color: var(--bg-white);
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-base);
  padding: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.neo-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-lg);
}

.neo-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: var(--border-solid);
  margin-bottom: 1.25rem;
  display: block;
}

.neo-card-header {
  margin-bottom: 1rem;
}

.neo-card-body {
  flex-grow: 1;
}

.neo-card-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--charcoal-muted);
}

/* Non-profit banner notice */
.non-profit-notice {
  background-color: #FEF3C7;
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: #78350F;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.non-profit-notice strong {
  color: #92400E;
}

/* Two-sentence summary box */
.hero-summary-box {
  background-color: var(--bg-white);
  border-left: 6px solid var(--terracotta);
  border-top: var(--border-solid);
  border-right: var(--border-solid);
  border-bottom: var(--border-solid);
  box-shadow: var(--shadow-base);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem 0;
  font-size: 1.12rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--charcoal);
}

/* Asymmetric Hero layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2rem 0;
}

.hero-image-wrap {
  position: relative;
}

.hero-image-wrap img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-lg);
  display: block;
}

.hero-stats-badge {
  position: absolute;
  bottom: -20px;
  right: -15px;
  background-color: var(--terracotta);
  color: #FFFFFF;
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-base);
  padding: 1rem 1.5rem;
  font-family: var(--font-mono);
  font-weight: 800;
}

/* Grid Layouts */
.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;
}

/* Matrix Table */
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-white);
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-base);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.matrix-table th, .matrix-table td {
  border: var(--border-solid);
  padding: 1rem;
  text-align: left;
}

.matrix-table th {
  background-color: var(--charcoal);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.matrix-table tr:nth-child(even) {
  background-color: var(--bg-cream);
}

/* Form Styling */
.neo-form {
  background-color: var(--bg-white);
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-base);
  padding: 2rem;
}

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

.form-label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--charcoal);
  background-color: var(--bg-cream);
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: all 0.2s ease;
}

.form-control:focus {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-base);
  border-color: var(--terracotta);
}

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

/* Timeline Components */
.timeline {
  position: relative;
  border-left: var(--border-solid-thick);
  padding-left: 2rem;
  margin-left: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-marker {
  position: absolute;
  left: calc(-2rem - 9px);
  top: 0;
  width: 16px;
  height: 16px;
  background-color: var(--terracotta);
  border: var(--border-solid-thick);
}

.timeline-year {
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--terracotta);
  margin-bottom: 0.35rem;
}

/* Page Header Banner */
.page-header-banner {
  background-color: var(--bg-white);
  border-bottom: var(--border-solid-thick);
  padding: 3rem 0;
  margin-bottom: 2rem;
}

.banner-img-wrap {
  margin-top: 2rem;
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-base);
  overflow: hidden;
}

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

/* Callout Box */
.callout-box {
  background-color: var(--bg-white);
  border: var(--border-solid-thick);
  box-shadow: var(--shadow-base);
  padding: 1.75rem;
  margin: 2rem 0;
}

.callout-box.terracotta-border {
  border-left: 8px solid var(--terracotta);
}

.callout-box.ochre-border {
  border-left: 8px solid var(--ochre);
}

/* ==========================================================================
   MEGA FOOTER COMPONENT
   ========================================================================== */
.site-footer {
  background-color: var(--charcoal);
  color: #F1F5F9;
  border-top: 4px solid var(--terracotta);
  padding-top: 4rem;
  padding-bottom: 2rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: #E2E8F0;
  text-decoration: none;
}

.site-footer a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 800;
  border-bottom: 1px solid var(--charcoal-muted);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}

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

.footer-nav {
  list-style: none;
}

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

.footer-nav a {
  display: inline-block;
  min-height: 32px;
  line-height: 32px;
}

.footer-contact-info {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #CBD5E1;
  line-height: 1.8;
}

.footer-contact-info a {
  color: #38BDF8;
}

/* Bottom Legal Trust Baseline */
.footer-bottom-baseline {
  border-top: 1px solid var(--charcoal-light);
  padding-top: 2rem;
  font-size: 0.82rem;
  color: #94A3B8;
  line-height: 1.7;
}

.footer-legal-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-legal-notice {
  max-width: 800px;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-legal-links a {
  color: #CBD5E1;
  font-weight: 700;
}

.footer-legal-links a:hover {
  color: #FFFFFF;
}

.footer-transparency-box {
  background-color: var(--charcoal-light);
  border: 1px solid #475569;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #E2E8F0;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS & MOBILE RESETS
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mega-dropdown {
    width: 600px;
    left: -100px;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 110px;
  }
  
  .grid-2, .grid-3, .grid-4, .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .top-utility-strip {
    display: none; /* Hide on smallest mobile to prevent overlap */
  }
  
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-white);
    border-top: var(--border-solid-thick);
    border-bottom: var(--border-solid-thick);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-links.mobile-open {
    display: flex;
  }
  
  .nav-item.has-mega .mega-dropdown {
    position: static;
    display: block;
    width: 100%;
    box-shadow: none;
    border: 1px dashed var(--charcoal);
    padding: 1rem;
    margin-top: 0.5rem;
  }
  
  .mega-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Mobile Reset Rule from specification */
  .neo-card:hover, .btn-neutral-cta:hover, .btn-secondary:hover {
    transform: none !important;
    margin: 0 !important;
    box-shadow: 2px 2px 0px var(--charcoal) !important;
  }
  
  .hero-stats-badge {
    position: static;
    margin-top: 1rem;
  }
}
