/* ==========================================================================
   NAVBAR — Executive Suite Navigation & Menu
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 250, 250, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

/* Navbar claire au scroll (par défaut) */
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Thème Sombre (Pages Univers, DMR, Telecoms)
   ========================================================================== */

/* 1. Transparence totale au top pour fusionner avec le Hero sombre */
.navbar.navbar-dark-top:not(.scrolled) {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

/* 2. Glassmorphism Navy au scroll pour conserver l'univers */
.navbar.navbar-dark-top.scrolled {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

/* 3. Maintenir les liens et éléments en blanc sur le thème sombre (au top ET au scroll) */
.navbar.navbar-dark-top .nav-links a:not(.nav-cta):not(.nav-guide-top):not(.nav-cart) {
  color: rgba(255, 255, 255, 0.88);
}

.navbar.navbar-dark-top .nav-links a:not(.nav-cta):not(.nav-guide-top):not(.nav-cart):hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.16);
}

.navbar.navbar-dark-top .nav-links a.nav-active:not(.nav-cta):not(.nav-guide-top):not(.nav-cart) {
  background: var(--orange) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border: 1px solid transparent !important;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35) !important;
}

.navbar.navbar-dark-top .nav-toggle span {
  background: #ffffff;
}

/* Logo blanc sur les pages à en-tête sombre */
.navbar.navbar-dark-top .nav-logo img {
  filter: brightness(0) invert(1);
}

/* Ajustement du bouton panier pour qu'il soit visible sur fond sombre */
.navbar.navbar-dark-top .nav-cart {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
.navbar.navbar-dark-top .nav-cart:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* ==========================================================================
   Thème Clair et Structure
   ========================================================================== */

/* Navbar claire au sommet (Boutique, Devis, etc.) */
.navbar.navbar-light-top:not(.scrolled) {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 94px;
  transition: height var(--transition);
}

.navbar.scrolled .nav-container {
  height: 76px;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 76px;
  width: auto;
  transition: height var(--transition);
}

.navbar.scrolled .nav-logo img {
  height: 60px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 24px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-links a {
  padding: 8px 12px;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 50px;
  transition: all var(--transition-fast);
  white-space: nowrap !important;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 38px;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--border-light);
}

.nav-cta {
  background: var(--text) !important;
  color: #ffffff !important;
  padding: 8px 18px !important;
  font-size: 0.9em !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
  border: 1px solid transparent !important;
  white-space: nowrap !important;
  flex-shrink: 0;
  display: inline-flex !important;
  align-items: center !important;
  height: 40px !important;
}

.nav-cta:hover {
  background: var(--orange) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 22px rgba(255, 107, 0, 0.3) !important;
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   Menu Déroulant (Dropdown Services)
   ========================================================================== */
.nav-dropdown {
  position: relative;
}

.nav-drop-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-drop-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 1001;
}

.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown:focus-within .nav-drop-menu,
.nav-dropdown.dropdown-open .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-drop-menu li {
  margin-bottom: 4px;
}
.nav-drop-menu li:last-child {
  margin-bottom: 0;
}

/* Correction Bug Blanc sur Blanc : on force la couleur sombre !important */
.nav-links .nav-drop-menu a {
  display: block;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text) !important; 
  background: transparent !important;
  border: 1px solid transparent;
}

.nav-links .nav-drop-menu a:hover {
  background: var(--bg-subtle) !important;
  border-color: var(--border-light);
  color: var(--orange) !important;
  transform: translateX(4px);
}

/* ==========================================================================
   Guide d'Aide au Choix, Panier et Toast
   ========================================================================== */

/* ---- Nav : Guide d'aide au choix ---- */
.nav-guide-top {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: var(--bg-subtle, #f8fafc) !important;
  color: var(--text) !important;
  font-size: 0.9em !important;
  font-weight: 700 !important;
  padding: 8px 16px !important;
  height: 40px !important;
  border-radius: 50px !important;
  border: 1px solid var(--border, #e2e8f0) !important;
  position: relative;
  overflow: hidden;
  white-space: nowrap !important;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.navbar.navbar-dark-top .nav-guide-top:not(.nav-active) {
  background: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

.nav-guide-top:not(.nav-active):hover {
  background: rgba(255, 107, 0, 0.14) !important;
  border-color: var(--orange) !important;
  color: var(--orange) !important;
  transform: translateY(-2px);
}

.guide-icon {
  font-size: 1.1em;
  animation: guideBounce 2s infinite ease-in-out;
}

@keyframes guideBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.guide-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: dotBlink 1.5s infinite alternate;
}

@keyframes dotBlink {
  0% { opacity: 0.4; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.3); }
}

/* ---- Onglet sélectionné (Active Tab) ---- */
.nav-links a.nav-active:not(.nav-guide-top) {
  background: var(--orange) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border: 1px solid transparent !important;
  box-shadow: 0 4px 14px rgba(255, 107, 0, 0.28) !important;
}

.nav-guide-top.nav-active {
  background: linear-gradient(135deg, #ff6b00, #ea580c) !important;
  color: #ffffff !important;
  border: 1px solid #ffffff !important;
  box-shadow: 0 4px 16px rgba(255, 107, 0, 0.5) !important;
}

.nav-guide-top.nav-active .guide-icon,
.nav-guide-top.nav-active .guide-text {
  color: #ffffff !important;
}

/* ---- Nav : panier devis ---- */
.nav-cart {
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 8px 14px !important;
  height: 40px !important;
  border: 1px solid var(--border) !important;
  border-radius: 50px !important;
  background: var(--bg-white) !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.nav-cart:hover {
  border-color: var(--text) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--orange);
  color: #fff;
  border-radius: 20px;
  font-size: 0.74em;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(255, 107, 0, 0.4);
}

.cart-count.is-empty {
  background: var(--border);
  color: var(--text-muted);
  box-shadow: none;
}

/* ---- Toast panier Executive ---- */
.cart-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 150%);
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(92vw, 560px);
  background: var(--text);
  color: #fff;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-xl);
  font-size: 0.94em;
  z-index: 2000;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-toast.visible {
  transform: translate(-50%, 0);
}

.cart-toast svg {
  color: var(--green);
  flex-shrink: 0;
}

.cart-toast-link {
  color: var(--orange);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 4px;
}
/* ==========================================================================
   RESPIRATION & RESPONSIVE DU HEADER
   1) Le logo n'avait pas de flex-shrink : à 1024px, flexbox le compressait
      jusqu'à 26px de large (au lieu de 179px).
   2) Un gap de 4px collait les entrées les unes aux autres.
   3) Le menu horizontal réclame ~1150px (logo + 7 entrées dont la pastille
      « Guide d'Aide au Choix », 230px à elle seule) alors que le burger
      n'apparaissait qu'à 768px : toute la plage 769–1200px était écrasée.
   ========================================================================== */
.nav-logo {
  flex-shrink: 0;
}

/* Les hauteurs fixes (106/84px) étaient calibrées sur l'ancien logo de 96px :
   avec un logo de 70px la barre paraissait vide et massive. */
.nav-container {
  height: 88px;
}

.navbar.scrolled .nav-container {
  height: 74px;
}

.nav-logo img {
  height: 70px;
}

.navbar.scrolled .nav-logo img {
  height: 58px;
}

.nav-links {
  gap: 10px;
}

@media (max-width: 1200px) {
  .nav-container {
    height: 80px;
  }

  .nav-logo img,
  .navbar.scrolled .nav-logo img {
    height: 62px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }

  .nav-actions {
    margin-left: auto;
    gap: 10px;
  }

  .nav-links.open,
  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    border-radius: var(--radius-md);
  }

  .nav-cta {
    text-align: center;
    margin-top: 10px;
  }

  .nav-guide-top {
    justify-content: center !important;
    text-align: center !important;
    margin: 6px 0 !important;
  }

  /* Le panneau déroulant est blanc : sur les pages à en-tête sombre, les liens
     blancs y seraient invisibles. */
  .navbar.navbar-dark-top .nav-links a:not(.nav-cta):not(.nav-guide-top):not(.nav-cart) {
    color: #0F172A;
  }
}

/* ==========================================================================
   Bouton et Modale de Recherche Globale (Ctrl+K)
   ========================================================================== */
.nav-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--bg-white, #ffffff);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.nav-search-trigger:hover {
  border-color: var(--orange);
  background: var(--orange-light, #fff7ed);
  color: var(--orange);
  box-shadow: 0 2px 8px rgba(255, 107, 0, 0.2);
  transform: translateY(-2px);
}
.navbar.navbar-dark-top .nav-search-trigger {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
.navbar.navbar-dark-top .nav-search-trigger:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
}

/* Modale Backdrop & Box */
.sizeg-search-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 40px;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.sizeg-search-modal-backdrop[hidden] {
  display: none !important;
}
.sizeg-search-modal-box {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 140px);
  animation: sizegSearchSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes sizegSearchSlideDown {
  0% { transform: translateY(-20px) scale(0.98); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.sizeg-search-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  color: var(--orange);
}
#sizegSearchInput {
  flex: 1;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text, #0f172a);
  font-family: inherit;
  background: transparent;
}
#sizegSearchInput:focus {
  outline: none;
}
#sizegSearchInput::placeholder {
  color: #94a3b8;
  font-weight: 500;
}
.sizeg-search-close {
  background: #f1f5f9;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sizeg-search-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.sizeg-search-results {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sizeg-search-hint,
.sizeg-search-empty {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
  font-size: 0.96rem;
  line-height: 1.6;
}
.search-section-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #94a3b8;
  margin: 10px 4px 6px;
}
.search-result-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.2s ease;
}
.search-result-card:hover {
  background: #ffffff;
  border-color: var(--orange);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateX(4px);
}
.search-result-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff7ed;
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.search-result-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
  padding: 4px;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.search-result-info {
  flex: 1;
  min-width: 0;
}
.search-result-title {
  font-weight: 800;
  font-size: 0.98rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-contact { background: #fee2e2; color: #dc2626; }
.badge-devis { background: #ffedd5; color: #ea580c; }
.badge-expertise { background: #dbeafe; color: #2563eb; }
.badge-guide { background: #fef3c7; color: #d97706; }
.badge-catalogue, .badge-product { background: #f1f5f9; color: #475569; }
.badge-société { background: #e0e7ff; color: #4f46e5; }
.search-result-desc {
  font-size: 0.84rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.search-result-arrow {
  color: #cbd5e1;
  transition: transform 0.2s ease, color 0.2s ease;
}
.search-result-card:hover .search-result-arrow {
  color: var(--orange);
  transform: translateX(3px);
}
.sizeg-search-modal-footer {
  padding: 12px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--border-light, #e2e8f0);
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #64748b;
}
.sizeg-search-modal-footer span strong {
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 4px;
  color: #334155;
  margin-right: 4px;
}
@media (max-width: 640px) {
  .sizeg-search-modal-backdrop {
    padding: 20px 10px;
  }
  .sizeg-search-modal-box {
    max-height: calc(100vh - 40px);
  }
  .sizeg-search-modal-footer {
    display: none;
  }
}
