/* ==========================================================================
   SOCIETE DES COURSES HIPPIQUES - INSTITUTIONAL DESIGN SYSTEM
   Statutory Non-Profit & Non-Commercial Public Utility
   ========================================================================== */

:root {
  --primary-purple: #4F2683;
  --dark-navy: #3A1B63;
  --text-charcoal: #1E1E24;
  --body-grey: #475569;
  --off-white: #F4F5F7;
  --card-white: #FFFFFF;
  --border-line: #E2E8F0;
  --focus-ring: rgba(79, 38, 131, 0.25);
  --success-green: #15803D;
  --transition-speed: 0.2s;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--body-grey);
  background-color: #FAFAFA;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
}

/* Typography Hierarchy */
h1, h2, h3, h4, .serif-heading {
  font-family: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif;
  color: var(--text-charcoal);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.5rem; margin-bottom: 1.25rem; }
h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.15rem; margin-bottom: 0.5rem; }

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

p.lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #334155;
}

a {
  color: var(--primary-purple);
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

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

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

/* Containers & Layout Grid */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.section {
  padding: 80px 0;
  position: relative;
}

.section-alt {
  background-color: var(--off-white);
  border-top: 1px solid var(--border-line);
  border-bottom: 1px solid var(--border-line);
}

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

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2.25rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--body-grey);
  max-width: 680px;
  margin: 0 auto;
}

.section-purple .section-subtitle,
.section-purple h2,
.section-purple h3,
.section-purple p {
  color: var(--card-white);
}

/* Regulatory Badge & Pills */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background-color: #EDE9FE;
  color: var(--primary-purple);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 9999px;
  margin-bottom: 16px;
  white-space: nowrap;
}

.pill-light {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--card-white);
}

.pill-border {
  border: 1px solid var(--border-line);
  background-color: var(--card-white);
  color: var(--body-grey);
}

/* Buttons System - Strict 2-CTA and Tap Target Standard */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-speed) ease;
  white-space: nowrap;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary-purple);
  color: var(--card-white) !important;
}

.btn-primary:hover {
  background-color: var(--dark-navy);
  color: var(--card-white) !important;
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--primary-purple);
  color: var(--primary-purple) !important;
}

.btn-secondary:hover {
  background-color: var(--primary-purple);
  color: var(--card-white) !important;
}

.btn-white {
  background-color: var(--card-white);
  color: var(--primary-purple) !important;
}

.btn-white:hover {
  background-color: var(--off-white);
  color: var(--dark-navy) !important;
}

.btn-outline-white {
  background-color: transparent;
  border-color: var(--card-white);
  color: var(--card-white) !important;
}

.btn-outline-white:hover {
  background-color: var(--card-white);
  color: var(--primary-purple) !important;
}

.btn-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Sticky Header */
.site-header {
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--card-white);
  border-bottom: 1px solid var(--border-line);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

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

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

.shield-icon {
  width: 44px;
  height: 44px;
  fill: var(--primary-purple);
  flex-shrink: 0;
}

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

.logo-org-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark-navy);
  line-height: 1.2;
}

.logo-tagline {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary-purple);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-charcoal);
  padding: 8px 0;
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
}

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

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--body-grey);
  border-radius: 4px;
  transition: all var(--transition-speed);
}

.search-toggle-btn:hover {
  color: var(--primary-purple);
  background-color: var(--off-white);
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.hamburger-line {
  width: 24px;
  height: 2px;
  background-color: var(--text-charcoal);
  transition: all var(--transition-speed);
}

/* Hero Banner */
.hero-banner {
  height: 540px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-overlay-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(30, 30, 36, 0.75) 0%, rgba(30, 30, 36, 0.4) 60%, rgba(30, 30, 36, 0.2) 100%);
}

.hero-content-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
}

.hero-card {
  max-width: 640px;
  background: var(--card-white);
  padding: 44px;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  border-left: 5px solid var(--primary-purple);
}

.hero-card h1 {
  font-size: 2.25rem;
  margin-bottom: 16px;
  color: var(--text-charcoal);
}

.hero-summary {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--body-grey);
  margin-bottom: 28px;
}

/* Statistics Matrix (3-Column Grid) */
.stats-section {
  background-color: var(--card-white);
  padding: 70px 0;
  border-bottom: 1px solid var(--border-line);
}

.mission-block {
  max-width: 880px;
  margin: 0 auto 56px auto;
  text-align: center;
}

.mission-paragraph {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #1E293B;
  background: var(--off-white);
  padding: 32px 40px;
  border-radius: 8px;
  border: 1px solid var(--border-line);
  text-align: left;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border-line);
  border-radius: 8px;
  overflow: hidden;
}

.stat-item {
  padding: 40px 32px;
  text-align: center;
  background-color: var(--card-white);
}

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

.stat-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary-purple);
  line-height: 1;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--body-grey);
  margin: 0;
}

/* Campaign Section ("All in.") */
.campaign-section {
  background-color: var(--primary-purple);
  color: var(--card-white);
  padding: 90px 0;
}

.campaign-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.campaign-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 5.5rem;
  line-height: 0.95;
  color: var(--card-white);
  margin-bottom: 24px;
}

.campaign-subtitle {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: #E9D5FF;
}

.campaign-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #FAF5FF;
  margin-bottom: 32px;
}

.focus-list {
  display: flex;
  flex-direction: column;
}

.focus-item {
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: padding var(--transition-speed);
}

.focus-item:last-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.focus-item:hover {
  padding-left: 12px;
}

.focus-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--card-white);
}

.focus-arrow {
  color: #E9D5FF;
  font-size: 1.5rem;
}

/* Activity & Initiative Cards (Horizontal 2x2 Grid) */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.activity-card {
  display: flex;
  background-color: var(--card-white);
  border: 1px solid var(--border-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.activity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.activity-image-wrap {
  width: 40%;
  position: relative;
  flex-shrink: 0;
  min-height: 260px;
}

.activity-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-content {
  width: 60%;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.activity-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--text-charcoal);
}

.activity-summary {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--body-grey);
  margin-bottom: 20px;
}

/* Content Blocks & Editorial Styling */
.content-card {
  background-color: var(--card-white);
  border: 1px solid var(--border-line);
  border-radius: 8px;
  padding: 36px;
  margin-bottom: 32px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.editorial-article {
  max-width: 820px;
  margin: 0 auto;
}

.editorial-article h2 {
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--off-white);
}

.editorial-article h3 {
  margin-top: 28px;
  margin-bottom: 12px;
}

.editorial-article ul, .editorial-article ol {
  margin-bottom: 24px;
  padding-left: 28px;
}

.editorial-article li {
  margin-bottom: 8px;
  color: var(--body-grey);
}

.callout-box {
  background: var(--off-white);
  border-left: 4px solid var(--primary-purple);
  padding: 24px 28px;
  border-radius: 0 8px 8px 0;
  margin: 32px 0;
}

.callout-box p:last-child {
  margin-bottom: 0;
}

/* Tables System */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--border-line);
  border-radius: 8px;
}

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

.data-table th {
  background-color: var(--off-white);
  padding: 16px 20px;
  font-weight: 700;
  color: var(--text-charcoal);
  border-bottom: 2px solid var(--border-line);
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-line);
  color: var(--body-grey);
}

.data-table tr:last-child td {
  border-bottom: none;
}

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

/* Forms System */
.form-group {
  margin-bottom: 24px;
}

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

.form-label span.req {
  color: #DC2626;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-charcoal);
  background-color: var(--card-white);
  border: 1px solid var(--border-line);
  border-radius: 4px;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
  min-height: 44px;
}

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

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--body-grey);
  cursor: pointer;
  margin-top: 12px;
}

.form-checkbox-label input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-purple);
  flex-shrink: 0;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Pre-Footer & Footer */
.pre-footer-bar {
  background-color: var(--off-white);
  border-top: 1px solid var(--border-line);
  padding: 24px 0;
}

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

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--text-charcoal);
}

.contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--primary-purple);
  flex-shrink: 0;
}

.main-footer {
  background-color: var(--dark-navy);
  color: var(--card-white);
  padding: 70px 0 40px 0;
}

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

.footer-col h4 {
  color: var(--card-white);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

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

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

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

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

.footer-links a {
  color: #E2E8F0;
  font-size: 0.9rem;
  transition: color var(--transition-speed);
  display: inline-block;
  padding: 2px 0;
  min-height: 28px;
}

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

.sub-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 32px;
  text-align: center;
}

.sub-footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--card-white);
  margin-bottom: 16px;
}

.legal-links-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.legal-links-row a {
  color: #CBD5E1;
  font-size: 0.85rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.legal-links-row a:hover {
  color: var(--card-white);
}

.copyright-text {
  font-size: 0.8rem;
  color: #94A3B8;
  max-width: 900px;
  margin: 0 auto;
}

/* Modal Window (AJAX Thank You) */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--card-white);
  width: 100%;
  max-width: 520px;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-icon-circle {
  width: 64px;
  height: 64px;
  background-color: #DCFCE7;
  color: var(--success-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
}

.modal-icon-circle svg {
  width: 36px;
  height: 36px;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--body-grey);
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

/* Search Modal */
.search-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.8);
  z-index: 2500;
  align-items: flex-start;
  justify-content: center;
  padding: 100px 20px;
}

.search-modal.active {
  display: flex;
}

.search-modal-box {
  width: 100%;
  max-width: 680px;
  background: var(--card-white);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.search-input-group {
  display: flex;
  gap: 12px;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-banner {
    height: auto;
    min-height: 480px;
    padding: 60px 0;
  }

  .campaign-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .campaign-title {
    font-size: 4rem;
  }

  .activity-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.65rem; }
  h3 { font-size: 1.25rem; }

  .site-header {
    height: 70px;
  }

  .hamburger-btn {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--card-white);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-line);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    gap: 12px;
  }

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

  .nav-link {
    width: 100%;
    padding: 10px 0;
  }

  .header-actions .btn {
    display: none;
  }

  .hero-card {
    padding: 28px 20px;
  }

  .hero-card h1 {
    font-size: 1.75rem;
  }

  .btn-row {
    flex-direction: column;
    width: 100%;
  }

  .btn-row .btn {
    width: 100%;
  }

  .activity-card {
    flex-direction: column;
  }

  .activity-image-wrap {
    width: 100%;
    height: 220px;
    min-height: 220px;
  }

  .activity-content {
    width: 100%;
    padding: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .pre-footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .legal-links-row {
    flex-direction: column;
    gap: 8px;
  }
}
