/* ==========================================================================
   CENTRE INTERNATIONAL DE LA MER - CORDERIE ROYALE
   Association Loi 1901 (RNA: W172001094 | SIREN: 331603829)
   Production CSS Architecture - 100% Framework-Free Responsive Engine
   ========================================================================== */

:root {
  --color-primary-navy: #0d253f;
  --color-marine-blue: #18416b;
  --color-accent-teal: #226b80;
  --color-brass-gold: #c28833;
  --color-brass-light: #f9f5eb;
  --color-bg-light: #f6f9fc;
  --color-surface-white: #ffffff;
  --color-text-dark: #1e293b;
  --color-text-muted: #475569;
  --color-text-subtle: #64748b;
  --color-border-light: #e2e8f0;
  --color-border-card: #cbd5e1;
  --color-success: #0f766e;
  --color-success-bg: #ecfdf5;

  --font-serif: "Merriweather", "Georgia", serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(13, 37, 63, 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --transition-default: all 0.25s ease-in-out;
}

*, *::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(--color-bg-light);
  color: var(--color-text-dark);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TOP CREDENTIAL BAR
   ========================================================================== */
.top-bar {
  background-color: var(--color-primary-navy);
  color: #cbd5e1;
  font-size: 0.825rem;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

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

.top-bar-badges {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-badge {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: 0.02em;
}

.top-bar-contact {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #94a3b8;
}

.top-bar-contact a {
  color: #e2e8f0;
  text-decoration: none;
  transition: var(--transition-default);
}

.top-bar-contact a:hover {
  color: #ffffff;
  text-decoration: underline;
}

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

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

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

.brand-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-marine-blue), var(--color-primary-navy));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.05em;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.brand-meta h1 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-primary-navy);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.brand-meta p {
  font-size: 0.775rem;
  color: var(--color-text-subtle);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Nav Menu */
.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 8px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  color: var(--color-text-dark);
  font-weight: 600;
  font-size: 0.925rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  min-height: 44px;
  transition: var(--transition-default);
}

.nav-link:hover, .nav-link.active {
  background-color: var(--color-bg-light);
  color: var(--color-marine-blue);
}

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

.dropdown-item {
  display: block;
}

.dropdown-link {
  display: block;
  padding: 10px 18px;
  color: var(--color-text-dark);
  font-size: 0.885rem;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-default);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.dropdown-link:hover {
  background-color: var(--color-bg-light);
  color: var(--color-marine-blue);
  padding-left: 22px;
}

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

/* Contact CTA Button */
.btn-header-contact {
  background: var(--color-marine-blue);
  color: #ffffff !important;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  transition: var(--transition-default);
  box-shadow: var(--shadow-sm);
}

.btn-header-contact:hover {
  background-color: var(--color-primary-navy);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  font-size: 1.25rem;
  color: var(--color-primary-navy);
}

/* ==========================================================================
   LAYOUT CONTAINERS & TYPOGRAPHY
   ========================================================================== */
.main-wrapper {
  flex: 1;
}

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

.section-padding {
  padding: 56px 0;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary-navy);
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.25;
}

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

h2 {
  font-size: 1.85rem;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 10px;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--color-brass-gold);
  border-radius: 2px;
}

.text-center h2::after {
  left: 50%;
  transform: translateX(-50%);
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
  color: var(--color-text-dark);
}

.lead-text {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ==========================================================================
   2-SENTENCE PUBLIC INTEREST SUMMARY BOX (MANDATORY)
   ========================================================================== */
.summary-box {
  background-color: var(--color-brass-light);
  border-left: 5px solid var(--color-brass-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px;
  margin: 24px 0 32px 0;
  box-shadow: var(--shadow-sm);
}

.summary-box p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #78350f;
  line-height: 1.6;
}

/* ==========================================================================
   DOCUMENTARY PHOTOGRAPHY & FIGCAPTION PROTOCOL (MANDATORY)
   ========================================================================== */
.doc-figure {
  margin: 20px 0 28px 0;
  width: 100%;
}

.doc-img {
  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;
}

.doc-img-hero {
  max-height: 480px;
}

.doc-img-medium {
  max-height: 340px;
}

.doc-img-card {
  height: 220px;
  margin: 0 0 10px 0;
}

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

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.hero-banner {
  background: linear-gradient(180deg, #ffffff 0%, var(--color-bg-light) 100%);
  border-bottom: 1px solid var(--color-border-light);
  padding: 48px 0 40px 0;
}

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

.hero-content h1 {
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.badge-tag {
  background-color: #e2e8f0;
  color: var(--color-marine-blue);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

/* Key Operational Indicators */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 40px 0;
}

.stat-card {
  background: var(--color-surface-white);
  padding: 24px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition-default);
}

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

.stat-number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-marine-blue);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ==========================================================================
   MISSION STATEMENT SECTION (NOTRE MISSION)
   ========================================================================== */
.mission-box {
  background: var(--color-surface-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  margin: 40px 0;
}

.mission-text-core {
  font-size: 1.1rem;
  line-height: 1.85;
  color: var(--color-text-dark);
  font-weight: 500;
  border-left: 4px solid var(--color-marine-blue);
  padding-left: 20px;
  margin: 20px 0;
  background-color: var(--color-bg-light);
  padding: 20px 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.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;
}

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

.content-card {
  background: var(--color-surface-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition-default);
}

.content-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-card);
}

.content-card h3 {
  color: var(--color-marine-blue);
  margin-top: 8px;
}

.content-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  flex-grow: 1;
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0 32px 0;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  background: var(--color-surface-white);
  box-shadow: var(--shadow-sm);
}

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

.data-table th {
  background-color: #f1f5f9;
  color: var(--color-primary-navy);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 2px solid var(--color-border-light);
}

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

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

/* FAQ Accordion */
.faq-item {
  background: var(--color-surface-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
}

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

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

.faq-answer {
  padding: 0 24px 20px 24px;
  color: var(--color-text-muted);
  line-height: 1.75;
  border-top: 1px solid #f1f5f9;
}

/* Callout Box */
.notice-box {
  background-color: #f0fdf4;
  border-left: 4px solid #16a34a;
  padding: 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 28px 0;
}

.notice-box p {
  margin: 0;
  color: #14532d;
  font-weight: 500;
}

/* ==========================================================================
   BUTTONS (MANDATORY CTA RULE: ONLY "Contact" / "Contact Us")
   ========================================================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-marine-blue);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  text-decoration: none;
  min-height: 44px;
  cursor: pointer;
  border: none;
  transition: var(--transition-default);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-primary-navy);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--color-marine-blue) !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  text-decoration: none;
  min-height: 44px;
  cursor: pointer;
  border: 2px solid var(--color-marine-blue);
  transition: var(--transition-default);
}

.btn-outline:hover {
  background-color: var(--color-marine-blue);
  color: #ffffff !important;
}

/* Forms */
.form-card {
  background: var(--color-surface-white);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
}

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

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

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--color-text-dark);
  min-height: 44px;
  transition: var(--transition-default);
  background-color: #ffffff;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--color-marine-blue);
  box-shadow: 0 0 0 3px rgba(24, 65, 107, 0.15);
}

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

/* ==========================================================================
   AJAX CONFIRMATION POPUP MODAL (MANDATORY)
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(13, 37, 63, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 36px 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-icon {
  width: 64px;
  height: 64px;
  background-color: #ecfdf5;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 16px auto;
}

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

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

.modal-close-btn {
  background-color: var(--color-marine-blue);
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: var(--transition-default);
}

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

/* ==========================================================================
   UNIFIED LEGAL COMPLIANCE FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--color-primary-navy);
  color: #cbd5e1;
  padding: 56px 0 28px 0;
  margin-top: auto;
  border-top: 4px solid var(--color-brass-gold);
}

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

.footer-col h4 {
  color: #ffffff;
  font-size: 1.05rem;
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}

.footer-col p {
  color: #94a3b8;
  font-size: 0.885rem;
  line-height: 1.7;
}

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

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

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

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
  padding-left: 4px;
}

.footer-disclosure {
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 32px;
}

.footer-disclosure p {
  color: #e2e8f0;
  font-size: 0.865rem;
  line-height: 1.65;
  margin-bottom: 8px;
}

.footer-disclosure p:last-child {
  margin-bottom: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.825rem;
  color: #94a3b8;
}

.footer-bottom a {
  color: #cbd5e1;
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
  color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

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

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

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

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

@media (max-width: 768px) {
  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-surface-white);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
    box-shadow: var(--shadow-lg);
    border-bottom: 2px solid var(--color-border-light);
    gap: 4px;
  }

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

  .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding-left: 16px;
    background-color: var(--color-bg-light);
    border-radius: var(--radius-sm);
    margin-top: 4px;
  }

  .nav-item.dropdown-open .dropdown-menu {
    display: block;
  }

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

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

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .top-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
