/* ==========================================================================
   CSS NAVIGATION DENTALSOFT (GRILLE, DESKTOP & MOBILE DRILLDOWN)
   ========================================================================== */

/* --- RESET & COMMONS --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* --- CONTENEUR GRILLE GLOBALE --- */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99999;
  justify-content: center;
  display: grid;
  grid-template-columns: 
    calc(var(--padding-responsive, 0px) + clamp(20px, 2vw, 30px)) 
    minmax(0, 105rem) 
    calc(var(--padding-responsive, 0px) + clamp(20px, 2vw, 30px));
}

/* --- LOGO --- */
.logo { 
  display: inline-flex; 
  align-items: center; 
}

.logo svg { 
  height: 48px; 
  width: auto; 
  display: block; 
}

@media screen and (max-width: 991px) {
  .logo svg { 
    height: 32px; 
  }
}

/* --- HEADER PRINCIPAL --- */
.site-header {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: visible;
  position: relative;
  height: 80px;
  padding: 0 32px;
  background: transparent;
  z-index: 100000;
}

/* Flou arrière-plan du header */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0 0 var(--dentalsoft-radius, 12px) var(--dentalsoft-radius, 12px);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: -1;
  pointer-events: none;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.site-header:has(.is-open)::before {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: none;
  transition: background 0.2s ease;
}

/* --- NAVIGATION DESKTOP --- */
.desktop-menu {
  display: flex;
  gap: 32px;
  height: 100%;
  align-items: center;
}

.nav-desktop {
  margin-left: auto;
  margin-right: 50px;
}

.desktop-menu > li {
  height: 100%;
  display: flex;
  align-items: center;
}

.desktop-menu > li > a { 
  font-weight: 400; 
  font-family: var(--dentalsoft-outfit, sans-serif);
  font-size: 20px; 
  color: var(--dentalsoft-color-noir, #0f172a); 
  transition: color 0.15s ease; 
  cursor: pointer; 
}

.desktop-menu > li:hover > a,
.desktop-menu > li.is-open > a {
  color: var(--dentalsoft-color-bleu, #0284c7);
}

/* Icône Accueil */
.home-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.home-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  transition: stroke 0.15s ease, transform 0.15s ease;
}

.home-icon-link:hover .home-icon {
  transform: scale(1.08);
}

.arrow { 
  font-size: 11px; 
  margin-left: 4px; 
  display: inline-block; 
  transition: transform 0.2s ease; 
}

.desktop-menu > li.is-open .arrow {
  transform: rotate(180deg);
}

/* --- 1. MÉGA-MENU (SOLUTIONS CABINETS : 3 COLONNES) --- */
.has-megamenu {
  position: static !important;
}

.megamenu-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: none;
  box-shadow: 0 25px 45px -10px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
}

.has-megamenu.is-open .megamenu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.megamenu-grid {
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 36px;
  align-items: stretch;
}

.col-hub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05); 
}

.hub-icon { 
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;  
  height: 28px;
  flex-shrink: 0;
}

.hub-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  color: var(--dentalsoft-color-noir, #0f172a); 
  transition: color 0.15s ease;
}

.col-hub-header:hover .hub-icon svg {
  color: var(--dentalsoft-color-orange, #ea580c);
}

.col-hub-header strong {
  display: block;
  font-size: 18px;
  color: var(--dentalsoft-color-noir, #0f172a);
  transition: color 0.15s ease;
}

.hub-sub {
  font-size: 15px;
  color: #64748b;
}

.col-hub-header:hover strong {
  color: var(--dentalsoft-color-orange, #ea580c);
}

.sublink-list li {
  margin-bottom: 10px;
}

.sublink-list a {
  font-size: 17px;
  font-weight: 300;
  color: var(--dentalsoft-color-noir, #0f172a);
  display: block;
  transition: color 0.15s ease;
}

.sublink-list a:hover {
  color: var(--dentalsoft-color-bleu, #0284c7);
}

/* Couleurs badges produits */
.product-box.is-orthalis { background-color: var(--dentalsoft-color-orange, #ea580c); }
.product-box.is-ortholeader { background-color: var(--dentalsoft-color-ortholeader, #2563eb); }
.product-box.is-orthokis { background-color: var(--dentalsoft-color-orthokis, #059669); }
.product-box.is-dentapoche { background-color: var(--dentalsoft-color-dentapoche, #7c3aed); }

.sublink-list.product-list li {
  margin-bottom: 12px;
}

.sublink-list.product-list a {
  display: flex;
  align-items: center;
  gap: 14px;
}

.product-box {
  width: 38px;
  height: 38px;
  color: #fff;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: opacity 0.15s ease;
}

.product-box svg {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

.product-name {
  font-size: 17px;
  font-weight: 500;
  color: var(--dentalsoft-color-noir, #0f172a);
  transition: color 0.15s ease;
}

.sublink-list.product-list a:hover .product-box {
  opacity: 0.88;
}

.sublink-list.product-list a:hover .product-name {
  color: var(--dentalsoft-color-bleu, #0284c7);
}

/* --- COLONNE 3 : CARTE PROMOTIONNELLE --- */
.col-promo {
  display: flex;
}

.megamenu-promo-card {
  position: relative;
  width: 100%;
  min-height: 290px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  text-decoration: none;
  box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.12);
  isolation: isolate;
  background-color: #0f172a;
}

.promo-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.promo-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

.promo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.05) 0%,
    rgba(15, 23, 42, 0.6) 45%,
    rgba(15, 23, 42, 0.94) 100%
  );
  transition: opacity 0.3s ease;
}

.promo-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.promo-title {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  margin: 0;
}

.promo-desc {
  font-size: 13px;
  line-height: 1.4;
  color: #cbd5e1;
  margin: 0;
}

.promo-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin-top: 6px;
  transition: color 0.15s ease;
}

.cta-arrow {
  transition: transform 0.2s ease;
}

.megamenu-promo-card:hover .promo-bg img {
  transform: scale(1.06);
}

.megamenu-promo-card:hover .promo-cta {
  color: var(--dentalsoft-color-bleu);
}

.megamenu-promo-card:hover .cta-arrow {
  transform: translateX(4px);
}

/* --- 2. DROPDOWNS STANDARDS (SERVICES & LA SOCIÉTÉ) --- */
.has-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  padding: 16px 20px;
  z-index: 1000;
}

.has-dropdown.is-open .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-simple {
  min-width: 250px;
  left: 0;
}

.dropdown-panel ul li {
  margin-bottom: 8px;
}

.dropdown-panel ul li:last-child {
  margin-bottom: 0;
}

.dropdown-panel ul li a {
  font-size: 17px;
  font-weight: 300;
  color: #334155;
  transition: color 0.15s ease;
  display: block;
  padding: 4px 0;
  white-space: nowrap;
}

.dropdown-panel ul li a:hover {
  color: var(--dentalsoft-color-bleu, #0284c7);
}

/* ==========================================================================
   NAVIGATION MOBILE & PLEIN ÉCRAN
   ========================================================================== */
.burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  position: relative;
  z-index: 100001;
  pointer-events: auto;
}

.burger-btn .bar {
  width: 26px;
  height: 2px;
  background-color: #0f172a;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger-btn.is-active .bar:first-child {
  transform: translateY(8px) rotate(45deg);
}

.burger-btn.is-active .bar:last-child {
  transform: translateY(0px) rotate(-45deg);
}

.fullscreen-menu {
  grid-column: 1 / -1;
  position: fixed;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100vh;
  height: 100dvh;
  background: #ffffff;
  z-index: 99990;
  overflow: hidden;
  display: none;
  padding-top: 110px;
  box-sizing: border-box !important;
}

.fullscreen-menu.is-open { 
  display: block !important; 
}

.drilldown-container {
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

.drilldown-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100%;
  padding: 16px 24px 32px 24px !important;
  box-sizing: border-box !important;
  background: #ffffff;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.25s ease;
}

.drilldown-screen.is-active {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.drilldown-screen.is-shifted {
  transform: translateX(-25%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.mobile-nav-list,
.drilldown-screen ul {
  list-style: none !important;
  margin: 0 0 24px 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.mobile-nav-list li {
  border-bottom: 1px solid #f1f5f9;
  width: 100%;
}

.drilldown-trigger,
.mobile-nav-link-direct {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  color: #0f172a;
  text-align: left;
  box-sizing: border-box;
}

.arrow-right {
  font-size: 18px;
  color: #94a3b8;
}

.trigger-label {
  display: flex;
  align-items: center;
  gap: 14px;
}

.trigger-label strong {
  display: block;
  font-size: 16px;
  color: #0f172a;
}

.trigger-sub {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dentalsoft-color-bleu, #0284c7);
  background: none;
  border: none;
  margin-bottom: 18px;
  cursor: pointer;
}

.screen-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 16px;
  color: #0f172a;
}

.category-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 18px 0 8px;
  display: block;
}

.screen-scroll {
  width: 100%;
  padding: 0;
  margin: 0;
}

.hub-main-cta {
  display: block;
  text-align: center;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: var(--dentalsoft-color-bleu, #0284c7);
  font-weight: 600;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
}

.mobile-links-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 0;
  margin: 0;
}

.mobile-link-item {
  padding: 14px 16px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  font-size: 16px;
  font-weight: 500;
  color: var(--dentalsoft-color-noir, #0f172a);
  width: 100%;
  box-sizing: border-box;
  display: block;
}

.mobile-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 24px;
}

.btn-mobile-primary {
  background: var(--dentalsoft-color-bleu, #0284c7);
  color: #fff;
  text-align: center;
  padding: 14px;
  border-radius: 8px;
  font-weight: 600;
}

.btn-mobile-secondary {
  background: #f8fafc;
  color: #0f172a;
  text-align: center;
  padding: 14px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

/* ==========================================================================
   BASCULE RESPONSIVE (< 992px)
   ========================================================================== */
@media screen and (max-width: 991px) {
  .nav-container {
    position: fixed;
    width: -webkit-fill-available;
    max-width: 100%;
    justify-content: center;
    margin: 0px var(--dentalsoft-responsive-margin-3o, 0px);
    display: block;
  }
  
  #dentalsoft-nav .site-header {
    height: 70px !important;
    padding: 0 20px !important;
  }
  
  #dentalsoft-nav .nav-desktop,
  #dentalsoft-nav .desktop-only { 
    display: none !important; 
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  #dentalsoft-nav .burger-btn { 
    display: flex !important; 
    visibility: visible !important;
  }
  
  #dentalsoft-nav .fullscreen-menu {
    padding-top: 96px !important;
  }
}