/* ============================================================================
   HEADER AI ELECTRONICS — grille 1280, 3 étages nets. Fond sombre STABLE
   (clair & sombre, jamais var(--ag-bg)). Sticky à hauteur fixe. Zéro flottant.
   ============================================================================ */
#header { background:#0f0f13 !important; position:sticky; top:0; z-index:1000; box-shadow:none !important; }
.aehdr { background:#0f0f13; color:#f2f2f3; font-family:var(--ag-body,sans-serif); }
.aehdr * { box-sizing:border-box; }
.aehdr .aehdr-inner { max-width:1280px; margin:0 auto; padding:0 24px; height:100%; display:flex; align-items:center; }
.aehdr a { text-decoration:none; }

/* ---- ÉTAGE 1 : barre utilitaire, 40px ---- */
.aehdr-util { height:40px; border-bottom:1px solid rgba(255,255,255,.06); }
.aehdr-util .aehdr-inner { justify-content:space-between; }
.aehdr-util__l, .aehdr-util__r { display:flex; align-items:center; gap:20px; }
.aehdr-util a, .aehdr-util button, .aehdr-util span, .aehdr-util .material-icons { color:#c9c9d0 !important; font-size:.8rem; line-height:1; }
.aehdr-util a:hover, .aehdr-util button:hover { color:var(--ag-gold,#E63946) !important; }
.aehdr-util .material-icons { font-size:18px !important; }
.aehdr-util .aehdr-util__r > *, .aehdr-util__r > * { display:inline-flex; align-items:center; }
/* séparateur fin avant Connexion */
.aehdr-util__r #_desktop_user_info::before { content:""; width:1px; height:16px; background:rgba(255,255,255,.16); margin-right:4px; }

/* ---- ÉTAGE 2 : barre principale, 72px — logo | recherche (max 560, centrée) | actions ---- */
.aehdr-main { height:72px; }
.aehdr-main .aehdr-inner { display:grid; grid-template-columns:1fr minmax(0,560px) 1fr; align-items:center; column-gap:24px; }
.aehdr-main__logo { justify-self:start; }
.aehdr-main__logo img { height:64px; width:auto; display:block; }
.aehdr-main__search { justify-self:center; width:100%; max-width:560px; }
.aehdr-main__search .search-widget, .aehdr-main__search #search_widget, .aehdr-main__search form { width:100% !important; margin:0 !important; }
.aehdr-main__actions { justify-self:end; display:flex; align-items:center; gap:18px; }
.aehdr-main__actions a, .aehdr-main__actions .material-icons { color:#f2f2f3 !important; }
.aehdr-burger { display:none; background:transparent; border:0; color:#f2f2f3; cursor:pointer; padding:6px; }
.aehdr-burger .material-icons { font-size:26px; }

/* ---- ÉTAGE 3 : navigation, 48px, catégories centrées ---- */
.aehdr-nav { height:48px; border-top:1px solid rgba(255,255,255,.08); }
.aehdr-nav .aehdr-inner { justify-content:center; }
.aehdr-nav__slot { display:flex; justify-content:center; align-items:center; width:100%; }
.aehdr-nav__slot .ag-nav, .aehdr-nav__slot #_desktop_top_menu { display:flex; justify-content:center; width:100%; }

/* source cachée + tiroir mobile masqué par défaut */
.aehdr-src { display:none !important; }
.aehdr-drawer { display:none; }

/* ---- RESPONSIVE < 1024 : nav → burger, recherche sous la barre, util masquée ---- */
@media (max-width:1023px) {
  .aehdr .aehdr-inner { padding:0 16px; }
  .aehdr-util { display:none; }              /* langue/devise/contact passent dans le tiroir */
  .aehdr-nav { display:none; }               /* nav → burger */
  .aehdr-main { height:64px; }
  .aehdr-main .aehdr-inner { grid-template-columns:auto 1fr auto; column-gap:12px; }
  .aehdr-burger { display:inline-flex; align-items:center; justify-self:start; order:0; }
  .aehdr-main__logo { justify-self:center; }
  .aehdr-main__actions { justify-self:end; }
  /* recherche : passe en pleine largeur SOUS la barre principale */
  .aehdr-main__search { position:absolute; left:0; right:0; top:64px; max-width:none; width:100%;
    padding:8px 16px; background:#0f0f13; border-top:1px solid rgba(255,255,255,.06); }
}

/* ---- Mini-panier au survol (étage 2, actions) ---- */
.ag-has-mini { position:relative; }
.ag-minicart {
  position:absolute; top:calc(100% + 8px); right:0; width:330px; max-width:92vw;
  background:#141418; color:#e6e6ea; border:1px solid rgba(255,255,255,.10); border-radius:10px;
  box-shadow:0 16px 44px rgba(0,0,0,.55); padding:12px 14px; z-index:1100;
  opacity:0; visibility:hidden; transform:translateY(8px); transition:opacity .18s ease, transform .18s ease, visibility .18s;
}
.ag-has-mini:hover .ag-minicart, .ag-has-mini:focus-within .ag-minicart { opacity:1; visibility:visible; transform:none; }
.ag-minicart__empty { text-align:center; color:#a7a7af; padding:16px 0; margin:0; }
.ag-minicart__list { max-height:280px; overflow-y:auto; }
.ag-minicart__item { display:grid; grid-template-columns:44px 1fr auto; gap:10px; align-items:center; padding:9px 0; border-bottom:1px solid rgba(255,255,255,.06); color:#e6e6ea !important; }
.ag-minicart__item img { width:44px; height:44px; object-fit:cover; border-radius:6px; background:#fff; }
.ag-minicart__n { font-size:.82rem; line-height:1.25; }
.ag-minicart__q { font-size:.76rem; color:#a7a7af; white-space:nowrap; }
.ag-minicart__tot { display:flex; justify-content:space-between; align-items:center; padding:11px 0 12px; color:#f2f2f4; font-weight:600; }
.ag-minicart__tot b { color:#fff; font-size:1.05rem; }
.ag-minicart__act { display:flex; gap:8px; }
.ag-minicart__btn { flex:1; text-align:center; padding:.62rem .4rem; border-radius:5px; background:var(--ag-gold,#E63946); color:#0a0a0c !important; font-weight:700; font-size:.76rem; letter-spacing:.04em; text-transform:uppercase; }
.ag-minicart__btn--ghost { background:transparent; border:1px solid rgba(255,255,255,.25); color:#f2f2f4 !important; }

/* ===== Overrides contraste AA (aehdr.css charge en DERNIER : gagne sur premium-pro/uplift/conv) ===== */
/* cross-sell rendu DANS #footer : bat le bleed "#footer p{color:#b9b9c0}" (spéc. 1,0,1) */
#footer .ag-xsell__sub, .ag-xsell .ag-xsell__sub, .ag-xsell__sub { color:#595959 !important; }
html.ag-dark #footer .ag-xsell__sub, html.ag-dark .ag-xsell .ag-xsell__sub, html.ag-dark .ag-xsell__sub { color:#c9c9d0 !important; }
/* flag remise : cause corrigée à la source (premium-uplift.css l.106, or #ecd9a3 AA) */
#_desktop_cart .blockcart .cart-products-count, #header .cart-products-count { color:#0a0a0c !important; }
