/* ==========================================
   HEADER.CSS - NOVA IP CAMERA THEME
   Header principal : Sticky, Top bar, Logo, Search, User, Cart
   ========================================== */

/* ==========================================
   TABLE DES MATIÈRES
   ========================================== */
/*
1. STICKY + SHRINK HEADER
2. TOP BAR
3. HEADER PRINCIPAL (Layout 3 zones)
4. LOGO
5. BURGER MENU
6. SEARCHBAR
7. AUTOCOMPLETE (Desktop, Tablette, Mobile)
8. COMPTE & PANIER (Dropdowns)
9. NEUTRALISER CLASSIC
10. RESPONSIVE MOBILE + TABLETTE (<992px)
11. STICKY SHRINK MOBILE + TABLETTE
*/

/* ==========================================
   1. STICKY + SHRINK HEADER
   ========================================== */

#header {
  position: sticky !important;
  top: 0 !important;
  color: #000 !important;
  z-index: 1000 !important;
  background: white !important;
  transition: all 0.3s ease !important;
  box-shadow: none !important;
}

#header.shrink {
  border-bottom: 1px solid var(--border-color);
}

/* Transitions globales */
#header,
#header .mx-header-main,
#header .mx-header-content,
#header .mx-header-logo img,
#header #search_widget input,
#header #search_widget button,
#header .top-menu > li > a {
  transition: all 0.2s ease;
}

/* Logo - Swap complet/picto au shrink */
.mx-logo-picto {
  display: none !important;
}

#header.shrink .mx-logo-full {
  display: none !important;
}

#header.shrink .mx-logo-picto {
  display: block !important;
  height: 40px;
}

/* Top bar - Cacher au shrink */
#header.shrink .mx-top-bar {
  display: none;
}

/* Header principal - Réduire padding au shrink */
.mx-header-main {
  transition: padding 0.3s ease;
}

#header.shrink .mx-header-main {
  padding: var(--space-3) 0;
}

/* Container shrink - padding latéral */
@media (min-width: 768px) {
  #header.shrink .mx-container {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 1200px) {
  #header.shrink .mx-container {
    padding-left: var(--space-10);
    padding-right: var(--space-10);
  }
}

/* Searchbar - Réduire au shrink */
#header.shrink #search_widget {
  max-width: 450px !important;
}

#header.shrink #search_widget input[type="text"] {
  max-width: 450px !important;
}

/* Actions - Réduire police au shrink */
#header.shrink .mx-header-actions {
  gap: var(--space-6);
}

#header.shrink .mx-header-actions a {
  font-size: 13px !important;
}

/* Masquer les spans texte en shrink */
#header.shrink #_desktop_user_info .mx-dropdown-trigger > span:last-child,
#header.shrink .mx-cart-trigger > span:last-child {
  display: none;
}

/* ==========================================
   2. TOP BAR
   ========================================== */

.mx-top-bar {
  background: #000;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.8125rem;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

.mx-top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: var(--fw-semibold);
}

.mx-top-bar-left,
.mx-top-bar-right {
  display: flex;
  align-items: center;
}

.mx-top-bar-items {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  color: #ffffff;
}

.mx-top-bar-right .mx-top-bar-items {
  flex-direction: flex-end;
}

.mx-top-bar-item {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  gap: var(--space-2);
}

#header .mx-top-bar-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  background: #fff;
  border-radius: var(--radius-full);
  padding: var(--space-1) var(--space-3);
  color: #000 !important;
  font-weight: var(--fw-semibold);
  transition: 0.2s ease;
}

#header .mx-top-bar-link:hover {
  background: var(--mx-orange);
  color: #fff !important;
}

/* ==========================================
   3. HEADER PRINCIPAL (Layout 3 zones)
   ========================================== */

.mx-header {
  position: relative;
  background: white;
  z-index: 1000;
}

.mx-header-main {
  padding: 0.75rem 0;
}

/* Grid 3 colonnes : Gauche | Centre | Droite */
.mx-header-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-8);
}

/* Zone gauche : Logo + Burger + Menu */
.mx-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  flex-shrink: 1;
  min-width: 0;
}

/* Zone centre : Search - peut rétrécir */
.mx-header-search {
  display: flex;
  justify-content: center;
  flex-shrink: 1;
  min-width: 0;
}

/* Zone droite : Actions - JAMAIS compressé */
.mx-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ==========================================
   4. LOGO
   ========================================== */

.mx-header-logo {
  flex-shrink: 0;
}

.mx-header-logo h1 {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.mx-header-logo a {
  display: block;
  line-height: 0;
}

.mx-header-logo .mx-logo {
  height: 40px;
  width: auto;
  display: block;
}

/* ==========================================
   5. BURGER MENU
   ========================================== */

/* Burger header-left : visible uniquement desktop */
.mx-header-left .mx-burger-menu {
  display: none;
}

@media (min-width: 992px) {
  .mx-header-left .mx-burger-menu {
    display: flex;
  }
}

/* Burger header-search : visible uniquement mobile/tablette */
.mx-header-search .mx-burger-menu {
  display: flex;
}

@media (min-width: 992px) {
  .mx-header-search .mx-burger-menu {
    display: none;
  }
}

/* ==========================================
   6. SEARCHBAR
   ========================================== */

/* Container */
#header #search_widget {
  position: relative;
  width: 600px;
  min-width: unset !important;
  float: none !important;
  margin-bottom: 0 !important;
  overflow: visible !important;
  z-index: 9999 !important;
  transform: translateZ(0);
  will-change: transform;
}

/* Tablette : search prend l'espace dispo */
@media (max-width: 991px) {
  #header #search_widget {
    width: 100%;
    max-width: 100%;
  }
}


#search_widget form {
  position: relative;
  display: flex;
  align-items: center;
}

/* Input */
#search_widget input[type="text"] {
  width: 100%;
  height: 48px;
  padding: 0 var(--space-10) 0 52px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.938rem;
  color: var(--mx-gray-900);
  background: white;
  transition: var(--transition-fast);
  position: relative;
  z-index: 1;
}

#search_widget input[type="text"]::placeholder {
  color: var(--mx-gray-400);
}

#search_widget input[type="text"]:focus {
  outline: none;
  border-color: var(--mx-gray-900);
}

/* Input shrink */
#header.shrink #search_widget input[type="text"] {
  height: 36px;
  padding: 0 var(--space-10) 0 var(--space-10);
}

/* Boutons */
#search_widget button {
  position: absolute;
  z-index: 2 !important;
  height: 40px;
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  border-radius: var(--radius-full);
}

#search_widget button:hover {
  color: #000;
}

#search_widget button[type="submit"] {
  right: var(--space-2);
}

#search_widget button[type="submit"]:hover {
  background: var(--mx-orange-100);
}

#search_widget button[type="submit"] i {
  color: #000;
  width: 20px;
  height: 20px;
}

#search_widget button.clear {
  left: var(--space-1);
  display: none;
}

#search_widget button.clear:hover {
  background: var(--mx-orange-100);
}

#search_widget button.clear i {
  color: var(--mx-gray-600);
  width: 20px;
  height: 20px;
}

/* Boutons shrink */
#header.shrink #search_widget button {
  height: 28px;
  width: 28px;
}

#header.shrink #search_widget button svg {
  width: 17px !important;
  height: 17px !important;
}

/* Overlay search */
.mx-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mx-search-overlay.active {
  z-index: 999;
  opacity: 1;
  visibility: visible;
}

/* ==========================================
   7. AUTOCOMPLETE (Desktop, Tablette, Mobile)
   ========================================== */

/* ----- 7.1 AUTOCOMPLETE DESKTOP ----- */

.ui-autocomplete.searchbar-autocomplete {
  z-index: 1001 !important;
  background: white !important;
  border: none !important;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
  max-height: 500px !important;
  overflow-y: auto !important;
  list-style: none !important;
  list-style-image: none !important;
  padding: 0 !important;
  padding-left: 0 !important;
  margin: 0 !important;
}

.ui-autocomplete.searchbar-autocomplete li {
  list-style: none !important;
  list-style-image: none !important;
}

.ui-autocomplete.searchbar-autocomplete li::marker {
  content: none !important;
  display: none !important;
}

.ui-autocomplete.searchbar-autocomplete li {
  border-bottom: 1px solid var(--border-color);
}

.ui-autocomplete.searchbar-autocomplete li:last-child {
  border-bottom: none;
}

.ui-autocomplete.searchbar-autocomplete li a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  text-decoration: none;
  transition: var(--transition-fast);
}

.ui-autocomplete.searchbar-autocomplete li a:hover {
  background: var(--mx-orange-50) !important;
}

.ui-autocomplete.searchbar-autocomplete .autocomplete-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--mx-gray-100);
  flex-shrink: 0;
}

.ui-autocomplete.searchbar-autocomplete .product {
  flex: 1;
  font-size: 0.875rem;
  color: var(--mx-gray-900);
  line-height: 1.4;
}

/* ----- 7.2 AUTOCOMPLETE TABLETTE (768px - 991px) ----- */

@media (min-width: 768px) and (max-width: 991px) {
  .ui-autocomplete.searchbar-autocomplete {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    border-radius: 0 !important;
    box-shadow: var(--shadow-lg) !important;
    padding-bottom: var(--space-8) !important;
  }
  
  .ui-autocomplete.searchbar-autocomplete li {
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ----- 7.3 AUTOCOMPLETE MOBILE (<768px) - Style Boulanger ----- */

@media (max-width: 767px) {
  
  /* UL - Fullscreen collé en haut */
  .ui-autocomplete.searchbar-autocomplete {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-height: none;
    overflow-y: visible;
    background: white;
    box-shadow: none;
    border-radius: 0;
  }
  
  /* LI - Décalés sous le header */
  .ui-autocomplete.searchbar-autocomplete li {
    position: relative;
    top: var(--header-mobile-height, 111px); /* Dynamique via JS */
    border-bottom: 1px solid var(--border-color);
    background: white;
  }
  
  /* Premier LI - Padding top pour espace */
  .ui-autocomplete.searchbar-autocomplete li:first-of-type {
    margin-top: var(--space-1) !important;
  }
  
  /* Flèche retour - Fixée en haut */
  .mx-search-back {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
    background: rgb(0, 0, 0);
    color: #fff;
    z-index: 10;
  }
  
  .mx-search-back button {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: transparent;
    border: none;
    font-size: var(--fs-base);
    font-weight: var(--fw-medium);
    color: #fff;
    cursor: pointer;
    padding: var(--space-2);
  }
  
  .mx-search-back button:active {
    opacity: 0.5;
  }

    /* Bloquer scroll body quand recherche active */
  body.search-autocomplete-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
  }

  /* Résultats plus compacts sur mobile */
  .ui-autocomplete.searchbar-autocomplete li a {
    padding: var(--space-2) var(--space-3) !important;
    gap: var(--space-2) !important;
  }

  .ui-autocomplete.searchbar-autocomplete .autocomplete-thumbnail {
    width: 50px !important;
    height: 50px !important;
  }

  .ui-autocomplete.searchbar-autocomplete .product {
    font-size: 0.813rem !important;
    line-height: 1.3 !important;
  }
}

/* ==========================================
   8. COMPTE & PANIER (Dropdowns)
   ========================================== */

/* Masquer "Contactez-nous" dans displayNav1 */
#_desktop_contact_link {
  display: none !important;
}

/* Item (user ou panier) */
.mx-action-item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

/* Icône container */
.mx-action-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fallbacks CSS supprimés - SVG inline dans les templates */

/* Badge compteur panier */
.mx-action-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mx-orange);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 0 6px;
}

/* Label texte */
.mx-action-label {
  font-size: 0.875rem;
  font-weight: 500;
}

/* ----- DROPDOWN USER ----- */

.mx-dropdown {
  position: relative;
}

.mx-dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  color: var(--mx-gray-900);
  transition: var(--transition-fast);
  padding: 0;
}

.mx-dropdown-trigger:hover {
  color: var(--mx-orange);
}

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

.mx-dropdown.active .mx-dropdown-arrow {
  transform: rotate(180deg);
}

/* Menu dropdown - Centré */
.mx-dropdown-menu {
  position: absolute;
  top: 62px;
  left: 50%;
  min-width: 200px;
  background: white;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
}

.mx-dropdown.active .mx-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  z-index: 1002;
}

/* Dropdown actif passe au-dessus des autres */
.mx-dropdown.active,
.mx-cart-dropdown.active {
  z-index: 1002;
}

/* Dropdown user en shrink */
#header.shrink .mx-dropdown-menu {
  top: 51px;
  left: 0;
}

/* Items du dropdown */
.mx-dropdown-item {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--mx-gray-900);
  text-decoration: none;
  transition: var(--transition-fast);
  font-size: 0.875rem;
}

.mx-dropdown-item:hover {
  color: var(--mx-orange) !important;
}

.mx-dropdown-item:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.mx-dropdown-item:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ----- MODALE PANIER ----- */

.mx-cart-trigger {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  color: var(--mx-gray-900);
  transition: var(--transition-fast);
  padding: 0;
}

.mx-cart-trigger:hover {
  color: var(--mx-orange) !important;
}

#header .mx-cart-modal {
  position: absolute;
  top: 74px;
  right: 0;
  width: 400px;
  max-height: min(600px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-2px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1000;
  overflow: hidden;
  margin-right: var(--space-6);
}

#header .mx-cart-dropdown.active .mx-cart-modal {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown cart en shrink */
#header.shrink .mx-cart-modal {
  top: 78px;
}

/* ----------------------------------------
   DROPDOWN CART MODAL - Styles scopés #header
   ---------------------------------------- */

#header .mx-cart-modal .mx-cart-header {
  padding: var(--space-4) !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid var(--border-color) !important;
}

#header .mx-cart-modal .mx-cart-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

#header .mx-cart-modal .mx-cart-body {
  flex: 1;
  min-height: 0; /* Permet le scroll dans flex container */
  overflow-y: auto;
  padding: var(--space-4);
}

#header .mx-cart-modal .mx-cart-product {
  display: flex;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-color);
}

#header .mx-cart-modal .mx-cart-product:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

#header .mx-cart-modal .mx-cart-product-image {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

#header .mx-cart-modal .mx-cart-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

#header .mx-cart-modal .mx-cart-product-info {
  flex: 1;
}

#header .mx-cart-modal .mx-cart-product-name {
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 var(--space-1) 0;
  line-height: 1.3;
}

#header .mx-cart-modal .mx-cart-product-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#header .mx-cart-modal .mx-cart-unit-price,
#header .mx-cart-modal .mx-cart-quantity {
  font-size: 0.813rem;
  color: var(--mx-gray-600);
}

#header .mx-cart-modal .mx-cart-price-old {
  text-decoration: line-through;
  color: var(--mx-gray-400);
  font-weight: normal;
  margin-right: var(--space-1);
}

#header .mx-cart-modal .mx-cart-discount-badge {
  display: inline-block;
  background: var(--mx-orange-500);
  color: white;
  font-size: 0.688rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: var(--radius-sm);
  margin-left: var(--space-1);
}

#header .mx-cart-modal .mx-cart-product-quantity {
  font-size: 0.813rem;
  color: var(--mx-gray-600);
}

#header .mx-cart-modal .mx-cart-product-total {
  font-weight: 600;
  color: var(--mx-gray-900);
}

#header .mx-cart-modal .mx-cart-footer {
  padding: var(--space-4);
  border-top: 1px solid var(--border-color);
}

/* Totaux dropdown cart */
#header .mx-cart-modal .mx-cart-total {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-bottom: var(--space-4);
}

#header .mx-cart-modal .mx-cart-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--mx-gray-600);
}

#header .mx-cart-modal .mx-cart-total-line span:last-child {
  font-weight: var(--fw-medium);
}

#header .mx-cart-modal .mx-cart-total-final {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--mx-gray-900);
  padding-top: var(--space-2);
  margin-top: var(--space-2);
}

#header .mx-cart-modal .mx-cart-total strong {
  font-size: 1.25rem;
  color: var(--mx-gray-900);
}

#header .mx-cart-modal .mx-cart-actions {
  display: flex;
  gap: var(--space-3);
  padding: 0;
}

#header .mx-cart-modal .mx-cart-actions .mx-btn-checkout {
  padding: var(--space-2) var(--space-4);
}

#header .mx-cart-modal .mx-cart-empty {
  padding: var(--space-8);
  text-align: center;
  color: var(--mx-gray-600);
}

#header .mx-cart-modal .mx-cart-empty img {
  position: relative;
  z-index: 2;
  margin-bottom: var(--space-4);
}

#header .mx-cart-modal .mx-cart-empty p {
  margin: 0;
  position: relative;
  font-size: var(--fs-lg);
  z-index: 2;
}

/* ==========================================
   9. NEUTRALISER CLASSIC
   ========================================== */

.header-top .col-md-2,
.header-top .col-md-10,
.header-nav {
  display: none !important;
}

/* Masquer hidden-sm-down/hidden-md-up SAUF le menu desktop */
#header .hidden-sm-down:not(.mx-header-menu #_desktop_top_menu):not(#_desktop_top_menu),
#header .hidden-md-up {
  display: none !important;
}

/* ==========================================
   9.5 RESPONSIVE TABLET LANDSCAPE (992px - 1199px)
   ========================================== */

@media (min-width: 992px) and (max-width: 1199px) {
  /* Réduire gap header-left */
  .mx-header-left {
    gap: var(--space-4);
  }

  /* Searchbar peut rétrécir */
  #header #search_widget {
    width: 100%;
    min-width: 200px;
    max-width: 400px;
  }

  /* Grid plus serré */
  .mx-header-content {
    gap: var(--space-4);
  }
}

/* ==========================================
   10. RESPONSIVE MOBILE + TABLETTE (<992px)
   ========================================== */

@media (max-width: 991px) {
  
  /* Top bar masquée */
  .mx-top-bar {
    display: none !important;
  }

  /* Header principal compact */
  .mx-header-main {
    padding: var(--space-3) 0;
  }

  /* Layout : garder 3 colonnes sur tablette */
  .mx-header-content {
    grid-template-columns: auto 1fr auto;
    gap: var(--space-4);
  }

  /* ----- LIGNE 1 : Logo | Actions ----- */
  
  .mx-header-left {
    gap: var(--space-3);
  }

  .mx-header-logo {
    grid-column: 1;
    justify-self: start;
  }
  
  .mx-header-logo .mx-logo {
    height: 28px;
  }

  .mx-header-actions {
    grid-column: 3;
    gap: var(--space-4);
    padding: 0 var(--space-3);
  }

  /* Icônes user/panier plus grandes */
  .mx-action-icon svg {
    width: 28px;
    height: 28px;
  }

  /* Masquer labels texte */
  .mx-action-label {
    display: none;
  }

  /* ----- Search au centre ----- */

  .mx-header-search {
    display: flex;
    gap: var(--space-3);
    align-items: center;
  }
  
  .mx-header-search .mx-burger-menu {
    flex-shrink: 0;
    align-self: center;
    align-items: flex-end;
    margin-top: 10px;
  }

  .mx-header-search #search_widget {
    flex: 1;
  }

  /* ----- SEARCHBAR MOBILE ----- */
  
  #header #search_widget {
    width: 100% !important;
  }

  /* Font-size 16px pour éviter zoom iOS */
  #header #search_widget input[type="text"] {
    height: 40px;
    font-size: 16px;
  }

  #header #search_widget button {
    height: 32px;
    width: 32px;
  }

  #header #search_widget button svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* ----- DROPDOWNS DÉSACTIVÉS ----- */

  #header .mx-dropdown-menu,
  #header .mx-cart-modal {
    display: none !important;
  }

  .mx-dropdown-trigger,
  .mx-cart-trigger {
    cursor: pointer;
  }

  #header .mx-cart-modal {
    width: 320px;
  }
}

/* ==========================================
   10b. RESPONSIVE MOBILE UNIQUEMENT (<768px)
   Layout 2 lignes : [Logo | Actions] + [Burger + Search]
   ========================================== */

@media (max-width: 767px) {

  /* Layout mobile : 2 colonnes, 2 lignes */
  .mx-header-content {
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto !important;
    gap: var(--space-3) !important;
  }

  /* Ligne 1 : Logo à gauche */
  .mx-header-logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  /* Cacher burger dans header-left sur mobile */
  .mx-header-left .mx-burger-menu {
    display: none !important;
  }

  /* Ligne 1 : Actions à droite */
  .mx-header-actions {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  /* Ligne 2 : Burger + Search full width */
  .mx-header-search {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    display: flex !important;
    gap: var(--space-3) !important;
    align-items: center !important;
  }

  /* Burger visible dans zone search */
  .mx-header-search .mx-burger-menu {
    display: flex !important;
    flex-shrink: 0 !important;
    margin-top: 0 !important;
  }

  /* Masquer texte "Menu" sur mobile */
  .mx-burger-label {
    display: none !important;
  }

  /* Search prend le reste de la largeur */
  .mx-header-search #search_widget {
    flex: 1 !important;
  }

  /* Font-size 16px pour éviter zoom iOS */
  #header #search_widget input[type="text"] {
    font-size: 16px !important;
  }
}

/* ==========================================
   11. STICKY SHRINK MOBILE + TABLETTE
   ========================================== */

@media (max-width: 991px) {

  /* Grid parent - 4 colonnes : Logo | Burger+Search | Actions */
  #header.shrink .mx-header-content {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: 1fr !important;
    gap: var(--space-4) !important;
  }

  /* Header-left visible : contient le logo */
  #header.shrink .mx-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 0 !important;
  }

  /* Cacher le burger dans header-left (on garde celui de header-search) */
  #header.shrink .mx-header-left .mx-burger-menu {
    display: none !important;
  }

  /* Logo picto visible et taille adaptée */
  #header.shrink .mx-header-logo {
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
  }

  #header.shrink .mx-logo-picto {
    display: block !important;
    height: 32px !important;
  }

  /* Burger + Search - colonne 2 */
  #header.shrink .mx-header-search {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: var(--space-3) !important;
  }

  #header.shrink .mx-header-search .mx-burger-menu {
    display: flex !important;
    margin-top: 0 !important;
  }

  /* Texte "Menu" caché en sticky */
  #header.shrink .mx-burger-label {
    display: none !important;
  }

  /* Search compressible */
  #header.shrink .mx-header-search #search_widget {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Input shrink tablette - taille augmentée */
  #header.shrink #search_widget input[type="text"] {
    height: 40px !important;
    font-size: 16px !important;
    padding: 0 var(--space-10) 0 44px !important;
    min-width: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  #header.shrink #search_widget button {
    height: 32px !important;
    width: 32px !important;
  }

  #header.shrink #search_widget button svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* Bouton submit - positionné dans l'input */
  #header.shrink #search_widget button[type="submit"] {
    right: var(--space-1) !important;
  }

  /* Actions - colonne 3 */
  #header.shrink .mx-header-actions {
    grid-column: 3 !important;
    grid-row: 1 !important;
    gap: var(--space-4) !important;
    padding: 0 !important;
  }

  /* Icônes plus grandes pour le tactile */
  #header.shrink .mx-action-icon svg {
    width: 26px !important;
    height: 26px !important;
  }

  /* Padding header augmenté */
  #header.shrink .mx-header-main {
    padding: var(--space-3) 0 !important;
  }
}