/* En-tête PICOM : bande du haut vert sapin, puis une ligne blanche fixe
   (logo, menu, recherche, panier, compte, bouton devis). */

/* Bande du haut */
.picom-haut {
	background: var(--picom-forest);
	color: rgb(255 255 255 / 88%);
	font-size: 0.875rem;
}

.picom-haut__inner,
.picom-entete__inner,
.picom-entete__recherche-inner {
	max-width: var(--picom-container);
	margin: 0 auto;
	padding: 0 1rem;
}

.picom-haut__inner {
	display: flex;
	align-items: center;
	gap: 0.5rem 1.5rem;
	min-height: 42px;
}

.picom-haut__accroche {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 auto 0 0;
}

.picom-haut .picom-icone {
	color: var(--picom-lime);
	flex: none;
}

.picom-haut ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
}

.picom-haut__contacts {
	gap: 0 1.5rem;
}

.picom-haut__contacts li + li {
	padding-left: 1.5rem;
	border-left: 1px solid rgb(255 255 255 / 20%);
}

.picom-haut a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 42px;
	color: rgb(255 255 255 / 88%);
	text-decoration: none;
}

.picom-haut a:hover {
	color: var(--picom-white);
}

.picom-haut__reseaux {
	gap: 0.25rem;
}

.picom-haut__reseaux a {
	width: 34px;
	justify-content: center;
}

.picom-haut__reseaux a:hover .picom-icone {
	color: var(--picom-white);
}

/* Sélecteur de langue (pilote GTranslate) */
.picom-langues {
	display: inline-flex;
	padding: 2px;
	border-radius: 999px;
	background: rgb(255 255 255 / 10%);
}

.picom-langues button {
	min-width: 36px;
	height: 26px;
	padding: 0 0.5rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: rgb(255 255 255 / 85%);
	font-family: var(--picom-font-text);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
}

.picom-langues button:hover {
	color: var(--picom-white);
}

.picom-langues button[aria-pressed="true"] {
	background: var(--picom-green);
	color: var(--picom-navy);
}

body.picom-has-langues .gt_float_switcher {
	display: none;
}

/* Ligne principale, fixe au défilement, sur toutes les pages (y compris si un
   réglage Astra, tel l'en-tête transparent, la passe en position absolue). */
.picom-entete,
body #masthead.picom-entete {
	position: sticky;
	top: 0;
	z-index: 90;
	background: var(--picom-white);
	box-shadow: 0 6px 24px rgb(14 27 51 / 8%);
}

body.admin-bar .picom-entete {
	top: 32px;
}

.picom-entete__inner {
	display: flex;
	align-items: center;
	gap: 1rem 2.5rem;
	min-height: 96px;
}

.picom-entete__logo {
	flex: none;
	display: flex;
	align-items: center;
}

.picom-entete__logo .custom-logo-link,
.picom-entete__logo img {
	display: block;
}

.picom-entete__logo img {
	max-height: 76px;
	width: auto;
}

.picom-entete__nom {
	font-family: var(--picom-font-title);
	font-weight: 800;
	font-size: 1.5rem;
	color: var(--picom-navy);
	text-decoration: none;
}

/* Menu */
.picom-entete__nav {
	flex: 1;
	display: flex;
	justify-content: center;
}

.picom-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 0 0.5rem;
}

.picom-menu > li {
	position: relative;
}

.picom-menu > li > a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.375rem;
	min-height: 96px;
	padding: 0 1rem;
	color: var(--picom-navy);
	font-weight: 600;
	font-size: 1rem;
	text-decoration: none;
}

.picom-menu > li > a::after {
	content: "";
	position: absolute;
	left: 1rem;
	right: 1rem;
	bottom: 24px;
	height: 3px;
	border-radius: 3px;
	background: var(--picom-green);
	transform: scaleX(0);
	transition: transform 0.25s var(--picom-ease);
}

.picom-menu > li > a:hover,
.picom-menu > .current-menu-item > a,
.picom-menu > .current_page_item > a {
	color: var(--picom-green-dark);
}

.picom-menu > li > a:hover::after,
.picom-menu > .current-menu-item > a::after,
.picom-menu > .current_page_item > a::after {
	transform: scaleX(1);
}

/* « Produits » : flèche et sous-menu des catégories */
.picom-menu__produits > a::before {
	content: "";
	order: 2;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.picom-sous-menu {
	position: absolute;
	top: calc(100% - 14px);
	left: 50%;
	z-index: 95;
	width: min(560px, 90vw);
	padding: 1rem;
	border: 1px solid var(--picom-line);
	border-radius: var(--picom-radius);
	background: var(--picom-white);
	box-shadow: 0 20px 50px rgb(14 27 51 / 16%);
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, 8px);
	transition: opacity 0.2s ease, transform 0.2s var(--picom-ease), visibility 0.2s;
}

.picom-menu__produits:hover .picom-sous-menu,
.picom-menu__produits:focus-within .picom-sous-menu {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0);
}

.picom-categories__liste {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.25rem;
}

.picom-categories__liste a {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 56px;
	padding: 0.375rem 0.5rem;
	border-radius: var(--picom-radius-sm);
	color: var(--picom-navy);
	font-weight: 600;
	text-decoration: none;
}

.picom-categories__liste a:hover {
	background: var(--picom-green-soft);
	color: var(--picom-navy);
}

.picom-categories__vignette {
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: var(--picom-radius-sm);
	overflow: hidden;
	background: var(--picom-gray-soft);
	color: var(--picom-green-dark);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.picom-categories__vignette img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.picom-categories__tout {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	margin-top: 0.75rem;
	min-height: 44px;
	border-top: 1px solid var(--picom-line);
	color: var(--picom-green-dark);
	font-weight: 700;
	text-decoration: none;
}

/* Actions à droite */
.picom-entete__actions {
	flex: none;
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.picom-icone-btn {
	position: relative;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--picom-navy);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	text-decoration: none;
}

.picom-icone-btn:hover,
.picom-icone-btn[aria-expanded="true"] {
	background: var(--picom-green-soft);
	color: var(--picom-green-dark);
}

.picom-panier__nb {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border: 2px solid var(--picom-white);
	border-radius: 999px;
	background: var(--picom-green-dark);
	color: var(--picom-white);
	font-size: 0.6875rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.picom-panier__nb.is-vide {
	background: var(--picom-green);
	color: var(--picom-navy);
}

.picom-entete__devis {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 50px;
	margin-left: 0.75rem;
	padding: 0 1.375rem;
	border-radius: var(--picom-radius-sm);
	background: var(--picom-green-dark);
	color: var(--picom-white);
	font-weight: 700;
	font-size: 0.9375rem;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 8px 20px rgb(46 122 30 / 25%);
	transition: background 0.2s ease, transform 0.2s var(--picom-ease);
}

.picom-entete__devis:hover {
	background: var(--picom-green-deep);
	color: var(--picom-white);
	transform: translateY(-1px);
}

/* Panneau de recherche (ouvert par la loupe) */
.picom-entete__recherche-panneau {
	border-top: 1px solid var(--picom-line);
	background: var(--picom-white);
	padding: 1rem 0 1.25rem;
}

.picom-entete__recherche {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding: 4px 4px 4px 1rem;
	border: 2px solid var(--picom-line);
	border-radius: 999px;
	background: var(--picom-gray-soft);
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.picom-entete__recherche:focus-within {
	border-color: var(--picom-green-dark);
	background: var(--picom-white);
	box-shadow: 0 0 0 4px var(--picom-green-soft);
}

.picom-entete__recherche > .picom-icone {
	flex: none;
	color: var(--picom-gray);
}

.picom-entete__recherche input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 44px;
	padding: 0 0.75rem;
	border: 0;
	background: transparent;
	color: var(--picom-navy);
	font-family: var(--picom-font-text);
	box-shadow: none;
}

.picom-entete__recherche input[type="search"]:focus {
	outline: none;
}

.picom-entete__recherche button {
	flex: none;
	height: 44px;
	padding: 0 1.375rem;
	border: 0;
	border-radius: 999px;
	background: var(--picom-green-dark);
	color: var(--picom-white);
	font-family: var(--picom-font-text);
	font-weight: 700;
	font-size: 0.875rem;
	cursor: pointer;
}

.picom-entete__recherche button:hover {
	background: var(--picom-green-deep);
}

/* Bouton menu et contenus réservés au mobile */
.picom-entete__burger,
.picom-entete__nav-mobile {
	display: none;
}

.picom-entete__burger .picom-icone + .picom-icone,
.picom-entete__burger[aria-expanded="true"] .picom-icone:first-child {
	display: none;
}

.picom-entete__burger[aria-expanded="true"] .picom-icone + .picom-icone {
	display: block;
}

/* Écran moyen : on resserre */
@media (max-width: 1240px) {
	.picom-entete__inner {
		gap: 1rem 1.25rem;
	}

	.picom-menu > li > a {
		padding: 0 0.625rem;
	}

	.picom-haut__accroche {
		display: none;
	}

	.picom-haut__contacts {
		margin-right: auto;
	}
}

@media (max-width: 1080px) {
	.picom-entete__devis span {
		display: none;
	}

	.picom-entete__devis {
		padding: 0 0.875rem;
	}
}

/* Contenus réservés au panneau mobile */
.picom-entete__nav-recherche {
	display: none;
}

/* Tablette et mobile : logo à gauche, panier et menu à droite ; le menu
   s'ouvre en panneau plein écran (recherche, rubriques, catégories,
   devis, contacts, langue). */
@media (max-width: 921px) {
	.picom-haut {
		display: none;
	}

	.picom-entete__inner {
		min-height: 72px;
		gap: 0.25rem;
	}

	.picom-entete__logo {
		order: 1;
		flex: 1;
		justify-content: flex-start;
	}

	.picom-entete__logo img {
		max-height: 54px;
	}

	.picom-entete__actions {
		order: 2;
	}

	.picom-entete__loupe,
	.picom-entete__devis,
	.picom-entete__compte,
	.picom-entete__recherche-panneau {
		display: none;
	}

	.picom-entete__panier {
		color: var(--picom-green-dark);
	}

	.picom-entete__burger {
		order: 3;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 48px;
		height: 48px;
		margin-left: 0.25rem;
		padding: 0;
		border: 0;
		border-radius: var(--picom-radius-sm);
		background: transparent;
		color: var(--picom-navy);
		cursor: pointer;
	}

	.picom-entete__burger .picom-icone {
		width: 30px;
		height: 30px;
		stroke-width: 2.4;
	}

	.picom-entete__burger[aria-expanded="true"] {
		background: var(--picom-green-soft);
		color: var(--picom-green-deep);
	}

	/* Panneau */
	.picom-entete__nav {
		position: fixed;
		top: var(--picom-entete-bas, 72px);
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 89;
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		gap: 1.25rem;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 1.25rem 1.25rem 2.5rem;
		background: var(--picom-ivory);
		border-top: 1px solid var(--picom-line);
		visibility: hidden;
		opacity: 0;
		transform: translateY(-12px);
		transition: opacity 0.25s ease, transform 0.3s var(--picom-ease), visibility 0.3s;
	}

	.picom-entete__nav.is-open {
		visibility: visible;
		opacity: 1;
		transform: none;
	}

	.picom-entete__nav-recherche {
		display: block;
	}

	.picom-entete__nav-recherche .picom-entete__recherche {
		background: var(--picom-white);
	}

	/* Rubriques */
	.picom-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 0.25rem 1rem;
		border-radius: var(--picom-radius);
		background: var(--picom-white);
		box-shadow: 0 1px 0 var(--picom-line), 0 8px 24px rgb(20 34 56 / 5%);
	}

	.picom-menu > li + li {
		border-top: 1px solid var(--picom-line);
	}

	.picom-menu > li > a {
		justify-content: space-between;
		min-height: 58px;
		padding: 0;
		font-family: var(--picom-font-title);
		font-size: 1.125rem;
		font-weight: 700;
	}

	.picom-menu > li > a::after {
		position: static;
		width: 18px;
		height: 18px;
		border-radius: 0;
		background: var(--picom-green-dark);
		transform: none;
		-webkit-mask: var(--picom-i-fleche) center / contain no-repeat;
		mask: var(--picom-i-fleche) center / contain no-repeat;
	}

	.picom-menu > .current-menu-item > a,
	.picom-menu > .current_page_item > a {
		color: var(--picom-green-dark);
	}

	.picom-menu__produits > a::before {
		display: none;
	}

	/* Catégories sous « Produits », en vignettes */
	.picom-sous-menu {
		position: static;
		width: auto;
		margin: 0 0 1rem;
		padding: 0;
		border: 0;
		background: none;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
	}

	.picom-categories__liste {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.5rem;
	}

	.picom-categories__liste a {
		min-height: 52px;
		padding: 0.375rem;
		border-radius: var(--picom-radius-sm);
		background: var(--picom-gray-soft);
		font-size: 0.875rem;
		line-height: 1.25;
	}

	.picom-categories__vignette {
		width: 40px;
		height: 40px;
	}

	.picom-categories__tout {
		min-height: 40px;
		margin-top: 0.5rem;
		border-top: 0;
		font-size: 0.9375rem;
	}

	/* Devis, contacts, langue */
	.picom-entete__nav-mobile {
		display: grid;
		gap: 1rem;
	}

	.picom-entete__devis-mobile {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.5rem;
		min-height: 54px;
		border-radius: var(--picom-radius-sm);
		background: var(--picom-green-dark);
		color: var(--picom-white);
		font-weight: 700;
		text-decoration: none;
	}

	.picom-entete__devis-mobile:hover {
		background: var(--picom-green-deep);
		color: var(--picom-white);
	}

	.picom-entete__nav-titre {
		margin: 0.5rem 0 -0.25rem;
		font-family: var(--picom-font-title);
		font-size: 0.8125rem;
		font-weight: 800;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: var(--picom-gray);
	}

	.picom-entete__nav-contacts {
		list-style: none;
		margin: 0;
		padding: 0.5rem;
		display: grid;
		gap: 0.25rem;
		border-radius: var(--picom-radius);
		background: #eaf3e3;
	}

	.picom-entete__nav-contacts a {
		display: flex;
		align-items: center;
		gap: 0.75rem;
		min-height: 52px;
		padding: 0.25rem 0.5rem;
		border-radius: var(--picom-radius-sm);
		color: var(--picom-navy);
		font-weight: 700;
		text-decoration: none;
		line-height: 1.25;
		overflow-wrap: anywhere;
	}

	.picom-entete__nav-contacts a:hover {
		background: rgb(255 255 255 / 60%);
	}

	.picom-entete__nav-contacts small {
		display: block;
		font-weight: 500;
		font-size: 0.75rem;
		color: var(--picom-gray);
	}

	.picom-entete__nav-ico {
		flex: none;
		width: 38px;
		height: 38px;
		border-radius: 50%;
		background: var(--picom-white);
		color: var(--picom-green-dark);
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.picom-entete__langues-mobile {
		display: flex;
		justify-content: center;
	}

	.picom-entete__langues-mobile .picom-langues {
		background: var(--picom-white);
		box-shadow: inset 0 0 0 1px var(--picom-line-strong);
	}

	.picom-entete__langues-mobile .picom-langues button {
		min-width: 72px;
		height: 38px;
		color: var(--picom-navy);
		font-size: 0.875rem;
	}

	.picom-entete__langues-mobile .picom-langues button[aria-pressed="true"] {
		background: var(--picom-green-dark);
		color: var(--picom-white);
	}
}

/* Page figée sous le menu ouvert */
html.picom-menu-ouvert,
html.picom-menu-ouvert body {
	overflow: hidden;
}

@media (max-width: 782px) {
	body.admin-bar .picom-entete {
		top: 46px;
	}
}

@media (max-width: 600px) {
	body.admin-bar .picom-entete {
		top: 0;
	}

	.picom-entete__recherche button {
		width: 44px;
		padding: 0;
		font-size: 0;
	}

	.picom-entete__recherche button::before {
		content: "\2192";
		font-size: 1.125rem;
	}
}
