/* ============================================================
   NAVBAR
============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 2rem; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(to right, #F8F9FC 0%, #2EAC4F 40%, #1B2A5E 100%);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid #2EAC4F;
  transition: height .3s, background .3s, box-shadow .3s;
  isolation: isolate;
}
.navbar::before {
  content: '';
  position: absolute;
  inset: -40% -10%;
  background: radial-gradient(circle at var(--nav-light-x, 50%) var(--nav-light-y, 50%), rgba(255,255,255,.18) 0%, rgba(255,255,255,.08) 14%, transparent 34%);
  opacity: 0;
  transform: scale(.96);
  transition: opacity .28s ease, transform .38s ease;
  pointer-events: none;
  z-index: 0;
}
.navbar:hover::before {
  opacity: 1;
  transform: scale(1);
}
.navbar > * {
  position: relative;
  z-index: 1;
}
.navbar.scrolled {
  height: 60px;
  background: linear-gradient(to right, #F0F2F8 0%, #27953F 40%, #111b3e 100%);
  box-shadow: 0 8px 32px rgba(27,42,94,.14);
}

/* LOGO */
.logo { display:flex; align-items:center; gap:.75rem; text-decoration:none; }
.logo-text { line-height: 1.1; }
.logo-text strong { display: block; color: #1B2A5E; font-size: .95rem; font-weight: 800; letter-spacing: .3px; }
.logo-text span { color: #1B2A5E; font-size: .72rem; font-weight: 500; letter-spacing: .8px; text-transform: uppercase; }

/* NAV LINKS */
.nav-links { display: flex; align-items: center; gap: .1rem; list-style: none; }
.nav-links > li { position: relative; }
.nav-links > li > a {
  display: flex; align-items: center; gap: .35rem;
  color: #ffffff; font-size: .875rem; font-weight: 500;
  padding: .55rem .85rem; border-radius: 8px;
  transition: all .3s cubic-bezier(.4,0,.2,1); white-space: nowrap; cursor: pointer;
  position: relative;
  overflow: hidden;
}
.nav-links > li > a::before,
.btn-devis::before {
  content: '';
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at var(--nav-link-x, 50%) var(--nav-link-y, 50%), rgba(255,255,255,.16) 0%, rgba(255,255,255,.07) 14%, transparent 34%);
  opacity: 0;
  transform: scale(.94);
  transition: opacity .24s ease, transform .32s ease;
  pointer-events: none;
}
.nav-links > li > a:hover,
.nav-links > li.active > a { color: #fff; background: rgba(255,255,255,.15); }
.nav-links > li > a:hover::before,
.nav-links > li > a:focus-visible::before,
.btn-devis:hover::before,
.btn-devis:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}
.nav-arrow { font-size: .65rem !important; transition: transform .3s; opacity: .6; }
.nav-links > li.has-dropdown:hover > a .nav-arrow { transform: rotate(180deg); opacity: 1; }

/* DEVIS BUTTON */
.btn-devis {
  background: #ffffff !important;
  color: #1B2A5E !important; font-weight: 700 !important;
  padding: .55rem 1.2rem !important; border-radius: 8px !important;
  box-shadow: 0 4px 14px rgba(255,255,255,.25); margin-left: .5rem;
  overflow: hidden;
}
.btn-devis:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(255,255,255,.35) !important;
  background: #f0f4ff !important;
}

/* ============================================================
   DROPDOWN LEVEL 1
============================================================ */
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 230px;
  background: #111b3e;
  border: 1px solid rgba(46,172,79,.22);
  border-radius: 14px; padding: .5rem 0;
  list-style: none;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .22s, visibility .22s, transform .22s;
  z-index: 1010;
}
.has-dropdown:hover > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown > li { position: relative; }
.dropdown > li > a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .7rem 1.15rem;
  color: rgba(255,255,255,.78); font-size: .86rem; font-weight: 500;
  transition: all .2s; white-space: nowrap;
}
.dropdown > li > a:hover { color: #fff; background: rgba(46,172,79,.15); }
.sub-arrow { font-size: .6rem !important; opacity: .5; margin-left: auto; }
.has-subdropdown:hover > a .sub-arrow { opacity: 1; }
.dropdown-separator { height: 1px; background: rgba(255,255,255,.07); margin: .35rem .8rem; }

/* ============================================================
   DROPDOWN LEVEL 2 (sub-dropdown)
============================================================ */
.sub-dropdown {
  position: absolute; top: -6px; left: calc(100% + 4px);
  min-width: 215px;
  background: #1a2550;
  border: 1px solid rgba(46,172,79,.18);
  border-radius: 12px; padding: .5rem 0;
  list-style: none;
  box-shadow: 0 16px 40px rgba(0,0,0,.32);
  opacity: 0; visibility: hidden;
  transform: translateX(-6px);
  transition: opacity .2s, visibility .2s, transform .2s;
  z-index: 1011;
}
.has-subdropdown:hover > .sub-dropdown { opacity: 1; visibility: visible; transform: translateX(0); }
.sub-dropdown > li > a {
  display: block; padding: .55rem 1.1rem;
  color: rgba(255,255,255,.72); font-size: .83rem; font-weight: 400;
  transition: all .2s; white-space: nowrap;
}
.sub-dropdown > li > a:hover { color: #3ec862; background: rgba(46,172,79,.1); padding-left: 1.4rem; }

/* ============================================================
   HAMBURGER
============================================================ */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; }
.hamburger span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: all .3s cubic-bezier(.4,0,.2,1); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   MOBILE MENU
============================================================ */
.mobile-menu {
  display: none; position: fixed; top: 72px; left: 0; right: 0;
  background: #111b3e; padding: 1rem 1.5rem 1.5rem;
  z-index: 999; border-bottom: 2px solid #2EAC4F;
  overflow-y: auto; max-height: calc(100vh - 72px);
  animation: slideDown .25s ease;
}
.mobile-menu.open { display: block; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.mobile-nav-item { border-bottom: 1px solid rgba(255,255,255,.06); }
.mobile-nav-row {
  display: flex; align-items: center;
  padding: .85rem 0;
}
.mobile-nav-row > a {
  flex: 1; color: rgba(255,255,255,.85);
  font-weight: 500; font-size: .95rem;
}
.mobile-nav-row > a:hover { color: #3ec862; }
.mob-toggle {
  background: none; border: none; cursor: pointer;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.45); font-size: .7rem;
  transition: transform .25s, color .2s;
  border-radius: 6px;
}
.mob-toggle:hover { color: #3ec862; background: rgba(255,255,255,.06); }
.mob-toggle.open { transform: rotate(180deg); color: #3ec862; }

.mobile-sub { display: none; padding: 0 0 .75rem .75rem; }
.mobile-sub.open { display: block; }
.mobile-sub .mobile-nav-row { padding: .6rem 0; }
.mobile-sub .mobile-nav-row > a { font-size: .88rem; color: rgba(255,255,255,.7); border-left: 2px solid rgba(255,255,255,.1); padding-left: .75rem; }
.mobile-sub .mobile-nav-row > a:hover { color: #3ec862; border-left-color: #2EAC4F; }

.mobile-sub2 { display: none; padding: 0 0 .5rem 1rem; }
.mobile-sub2.open { display: block; }
.mobile-sub2 a {
  display: block; padding: .45rem .75rem;
  color: rgba(255,255,255,.55); font-size: .83rem;
  border-left: 1px solid rgba(255,255,255,.07);
  transition: all .2s;
}
.mobile-sub2 a:hover { color: #3ec862; border-left-color: #2EAC4F; padding-left: 1rem; }

.mobile-cat-label {
  display: block; font-size: .72rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: rgba(46,172,79,.65); padding: .6rem .5rem .2rem;
}

.mobile-menu .btn-devis-m {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  background: #2EAC4F; color: #fff; text-align: center;
  padding: .9rem; border-radius: 8px; font-weight: 700;
  margin-top: 1rem; font-size: .95rem;
  box-shadow: 0 4px 14px rgba(46,172,79,.35);
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1060px) {
  .nav-links { gap: 0; }
  .nav-links > li > a { padding: .5rem .6rem; font-size: .82rem; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
