/* ============================================
   HEADER & FOOTER — Styles isolés pour les pages Webflow
   N'utilise pas de sélecteurs globaux (*,  body, section, nav, .container)
   afin d'éviter tout conflit avec les CSS Webflow existants.
   ============================================ */

/* Variables */
:root {
  --primary-blue: #3b5ba8;
  --secondary-blue: #1e3a70;
  --accent-red: #ef4e48;
  --dark-navy: #0f1f3f;
  --light-bg: #fff5f3;
  --text-dark: #1e293b;
  --text-gray: #64748b;
  --orange: #ff8c00;
}

/* ─── Container interne au header / footer uniquement ─── */
.top-bar .container,
header .container,
footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  /* Annule les surcharges Webflow éventuelles */
  width: auto;
}

/* ─── Top Bar ─── */
.top-bar {
  background: var(--light-bg);
  padding: 12px 0;
  border-bottom: 1px solid #f0e6e4;
  /* Isolation des styles Webflow hérités */
  font-size: 16px;
  font-family:
    'Segoe UI',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  line-height: 1.5;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.top-contact {
  display: flex;
  gap: 30px;
  align-items: center;
}

.top-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
}

/* ─── Header ─── */
header {
  background: #ffffff;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1001;
  /* Isolation des styles Webflow hérités */
  font-size: 16px;
  font-family:
    'Segoe UI',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  line-height: 1.5;
}

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

.logo-img {
  height: 60px;
  width: auto;
}

/* Nav — scoped au header pour ne pas toucher les <nav> Webflow */
header nav {
  display: flex;
  gap: 40px;
  align-items: center;
}

header nav > a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.3s;
  white-space: nowrap;
}

header nav > a:hover {
  color: var(--primary-blue);
}

/* ─── Bouton CTA header ─── */
.btn-primary {
  background: var(--dark-navy);
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--primary-blue);
  transform: translateY(-2px);
}

/* ─── Dropdown desktop ─── */
.nav-dropdown {
  position: relative;
  display: inline-block;
  z-index: 1002;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.3s;
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
}

.nav-link:hover {
  color: var(--primary-blue);
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 240px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 10px 0;
  z-index: 1002;
  margin-top: 10px;
}

.dropdown-content a {
  color: var(--text-dark);
  padding: 12px 20px;
  text-decoration: none;
  display: block;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s;
}

.dropdown-content a:hover {
  background: var(--light-bg);
  color: var(--primary-blue);
  padding-left: 25px;
}

.nav-dropdown:hover .dropdown-content,
.dropdown-content:hover {
  display: block;
  animation: hfFadeInDown 0.3s;
}

.nav-dropdown::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 15px;
  background: transparent;
}

@keyframes hfFadeInDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Menu Burger ─── */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
}

.burger-menu span {
  width: 100%;
  height: 3px;
  background: var(--text-dark);
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ─── Mobile Menu ─── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1002;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  padding: 0;
  transition: transform 0.3s;
}

.mobile-menu-close:hover {
  transform: rotate(90deg);
}

.mobile-menu-close span {
  position: absolute;
  width: 24px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s;
}

.mobile-menu-close span:nth-child(1) {
  transform: rotate(45deg);
}

.mobile-menu-close span:nth-child(2) {
  transform: rotate(-45deg);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1002;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
  display: block;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 20px;
  align-items: flex-start;
  margin: 40px 0;
}

.mobile-nav > a {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.3s;
  width: 100%;
}

.mobile-nav > a:hover {
  color: var(--primary-blue);
}

.mobile-nav-dropdown {
  border-bottom: 1px solid #f0f0f0;
  width: 100%;
}

.mobile-nav-dropdown-toggle {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  padding: 15px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: color 0.3s;
  width: 100%;
}

.mobile-nav-dropdown-toggle:hover {
  color: var(--primary-blue);
}

.mobile-nav-dropdown-toggle::after {
  content: '+';
  font-size: 24px;
  font-weight: 300;
  color: var(--primary-blue);
  transition: transform 0.3s;
}

.mobile-nav-dropdown-toggle.active::after {
  transform: rotate(45deg);
}

.mobile-dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--light-bg);
}

.mobile-dropdown-content.active {
  max-height: 500px;
}

.mobile-dropdown-content a {
  color: var(--text-dark);
  text-decoration: none;
  padding: 12px 20px;
  display: block;
  font-weight: 500;
  font-size: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s;
}

.mobile-dropdown-content a:hover {
  background: white;
  color: var(--primary-blue);
  padding-left: 30px;
}

.mobile-menu-cta {
  margin: 20px;
  padding: 15px;
  background: var(--dark-navy);
  color: white;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: block;
}

.mobile-menu-cta:hover {
  background: var(--primary-blue);
}

/* ─── Footer ─── */
footer {
  background: var(--light-bg);
  padding: 80px 0 30px;
  /* Isolation des styles Webflow hérités */
  font-size: 16px;
  font-family:
    'Segoe UI',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  line-height: 1.5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-logo-section p {
  color: var(--text-gray);
  margin: 20px 0;
  line-height: 1.7;
}

.footer-title {
  font-weight: 700;
  color: var(--dark-navy);
  font-size: 18px !important;
  margin-bottom: 20px;
  line-height: 1.3;
}

.footer-links {
  list-style: none;
  padding-left: 0;
  gap: 0;
}

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

.footer-links a {
  color: var(--text-gray);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--primary-blue);
}

.footer-contact-link {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 10px;
  white-space: nowrap;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #e0d9d7;
  color: var(--text-gray);
  font-size: 14px;
}

/* ─── Responsive ─── */
@media (max-width: 991px) {
  header nav {
    display: none;
  }

  .burger-menu {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

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

  .logo-img {
    height: 48px;
  }

  header .btn-primary {
    margin-left: auto;
    margin-right: 24px;
  }
}
