/* ==========================================================================
   CLUB'ENTREPRISES VAL DU HAUT-DOUBS - OFFICIAL STYLESHEET
   Association Loi 1901 - RNA W253005493 - SIREN 923699011
   Public Interest Non-Profit Platform
   ========================================================================== */

:root {
  --color-topbar: #E64A19;
  --color-primary: #0A4260;
  --color-primary-hover: #073046;
  --color-action: #0082AD;
  --color-action-hover: #00688B;
  --color-magenta: #C2185B;
  --color-magenta-hover: #9C1045;
  --color-green: #2E7D32;
  --color-green-hover: #1B5E20;
  --color-alert: #D32F2F;
  --color-alert-hover: #B71C1C;
  --color-heading: #0F172A;
  --color-body: #475569;
  --color-card: #FFFFFF;
  --color-card-alt: #F8FAFC;
  --color-border: #E2E8F0;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.68;
  color: var(--color-body);
  background-color: #F8FAFC;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2rem; margin-bottom: 0.85rem; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); margin-top: 1.5rem; margin-bottom: 0.65rem; }
h4 { font-size: 1.15rem; margin-top: 1rem; margin-bottom: 0.5rem; }

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

a {
  color: var(--color-action);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-action-hover);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ---------------- TOP BAR ---------------- */
.top-bar {
  background-color: var(--color-topbar);
  color: #FFFFFF;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar-notice {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-bar-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-bar-links a {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.top-bar-links a:hover {
  opacity: 0.9;
}

/* ---------------- MAIN HEADER & NAV ---------------- */
.main-header {
  background-color: var(--color-primary);
  color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(10, 66, 96, 0.15);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #FFFFFF;
}

.logo-badge {
  background: #FFFFFF;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 4px solid var(--color-topbar);
  line-height: 1;
}

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

.logo-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.2;
  color: #FFFFFF;
}

.logo-sub {
  font-size: 0.775rem;
  color: #CBD5E1;
  font-weight: 500;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  min-height: 44px;
  min-width: 44px;
}

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

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

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #F1F5F9;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 6px;
  min-height: 44px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-item:hover > .nav-link {
  background-color: var(--color-primary-hover);
  color: #FFFFFF;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--color-border);
  padding: 8px 0;
  list-style: none;
  z-index: 100;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 18px;
  color: var(--color-heading);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-menu li a:hover {
  background-color: #F1F5F9;
  color: var(--color-action);
}

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

.header-cta {
  background-color: var(--color-alert);
  color: #FFFFFF !important;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.2s ease;
}

.header-cta:hover {
  background-color: var(--color-alert-hover);
}

/* ---------------- HERO BANNER ---------------- */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #0A4260 0%, #073046 100%);
  color: #FFFFFF;
  padding: 60px 0 70px 0;
  overflow: hidden;
}

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

.hero-content h1 {
  color: #FFFFFF;
  line-height: 1.2;
}

.hero-summary-box {
  background: rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--color-topbar);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 18px 0 24px 0;
}

.hero-summary-text {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.6;
  color: #F8FAFC;
  max-width: 100%;
  margin-bottom: 0;
}

.hero-status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
  border: none;
}

.btn-primary {
  background-color: var(--color-action);
  color: #FFFFFF;
}

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

.btn-alert {
  background-color: var(--color-alert);
  color: #FFFFFF;
}

.btn-alert:hover {
  background-color: var(--color-alert-hover);
  color: #FFFFFF;
}

.btn-outline-light {
  background-color: transparent;
  color: #FFFFFF;
  border: 1.5px solid #FFFFFF;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.hero-image-wrap {
  position: relative;
}

/* ---------------- PHOTO & FIGCAPTION PROTOCOL ---------------- */
.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-figcaption {
  font-size: 0.875rem;
  color: #64748B;
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.45;
  display: block;
}

/* ---------------- NOTRE MISSION MANDATORY BLOCK ---------------- */
.mission-highlight-card {
  background: #FFFFFF;
  border: 2px solid var(--color-action);
  border-radius: 12px;
  padding: 32px;
  margin: 40px 0;
  box-shadow: 0 8px 24px rgba(0, 130, 173, 0.08);
  position: relative;
}

.mission-highlight-card::before {
  content: "Notre Mission";
  position: absolute;
  top: -14px;
  left: 28px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mission-highlight-text {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-heading);
  font-weight: 500;
  margin-bottom: 0;
}

/* ---------------- CONTENT SECTIONS & CARDS ---------------- */
.section {
  padding: 60px 0;
}

.section-alt {
  background-color: #FFFFFF;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

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

.section-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-action);
  margin-bottom: 8px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin: 30px 0;
}

.feature-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-color: rgba(0, 130, 173, 0.1);
  color: var(--color-action);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  font-weight: 800;
}

.reinvestment-banner {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 18px 24px;
  margin: 30px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.reinvestment-banner p {
  margin: 0;
  font-weight: 600;
  color: #1E40AF;
  font-size: 0.975rem;
}

/* ---------------- FORMS & MODALS ---------------- */
.form-group {
  margin-bottom: 20px;
}

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

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background-color: #FFFFFF;
  color: var(--color-heading);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-action);
  box-shadow: 0 0 0 3px rgba(0, 130, 173, 0.15);
}

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

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal-box {
  background: #FFFFFF;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  padding: 36px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  border-top: 6px solid var(--color-green);
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-icon {
  width: 64px;
  height: 64px;
  background: #DCFCE7;
  color: var(--color-green);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 20px;
}

/* ---------------- FOOTER ---------------- */
.site-footer {
  background-color: var(--color-heading);
  color: #94A3B8;
  padding: 60px 0 24px 0;
  font-size: 0.9rem;
  border-top: 4px solid var(--color-primary);
}

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

.footer-col h4 {
  color: #FFFFFF;
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col ul li a {
  color: #CBD5E1;
  transition: color 0.15s ease;
}

.footer-col ul li a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.footer-mandatory-disclosure {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 30px;
  color: #CBD5E1;
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-bottom-line {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.825rem;
  color: #64748B;
}

/* ---------------- RESPONSIVE BREAKPOINTS ---------------- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nav-toggle {
    display: block;
  }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-primary);
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .main-nav.active {
    display: block;
  }
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 4px;
  }
  .nav-item {
    width: 100%;
  }
  .nav-link {
    width: 100%;
    justify-content: space-between;
  }
  .dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    background-color: #073046;
    border: none;
    border-radius: 6px;
    margin: 4px 0 8px 12px;
  }
  .dropdown-menu.mobile-open {
    display: block;
  }
  .dropdown-menu li a {
    color: #E2E8F0;
    padding: 8px 14px;
  }
}

@media (max-width: 768px) {
  .top-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .btn {
    width: 100%;
  }
}
