/**
 * MÊME — header.css
 * Bandeau promo rotatif, en-tête, mega menu, tiroir mobile, recherche, en-tête sticky.
 * Valeurs relevées dans la feuille de référence (crea_memecosmetics/assets/css/theme.css).
 */

/* --------------------------------------------------------------------------
 * Bandeau promo / annonce — .crea-banners-wrapper.top-header
 * -------------------------------------------------------------------------- */
.crea-banners-wrapper.top-header .top-header-banner {
	padding-top: 0.625rem;
	padding-bottom: 0.625rem;
	font-family: var(--meme-font-heading);
	font-size: 0.875rem;
	line-height: 1.5;
	color: #fff;
	text-align: center;
	background-color: var(--meme-color-topbar);
}

.crea-banners-wrapper.top-header .top-header-banner__description p {
	margin-bottom: 0;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.top-header .swiper {
	overflow: hidden;
}

.top-header .swiper-wrapper {
	transition-duration: 0.4s;
}

/* --------------------------------------------------------------------------
 * En-tête principal
 * -------------------------------------------------------------------------- */
.main-header {
	position: relative;
	z-index: 100;
	border-bottom: 1px solid var(--meme-color-border);
}

.main-header__top {
	position: relative;
	padding-top: 1rem;
	padding-bottom: 1rem;
	background-color: #fff;
}

@media (min-width: 992px) {
	.main-header__top {
		padding-bottom: 0;
	}
}

.header-logo__img {
	display: block;
	width: 80px;
	height: auto;
}

@media (min-width: 768px) {
	.header-logo__img {
		width: 110px;
	}
}

@media (min-width: 992px) {
	.header-logo__img {
		width: 150px;
	}
}

@media (max-width: 991.98px) {
	.header-logo {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}
}

/* Blocs utilitaires (menu, recherche, compte, panier) */
.header-block {
	position: relative;
}

.header-block__link {
	display: inline-flex;
	flex-direction: column;
	row-gap: 0.25rem;
	align-items: center;
	padding: 0.375rem;
	font-family: var(--meme-font-heading);
	color: inherit;
	text-align: center;
	text-decoration: none;
	background-color: transparent;
	border: 0;
	transition: color var(--meme-transition);
}

.header-block__link:hover {
	color: var(--meme-color-accent);
}

@media (min-width: 768px) {
	.header-block__link {
		padding: 0.5rem;
	}
}

.header-block__icon {
	display: block;
	width: 1.5rem;
	height: 1.5rem;
	font-size: 1.5rem;
}

@media (min-width: 768px) {
	.header-block__icon {
		width: 1.625rem;
		height: 1.625rem;
		font-size: 1.625rem;
	}
}

.header-block__label {
	display: none;
	font-family: var(--meme-font-heading);
	font-size: 0.75rem;
	line-height: 1;
}

@media (min-width: 768px) {
	.header-block__label {
		display: inline;
	}
}

/* Compteur panier */
.cart-block {
	position: relative;
}

.meme-cart-link {
	position: relative;
}

.meme-cart-count {
	position: absolute;
	top: 8px;
	right: 4px;
	display: inline-block;
	width: 1rem;
	height: 1rem;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1rem;
	color: #fff;
	text-align: center;
	background-color: var(--meme-color-sale);
	border-radius: 50%;
}

.meme-cart-count.is-empty {
	display: none;
}

/* Recherche desktop (masquée en mobile : la recherche mobile est dans le tiroir/panneau) */
.creasearchbar-wrapper-desktop {
	display: none;
	width: 100%;
}

@media (min-width: 992px) {
	.creasearchbar-wrapper-desktop {
		display: block;
	}
}

.search-wrapper {
	position: relative;
}

.search-wrapper__form {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

@media (min-width: 992px) {
	.search-wrapper__form {
		max-width: 28rem;
		margin-right: auto;
		margin-left: auto;
	}
}

.search-wrapper__input {
	width: 100%;
	height: auto;
	padding: 0.5rem 1rem 0.5rem 2.75rem;
	font-size: 1rem;
	line-height: 1.5;
	background-color: var(--meme-color-surface);
	border-color: var(--meme-color-surface);
	border-radius: var(--meme-radius-pill);
}

.search-wrapper__input:focus {
	background-color: var(--meme-color-surface);
	border-color: var(--meme-color-surface);
	box-shadow: none;
}

.search-wrapper__input::placeholder {
	font-size: 0.875rem;
}

.search-wrapper__btn-submit {
	position: absolute;
	top: -2px;
	left: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 100%;
	padding: 0;
	color: inherit;
	background-color: transparent;
	border: 0;
	transition: color var(--meme-transition);
}

.search-wrapper__btn-submit:hover {
	color: var(--meme-color-accent);
}

.search-wrapper__btn-submit .feather-icon {
	width: 1.125rem;
	height: 1.125rem;
}

/* Recherche mobile */
.creasearchbar-wrapper-mobile {
	padding: 0 0 1rem;
	background: #fff;
}

.creasearchbar-wrapper-mobile[hidden] {
	display: none;
}

/* --------------------------------------------------------------------------
 * Mega menu desktop
 * -------------------------------------------------------------------------- */
.crea-menu {
	position: relative;
	background-color: #fff;
}

.crea-menu-desktop {
	display: none;
}

@media (min-width: 992px) {
	.crea-menu-desktop {
		display: block;
	}
}

.crea-menu-desktop__list {
	padding-left: 0;
	margin-bottom: 0;
	list-style: none;
}

.crea-menu-desktop__label {
	display: inline-block;
	color: inherit;
	text-decoration: none;
}

.crea-menu-desktop__list--1 {
	display: flex;
	max-width: calc(10rem * var(--menu-items-count, 5));
	margin-right: auto;
	margin-left: auto;
}

.crea-menu-desktop__item--1 {
	flex: 1 1 auto;
}

.crea-menu-desktop__label--1 {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 0.75rem;
	padding-bottom: 1rem;
	font-family: var(--meme-font-heading);
	font-size: 1rem;
	color: #2e2e2e;
	text-align: center;
	white-space: nowrap;
	transition: color var(--meme-transition);
}

.crea-menu-desktop__label--1::after {
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 0;
	height: 2px;
	content: "";
	background-color: transparent;
	transition: background-color var(--meme-transition), width var(--meme-transition);
	transform: translateX(-50%);
}

.crea-menu-desktop__item--1:hover > .crea-menu-desktop__label--1::after,
.crea-menu-desktop__item--1.menu-open > .crea-menu-desktop__label--1::after,
.crea-menu-desktop__item--1.active > .crea-menu-desktop__label--1::after {
	width: 50%;
	background-color: #2e2e2e;
}

.crea-menu-desktop__item--1.special > .crea-menu-desktop__label--1 {
	color: var(--meme-color-accent);
}

.crea-menu-desktop__item--1.special:hover > .crea-menu-desktop__label--1::after,
.crea-menu-desktop__item--1.special.menu-open > .crea-menu-desktop__label--1::after {
	background-color: var(--meme-color-accent);
}

/* Sous-menu (mega menu) — hauteur pilotée par le contenu, titres longs sur plusieurs lignes */
.crea-menu-desktop__submenu {
	--menu-columns-count: 5;
	--menu-banners-count: 1;
	--menu-list-columns-count: calc(var(--menu-columns-count) - var(--menu-banners-count));
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 100;
	width: 100%;
	padding-top: 2rem;
	padding-bottom: 2rem;
	font-size: 0.875rem;
	pointer-events: none;
	visibility: hidden;
	background-color: #fff;
	border-top: 1px solid var(--meme-color-border);
	box-shadow: 0 1rem 1.5rem rgba(46, 46, 46, 0.06);
	opacity: 0;
	transition: visibility var(--meme-transition-slow), opacity var(--meme-transition-slow);
}

.crea-menu-desktop__item--1:hover .crea-menu-desktop__submenu,
.crea-menu-desktop__item--1.menu-open .crea-menu-desktop__submenu,
.crea-menu-desktop__item--1:focus-within .crea-menu-desktop__submenu {
	pointer-events: auto;
	visibility: visible;
	opacity: 1;
}

.crea-menu-desktop__submenu-grid {
	display: grid;
	grid-template-columns: repeat(var(--menu-columns-count), 1fr);
	column-gap: 1.5rem;
	align-items: start;
}

.crea-menu-desktop__list--2 {
	grid-column: span var(--menu-list-columns-count);
	column-count: var(--menu-list-columns-count);
	column-gap: 1.5rem;
}

.crea-menu-desktop__item--2 {
	padding-top: 0.625rem;
	padding-bottom: 0.625rem;
	break-inside: avoid-column;
}

.crea-menu-desktop__label--2 {
	display: block;
	padding: 2px 4px;
	margin-bottom: 0.5rem;
	font-family: var(--meme-font-heading);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: #2e2e2e;
	overflow-wrap: anywhere;
	border-radius: 5px;
	transition: background-color var(--meme-transition);
}

.crea-menu-desktop__label--2:hover {
	text-decoration: none;
	background-color: var(--meme-color-cream);
}

.crea-menu-desktop__list--3 {
	display: flex;
	flex-direction: column;
	row-gap: 5px;
	padding-left: 0;
	margin-bottom: 0;
	list-style: none;
}

.crea-menu-desktop__label--3 {
	display: inline-block;
	padding: 2px 4px;
	font-family: var(--meme-font-heading);
	font-size: 0.875rem;
	line-height: 1.35;
	color: #2e2e2e;
	text-decoration: none;
	overflow-wrap: anywhere;
	border-radius: 5px;
	transition: background-color var(--meme-transition);
}

.crea-menu-desktop__label--3:hover {
	text-decoration: none;
	background-color: var(--meme-color-cream);
}

/* Bannière du mega menu */
.crea-menu-banner {
	position: relative;
	height: fit-content;
}

.crea-menu-banner__link {
	display: block;
}

.crea-menu-banner__img {
	display: block;
	width: 100%;
	aspect-ratio: 5 / 4;
	object-fit: cover;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
}

.crea-menu-banner__content {
	display: flex;
	align-items: flex-end;
	width: 100%;
	padding: 1rem;
	background-color: var(--meme-color-cream);
	border-bottom-right-radius: 5px;
	border-bottom-left-radius: 5px;
}

.crea-menu-banner__btn {
	font-family: var(--meme-font-heading);
	font-size: 1.125rem;
	font-weight: 600;
	color: #2e2e2e;
	text-decoration: none;
	transition: color var(--meme-transition);
}

.crea-menu-banner__btn:hover {
	color: var(--meme-color-accent);
}

/* Voile sous le mega menu */
.crea-menu-overlay {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 99;
	width: 100%;
	height: 100%;
	background-color: rgba(46, 46, 46, 0.4);
}

.crea-menu-overlay[hidden] {
	display: none;
}

/* --------------------------------------------------------------------------
 * En-tête sticky
 * -------------------------------------------------------------------------- */
.main-header--sticky {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: #fff;
	border-bottom: 1px solid var(--meme-color-border);
	transition: transform 400ms;
}

.main-header--sticky.main-header--no-transition {
	transition: none;
}

.main-header--sticky.main-header--hide {
	transform: translateY(-100%);
}

.main-header--sticky .crea-banners-wrapper.top-header {
	display: none;
}

.main-header--sticky .main-header__top {
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.main-header--sticky .header-block__icon {
	width: 1.5rem;
	height: 1.5rem;
}

@media (min-width: 768px) {
	.main-header--sticky .header-block__icon {
		width: 1.625rem;
		height: 1.625rem;
	}
}

.main-header--sticky .header-logo__img {
	width: 80px;
}

@media (min-width: 768px) {
	.main-header--sticky .header-logo__img {
		width: 110px;
	}
}

@media (min-width: 992px) {
	.main-header--sticky .header-logo__img {
		width: 150px;
	}
}

/* Réserve d'espace pour éviter le saut de mise en page */
.main-header-spacer {
	height: 0;
}

/* --------------------------------------------------------------------------
 * Tiroir mobile — .crea-menu-mobile
 * -------------------------------------------------------------------------- */
.crea-menu-mobile {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	width: 90vw;
	max-width: 420px;
	height: 100%;
	background-color: #fff;
	box-shadow: 0 0 2rem rgba(46, 46, 46, 0.18);
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.crea-menu-mobile.is-open {
	transform: translateX(0);
	visibility: visible;
}

.crea-menu-mobile .offcanvas-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 1.25rem;
	padding-bottom: 0;
	margin-bottom: 1rem;
}

.crea-menu-mobile .offcanvas-header .btn-close {
	position: absolute;
	top: 1rem;
	right: 1.25rem;
}

.crea-menu-mobile .offcanvas-title {
	margin: 0;
}

.crea-menu-mobile__logo img {
	display: block;
	width: 110px;
	height: auto;
}

.crea-menu-mobile .btn-close {
	opacity: 1;
}

.crea-menu-mobile .offcanvas-body {
	flex: 1 1 auto;
	padding: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.crea-menu-mobile .search-wrapper {
	position: relative;
	display: block;
	padding: 0.625rem 1.25rem;
	padding-bottom: 0;
	margin-bottom: 1.5rem;
}

.crea-menu-mobile__list {
	padding-left: 0;
	margin-bottom: 0;
	list-style: none;
}

.crea-menu-mobile__item {
	border-bottom: 0;
}

.crea-menu-mobile__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.crea-menu-mobile__list-label {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 3rem;
	padding: 0.75rem 1.25rem;
	font-family: var(--meme-font-heading);
	font-size: 1.0625rem;
	font-weight: 400;
	color: inherit;
	text-decoration: none;
}

.crea-menu-mobile__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	color: inherit;
	background: none;
	border: 0;
	transition: transform 0.2s ease-in-out;
}

.crea-menu-mobile__toggle[aria-expanded="true"] {
	transform: rotate(90deg);
}

.crea-menu-mobile__panel {
	padding: 0 1.25rem 1rem;
}

.crea-menu-mobile__panel[hidden] {
	display: none;
}

.crea-menu-mobile__group {
	margin-bottom: 1rem;
}

.crea-menu-mobile__group-title {
	display: block;
	margin-bottom: 0.5rem;
	font-family: var(--meme-font-heading);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--meme-color-muted);
}

.crea-menu-mobile__sublist {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding-left: 0;
	margin: 0;
	list-style: none;
}

.crea-menu-mobile__sublist-link {
	font-size: 0.9375rem;
	color: inherit;
	text-decoration: none;
}

.crea-menu-mobile__banner {
	margin-top: 1rem;
}

.crea-menu-mobile__banner img {
	border-radius: 5px;
}

.crea-menu-mobile__banner-label {
	display: block;
	padding: 0.5rem 0;
	font-weight: 600;
}

.crea-menu-mobile__footer {
	z-index: 99;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.25rem 1.25rem 2rem;
	background-color: var(--meme-color-surface);
	border-top: 0;
}

.crea-menu-mobile__footer-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding-left: 0;
	margin: 0;
	list-style: none;
}

.crea-menu-mobile__footer-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.9375rem;
	color: inherit;
	text-decoration: none;
}

.crea-menu-mobile__footer-link .feather-icon {
	width: 1.25rem;
	height: 1.25rem;
}

/* --------------------------------------------------------------------------
 * Mega menu — alignement sur la référence 2026-11-15 (client review) :
 * deux colonnes de groupes + bannière(s) à droite (largeur ~45 %).
 * ----------------------------------------------------------------------- */
.crea-menu-desktop__submenu-grid {
	display: flex;
	align-items: flex-start;
	column-gap: 2rem;
}

.crea-menu-desktop__list--2 {
	display: block;
	flex: 0 0 55%;
	max-width: 55%;
	column-count: 2;
	column-gap: 2rem;
}

.crea-menu-desktop__list--2 > .crea-menu-desktop__item--2 {
	break-inside: avoid;
}

.crea-menu-desktop__submenu .crea-menu-banner {
	flex: 1 1 0;
	min-width: 0;
}

.crea-menu-desktop__submenu .crea-menu-banner__img {
	aspect-ratio: 5 / 4;
}

/* --------------------------------------------------------------------------
 * Tiroir mobile — alignement espacement/typographie sur la référence 2026-11-15
 * (client review : sous-menus trop serrés, largeur et hauteur de lignes).
 * ----------------------------------------------------------------------- */
.crea-menu-mobile {
	width: 100vw;
	max-width: 100vw;
}

.crea-menu-mobile .offcanvas-header {
	padding: 0.875rem 1.375rem 0.5rem;
	margin-bottom: 0.25rem;
}

.crea-menu-mobile .offcanvas-header .btn-close {
	top: 1.375rem;
	right: 1.375rem;
}

.crea-menu-mobile__logo img {
	width: 96px;
}

.crea-menu-mobile__list-label {
	min-height: 3.125rem;
	padding: 0.8125rem 1.375rem;
	font-size: 1rem;
	line-height: 1.4;
}

.crea-menu-mobile__toggle {
	width: 3.125rem;
	height: 3.125rem;
}

.crea-menu-mobile__row {
	min-height: 3.125rem;
}

.crea-menu-mobile__panel {
	padding: 0 0 0.5rem;
}

.crea-menu-mobile__group {
	margin-bottom: 0.75rem;
}

.crea-menu-mobile__group-title {
	margin: 0.25rem 0 0.375rem;
	padding: 0 1.375rem;
	font-size: 0.8125rem;
}

.crea-menu-mobile__sublist {
	gap: 0;
}

.crea-menu-mobile__sublist-link {
	display: flex;
	align-items: center;
	min-height: 3.125rem;
	padding: 0.75rem 1.375rem 0.75rem 2.25rem;
	font-size: 1rem;
	line-height: 1.4;
}

.crea-menu-mobile__banner {
	margin: 0.75rem 1.375rem 0;
}

.crea-menu-mobile__banner-label {
	font-size: 0.9375rem;
}
