/* Boostage Core — bandeau de consentement aux cookies. Utilise les variables du thème quand elles existent. */
.bo-consent {
	--bc-bg: var(--bo-white, #fff);
	--bc-text: var(--bo-text, #334155);
	--bc-heading: var(--bo-heading, #0f172a);
	--bc-muted: var(--bo-muted, #64748b);
	--bc-border: var(--bo-border, #e2e8f0);
	--bc-primary: var(--bo-primary, #2563eb);
	--bc-primary-hover: var(--bo-primary-hover, #1d4ed8);
	--bc-navy: var(--bo-navy, #0b1220);
	--bc-radius: var(--bo-radius-lg, 16px);
	--bc-radius-sm: var(--bo-radius, 10px);
	--bc-shadow: 0 24px 60px -20px rgba(2, 6, 23, 0.35), 0 8px 24px -12px rgba(2, 6, 23, 0.2);
	--bc-font: var(--bo-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	color: var(--bc-text);
	font-family: var(--bc-font);
	font-size: 0.9375rem;
	line-height: 1.55;
	position: relative;
	z-index: 100000;
}

.bo-consent[hidden] {
	display: none;
}

.bo-consent__banner {
	background: var(--bc-bg);
	border: 1px solid var(--bc-border);
	border-radius: var(--bc-radius);
	bottom: 16px;
	box-shadow: var(--bc-shadow);
	display: flex;
	gap: 14px;
	left: 16px;
	max-width: 460px;
	padding: 20px;
	position: fixed;
	right: 16px;
	animation: bo-consent-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bo-consent__banner[hidden] {
	display: none;
}

@keyframes bo-consent-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.bo-consent__brand {
	margin-bottom: 12px;
}

/* Sélecteur renforcé : sur les pages WooCommerce, « .woocommerce-page img { height: auto } » l'emportait. */
.bo-consent img.bo-consent__logo {
	display: block;
	height: 26px;
	max-width: 100%;
	width: auto;
}

.bo-consent__logo--text {
	color: var(--bc-heading);
	font-size: 1.05rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 26px;
}

.bo-consent__head-text {
	display: grid;
	gap: 8px;
	min-width: 0;
}

.bo-consent .bo-consent__head img.bo-consent__logo {
	height: 22px;
}

.bo-consent__body {
	min-width: 0;
}

.bo-consent__title {
	color: var(--bc-heading);
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 6px;
}

.bo-consent__text {
	color: var(--bc-muted);
	font-size: 0.875rem;
	margin: 0 0 14px;
}

.bo-consent__text a,
.bo-consent__intro a {
	color: var(--bc-primary);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bo-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Boutons : accepter et refuser ont le même poids visuel (même taille, même rangée). */
.bo-consent__btn {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	justify-content: center;
	line-height: 1.2;
	min-height: 40px;
	padding: 0.55rem 1.1rem;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.bo-consent__btn:focus-visible {
	outline: 2px solid var(--bc-primary);
	outline-offset: 2px;
}

.bo-consent__btn--primary {
	background: var(--bc-primary);
	color: #fff;
}

.bo-consent__btn--primary:hover {
	background: var(--bc-primary-hover);
}

.bo-consent__btn--secondary {
	background: var(--bc-bg);
	border-color: var(--bc-border);
	color: var(--bc-heading);
}

.bo-consent__btn--secondary:hover {
	border-color: var(--bc-heading);
}

.bo-consent__btn--ghost {
	background: none;
	color: var(--bc-muted);
	padding-inline: 0.6rem;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bo-consent__btn--ghost:hover {
	color: var(--bc-heading);
}

.bo-consent__banner .bo-consent__btn--ghost {
	margin-right: auto;
}

/* Boîte de dialogue des préférences */
.bo-consent__modal {
	align-items: flex-end;
	background: rgba(2, 6, 23, 0.55);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 0;
	position: fixed;
}

.bo-consent__modal[hidden] {
	display: none;
}

.bo-consent__dialog {
	background: var(--bc-bg);
	border-radius: var(--bc-radius) var(--bc-radius) 0 0;
	box-shadow: var(--bc-shadow);
	display: flex;
	flex-direction: column;
	max-height: min(92vh, 760px);
	width: 100%;
	animation: bo-consent-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes bo-consent-up {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.bo-consent__head {
	align-items: center;
	border-bottom: 1px solid var(--bc-border);
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 18px 20px;
}

.bo-consent__heading {
	color: var(--bc-heading);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}

.bo-consent__close {
	align-items: center;
	background: none;
	border: 1px solid var(--bc-border);
	border-radius: 50%;
	color: var(--bc-muted);
	cursor: pointer;
	display: inline-flex;
	flex-shrink: 0;
	height: 36px;
	justify-content: center;
	padding: 0;
	width: 36px;
}

.bo-consent__close:hover {
	border-color: var(--bc-heading);
	color: var(--bc-heading);
}

.bo-consent__scroll {
	overflow-y: auto;
	padding: 20px;
}

.bo-consent__intro {
	color: var(--bc-muted);
	font-size: 0.875rem;
	margin: 0 0 18px;
}

.bo-consent__cats {
	display: grid;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.bo-consent__cat {
	border: 1px solid var(--bc-border);
	border-radius: var(--bc-radius-sm);
	padding: 14px 16px;
}

.bo-consent__cat-head {
	align-items: flex-start;
	display: flex;
	gap: 16px;
	justify-content: space-between;
}

.bo-consent__cat-title {
	color: var(--bc-heading);
	font-weight: 700;
	margin: 0 0 4px;
}

.bo-consent__cat-text {
	color: var(--bc-muted);
	font-size: 0.85rem;
	margin: 0;
}

.bo-consent__always {
	color: var(--bo-success-strong, #047857);
	flex-shrink: 0;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding-top: 4px;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Interrupteur accessible (case à cocher native, masquée visuellement) */
.bo-consent__switch {
	cursor: pointer;
	display: inline-block;
	flex-shrink: 0;
	height: 26px;
	position: relative;
	width: 46px;
}

.bo-consent__switch input {
	cursor: pointer;
	height: 100%;
	left: 0;
	margin: 0;
	opacity: 0;
	position: absolute;
	top: 0;
	width: 100%;
	z-index: 1;
}

.bo-consent__track {
	background: #cbd5e1;
	border-radius: 999px;
	display: block;
	height: 100%;
	position: relative;
	transition: background 0.15s ease;
}

.bo-consent__track::after {
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(2, 6, 23, 0.3);
	content: "";
	height: 20px;
	left: 3px;
	position: absolute;
	top: 3px;
	transition: transform 0.15s ease;
	width: 20px;
}

.bo-consent__switch input:checked + .bo-consent__track {
	background: var(--bc-primary);
}

.bo-consent__switch input:checked + .bo-consent__track::after {
	transform: translateX(20px);
}

.bo-consent__switch input:focus-visible + .bo-consent__track {
	outline: 2px solid var(--bc-primary);
	outline-offset: 2px;
}

.bo-consent__details {
	margin-top: 10px;
}

.bo-consent__details summary {
	color: var(--bc-primary);
	cursor: pointer;
	font-size: 0.8125rem;
	font-weight: 600;
}

.bo-consent__table {
	border-collapse: collapse;
	font-size: 0.8125rem;
	margin-top: 10px;
	width: 100%;
}

.bo-consent__table th,
.bo-consent__table td {
	border-top: 1px solid var(--bc-border);
	padding: 8px 6px;
	text-align: left;
	vertical-align: top;
}

.bo-consent__table th {
	color: var(--bc-muted);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.bo-consent__table code {
	background: var(--bo-primary-soft, #eff6ff);
	border-radius: 4px;
	color: var(--bc-navy);
	font-size: 0.75rem;
	padding: 0.1em 0.35em;
	word-break: break-word;
}

.bo-consent__foot {
	border-top: 1px solid var(--bc-border);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	padding: 14px 20px;
}

.bo-consent__meta {
	color: var(--bc-muted);
	font-size: 0.75rem;
	margin: 0;
	padding: 0 20px 14px;
	text-align: right;
}

.bo-consent__meta[hidden] {
	display: none;
}

body.bo-consent-lock {
	overflow: hidden;
}

/* Lien « Gérer les cookies » (pied de page, code court) */
.bo-consent-open {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	font: inherit;
	padding: 0;
	text-decoration: none;
}

.bo-consent-open:hover {
	text-decoration: underline;
}

@media (min-width: 640px) {
	.bo-consent__banner {
		bottom: 24px;
		left: 24px;
		right: auto;
		width: min(460px, calc(100vw - 48px));
	}

	.bo-consent__modal {
		align-items: center;
		padding: 24px;
	}

	.bo-consent__dialog {
		border-radius: var(--bc-radius);
		max-width: 640px;
	}

	.bo-consent__foot .bo-consent__btn--primary {
		margin-left: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bo-consent__banner,
	.bo-consent__dialog {
		animation: none;
	}
}

@media print {
	.bo-consent {
		display: none !important;
	}
}
