/* Navbar partagée — structure Atlas pour tous les thèmes custom */
.th-header {
  position: sticky;
  top: 0;
  z-index: 50;
}
.th-header-bar {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between;
  height: 64px !important;
  max-height: 64px !important;
  gap: .75rem;
  overflow: visible;
}
.th-brand {
  display: flex !important;
  align-items: center;
  gap: .65rem;
  color: inherit;
  min-width: 0;
  flex: 0 0 auto;
  text-decoration: none;
}
.th-brand-logo {
  height: 40px !important;
  width: auto !important;
  max-width: 150px !important;
  object-fit: contain !important;
  object-position: left center;
  display: block !important;
}
.th-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.th-brand-name {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.th-nav-links {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end;
  gap: .85rem;
  flex: 1 1 auto;
  min-width: 0;
}
.th-nav-link {
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
}

.th-header-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: .5rem;
  flex: 0 0 auto;
  margin-left: .25rem;
}

.th-nav-phone {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 32px !important;
  padding: 0 .7rem !important;
  font-size: .75rem !important;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  box-sizing: border-box;
}
.th-nav-phone-in-menu { display: none !important; }

.th-user-chip {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #94a3b8 !important;
  background: #f1f5f9;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}
.th-avatar,
img.th-avatar {
  display: block !important;
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 999px !important;
  object-fit: cover !important;
  object-position: center !important;
  border: 0 !important;
}
.th-avatar-fallback {
  display: inline-flex !important;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1;
}

.th-logout-form {
  display: inline-flex !important;
  align-items: center;
  margin: 0;
  flex-shrink: 0;
}
.th-logout-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 32px !important;
  padding: 0 .7rem !important;
  background: transparent;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: .8rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
}
.th-login-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 32px !important;
  padding: 0 .9rem !important;
  border-radius: 6px;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  box-sizing: border-box;
}
.th-admin-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.th-nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid #94a3b8;
  border-radius: 6px;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 7px;
  cursor: pointer;
  flex-shrink: 0;
}
.th-nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
}

.th-nav-lang {
  display: inline-flex !important;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
}
.th-nav-lang .lang-switcher,
.th-nav-lang .relative {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.th-nav-lang .lang-switcher-btn {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: .3rem;
  height: 32px !important;
  padding: 0 .55rem !important;
  margin: 0;
  border: 1px solid #94a3b8 !important;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}
.th-nav-lang .lang-switcher-btn svg,
.th-nav-lang .lang-switcher-icon,
.th-nav-lang .lang-switcher-caret {
  display: block !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  flex-shrink: 0;
}
.th-nav-lang .lang-switcher-caret {
  width: 11px !important;
  height: 11px !important;
  min-width: 11px !important;
  max-width: 11px !important;
  min-height: 11px !important;
  max-height: 11px !important;
}
.th-nav-lang .lang-switcher-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 80;
  min-width: 10rem;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  padding: .25rem 0;
}
.th-nav-lang .lang-switcher-item {
  display: block;
  padding: .45rem .85rem;
  font-size: .875rem;
  text-decoration: none;
}
.th-nav-lang .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Tablette / desktop étroit : menu burger plus tôt pour éviter le wrap (Noir/Harbor) */
@media (max-width: 1100px) {
  .th-nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: .5rem 1rem 1rem;
    z-index: 60;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
  }
  .th-nav-links.is-open { display: flex !important; }
  .th-nav-links .th-nav-link {
    display: block;
    padding: .75rem .25rem;
    font-size: 1rem;
  }
  .th-nav-phone-bar { display: none !important; }
  .th-nav-phone-in-menu {
    display: inline-flex !important;
    margin-top: .5rem;
    align-self: flex-start;
  }
  .th-nav-toggle { display: flex !important; }
  .th-admin-pill { display: none !important; }
}
