/**
 * Poderm — en-tête : barre d'annonce, header sticky, mega menu, tiroir mobile.
 * Géométrie mesurée sur la référence à 1440 px (tolérance ≤ 2 px).
 */

/* ------------------------------------------------------------------
 * 1. Barre d'annonce — visible en permanence (desktop + mobile)
 * ------------------------------------------------------------------ */
.announcement-bar {
	background: var(--color-foreground);
	color: var(--color-white);
}

.announcement-bar__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	min-height: var(--announcement-height);
	padding-top: 0;
	padding-bottom: 0;
}

.announcement-bar__message {
	grid-column: 2;
	grid-row: 1;
	justify-self: center;
	width: max-content;
	max-width: 100%;
	margin: 0;
	padding: 0.8rem 0;
	min-height: var(--announcement-height);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.4rem;
	font-weight: var(--font-body-weight-medium);
	line-height: 1.76rem;
	letter-spacing: 0.1rem;
	text-align: center;
	color: var(--color-white);
}

.announcement-bar__right {
	grid-column: 3;
	grid-row: 1;
	justify-self: end;
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.announcement-bar__cta {
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	padding: 0.3rem 1rem;
	height: 20px;
	border-radius: 3px;
	background: var(--color-blue-light);
	color: var(--color-foreground);
	font-size: 1.4rem;
	font-weight: var(--font-body-weight-heavy);
	line-height: 1.4rem;
	letter-spacing: 0.07rem;
	text-transform: uppercase;
	transition: background-color var(--duration-default) ease;
}

.announcement-bar__cta:hover {
	background: var(--color-white);
	color: var(--color-foreground);
}

.announcement-bar__cta-icon {
	width: 13px;
	height: 12px;
	object-fit: contain;
}

/* ------------------------------------------------------------------
 * 2. Header sticky
 * ------------------------------------------------------------------ */
.header-wrapper {
	position: sticky;
	top: 0;
	z-index: var(--header-z);
	background: var(--color-background);
	border-bottom: 0.1rem solid var(--color-border-soft);
}

.header {
	display: grid;
	grid-template-areas: 'heading navigation icons';
	grid-template-columns: 125.5px minmax(0, 1fr) 377px;
	align-items: center;
	min-height: 6rem;
	padding-top: 1.3rem;
	padding-bottom: 1.3rem;
	background: var(--color-background);
}

/* Logo */
.header__heading {
	grid-area: heading;
	margin: 0;
	line-height: 0;
}

.header__logo {
	display: inline-block;
	padding: 0 0.75rem;
	margin-left: -0.75rem;
	line-height: 0;
}

.header__logo-img {
	width: 118px;
	height: auto;
	max-width: none;
}

.header__logo-text {
	font-size: 2.2rem;
	font-weight: var(--font-body-weight-heavy);
	letter-spacing: 0.2rem;
}

/* ------------------------------------------------------------------
 * 3. Navigation principale (desktop)
 * ------------------------------------------------------------------ */
.header__nav {
	grid-area: navigation;
	margin-left: 3.4rem;
	align-self: center;
}

.header__menu {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	row-gap: 0;
}

.header__menu-item-wrap {
	display: flex;
	align-items: center;
}

.header__menu-item {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 1rem;
	color: var(--color-foreground);
	font-size: 1.4rem;
	font-weight: var(--font-body-weight-bold);
	line-height: 1.3;
	letter-spacing: 0;
	white-space: nowrap;
	text-decoration: none;
	transition: color var(--duration-default) ease;
}

.header__menu-item:hover,
.header__menu-item:focus-visible {
	color: var(--color-accent);
}

.header__menu-item--toggle {
	padding: 1rem 2rem 1rem 1rem;
	cursor: pointer;
}

.header__menu-icon {
	width: 9px;
	height: 10px;
	flex: 0 0 auto;
	margin-left: 0.8rem;
	color: currentColor;
}

.header__menu-icon--minus {
	display: none;
}

.header__menu-item-wrap--mega.is-open > .header__menu-item--toggle {
	color: var(--color-accent);
}

.header__menu-item-wrap--mega.is-open .header__menu-icon--plus {
	display: none;
}

.header__menu-item-wrap--mega.is-open .header__menu-icon--minus {
	display: block;
}

/* ------------------------------------------------------------------
 * 4. Icônes utilitaires
 * ------------------------------------------------------------------ */
.header__icons {
	grid-area: icons;
	justify-self: end;
	display: flex;
	align-items: center;
	column-gap: 1rem;
}

.header__right-menu {
	display: flex;
	align-items: center;
	column-gap: 2rem;
}

.header__right-menu-link {
	font-size: 1.6rem;
	font-weight: var(--font-body-weight-medium);
	white-space: nowrap;
	transition: color var(--duration-default) ease;
}

.header__right-menu-link:hover {
	color: var(--color-muted);
}

.header__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 25px;
	height: 25px;
	padding: 0;
	color: var(--color-foreground);
	transition: color var(--duration-default) ease;
}

.header__icon:hover {
	color: var(--color-muted);
}

.header__icon-svg {
	width: 25px;
	height: 25px;
}

.header__icon--cart {
	position: relative;
}

.cart-count-bubble {
	position: absolute;
	top: 11px;
	left: 50%;
	min-width: 17px;
	height: 17px;
	padding: 0 2px;
	border-radius: 100%;
	background: var(--color-accent);
	color: var(--color-white);
	font-size: 11px;
	font-weight: var(--font-body-weight);
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translateX(-50%);
	pointer-events: none;
}

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

/* Bouton hamburger : masqué sur desktop */
.header__drawer-toggle {
	display: none;
	grid-area: 1 / 1;
	align-items: center;
	justify-content: flex-start;
	width: 25px;
	height: 25px;
	padding: 0;
	color: var(--color-foreground);
}

.header__icon-menu {
	width: 24px;
	height: 16px;
}

/* ------------------------------------------------------------------
 * 5. Mega menu (desktop)
 * ------------------------------------------------------------------ */
.mega-menu {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 99;
	display: flex;
	justify-content: center;
	padding: 3.2rem 0 3.1rem;
	background: var(--color-background);
	box-shadow: 0 4px 5px rgba(44, 48, 59, 0.05);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-1.5rem);
	transition: opacity var(--duration-default) ease, transform var(--duration-default) ease, visibility var(--duration-default);
}

.header__menu-item-wrap--mega.is-open > .mega-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mega-menu__list {
	display: grid;
	align-items: flex-start;
	justify-content: center;
	gap: 1.8rem 2rem;
}

.mega-menu__col {
	min-width: 0;
}

.mega-menu__heading {
	display: block;
	padding: 0.6rem 0;
	font-size: 1.6rem;
	font-weight: var(--font-body-weight-bold);
	line-height: 1.3;
	color: var(--color-foreground);
}

.mega-menu__links {
	margin: 0;
}

.mega-menu__link {
	display: block;
	padding: 0.4rem 0;
	font-size: 1.6rem;
	font-weight: var(--font-body-weight);
	line-height: 1.3;
	overflow-wrap: break-word;
	transition: color var(--duration-short) ease;
}

.mega-menu__link:hover {
	color: var(--color-muted);
}

/* Carte visuelle (2 dernières colonnes) */
.mega-menu__card {
	position: relative;
	min-height: 20rem;
	padding-top: 74%;
	border-radius: 0.5rem;
	overflow: hidden;
	background: var(--color-gray-1);
}

.mega-menu__card-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mega-menu__card-content {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	row-gap: 2rem;
	padding: 1.8rem 1.8rem 3rem;
}

.mega-menu__card--no-tag .mega-menu__card-content {
	justify-content: flex-end;
}

.mega-menu__card-tag {
	align-self: flex-start;
	display: inline-block;
	margin: 0;
	padding: 0.1rem 0.8rem;
	background: var(--color-accent);
	color: var(--color-white);
	font-size: 1.4rem;
	font-weight: var(--font-body-weight-heavy);
	line-height: 1.1;
	letter-spacing: 0.02rem;
	text-transform: uppercase;
	border-radius: 0;
}

.mega-menu__card-main {
	display: flex;
	flex-direction: column;
	row-gap: 1rem;
}

.mega-menu__card-title {
	max-width: 23.6rem;
	margin: 0;
	font-size: 2.4rem;
	font-weight: var(--font-body-weight-medium);
	line-height: 1em;
	text-transform: uppercase;
	color: var(--color-foreground);
}

.mega-menu__card-link {
	font-size: 1.4rem;
	font-weight: var(--font-body-weight);
	line-height: 1.3;
	text-decoration: underline;
	text-underline-offset: 0.3rem;
	text-decoration-thickness: 0.1rem;
	color: var(--color-foreground);
}

.mega-menu__card-link:hover {
	text-decoration-thickness: 0.2rem;
}

.mega-menu__card--dark {
	background: var(--color-foreground);
}

.mega-menu__card--dark .mega-menu__card-title,
.mega-menu__card--dark .mega-menu__card-link {
	color: var(--color-white);
}

.mega-menu__card--dark .mega-menu__card-img {
	opacity: 0.35;
}

/* Tuiles « LA MARQUE » */
.mega-menu__tile {
	display: flex;
	flex-direction: column;
	row-gap: 1rem;
}

.mega-menu__tile-media {
	position: relative;
	display: block;
	min-height: 16rem;
	padding-top: 112%;
	border-radius: 0.3rem;
	overflow: hidden;
	background: var(--color-gray-1);
}

.mega-menu__tile-media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.2s linear;
}

.mega-menu__tile:hover .mega-menu__tile-media img {
	transform: scale(1.03);
}

.mega-menu__tile-title {
	font-size: 1.6rem;
	font-weight: var(--font-body-weight-heavy);
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--color-foreground);
}

.mega-menu__tile:hover .mega-menu__tile-title {
	text-decoration: underline;
}

/* ------------------------------------------------------------------
 * 6. Recherche (overlay local)
 * ------------------------------------------------------------------ */
.search-overlay {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 98;
	padding: 2.4rem 0;
	background: var(--color-background);
	border-top: 0.1rem solid var(--color-border-soft);
	box-shadow: 0 4px 5px rgba(44, 48, 59, 0.05);
}

.search-overlay__inner {
	display: flex;
	align-items: center;
	gap: 1.6rem;
}

.search-form {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	max-width: 60rem;
	margin: 0;
}

.search-form__input {
	height: 44px;
	padding-right: 5rem;
}

.search-form__submit {
	position: absolute;
	right: 0;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--color-foreground);
}

.search-form__icon {
	width: 20px;
	height: 20px;
}

.search-overlay__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--color-foreground);
}

.search-overlay__close-icon {
	width: 18px;
	height: 18px;
}

/* ------------------------------------------------------------------
 * 7. Tiroir mobile
 * ------------------------------------------------------------------ */
.menu-drawer {
	position: fixed;
	top: var(--drawer-top, 111px);
	left: 0;
	right: 0;
	width: 100%;
	max-width: none;
	height: calc(100dvh - var(--drawer-top, 111px));
	z-index: 290;
	background: var(--color-background);
	box-shadow: 0 8px 20px rgba(44, 48, 59, 0.12);
	overflow-y: auto;
	overscroll-behavior: contain;
	transform: translateY(-10px);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--duration-default) ease, transform var(--duration-default) ease, visibility var(--duration-default);
}

.menu-drawer.is-open {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}

.menu-drawer__overlay {
	display: none;
}

.menu-drawer__inner {
	padding: 0 0 2.4rem;
}

.menu-drawer__head {
	display: none;
}

.menu-drawer__menu {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--color-border-soft);
}

.menu-drawer__item {
	border-bottom: 1px solid var(--color-border-soft);
}

.menu-drawer__link {
	display: block;
	padding: 13px 15px;
	font-size: 1.8rem;
	font-weight: var(--font-body-weight-bold);
	line-height: 1.35;
	color: var(--color-foreground);
}

.menu-drawer__link--level-1 {
	text-transform: none;
	letter-spacing: 0;
}


.menu-drawer__details > summary {
	list-style: none;
	cursor: pointer;
}

.menu-drawer__details > summary::-webkit-details-marker {
	display: none;
}

.menu-drawer__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 13px 15px;
	font-size: 1.8rem;
	font-weight: var(--font-body-weight-bold);
	line-height: 1.35;
	text-transform: none;
	letter-spacing: 0;
}

.menu-drawer__summary-icon {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	color: var(--color-accent);
	transition: transform var(--duration-default) ease;
}

.menu-drawer__details[open] .menu-drawer__summary-icon {
	transform: rotate(90deg);
}

.menu-drawer__submenu {
	padding: 0 15px 1.8rem 30px;
}

.menu-drawer__show-all {
	display: inline-block;
	margin: 0 0 1.2rem;
	font-size: 1.3rem;
	font-weight: var(--font-body-weight-bold);
	letter-spacing: 0.05rem;
	text-transform: uppercase;
	text-decoration: underline;
	text-underline-offset: 0.3rem;
}

.menu-drawer__group {
	margin-bottom: 1.6rem;
}

.menu-drawer__group-title {
	display: block;
	margin-bottom: 0.6rem;
	font-size: 1.2rem;
	font-weight: var(--font-body-weight-bold);
	letter-spacing: 0.08rem;
	text-transform: uppercase;
	color: var(--color-muted);
}

.menu-drawer__group-list .menu-drawer__link {
	padding: 8px 0;
	font-size: 1.6rem;
	font-weight: var(--font-body-weight);
}






.menu-drawer__foot {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 16px 15px 0;
	font-size: 1.4rem;
}

.menu-drawer__foot-link {
	color: var(--color-muted);
}


.menu-drawer__utility {
	padding: 16px 15px 0;
}

.menu-drawer__utility-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.menu-drawer__utility-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 0;
	font-size: 1.5rem;
	color: var(--color-foreground);
}

.menu-drawer__utility-link:hover {
	color: var(--color-accent);
}

.menu-drawer__utility-icon {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	color: var(--color-muted);
}

.menu-drawer__clinique {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 14px 0 0;
	padding: 8px 16px;
	border-radius: 3px;
	background: var(--color-blue-light);
	color: var(--color-foreground);
	font-size: 1.4rem;
	font-weight: var(--font-body-weight-heavy);
	letter-spacing: 0.07rem;
	line-height: 1.2;
	text-transform: uppercase;
}

.menu-drawer__clinique-flag {
	width: 13px;
	height: 12px;
	object-fit: contain;
}


/* Bouton hamburger : icône croix lorsque le tiroir est ouvert */
.header__drawer-toggle .header__icon-close {
	display: none;
}

.header__drawer-toggle[aria-expanded='true'] .header__icon-menu {
	display: none;
}

.header__drawer-toggle[aria-expanded='true'] .header__icon-close {
	display: block;
}

/* ------------------------------------------------------------------
 * 8. Responsive
 * ------------------------------------------------------------------ */
@media screen and (max-width: 1199px) {
	.header {
		grid-template-columns: 110px minmax(0, 1fr) auto;
	}

	.header__nav {
		margin-left: 1.6rem;
	}

	.header__menu-item {
		padding: 0.8rem;
		font-size: 1.3rem;
	}

	.header__menu-item--toggle {
		padding-right: 1.8rem;
	}

	.header__right-menu {
		display: none;
	}
}

@media screen and (max-width: 989px) {
	.header {
		grid-template-columns: 1fr auto 1fr;
		grid-template-areas: 'menu heading icons';
		column-gap: 0;
		padding-top: 1rem;
		padding-bottom: 1rem;
	}

	.header__drawer-toggle {
		display: inline-flex;
	}

	.header__nav {
		display: none;
	}

	.header__heading {
		justify-self: center;
	}

	.header__logo {
		padding: 0;
		margin-left: 0;
	}

	.header__logo-img {
		width: 118px;
	}

	.header__icons {
		column-gap: 1rem;
	}

	.header__icon--account {
		display: none;
	}

	.mega-menu {
		display: none;
	}
}

@media screen and (max-width: 749px) {
	.announcement-bar__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.announcement-bar__message {
		grid-column: 1;
		width: auto;
		max-width: 100%;
		justify-self: stretch;
		padding: 0.8rem 0;
	}

	.announcement-bar__right {
		display: none;
	}

	.header__logo-img {
		width: 118px;
	}
}




/* Carte sombre du mega menu : bouton blanc plein (référence « FAIRE LE DIAGNOSTIC ») */
.mega-menu__card--dark .mega-menu__card-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	padding: 0 2.4rem;
	border-radius: 3px;
	background: var(--color-white);
	color: var(--color-foreground);
	font-weight: var(--font-body-weight-bold);
	letter-spacing: 0.02rem;
	text-decoration: none;
	align-self: flex-start;
}

.mega-menu__card--dark .mega-menu__card-link:hover {
	background: var(--color-accent);
	color: var(--color-white);
}





