/* Jocker Cuir — "Entreprise" (B2B) mega menu, global frontend component.
   Loaded once, unconditionally, from the shared layout
   (resources/views/monsite/layouts/app.blade.php) so it styles the header
   identically on every page, not only the homepage. Relies on the design
   tokens (--paper, --line, --serif, --cream, --olive, --ink) declared in
   :root by whichever page-specific stylesheet is also loaded — it does not
   redeclare them itself, to avoid a second source of truth for those
   values. Scoped to .b2b-* selectors only — does not touch .mega/.has-menu
   (the existing Boutique dropdown). */

.b2b-nav-item{display:flex;align-items:center}
.b2b-nav-trigger{
  display:inline-flex;align-items:center;justify-content:center;
  background:none;border:0;cursor:pointer;color:inherit;
  font-family:inherit;padding:34px 0 34px 6px;
}
.b2b-nav-trigger i{font-size:.7rem;transition:transform .2s ease}
.b2b-nav-item.is-open .b2b-nav-trigger i{transform:rotate(180deg)}
.b2b-mega-menu{
  position:absolute;left:0;right:0;top:100%;
  background:var(--paper);border-top:1px solid var(--line);border-bottom:1px solid var(--line);
  opacity:0;visibility:hidden;transform:translateY(8px);
  transition:.2s ease;
}
.b2b-nav-item:hover .b2b-mega-menu,
.b2b-nav-item.is-open .b2b-mega-menu{opacity:1;visibility:visible;transform:none}

/* Explicit close button support: neither :hover nor .is-open alone
   guarantees "closed" — the pointer can still be physically over the
   panel (still :hover) when its own close button removes .is-open.
   .is-force-closed is a third state that wins over BOTH via a
   same-specificity rule (3 classes each: .b2b-nav-item + a pseudo/real
   class + .b2b-mega-menu) placed AFTER them in source order — the
   standard CSS cascade tie-break, not !important. pointer-events:none
   keeps the hidden panel from being clickable/tabbable while
   suppressed. Cleared by header-b2b-menu.js the moment the pointer
   genuinely leaves the item, or the trigger is clicked again. */
.b2b-nav-item.is-force-closed .b2b-mega-menu{opacity:0;visibility:hidden;transform:translateY(8px);pointer-events:none}

/* position:relative + the extra 40px of top padding (28px -> 68px) exist
   solely to reserve room for .b2b-mega-menu__close below — same values,
   same reasoning as the Boutique (B2C) mega menu's own close button
   (header-b2c-menu.css): aligned with the visible centered .container
   content's own right edge, not the full-bleed panel's, and clear of
   the card/CTA rows beneath it. The close button is position:absolute
   (out of flow), so it does not participate in the flex layout below
   and cannot affect the existing .categories/.ctas 62%/34% split. */
.b2b-mega-menu__inner{
  position:relative;
  display:flex;gap:40px;padding:68px 0 28px;align-items:flex-start;
}
.b2b-mega-menu__categories{flex:1 1 62%;min-width:0}
.b2b-mega-menu__ctas{flex:1 1 34%;display:flex;flex-direction:column;gap:14px}

/* Close button — identical visual treatment to the Boutique (B2C) mega
   menu's own close button (its own equivalent rule lives in
   header-b2c-menu.css): same size, border/background, hover,
   focus-visible. Each menu's CSS file only ever defines its own
   b2b/b2c-prefixed classes, never the other's. */
.b2b-mega-menu__close{
  position:absolute;top:16px;right:0;
  display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;
  background:transparent;border:1px solid var(--line);
  color:var(--ink);cursor:pointer;
  transition:background .2s ease;
}
.b2b-mega-menu__close i{font-size:.85rem}
.b2b-mega-menu__close:hover{background:var(--cream)}

/* Compact 2x2 editorial grid — a fixed height (not aspect-ratio) keeps
   cards visually consistent across 1280/1440/1920px viewports, where an
   aspect-ratio would otherwise grow taller as the grid column widens. */
.b2b-mega-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.b2b-mega-card{
  position:relative;display:block;height:160px;overflow:hidden;background:#b8b4a7;
}
.b2b-mega-card img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .5s ease}
.b2b-mega-card:hover img{transform:scale(1.04)}
.b2b-mega-card__overlay{
  position:absolute;inset:0;background:linear-gradient(0deg,rgba(23,27,20,.66),rgba(23,27,20,0) 58%);
  transition:background .35s ease;
}
.b2b-mega-card:hover .b2b-mega-card__overlay{background:linear-gradient(0deg,rgba(23,27,20,.78),rgba(23,27,20,0) 62%)}
.b2b-mega-card__title{
  position:absolute;left:16px;right:16px;bottom:12px;color:#fff;
  display:flex;align-items:center;gap:8px;
  font-family:var(--sans);font-size:1.05rem;font-weight:600;letter-spacing:-.01em;line-height:1.15;
}
.b2b-mega-card__arrow{
  font-size:.72rem;opacity:0;transform:translateX(-4px);
  transition:opacity .25s ease,transform .25s ease;
}
.b2b-mega-card:hover .b2b-mega-card__arrow,
.b2b-mega-card:focus-visible .b2b-mega-card__arrow{opacity:1;transform:none}

/* Architectes & Décorateurs — the fifth root, treated as a compact
   horizontal featured row (not a sixth image card) with its own
   subcategories inline, immediately beneath the grid. */
.b2b-mega-featured{margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
.b2b-mega-featured__link{
  display:flex;align-items:center;gap:10px;color:inherit;
}
.b2b-mega-featured__link i{font-size:.72rem;transition:transform .25s ease}
.b2b-mega-featured__link:hover i,
.b2b-mega-featured__link:focus-visible i{transform:translateX(4px)}
.b2b-mega-featured__title{font-family:var(--sans);font-size:1rem;font-weight:600;letter-spacing:-.01em}
.b2b-mega-featured__children{
  display:flex;flex-wrap:wrap;gap:6px 20px;margin-top:8px;
}
.b2b-mega-featured__children a{font-size:.79rem;color:#6f6a62}
.b2b-mega-featured__children a:hover{color:var(--ink)}

.b2b-mega-menu__more{display:inline-block;margin-top:14px;font-size:.8rem}
.b2b-mega-cta{
  background:var(--cream);padding:16px 18px;
}
.b2b-mega-cta h3{font-family:var(--sans);font-size:.95rem;font-weight:600;letter-spacing:-.01em;margin:4px 0 6px}
.b2b-mega-cta p{font-size:.79rem;color:#6f6a62;margin:0 0 12px;line-height:1.45}
.b2b-mega-cta .btn,.b2b-mega-cta .btn-outline{width:100%;justify-content:center}
.b2b-nav-trigger:focus-visible,
.b2b-nav-link:focus-visible,
.b2b-mega-card:focus-visible,
.b2b-mega-featured__link:focus-visible,
.b2b-mega-featured__children a:focus-visible,
.b2b-mega-menu__more:focus-visible,
.b2b-mega-menu__close:focus-visible{outline:2px solid var(--olive);outline-offset:3px}

/* Entreprise — mobile top-level row. Split from the plain
   .mobile-link-trigger button used by other top-level items: the label
   itself is a real link to /collections-b2b, and a separate small trigger
   opens the existing #mobile-b2b subpanel — so tapping "B2B" never forces
   a choice between visiting the page and browsing its categories. */
.mobile-b2b-row{
  display:flex;justify-content:space-between;align-items:center;
  padding:16px 0;border-bottom:1px solid var(--line);
}
.mobile-b2b-row-link{font-family:var(--sans);font-size:1.3rem;font-weight:600;letter-spacing:-.01em;color:inherit}
.mobile-b2b-row-trigger{
  background:none;border:0;color:inherit;cursor:pointer;
  padding:8px 0 8px 16px;font-size:1rem;
}
.mobile-b2b-row-link:focus-visible,
.mobile-b2b-row-trigger:focus-visible{outline:2px solid var(--olive);outline-offset:3px}

/* Entreprise — mobile subpanel */
.b2b-mobile-links{gap:0}
.b2b-mobile-link{
  display:flex;align-items:center;gap:14px;
  padding:12px 0;border-bottom:1px solid var(--line);
  font-family:var(--sans);font-size:1rem;font-weight:600;letter-spacing:-.01em;
}
.b2b-mobile-link img{width:52px;height:52px;object-fit:cover;flex-shrink:0}
.b2b-mobile-link span{display:flex;flex:1;justify-content:space-between;align-items:center}
.b2b-mobile-sublinks{
  display:flex;flex-direction:column;
  padding:2px 0 10px 66px;border-bottom:1px solid var(--line);
}
.b2b-mobile-sublink{padding:6px 0;font-size:.83rem;color:#6f6a62}
.b2b-mobile-sublink:hover{color:var(--ink)}
