/* Les 3 Blasons — téléphone « comme une appli » (D-20261021-27, inc/appli.php). Barre et écrans : ≤ 767 px seulement. */
.l3b-barre, .l3b-feuille { display: none; }
@media (max-width: 767px) {
	:root { --l3b-barre-h: calc(82px + env(safe-area-inset-bottom)); }
	body.l3b-avec-barre { padding-bottom: var(--l3b-barre-h); }
	/* En-tête masqué en descendant, revenu en remontant (appli.js) ; 50 px de plus pour la barre d'administration. */
	body.l3b-avec-barre .l-header { transition: transform .25s ease; }
	html.l3b-entete-cache body.l3b-avec-barre .l-header { transform: translateY(calc(-100% - 50px)); }
	html.l3b-feuille-ouverte { overflow: hidden; }
	/* En-tête : seul le logo reste ; loupe, compte, panier et menu passent dans la barre. */
	.l3b-avec-barre .l-header .l3b-entete-recherche,
	.l3b-avec-barre .l-header .l3b-entete-compte,
	.l3b-avec-barre .l-header .l3b-entete-favoris,
	.l3b-avec-barre .l-header .l3b-entete-panier .w-cart-link,
	.l3b-avec-barre .l-header .l3b-menu-principal { display: none !important; }
	.l3b-avec-barre .w-toplink { bottom: calc(var(--l3b-barre-h) + 12px) !important; }

	/* Barre. */
	.l3b-barre { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; display: grid; grid-template-columns: repeat(4, 1fr); align-items: stretch; height: var(--l3b-barre-h); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--l3b-gris-ligne, #DEDEDE); background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); box-shadow: 0 -6px 24px rgba(9, 9, 9, .07); }
	.l3b-cf-ouvert .l3b-barre { display: none; }
	.l3b-barre__bouton { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; background: none !important; color: var(--l3b-noir, #090909); font: 700 12.5px/1.2 var(--l3b-texte, Figtree, Arial, sans-serif); letter-spacing: .01em; cursor: pointer; -webkit-tap-highlight-color: transparent; box-shadow: none !important; }
	.l3b-barre__icone { position: relative; display: flex; align-items: center; justify-content: center; width: 60px; height: 40px; border-radius: 14px; background: var(--l3b-b-fond); color: var(--l3b-b-encre); box-shadow: 0 2px 6px rgba(9, 9, 9, .12); transition: box-shadow .15s ease, transform .15s ease; }
	.l3b-barre__icone svg { width: 24px; height: 24px; }
	.l3b-barre__bouton:active .l3b-barre__icone { transform: scale(.92); }
	/* Filet du haut de la barre (23/10, Hugues : « pas blanc mais légèrement plus foncé », puis « le plus fin ») : 1 px gris clair #DEDEDE. */
	/* Couleurs de la charte (22/10, Hugues : « les couleurs du design et non les couleurs pastel ») : menu vert, compte orange,
	   recherche jaune, panier citron, toujours pleines ; écran ouvert = anneau blanc et contour de la même couleur. */
	.l3b-barre__bouton--menu { --l3b-b-fond: var(--l3b-vert, #095540); --l3b-b-encre: #fff; }
	.l3b-barre__bouton--compte { --l3b-b-fond: var(--l3b-orange, #FF6000); --l3b-b-encre: #fff; }
	.l3b-barre__bouton--recherche { --l3b-b-fond: var(--l3b-jaune, #FFB719); --l3b-b-encre: var(--l3b-noir, #090909); }
	.l3b-barre__bouton--panier { --l3b-b-fond: var(--l3b-citron, #B1BC00); --l3b-b-encre: var(--l3b-noir, #090909); }
	.l3b-barre__bouton.is-actif .l3b-barre__icone { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--l3b-b-fond); }
	.l3b-barre__bouton.is-actif .l3b-barre__texte { color: var(--l3b-noir, #090909); }
	.l3b-barre__nombre { position: absolute; top: -5px; right: 4px; min-width: 18px; height: 18px; padding: 0 5px; border: 2px solid #fff; border-radius: 999px; background: var(--l3b-orange, #FF6000); color: #fff; font: 700 11px/14px var(--l3b-texte, Figtree, Arial, sans-serif); text-align: center; }
	.l3b-barre__nombre[hidden] { display: none; }

	/* Écrans pleins : au-dessus de la page, sous la barre (qui reste visible). */
	.l3b-feuille { position: fixed; top: 0; left: 0; right: 0; bottom: var(--l3b-barre-h); z-index: 9985; display: flex; flex-direction: column; background: #fff; opacity: 0; transform: translateY(14px); transition: opacity .16s ease, transform .16s ease; }
	.l3b-feuille[hidden] { display: none; }
	.admin-bar .l3b-feuille, .admin-bar.l3b-avec-barre .l3b-rch { top: 46px; } /* barre d'administration (connecté) */
	.l3b-feuille.is-visible { opacity: 1; transform: none; }
	.l3b-feuille__tete { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: max(10px, env(safe-area-inset-top)) 12px 10px 18px; border-bottom: 1px solid var(--l3b-gris-ligne, #DEDEDE); }
	.l3b-feuille__logo { display: flex; align-items: center; }
	.l3b-feuille__logo-img { width: auto; height: 44px; }
	.l3b-feuille__nom { margin: 0; color: var(--l3b-vert, #095540); font: 800 22px/1.2 var(--l3b-titre, "Bricolage Grotesque", sans-serif); }
	.l3b-feuille__nombre { color: var(--l3b-gris-moyen, #767676); font: 500 15px/1 var(--l3b-texte, Figtree, sans-serif); }
	.l3b-feuille__fermer { flex: none; min-height: 38px; margin: 0; padding: 0 14px; border: 0; border-radius: 999px; background: var(--l3b-creme, #FFF5DF); color: var(--l3b-vert, #095540); font: 600 14px/1 var(--l3b-texte, Figtree, sans-serif); cursor: pointer; }
	.l3b-feuille__corps { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 12px 16px 24px; }
	.l3b-feuille__titre { margin: 18px 4px 10px; color: var(--l3b-orange-texte, #BF4800); font: 700 12px/1.3 var(--l3b-texte, Figtree, sans-serif); letter-spacing: .08em; text-transform: uppercase; }
	.l3b-feuille__ligne { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 4px; border-bottom: 1px solid #F0F0F0; color: var(--l3b-noir, #090909) !important; font: 600 16px/1.3 var(--l3b-texte, Figtree, sans-serif); text-decoration: none !important; }
	.l3b-feuille__ligne > span:not(.l3b-feuille__pastille) { flex: 1 1 auto; }
	.l3b-feuille__ligne > svg { flex: none; color: var(--l3b-gris-contour, #8A8A8A); }
	.l3b-feuille__ligne--accueil { border-bottom: 0; }
	.l3b-feuille__ligne--sortie { color: var(--l3b-orange-texte, #BF4800) !important; }
	.l3b-feuille__pastille { flex: none; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: var(--l3b-creme, #FFF5DF); color: var(--l3b-vert, #095540); }
	.l3b-feuille__tuiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
	.l3b-feuille__tuiles .l3b-tuile { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 104px; padding: 14px; border-radius: 18px; color: #fff !important; font: 700 16px/1.2 var(--l3b-texte, Figtree, sans-serif); text-decoration: none !important; }
	.l3b-feuille__tuiles .l3b-tuile svg { width: 30px; height: 30px; }
	.l3b-feuille__tuiles .l3b-tuile--cafes { background: var(--l3b-vert, #095540); }
	.l3b-feuille__tuiles .l3b-tuile--thes-tisanes { background: #5C7A2E; }
	.l3b-feuille__tuiles .l3b-tuile--epices { background: var(--l3b-orange-texte, #BF4800); }
	.l3b-feuille__tuiles .l3b-tuile--sucre-sale { background: #8F6A35; }
	.l3b-feuille__tuiles .l3b-tuile--accessoires-machines { background: var(--l3b-vert-fonce, #07402F); }
	.l3b-feuille__tuiles .l3b-tuile--box-paniers { background: var(--l3b-jaune, #FFB719); color: var(--l3b-noir, #090909) !important; }
	.l3b-feuille__coordonnees { margin-top: 22px; padding: 16px; border-radius: 16px; background: var(--l3b-creme-clair, #FEF8F0); color: var(--l3b-gris-fonce, #333); font: 500 14px/1.5 var(--l3b-texte, Figtree, sans-serif); }
	.l3b-feuille__coordonnees p { margin: 10px 0 0; }
	.l3b-feuille__appel { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border-radius: 999px; background: var(--l3b-vert, #095540); color: #fff !important; font: 600 15px/1.2 var(--l3b-texte, Figtree, sans-serif); text-decoration: none !important; }
	.l3b-feuille__bonjour { margin: 6px 4px 8px; color: var(--l3b-vert, #095540); font: 700 18px/1.3 var(--l3b-texte, Figtree, sans-serif); }
	.l3b-feuille__connexion .vc_row, .l3b-feuille__connexion .vc_column-inner { padding: 0 !important; margin: 0 !important; }
	.l3b-feuille__attente { margin: 24px 0; color: var(--l3b-gris-moyen, #767676); text-align: center; }
	/* Panier : mêmes cartes que le panier latéral ; son titre est déjà dans l'en-tête de l'écran. */
	.l3b-feuille__panier .l3b-mini-panier__titre { display: none; }
	.l3b-feuille__panier > .widget_shopping_cart { margin: 0; padding: 0; }
	.l3b-feuille__panier .widget_shopping_cart_content { display: flex; flex-direction: column; max-height: none !important; }
	.l3b-feuille__panier ul.woocommerce-mini-cart { overflow: visible !important; max-height: none !important; margin-inline-start: -6px; list-style: none; }
	/* Pastille SEOPress (administrateurs connectés seulement) au-dessus de la barre. */
	.l3b-avec-barre #seopress-beacon-universal-metabox { top: auto !important; bottom: calc(var(--l3b-barre-h) + 70px) !important; } /* conteneur de 6 px, bouton de 60 px dessous */
	/* Recherche : sa fenêtre s'arrête au-dessus de la barre. */
	.l3b-avec-barre .l3b-rch { bottom: var(--l3b-barre-h); z-index: 9985; }
	/* Carrousels : le navigateur gère le vertical, le carrousel le côté. */
	.owl-carousel .owl-stage-outer { touch-action: pan-y; }
}


/* Champs de saisie des écrans (connexion…) à 16 px : l'iPhone ne zoome pas pendant la saisie. */
@media (max-width: 767px) {
	.l3b-feuille input:not([type="hidden"]),
	.l3b-feuille select,
	.l3b-feuille textarea {
		font-size: 16px;
	}
}


/* D-20261021-40 : recherche ouverte (ou saisie dans un écran) : la barre du bas disparaît ; sinon, sur iPhone, elle
   remonte au-dessus du clavier et cache les résultats. La recherche reprend toute la hauteur. */
@media (max-width: 767px) {
	html.l3b-rch-ouvert .l3b-barre,
	html:has(.l3b-feuille input:focus, .l3b-feuille textarea:focus, .l3b-feuille select:focus) .l3b-barre { display: none !important; }
	html.l3b-rch-ouvert body.l3b-avec-barre .l3b-rch { bottom: 0; }
}

@media (prefers-reduced-motion: reduce) { body.l3b-avec-barre .l-header { transition: none; } }

/* D-20261021-43 (Hugues) : sur téléphone, logo au milieu de l'en-tête (cellule centrale de la disposition « Mobiles »,
   centrée sur toute la largeur même si la cellule de droite garde des éléments) ; fenêtres qui prennent toute la largeur
   sans coins arrondis (bandeau des cookies). */
@media (max-width: 767px) {
	body.l3b-avec-barre .l-header .l-subheader.at_middle .l-subheader-h { position: relative; }
	body.l3b-avec-barre .l-header .l-subheader.at_middle .l-subheader-cell.at_center { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); }
	.cmplz-cookiebanner { border-radius: 0 !important; }
}
