/* ==========================================================================
   ASSOCIATION IKONOTEKA - FEUILLE DE STYLE OFFICIELLE (LOI 1901)
   Architecture : Néo-Brutalisme Éditorial & Rigueur Institutionnelle
   Palette : Pure White (#FFFFFF), Editorial Cream (#F5F5F0), Charcoal Slate (#1E293B),
             Deep Terracotta (#C2410C), Forest Ochre (#4D7C0F)
   Année Opérationnelle : 2026
   ========================================================================== */

:root {
  --color-white: #FFFFFF;
  --color-cream: #F5F5F0;
  --color-cream-light: #FAFAF7;
  --color-slate-dark: #1E293B;
  --color-slate-medium: #334155;
  --color-slate-muted: #64748B;
  --color-border: #1E293B;
  --color-border-subtle: #CBD5E1;
  --color-terracotta: #C2410C;
  --color-terracotta-dark: #9A3412;
  --color-ochre: #4D7C0F;
  --color-ochre-dark: #3F6212;
  
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  
  --shadow-hard: 4px 4px 0px var(--color-slate-dark);
  --shadow-hard-sm: 2px 2px 0px var(--color-slate-dark);
  --shadow-hard-lg: 6px 6px 0px var(--color-slate-dark);
  --transition-speed: 0.15s ease-in-out;
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--color-cream);
  color: var(--color-slate-dark);
  line-height: 1.65;
  padding-top: 130px; /* Layout clearance for sticky header */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   EN-TÊTE FIXE & NAVIGATION (HEADER & MEGA MENU)
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background-color: var(--color-white);
  border-bottom: 2px solid var(--color-border);
}

/* Bandeau Supérieur d'Utilité Publique */
.utility-strip {
  background-color: var(--color-slate-dark);
  color: var(--color-white);
  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.15);
  letter-spacing: 0.02em;
}

.utility-strip-left {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.utility-badge {
  background-color: var(--color-terracotta);
  color: var(--color-white);
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.utility-strip-right a {
  color: var(--color-cream);
  text-decoration: none;
  border-bottom: 1px dotted var(--color-cream);
  transition: color var(--transition-speed);
}

.utility-strip-right a:hover {
  color: #FDBA74;
}

/* Barre de Navigation Principale */
.main-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 72px;
  background-color: var(--color-white);
}

.brand-identity {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-slate-dark);
}

.brand-title {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.1;
}

.brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--color-slate-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 4px;
  align-items: center;
  height: 100%;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--color-slate-dark);
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  min-height: 44px;
  border: 1px solid transparent;
  transition: all var(--transition-speed);
}

.nav-link:hover,
.nav-link:focus {
  background-color: var(--color-cream);
  border-color: var(--color-border);
  color: var(--color-terracotta);
}

.nav-link-cta {
  background-color: var(--color-terracotta);
  color: var(--color-white) !important;
  border: 1px solid var(--color-border) !important;
  box-shadow: var(--shadow-hard-sm);
  margin-left: 10px;
}

.nav-link-cta:hover {
  background-color: var(--color-terracotta-dark) !important;
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard);
}

/* Mega Menu Dropdown */
.mega-dropdown-trigger:hover .mega-menu {
  display: grid;
  opacity: 1;
  visibility: visible;
}

.mega-menu {
  display: none;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 100%;
  left: -200px;
  width: 780px;
  background-color: var(--color-white);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-hard-lg);
  grid-template-columns: repeat(3, 1fr);
  padding: 24px;
  gap: 20px;
  transition: opacity 0.2s ease;
  z-index: 10010;
}

.mega-col {
  display: flex;
  flex-direction: column;
}

.mega-col-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-terracotta);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 12px;
}

.mega-link {
  display: block;
  padding: 8px 10px;
  color: var(--color-slate-dark);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  margin-bottom: 4px;
  transition: all var(--transition-speed);
}

.mega-link:hover {
  background-color: var(--color-cream);
  border-color: var(--color-border);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard-sm);
  color: var(--color-terracotta);
}

.mega-desc {
  display: block;
  font-size: 0.72rem;
  color: var(--color-slate-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: var(--color-white);
  border: 2px solid var(--color-border);
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

/* ==========================================================================
   TYPOGRAPHIE & STRUCTURES ÉDITORIALES
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-slate-dark);
  line-height: 1.2;
  font-weight: 800;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 75ch;
}

.lead-text {
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--color-slate-medium);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 64px 0;
  border-bottom: 2px solid var(--color-border);
}

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

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

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

.section-slate h1,
.section-slate h2,
.section-slate h3,
.section-slate p {
  color: var(--color-white);
}

/* Badges & Tags */
.tag {
  display: inline-block;
  background-color: var(--color-white);
  color: var(--color-slate-dark);
  border: 1px solid var(--color-border);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  box-shadow: var(--shadow-hard-sm);
}

.tag-terracotta {
  background-color: var(--color-terracotta);
  color: var(--color-white);
}

.tag-ochre {
  background-color: var(--color-ochre);
  color: var(--color-white);
}

/* Boutons Néo-Brutalistes Non Commerciaux */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px; /* 2x horizontal padding rule */
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid var(--color-border);
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  transition: all var(--transition-speed);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-terracotta);
  color: var(--color-white);
  box-shadow: var(--shadow-hard);
}

.btn-primary:hover {
  background-color: var(--color-terracotta-dark);
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard-lg);
}

.btn-secondary {
  background-color: var(--color-white);
  color: var(--color-slate-dark);
  box-shadow: var(--shadow-hard);
}

.btn-secondary:hover {
  background-color: var(--color-cream);
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard-lg);
}

.btn-ochre {
  background-color: var(--color-ochre);
  color: var(--color-white);
  box-shadow: var(--shadow-hard);
}

.btn-ochre:hover {
  background-color: var(--color-ochre-dark);
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard-lg);
}

/* ==========================================================================
   COMPOSANTS SPÉCIFIQUES : CARTES, GRILLES & TABLEAUX
   ========================================================================== */

/* Cartes Néo-Brutalistes */
.card {
  background-color: var(--color-white);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-hard);
  padding: 28px;
  transition: all var(--transition-speed);
  display: flex;
  flex-direction: column;
}

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

.card-img-wrapper {
  margin: -28px -28px 20px -28px;
  border-bottom: 2px solid var(--color-border);
  overflow: hidden;
  position: relative;
}

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

.card:hover .card-img-wrapper img {
  transform: scale(1.03);
}

/* Grilles Responsive */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

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

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

/* Hero Section Spécifique */
.hero-wrapper {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-summary-box {
  background-color: var(--color-white);
  border: 2px solid var(--color-border);
  border-left: 6px solid var(--color-terracotta);
  padding: 18px 22px;
  margin: 20px 0 28px 0;
  box-shadow: var(--shadow-hard-sm);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-img-box {
  position: relative;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-hard-lg);
  background-color: var(--color-white);
}

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

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Encadré Institutionnel / Reinvestissement Clause */
.institutional-banner {
  background-color: #FEF3C7;
  border: 2px solid var(--color-border);
  padding: 20px 28px;
  margin: 36px 0;
  box-shadow: var(--shadow-hard);
}

.institutional-banner p {
  margin: 0;
  font-weight: 600;
  color: #78350F;
  font-size: 0.98rem;
}

/* Matrice Statistique Régionale */
.stat-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid var(--color-border);
  background-color: var(--color-white);
  box-shadow: var(--shadow-hard);
  margin: 32px 0;
}

.stat-cell {
  padding: 28px 20px;
  border-right: 2px solid var(--color-border);
  text-align: center;
}

.stat-cell:last-child {
  border-right: none;
}

.stat-number {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 900;
  color: var(--color-terracotta);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-slate-medium);
}

/* Tableaux Institutionnels */
.data-table-wrapper {
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-hard);
  background-color: var(--color-white);
  overflow-x: auto;
  margin: 28px 0;
}

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

.data-table th {
  background-color: var(--color-slate-dark);
  color: var(--color-white);
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--color-border);
}

.data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.data-table tr:hover {
  background-color: var(--color-cream);
}

/* Formulaires de Contact & Adhésion */
.form-card {
  background-color: var(--color-white);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-hard);
  padding: 36px;
  margin: 28px 0;
}

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

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  color: var(--color-slate-dark);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 2px solid var(--color-border);
  background-color: var(--color-cream-light);
  color: var(--color-slate-dark);
  min-height: 48px;
}

.form-control:focus {
  outline: none;
  background-color: var(--color-white);
  border-color: var(--color-terracotta);
  box-shadow: 2px 2px 0px var(--color-terracotta);
}

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

/* Bannières En-tête des Pages */
.page-hero-banner {
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-hard-lg);
  margin-bottom: 48px;
  position: relative;
  background-color: var(--color-slate-dark);
  overflow: hidden;
}

.page-hero-banner img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
  opacity: 0.88;
}

.page-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(30, 41, 59, 0.95), rgba(30, 41, 59, 0.2));
  padding: 36px 32px 28px 32px;
  color: var(--color-white);
}

.page-hero-overlay h1 {
  color: var(--color-white);
  margin-bottom: 6px;
}

.page-hero-overlay p {
  color: var(--color-cream);
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* ==========================================================================
   PIED DE PAGE OFFICIEL & MENTIONS LÉGALES (FOOTER)
   ========================================================================== */

.site-footer {
  background-color: var(--color-slate-dark);
  color: var(--color-white);
  border-top: 3px solid var(--color-border);
  padding: 64px 0 32px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  margin-bottom: 48px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FDBA74;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 8px;
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--color-cream);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color var(--transition-speed);
  display: inline-block;
  min-height: 32px;
  line-height: 32px;
}

.footer-links a:hover {
  color: #FDBA74;
  text-decoration: underline;
}

.footer-desc {
  font-size: 0.9rem;
  color: #CBD5E1;
  line-height: 1.6;
  margin-bottom: 14px;
}

/* Ligne Juridique Inférieure */
.footer-bottom-baseline {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 28px;
  font-size: 0.82rem;
  color: #94A3B8;
  line-height: 1.6;
}

.footer-legal-notice {
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-bottom-links a {
  color: #FDBA74;
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid #FDBA74;
}

.footer-bottom-links a:hover {
  color: var(--color-white);
  border-color: var(--color-white);
}

/* ==========================================================================
   ADAPTATIVITÉ MOBILE & BREAKPOINTS
   ========================================================================== */

@media (max-width: 992px) {
  body {
    padding-top: 110px;
  }

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

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

  .stat-cell:nth-child(2) {
    border-right: none;
  }

  .stat-cell:nth-child(1),
  .stat-cell:nth-child(2) {
    border-bottom: 2px solid var(--color-border);
  }

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

  .hero-wrapper {
    grid-template-columns: 1fr;
  }

  .mega-menu {
    width: 650px;
    left: -150px;
  }
}

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

  /* Reset Néo-Brutaliste Mobile */
  .card, .btn, .stat-matrix, .hero-img-box, .data-table-wrapper, .form-card {
    transform: none !important;
    box-shadow: 2px 2px 0px var(--color-border) !important;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr !important;
  }

  .stat-matrix {
    grid-template-columns: 1fr !important;
  }

  .stat-cell {
    border-right: none !important;
    border-bottom: 2px solid var(--color-border);
  }

  .stat-cell:last-child {
    border-bottom: none;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
  }

  /* Menu Mobile Déroulant */
  .mobile-nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    border-bottom: 2px solid var(--color-border);
    flex-direction: column;
    height: auto;
    padding: 16px 20px;
    box-shadow: var(--shadow-hard-lg);
  }

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

  .nav-item {
    width: 100%;
    height: auto;
  }

  .nav-link {
    width: 100%;
    padding: 12px;
    border-bottom: 1px solid var(--color-border-subtle);
  }

  .mega-menu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    width: 100%;
    grid-template-columns: 1fr;
    border: 1px solid var(--color-border);
    box-shadow: none;
    padding: 12px;
  }

  .mega-dropdown-trigger.open .mega-menu {
    display: grid;
  }

  .utility-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 16px;
  }
}
