/* ==========================================================================
   CLUB OMNISPORT DE VARS - FEUILLE DE STYLE INSTITUTIONNELLE (LOI 1901)
   Couleurs statutaires : #0F172A, #1E293B, #059669, #F8FAFC, #F59E0B, #0D9488
   Accessibilité WCAG AA, Grilles fluides & Flexbox pur
   ========================================================================== */

:root {
  --color-header-bg: #0F172A;
  --color-header-text: #E2E8F0;
  --color-accent-emerald: #059669;
  --color-accent-hover: #047857;
  --color-hero-bg: #1E293B;
  --color-hero-heading: #FFFFFF;
  --color-hero-sub: #F59E0B;
  --color-body-bg: #F8FAFC;
  --color-card-bg: #FFFFFF;
  --color-border: #E2E8F0;
  --color-text-main: #334155;
  --color-text-muted: #64748B;
  --color-footer-bg: #0F172A;
  --color-footer-text: #94A3B8;
  --color-footer-link: #0D9488;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-body-bg);
  color: var(--color-text-main);
  line-height: 1.65;
  padding-top: 130px; /* Offset obligatoire pour sticky header */
  -webkit-font-smoothing: antialiased;
}

/* Typographie */
h1, h2, h3, h4, h5, h6 {
  color: #0F172A;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; margin-top: 2rem; border-bottom: 2px solid var(--color-border); padding-bottom: 0.5rem; }
h3 { font-size: 1.35rem; margin-top: 1.5rem; }
h4 { font-size: 1.15rem; margin-top: 1rem; }

p {
  margin-bottom: 1.25rem;
  font-size: 1.025rem;
}

a {
  color: var(--color-accent-emerald);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

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

li {
  margin-bottom: 0.5rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   HEADER & NAVIGATION SYSTÈME
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background: var(--color-header-bg);
  box-shadow: var(--shadow-md);
}

/* Rangée 1 : Barre utilitaire */
.utility-bar {
  height: 38px;
  background: #0F172A;
  border-bottom: 1px solid rgba(226, 232, 240, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-header-text);
}

.utility-bar-left {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.utility-badge {
  color: #94A3B8;
}

.utility-badge strong {
  color: #FFFFFF;
}

.utility-bar-right a {
  color: var(--color-header-text);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 0.5rem;
}

.utility-bar-right a:hover {
  color: #34D399;
  text-decoration: none;
}

/* Rangée 2 : En-tête principal & Navigation */
.main-nav-bar {
  background: #0F172A;
  border-bottom: 3px solid var(--color-accent-emerald);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 92px;
}

.brand-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 44px;
}

.brand-emblem {
  background: var(--color-accent-emerald);
  color: #FFFFFF;
  font-weight: 900;
  font-size: 1.25rem;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
}

.brand-text h1.brand-title {
  font-size: 1.15rem;
  color: #FFFFFF;
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Menu de navigation & Dropdowns */
.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 0.5rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  color: var(--color-header-text);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0 0.85rem;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.nav-link:hover, .nav-item:hover > .nav-link {
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  text-decoration: none;
}

.dropdown-caret {
  font-size: 0.65rem;
  margin-left: 0.4rem;
  color: var(--color-accent-emerald);
}

/* Menus déroulants */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #0F172A;
  border: 1px solid rgba(226, 232, 240, 0.15);
  border-top: 2px solid var(--color-accent-emerald);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  min-width: 270px;
  box-shadow: var(--shadow-lg);
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  display: none;
  z-index: 10001;
}

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

.dropdown-menu li {
  margin: 0;
  padding: 0;
}

.dropdown-menu a {
  color: #CBD5E1;
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 44px;
  line-height: 1.4;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dropdown-menu a:hover {
  background: rgba(5, 150, 105, 0.15);
  color: #34D399;
  text-decoration: none;
  padding-left: 1.45rem;
}

/* Bouton CTA en-tête */
.header-cta-btn {
  background: var(--color-accent-emerald);
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0 1.25rem;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.header-cta-btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.4);
}

/* Menu Burger Mobile (Toggle) */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 1.5rem;
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   PAGE HERO & BANNIÈRES INSTITUTIONNELLES
   ========================================================================== */

.institutional-hero {
  position: relative;
  min-height: 420px;
  width: 100%;
  display: flex;
  align-items: center;
  background-color: var(--color-hero-bg);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  color: #FFFFFF;
}

.hero-overlay-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.82);
  z-index: 1;
}

.hero-content-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}

.hero-tag {
  display: inline-block;
  background: rgba(5, 150, 105, 0.25);
  border: 1px solid var(--color-accent-emerald);
  color: #6EE7B7;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.hero-content-wrapper h1 {
  color: var(--color-hero-heading);
  font-size: 2.5rem;
  line-height: 1.25;
  margin-bottom: 1rem;
  max-width: 950px;
}

.hero-summary-2sentences {
  font-size: 1.15rem;
  color: var(--color-header-text);
  line-height: 1.7;
  max-width: 900px;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--color-hero-sub);
  padding-left: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ==========================================================================
   LAYOUT PRINCIPAL & CONTENEURS
   ========================================================================== */

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.content-grid-sidebar {
  display: grid;
  grid-template-columns: 2.6fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.content-full-width {
  width: 100%;
}

.main-content-column {
  min-width: 0;
}

/* Cartes & Modules élevés */
.institutional-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.institutional-card:hover {
  box-shadow: var(--shadow-md);
}

/* Encadré Déclaration de Mission Institutionnelle (150+ mots ininterrompus) */
.mission-statement-box {
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-left: 5px solid var(--color-accent-emerald);
  border-radius: var(--radius-md);
  padding: 2rem;
  margin: 2.5rem 0;
}

.mission-statement-title {
  font-size: 1.2rem;
  color: #0F172A;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.mission-statement-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #1E293B;
  margin-bottom: 0;
  font-style: italic;
}

/* Mention obligatoire adhésion */
.mandatory-membership-callout {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin: 1.75rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Tableau de bord Métrique (KPIs) */
.metric-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}

.metric-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-accent-emerald);
  border-radius: var(--radius-sm);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.metric-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1;
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
}

.metric-label {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Grille 4 activités vedettes (Index) */
.featured-activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 25px;
  margin: 2.5rem 0;
}

.activity-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.activity-card-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: #1E293B;
}

.activity-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.activity-card-body h3 {
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 0.85rem;
  color: #0F172A;
}

.activity-card-body p {
  font-size: 0.94rem;
  color: var(--color-text-main);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

/* Boutons & Liens d'Action Neutres */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.65rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--color-accent-emerald);
  color: #FFFFFF !important;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #FFFFFF !important;
}

.btn-secondary {
  background: #1E293B;
  color: #FFFFFF !important;
  border: 1px solid #334155;
}

.btn-secondary:hover {
  background: #0F172A;
}

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

.btn-outline:hover {
  background: rgba(5, 150, 105, 0.1);
}

/* Blocs d'Images Contextuelles en-page */
.in-page-media-block {
  margin: 2.5rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.in-page-media-block img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
}

.gallery-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2.5rem 0;
}

.gallery-3col img {
  border-radius: var(--radius-sm);
  height: 220px;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--color-border);
}

/* Barre Latérale (Sidebar) */
.sidebar-sticky-panel {
  position: sticky;
  top: 150px;
}

.sidebar-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-size: 1.15rem;
  margin-top: 0;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.sidebar-link-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
}

.sidebar-link-list li {
  margin-bottom: 0.5rem;
}

.sidebar-link-list a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--color-text-main);
  font-size: 0.92rem;
  font-weight: 500;
}

.sidebar-link-list a:hover {
  background: #F1F5F9;
  color: var(--color-accent-emerald);
  text-decoration: none;
}

/* Tableaux Institutionnels (Budgets, Horaires, Registres) */
.table-responsive-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: #FFFFFF;
}

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

.institutional-table th {
  background: #F1F5F9;
  color: #0F172A;
  padding: 1rem 1.25rem;
  font-weight: 700;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.institutional-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-main);
}

.institutional-table tr:hover td {
  background: #F8FAFC;
}

/* Formulaires de Contact & Bénévolat */
.institutional-form {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.92rem;
  color: #0F172A;
  margin-bottom: 0.5rem;
}

.form-control {
  min-height: 44px;
  padding: 0.65rem 1rem;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text-main);
  background: #F8FAFC;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent-emerald);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

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

/* ==========================================================================
   MANDATORY INSTITUTIONAL FOOTER MATRIX
   ========================================================================== */

.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  border-top: 4px solid var(--color-accent-emerald);
  padding: 60px 20px 30px 20px;
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.footer-col p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--color-footer-text);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-links a {
  color: var(--color-footer-text);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--color-footer-link);
  text-decoration: none;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.88rem;
}

.footer-base-compliance {
  max-width: 1200px;
  margin: 40px auto 0 auto;
  padding-top: 25px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #64748B;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (Mobile-First / Adaptative)
   ========================================================================== */

@media (max-width: 992px) {
  .utility-bar {
    padding: 0 1rem;
    font-size: 12px;
  }
  .utility-bar-left {
    gap: 0.75rem;
  }
  .content-grid-sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar-sticky-panel {
    position: static;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
  .metric-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-3col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 140px;
  }
  .utility-bar {
    flex-direction: column;
    height: auto;
    padding: 0.4rem 1rem;
    gap: 0.25rem;
    text-align: center;
  }
  .utility-bar-left {
    flex-wrap: wrap;
    justify-content: center;
  }
  .main-nav-bar {
    height: 74px;
    padding: 0 1rem;
  }
  .brand-title {
    font-size: 1rem !important;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0F172A;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .nav-menu.is-active {
    display: flex;
  }
  .nav-link {
    width: 100%;
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .dropdown-menu {
    position: static;
    display: block;
    background: #1E293B;
    border: none;
    box-shadow: none;
    padding-left: 1rem;
  }
  .header-cta-btn {
    display: none;
  }
  .hero-content-wrapper h1 {
    font-size: 1.85rem;
  }
  .hero-summary-2sentences {
    font-size: 1rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .metric-dashboard-grid {
    grid-template-columns: 1fr;
  }
  .gallery-3col {
    grid-template-columns: 1fr;
  }
}
