/*
 * Druette — en-tête, menu mobile, avant-pied et pied de page.
 */

/* ---------- En-tête ---------- */

.dru-site-header {
	position: relative;
	z-index: 20;
}

/* Accueil : l'encart flotte sur le visuel principal. */
.home .dru-site-header {
	position: absolute;
	inset: 0 0 auto;
}

.dru-header__box {
	width: min(100% - 2 * var(--dru-gutter), calc(1300px + 118 * var(--px)));
	margin-inline: auto;
	padding: calc(14 * var(--px)) calc(59 * var(--px)) calc(34 * var(--px));
	border-radius: 0 0 calc(20 * var(--px)) calc(20 * var(--px));
	background: #f3ecda url(../images/papier.webp) 0 0 / 600px 1120px;
}

body:not(.home) .dru-header__box {
	box-shadow: 0 1px 0 rgb(66 66 66 / 12%);
}

.dru-header a {
	color: var(--dru-fort);
	text-decoration: none;
}

.dru-header a:hover {
	color: var(--dru-corail);
}

.dru-menu,
.dru-socials,
.dru-header__actions {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dru-header__top,
.dru-header__secondary {
	display: flex;
	align-items: center;
}

.dru-header__top {
	justify-content: space-between;
	min-height: calc(44 * var(--px));
}

.dru-header__secondary {
	gap: calc(20 * var(--px));
}

.dru-menu--secondary {
	gap: calc(30 * var(--px));
	font-size: max(15px, calc(22 * var(--px)));
	font-weight: 700;
	line-height: 1.2;
}

.dru-socials {
	gap: calc(14 * var(--px));
	font-size: calc(24 * var(--px));
}

.dru-socials a {
	display: flex;
}

.dru-header__actions {
	gap: calc(30 * var(--px));
	font-size: calc(44 * var(--px));
}

.dru-header__actions a {
	position: relative;
	display: flex;
}

.dru-header__actions .dru-icon--panier {
	width: 1.26em;
}

.dru-cart-link__count {
	position: absolute;
	top: -6px;
	right: -10px;
	min-width: 21px;
	padding: 0 5px;
	border-radius: 16px;
	background: var(--dru-rouge);
	color: var(--dru-blanc);
	font-size: 12px;
	font-weight: 700;
	line-height: 21px;
	text-align: center;
}

.dru-header__mid {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: calc(24 * var(--px));
	margin-top: calc(12 * var(--px));
}

.dru-header__baseline {
	margin: calc(22 * var(--px)) 0 0;
	color: var(--dru-texte);
	font-family: var(--dru-font-titre);
	font-size: max(14px, calc(20 * var(--px)));
	font-weight: 400;
	line-height: 1.2;
}

.dru-header__logo {
	display: block;
}

.dru-logo {
	display: block;
	width: calc(327 * var(--px));
	max-width: 100%;
	height: auto;
	fill: var(--dru-corail);
	overflow: visible;
}

.dru-header__logo--mobile,
.dru-burger {
	display: none;
}

.dru-search {
	display: flex;
	justify-self: end;
	width: min(100%, calc(388 * var(--px)));
	height: max(40px, calc(56 * var(--px)));
	margin-top: calc(22 * var(--px));
	overflow: hidden;
	border-radius: calc(8 * var(--px));
	background: var(--dru-blanc);
}

.dru-search__field {
	flex: 1;
	min-width: 0;
	padding: 0 1em;
	border: 0;
	background: none;
	color: var(--dru-texte);
	font: inherit;
	font-size: max(15px, calc(18 * var(--px)));
}

.dru-search__field::placeholder {
	color: #8d887c;
	opacity: 1;
}

.dru-search__field:focus-visible {
	outline-offset: -3px;
}

.dru-search__submit {
	flex: none;
	width: max(40px, calc(57 * var(--px)));
	border: 0;
	background: #cac4b8;
	color: #1d1d1b;
	font-size: max(20px, calc(34 * var(--px)));
	cursor: pointer;
}

.dru-search__submit:hover {
	background: var(--dru-sable);
	color: var(--dru-rouge);
}

.dru-header__primary {
	margin-top: calc(40 * var(--px));
	padding-top: calc(18 * var(--px));
	background: repeating-linear-gradient(90deg, #b5afa2 0 calc(9 * var(--px)), transparent 0 calc(16 * var(--px))) 0 0 / 100% calc(2 * var(--px)) no-repeat;
}

.dru-menu--primary {
	justify-content: space-between;
	gap: calc(8 * var(--px));
	font-size: clamp(11px, 0.95vw, 14px);
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	white-space: nowrap;
}

.dru-menu--primary > li {
	display: flex;
	align-items: center;
	gap: calc(8 * var(--px));
}

.dru-menu--primary > li + li::before {
	content: "";
	flex: none;
	width: calc(9 * var(--px));
	height: calc(9 * var(--px));
	margin-inline: calc(4 * var(--px));
	border-radius: 50%;
	background: var(--dru-corail);
}

.dru-menu .dru-accent > a,
.dru-menu .current-menu-item > a {
	color: var(--dru-corail);
}

/* ---------- Menu mobile ---------- */

.dru-panel {
	position: fixed;
	inset: 0;
	z-index: 50;
	background: rgb(30 30 30 / 55%);
}

.dru-panel[hidden] {
	display: none;
}

.dru-panel__inner {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	width: min(22rem, 88vw);
	height: 100%;
	padding: 1rem 1.25rem 2rem;
	overflow-y: auto;
	background: var(--dru-paper);
	animation: dru-panel-in 0.2s ease;
}

@keyframes dru-panel-in {
	from {
		transform: translateX(-100%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.dru-panel__inner {
		animation: none;
	}
}

.dru-panel__close {
	align-self: flex-end;
	width: 2.75rem;
	height: 2.75rem;
	border: 0;
	background: none;
	color: var(--dru-fort);
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.dru-panel .dru-search {
	width: 100%;
	margin: 0;
	flex: none;
}

.dru-panel .dru-menu {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	font-size: 1.0625rem;
	white-space: normal;
}

.dru-panel .dru-menu > li {
	display: block;
	border-bottom: 1px dashed #b5afa2;
}

.dru-panel .dru-menu > li::before {
	display: none;
}

.dru-panel .dru-menu a {
	display: block;
	padding: 0.85rem 0;
	color: var(--dru-fort);
	font-weight: 700;
	text-decoration: none;
}

.dru-panel .dru-menu--secondary a {
	font-weight: 600;
}

.dru-panel__phone {
	margin: 0;
	font-weight: 700;
}

@media (max-width: 1199px) {
	.dru-site-header,
	.home .dru-site-header {
		position: sticky;
		inset: 0 0 auto;
	}

	.dru-header__box {
		width: 100%;
		padding: 0.5rem 1rem;
		border-radius: 0;
		box-shadow: 0 1px 0 rgb(66 66 66 / 12%);
	}

	.dru-header__top {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		gap: 0.75rem;
		min-height: 3.25rem;
	}

	.dru-header__secondary,
	.dru-header__mid,
	.dru-header__primary {
		display: none;
	}

	.dru-header__logo--mobile {
		display: block;
	}

	.dru-header__logo--mobile .dru-logo {
		width: 9.5rem;
	}

	.dru-burger {
		display: flex;
		align-items: center;
		justify-content: center;
		justify-self: start;
		width: 2.75rem;
		height: 2.75rem;
		margin-left: -0.5rem;
		border: 0;
		background: none;
		color: var(--dru-fort);
		cursor: pointer;
	}

	.dru-burger__bars,
	.dru-burger__bars::before,
	.dru-burger__bars::after {
		display: block;
		width: 1.6rem;
		height: 0.19rem;
		border-radius: 2px;
		background: currentColor;
	}

	.dru-burger__bars {
		position: relative;
	}

	.dru-burger__bars::before,
	.dru-burger__bars::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.dru-burger__bars::before {
		top: -0.5rem;
	}

	.dru-burger__bars::after {
		top: 0.5rem;
	}

	.dru-header__actions {
		justify-self: end;
		gap: 0.9rem;
		font-size: 1.9rem;
	}
}

@media (max-width: 420px) {
	.dru-header__actions li:first-child {
		display: none;
	}
}

/*
 * Utilisateur connecté : l'en-tête et le menu mobile se placent sous la barre d'administration de WordPress.
 * Jusqu'à 600 px, la barre défile avec la page : l'en-tête collant reste en haut de l'écran.
 */
.admin-bar.home .dru-site-header,
.admin-bar .dru-panel {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (min-width: 601px) and (max-width: 1199px) {
	.admin-bar .dru-site-header {
		top: var(--wp-admin--admin-bar--height, 46px);
	}
}

@media (max-width: 600px) {
	.admin-bar.home .dru-site-header {
		top: 0;
	}
}

/* ---------- Contenu : le pied de page reste en bas de l'écran sur une page courte ---------- */

.wp-site-blocks {
	display: flex;
	flex-direction: column;
	overflow-x: clip; /* Croquis décoratifs posés en partie hors de l'écran : jamais de défilement horizontal. */
	min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

.wp-site-blocks > main {
	flex: 1 0 auto;
}

/* Modèles fournis par WooCommerce (pas encore habillés) : même marge basse que les pages du thème. */
.wp-site-blocks > main:not(.dru-main) {
	padding-top: calc(30 * var(--px));
	padding-bottom: calc(30 * var(--px));
}

/* ---------- Avant-pied : newsletter + réassurance, à cheval sur le pied de page ---------- */

.dru-prefooter {
	position: relative;
	background: linear-gradient(to bottom, transparent 50%, var(--dru-sable) 0);
}

/* Le carrelet n'accompagne que l'accueil : ailleurs, il recouvrirait le contenu des pages courtes. */
body:not(.home) .dru-decor--carrelet {
	display: none;
}

.dru-decor--carrelet {
	left: calc(50% - 893px);
	bottom: calc(100% - 26 * var(--px));
	width: calc(543 * var(--px));
}

.dru-prefooter__inner {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: calc(30 * var(--px));
	width: min(100% - 2 * var(--dru-gutter), 1290px);
	margin-inline: auto;
}

.dru-newsletter,
.dru-reassurance {
	min-height: calc(207 * var(--px));
	border-radius: var(--dru-radius);
	color: var(--dru-blanc);
}

.dru-newsletter {
	padding: calc(30 * var(--px)) calc(40 * var(--px)) calc(26 * var(--px));
	background: var(--dru-corail);
}

.dru-newsletter__title {
	margin: 0;
	color: inherit;
	font-family: var(--dru-font-titre);
	font-size: clamp(1.5rem, 4.6vw, calc(35 * var(--px)));
	font-weight: 400;
	line-height: 1.1;
}

.dru-newsletter__text {
	margin: calc(10 * var(--px)) 0 calc(14 * var(--px));
	font-weight: 600;
	line-height: 1.2;
}

/* Ligne « e-mail + bouton » : pastille blanche. */
.dru-newsletter__row {
	display: flex;
	height: max(40px, calc(56 * var(--px)));
	overflow: hidden;
	border-radius: calc(8 * var(--px));
	background: var(--dru-blanc);
}

.dru-newsletter__row input {
	flex: 1;
	min-width: 0;
	padding: 0 1.2em;
	border: 0;
	background: none;
	color: var(--dru-texte);
	font: inherit;
}

.dru-newsletter__row input:focus-visible {
	outline-offset: -3px;
}

.dru-newsletter__row button {
	flex: none;
	margin: calc(8 * var(--px));
	padding: 0 1.3em;
	border: 0;
	border-radius: calc(4 * var(--px));
	background: var(--dru-rouge);
	color: var(--dru-blanc);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.dru-newsletter__row button:hover {
	background: var(--dru-fort);
}

.dru-newsletter__form > * {
	margin: 0;
}

/* Consentement (formulaire Brevo) : case + texte, mention RGPD repliable, message de résultat. */
.dru-newsletter__consent {
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
	margin-top: calc(14 * var(--px)) !important;
	font-size: max(12px, calc(14 * var(--px)));
	line-height: 1.35;
}

.dru-newsletter__consent input {
	flex: none;
	width: 1.15rem;
	height: 1.15rem;
	margin: 0.1em 0 0;
	accent-color: var(--dru-rouge);
}

.dru-newsletter__consent a,
.dru-newsletter__gdpr a {
	color: inherit;
	text-decoration: underline;
}

.dru-newsletter__gdpr {
	margin-top: 0.4rem !important;
	font-size: max(12px, calc(13 * var(--px)));
	line-height: 1.35;
}

.dru-newsletter__gdpr summary {
	width: fit-content;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
}

.dru-newsletter__gdpr p {
	margin: 0.4rem 0 0;
}

.dru-newsletter__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.dru-newsletter__status:empty {
	display: none;
}

.dru-newsletter__status {
	margin-top: 0.6rem !important;
	padding: 0.5em 0.8em;
	border-radius: 4px;
	background: var(--dru-blanc);
	color: var(--dru-texte);
	font-weight: 600;
}

.dru-newsletter__form[data-state="error"] .dru-newsletter__status {
	color: var(--dru-rouge);
}

.dru-reassurance {
	display: grid;
	grid-template-columns: 1fr 1fr 1.35fr;
	align-content: center; /* Encadré étiré à la hauteur de la newsletter : pictos au centre, hauts alignés. */
	align-items: start;
	gap: calc(12 * var(--px));
	margin: 0;
	padding: calc(32 * var(--px)) calc(46 * var(--px)) calc(26 * var(--px));
	background: var(--dru-texte);
	list-style: none;
	font-size: max(14px, calc(19 * var(--px)));
	line-height: 1.2;
	text-align: center;
}

.dru-reassurance .dru-icon {
	display: block;
	width: auto;
	height: calc(64 * var(--px));
	margin: 0 auto calc(22 * var(--px));
}

.dru-reassurance strong {
	display: block;
	font-weight: 700;
}

.dru-reassurance li:first-child strong,
.dru-reassurance li:nth-child(2) strong {
	max-width: 6em;
	margin-inline: auto;
}

/* ---------- Pied de page ---------- */

.dru-footer {
	padding: calc(64 * var(--px)) 0 calc(48 * var(--px));
	background: var(--dru-sable);
	color: var(--dru-texte);
	font-size: max(1rem, calc(20 * var(--px)));
	line-height: 1.2;
}

.dru-footer__inner {
	display: grid;
	grid-template-columns: 446fr 430fr 414fr;
	gap: calc(24 * var(--px));
	width: min(100% - 2 * var(--dru-gutter), 1290px);
	margin-inline: auto;
}

.dru-footer a {
	color: inherit;
	text-decoration: none;
}

.dru-footer a:hover {
	color: var(--dru-rouge);
	text-decoration: underline;
}

.dru-footer__logo {
	display: inline-block;
}

.dru-footer__logo .dru-logo {
	width: calc(210 * var(--px));
	min-width: 9rem;
}

.dru-footer__baseline {
	margin: calc(24 * var(--px)) 0 calc(12 * var(--px));
	font-weight: 700;
}

.dru-footer .dru-socials {
	gap: calc(12 * var(--px));
	margin-bottom: calc(10 * var(--px));
	font-size: calc(29 * var(--px));
}

.dru-footer__address {
	font-style: normal;
}

.dru-footer__contact {
	margin: calc(24 * var(--px)) 0 0;
	font-weight: 700;
}

.dru-footer__contact a,
.dru-footer__list--chevron a {
	display: inline-flex;
	align-items: baseline;
	gap: 1em;
}

.dru-footer__contact a::before,
.dru-footer__list--chevron a::before {
	content: "";
	flex: none;
	width: 0.38em;
	height: 0.38em;
	border: solid currentColor;
	border-width: 0.12em 0.12em 0 0;
	transform: translateY(-0.12em) rotate(45deg);
}

.dru-footer__title {
	margin: 0 0 calc(24 * var(--px));
	color: inherit;
	font-family: var(--dru-font-texte);
	font-size: inherit;
	font-weight: 700;
	line-height: 1.2;
}

.dru-footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.dru-footer__list li {
	padding-block: 0.1em;
}

.dru-footer__list--legal {
	margin-top: calc(24 * var(--px));
}

@media (max-width: 1199px) {
	.dru-prefooter {
		padding-top: 2.5rem;
		background: linear-gradient(to bottom, transparent 6rem, var(--dru-sable) 0);
	}

	.dru-prefooter__inner,
	.dru-footer__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.dru-prefooter__inner {
		gap: 1rem;
	}

	.dru-newsletter,
	.dru-reassurance {
		min-height: 0;
		padding: 1.5rem 1.25rem;
		border-radius: 1.25rem;
	}

	.dru-reassurance .dru-icon {
		height: 2.5rem;
		margin-bottom: 0.75rem;
	}

	.dru-reassurance {
		font-size: 0.875rem;
	}

	.dru-footer {
		padding: 2.5rem 0 2rem;
	}

	.dru-footer__inner {
		gap: 2rem;
	}

	.dru-footer__title {
		margin-bottom: 0.75rem;
	}

	.dru-footer__list li {
		padding-block: 0.3em;
	}
}
