/* ==== partial: 10-header-composition.css ====
   Header composition, reduced checkout header and search fields. Depends on 04-header and 08-navigation.
   ======================================================================== */

/* 19. Header composition (absorbed from header.css) ----------------------- */

/* One storefront navigation. The same Shop menu serves desktop and mobile. */
.demande-header--unified { background: var(--demande-surface); margin: 0; }
.demande-header.demande-header--unified .demande-header__inner {
	display: grid; grid-template-columns: 150px auto minmax(180px, 340px) auto auto; justify-content: space-between;
	grid-template-areas: "brand nav search actions cta"; align-items: center;
	gap: var(--demande-space-3, 24px); min-height: 88px; padding-block: 16px;
}
.demande-header--unified .demande-header__inner > * { margin: 0; min-width: 0; }
.demande-header--unified .demande-header__brand { grid-area: brand; }
.demande-header--unified .demande-header__brand img { width: 150px; max-width: 100%; max-height: 42px; }
.demande-header--unified nav.demande-header__nav { grid-area: nav; position: static; }
.demande-header--unified .demande-header__search { grid-area: search; width: 100%; max-width: 340px; justify-self: center; }
.demande-header--unified .demande-header__actions { grid-area: actions; flex-wrap: nowrap; gap: 6px; }
.demande-header--unified .demande-header__inner > .demande-gift-list-cta { grid-area: cta; }
.demande-header--unified .demande-gift-list-cta .demande-button { white-space: nowrap; }
.demande-header--unified .demande-header__nav .demande-nav-mobile { display: none; }
.demande-header--unified .demande-header__nav .wp-block-navigation-item__content { font-size: 0.875rem; padding: 10px 12px; line-height: 24px; }
.demande-header--unified .demande-header__nav button.wp-block-navigation-item__content { border: 0; border-radius: var(--demande-radius); background: transparent; color: var(--demande-heading); font: inherit; font-size: 0.875rem; font-weight: 600; min-height: 44px; cursor: pointer; }
.demande-header--unified .demande-header__nav button.wp-block-navigation-item__content:hover,
.demande-header--unified .demande-header__nav button[aria-expanded="true"].wp-block-navigation-item__content { background: var(--demande-lavender); color: var(--demande-primary); }
.demande-header--unified .demande-header__nav button:focus-visible,
.demande-header--unified .demande-header__nav a:focus-visible { outline: 2px solid var(--demande-primary); outline-offset: 2px; }
.demande-header--unified .demande-header__nav .wp-block-navigation__submenu-icon { margin-left: -6px; margin-right: 8px; }
/* The header search is the supported core/search block carrying
   query.post_type=product (WooCommerce's current product-search pattern), so
   these rules mirror the geometry the legacy wc-block-product-search styling
   used to supply: a tinted 44px surface, the standard radius, a visible border
   and a 44px icon button that draws the magnifier. The field tokens are
   re-declared because 09-control-geometry sizes every text input globally. */
.demande-header--unified .demande-header__search { --demande-field-height: 44px; --demande-field-min-height: 44px; }
.demande-header--unified .demande-header__search .wp-block-search__inside-wrapper { min-height: 44px; border-radius: var(--demande-radius); border-color: var(--demande-border); background: var(--demande-header-tint); }
.demande-header--unified .demande-header__search .wp-block-search__inside-wrapper:is(:hover, :focus-within) { border-color: var(--demande-primary); }
.demande-header--unified .demande-header__search input.wp-block-search__input { flex: 1 1 auto; }
/* .wp-element-button carries the 48px control height set in 04-control-geometry,
   so the search button is qualified to keep the 44px field height. */
.demande-header--unified .demande-header__search .wp-block-search__button.wp-element-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; flex: 0 0 44px; padding: 0; margin: 0; position: relative; }
.demande-header--unified .demande-header__search .wp-block-search__button svg { display: none; }
.demande-header--unified .demande-header__search .wp-block-search__button::before { content: ""; width: 12px; height: 12px; border: 1.8px solid currentColor; border-radius: 50%; }
.demande-header--unified .demande-header__search .wp-block-search__button::after { content: ""; width: 7px; height: 1.8px; background: currentColor; position: absolute; left: 27px; top: 29px; transform: rotate(45deg); }
.demande-header--unified .demande-shop-category { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; }
.demande-header--unified .demande-category-toggle { display: flex; min-width: 44px; }
.demande-header--unified .demande-shop-category > a { min-width: 0; }
.demande-header--unified .demande-shop-category.is-open { background: var(--demande-lavender); border-radius: var(--demande-radius); }
.demande-header--unified .demande-mega { display: none; }
.demande-header--unified .demande-shop-category.is-open > .demande-mega { display: block; }
.demande-header--unified .demande-category-tree { display: block; margin: 0; padding: 0; list-style: none; }
.demande-header--unified .demande-category-tree li { display: block; break-inside: avoid; margin: 0; padding: 0; }
.demande-header--unified .demande-category-tree a { display: block; padding: 8px 12px; font-size: 0.875rem; line-height: 1.5; font-weight: 400; }
.demande-header--unified .demande-category-tree .demande-category-tree { margin-left: 12px; border-left: 1px solid var(--demande-border); }
.demande-header--unified .demande-shop-all > a { color: var(--demande-primary); font-weight: 600; }
/* The grid marks the catalogue; outlined chevrons reveal its next level. */
.demande-header--unified li.demande-nav-shop > button .wp-block-navigation-item__label { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.demande-header--unified li.demande-nav-shop > button .wp-block-navigation-item__label::before { content: ""; width: 15px; height: 15px; flex: 0 0 15px; background: linear-gradient(currentColor, currentColor) 0 0 / 6px 6px, linear-gradient(currentColor, currentColor) 100% 0 / 6px 6px, linear-gradient(currentColor, currentColor) 0 100% / 6px 6px, linear-gradient(currentColor, currentColor) 100% 100% / 6px 6px; background-repeat: no-repeat; opacity: 0.75; }
.demande-header--unified .demande-header__nav .demande-shop-category > a.wp-block-navigation-item__content { text-transform: uppercase; letter-spacing: var(--demande-tracking-label); font-size: 0.75rem; font-weight: 700; line-height: 20px; }
.demande-header--unified .demande-shop-category > .demande-category-toggle { border: 1px solid var(--demande-border); border-radius: var(--demande-radius); height: 44px; min-width: 44px; width: 44px; justify-self: center; background: var(--demande-surface); color: var(--demande-primary); }
.demande-header--unified .demande-shop-category > .demande-category-toggle[aria-expanded="true"] { background: var(--demande-primary); border-color: var(--demande-primary); color: var(--demande-surface); }
.demande-header--unified .demande-shop-category.is-open > a { color: var(--demande-primary); }
/* Drop shadows below keep #RRGGBBAA alpha literals: they are tinted
   shadows, not palette colours, and survive as-is by design. */
@media (min-width: 1281px) {
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container,
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-dialog,
	.demande-header--unified .demande-header__nav .wp-block-navigation__container { position: static; }
	.demande-header--unified .demande-nav-shop { position: static; }
	.demande-header--unified .demande-header__nav li.demande-nav-shop > button[aria-expanded="true"] ~ .wp-block-navigation__submenu-container {
		left: max(24px, calc((100vw - var(--demande-container)) / 2)); right: auto; top: 100%; width: min(960px, calc(100vw - 48px));
		min-height: 480px; box-sizing: border-box; padding: 18px; align-items: stretch;
		background: var(--demande-surface); border: 1px solid var(--demande-border); border-radius: 0 0 12px 12px; box-shadow: 0 16px 32px var(--demande-shadow-md);
	}
	.demande-header--unified .demande-nav-shop > .wp-block-navigation__submenu-container > li { width: 240px; flex: none; position: static; }
	.demande-header--unified .demande-mega { inset: 18px 18px 18px 278px; padding: 0 0 0 18px; overflow-y: auto; border-left: 1px solid var(--demande-border); }
	.demande-header--unified .demande-mega > .demande-category-tree { columns: 2; column-gap: 16px; }
	.demande-header--unified .demande-nav-about > .wp-block-navigation__submenu-container { min-width: 180px; padding: 8px; border: 1px solid var(--demande-border); border-radius: 8px; box-shadow: 0 8px 24px var(--demande-shadow-sm); }
}
@media (max-width: 1280px) {
	.demande-header.demande-header--unified .demande-header__inner { grid-template-columns: 44px 150px minmax(0, 1fr) auto; grid-template-areas: "nav brand search actions"; gap: 18px; min-height: 80px; }
	.demande-header--unified .demande-header__inner > .demande-gift-list-cta { display: none; }
	.demande-header--unified nav.demande-header__nav { justify-content: flex-start; }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .demande-nav-mobile { display: flex; }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container-open { border: 0; background: transparent; padding: 10px; width: 44px; height: 44px; color: var(--demande-heading); }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open { padding: 16px 24px 24px; }
	.demande-header--unified .demande-header__nav .is-menu-open .wp-block-navigation__responsive-dialog { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
	.demande-header--unified .demande-header__nav .is-menu-open .wp-block-navigation__responsive-dialog::before { content: ""; display: block; width: 136px; height: 44px; margin-bottom: 20px; background: url("../../images/logo.png") left center / contain no-repeat; }
	.demande-header--unified .demande-header__nav .is-menu-open .wp-block-navigation__responsive-container-close { top: 0; right: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
	.demande-header--unified .demande-header__nav .is-menu-open .wp-block-navigation__responsive-container-content { flex: 1; padding-top: 0; align-items: stretch; }
	.demande-header--unified .demande-header__nav .is-menu-open .wp-block-navigation__container { gap: 4px; flex: 1; }
	.demande-header--unified .demande-header__nav .is-menu-open .demande-shop-category > .demande-category-toggle { border: 0; background: transparent; color: var(--demande-primary); }
	.demande-header--unified .demande-header__nav .is-menu-open .demande-shop-category > .demande-category-toggle[aria-expanded="true"] { background: var(--demande-primary-soft); }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open li.wp-block-navigation-submenu { display: grid; grid-template-columns: minmax(0, 1fr) 24px; }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu > .wp-block-navigation-item__content { grid-column: 1 / -1; grid-row: 1; padding-right: 44px; font-weight: 600; }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu > .wp-block-navigation__submenu-icon { display: block; grid-column: 2; grid-row: 1; pointer-events: none; margin: 0; align-self: center; }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu > .wp-block-navigation__submenu-container { display: none; grid-column: 1 / -1; width: 100%; min-width: 0; padding: 6px 0 12px 12px; border: 0; position: static; }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu > button[aria-expanded="true"] ~ .wp-block-navigation__submenu-container { display: flex; }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-submenu > button[aria-expanded="true"] + .wp-block-navigation__submenu-icon { transform: rotate(180deg); }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .demande-shop-category { display: grid; grid-template-columns: minmax(0, 1fr) 44px; }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .demande-shop-category > .wp-block-navigation-item__content { padding: 10px 8px; font-size: 16px; font-weight: 500; text-transform: none; letter-spacing: normal; }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .demande-mega { position: static; grid-column: 1 / -1; inset: auto; padding: 4px; margin: 0 4px 8px; border: 0; background: var(--demande-surface); }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .demande-category-tree a { padding: 10px 12px; font-size: 16px; font-weight: 400; }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .demande-nav-create-list { margin-top: auto; padding-top: 20px; }
	.demande-header--unified .demande-header__nav .wp-block-navigation__responsive-container.is-menu-open .demande-nav-create-list a { background: var(--demande-primary); color: var(--demande-surface); }
}
@media (max-width: 782px) {
	.demande-header.demande-header--unified .demande-header__inner { grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-areas: "nav brand actions" "search search search"; gap: 10px 12px; padding: 12px 16px; }
	.demande-header--unified .demande-header__brand { justify-self: center; }
	.demande-header--unified .demande-header__brand img { width: 136px; max-height: 38px; }
	.demande-header--unified .demande-header__actions { gap: 0; }
	.demande-header--unified .demande-header__actions .demande-my-lists,
	.demande-header--unified .demande-header__actions .wp-block-woocommerce-customer-account { display: none; }
	.demande-header--unified .demande-header__actions .wc-block-mini-cart__button { width: 44px; padding: 8px; }
}

.demande-header-layout-compact .demande-header.demande-header--unified .demande-header__inner { min-height:68px; padding-block:10px; gap:16px; }
@media (min-width:1281px) {
	.demande-header-no-search .demande-header.demande-header--unified .demande-header__inner { grid-template-columns:150px 1fr auto auto; grid-template-areas:"brand nav actions cta"; }
}
@media (max-width:1280px) and (min-width:783px) {
	.demande-header-no-search .demande-header.demande-header--unified .demande-header__inner { grid-template-columns:44px 150px 1fr; grid-template-areas:"nav brand actions"; }
}
@media (max-width:782px) {
	.demande-header-no-search .demande-header.demande-header--unified .demande-header__inner { grid-template-areas:"nav brand actions"; }
	.demande-header-mobile-cta .demande-header.demande-header--unified .demande-header__inner { grid-template-areas:"nav brand actions" "search search search" "cta cta cta"; }
	.demande-header-mobile-cta.demande-header-no-search .demande-header.demande-header--unified .demande-header__inner { grid-template-areas:"nav brand actions" "cta cta cta"; }
	.demande-header-mobile-cta .demande-header--unified .demande-header__inner > .demande-gift-list-cta { display:block; }
	.demande-header-mobile-cta .demande-header__inner > .demande-gift-list-cta a { width:100%; }
}
form[data-demande-search] { position:relative; }
.demande-search-results { position:absolute; top:100%; inset-inline:0; z-index:100; padding:6px; margin:8px 0 0; list-style:none; max-height:min(440px,60vh); overflow:auto; background:var(--demande-surface); border:1px solid var(--demande-border); border-radius:var(--demande-radius); box-shadow:0 8px 24px rgba(40,27,64,.12); }
.demande-search-results[hidden] { display:none; }
.demande-search-results a { display:flex; align-items:center; gap:12px; padding:10px; min-height:44px; color:var(--demande-heading); text-decoration:none; font-size:.875rem; }
.demande-search-results img { flex:0 0 44px; object-fit:cover; border-radius:4px; }
.demande-search-results [aria-selected=true],.demande-search-results li:hover { background:var(--demande-lavender); }

/* 20. Reduced checkout header + search fields ------------------------------ */

/* parts/header-checkout.html and header-confirmation.html reuse the unified
   header chrome (logo, surface, border, min-height, type) from section 19 and
   swap the navigation/search/actions for a progress indicator and a help
   link. The grid is re-declared here, after the unified breakpoints, so the
   higher specificity and source order win without !important. */
.demande-header.demande-header--unified.demande-header--checkout .demande-header__inner {
	grid-template-columns: 150px minmax(0, 1fr) auto;
	grid-template-areas: "brand progress help";
}
.demande-header--checkout .demande-progress { grid-area: progress; justify-self: center; flex-wrap: nowrap; row-gap: 0; }
.demande-header--checkout .demande-header__help { grid-area: help; }
@media (max-width: 782px) {
	.demande-header.demande-header--unified.demande-header--checkout .demande-header__inner {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "brand help" "progress progress";
		gap: 8px 12px;
		min-height: 0;
	}
	.demande-header--checkout .demande-progress { justify-self: stretch; justify-content: space-between; }
	.demande-header--checkout .demande-progress__step + .demande-progress__step::before { width: 1rem; }
}

/* Search fields. One wrapper owns the border, radius, background and focus
   ring; the input and button sit inside it borderless, so the ring never
   doubles and nothing shifts on focus. Covers the header product search and
   standalone core search blocks (.wp-block-search__inside-wrapper) on 404,
   search results and pages. */
.wp-block-search__inside-wrapper {
	box-sizing: border-box;
	align-items: stretch;
	border: 1px solid var(--demande-border-input);
	border-radius: var(--demande-radius);
	overflow: hidden;
	transition: border-color var(--demande-transition);
}
.wp-block-search__inside-wrapper { background-color: var(--demande-surface); min-height: var(--demande-control-height); }
.wp-block-search__inside-wrapper:hover { border-color: var(--demande-primary); }
.wp-block-search__inside-wrapper:focus-within {
	border-color: var(--demande-primary);
	outline: var(--demande-focus-ring);
	outline-offset: 1px;
}
.wp-block-search__inside-wrapper .wp-block-search__input {
	background-color: transparent;
	border: 0;
	border-radius: 0;
	min-width: 0;
}
.wp-block-search__inside-wrapper .wp-block-search__input:is(:hover, :focus, :focus-visible) {
	border: 0;
	box-shadow: none;
	outline: 0;
}
.wp-block-search__inside-wrapper .wp-block-search__button { border-radius: 0; margin: 0; }
.wp-block-search__inside-wrapper .wp-block-search__button:focus-visible { outline-offset: -3px; }

