/* Navigation 1.4: Xiaomi France layout with sidebar subcategories & product energy badges */
.navigation-shade{position:fixed;inset:var(--xaci-menu-top,76px) 0 0;background:rgb(0 0 0 / 35%);z-index:90!important;pointer-events:none!important;animation:xaci-shade-in .16s ease-out}
.navigation-shade[hidden],
.site-header:not(.has-mega-open) ~ .navigation-shade{display:none!important;visibility:hidden!important;pointer-events:none!important}
.site-header{position:sticky;top:0;z-index:1000!important}
.site-header.has-mega-open,
body.nav-open .site-header{z-index:2000!important}
.mega-panel{position:absolute;left:0;right:0;top:100%;z-index:2001!important;pointer-events:auto!important;max-height:calc(100dvh - var(--xaci-menu-top,76px));padding:32px max(4%,calc((100% - 1480px)/2)) 28px;background:#fff;border-top:1px solid #eee;box-shadow:0 2px 12px rgba(0,0,0,.04);animation:xaci-menu-in .18s ease-out}
.mega-layout{max-width:1440px;margin:0 auto;min-width:0}
.mega-layout.has-subcategories{display:grid;grid-template-columns:190px minmax(0,1fr);gap:40px}

/* Volet gauche des catégories façon mi.com */
.mega-categories{display:flex;flex-direction:column;gap:6px;padding:0 24px 0 0;border-right:1px solid #f0f0f0;min-width:0}
.mega-category-choices-list{display:flex;flex-direction:column;gap:6px;width:100%}
.mega-category-parent-title{display:flex;align-items:center;justify-content:space-between;font-size:14px;font-weight:700;color:var(--orange-text);padding:6px 12px 10px;text-transform:capitalize}
.mega-category-parent-title .xaci-icon{display:inline-flex}
.mega-category-parent-title svg{width:12px;height:12px}
.mega-category-choice{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;font-size:13px;line-height:1.4;color:#444;border-radius:8px;transition:all .15s ease}
.mega-category-choice .mega-category-label{flex:1;min-width:0}
.mega-category-choice[aria-selected=true]{color:var(--orange-text);background:#fff5ee;font-weight:600}
.mega-category-choice:hover{background:#f8f8f8;color:var(--orange-text)}

/* Grille des produits dans le méga menu */
.mega-views{min-width:0;display:flex;flex-direction:column}
.mega-content{animation:xaci-content-in .14s ease-out;display:flex;flex-direction:column;min-width:0}
.mega-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;align-items:start;padding-bottom:16px}
.mega-grid .product-card{background:transparent;padding:8px 6px;border-radius:8px;transition:transform .2s ease,background .2s ease;text-align:center}
.mega-grid .product-card:hover{background:#fbfbfb;transform:translateY(-2px)}
.mega-grid .product-card-image{height:105px;width:100%;display:flex;align-items:center;justify-content:center;margin-bottom:8px}
.mega-grid .product-card-image img{width:auto;height:auto;max-width:100%;max-height:95px;object-fit:contain;display:block;margin:0 auto}
.mega-grid .product-card-title{font-size:12px;font-weight:400;color:#333;margin:0 0 4px;line-height:1.35;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word;min-height:32px;max-height:34px}
.mega-grid .product-price{font-size:12px;font-weight:500;color:#ff6900;margin:0;line-height:1.3}
.mega-grid .product-price .amount{font-size:12px;font-weight:600}
.mega-grid .product-price del{font-size:11px;font-weight:400;color:#999;margin-right:3px}
.mega-grid .product-price ins{text-decoration:none}

/* Badge étiquette énergie Xiaomi (A vert) */
.energy-badge-wrapper{display:flex;justify-content:center;margin-bottom:6px}
.energy-badge{display:inline-flex;align-items:center;justify-content:center;background:#009e4f;color:#fff;font-size:12px;font-weight:700;line-height:1;width:15px;height:15px;border-radius:4px;letter-spacing:0}

/* Liens du bas du méga menu (Accessoires, Tous, Comparer) */
.mega-footer-actions{display:flex;align-items:center;justify-content:flex-end;gap:32px;padding-top:16px;border-top:1px solid #f2f2f2;margin-top:auto}
.mega-action-link{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);font-weight:500;text-decoration:none}
.mega-action-link:hover{color:var(--orange-text)}
.mega-action-link svg{display:block;flex-shrink:0}

.mega-empty{grid-column:1/-1;color:var(--muted);font-size:14px;padding:36px 0;text-align:center}

/* Sous-menus standards de l'en-tête */
.site-header .header-links .sub-menu a{display:flex;align-items:center;gap:12px;padding:10px 16px;font-size:14px;color:var(--ink);border-radius:8px;transition:background .15s ease,color .15s ease}
.site-header .header-links .sub-menu a:hover{background:#f5f5f5;color:var(--orange-text)}
.site-header .header-links .sub-menu{min-width:230px;border-radius:8px;border:1px solid var(--line);box-shadow:0 2px 12px rgba(0,0,0,.04);padding:8px}

/* Éléments exclusifs au tiroir mobile masqués sur ordinateur */
.xaci-mobile-drawer-header,
.xaci-mobile-user-bar,
.xaci-mobile-footer-accordions,
.xaci-mobile-only-link,
.nav-extra-link .xaci-icon{display:none!important}

@media(min-width:1200px){
  .site-header .nav-toggle{display:none!important}
  .xaci-mobile-subpanel{display:none!important}
  .xaci-desktop-mega{display:grid!important}
  .mega-item>summary{position:relative}
  .mega-item>summary:after{content:"";position:absolute;bottom:0;left:0;right:0;height:2px;background:transparent}
  .mega-item[open]>summary:after{background:var(--orange)}
  .mega-item[open]>summary{color:var(--orange-text)}
  .mega-item>summary svg,
  .mega-item>summary .xaci-icon{display:none!important}
  .mega-layout:not(.has-subcategories) .mega-grid{max-width:1300px;margin:auto}
}

/* Icônes d'en-tête Xiaomi France (taille 20x20, espacement uniforme mobile, tablette et ordinateur) */
.site-header .header-tools{display:flex;align-items:center;gap:18px!important;margin-left:auto}
.site-header .header-tools .icon-button,
.site-header .nav-toggle{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;padding:0!important;border-radius:8px;color:var(--silver);display:inline-flex;align-items:center;justify-content:center;transition:color .15s}
/* Charte 2.4.0 : icônes au trait fin, gris High-Tech Silver, orange Xiaomi au survol */
.site-header .header-tools .icon-button:hover,
.site-header .header-tools .icon-button:focus-visible,
.site-header .nav-toggle:hover,
.site-header .nav-toggle:focus-visible{color:var(--orange-text);background:transparent}
.site-header .header-tools .icon-button svg,
.site-header .nav-toggle svg{width:22px!important;height:22px!important;display:block}
.site-header .cart-count.is-empty{display:none!important}
/* Compteur en noir : un chiffre blanc sur l'orange #FF6900 n'est pas assez contrasté */
.site-header .cart-count{position:absolute;top:0;right:0;min-width:16px;height:16px;line-height:16px;padding:0 4px;border-radius:999px;background:var(--black);color:#fff;font-size:12px;font-weight:700;text-align:center}

.nav-toggle .nav-toggle-icon{display:inline-flex;align-items:center;justify-content:center}
.nav-toggle .nav-toggle-icon--close{display:none}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon--open{display:none}
.nav-toggle[aria-expanded="true"] .nav-toggle-icon--close{display:inline-flex}

/* Tiroir Mobile & Tablette 100% conforme à https://www.mi.com/fr/ (media_1792884518539.png) */
@media(max-width:1199px){
  .site-header{z-index:1000!important}
  body.nav-open .site-header,
  .site-header.has-mega-open{z-index:2000!important}
  .site-header .site-brand{order:1;margin-right:auto}
  .site-header .header-tools{order:2;margin-left:auto;gap:18px!important}
  .site-header .nav-toggle{display:inline-flex!important;order:3;margin-left:18px!important}
  .navigation-shade,
  .site-header.has-mega-open ~ .navigation-shade{display:none!important;visibility:hidden!important;pointer-events:none!important}
  body.nav-open .navigation-shade{display:none!important;pointer-events:none!important}

  /* Masquer bouton de contact flottant et barres sticky quand le menu est ouvert */
  body.nav-open .xaci-floating-support,
  body.nav-open .xaci-mobile-sticky-bar{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }

  .main-navigation:not(.is-open){
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
  }
  .main-navigation.is-open{
    display:block!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }
  .main-navigation{
    position:fixed!important;
    top:0!important;
    right:0!important;
    bottom:0!important;
    left:0!important;
    width:100vw!important;
    max-width:100vw!important;
    height:100dvh!important;
    min-height:100dvh!important;
    max-height:100dvh!important;
    z-index:2005!important;
    background:#fff!important;
    border:0!important;
    box-shadow:none!important;
    padding:0 24px calc(48px + env(safe-area-inset-bottom, 0px))!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
  }

  /* Barre supérieure interne du menu mobile (Logo Maison orange à gauche, Compte + X à droite) */
  .xaci-mobile-drawer-header{
    display:flex!important;
    align-items:center;
    justify-content:space-between;
    position:sticky;
    top:0;
    z-index:15;
    background:#fff;
    min-height:60px;
    padding:12px 0;
    margin-bottom:8px;
  }
  .xaci-mobile-home-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    line-height:0;
  }
  .xaci-mobile-home-btn svg{
    width:32px;
    height:32px;
    display:block;
  }
  .main-navigation.has-mobile-sub-open .xaci-mobile-home-btn{
    display:none!important;
  }
  .xaci-mobile-back-btn{
    display:inline-flex;
    align-items:center;
    gap:6px;
    border:0;
    background:transparent;
    padding:6px 10px 6px 0;
    font-size:16px;
    font-weight:700;
    color:#191919;
    cursor:pointer;
  }
  .xaci-mobile-back-btn[hidden]{
    display:none!important;
  }
  .xaci-mobile-back-btn svg{width:18px;height:18px}
  .xaci-mobile-drawer-actions{
    display:flex;
    align-items:center;
    gap:18px;
    margin-left:auto;
  }
  .xaci-mobile-account-btn,
  .xaci-mobile-close-btn{
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    width:34px;
    height:34px;
    border:0;
    background:transparent;
    border-radius:8px;
    color:var(--silver)!important;
    cursor:pointer;
    padding:0;
    text-decoration:none!important;
    transition:color .15s;
  }
  .xaci-mobile-account-btn:hover,
  .xaci-mobile-close-btn:hover,
  .xaci-mobile-account-btn:focus-visible,
  .xaci-mobile-close-btn:focus-visible{background:transparent;color:var(--orange-text)!important}
  .xaci-mobile-account-btn svg,
  .xaci-mobile-close-btn svg{width:22px;height:22px}

  /* Rubriques principales en GRAS (Boutique sans flèche, Catégories avec flèche >) */
  .nav-boutique-link,
  .mega-item>summary{
    min-height:52px!important;
    padding:13px 0!important;
    font-size:20px!important;
    font-weight:700!important;
    color:#191919!important;
    border-bottom:0!important;
    display:flex!important;
    align-items:center;
    justify-content:space-between;
    letter-spacing:-.1px;
  }
  .mega-item>summary svg,
  .mega-item>summary .xaci-icon{
    display:inline-flex!important;
    color:#191919!important;
    transform:rotate(-90deg);
  }
  .mega-item>summary svg,
  .mega-item>summary .xaci-icon svg{
    width:18px!important;
    height:18px!important;
    stroke-width:1.6;
  }

  /* Liens secondaires en police régulière sans flèche (Promotions / Assistance / Contact) */
  .nav-secondary-link,
  .xaci-mobile-only-link,
  .site-header .header-links>li>a{
    min-height:48px!important;
    padding:11px 0!important;
    font-size:16px!important;
    font-weight:400!important;
    color:#191919!important;
    border-bottom:0!important;
    display:flex!important;
    align-items:center;
    justify-content:space-between;
  }
  .nav-secondary-link:first-of-type{
    margin-top:8px;
  }
  .xaci-desktop-only-link{
    display:none!important;
  }

  /* Accordéons de bas de menu mobile avec icône + / - (ASSISTANCE, PRODUITS, NOUS CONTACTER, À PROPOS DE NOUS) */
  .xaci-mobile-footer-accordions{
    display:block!important;
    margin-top:18px;
    padding-top:14px;
    border-top:1px solid #efefef;
  }
  .xaci-mobile-accordion{
    border-bottom:0!important;
  }
  .xaci-mobile-accordion>summary{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:46px;
    padding:11px 0;
    font-size:14px;
    font-weight:400;
    letter-spacing:.2px;
    color:#555555;
    cursor:pointer;
    list-style:none;
    text-transform:uppercase;
  }
  .xaci-mobile-accordion>summary::-webkit-details-marker{display:none}
  .xaci-mobile-accordion>summary .xaci-icon{
    color:#555555;
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .xaci-mobile-accordion>summary .xaci-icon svg{
    width:18px;
    height:18px;
    stroke-width:1.5;
  }
  .xaci-mobile-accordion[open]>summary .xaci-plus-v{
    display:none;
  }
  .xaci-mobile-accordion-links{
    list-style:none;
    margin:0;
    padding:2px 0 14px 10px;
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  .xaci-mobile-accordion-links a{
    font-size:13px;
    color:#616161;
    text-decoration:none;
    display:block;
    padding:3px 0;
  }
  .xaci-mobile-accordion-links a:hover{color:var(--orange-text)}

  /* Vue sous-catégorie Niveau 2 (.sub-content sur mi.com/fr) */
  .main-navigation.has-mobile-sub-open .nav-extra-link,
  .main-navigation.has-mobile-sub-open .header-links,
  .main-navigation.has-mobile-sub-open .xaci-mobile-footer-accordions,
  .main-navigation.has-mobile-sub-open .mega-item:not([open]),
  .main-navigation.has-mobile-sub-open .mega-item[open]>summary{
    display:none!important;
  }
  .xaci-desktop-mega{display:none!important}
  .mega-panel{
    position:static!important;
    z-index:auto!important;
    padding:4px 0 24px;
    max-height:none;
    box-shadow:none;
    border:0;
    animation:none;
  }
  .xaci-mobile-subpanel{
    display:block!important;
    width:100%!important;
    padding:4px 0 24px!important;
  }
  .xaci-mobile-groups{
    display:flex!important;
    flex-direction:column!important;
    gap:4px!important;
    width:100%!important;
  }
  .xaci-mobile-group-accordion{
    border-bottom:1px solid #f0f0f0!important;
    margin:0 0 4px!important;
  }
  .xaci-mobile-group-summary{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    padding:16px 0!important;
    font-size:16px!important;
    font-weight:700!important;
    color:#191919!important;
    cursor:pointer!important;
    list-style:none!important;
    border:0!important;
  }
  .xaci-mobile-group-summary::-webkit-details-marker{display:none!important}
  .xaci-mobile-group-summary svg,
  .xaci-mobile-group-summary .xaci-icon{
    width:18px!important;
    height:18px!important;
    color:#888!important;
    transition:transform .25s ease, color .2s ease!important;
    display:inline-flex!important;
  }
  .xaci-mobile-group-accordion[open]>summary svg,
  .xaci-mobile-group-accordion[open]>summary .xaci-icon{
    transform:rotate(180deg)!important;
    color:var(--orange)!important;
  }
  .xaci-mobile-group-content{
    padding:4px 0 16px!important;
  }

  .xaci-mobile-subpanel .mega-category-choices-list,
  .mega-category-choices-list{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-start!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none!important;
    gap:8px!important;
    padding:6px 0 16px!important;
    margin:0!important;
    width:auto!important;
  }
  .xaci-mobile-subpanel .mega-category-choices-list::-webkit-scrollbar,
  .mega-category-choices-list::-webkit-scrollbar{display:none!important}

  .xaci-mobile-subpanel .mega-category-choice,
  .mega-category-choice{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    white-space:nowrap!important;
    flex-shrink:0!important;
    border:1px solid #e5e5e5!important;
    background:#ffffff!important;
    border-radius:999px!important;
    font-size:13px!important;
    padding:8px 18px!important;
    color:#191919!important;
    font-weight:500!important;
    text-decoration:none!important;
    box-shadow:0 1px 2px rgba(0,0,0,0.03)!important;
    transition:all .15s ease!important;
  }
  .xaci-mobile-subpanel .mega-category-choice[aria-selected=true],
  .mega-category-choice[aria-selected=true]{
    border-color:var(--orange)!important;
    background:#ffffff!important;
    color:var(--orange-text)!important;
    font-weight:600!important;
  }
  .xaci-mobile-subpanel .mega-category-choice .xaci-icon,
  .mega-category-choice .xaci-icon{display:none!important}
  .mega-category-label{white-space:nowrap!important}

  /* Carrousel horizontal des produits façon mi.com */
  .xaci-mobile-subpanel .mega-grid,
  .mega-grid{
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch;
    gap:12px!important;
    padding:8px 2px 20px!important;
    margin:0!important;
    scrollbar-width:none!important;
  }
  .xaci-mobile-subpanel .mega-grid::-webkit-scrollbar,
  .mega-grid::-webkit-scrollbar{display:none!important}

  .xaci-mobile-subpanel .mega-grid .product-card,
  .mega-grid .product-card{
    flex:0 0 155px!important;
    width:155px!important;
    min-width:155px!important;
    background:#ffffff!important;
    border:1px solid #f0f0f0!important;
    border-radius:14px!important;
    padding:14px 10px 12px!important;
    box-shadow:0 2px 8px rgba(0,0,0,0.03)!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:space-between!important;
    text-align:center!important;
  }
  .xaci-mobile-subpanel .mega-grid .product-card-image,
  .mega-grid .product-card-image{
    height:115px!important;
    margin-bottom:8px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
  .xaci-mobile-subpanel .mega-grid .product-card-image img,
  .mega-grid .product-card-image img{
    max-height:105px!important;
    max-width:100%!important;
    object-fit:contain!important;
    display:block!important;
    margin:0 auto!important;
  }
  .xaci-mobile-subpanel .mega-grid .product-card-title,
  .xaci-mobile-subpanel .mega-grid .product-card h3,
  .xaci-mobile-subpanel .mega-grid .product-card p,
  .mega-grid .product-card-title,
  .mega-grid .product-card h3,
  .mega-grid .product-card p{
    font-size:13px!important;
    font-weight:500!important;
    color:#191919!important;
    line-height:1.3!important;
    min-height:34px!important;
    max-height:36px!important;
    margin:4px 0 8px!important;
    display:-webkit-box!important;
    -webkit-line-clamp:2!important;
    -webkit-box-orient:vertical!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .xaci-mobile-subpanel .mega-grid .product-price,
  .mega-grid .product-price{
    font-size:14px!important;
    font-weight:700!important;
    color:var(--orange-text)!important;
    margin-top:auto!important;
  }

  /* Bouton pleine largeur « Voir tous les produits » façon mi.com */
  .xaci-mobile-subpanel .mega-footer-actions,
  .mega-footer-actions{
    display:flex!important;
    justify-content:center!important;
    padding:4px 0 14px!important;
    margin:0!important;
    width:100%!important;
  }
  .xaci-mobile-subpanel .mega-action-link--all,
  .mega-action-link--all{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    width:100%!important;
    padding:12px 20px!important;
    background:#ffffff!important;
    border:1px solid #e0e0e0!important;
    border-radius:999px!important;
    font-size:14px!important;
    font-weight:600!important;
    color:#191919!important;
    text-decoration:none!important;
    box-shadow:0 1px 3px rgba(0,0,0,0.02)!important;
    transition:all .15s ease!important;
  }
  .xaci-mobile-subpanel .mega-action-link--all:hover,
  .mega-action-link--all:hover{
    border-color:var(--orange)!important;
    color:var(--orange-text)!important;
  }
  .xaci-mobile-subpanel .mega-action-link--all svg,
  .mega-action-link--all svg{
    width:16px!important;
    height:16px!important;
    color:#191919!important;
    flex-shrink:0!important;
  }
  .xaci-mobile-subpanel .mega-action-link--all svg:last-child,
  .mega-action-link--all svg:last-child{
    display:none!important;
  }
  .xaci-mobile-subpanel .mega-action-link:not(.mega-action-link--all),
  .mega-action-link:not(.mega-action-link--all){
    display:none!important;
  }
}

@media(max-width:767px){
  .site-header .header-tools{gap:16px!important}
  .site-header .nav-toggle{margin-left:16px!important}
  .main-navigation{width:100vw!important;max-width:100vw!important;padding:0 22px 40px!important}
}

@keyframes xaci-menu-in{from{opacity:0;transform:translateY(-7px)}to{opacity:1;transform:translateY(0)}}
@keyframes xaci-shade-in{from{opacity:0}to{opacity:1}}
@keyframes xaci-content-in{from{opacity:.6}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.navigation-shade,.mega-panel,.mega-content{animation:none}}

/* 3.0.10 — Icônes d'en-tête noires comme mi.com/fr ; sur mobile : recherche, panier, menu */
.site-header .header-tools .icon-button,.site-header .nav-toggle{color:#191919}
.site-header .header-tools .icon-button:hover,.site-header .header-tools .icon-button:focus-visible,.site-header .nav-toggle:hover,.site-header .nav-toggle:focus-visible{color:#ff6900}
@media(max-width:767px){.site-header .header-tools .account-link{display:none}}
