/* ==========================================================================
   LA 7PEL COMPAGNIE - INSTITUTIONAL NON-PROFIT STYLESHEET
   Statutory Non-Profit & Non-Commercial Compliance (Association loi 1901)
   RNA: W192001548 | SIREN: 519188353 | Headquarters: 83 Rue de la Barrière, 19000 Tulle
   ========================================================================== */

:root {
  --brand-purple: #4F2683;
  --brand-purple-hover: #3E1D68;
  --footer-navy: #3A1B63;
  --text-charcoal: #1E1E24;
  --body-grey: #475569;
  --bg-offwhite: #F4F5F7;
  --card-white: #FFFFFF;
  --border-slate: #E2E8F0;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 30px rgba(79, 38, 131, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--body-grey);
  background-color: var(--bg-offwhite);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Typography Standards */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--text-charcoal);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.75rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.15rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
}

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

a {
  color: var(--brand-purple);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--footer-navy);
}

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

.container-narrow {
  max-width: 900px;
}

/* Sticky Header (Exact 80px) */
.site-header {
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-slate);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.shield-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  color: var(--brand-purple);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-purple);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.brand-subtext {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--body-grey);
  text-transform: uppercase;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-charcoal);
  padding: 8px 4px;
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-purple);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--brand-purple);
  border-radius: 2px;
}

/* Dropdown Menu styling */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #FFFFFF;
  min-width: 220px;
  border: 1px solid var(--border-slate);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  display: none;
  z-index: 1001;
}

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

.dropdown-item {
  display: block;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-charcoal);
  transition: background 0.15s ease, color 0.15s ease;
}

.dropdown-item:hover {
  background-color: var(--bg-offwhite);
  color: var(--brand-purple);
}

.header-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-purple);
  color: #FFFFFF;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
  min-height: 44px;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}

.header-cta-btn:hover {
  background: var(--brand-purple-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-charcoal);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
}

/* Dual CTA Rules */
.cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-purple);
  color: #FFFFFF !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  min-height: 44px;
  min-width: 140px;
  transition: all 0.2s ease;
  border: 2px solid var(--brand-purple);
  cursor: pointer;
}

.btn-primary:hover {
  background-color: var(--brand-purple-hover);
  border-color: var(--brand-purple-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(79, 38, 131, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--brand-purple) !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  min-height: 44px;
  min-width: 140px;
  transition: all 0.2s ease;
  border: 2px solid var(--brand-purple);
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: rgba(79, 38, 131, 0.06);
  color: var(--footer-navy) !important;
  transform: translateY(-2px);
}

.btn-card-learn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-purple);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 0;
  transition: gap 0.2s ease;
}

.btn-card-learn:hover {
  color: var(--footer-navy);
  gap: 10px;
}

/* Donit Frame & Figcaption Styling */
.donit-frame {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin: 20px 0 8px 0;
  object-fit: cover;
  display: block;
}

.donit-figure {
  margin: 24px 0 16px 0;
}

.donit-caption {
  font-size: 0.875rem;
  color: #64748B;
  margin-bottom: 20px;
  font-style: italic;
  line-height: 1.5;
  display: block;
}

/* Hero Section */
.hero-banner {
  position: relative;
  min-height: 520px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 10, 35, 0.75) 0%, rgba(58, 27, 99, 0.55) 100%);
}

.hero-content-box {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  padding: 42px 48px;
  border-radius: var(--radius-lg);
  max-width: 680px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-purple);
  margin-bottom: 12px;
}

.hero-title {
  font-size: 2.5rem;
  color: var(--text-charcoal);
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero-summary {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-charcoal);
  font-weight: 500;
  margin-bottom: 8px;
}

/* Internal Page Hero */
.page-hero {
  background: linear-gradient(135deg, var(--footer-navy) 0%, var(--brand-purple) 100%);
  color: #FFFFFF;
  padding: 65px 0 55px 0;
  position: relative;
  border-bottom: 1px solid var(--border-slate);
}

.page-hero h1 {
  color: #FFFFFF;
  margin-bottom: 16px;
}

.page-hero p.lead {
  font-size: 1.2rem;
  color: #E2E8F0;
  max-width: 820px;
  line-height: 1.7;
}

.page-hero .statutory-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* Statistics Matrix (3-Column Grid) */
.statistics-section {
  background: #FFFFFF;
  padding: 70px 0;
  border-bottom: 1px solid var(--border-slate);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 45px;
}

.stat-item {
  padding: 24px 36px;
  text-align: center;
}

.stat-item:not(:last-child) {
  border-right: 1px solid var(--border-slate);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--brand-purple);
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-charcoal);
  margin-bottom: 6px;
}

.stat-desc {
  font-size: 0.9rem;
  color: var(--body-grey);
  line-height: 1.5;
}

/* Mandatory Mission Block */
.mission-callout-card {
  background: #FFFFFF;
  border-left: 6px solid var(--brand-purple);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 36px 40px;
  margin: 40px 0;
  box-shadow: var(--shadow-sm);
  border-top: 1px solid var(--border-slate);
  border-right: 1px solid var(--border-slate);
  border-bottom: 1px solid var(--border-slate);
}

.mission-callout-card h2,
.mission-callout-card h3 {
  color: var(--brand-purple);
  margin-bottom: 16px;
}

.mission-paragraph {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-charcoal);
  font-style: normal;
  font-weight: 500;
}

/* Reinvestment Clause Box */
.reinvestment-banner {
  background: rgba(79, 38, 131, 0.05);
  border: 1px dashed var(--brand-purple);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  margin: 28px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.reinvestment-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-purple);
  margin-bottom: 0;
}

/* Content Sections */
.section-pad {
  padding: 70px 0;
}

.section-bg-white {
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-slate);
}

.section-bg-offwhite {
  background-color: var(--bg-offwhite);
  border-bottom: 1px solid var(--border-slate);
}

.section-header {
  margin-bottom: 40px;
}

.section-header.text-center {
  text-align: center;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.section-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-purple);
  display: block;
  margin-bottom: 8px;
}

/* Activity Cards (Horizontal) */
.activity-card-row {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 36px;
}

.activity-card-horizontal {
  display: grid;
  grid-template-columns: 360px 1fr;
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-slate);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card-horizontal:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.activity-card-img-wrap {
  position: relative;
  min-height: 250px;
}

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

.activity-card-body {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.activity-card-body h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.activity-card-body p {
  color: var(--body-grey);
  margin-bottom: 16px;
  font-size: 0.98rem;
}

/* Standard Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}

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

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

/* Feature Card */
.feature-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-slate);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
}

.feature-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(79, 38, 131, 0.08);
  color: var(--brand-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-slate);
  background: #FFFFFF;
}

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

.institutional-table th {
  background: var(--bg-offwhite);
  color: var(--text-charcoal);
  font-weight: 700;
  padding: 14px 20px;
  font-size: 0.9rem;
  border-bottom: 2px solid var(--border-slate);
}

.institutional-table td {
  padding: 14px 20px;
  font-size: 0.925rem;
  border-bottom: 1px solid var(--border-slate);
  color: var(--body-grey);
}

.institutional-table tr:hover td {
  background-color: rgba(79, 38, 131, 0.02);
}

/* Forms */
.form-container {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-slate);
  box-shadow: var(--shadow-md);
  padding: 40px;
}

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

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-charcoal);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-slate);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-charcoal);
  background: #FFFFFF;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 44px;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(79, 38, 131, 0.15);
}

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

.form-help {
  font-size: 0.8rem;
  color: #64748B;
  margin-top: 6px;
}

/* Modal Confirmation Popup */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 7, 27, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.is-active {
  display: flex;
}

.modal-box {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-slate);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  padding: 38px 40px;
  text-align: center;
  position: relative;
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(79, 38, 131, 0.1);
  color: var(--brand-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
}

.modal-title {
  font-size: 1.6rem;
  color: var(--brand-purple);
  margin-bottom: 12px;
}

.modal-text {
  font-size: 1rem;
  color: var(--body-grey);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Pre-Footer Utility Bar */
.pre-footer-bar {
  background-color: var(--bg-offwhite);
  border-top: 1px solid var(--border-slate);
  padding: 22px 0;
  font-size: 0.9rem;
}

.pre-footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.pre-footer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-charcoal);
  font-weight: 500;
}

.pre-footer-item svg {
  color: var(--brand-purple);
  flex-shrink: 0;
}

/* Main Institutional Footer */
.site-footer {
  background-color: var(--footer-navy);
  color: #FFFFFF;
  padding: 70px 0 35px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.25fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-col h4 {
  font-family: var(--font-serif);
  color: #FFFFFF;
  font-size: 1.15rem;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.footer-disclosure {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #CBD5E1;
  margin-bottom: 16px;
}

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

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

.footer-links a {
  color: #CBD5E1;
  font-size: 0.875rem;
  transition: color 0.15s ease, padding-left 0.15s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: #FFFFFF;
  padding-left: 4px;
}

.footer-contact-details {
  font-size: 0.875rem;
  color: #CBD5E1;
  line-height: 1.8;
}

.footer-contact-details strong {
  color: #FFFFFF;
}

/* Sub-Footer & Legal Line */
.sub-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8125rem;
  color: #94A3B8;
}

.sub-footer-legal-links {
  display: flex;
  gap: 20px;
}

.sub-footer-legal-links a {
  color: #CBD5E1;
}

.sub-footer-legal-links a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.copyright-text {
  color: #94A3B8;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.85rem; }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-item:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid var(--border-slate);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .activity-card-horizontal {
    grid-template-columns: 1fr;
  }
  
  .activity-card-img-wrap {
    height: 240px;
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-header {
    height: 70px;
  }
  
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .main-navigation {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #FFFFFF;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    border-bottom: 1px solid var(--border-slate);
    box-shadow: var(--shadow-md);
    gap: 16px;
    display: none;
  }
  
  .main-navigation.is-open {
    display: flex;
  }
  
  .nav-dropdown {
    width: 100%;
  }
  
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 16px;
    display: block;
    background: var(--bg-offwhite);
    margin-top: 8px;
    border-radius: var(--radius-sm);
  }
  
  .nav-link {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .header-cta-btn {
    display: none;
  }
  
  .hero-banner {
    min-height: 440px;
    padding: 30px 0;
  }
  
  .hero-content-box {
    padding: 28px 24px;
  }
  
  .hero-title {
    font-size: 1.85rem;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .sub-footer {
    flex-direction: column;
    text-align: center;
  }
  
  .pre-footer-content {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}
