/**
 * FEDERATION DE LA DROME POUR LA PECHE ET LA PROTECTION DU MILIEU AQUATIQUE
 * Official Association Loi 1901 Production Stylesheet
 * Framework-free, Grid & Flexbox, Responsive, WCAG AA Compliant
 */

:root {
  --primary: #0e3b43;
  --primary-hover: #09282e;
  --primary-light: #165662;
  --accent-river: #0284c7;
  --accent-river-light: #e0f2fe;
  --accent-eco: #15803d;
  --accent-eco-light: #dcfce7;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;
  --text-heading: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", Cambria, "Times New Roman", Times, serif;
}

*, *::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: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TOP UTILITY BAR
   ========================================================================== */
.top-utility-bar {
  background-color: #08242a;
  color: #94a3b8;
  font-size: 0.8125rem;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-utility-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.utility-credentials {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.utility-credentials span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.utility-badge {
  font-weight: 600;
  color: #38bdf8;
  letter-spacing: 0.02em;
}

.utility-contact {
  display: flex;
  align-items: center;
  gap: 16px;
}

.utility-contact a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.utility-contact a:hover {
  color: #ffffff;
}

/* ==========================================================================
   SITE HEADER & NAVIGATION
   ========================================================================== */
.site-header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

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

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Navigation Links */
.main-nav {
  display: flex;
  align-items: center;
}

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

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-heading);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  min-height: 44px;
  min-width: 44px;
}

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

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 250px;
  padding: 8px;
  list-style: none;
  z-index: 1010;
}

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

.dropdown-link {
  display: block;
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background-color 0.15s ease, color 0.15s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.dropdown-link:hover, .dropdown-link.active {
  background-color: #f1f5f9;
  color: var(--primary);
  font-weight: 600;
}

/* Header Action CTA Button - Strict compliance: Contact Only */
.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: #ffffff !important;
  font-size: 0.925rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.1s ease;
  min-height: 44px;
  min-width: 44px;
  white-space: nowrap;
}

.nav-cta-btn:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
}

/* Mobile Hamburger Toggle */
.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-heading);
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   LAYOUT CONTAINERS & TYPOGRAPHY
   ========================================================================== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content {
  flex: 1;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: 2.5rem;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

h2 {
  font-size: 1.875rem;
  letter-spacing: -0.02em;
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

h3 {
  font-size: 1.35rem;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--primary);
}

p {
  margin-bottom: 16px;
  font-size: 1.025rem;
  color: var(--text-body);
}

ul, ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
  color: var(--text-body);
}

strong {
  color: var(--text-heading);
}

/* ==========================================================================
   HERO BANNER & MANDATORY SUMMARY BOX
   ========================================================================== */
.hero-banner {
  background: linear-gradient(180deg, #f1f5f9 0%, #ffffff 100%);
  padding: 48px 0 36px 0;
  border-bottom: 1px solid var(--border-color);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.hero-kicker {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-eco);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: block;
}

/* 2-Sentence Summary Box */
.summary-box-mandatory {
  background-color: #f0fdf4;
  border-left: 4px solid var(--accent-eco);
  border-right: 1px solid #bbf7d0;
  border-top: 1px solid #bbf7d0;
  border-bottom: 1px solid #bbf7d0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 20px 0 24px 0;
}

.summary-box-mandatory p {
  margin-bottom: 0;
  color: #166534;
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.6;
}

/* Dedicated Funding Disclosure Box */
.funding-disclosure-box {
  background-color: #eff6ff;
  border-left: 4px solid var(--accent-river);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 24px 0;
}

.funding-disclosure-box p {
  margin-bottom: 0;
  color: #1e40af;
  font-size: 0.95rem;
  font-weight: 500;
}

/* ==========================================================================
   CORE "NOTRE MISSION" COMPLIANCE BOX
   ========================================================================== */
.notre-mission-section {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 36px 0;
  box-shadow: var(--shadow-sm);
}

.notre-mission-title {
  color: var(--primary);
  font-size: 1.6rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 8px;
}

.notre-mission-core-text {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #1e293b;
  background-color: #f8fafc;
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid #e2e8f0;
  margin-bottom: 16px;
}

/* ==========================================================================
   IMAGE FRAME & FIGCAPTION PROTOCOL (DONIT STYLE)
   ========================================================================== */
.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;
}

.hero-donit-frame {
  width: 100%;
  height: 380px;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin: 12px 0 8px 0;
  object-fit: cover;
  display: block;
}

figcaption {
  font-size: 0.875rem;
  color: #64748B;
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ==========================================================================
   CARDS, INDICATORS & GRIDS
   ========================================================================== */
.indicators-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 36px 0;
}

.indicator-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.indicator-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.indicator-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

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

.cards-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin: 32px 0;
}

.content-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.content-card h3 {
  margin-top: 0;
}

.content-card .card-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
}

/* Clean Action Link/Button */
.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
  transition: background-color 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-contact:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  color: var(--primary) !important;
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  min-height: 44px;
  min-width: 44px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: var(--primary);
}

/* ==========================================================================
   DATA TABLES
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--bg-card);
}

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

.data-table th {
  background-color: #f1f5f9;
  color: var(--text-heading);
  padding: 14px 18px;
  font-weight: 700;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

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

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

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

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-list {
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  text-align: left;
  background: transparent;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
}

.faq-question:hover {
  background-color: #f8fafc;
}

.faq-answer {
  padding: 0 24px 20px 24px;
  color: var(--text-body);
  line-height: 1.65;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 32px 0;
  box-shadow: var(--shadow-sm);
}

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

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

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-heading);
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 44px;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 59, 67, 0.15);
}

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

.form-notice {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ==========================================================================
   AJAX CONFIRMATION MODAL POPUP
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  padding: 36px;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
  text-align: center;
  position: relative;
  animation: modalSlide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-icon {
  width: 64px;
  height: 64px;
  background-color: #dcfce7;
  color: #15803d;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
}

.modal-title {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 12px;
}

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

.modal-close-btn {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
  transition: background-color 0.2s ease;
}

.modal-close-btn:hover {
  background-color: var(--primary-hover);
}

/* ==========================================================================
   FOOTER (MANDATORY COMPLIANCE DISCLOSURES)
   ========================================================================== */
.site-footer {
  background-color: #08242a;
  color: #94a3b8;
  margin-top: 64px;
  padding-top: 56px;
  border-top: 4px solid var(--accent-eco);
  font-size: 0.925rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
  color: #f8fafc;
  font-size: 1.1rem;
  margin-bottom: 18px;
  font-weight: 700;
}

.footer-col p {
  color: #cbd5e1;
  font-size: 0.925rem;
  line-height: 1.6;
}

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

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

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
  display: inline-block;
  min-height: 32px;
  line-height: 32px;
}

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

/* Mandatory Disclosure Text Block */
.footer-disclosure-block {
  padding: 28px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-disclosure-text {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #94a3b8;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

/* Bottom Copyright Line */
.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.8125rem;
  color: #64748b;
}

/* ==========================================================================
   RESPONSIVE MOBILE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .indicators-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cards-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .top-utility-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .mobile-toggle-btn {
    display: flex;
  }
  .main-nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    border-bottom: 2px solid var(--border-color);
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
  }
  .main-nav.active {
    display: block;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .nav-dropdown-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    padding-left: 16px;
    background-color: #f8fafc;
    border-radius: var(--radius-sm);
  }
  .indicators-grid {
    grid-template-columns: 1fr;
  }
  .cards-grid-3, .cards-grid-2 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .hero-donit-frame {
    height: 240px;
  }
}
