/* ==========================================================================
   LABO POIETU - FEUILLE DE STYLE MAÎTRESSE
   Architecture Graphique : Neo-Brutalist Editorial Hybrid
   Cadre Institutionnel : Association Loi 1901 - Millésime 2026
   ========================================================================== */

:root {
  --bg-pure: #FFFFFF;
  --bg-editorial: #F5F5F0;
  --bg-card: #FFFFFF;
  --bg-muted: #EBEBE6;
  --ink-primary: #1E293B;
  --ink-secondary: #475569;
  --ink-light: #64748B;
  --accent-earth: #C2410C;
  --accent-ochre: #4D7C0F;
  --accent-light: #FED7AA;
  --accent-forest-light: #D9F99D;
  --border-dark: #1E293B;
  --shadow-hard: 4px 4px 0px #1E293B;
  --shadow-hard-lg: 6px 6px 0px #1E293B;
  --shadow-hard-sm: 2px 2px 0px #1E293B;
  --font-display: "Clash Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, 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-editorial);
  color: var(--ink-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  line-height: 1.65;
  color: var(--ink-primary);
  background-color: var(--bg-editorial);
  word-wrap: break-word;
  overflow-wrap: break-word;
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* ==========================================================================
   CADRE STRUCTUREL MAÎTRE (GRILLE À DEUX COLONNES)
   ========================================================================== */
.site-master-wrapper {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ==========================================================================
   COLONNE 1 : PANNEAU LATÉRAL GAUCHE DE NAVIGATION (SIDEBAR)
   ========================================================================== */
.sidebar-navigation {
  width: var(--sidebar-width);
  background: var(--bg-pure);
  border-right: 2px solid var(--border-dark);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--border-dark) var(--bg-muted);
}

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

.sidebar-brand {
  margin-bottom: 24px;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
  line-height: 1.1;
  text-transform: uppercase;
}

.brand-badge {
  display: inline-block;
  background: var(--ink-primary);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
  border-radius: 2px;
}

/* Sous-carte d'immatriculation administrative */
.metadata-registry-card {
  background: var(--bg-editorial);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-hard-sm);
  padding: 12px 14px;
  margin-bottom: 24px;
  font-size: 0.75rem;
  line-height: 1.45;
}

.registry-item {
  margin-bottom: 6px;
}
.registry-item:last-child {
  margin-bottom: 0;
}
.registry-label {
  font-weight: 800;
  color: var(--ink-secondary);
  display: block;
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}
.registry-value {
  font-weight: 600;
  color: var(--ink-primary);
}
.registry-link {
  color: var(--accent-earth);
  text-decoration: underline;
  font-weight: 700;
}

/* Groupes de navigation */
.nav-category {
  margin-bottom: 22px;
}

.nav-category-title {
  font-size: 0.7rem;
  font-weight: 900;
  color: var(--ink-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: 6px;
  border-bottom: 1px solid #CBD5E1;
  margin-bottom: 8px;
}

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

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

.nav-link:hover, .nav-link:focus {
  background: var(--bg-muted);
  border-color: var(--border-dark);
  box-shadow: var(--shadow-hard-sm);
  outline: none;
}

.nav-link.active {
  background: var(--ink-primary);
  color: #FFFFFF;
  border-color: var(--border-dark);
  box-shadow: var(--shadow-hard-sm);
}

.sidebar-footer-note {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #CBD5E1;
  font-size: 0.72rem;
  color: var(--ink-light);
  line-height: 1.4;
}

/* ==========================================================================
   COLONNE 2 : CANEVAS DE CONTENU PRINCIPAL & FLUX FLEXIBLE
   ========================================================================== */
.main-content-canvas {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  justify-content: space-between;
  background-color: var(--bg-editorial);
  width: 100%;
}

.content-body-wrapper {
  padding: 48px 56px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ==========================================================================
   TYPOGRAPHIE & ÉLÉMENTS ÉDITORIAUX BRUTALISTES
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--ink-primary);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1.editorial-headline {
  font-size: 3.2rem;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 1.05;
}

h2.section-headline {
  font-size: 2.1rem;
  text-transform: uppercase;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-dark);
  position: relative;
}

h2.section-headline::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 60px;
  height: 6px;
  background: var(--accent-earth);
}

h3.card-headline {
  font-size: 1.4rem;
  margin-bottom: 14px;
}

p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-secondary);
  margin-bottom: 20px;
}

p.lead-text {
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--ink-primary);
  margin-bottom: 28px;
}

/* Bloc Résumé Direct 2 phrases */
.direct-summary-box {
  background: var(--bg-pure);
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-hard);
  padding: 24px 28px;
  margin-bottom: 36px;
}

.direct-summary-box p {
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.65;
  margin: 0;
}

/* Bloc d'Exactitude de Mission (120+ mots) */
.mission-callout-block {
  background: #FFF7ED;
  border-left: 6px solid var(--accent-earth);
  border-top: 1px solid var(--border-dark);
  border-right: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
  box-shadow: var(--shadow-hard);
  padding: 30px;
  margin: 36px 0;
}

.mission-callout-block .callout-tag {
  display: inline-block;
  background: var(--accent-earth);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  margin-bottom: 16px;
}

.mission-callout-block p {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--ink-primary);
  margin-bottom: 0;
  font-weight: 500;
}

/* ==========================================================================
   BOUTONS, ÉTIQUETTES & COMPOSANTS D'INTERACTION
   ========================================================================== */
.btn-editorial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-earth);
  color: #FFFFFF;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  text-decoration: none;
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  min-height: 48px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}

.btn-editorial:hover, .btn-editorial:focus {
  background: #9A3412;
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard-lg);
  outline: none;
}

.btn-editorial:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--border-dark);
}

.btn-editorial-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-pure);
  color: var(--ink-primary);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  text-decoration: none;
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-hard);
  cursor: pointer;
  min-height: 48px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
}

.btn-editorial-secondary:hover, .btn-editorial-secondary:focus {
  background: var(--bg-muted);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard-lg);
  outline: none;
}

.btn-editorial-secondary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--border-dark);
}

.editorial-tag {
  display: inline-block;
  background: var(--bg-muted);
  color: var(--ink-primary);
  border: 1px solid var(--border-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
}

/* ==========================================================================
   STRUCTURES EN GRILLES & CARTES OFFSETS
   ========================================================================== */
.editorial-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin: 36px 0;
}

.editorial-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin: 36px 0;
}

.editorial-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 36px 0;
}

.editorial-card {
  background: var(--bg-pure);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-hard);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.editorial-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard-lg);
}

.editorial-card-offset-1 {
  margin-top: 16px;
}
.editorial-card-offset-2 {
  margin-top: -16px;
}

.card-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  margin-bottom: 20px;
  background-color: var(--bg-muted);
}

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

/* Image Héro Grand Format */
.hero-image-display {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-hard-lg);
  overflow: hidden;
  margin-bottom: 36px;
  background: var(--bg-muted);
}

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

/* Matrice Statistique Régionale */
.stat-matrix-wrapper {
  background: var(--ink-primary);
  color: #FFFFFF;
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-hard-lg);
  padding: 40px;
  margin: 48px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.stat-matrix-cell {
  border-left: 3px solid var(--accent-earth);
  padding-left: 20px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #94A3B8;
}

/* Matrice de Financement Public & Sans But Lucratif */
.funding-breakdown-box {
  background: var(--bg-pure);
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-hard);
  padding: 36px;
  margin: 40px 0;
}

.funding-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed #CBD5E1;
  font-size: 1rem;
}
.funding-row:last-child {
  border-bottom: none;
}
.funding-source {
  font-weight: 700;
  color: var(--ink-primary);
}
.funding-desc {
  color: var(--ink-secondary);
  font-size: 0.92rem;
}

/* Tableau Chronologique / Gouvernance / Financier */
.editorial-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 32px 0;
  border: 2px solid var(--border-dark);
  box-shadow: var(--shadow-hard);
}

.editorial-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-pure);
  text-align: left;
  font-size: 0.95rem;
}

.editorial-table th {
  background: var(--ink-primary);
  color: #FFFFFF;
  padding: 14px 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.82rem;
  border-right: 1px solid #334155;
}

.editorial-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #E2E8F0;
  border-right: 1px solid #E2E8F0;
  color: var(--ink-secondary);
  vertical-align: top;
}

.editorial-table tr:nth-child(even) td {
  background: #F8FAFC;
}

.editorial-table tr:hover td {
  background: #F1F5F9;
}

/* Formulaires d'Enquête et de Contact */
.editorial-form-group {
  margin-bottom: 22px;
}

.editorial-label {
  display: block;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  color: var(--ink-primary);
}

.editorial-input, .editorial-textarea, .editorial-select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-dark);
  background: var(--bg-pure);
  color: var(--ink-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 0;
  box-shadow: var(--shadow-hard-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.editorial-input:focus, .editorial-textarea:focus, .editorial-select:focus {
  outline: none;
  border-color: var(--accent-earth);
  box-shadow: var(--shadow-hard);
}

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

/* ==========================================================================
   MEGA FOOTER UNIVERSEL DE L'ASSOCIATION
   ========================================================================== */
.mega-footer {
  background: var(--bg-pure);
  border-top: 2px solid var(--border-dark);
  padding: 60px 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  box-sizing: border-box;
  width: 100%;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
  color: var(--ink-primary);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-earth);
}

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

.footer-link-item a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s ease, padding-left 0.15s ease;
  display: inline-block;
  min-height: 30px;
  line-height: 30px;
}

.footer-link-item a:hover {
  color: var(--accent-earth);
  padding-left: 4px;
}

.footer-ident-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-secondary);
  margin-bottom: 14px;
}

.footer-address-block {
  font-style: normal;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-secondary);
}

.footer-address-block strong {
  color: var(--ink-primary);
}

.footer-address-block a {
  color: var(--accent-earth);
  text-decoration: underline;
}

/* Bloc d'Établissement Légal Inférieur Pleine Largeur */
.footer-bottom-baseline {
  grid-column: 1 / -1;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid #CBD5E1;
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--ink-light);
}

.footer-bottom-baseline a {
  color: var(--ink-primary);
  font-weight: 700;
  text-decoration: underline;
}

.footer-mandatory-statement {
  background: var(--bg-editorial);
  border: 1px solid var(--border-dark);
  padding: 14px 18px;
  margin: 16px 0;
  font-weight: 700;
  color: var(--ink-primary);
  font-size: 0.82rem;
}

/* Mobile Toggle Bar */
.mobile-nav-toggle-bar {
  display: none;
  background: var(--bg-pure);
  border-bottom: 2px solid var(--border-dark);
  padding: 14px 20px;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 150;
  width: 100%;
  box-sizing: border-box;
}

.mobile-toggle-btn {
  background: var(--ink-primary);
  color: #FFFFFF;
  border: 1px solid var(--border-dark);
  padding: 8px 16px;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  box-shadow: var(--shadow-hard-sm);
}

/* ==========================================================================
   MEDIA QUERIES POUR RESPONSIVITÉ TOTALE
   ========================================================================== */

/* Breakpoint 1024px : Tablettes en paysage et petits ordinateurs */
@media (max-width: 1024px) {
  .site-master-wrapper {
    grid-template-columns: 240px 1fr;
  }
  .sidebar-navigation {
    width: 240px;
    padding: 24px 14px;
  }
  .content-body-wrapper {
    padding: 36px 30px;
  }
  .editorial-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .editorial-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .mega-footer {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-matrix-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Breakpoint 768px : Tablettes en portrait et mobiles larges */
@media (max-width: 768px) {
  .mobile-nav-toggle-bar {
    display: flex;
  }
  .site-master-wrapper {
    display: flex;
    flex-direction: column;
  }
  .sidebar-navigation {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 280px;
    height: calc(100vh - 70px);
    transition: left 0.25s ease-in-out;
    box-shadow: var(--shadow-hard-lg);
  }
  .sidebar-navigation.mobile-open {
    left: 0;
  }
  .content-body-wrapper {
    padding: 28px 18px;
  }
  h1.editorial-headline {
    font-size: 2.2rem;
  }
  h2.section-headline {
    font-size: 1.6rem;
  }
  .editorial-grid-2,
  .editorial-grid-3,
  .editorial-grid-4 {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .editorial-card-offset-1,
  .editorial-card-offset-2 {
    margin-top: 0;
  }
  .mega-footer {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }
  .stat-matrix-wrapper {
    grid-template-columns: 1fr;
    padding: 24px;
  }
}

/* Breakpoint 480px : Mobiles étroits */
@media (max-width: 480px) {
  .content-body-wrapper {
    padding: 20px 14px;
  }
  h1.editorial-headline {
    font-size: 1.8rem;
  }
  .btn-editorial, .btn-editorial-secondary {
    width: 100%;
    padding: 12px 16px;
  }
  .direct-summary-box {
    padding: 18px 16px;
  }
  .mission-callout-block {
    padding: 20px 16px;
  }
}
