/* IBC — 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 .material-symbols-outlined{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 .material-symbols-outlined{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:auto}

  /* 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(4,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 .material-symbols-outlined{font-size:24px}
  .ibc-mobile-nav a.active{color:var(--gold);font-weight:500}
  .ibc-mobile-nav a.active:after{content:"";position:absolute;left:20%;right:20%;bottom:0;height:3px;background:var(--gold);border-radius:3px 3px 0 0}

  /* 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 .material-symbols-outlined{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 .material-symbols-outlined{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 Material Symbols restent des icônes même si le chargement web de la police est lent. */
.ibc-mobile-nav .material-symbols-outlined{font-family:'Material Symbols Outlined',sans-serif;font-variation-settings:'FILL' 0,'wght' 500,'GRAD' 0,'opsz' 24}

/* =========================================================
   IBC — 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}
}
