/* Bipmatic — header maison et méga-menus (inc/entete.php). Charte : graphite, ardoise, acier, alu, craie, vert. Pas d'ombre : des filets. */

/* ---------------------------------------------------------------- le header WoodMart s'efface, le nôtre colle en haut */
body.bip-entete .whb-main-header,
body.bip-entete .whb-clone,
body.bip-entete .wd-close-menu-mobile { display: none !important; }
body.bip-entete .whb-header { --top-b: 0px; position: sticky; top: var(--top-b); z-index: 390; margin: 0; padding: 0; background: none; box-shadow: none; transition: top .28s cubic-bezier(.2, .8, .2, 1); }
body.bip-entete.admin-bar .whb-header { --top-b: 32px; }
@media (max-width: 782px) { body.bip-entete.admin-bar .whb-header { --top-b: 46px; } }
@media (max-width: 600px) { body.bip-entete.admin-bar .whb-header { --top-b: 0px; } }
body.bip-entete .whb-header.bip-replie { top: calc(var(--top-b) - var(--bip-h-annonce, 36px)); }
@media (prefers-reduced-motion: reduce) { body.bip-entete .whb-header { transition: none; } }

.bip-h { position: relative; font-family: inherit; color: var(--bip-graphite); }
.bip-h *, .bip-h *::before, .bip-h *::after { box-sizing: border-box; }
.bip-h ul, .bip-h li, .bip-h p { list-style: none; margin: 0; padding: 0; }
.bip-h a { text-decoration: none; }
.bip-h .bip-icone { width: 22px; height: 22px; flex: none; }
.bip-h button { font: inherit; }

/* ---------------------------------------------------------------- bandeau d'informations */
.bip-h__annonce { background: var(--bip-graphite); color: var(--bip-craie); font-size: 13.5px; line-height: 1; }
.bip-h__annonce .bip-in { display: flex; justify-content: center; align-items: center; gap: 40px; min-height: 36px; }
.bip-h__annonce p { display: flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--bip-alu); }
.bip-h__annonce strong { color: var(--bip-craie); font-weight: 600; }
.bip-h__annonce a { color: var(--bip-vert); font-weight: 600; }
.bip-h__annonce a:hover { text-decoration: underline; }
.bip-h__annonce .bip-icone { width: 17px; height: 17px; color: var(--bip-vert); }

/* ---------------------------------------------------------------- barre : logo, recherche, compte, panier */
.bip-h__barre { background: var(--bip-blanc); border-bottom: 1px solid var(--bip-alu); }
.bip-h__barre-in { display: flex; align-items: center; gap: 32px; min-height: 78px; }
.bip-h__logo { flex: none; display: block; line-height: 0; }
.bip-h__logo img { height: 36px; width: auto; }
.bip-h__recherche { flex: 1 1 auto; max-width: 620px; position: relative; }
.bip-h__recherche .wd-search-form, .bip-h__recherche .searchform { margin: 0; width: 100%; }
.bip-h__recherche form.searchform { position: relative; display: block; --wd-form-height: 50px; }
.bip-h__recherche input.s, .bip-h__recherche input[type="text"] { width: 100%; height: 50px !important; padding: 0 60px 0 18px !important; border: 1.5px solid var(--bip-alu) !important; border-radius: 10px !important; background: var(--bip-craie) !important; font-size: 15.5px !important; color: var(--bip-graphite) !important; box-shadow: none !important; transition: border-color .15s, background-color .15s; }
.bip-h__recherche input.s::placeholder { color: var(--bip-acier); opacity: 1; }
.bip-h__recherche input.s:focus { border-color: var(--bip-graphite) !important; background: var(--bip-blanc) !important; outline: none; }
.bip-h__go { position: absolute !important; top: 5px !important; right: 5px !important; bottom: auto !important; left: auto !important; width: 40px !important; height: 40px !important; min-height: 0 !important; padding: 0 !important; display: grid !important; place-items: center; border: 0 !important; border-radius: 8px !important; background: var(--bip-graphite) !important; color: var(--bip-blanc) !important; cursor: pointer; }
.bip-h__go::before, .bip-h__go::after { display: none !important; }
.bip-h__go:hover { background: var(--bip-ardoise) !important; }
.bip-h__go .bip-icone { width: 20px; height: 20px; }
/* résultats instantanés de WoodMart, sous le champ */
.bip-h__recherche .wd-dropdown-results { left: 0 !important; right: 0 !important; margin-top: 6px; border: 1px solid var(--bip-alu); border-radius: 12px; box-shadow: none; overflow: hidden; }

.bip-h__actions { flex: none; display: flex; align-items: center; gap: 8px; margin-left: auto; }
.bip-h__action, .bip-h__ib { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--bip-graphite) !important; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background-color .15s; }
.bip-h__action:hover, .bip-h__ib:hover { background: var(--bip-craie); }
.bip-h__ib { width: 46px; justify-content: center; padding: 0; }
.bip-h__panier { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px 0 10px; border: 1.5px solid var(--bip-alu); border-radius: 10px; color: var(--bip-graphite) !important; transition: border-color .15s; }
.bip-h__panier:hover { border-color: var(--bip-graphite); }
.bip-h__sac { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--bip-graphite); color: var(--bip-blanc); }
.bip-h__sac .bip-icone { width: 19px; height: 19px; }
.bip-h__sac .wd-cart-number { position: absolute; top: -7px; right: -8px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--bip-vert); color: var(--bip-graphite); font-size: 11.5px; font-weight: 700; line-height: 19px; text-align: center; border: 2px solid var(--bip-blanc); box-sizing: content-box; }
.bip-h__sac .wd-cart-number span { display: none; }
.bip-h__panier .bip-h__lib { display: flex; flex-direction: column; line-height: 1.15; }
.bip-h__panier small { font-size: 12px; font-weight: 500; color: var(--bip-acier); }
.bip-h__panier .wd-cart-subtotal, .bip-h__panier .wd-cart-subtotal .amount { font-size: 15px; font-weight: 700; color: var(--bip-graphite); }
.bip-h .bip-h__mob { display: none; }

/* ---------------------------------------------------------------- menu */
.bip-h__nav { background: var(--bip-blanc); border-bottom: 1px solid var(--bip-alu); }
.bip-h__menu { display: flex; align-items: center; gap: 4px; min-height: 56px; }
.bip-h__item { position: static; display: flex; align-items: center; border-radius: 8px; transition: background-color .15s; }
.bip-h__item:hover, .bip-h__item.est-ouvert { background: var(--bip-craie); }
.bip-h__entree { display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 2px 0 12px; font-size: 15.5px; font-weight: 600; color: var(--bip-graphite) !important; white-space: nowrap; }
.bip-h__entree .bip-icone { width: 21px; height: 21px; color: var(--bip-vert-profond); }
.bip-h .bip-h__ouvre { display: grid; place-items: center; width: 30px; min-width: 0; height: 42px; min-height: 0; padding: 0; border: 0; background: transparent !important; box-shadow: none !important; color: var(--bip-acier); cursor: pointer; border-radius: 0 8px 8px 0; }
.bip-h .bip-h__ib { background: transparent; box-shadow: none; min-height: 0; }
.bip-h .bip-h__ib:hover { background: var(--bip-craie); }
.bip-h__ouvre .bip-icone { width: 16px; height: 16px; transition: transform .2s; }
.bip-h__item.est-ouvert .bip-h__ouvre .bip-icone { transform: rotate(180deg); color: var(--bip-graphite); }
.bip-h .bip-h__plus { margin-left: auto; }
.bip-h__cta { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 18px; border-radius: 8px; background: var(--bip-graphite); color: var(--bip-blanc) !important; font-size: 15px; font-weight: 600; white-space: nowrap; transition: background-color .15s; }
.bip-h__cta:hover { background: var(--bip-ardoise); }
.bip-h__tiroir-liens { display: none; }

/* ---------------------------------------------------------------- méga-menus */
.bip-mega2 { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: var(--bip-blanc); border-bottom: 1px solid var(--bip-alu); animation: bip-mega-in .18s ease-out; }
.bip-mega2[hidden] { display: none; }
.bip-mega2.sans-anim { animation: none; }
@keyframes bip-mega-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bip-mega2 { animation: none; } }
.bip-mega2__panneau { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 32px; padding: 28px 0 24px; }
.bip-mega2__gauche { display: flex; flex-direction: column; min-width: 0; }
.bip-mega2__tc { display: flex; align-items: center; gap: 8px; font-size: 13px !important; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--bip-acier); margin: 0 0 12px !important; }
.bip-mega2__tc .bip-icone { width: 17px; height: 17px; color: var(--bip-vert-profond); }
.bip-mega2__cols { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; }
.bip-mega2__cols--court { grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); }
.bip-mega2 .bip-vg { flex: none; display: block; object-fit: contain; background: var(--bip-blanc); border: 1px solid var(--bip-alu); border-radius: 8px; padding: 2px; }
.bip-mega2 .bip-vg--vide { display: grid; place-items: center; width: 36px; height: 36px; }
.bip-mega2 .bip-vg--vide svg { width: 12px; height: 20px; }
.bip-mega2__nom { display: block; font-size: 15px; font-weight: 600; color: var(--bip-graphite); line-height: 1.25; }
.bip-mega2__info { display: block; font-size: 13px; color: var(--bip-acier); line-height: 1.35; margin-top: 2px; }
.bip-mega2__ref { min-width: 0; }

/* marques d'un usage : deux colonnes de lignes */
.bip-mega2__marques { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
.bip-mega2__marques a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; transition: background-color .15s; }
.bip-mega2__marques .bip-mega2__info { font-size: 12.5px; margin-top: 1px; }
.bip-mega2__marques a:hover { background: var(--bip-craie); }
.bip-mega2__marques .bip-vg { width: 36px; height: 36px; }

/* références les plus demandées : cartes */
.bip-mega2__refs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.bip-mega2__refs a { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border: 1px solid var(--bip-alu); border-radius: 10px; transition: border-color .15s; }
.bip-mega2__refs a:hover { border-color: var(--bip-graphite); }
.bip-mega2__refs .bip-vg { width: 48px; height: 48px; }
.bip-mega2__prix { font-size: 15px; font-weight: 700; color: var(--bip-vert-profond); white-space: nowrap; }

/* toutes les marques : grille de tuiles */
.bip-mega2__grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.bip-mega2__grille a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 8px 10px 8px 8px; border: 1px solid var(--bip-alu); border-radius: 10px; transition: border-color .15s; }
.bip-mega2__grille a:hover { border-color: var(--bip-graphite); }
.bip-mega2__grille .bip-vg { width: 44px; height: 44px; }

/* aide : tuiles avec icône */
.bip-mega2__aide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bip-mega2__aide a { display: flex; align-items: flex-start; gap: 12px; height: 100%; padding: 14px; border: 1px solid var(--bip-alu); border-radius: 10px; transition: border-color .15s; }
.bip-mega2__aide a:hover { border-color: var(--bip-graphite); }
.bip-mega2__ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--bip-craie); color: var(--bip-vert-profond); }
.bip-mega2__ico .bip-icone { width: 21px; height: 21px; }

/* pied du méga-menu */
.bip-mega2__pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: auto; padding-top: 16px; }
.bip-mega2__gauche > ul + .bip-mega2__pied, .bip-mega2__cols + .bip-mega2__pied { margin-top: 20px; border-top: 1px solid var(--bip-alu); }
.bip-mega2__pied a { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 700; color: var(--bip-graphite) !important; }
.bip-mega2__pied a:hover { color: var(--bip-vert-profond) !important; }
.bip-mega2__pied a .bip-icone { width: 17px; height: 17px; }
.bip-mega2__pied small { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--bip-acier); }
.bip-mega2__pied small .bip-icone { width: 17px; height: 17px; color: var(--bip-vert-profond); }

/* carte sombre à droite */
.bip-mega2__carte { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: 12px; background: var(--bip-graphite); color: var(--bip-craie) !important; }
.bip-mega2__carte-ico { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px; border-radius: 10px; background: var(--bip-ardoise); color: var(--bip-vert); }
.bip-mega2__carte-ico .bip-icone { width: 24px; height: 24px; }
.bip-mega2__symbole { width: 17px; height: 28px; }
.bip-mega2__carte-titre { font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--bip-craie); }
.bip-mega2__carte-texte { font-size: 14px; line-height: 1.5; color: var(--bip-alu); }
.bip-mega2__etapes { list-style: none; margin: 6px 0 0 !important; padding: 0; display: grid; gap: 8px; }
.bip-mega2__etapes li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--bip-craie); }
.bip-mega2__etapes b { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--bip-ardoise); color: var(--bip-vert); font-size: 13px; }
.bip-mega2__carte-lien { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 14px; font-size: 15px; font-weight: 600; color: var(--bip-vert); }
.bip-mega2__carte-lien .bip-icone { width: 18px; height: 18px; transition: transform .15s; }
.bip-mega2__carte:hover .bip-mega2__carte-lien .bip-icone { transform: translateX(3px); }

/* ---------------------------------------------------------------- écrans moyens */
@media (max-width: 1180px) {
	.bip-h__barre-in { gap: 20px; }
	.bip-h__entree { padding-left: 10px; font-size: 15px; gap: 7px; }
	.bip-h__action .bip-h__lib { display: none; }
	.bip-h__action { width: 46px; justify-content: center; padding: 0; }
	.bip-mega2__panneau { grid-template-columns: minmax(0, 1fr) 236px; gap: 24px; }
	.bip-h__annonce p:nth-child(3) { display: none; }
}

/* ---------------------------------------------------------------- tablette et téléphone : tiroir */
@media (max-width: 1024px) {
	.bip-h__annonce .bip-in { position: relative; min-height: 34px; }
	.bip-h__annonce p { display: none !important; font-size: 13px; }
	.bip-h__annonce p.est-visible { display: flex !important; }
	.bip-h__barre-in { min-height: 64px; gap: 6px; flex-wrap: wrap; }
	.bip-h .bip-h__mob { display: inline-flex; }
	.bip-h__logo { margin-right: auto; }
	.bip-h__logo img { height: 30px; }
	.bip-h__actions { gap: 2px; margin-left: 0; }
	.bip-h__panier { height: 46px; padding: 0 6px; border: 0; }
	.bip-h__panier .bip-h__lib { display: none; }
	.bip-h__recherche { display: none; order: 9; flex: 1 0 100%; max-width: none; padding: 0 0 12px; }
	.bip-h.est-recherche .bip-h__recherche { display: block; }
	.bip-h__nav { display: none; position: fixed; left: 0; right: 0; top: var(--bip-h-bas, 120px); bottom: 0; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--bip-alu); }
	.bip-h.est-tiroir .bip-h__nav { display: block; }
	.bip-h__menu { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0 32px; }
	.bip-h__item { flex-wrap: wrap; border-radius: 0; border-bottom: 1px solid var(--bip-alu); }
	.bip-h__item:hover, .bip-h__item.est-ouvert { background: none; }
	.bip-h__entree { flex: 1; height: 58px; padding-left: 4px; font-size: 17px; }
	.bip-h__entree .bip-icone { width: 24px; height: 24px; }
	.bip-h__ouvre { width: 52px; height: 58px; border-radius: 8px; }
	.bip-h__ouvre .bip-icone { width: 20px; height: 20px; }
	.bip-mega2 { position: static; flex: 1 0 100%; border: 0; animation: none; }
	.bip-mega2 .bip-in { padding: 0; }
	.bip-mega2__panneau { display: block; padding: 4px 0 18px; }
	.bip-mega2__carte { display: none; }
	.bip-mega2__cols, .bip-mega2__cols--court { grid-template-columns: minmax(0, 1fr); gap: 20px; }
	.bip-mega2__grille { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.bip-mega2__aide { grid-template-columns: minmax(0, 1fr); }
	.bip-mega2__pied small { display: none; }
	.bip-h .bip-h__plus { margin: 20px 0 0; }
	.bip-h__cta { width: 100%; justify-content: center; height: 54px; font-size: 16.5px; }
	.bip-h .bip-h__tiroir-liens { display: grid; gap: 4px; margin-top: 16px; }
	.bip-h__tiroir-liens a { display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 4px; font-size: 16px; font-weight: 600; color: var(--bip-graphite) !important; }
	.bip-h__tiroir-liens .bip-icone { width: 22px; height: 22px; color: var(--bip-vert-profond); }
}
@media (max-width: 600px) {
	.bip-mega2__marques, .bip-mega2__grille { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
	.bip-mega2__marques a, .bip-mega2__grille a { padding: 6px; gap: 8px; }
	.bip-mega2__grille .bip-vg { width: 36px; height: 36px; }
	.bip-mega2__info { font-size: 12px; }
	.bip-h__ib, .bip-h__action { width: 42px; }
}

/* ---------------------------------------------------------------- sélecteur de langue (drapeaux) */
.bip-langue { position: relative; }
.bip-h .bip-langue__btn { display: inline-flex; align-items: center; gap: 7px; height: 46px; min-height: 0; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: var(--bip-graphite); font-size: 14px; font-weight: 700; cursor: pointer; }
.bip-h .bip-langue__btn:hover, .bip-langue.est-ouverte .bip-langue__btn { background: var(--bip-craie); }
.bip-langue__btn .bip-icone { width: 15px; height: 15px; color: var(--bip-acier); transition: transform .2s; }
.bip-langue.est-ouverte .bip-langue__btn .bip-icone { transform: rotate(180deg); }
.bip-drapeau { display: block; width: 24px; height: 16px; flex: none; }
.bip-langue__liste { position: absolute; top: calc(100% + 6px); right: 0; z-index: 400; min-width: 190px; margin: 0; padding: 6px !important; list-style: none; background: var(--bip-blanc); border: 1px solid var(--bip-alu); border-radius: 12px; }
.bip-langue__liste[hidden] { display: none; }
.bip-langue__liste li { margin: 0; }
.bip-langue__liste a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--bip-graphite) !important; font-size: 15px; font-weight: 600; }
.bip-langue__liste a:hover { background: var(--bip-craie); }
.bip-langue__liste a.est-actuelle { background: var(--bip-craie); }
.bip-langue__liste a.est-actuelle::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--bip-vert-profond); }
@media (max-width: 1024px) {
	.bip-h .bip-langue__btn { padding: 0 8px; gap: 5px; height: 42px; }
	.bip-langue__code { display: none; }
}
@media (max-width: 600px) {
	.bip-h__actions .bip-h__action { display: none !important; } /* « Mon compte » reste dans le tiroir */
	.bip-h .bip-langue__btn { padding: 0 6px; }
	.bip-langue__btn .bip-icone { display: none; }
	.bip-langue__liste { right: -40px; }
}
