/* DS-BOUTIQUE4 — Référence mobile validée : présentation uniquement, sans nouvelle logique métier. */
@media (max-width: 850px){
  html,body{overflow-x:hidden}
  body{padding-bottom:72px}

  /* Barre de services : les 3 informations restent sur une seule ligne,
     avec une taille de texte qui s'adapte aux petits et grands mobiles. */
  body:not(.contact-mobile-page) .topbar{height:34px;overflow:hidden}
  body:not(.contact-mobile-page) .topbar-inner{width:100%;height:34px;padding:0 6px;gap:2px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;font-size:clamp(6px,2.05vw,9px);line-height:1;white-space:nowrap}
  body:not(.contact-mobile-page) .topbar-inner>span{min-width:0;width:100%;display:flex;align-items:center;justify-content:center;gap:2px;overflow:hidden;white-space:nowrap}
  body:not(.contact-mobile-page) .topbar-inner>span .ibc-icon{font-size:clamp(10px,3vw,13px);flex:0 0 auto}
  body:not(.contact-mobile-page) .topbar-inner>span:nth-child(2){display:flex}

  /* En-tête mobile : menu + logo centré + panier. */
  .site-header{height:72px;padding:0 14px;gap:8px}
  .site-header .nav-toggle{display:grid;place-items:center;border:0;background:transparent;padding:4px;order:0;color:#111}
  .site-header .nav-toggle .ibc-icon{font-size:30px}
  .site-header .brand{position:absolute;left:50%;transform:translateX(-50%);width:auto;margin:0}
  .site-header .brand span{font-size:38px;letter-spacing:-3px}
  .site-header .brand small{font-size:7px;margin-top:3px;white-space:nowrap}
  .site-header nav{display:none}
  .site-header .header-actions{margin-left:auto;display:flex}
  .site-header .header-actions .header-icon{display:none}
  .site-header .cart-link{margin-left:2px}
  .site-header .header-account-link{display:grid;place-items:center;width:38px;height:42px;flex:0 0 38px;color:#111;margin-left:auto;z-index:2}
  .site-header .header-account-link .ibc-nav-icon{width:23px;height:23px;stroke:#111}

  /* Recherche sous l'en-tête, comme dans la maquette validée. */
  .site-header .header-search-form{order:3;position:absolute;top:78px;left:14px;right:14px;width:auto;max-width:none;margin:0;z-index:50}
  .site-header{margin-bottom:56px}
  .header-search-form input{height:44px;min-height:44px;font-size:13px;padding-left:13px}
  .header-search-form button{height:44px;min-height:44px;width:48px;padding:0}
  .header-search-form .camera-header-button{width:48px}

  /* Navigation mobile fixe : reprend uniquement les pages déjà existantes. */
  .ibc-mobile-nav{position:fixed;left:0;right:0;bottom:0;height:72px;background:#fff;border-top:1px solid #e5e5e5;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));z-index:2000;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -3px 14px rgba(0,0,0,.06)}
  .ibc-mobile-nav a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#222;font-size:10px;line-height:1.1;position:relative}
  .ibc-mobile-nav a .ibc-nav-icon{width:24px;height:24px;display:block;flex:0 0 24px}
  .ibc-mobile-nav a.active{color:#111!important;font-weight:700}
  .ibc-mobile-nav a.active:after{content:""!important;display:block!important;position:absolute!important;left:22%!important;right:22%!important;bottom:0!important;height:4px!important;min-height:4px!important;background:#000!important;border-radius:4px 4px 0 0!important;opacity:1!important;z-index:5!important}
  .ibc-mobile-nav a.active{color:#000!important;font-weight:800!important}
  .ibc-mobile-nav a.active .ibc-nav-icon{stroke:#000!important}

  /* Accueil : suppression mobile des 4 éléments sous le bouton, sans toucher au desktop. */
  body[data-page="home"] .trust-row{display:none}
  body[data-page="home"] .hero{padding:34px 14px 0;min-height:0;display:block}
  body[data-page="home"] .hero h1{font-size:36px;line-height:1.07;letter-spacing:-.9px;margin-bottom:20px}
  body[data-page="home"] .hero p{font-size:13px;line-height:1.65;margin-bottom:24px}
  body[data-page="home"] .hero-buttons{gap:10px}
  body[data-page="home"] .hero-buttons .button{min-width:0;width:auto;padding:0 24px}
  body[data-page="home"] .hero-visual{min-height:330px;margin-top:28px;border-radius:26px;transform:none;background-position:center;background-size:cover}
  body[data-page="home"] footer{margin-top:0}

  /* Boutique : cartes en 2 colonnes, mêmes catégories et mêmes liens. */
  body[data-page="shop"] .shop-layout{padding:20px 14px 34px}
  body[data-page="shop"] .shop-breadcrumb{font-size:12px;margin-bottom:14px}
  body[data-page="shop"] .shop-heading-row{display:block;margin-bottom:22px}
  body[data-page="shop"] .shop-heading h1{font-size:31px;margin-bottom:6px}
  body[data-page="shop"] .shop-heading p{font-size:13px;line-height:1.5}
  body[data-page="shop"] .shop-tools{display:none}
  body[data-page="shop"] .category-showcase-title{font-size:21px;margin-bottom:14px}
  body[data-page="shop"] .shop-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  body[data-page="shop"] .shop-category-card{border-radius:9px}
  body[data-page="shop"] .shop-category-card .cat-image{height:132px}
  body[data-page="shop"] .shop-category-card .cat-info{min-height:65px;padding:9px 10px}
  body[data-page="shop"] .shop-category-card h3{font-size:11px;margin:0 24px 4px 0;line-height:1.25}
  body[data-page="shop"] .shop-category-card p{font-size:10px!important;margin:0}
  body[data-page="shop"] .shop-category-card p::after{font-size:10px}
  body[data-page="shop"] .shop-category-card .arrow{right:9px;bottom:17px;font-size:20px}
  body[data-page="shop"] footer{padding:18px 14px;display:flex;gap:12px;justify-content:flex-start;align-items:center}
  body[data-page="shop"] footer .brand{width:105px}
  body[data-page="shop"] footer p{font-size:10px;margin:0}

  /* Contact : adaptation verticale de la carte existante. */
  body.contact-mobile-page{padding-bottom:72px}
  body.contact-mobile-page .top-bar{height:42px;min-height:42px;padding:0 10px;font-size:9px;white-space:nowrap;overflow:hidden}
  body.contact-mobile-page .top-left{gap:5px;min-width:0;flex:1}
  body.contact-mobile-page .top-left .ibc-icon{font-size:15px}
  body.contact-mobile-page .top-right{display:flex;gap:8px;flex:none}
  body.contact-mobile-page .top-right a{gap:3px;font-size:8px}
  body.contact-mobile-page .top-right i{font-size:14px}
  body.contact-mobile-page .top-right a:first-child i{font-size:15px}
  body.contact-mobile-page .site-header{height:70px;padding:0 14px;margin-bottom:55px}
  body.contact-mobile-page .site-header .nav-toggle{display:grid}
  body.contact-mobile-page .site-header .main-nav{display:none}
  body.contact-mobile-page .site-header .brand{left:50%;transform:translateX(-50%);width:auto;align-items:center}
  body.contact-mobile-page .site-header .brand span{font-size:39px;line-height:38px}
  body.contact-mobile-page .site-header .brand small{font-size:7px}
  body.contact-mobile-page .site-header .header-search-form{display:flex;top:78px;left:14px;right:14px}
  body.contact-mobile-page .contact-hero{height:175px;background-position:center center}
  body.contact-mobile-page .contact-hero-content{width:auto;padding:0 22px}
  body.contact-mobile-page .contact-hero-content h1{font-size:31px;margin-bottom:10px}
  body.contact-mobile-page .breadcrumb{font-size:13px}
  body.contact-mobile-page .contact-page{margin-top:-18px;padding-bottom:22px}
  body.contact-mobile-page .contact-card{width:94%;border-radius:12px}
  body.contact-mobile-page .contact-info,
  body.contact-mobile-page .contact-form-container{width:100%;padding:25px 18px}
  body.contact-mobile-page .contact-info h2,
  body.contact-mobile-page .contact-form-container h2{font-size:21px;line-height:1.2}
  body.contact-mobile-page .contact-intro{font-size:13px;line-height:1.55}
  body.contact-mobile-page .contact-intro br{display:none}
  body.contact-mobile-page .contact-item{gap:14px;margin-bottom:18px}
  body.contact-mobile-page .contact-icon{width:50px;height:50px;min-width:50px}
  body.contact-mobile-page .contact-item-text strong{font-size:14px}
  body.contact-mobile-page .contact-item-text span{font-size:13px}
  body.contact-mobile-page .contact-item-text small{font-size:11px}
  body.contact-mobile-page .social-section{margin-top:8px}
  body.contact-mobile-page .form-row{grid-template-columns:1fr 1fr;gap:10px}
  body.contact-mobile-page .contact-form-container input,
  body.contact-mobile-page .contact-form-container textarea{font-size:13px}
  body.contact-mobile-page .contact-form-container textarea{min-height:120px}
  body.contact-mobile-page .contact-benefits{grid-template-columns:repeat(4,1fr)}
  body.contact-mobile-page .benefit,
  body.contact-mobile-page .benefit:nth-child(2),
  body.contact-mobile-page .benefit:nth-child(3),
  body.contact-mobile-page .benefit:nth-child(4){border-right:1px solid #eee;border-top:0;padding:13px 5px;gap:6px;min-width:0}
  body.contact-mobile-page .benefit:last-child{border-right:0}
  body.contact-mobile-page .benefit .ibc-icon{font-size:24px}
  body.contact-mobile-page .benefit strong{font-size:9px;line-height:1.15}
  body.contact-mobile-page .benefit small{font-size:8px;line-height:1.2}
}

@media (max-width:380px){
  .site-header .brand span{font-size:35px}
  body[data-page="home"] .hero h1{font-size:32px}
  body[data-page="shop"] .shop-category-card .cat-image{height:120px}
  body.contact-mobile-page .form-row{grid-template-columns:1fr}
  body.contact-mobile-page .top-right span{display:none}
}

@media (min-width:851px){.ibc-mobile-nav{display:none!important}}

@media (max-width:850px){
  .ibc-mobile-nav{display:grid!important;visibility:visible!important;opacity:1!important}
  body{padding-bottom:calc(72px + env(safe-area-inset-bottom))!important}
  .ibc-mobile-nav{padding-bottom:env(safe-area-inset-bottom);height:calc(72px + env(safe-area-inset-bottom))}
  .ibc-mobile-nav a{text-decoration:none!important}
}


/* Les icônes DS-BOUTIQUE4 sont embarquées localement et restent disponibles hors ligne. */
.ibc-mobile-nav .ibc-nav-icon{width:24px;height:24px;display:block}

/* =========================================================
   DS-BOUTIQUE4 — RENFORCEMENT MOBILE GLOBAL
   Uniquement sous 650px : aucune règle desktop touchée.
   ========================================================= */
@media (max-width:650px){
  body[data-page="checkout"] .checkout{padding:18px 12px 40px}
  body[data-page="checkout"] .checkout-steps{margin-bottom:24px}
  body[data-page="checkout"] .step strong{font-size:9px}
  body[data-page="checkout"] .checkout-intro{margin-bottom:20px}
  body[data-page="checkout"] .checkout-intro h1{font-size:21px}
  body[data-page="checkout"] .form-grid{gap:14px}
  body[data-page="checkout"] .input-wrap{min-height:52px;border-radius:10px}
  body[data-page="checkout"] .input-wrap input,
  body[data-page="checkout"] .input-wrap select,
  body[data-page="checkout"] .input-wrap textarea{font-size:14px;min-height:50px}
  body[data-page="checkout"] .checkout-note{padding:13px;margin:18px 0}
  body[data-page="checkout"] .checkout-submit{height:52px;border-radius:10px}
  body[data-page="checkout"] .summary{padding:17px 16px}
  body[data-page="checkout"] .summary-product{grid-template-columns:56px minmax(0,1fr);gap:9px}
  body[data-page="checkout"] .summary-product>b{grid-column:2}

  body[data-page="product"] .product-page,
  body[data-page="product"] .product-container{padding-left:12px;padding-right:12px}
  body[data-page="product"] .product-gallery img{max-height:420px;object-fit:contain}
  body[data-page="product"] .product-info h1{font-size:25px;line-height:1.15}
  body[data-page="product"] .product-price{font-size:22px}
  body[data-page="product"] .product-actions .button,
  body[data-page="product"] button{min-height:48px}

  body[data-page="cart"] .cart-page,
  body[data-page="cart"] .cart-layout{padding-left:12px;padding-right:12px}
  body[data-page="cart"] .cart-item{grid-template-columns:68px minmax(0,1fr);gap:10px}
  body[data-page="cart"] .cart-item-actions{grid-column:2;justify-content:flex-start}
  body[data-page="cart"] .cart-summary .button,
  body[data-page="cart"] .checkout-button{width:100%;min-height:50px}

  body[data-page="track-order"] .track-page,
  body[data-page="track-order"] .tracking-page{padding-left:12px;padding-right:12px}
  body[data-page="track-order"] .track-order-card{border-radius:12px}
  body[data-page="track-order"] .order-grid{grid-template-columns:1fr;gap:18px}
  body[data-page="track-order"] .order-bottom{display:block}
  body[data-page="track-order"] .order-actions{display:grid;gap:9px;margin-top:14px}
  body[data-page="track-order"] .order-actions .button{width:100%;min-height:48px}

  body[data-page="search-image"] .search-image-page,
  body[data-page="search-image"] .search-page{padding-left:12px;padding-right:12px}

  /* Touch targets : éviter les clics trop précis sur mobile. */
  .button,
  button,
  select,
  .cart-link,
  .shop-category-card,
  .product-card a{touch-action:manipulation}

  /* Prévenir les débordements de textes et de prix. */
  h1,h2,h3,p,span,strong,small,dd,dt{overflow-wrap:anywhere}
}

/* DS-BOUTIQUE4 bottom navigation — bundled Iconly-style SVGs, app-like and offline-safe. */
.ibc-mobile-nav .ibc-nav-icon{
  width:24px!important;
  height:24px!important;
  display:block!important;
  flex:0 0 24px!important;
  stroke-width:1.75;
}
.ibc-mobile-nav a.active .ibc-nav-icon{
  stroke-width:2.05;
}

@media(max-width:850px){.site-header .brand:has(.brand-logo){width:150px;height:58px}.site-header .brand-logo{width:100%;height:100%;max-height:58px;object-fit:contain}}

@media(max-width:850px){.site-header .brand{width:150px!important;height:58px!important;flex:0 0 150px!important}.site-header .brand>.brand-logo{width:100%!important;height:100%!important;max-height:100%!important}}


/* DS-BOUTIQUE : état actif de navigation mobile, conforme à la maquette validée. */
@media (max-width:850px){.ibc-mobile-nav a,.ibc-mobile-nav a .ibc-nav-icon{color:#111!important;stroke:#111!important}.ibc-mobile-nav a.active:after{background:#111!important;height:3px!important;left:18%!important;right:18%!important}.ibc-mobile-nav a.active{font-weight:700!important}}

/* Correctif final mobile — recherche lisible et cartes alignées (maquette approuvée). */
@media (max-width: 560px) {
  #shop-results .shop-product-grid,
  #shop-products.shop-product-grid,
  .shop-results .shop-product-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch;
    gap: 12px !important;
    width: 100%;
  }
  #shop-results .product-card,
  #shop-products .product-card {
    display: flex !important;
    flex-direction: column;
    min-width: 0 !important;
    width: 100% !important;
    height: 100%;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
  }
  #shop-results .product-image,
  #shop-products .product-image {
    display: grid;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    min-height: 0;
    overflow: hidden;
    background: #f8f8f8;
  }
  #shop-results .product-image img,
  #shop-products .product-image img { width: 100%; height: 100%; object-fit: contain; }
  #shop-results .product-info,
  #shop-products .product-info { padding: 10px 9px 6px; min-width: 0; }
  #shop-results .product-info h3,
  #shop-products .product-info h3 { font-size: 12px; line-height: 1.35; margin: 5px 0 8px; overflow-wrap: anywhere; }
  #shop-results .product-info small,
  #shop-products .product-info small { font-size: 10px; line-height: 1.3; }
  #shop-results .price,
  #shop-products .price { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
  #shop-results .old-price,
  #shop-products .old-price { display: block; margin: 3px 0 0; font-size: 10px; }
  #shop-results .card-actions,
  #shop-products .card-actions { margin-top: auto; padding: 7px 9px 10px; }
  #shop-results .card-actions .button,
  #shop-products .card-actions .button { width: 100%; min-height: 38px; padding: 0 6px; font-size: 11px; white-space: normal; }
}

/* Navigation mobile : icônes noires et indicateur actif bien visible. */
 .site-header .header-account-link{display:inline-grid;place-items:center;width:42px;height:44px;flex:0 0 42px;color:#111;border-radius:10px}
 .site-header .header-account-link:hover{background:#f5f5f5}
 .site-header .header-account-link .ibc-nav-icon{width:23px;height:23px}
@media (max-width: 850px) {
  .ibc-mobile-nav { background: #fff !important; }
  .ibc-mobile-nav a, .ibc-mobile-nav a .ibc-nav-icon {
    color: #111 !important; stroke: #111 !important;
  }
  .ibc-mobile-nav a span { color: #111 !important; display: block !important; visibility: visible !important; }
  .ibc-mobile-nav a.active { font-weight: 800 !important; }
  .ibc-mobile-nav a.active::after {
    content: "" !important; position: absolute !important; left: 22% !important; right: 22% !important;
    bottom: 2px !important; height: 4px !important; background: #111 !important;
    border-radius: 4px !important; display: block !important; opacity: 1 !important;
  }
}
