/* ═══════════════════════════════════════════
   Navbar — Premium Design
   ═══════════════════════════════════════════ */

/* ─── Foundation ─── */
.ys-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.ys-nav__spacer {
  height: 4.5rem; /* matches .ys-navbar height */
}

/* Pages with is-bandeau hero: padding-top-large already accounts for the fixed navbar,
   so cancel the spacer to avoid double spacing. */
.ys-nav__spacer + .main-wrapper .section_hero.is-bandeau .padding-section-medium.padding-top-large {
  padding-top: 0;
}

/* ─── Bandeau ─── */
.ys-bandeau {
  background: linear-gradient(90deg, #0f172a 0%, #1a2744 50%, #0f172a 100%);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 0.5rem 1.5rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── Desktop Navbar ─── */
.ys-navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3.5rem;
  height: 4.5rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Home: transparent initially */
.ys-navbar--home {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

/* Non-home scrolled */
.ys-navbar--scrolled:not(.ys-navbar--home) {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
}

/* Home scrolled — white glass */
.ys-navbar--home.ys-navbar--scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
}

/* ─── Logo ─── */
.ys-navbar__logo {
  height: 34px;
  width: auto;
  transition: opacity 0.2s;
}

.ys-navbar__logo:hover {
  opacity: 0.8;
}

/* ─── Nav container ─── */
.ys-navbar__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─── Nav links ─── */
.ys-navbar__link {
  position: relative;
  padding: 0.5rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.ys-navbar__link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #3B82F6;
  border-radius: 1px;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.ys-navbar__link:hover {
  color: #0f172a;
}

.ys-navbar__link:hover::after,
.ys-navbar__link--active:hover::after {
  width: calc(100% - 1.75rem);
  left: 0.875rem;
}

.ys-navbar__link--active {
  color: #3B82F6;
}

/* Home scrolled — same dark text as default (white glass bg) */

/* ─── Dropdown ─── */
.ys-dropdown {
  position: relative;
}

/* Megamenu parent keeps relative positioning — panel is compact */

.ys-dropdown__trigger {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #334155;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.ys-dropdown__trigger:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.04);
}

/* Home scrolled — same dark text as default (white glass bg) */

.ys-dropdown__chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.ys-dropdown--open .ys-dropdown__chevron {
  transform: rotate(180deg);
}

/* ─── Simple dropdown panel (À propos) ─── */
.ys-dropdown__panel {
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.03),
    0 12px 32px rgba(0, 0, 0, 0.08);
  padding: 0.5rem;
  z-index: 100;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.ys-dropdown__panel::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 0;
  right: 0;
  height: 1rem;
}

.ys-dropdown--open .ys-dropdown__panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ys-dropdown__item {
  display: block;
  padding: 0.625rem 0.875rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.ys-dropdown__item:hover {
  background: #f8fafc;
  color: #0f172a;
}

/* ─── Megamenu — compact 2-col + tags footer ─── */
.ys-megamenu__panel {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 0.375rem);
  left: -1rem;
  transform: translateY(8px);
  width: 38rem;
  max-width: calc(100vw - 2rem);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.03),
    0 12px 32px rgba(0, 0, 0, 0.08);
  padding: 0.75rem;
  z-index: 100;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.ys-megamenu__panel::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 0;
  right: 0;
  height: 1rem;
}

.ys-dropdown--open .ys-megamenu__panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* 3 columns top + full-width bottom */
.ys-megamenu__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}

.ys-megamenu__col {
  padding: 0.5rem 0.5rem;
}

.ys-megamenu__col:first-child {
  padding-left: 0;
  border-right: 1px solid #f1f5f9;
}

.ys-megamenu__col:nth-child(2) {
  border-right: 1px solid #f1f5f9;
}

.ys-megamenu__col:nth-child(3) {
  padding-right: 0;
}

/* Secteurs + Technos — full width bottom */
.ys-megamenu__col:last-child {
  grid-column: 1 / -1;
  padding: 0.5rem 0 0.25rem;
  border-top: 1px solid #f1f5f9;
  border-right: none;
}


.ys-megamenu__col-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 0.375rem 0.625rem 0.25rem;
}


.ys-megamenu__link {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  padding: 0.4rem 0.625rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #334155;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.ys-megamenu__link:hover {
  background: #f1f5f9;
  color: #3B82F6;
}

.ys-megamenu__badge {
  font-size: 0.5rem;
  padding: 0.125rem 0.3rem;
  background: #eff6ff;
  color: #3B82F6;
  font-weight: 600;
  border-radius: 4px;
  margin-left: auto;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ys-megamenu__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem 0.375rem;
}

.ys-megamenu__tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  color: #475569;
  background: #f1f5f9;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.15s;
}

.ys-megamenu__tag:hover {
  background: #3B82F6;
  color: #fff;
}

.ys-megamenu__divider {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.6rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0.125rem 0.625rem 0;
  padding-bottom: 0.25rem;
}

/* ─── CTA Button ─── */
.ys-navbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  background: #3B82F6;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.ys-navbar__cta:hover {
  background: #2563EB;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}

.ys-navbar__cta:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.15);
}

/* ─── Burger button (mobile only) ─── */
.ys-navbar__burger {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.ys-navbar__burger-icon {
  width: 24px;
  height: 24px;
}

/* ─── Mobile overlay ─── */
.ys-mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0f172a;
  color: #fff;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.ys-mobile-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ys-mobile-overlay__logo {
  height: 24px;
}

.ys-mobile-overlay__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.ys-mobile-overlay__close-icon {
  width: 24px;
  height: 24px;
}

.ys-mobile-overlay__body {
  flex: 1;
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ys-mobile-overlay__link {
  display: block;
  padding: 0.875rem 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ys-mobile-overlay__heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  padding: 1.5rem 0 0.5rem;
}

.ys-mobile-overlay__sublink {
  display: block;
  padding: 0.5rem 0 0.5rem 0.75rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.15s;
}

.ys-mobile-overlay__sublink:hover {
  color: #fff;
}

.ys-mobile-overlay__cta {
  display: block;
  margin-top: 2rem;
  padding: 0.875rem;
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #fff;
  text-align: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ─── Responsive ─── */
@media (max-width: 991px) {
  .ys-navbar {
    padding: 0 1.25rem;
  }

  .ys-navbar__nav,
  .ys-navbar__cta {
    display: none;
  }

  .ys-navbar__burger {
    display: block;
  }
}

@media (min-width: 992px) {
  .ys-mobile-overlay {
    display: none !important;
  }
}

/* No responsive override needed — megamenu is already compact */

/* ─── Dark mode (contact page) ─── */
.ys-navbar--dark {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

.ys-navbar--dark .ys-navbar__link,
.ys-navbar--dark .ys-dropdown__trigger {
  color: rgba(255, 255, 255, 0.85);
}

.ys-navbar--dark .ys-navbar__link:hover,
.ys-navbar--dark .ys-dropdown__trigger:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.ys-navbar--dark .ys-dropdown__chevron {
  color: rgba(255, 255, 255, 0.5);
}

.ys-navbar--dark .ys-navbar__cta {
  background: #fff;
  color: #151d53;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ys-navbar--dark .ys-navbar__cta:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Dark mode scrolled — revert to white glass */
.ys-navbar--dark.ys-navbar--scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
}

.ys-navbar--dark.ys-navbar--scrolled .ys-navbar__link,
.ys-navbar--dark.ys-navbar--scrolled .ys-dropdown__trigger {
  color: #334155;
}

.ys-navbar--dark.ys-navbar--scrolled .ys-navbar__link:hover,
.ys-navbar--dark.ys-navbar--scrolled .ys-dropdown__trigger:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.04);
}

.ys-navbar--dark.ys-navbar--scrolled .ys-navbar__cta {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: #fff;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2), 0 4px 12px rgba(37, 99, 235, 0.15);
}
