/* =======================================================
   Softadastra Header (Amazon-style, NO LOGO IMAGES) — FULL CSS
   - Menu icon + "Softadastra.com" shown on ALL sizes
   - Logo images hidden/unused
   - Mobile: top row (menu + Softadastra.com | user + cart) + search below (block)
   - Desktop: single fixed bar (60px), search centered, with mid-width fix
   Palette:
     Top bar: #131921 | Text: #fff | Search btn: #febd69 (hover #f3a847)
     Cart badge: #f08804 | Border hover: #3a4553
======================================================= */

:root {
  /* --- Couleurs principales (topbar) --- */
  --sa-topbar: #ffffff; /* fond blanc */
  --sa-text: #212121; /* texte noir-gris */
  --sa-muted: #707070; /* texte gris atténué */
  --sa-border: #e6e6e6; /* bordures claires */

  /* --- Recherche (Softadastra) --- */
  --sa-search: #ff9900; /* orange Softadastra */
  --sa-search-hover: #e68900; /* orange foncé */

  /* --- Badge notifications --- */
  --sa-badge: #ff4d6d; /* rose Vinted */

  /* --- Sous-nav --- */
  --sa-subnav: #ffffff; /* fond blanc */
  --sa-subnav-hover: #f5f5f5; /* gris clair hover */
  --sa-subnav-text: #212121; /* texte foncé */
  --sa-subnav-sep: rgba(0, 0, 0, 0.08);
}

/* Forcer le texte / icônes du header à être visibles sur fond blanc */
.softadastra-header a,
.softadastra-header i,
.softadastra-subnav a {
  color: var(--sa-text) !important;
}

.softadastra-header a:hover,
.softadastra-subnav a:hover {
  color: var(--sa-search) !important;
}

/* Icônes spécifiques */
.softadastra-cart-icon,
.softadastra-search-icon {
  filter: none; /* supprime inversion prévue pour fond sombre */
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Wrapper global */
.softadastra-navbar {
  position: relative;
  z-index: 1000;
}

/* ===== Base (mobile-first) ===== */
.softadastra-header {
  background: var(--sa-topbar);
  color: var(--sa-text);
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  padding: 8px 10px;
  z-index: 1000;
}

/* Row 1 */
.softadastra-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Left cluster */
.softadastra-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Menu button (always visible) */
.softadastra-menu-btn {
  background: transparent;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.softadastra-menu-btn:hover {
  border-color: var(--sa-border);
}

/* Brand text (ALWAYS visible) */
.softadastra-brand {
  display: inline-block;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.softadastra-brand span {
  color: var(--sa-muted);
  font-weight: 600;
}

/* Hide logo images on ALL sizes */
.softadastra-header-link--desktop {
  display: none !important;
}
.softadastra-logo,
.softadastra-logo-mobile {
  display: none !important;
}

/* Right cluster */
.softadastra-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile sign-in icon (visible on mobile; hidden on desktop later) */
.softadastra-signin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
}
.softadastra-signin-icon:hover {
  border-color: var(--sa-border);
}

/* Profile dropdown (desktop only) */
.softadastra-profile-wrapper {
  display: none;
  position: relative;
}
.softadastra-profile-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #ddd;
  transition: background 0.2s ease;
}
.softadastra-profile-link:hover {
  background: rgba(255, 255, 255, 0.06);
}
.softadastra-profile-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.softadastra-icon-dropdown {
  font-size: 14px;
  color: #ccc;
  transition: transform 0.2s ease;
}

.softadastra-profile-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 40px;
  background: #fff;
  color: #111;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  z-index: 999;
  padding: 8px 0;
}
.softadastra-profile-dropdown a {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: #111;
  font-size: 14px;
}
.softadastra-profile-dropdown a:hover {
  background: #f6f6f6;
}

/* Login desktop (hidden on mobile) */
.softadastra-login-desktop {
  display: none !important;
}
.softadastra-login-link {
  display: inline-flex;
  align-items: center;
  color: #111;
  background: var(--sa-search);
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s ease;
  margin-top: 8px;
}
.softadastra-login-link:hover {
  background: var(--sa-search-hover);
  color: #111;
}
.login-none {
  display: none;
} /* hidden on mobile */

/* Cart */
.softadastra-cart-link {
  color: #fff;
  display: flex;
  align-items: center;
  position: relative;
}
.softadastra-cart-icon {
  width: 42px;
}
.softadastra-cart-quantity {
  color: var(--sa-badge);
  font-size: 14px;
  font-weight: 700;
  position: absolute;
  top: 2px;
  left: 18px;
  width: 22px;
  text-align: center;
}

/* Row 2 (search full-width on mobile) */
.softadastra-header-bottom {
  margin-top: 8px;
}
.softadastra-header-middle {
  display: flex;
  width: 100%;
}
.softadastra-search-input {
  flex: 1;
  width: 0;
  font-size: 16px;
  height: 44px;
  padding: 0 15px;
  border: none;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  background: #fff;
  color: #111;
}
.softadastra-search-input::placeholder {
  color: #666;
}
.softadastra-search-btn {
  background: var(--sa-search);
  border: none;
  width: 45px;
  height: 44px;
  flex-shrink: 0;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
  cursor: pointer;
}
.softadastra-search-btn:hover {
  background: var(--sa-search-hover);
}
.softadastra-search-btn:active {
  transform: translateY(1px);
}
.softadastra-search-icon {
  height: 22px;
  margin-left: 2px;
  margin-top: 3px;
}

/* Push page content below fixed header (mobile height ~ 112px) */
body.has-sa-header {
  padding-top: 112px;
}

/* ===== Desktop (>= 992px) ===== */
@media (min-width: 992px) {
  /* Single bar 60px */
  .softadastra-header {
    padding: 0 14px;
    height: 60px;
  }

  /* Top row: left + right */
  .softadastra-header-top {
    position: relative;
    display: flex;
    align-items: center;
    height: 60px;
  }

  .softadastra-header-left {
    gap: 10px;
  }
  .softadastra-header-right {
    margin-left: auto;
    justify-content: flex-end;
    gap: 10px;
  }

  /* Search centered horizontally; full width of header but clamped by max-width */
  .softadastra-header-bottom {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0;
  }
  .softadastra-header-middle {
    display: flex;
    max-width: 850px;
    margin: 0 auto;
  }
  .softadastra-search-input {
    height: 40px;
  }
  .softadastra-search-btn {
    height: 40px;
  }

  /* Show desktop-only blocks */
  .softadastra-profile-wrapper {
    display: inline-block;
  }
  .softadastra-login-desktop {
    display: block !important;
  }
  .login-none {
    display: inline;
  }

  /* Hide mobile-only icon on desktop */
  .softadastra-signin-icon {
    display: none;
  }

  /* Brand stays visible on desktop (per request) */
  .softadastra-brand {
    display: inline-block;
    font-size: 20px;
  }

  /* Cart bigger on desktop */
  .softadastra-cart-icon {
    width: 50px;
  }
  .softadastra-cart-quantity {
    top: 4px;
    left: 22px;
    width: 26px;
    font-size: 16px;
  }

  /* Page offset: 60px bar */
  body.has-sa-header {
    padding-top: 60px;
  }
}

/* ===== Mid-width fix (992px → 1220px): reduce search width so login doesn't overlap ===== */
@media (min-width: 992px) and (max-width: 1220px) {
  .softadastra-header-middle {
    max-width: 600px;
  }
}

/* ===== Mobile (<= 991px): top-row + search below ===== */
@media (max-width: 991px) {
  .softadastra-header {
    display: block;
    height: auto;
    padding: 8px 10px;
  }

  .softadastra-header-top {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .softadastra-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .softadastra-header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .softadastra-header-bottom {
    margin-top: 8px;
  }
  .softadastra-header-middle {
    display: flex;
    width: 100%;
  }
  .softadastra-search-input {
    height: 44px;
  }
  .softadastra-search-btn {
    height: 44px;
  }

  .softadastra-cart-icon {
    width: 50px;
  }
}

/* ===== Focus styles (a11y) ===== */
.softadastra-menu-btn:focus,
.softadastra-brand:focus,
.softadastra-signin-icon:focus,
.softadastra-header-link:focus,
.softadastra-login-link:focus {
  outline: 2px solid #f90;
  outline-offset: 2px;
}

/* Fix centrage du nombre du panier */
.softadastra-cart-quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1; /* empêche le décalage vertical */
  font-size: 12px; /* taille du texte */
  font-weight: bold;
  width: 18px; /* cercle ajusté */
  height: 18px;
  border-radius: 50%;
  background-color: #ff9900; /* couleur badge Amazon */
  color: #fff;
  position: absolute;
  top: -6px;
  right: -6px;
}

/* ===== Subnav (style Amazon) ===== */
.softadastra-subnav {
  background: var(--sa-subnav);
  color: var(--sa-subnav-text);
  position: sticky;
  top: 0;
  /* Collé juste en dessous du header */
  z-index: 999;
  border-bottom: 1px solid var(--sa-subnav-sep);
  margin: 0;
  /* Supprime tout espace externe */
  padding: 0;
  /* Supprime tout espace interne vertical inutile */
}

/* rangée scrollable en mobile */
.softadastra-subnav-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.softadastra-subnav-row::-webkit-scrollbar {
  display: none;
}

.softadastra-subnav-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  font-weight: 700;
}

.softadastra-subnav-burger {
  font-size: 16px;
  line-height: 1;
}

.softadastra-subnav-all:hover {
  background: var(--sa-subnav-hover);
}

.softadastra-subnav-link {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.softadastra-subnav-link:hover {
  background: var(--sa-subnav-hover);
}

/* === Subnav collée au header (comme Amazon) === */
.softadastra-subnav {
  background: var(--sa-subnav);
  color: var(--sa-subnav-text);
  position: sticky;
  /* top: 60px; */
  /* hauteur du header desktop */
  z-index: 999;
  /* sous le header (qui est à 1000) */
  border-bottom: 1px solid var(--sa-subnav-sep);
  margin: 0;
  padding: 0;
}

/* Mobile : header est plus haut (header sur 2 lignes) */
@media (max-width: 991px) {
  .softadastra-subnav {
    top: 112px;
  }
}
/* ===== Subnav collée au header (fixed sous le header) ===== */

/* Hauteurs explicites pour éviter les surprises */
:root {
  --sa-header-h-desktop: 60px;
  --sa-header-h-mobile: 112px; /* ton header sur 2 lignes */
  --sa-subnav-h-desktop: 40px;
  --sa-subnav-h-mobile: 44px;
}

/* Subnav FIXED sous le header */
.softadastra-subnav {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--sa-header-h-desktop); /* colle juste sous le header desktop */
  background: var(--sa-subnav);
  color: var(--sa-subnav-text);
  z-index: 999; /* juste sous le header (qui est à 1000) */
  border-bottom: 1px solid var(--sa-subnav-sep);
  margin: 0;
  padding: 0;
}

/* Ligne de liens avec hauteur fixe */
.softadastra-subnav-row {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--sa-subnav-h-desktop);
  padding: 0 10px; /* horizontal seulement */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.softadastra-subnav-row::-webkit-scrollbar {
  display: none;
}

/* Mobile: header plus haut + subnav un peu plus haute */
@media (max-width: 991px) {
  .softadastra-subnav {
    top: var(--sa-header-h-mobile); /* colle sous le header mobile */
  }
  .softadastra-subnav-row {
    height: var(--sa-subnav-h-mobile);
  }
}

/* IMPORTANT: pousser le contenu (header + subnav) */
body.has-sa-header {
  padding-top: calc(var(--sa-header-h-desktop) + var(--sa-subnav-h-desktop));
}
@media (max-width: 991px) {
  body.has-sa-header {
    padding-top: calc(var(--sa-header-h-mobile) + var(--sa-subnav-h-mobile));
  }
}

/* (Optionnel) style des liens si tu les as pas déjà définis */
.softadastra-subnav-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  font-weight: 700;
}
.softadastra-subnav-all:hover {
  background: var(--sa-subnav-hover);
}
.softadastra-subnav-burger {
  font-size: 16px;
  line-height: 1;
}

.softadastra-subnav-link {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.softadastra-subnav-link:hover {
  background: var(--sa-subnav-hover);
}
/* Mesures dynamiques (valeurs par défaut desktop) */
:root {
  --sa-header-current: 60px; /* sera mis à jour via JS */
  --sa-subnav-current: 40px; /* idem */
}

/* Subnav collée sous le header (zéro espace) */
.softadastra-subnav {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--sa-header-current); /* colle sous la hauteur réelle du header */
  z-index: 999;
  background: var(--sa-subnav);
  color: var(--sa-subnav-text);
  border-bottom: 1px solid var(--sa-subnav-sep);
  margin: 0;
  padding: 0;
}

/* Ligne de liens : pas de padding vertical, hauteur fixe */
.softadastra-subnav-row {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--sa-subnav-current);
  padding: 0 10px; /* horizontal only */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.softadastra-subnav-row::-webkit-scrollbar {
  display: none;
}

/* Le contenu de page est poussé sous header+subnav (calculé par JS) */
body.has-sa-header {
  padding-top: calc(var(--sa-header-current) + var(--sa-subnav-current));
}
/* === Hauteurs fixes comme Amazon === */
:root {
  --sa-header-h-desktop: 60px; /* header barre unique */
  --sa-header-top-mobile: 60px; /* rangée icônes */
  --sa-header-search-mobile: 44px; /* search */
  --sa-header-gap-mobile: 8px; /* espace entre les 2 rangées */
  --sa-header-h-mobile: calc(
    var(--sa-header-top-mobile) + var(--sa-header-gap-mobile) +
      var(--sa-header-search-mobile)
  );

  --sa-subnav-h-desktop: 40px;
  --sa-subnav-h-mobile: 44px;
}

/* === Header: on impose explicitement les hauteurs === */
@media (min-width: 992px) {
  .softadastra-header {
    height: var(--sa-header-h-desktop) !important;
    padding: 0 14px !important;
  }
  .softadastra-header-top {
    height: var(--sa-header-h-desktop) !important;
    align-items: center;
  }
  .softadastra-header-bottom {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin-top: 0 !important;
  }
  .softadastra-search-input {
    height: 40px;
  }
  .softadastra-search-btn {
    height: 40px;
  }
}

@media (max-width: 991px) {
  .softadastra-header {
    height: var(--sa-header-h-mobile) !important; /* 60 + 8 + 44 = 112px */
    padding: 8px 10px !important;
  }
  .softadastra-header-top {
    height: var(--sa-header-top-mobile) !important; /* 60px */
    align-items: center;
  }
  .softadastra-header-bottom {
    height: var(--sa-header-search-mobile) !important; /* 44px */
    margin-top: var(--sa-header-gap-mobile) !important; /* 8px */
    display: flex;
    align-items: stretch;
  }
  .softadastra-header-middle {
    width: 100%;
    display: flex;
  }
  .softadastra-search-input {
    height: 44px;
  }
  .softadastra-search-btn {
    height: 44px;
  }
}

/* === Subnav FIXED collée sous le header (pas de sticky) === */
.softadastra-subnav {
  position: fixed !important;
  left: 0;
  right: 0;
  top: var(--sa-header-h-desktop); /* desktop: directement sous le header */
  z-index: 999;
  background: var(--sa-subnav);
  color: var(--sa-subnav-text);
  border-bottom: 1px solid var(--sa-subnav-sep);
  margin: 0 !important;
  padding: 0 !important;
}

.softadastra-subnav-row {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--sa-subnav-h-desktop);
  padding: 0 10px; /* horizontal only */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.softadastra-subnav-row::-webkit-scrollbar {
  display: none;
}

/* Mobile: top = hauteur réelle du header mobile, subnav un peu plus haute */
@media (max-width: 991px) {
  .softadastra-subnav {
    top: var(--sa-header-h-mobile) !important; /* colle sous le header mobile */
  }
  .softadastra-subnav-row {
    height: var(--sa-subnav-h-mobile);
  }
}

/* === Pousser le contenu pour ne pas passer sous header + subnav === */
body.has-sa-header {
  padding-top: calc(
    var(--sa-header-h-desktop) + var(--sa-subnav-h-desktop)
  ) !important;
}
@media (max-width: 991px) {
  body.has-sa-header {
    padding-top: calc(
      var(--sa-header-h-mobile) + var(--sa-subnav-h-mobile)
    ) !important;
  }
}
@media (max-width: 991px) {
  .softadastra-header {
    /* AVANT: padding: 8px 10px;  -> ajoute 16px et casse le calcul */
    padding: 0 10px !important; /* 0 vertical, 10 horizontal */
    height: var(--sa-header-h-mobile) !important; /* 112px = 60 + 8 + 44 */
  }

  .softadastra-header-top {
    height: var(--sa-header-top-mobile) !important; /* 60px */
    align-items: center;
  }

  .softadastra-header-bottom {
    height: var(--sa-header-search-mobile) !important; /* 44px */
    margin-top: var(--sa-header-gap-mobile) !important; /* 8px */
    display: flex;
    align-items: stretch;
  }

  /* Subnav collée juste sous la vraie hauteur mobile du header */
  .softadastra-subnav {
    top: var(--sa-header-h-mobile) !important; /* 112px */
  }
}

/* === Menu (burger) lisible sur fond blanc === */
.softadastra-menu-btn {
  color: var(--sa-text) !important;
  border: 1px solid transparent;
  background: transparent;
}
.softadastra-menu-btn:hover {
  background: #f5f5f5;
  border-color: var(--sa-border);
}

/* === Champ de recherche version clair (Vinted-like) === */
.softadastra-search-input {
  background: #f7f7f7 !important;
  color: var(--sa-text) !important;
  border: 1px solid var(--sa-border) !important;
  border-right: 0 !important;
}
.softadastra-search-input::placeholder {
  color: #9e9e9e;
}
.softadastra-search-btn {
  background: var(--sa-search) !important;
  border: 1px solid var(--sa-search) !important;
}
.softadastra-search-btn:hover {
  background: var(--sa-search-hover) !important;
}

/* === Liens / icônes header & subnav visibles sur fond blanc === */
.softadastra-header a,
.softadastra-header i,
.softadastra-subnav a {
  color: var(--sa-text) !important;
}
.softadastra-header a:hover,
.softadastra-subnav a:hover {
  color: var(--sa-search) !important;
}

/* (Option A - recommandé) Pastille grise derrière l’icône pour le contraste */
.softadastra-cart-link {
  position: relative;
  padding: 4px; /* espace pour la pastille */
  border-radius: 999px;
  background: #f2f3f5; /* halo gris clair */
}
.softadastra-cart-icon {
  width: 24px;
  height: 24px;
  display: block;
}

/* Badge du panier reste au-dessus et centré */
.softadastra-cart-quantity {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 12px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff4d6d;
  color: #fff; /* style Vinted */
  position: absolute;
  top: -6px;
  right: -6px;
}

/* Subnav liens lisibles */
.softadastra-subnav-link,
.softadastra-subnav-all {
  color: var(--sa-subnav-text) !important;
}
.softadastra-subnav-link:hover,
.softadastra-subnav-all:hover {
  background: var(--sa-subnav-hover) !important;
}

/* Icône loupe PNG parfois trop pâle: enlève tout filtre sombre prévu Amazon */
.softadastra-search-icon {
  filter: none !important;
}
/* === Champ de recherche amélioré === */
.softadastra-search-input {
  background: #f1f3f5 !important; /* fond plus visible */
  color: var(--sa-text) !important;
  border: 1px solid #d0d0d0 !important;
  border-right: 0 !important;
  padding: 0 12px;
  border-radius: 4px 0 0 4px;
}

.softadastra-search-input::placeholder {
  color: #7a7a7a;
}

.softadastra-search-btn {
  background: var(--sa-search) !important;
  border: 1px solid var(--sa-search) !important;
  border-radius: 0 4px 4px 0;
  color: #fff;
}

.softadastra-search-btn:hover {
  background: var(--sa-search-hover) !important;
}
/* === Lien actif dans le subnav === */
.softadastra-subnav-link.is-active {
  background: #f5f5f5; /* fond gris clair discret */
  color: #ff9900 !important; /* orange Softadastra */
  font-weight: 600; /* texte un peu plus marqué */
  border-radius: 6px; /* léger arrondi */
  padding: 6px 12px; /* espace interne */
}
.softadastra-cart-link {
  position: relative; /* Nécessaire pour que le badge soit positionné par rapport à l'icône */
  display: inline-block;
}

.softadastra-cart-icon {
  display: block;
  width: 40px; /* ajuste selon ta taille réelle */
  height: auto;
}

.softadastra-cart-quantity {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--sa-badge, #ff9900);
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
  line-height: 1;
  min-width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}
:root {
  --sa-orange: #ff9900;
  --sa-black: #000;
}

/* Conteneur principal */
.softadastra-brand {
  display: inline-flex;
  align-items: center;
  position: relative;
  font-family: "Amazon Ember", Arial, sans-serif;
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  line-height: 1;
}

/* Couleurs du texte */
.softadastra-brand .sa-soft {
  color: var(--sa-orange);
}

.softadastra-brand .sa-adastra {
  color: var(--sa-black);
  margin-left: 4px;
}

.softadastra-brand .sa-dot {
  color: var(--sa-orange);
  margin-left: 1px;
}

/* Sourire en dessous */
.softadastra-brand .sa-smile {
  position: absolute;
  bottom: -8px; /* distance du texte */
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 12px;
  border-bottom: 4px solid var(--sa-orange);
  border-radius: 50%;
}

/* Responsive */
@media (max-width: 768px) {
  .softadastra-brand {
    font-size: 1.5rem;
  }
  .softadastra-brand .sa-smile {
    width: 65%;
    bottom: -6px;
  }
}
/* Visibilité */
.sa-only-desktop {
  display: none;
}

@media (min-width: 992px) {
  .sa-only-desktop {
    display: inline-flex;
  }
}

/* Petits styles utilitaires */
.sa-muted {
  color: #707070;
  font-size: 12px;
  line-height: 1;
}

.sa-strong {
  font-size: 13px;
  line-height: 1.1;
  color: #212121;
}

/* Deliver to */
.softadastra-ship {
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.softadastra-ship:hover {
  background: #f7f7f7;
  border-color: #e6e6e6;
}

.softadastra-ship .sa-pin {
  font-size: 18px;
  line-height: 0;
}

/* Mini liens (Orders, Help, Sell) */
.softadastra-mini {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 8px;
  margin: 0 4px;
  border: 1px solid transparent;
  text-decoration: none;
  color: #212121;
}

.softadastra-mini:hover {
  background: #f7f7f7;
  border-color: #e6e6e6;
}

.softadastra-mini.one-line {
  flex-direction: row;
  gap: 6px;
}

/* Langue dropdown */
.softadastra-lang {
  align-items: center;
  gap: 6px;
  position: relative;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}

.softadastra-lang:hover {
  background: #f7f7f7;
  border-color: #e6e6e6;
}

.softadastra-lang .sa-flag {
  width: 18px;
  height: 12px;
  background: #e6e6e6;
  display: inline-block;
  border-radius: 2px;
}

.sa-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  padding: 8px;
  display: none;
  z-index: 1001;
}

.sa-dropdown a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: #212121;
}

.sa-dropdown a:hover {
  background: #f5f5f5;
}

/* Accessibilité focus */
.softadastra-ship:focus,
.softadastra-lang:focus,
.softadastra-mini:focus {
  outline: 2px solid #ff9900;
  outline-offset: 2px;
}

/* Header top en ligne */
.softadastra-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  /* espace entre gauche et droite */
}

/* Conteneur central avec recherche */
.softadastra-header-middle {
  flex: 1;
  /* prend l’espace disponible */
  max-width: 500px;
  /* limite en desktop */
}

@media (max-width: 991px) {
  /* En mobile, la recherche reprend toute la largeur */
  .softadastra-header-middle {
    max-width: none;
  }
}

/* Champ de recherche */
.softadastra-search-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 6px 0 0 6px;
  font-size: 14px;
}

/* Bouton recherche */
.softadastra-search-btn {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-left: none;
  background-color: #ff9900;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

@media (min-width: 992px) and (max-width: 1220px) {
  .softadastra-header-top {
    flex-wrap: wrap;
    /* permet de faire passer la ligne suivante */
  }

  .softadastra-header-bottom {
    width: 100%;
    order: 2;
    /* la mettre en dessous */
    margin-top: 8px;
  }

  .softadastra-header-middle {
    width: 100%;
    max-width: 100%;
  }
}

/* 992–1220px : remplace la barre par une icône ronde stylée */
@media (min-width: 992px) and (max-width: 1220px) {
  .softadastra-header-middle {
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .softadastra-search-input {
    display: none !important;
  }

  .softadastra-search-btn {
    /* style Alibaba-like */
    width: 40px;
    height: 40px;
    min-width: 40px;
    border: none;
    border-radius: 50%;
    background: #ff9900;
    /* Softadastra brand */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.35);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  }

  .softadastra-search-btn:hover {
    background: #e68900;
    box-shadow: 0 6px 16px rgba(230, 137, 0, 0.45);
    transform: translateY(-1px);
  }

  .softadastra-search-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(230, 137, 0, 0.35);
  }

  /* rendre la loupe blanche même si c'est un PNG sombre */
  .softadastra-search-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
    display: block;
  }
}

/* >1220px : revient à la barre complète */
@media (min-width: 1221px) {
  .softadastra-search-input {
    display: block;
  }

  .softadastra-search-btn {
    width: 45px;
    height: 40px;
    border-radius: 0 4px 4px 0;
    background: #ff9900;
    box-shadow: none;
  }

  .softadastra-search-icon {
    filter: none;
  }
}

.softadastra-login-desktop {
  display: flex;
  align-items: center;
  margin-left: 15px;
}

.softadastra-login-link {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  text-decoration: none;
  color: #111;
  font-family: "Amazon Ember", Arial, sans-serif;
  cursor: pointer;
  /* ✅ curseur pointer */
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.softadastra-login-link:hover {
  border-color: rgba(0, 0, 0, 0.2);
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 3px;
}

.login-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-right: 5px;
}

.login-text-top {
  font-size: 12px;
  line-height: 14px;
  color: #555;
}

.login-text-bottom {
  font-size: 14px;
  font-weight: bold;
  line-height: 16px;
  color: #111;
}

.login-arrow {
  font-size: 12px;
  color: #555;
  margin-top: 2px;
}

/* Par défaut: rien d’imposé */
.softadastra-login-desktop {
  display: none;
}

.softadastra-profile-wrapper {
  display: none;
}

.softadastra-signin-icon {
  display: inline-flex;
}

/* icône mobile visible par défaut */

/* ÉTAT NON CONNECTÉ */
.softadastra-header.is-guest .softadastra-login-desktop {
  display: flex;
  /* visible en desktop, sera masqué par media query en mobile si besoin */
}

.softadastra-header.is-guest .softadastra-profile-wrapper {
  display: none !important;
}

.softadastra-header.is-guest .softadastra-signin-icon {
  display: inline-flex !important;
  /* icône "user" en mobile */
}

/* ÉTAT CONNECTÉ */
.softadastra-header.is-auth .softadastra-login-desktop {
  display: none !important;
  /* caché si connecté */
}

.softadastra-header.is-auth .softadastra-profile-wrapper {
  display: inline-block !important;
  /* montre le profil */
}

.softadastra-header.is-auth .softadastra-signin-icon {
  display: none !important;
  /* cache l’icône mobile si connecté */
}

/* Option: adapter par breakpoint si tu veux */
@media (max-width: 991px) {
  /* En mobile, on ne montre jamais le bloc “Account & Lists” (desktop) */
  .softadastra-login-desktop {
    display: none !important;
  }
}

.softadastra-login-link {
  cursor: pointer;
  text-decoration: none;
}

.softadastra-login-link,
.softadastra-login-link * {
  pointer-events: auto;
  /* si jamais un style bloquait les events */
}

/* Largeur par défaut de la recherche */
.softadastra-search-bar {
  flex: 1;
  max-width: 500px;
  /* ajustable */
  transition: max-width 0.3s ease;
}

/* Quand connecté → on élargit */
.softadastra-header.is-auth .softadastra-search-bar {
  max-width: 650px;
  /* augmente de ~150px */
}

/* En mobile, on ne change pas */
@media (max-width: 991px) {
  .softadastra-header.is-auth .softadastra-search-bar {
    max-width: 100%;
    /* plein écran sur mobile si besoin */
  }
}

.softadastra-navbar {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}
/* Assure que le lien reçoit les clics et a le bon curseur */
.softadastra-login-desktop {
  position: relative;
  z-index: 1101;
}

.softadastra-login-link {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  pointer-events: auto;
}

/* Le conteneur de la search ne capte pas les clics, sauf sur input/bouton */
.softadastra-header-bottom {
  pointer-events: none;
  z-index: 1100;
}

.softadastra-search-input,
.softadastra-search-btn {
  pointer-events: auto;
}
