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

body {
  font-family: 'Segoe UI', sans-serif;
  color: #1a1a1a;
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: #0b1f4a;
  z-index: 999;
  padding: 1rem;
  display: flex;
  justify-content: center;
}

nav a {
  color: white;
  text-decoration: none;
  margin: 0 1rem;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(to bottom, #004080, #001f3f);
  color: white;
  position: relative;
}

.scroll-down {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 900px;
  background: linear-gradient(to bottom, rgba(0,0,0,0), white);
  z-index: -1;
}

.logo {
  width: 250px;
  margin-bottom: 1rem;
}

#TITLE {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.section { width: 100%; padding: 5rem 5%; }
.white-bg { background: white; }
.blue-bg { background: #eaf3fb; }
.grey-bg { background: #f5f5f5; }
.dark-bg { background: #0b1f4a; color: white; }

.flex-wrap { display: flex; flex-wrap: wrap; gap: 2rem; }
.half { flex: 1 1 48%; }
.third { flex: 1 1 30%; }
.fourth { flex: 1 1 22%; }

.full-width { width: 100%; }

.text-box, .info-box {
  background: white;
  padding: 2rem;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  border-left: 5px solid #004080;
}

.center-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: #0b1f4a;
}

.small-logo { display: block; margin: 0 auto 1rem; max-width: 60px; }
.small-logo-left { max-width: 60px; margin-right: 1rem; }
.flex-align { display: flex; align-items: flex-start; gap: 1rem; }

.tall-box { min-height: 400px; }


/* Contact */
.contact-container {
  display: flex;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: auto;
  padding: 2rem;
}

.contact-left, .contact-right { flex: 1; }
.contact-divider { width: 1px; background: #fff; height: 100%; opacity: 0.3; }
.contact-logo { max-width: 200px; }
.contact-right a { color: #b2e3ff; }
.contact-btn {
  display: inline-block;
  margin-top: 1rem;
  background: white;
  color: #0b1f4a;
  padding: 0.7rem 1.5rem;
  border-radius: 15px;
  font-weight: bold;
  text-decoration: none;
}

.FIX{
  color: white;
}

.contact-btn:hover { background: #ddeaff; }
/* ===== Responsive Adjustments ===== */
@media (max-width: 1024px) {
  .flex-wrap {
    flex-direction: column;
    align-items: center;
  }
  .half, .third, .fourth, .full-width {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    padding: 0.5rem;
  }
  nav a {
    margin: 0.5rem;
    font-size: 0.9rem;
  }
  #TITLE {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
    padding: 0 1rem;
  }
  .section {
    padding: 3rem 1rem;
  }
  .small-logo, .small-logo-left {
    max-width: 50px;
  }
  .flex-align {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .small-logo-left {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  .contact-container {
    flex-direction: column;
    text-align: center;
  }
  .contact-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  #TITLE {
    font-size: 1.8rem;
  }
  .center-title {
    font-size: 1.5rem;
  }
  .tall-box {
    min-height: auto;
  }
  .text-box {
    padding: 1.5rem;
  }
}

/* Fix NOS PARTENAIRES alignment on mobile */
@media (max-width: 1024px) {
  #section6 .flex-wrap {
    align-items: flex-start !important; /* Override center alignment */
  }
  #section6 .text-box {
    text-align: left; /* Ensure text stays left-aligned */
  }
}

/* Fix MedAI+ section alignment */
#section2 .text-box {
  text-align: left; /* Works for both PC and mobile */
}

/* 1. Force left alignment for NOS AXES D’ACTIONS boxes */
#section4 .text-box {
  text-align: left;
}

/* 2. Make NOS PARTENAIRES box full width on mobile */
@media (max-width: 1024px) {
  #section6 .third {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }
}

/* 3. Fix left alignment for POURQUOI REJOINDRE third box */
@media (max-width: 1024px) {
  #section3 .fourth {
    text-align: left !important;
  }
  #section3 .fourth p {
    text-align: left !important;
  }
}
