/* =====================================================
   RESET MINIMAL
===================================================== */
* {
  box-sizing: border-box;
}

/* =====================================================
   NAVBAR
===================================================== */
.navbar {
  max-width: 1350px;
  margin: 20px auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index:3;
}

.logo img {
  width: 250px;
  display: block;
}

/* =====================================================
   MENU DESKTOP (BASE)
===================================================== */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 90px;
}

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

/* ALIGNEMENT UNIFIÉ <a> & <button> */
nav a,
nav .dropdown-toggle {
  display: inline-flex;
  align-items: center;
  margin: 0 12px;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  color: #737373;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
  vertical-align: middle;
}

/* RESET BOUTON DROPDOWN */
.dropdown-toggle {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  gap: 6px;
}

nav a:hover,
.dropdown-toggle:hover {
  color: #0f4c81;
}

/* =====================================================
   DROPDOWN DESKTOP
===================================================== */
.nav-dropdown {
  position: relative;
}

.chevron {
  font-size: 12px;
  transition: transform 0.25s ease;
}

/* Menu dropdown desktop */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  z-index: 200;
}

.dropdown-menu a {
  padding: 10px 20px;
  font-size: 14px;
  color: #0f4c81;
}

.dropdown-menu a:hover {
  background: rgba(15, 76, 129, 0.08);
}

/* Hover desktop uniquement */
@media (hover: hover) and (pointer: fine) {
  .nav-dropdown:hover .dropdown-menu {
    display: flex;
  }

  .nav-dropdown:hover .chevron {
    transform: rotate(180deg);
  }
}

/* =====================================================
   ACTIONS
===================================================== */
.actions a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.actions img {
  width: 34px;
  height: 34px;
}

/* =====================================================
   BOUTONS
===================================================== */
.btn-rounded {
  border-radius: 50px;
  padding: 10px 22px;
  border: 1px solid #00b09b;
  background: #00b09b;
  color: #fff;
  font-weight: 700;
  transition: 0.3s;
}

.btn-rounded:hover {
  background: #fff;
  color: #00b09b;
}

/* =====================================================
   BURGER
===================================================== */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.burger span {
  width: 26px;
  height: 3px;
  background: #0f4c81;
  border-radius: 3px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

.burger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =====================================================
   OVERLAY
===================================================== */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
  display: none;
}

.menu-overlay.active {
  display: block;
}

/* =====================================================
   MOBILE & TABLETTE
===================================================== */
@media (max-width: 1293px) {
  .navbar {
    width: calc(100% - 32px);
    max-width: none;
    margin: 16px 16px 0;
    padding: 12px 20px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 10001;
    box-sizing: border-box;
  }

  .burger {
    display: flex;
    margin-left: auto;
    z-index: 100000;
  }

  .menu-overlay {
    z-index: 99998;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 16px;
    right: 16px;
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    display: none;
    flex-direction: column;
    gap: 24px;
    z-index: 99999;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-menu.active {
    display: flex;
    animation: slideDown 0.25s ease;
  }

  nav {
    flex-direction: column;
    width: 100%;
    gap: 14px;
  }

  /* ITEMS NAV */
  nav a,
  nav .dropdown-toggle {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between; /* ✅ chevron à droite */
    padding: 14px 8px;
    font-size: 17px;
    color: #0f4c81;
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    text-align: left;
    touch-action: manipulation;
  }

  /* Dropdown wrapper */
  .nav-dropdown {
    width: 100%;
  }

  /* ✅ DROPDOWN MOBILE FIX iPhone Safari */
  .dropdown-menu {
    position: static !important;
    top: auto !important;
    left: auto !important;
    min-width: 100% !important;
    box-shadow: none !important;

    display: flex !important;
    flex-direction: column;
    width: 100%;

    background: #f4f7fb;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    margin-top: 6px;

    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-4px);
    padding: 0;

    transition: max-height 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
    z-index: 1;
  }

  .dropdown-menu.active {
    max-height: 600px;
    opacity: 1;
    transform: translateY(0);
    padding: 8px 0;
  }

  .dropdown-menu a {
    padding: 12px 16px;
    font-size: 15px;
    border-bottom: 1px solid #eee;
  }

  .dropdown-menu a:last-child {
    border-bottom: none;
  }

  .chevron.active {
    transform: rotate(180deg);
  }

  .actions {
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
  }

  .actions a {
    width: 100%;
    justify-content: center;
    padding: 14px 22px;
    font-size: 16px;
  }
}

/* =====================================================
   LOGO RESPONSIVE
===================================================== */
@media (max-width: 900px) {
  .logo img {
    width: 160px;
  }
}

@media (max-width: 480px) {
  .logo img {
    width: 140px;
  }

  .nav-menu {
    top: 65px;
    left: 10px;
    right: 10px;
    padding: 20px;
  }
}

/* =====================================================
   ANIMATION
===================================================== */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   ACCESSIBILITÉ
===================================================== */
.burger:focus,
nav a:focus,
.dropdown-toggle:focus,
.actions a:focus {
  outline: 2px solid #0f4c81;
  outline-offset: 2px;
}
