/* =====================================================================
 * Dômes Pharma US — header & footer
 * Couleurs pilotées par les variables CSS injectées via wp_add_inline_style()
 * ===================================================================== */

/* ---------- Reset léger ---------- */
.dp-body * { box-sizing: border-box; }

/*
 * Neutralise les couleurs rose/rouge (#c36) du reset Hello Elementor.
 * Ces règles restent assez faibles pour que les widgets et composants ayant
 * leurs propres couleurs puissent continuer à les surcharger.
 */
:where(.dp-body) a {
	color: var(--dp-link, var(--dp-primary, #0E6E7E));
}
:where(.dp-body) a:hover,
:where(.dp-body) a:active {
	color: var(--dp-link-hover, var(--dp-primary-dark, #0A4F5A));
}
:where(.dp-body) :is([type="button"], [type="submit"], button) {
	border-color: var(--dp-button, var(--dp-primary, #0E6E7E));
	color: var(--dp-button, var(--dp-primary, #0E6E7E));
}
:where(.dp-body) :is([type="button"], [type="submit"], button):hover,
:where(.dp-body) :is([type="button"], [type="submit"], button):focus {
	background-color: var(--dp-button-hover, var(--dp-primary-dark, #0A4F5A));
	border-color: var(--dp-button-hover, var(--dp-primary-dark, #0A4F5A));
	color: var(--dp-button-hover-text, #FFFFFF);
}
.dp-skip-link {
	position: absolute;
	left: -9999px;
}
.dp-skip-link:focus {
	left: 1rem;
	top: 1rem;
	background: #fff;
	color: var(--dp-primary, #0E6E7E);
	padding: .5rem 1rem;
	z-index: 100000;
	border-radius: 4px;
}
.screen-reader-text {
	border: 0;
	clip: rect(1px,1px,1px,1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.dp-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
}

/* =====================================================================
 * HEADER
 * ===================================================================== */
.dp-site-header {
	font-family: 'Open Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
	color: var(--dp-text, #0A4F5A);
	width: 100%;
}
.dp-site-header.is-sticky {
	position: sticky;
	top: 0;
	z-index: 999;
	background: var(--dp-header-bg, #fff);
	box-shadow: 0 1px 0 rgba(10, 79, 90, .06);
	transition: box-shadow .25s ease;
}
.dp-site-header.is-sticky.is-scrolled {
	box-shadow: 0 2px 16px rgba(10, 79, 90, .10);
}

/* ---------- Top bar ---------- */
.dp-topbar {
	background: var(--dp-topbar-bg, #EFF4F7);
	color: var(--dp-topbar-text, #0E6E7E);
	font-size: 13px;
	border-bottom: 1px solid rgba(14, 110, 126, .08);
}
.dp-topbar__inner {
	display: flex;
	justify-content: flex-end;
}
.dp-topbar__list {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 8px 0;
}
.dp-topbar__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
	transition: opacity .2s;
}
.dp-topbar__link:hover { opacity: .7; }
.dp-topbar__icon {
	display: inline-flex;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}
.dp-topbar__icon svg {
	width: 100%;
	height: 100%;
}

/* ---------- Header bar ---------- */
.dp-header {
	background: var(--dp-header-bg, #fff);
	position: relative; /* ancre pour le drawer absolu */
}
.dp-header__inner {
	display: grid;
	grid-template-columns: auto minmax(40px, 1fr) auto;
	align-items: center;
	gap: 24px;
	min-height: 88px;
	width: 100%;
}
.dp-header__brand {
	display: flex;
	align-items: center;
}
.dp-header__brand .custom-logo-link {
	display: inline-block;
	line-height: 0;
}
.dp-header__brand img {
	max-height: 56px;
	width: auto;
	display: block;
}
.dp-header__title {
	font-size: 24px;
	font-weight: 700;
	color: var(--dp-primary-dark, #0A4F5A);
	text-decoration: none;
}

/* ---------- Actions (CTA + burger) ---------- */
.dp-header__actions {
	display: flex;
	align-items: center;
	justify-self: end;
	margin-left: auto;
	gap: 12px;
}

/* ---------- Navigation desktop ---------- */
.dp-header__nav {
	display: flex;
	justify-content: flex-end;
}
.dp-menu {
	display: flex;
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.dp-menu > li {
	position: relative;
}
.dp-menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 15px;
	font-weight: 600;
	color: var(--dp-text, #0A4F5A);
	text-decoration: none;
	padding: 28px 0;
	white-space: nowrap;
	transition: color .2s;
}
.dp-menu > li > a:hover,
.dp-menu > li.current-menu-item > a,
.dp-menu > li.current-menu-ancestor > a {
	color: var(--dp-primary, #0E6E7E);
}

/* Chevron desktop */
.dp-menu > li.dp-has-dropdown > a::after,
.dp-menu > li.menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 10px;
	height: 6px;
	flex-shrink: 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><polyline points='1 1 5 5 9 1' stroke='black' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'><polyline points='1 1 5 5 9 1' stroke='black' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
	transition: transform .22s ease;
}
.dp-menu > li.dp-has-dropdown:hover > a::after,
.dp-menu > li.menu-item-has-children:hover > a::after {
	transform: rotate(180deg);
}

/* Sous-menu desktop */
.dp-menu .sub-menu {
	position: absolute;
	top: calc(100% - 4px);
	left: 0;
	min-width: 230px;
	background: #fff;
	list-style: none;
	margin: 0;
	padding: 8px 0;
	border-radius: 8px;
	border: 1px solid rgba(14, 110, 126, .08);
	box-shadow: 0 8px 32px rgba(10, 79, 90, .12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s, transform .2s, visibility .2s;
	z-index: 1001;
}
.dp-menu > li:hover > .sub-menu,
.dp-menu > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.dp-menu .sub-menu a {
	display: block;
	padding: 10px 18px;
	color: var(--dp-text, #0A4F5A);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: background .15s, color .15s;
}
.dp-menu .sub-menu a:hover {
	background: rgba(14, 110, 126, .06);
	color: var(--dp-primary, #0E6E7E);
}

/* ---------- CTA Vet Vault ---------- */
.dp-header__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid var(--dp-primary, #0E6E7E);
	color: var(--dp-primary, #0E6E7E);
	background: transparent;
	padding: 11px 24px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: background .2s, color .2s;
	white-space: nowrap;
}
.dp-header__cta:hover {
	background: var(--dp-primary, #0E6E7E);
	color: #fff;
}

/* ---------- Burger ---------- */
.dp-header__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	background: var(--dp-burger-bg, var(--dp-primary, #0E6E7E));
	border: 1.5px solid var(--dp-burger-border, var(--dp-primary-dark, #0A4F5A));
	border-radius: 8px;
	padding: 9px 10px;
	cursor: pointer;
	color: var(--dp-burger-icon, #fff);
	transition: border-color .2s, background .2s;
	-webkit-tap-highlight-color: transparent;
}
.dp-header__toggle:hover {
	border-color: var(--dp-burger-border, var(--dp-primary-dark, #0A4F5A));
	background: var(--dp-primary-dark, #0A4F5A);
}
.dp-header__toggle-bars {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	width: 22px;
	height: 15px;
}
.dp-header__toggle-bars span {
	display: block;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transform-origin: center;
	transition: transform .25s ease, opacity .2s ease, width .2s ease;
}
/* Animation croix */
.dp-header__toggle[aria-expanded="true"] .dp-header__toggle-bars span:nth-child(1) {
	transform: translateY(6.5px) rotate(45deg);
}
.dp-header__toggle[aria-expanded="true"] .dp-header__toggle-bars span:nth-child(2) {
	opacity: 0;
	transform: scaleX(0);
}
.dp-header__toggle[aria-expanded="true"] .dp-header__toggle-bars span:nth-child(3) {
	transform: translateY(-6.5px) rotate(-45deg);
}

/* =====================================================================
 * DRAWER MOBILE / TABLETTE
 * ===================================================================== */
.dp-drawer {
	position: fixed;
	inset: 0;
	z-index: 1002;
	display: flex;
	flex-direction: column;
	background: var(--dp-header-bg, #fff);
	color: var(--dp-text, #0A4F5A);
	font-family: 'Open Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
	opacity: 0;
	visibility: hidden;
	transform: translateX(100%);
	transition: transform .28s cubic-bezier(.4, 0, .2, 1),
	            opacity .2s ease,
	            visibility 0s linear .28s;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}
.dp-drawer.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateX(0);
	transition: transform .28s cubic-bezier(.4, 0, .2, 1),
	            opacity .2s ease,
	            visibility 0s linear 0s;
}
.dp-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 86px;
	padding: 16px 20px 16px 17px;
	border-bottom: 1px solid rgba(10, 79, 90, .16);
}
.dp-drawer__brand {
	display: flex;
	align-items: center;
	min-width: 0;
}
.dp-drawer__brand .custom-logo-link {
	display: inline-block;
	line-height: 0;
}
.dp-drawer__brand img {
	display: block;
	width: auto;
	max-width: min(240px, calc(100vw - 100px));
	max-height: 54px;
}
.dp-drawer__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin-left: 16px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--dp-primary-dark, #0A4F5A);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.dp-drawer__close svg {
	width: 30px;
	height: 30px;
	stroke-width: 2;
}
.dp-drawer__nav {
	padding: 36px 0 0;
}
.dp-drawer__menu {
	display: flex;
	flex-direction: column;
	gap: 0;
	list-style: none;
	margin: 0;
	padding: 0;
}
.dp-drawer__menu > li {
	margin: 0;
}
.dp-drawer__menu > li > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 54px;
	padding: 0 22px;
	color: var(--dp-primary-dark, #0A4F5A);
	font-size: 21px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
	letter-spacing: 0;
}
.dp-drawer__menu > li.current-menu-item > a,
.dp-drawer__menu > li.current-menu-ancestor > a,
.dp-drawer__menu > li > a:hover {
	color: var(--dp-primary, #0E6E7E);
}
.dp-drawer__menu > li.menu-item-has-children > a::after,
.dp-drawer__menu > li.dp-has-dropdown > a::after {
	content: '';
	display: inline-block;
	width: 11px;
	height: 19px;
	margin-left: 18px;
	flex: 0 0 auto;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 19'><polyline points='2 2 9 9.5 2 17' stroke='black' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
	mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 19'><polyline points='2 2 9 9.5 2 17' stroke='black' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
	transition: transform .22s ease;
}
.dp-drawer__menu > li.is-open > a::after {
	transform: rotate(90deg);
}
.dp-drawer__menu .sub-menu {
	position: static;
	min-width: 0;
	max-height: 0;
	overflow: hidden;
	list-style: none;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(14, 110, 126, .035);
	box-shadow: none;
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: max-height .25s ease;
}
.dp-drawer__menu > li.is-open > .sub-menu {
	max-height: 640px;
}
.dp-drawer__menu .sub-menu a {
	display: block;
	padding: 10px 34px;
	color: var(--dp-text, #0A4F5A);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
}
.dp-drawer__menu .sub-menu a:hover {
	color: var(--dp-primary, #0E6E7E);
}

/* Backdrop semi-transparent */
.dp-nav-backdrop {
	position: fixed;
	inset: 0;
	z-index: 997;
	background: rgba(6, 40, 48, .20);
	opacity: 0;
	pointer-events: none;
	transition: opacity .32s ease;
}
.dp-nav-backdrop.is-visible {
	opacity: 1;
	pointer-events: auto;
}

/* Scroll lock */
body.dp-menu-open {
	overflow: hidden;
	padding-right: var(--dp-scrollbar-w, 0px);
}

.dp-drawer__cta {
	display: flex;
	padding: 28px 22px 0;
}
.dp-drawer__cta a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 21px;
	border: 1.4px solid var(--dp-primary-dark, #0A4F5A);
	border-radius: 999px;
	color: var(--dp-primary-dark, #0A4F5A);
	background: transparent;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
}
.dp-drawer__utils {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin-top: 118px;
	padding: 0 26px 36px;
}
.dp-drawer__util-link {
	color: var(--dp-primary-dark, #0A4F5A);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
}

/* =====================================================================
 * RESPONSIVE
 * ===================================================================== */

/* ---- ≤ 1024px : tablette paysage + petits desktops ---- */
@media (max-width: 1024px) {

	/* Affiche le burger */
	.dp-header__toggle { display: inline-flex; }
	.dp-header__nav--desktop { display: none; }

	.dp-header__inner {
		grid-template-columns: auto minmax(0, 1fr) auto;
		gap: 16px;
		min-height: 76px;
	}
	.dp-header__brand {
		grid-column: 1;
		min-width: 0;
	}
	.dp-header__brand img {
		max-width: 100%;
	}
	.dp-header__actions {
		grid-column: 3;
		justify-content: flex-end;
	}
	.dp-header__cta {
		padding: 9px 18px;
		font-size: 14px;
	}

	/* ---- Conversion de la nav en drawer ---- */
	.dp-header__nav {
		/* Sort du flux */
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		z-index: 998;
		/* Apparence */
		background: var(--dp-header-bg, #fff);
		border-top: 1px solid rgba(14, 110, 126, .08);
		box-shadow: 0 12px 32px rgba(10, 79, 90, .13);
		/* Slide depuis le haut via clip-path */
		clip-path: inset(0 0 100% 0);
		visibility: hidden;
		transition: clip-path .32s cubic-bezier(.4, 0, .2, 1),
		            visibility 0s linear .32s;
		/* Scroll interne */
		max-height: calc(100svh - 76px);
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}
	.dp-header__nav.is-open {
		clip-path: inset(0 0 0% 0);
		visibility: visible;
		transition: clip-path .32s cubic-bezier(.4, 0, .2, 1),
		            visibility 0s linear 0s;
	}

	/* ---- Menu list en colonne ---- */
	.dp-header__nav .dp-menu {
		flex-direction: column;
		gap: 0;
		padding: 6px 0 8px;
	}
	.dp-header__nav .dp-menu > li {
		border-bottom: 1px solid rgba(14, 110, 126, .06);
	}
	.dp-header__nav .dp-menu > li:last-child { border-bottom: 0; }
	.dp-header__nav .dp-menu > li > a {
		padding: 15px 24px;
		font-size: 16px;
		justify-content: space-between;
		white-space: normal;
	}
	.dp-header__nav .dp-menu > li > a:hover {
		background: rgba(14, 110, 126, .04);
	}

	/* ---- Sous-menu mobile : accordéon ---- */
	.dp-header__nav .dp-menu .sub-menu {
		position: static;
		min-width: 0;
		background: rgba(14, 110, 126, .025);
		border: none;
		border-top: 1px solid rgba(14, 110, 126, .06);
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		/* Accordéon */
		max-height: 0;
		overflow: hidden;
		transition: max-height .28s ease;
		padding: 0;
	}
	.dp-header__nav .dp-menu > li.is-open > .sub-menu {
		max-height: 600px;
	}
	.dp-header__nav .dp-menu .sub-menu a {
		padding: 12px 24px 12px 38px;
		border-bottom: 1px solid rgba(14, 110, 126, .05);
		font-size: 14px;
	}
	.dp-header__nav .dp-menu .sub-menu li:last-child a { border-bottom: 0; }

	/* Chevron mobile : tourne sur .is-open */
	.dp-header__nav .dp-menu > li.is-open > a::after { transform: rotate(180deg); }
	/* Désactive le hover desktop (le sous-menu ne doit pas apparaître au survol) */
	.dp-header__nav .dp-menu > li:hover > .sub-menu:not(.sub-menu--desktop) {
		opacity: 1;
		visibility: visible;
		transform: none;
	}
}

/* ---- ≤ 768px : tablette portrait ---- */
@media (max-width: 768px) {
	.dp-topbar__text { display: none; }
	.dp-topbar__list { gap: 18px; padding: 7px 0; }
	.dp-header__inner { min-height: 68px; }
	.dp-header__brand img {
		max-height: 46px;
		max-width: min(280px, 48vw);
	}
	.dp-header__nav { max-height: calc(100svh - 68px); }
}

/* ---- ≤ 600px : mobile ---- */
@media (max-width: 600px) {
	/* Topbar masquée */
	.dp-topbar { display: none; }

	.dp-container { padding: 0 16px; }
	.dp-header__inner {
		min-height: 60px;
		gap: 8px;
	}
	.dp-header__brand img {
		max-height: 38px;
		max-width: 42vw;
	}

	.dp-header__actions { gap: 8px; }
	.dp-header__cta {
		display: inline-flex;
		padding: 8px 12px;
		font-size: 12px;
	}

	.dp-header__nav { max-height: calc(100svh - 60px); }

	/* Burger légèrement plus compact */
	.dp-header__toggle { padding: 8px 9px; }
	.dp-header__toggle-bars { width: 20px; height: 14px; }
}

/* ---- ≤ 360px : très petits mobiles ---- */
@media (max-width: 360px) {
	.dp-header__brand img { max-width: 52vw; }
	.dp-header__cta { display: none; }
}

/* =====================================================================
 * FOOTER
 * ===================================================================== */
.dp-site-footer {
	background: var(--dp-footer-bg, #fff);
	color: var(--dp-footer-text, #3A4A52);
	font-family: 'Open Sans', 'Segoe UI', system-ui, sans-serif;
	font-size: 14px;
	padding: 56px 0 24px;
	border-top: 1px solid rgba(10, 79, 90, .08);
}
.dp-footer__inner {
	position: relative;
}
.dp-back-to-top {
	position: absolute;
	top: 0;
	right: 24px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--dp-primary, #0E6E7E);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
}
.dp-back-to-top svg {
	width: 14px;
	height: 14px;
}
.dp-footer__top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 32px;
	flex-wrap: wrap;
	padding: 32px 0 56px;
}
.dp-footer__brand img {
	max-height: 64px;
	width: auto;
	display: block;
}
.dp-footer__title {
	font-size: 22px;
	font-weight: 700;
	color: var(--dp-primary-dark, #0A4F5A);
	text-decoration: none;
}
.dp-socials {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.dp-socials__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: var(--dp-social-bg, #0A4F5A);
	color: var(--dp-social-icon, #fff);
	border-radius: 4px;
	text-decoration: none;
	transition: background .2s, transform .2s;
}
.dp-socials__link:hover {
	background: var(--dp-primary, #0E6E7E);
	transform: translateY(-2px);
}
.dp-socials__link svg {
	width: 16px;
	height: 16px;
}

/* ---------- Bas du footer ---------- */
.dp-footer__legal-menu {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin: 0 0 16px;
	padding: 16px 0 0;
	border-top: 1px solid rgba(10, 79, 90, .08);
	font-size: 13px;
}
.dp-footer__legal-menu a {
	color: var(--dp-footer-text, #3A4A52);
	text-decoration: none;
}
.dp-footer__legal-menu a:hover { color: var(--dp-primary, #0E6E7E); }

.dp-footer__copyright {
	font-size: 13px;
	padding: 16px 0 0;
	border-top: 1px solid rgba(10, 79, 90, .08);
	color: var(--dp-footer-text, #3A4A52);
	line-height: 1.6;
}
.dp-footer__copyright a {
	color: var(--dp-primary, #0E6E7E);
	text-decoration: none;
	font-weight: 600;
}
.dp-footer__copyright a:hover { text-decoration: underline; }

@media (max-width: 600px) {
	.dp-back-to-top {
		position: static;
		margin-bottom: 16px;
	}
	.dp-footer__top {
		flex-direction: column;
		align-items: flex-start;
		padding: 8px 0 32px;
	}
}
