/* EH Cookies — noir & blanc, aligné sur EH Footer */

.eh-ck {
	--eh-ck-muted: rgba(0, 0, 0, 0.6);
	--eh-ck-line: rgba(0, 0, 0, 0.1);
	--eh-ck-label: 0.6875rem;
	--eh-ck-label-ls: 0.12em;
	color: #000;
	font-size: 0.875rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.eh-ck[hidden],
.eh-ck [hidden] {
	display: none !important;
}

.eh-ck *,
.eh-ck *::before,
.eh-ck *::after {
	box-sizing: border-box;
}

/* ── Bannière ── */
.eh-ck__banner {
	position: fixed;
	left: clamp(0.75rem, 2vw, 1.5rem);
	bottom: clamp(0.75rem, 2vw, 1.5rem);
	z-index: 999998;
	width: min(460px, calc(100vw - 1.5rem));
	padding: 1.5rem 1.5rem 1.25rem;
	background: #fff;
	border: 1px solid #000;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
	animation: eh-ck-in 0.35s ease-out both;
}

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

.eh-ck__eyebrow {
	margin: 0 0 0.35rem !important;
	font-size: var(--eh-ck-label) !important;
	letter-spacing: var(--eh-ck-label-ls);
	text-transform: uppercase;
	color: var(--eh-ck-muted);
}

.eh-ck__title {
	margin: 0 0 0.6rem !important;
	font-size: 1.125rem !important;
	font-weight: 500;
	line-height: 1.3;
	color: #000;
}

.eh-ck__text {
	margin: 0 0 1.1rem !important;
	font-size: 0.8125rem !important;
	line-height: 1.6;
	color: var(--eh-ck-muted);
}

.eh-ck__text a,
.eh-ck-placeholder a {
	color: #000 !important;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.eh-ck__actions {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
}

.eh-ck__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 0.65rem 0.75rem;
	border: 1px solid #000 !important;
	border-radius: 999px !important;
	font: inherit;
	font-size: var(--eh-ck-label) !important;
	font-weight: 500;
	letter-spacing: var(--eh-ck-label-ls);
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	box-shadow: none !important;
}

.eh-ck__btn--ghost {
	background: #fff !important;
	color: #000 !important;
}

.eh-ck__btn--ghost:hover {
	background: #000 !important;
	color: #fff !important;
}

.eh-ck__btn--solid {
	background: #000 !important;
	color: #fff !important;
}

.eh-ck__btn--solid:hover {
	background: #fff !important;
	color: #000 !important;
}

.eh-ck__btn:focus-visible,
.eh-ck__close:focus-visible,
.eh-ck__switch input:focus-visible + .eh-ck__slider {
	outline: 2px solid #000;
	outline-offset: 2px;
}

/* ── Fenêtre de préférences ── */
.eh-ck-lock {
	overflow: hidden;
}

.eh-ck__overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.45);
}

.eh-ck__modal {
	position: relative;
	width: min(560px, 100%);
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	padding: 2rem 1.75rem 1.5rem;
	background: #fff;
	border: 1px solid #000;
	outline: none;
}

.eh-ck__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0 !important;
	background: transparent !important;
	color: #000 !important;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.eh-ck__cat {
	padding: 1rem 0;
	border-top: 1px solid var(--eh-ck-line);
}

.eh-ck__cat:last-of-type {
	margin-bottom: 1.25rem;
	border-bottom: 1px solid var(--eh-ck-line);
}

.eh-ck__cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 0 0 0.4rem;
	cursor: pointer;
}

.eh-ck__cat-name {
	font-size: var(--eh-ck-label);
	font-weight: 500;
	letter-spacing: var(--eh-ck-label-ls);
	text-transform: uppercase;
}

.eh-ck__always {
	font-size: var(--eh-ck-label);
	letter-spacing: 0.06em;
	color: var(--eh-ck-muted);
}

.eh-ck__cat-desc {
	margin: 0 !important;
	font-size: 0.8125rem !important;
	color: var(--eh-ck-muted);
}

.eh-ck__switch {
	position: relative;
	flex: 0 0 auto;
	width: 42px;
	height: 24px;
}

.eh-ck__switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.eh-ck__slider {
	position: absolute;
	inset: 0;
	border: 1px solid #000;
	border-radius: 999px;
	background: #fff;
	transition: background-color 0.2s ease;
	pointer-events: none;
}

.eh-ck__slider::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #000;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.eh-ck__switch input:checked + .eh-ck__slider {
	background: #000;
}

.eh-ck__switch input:checked + .eh-ck__slider::after {
	background: #fff;
	transform: translateX(18px);
}

/* ── Contenu externe bloqué (cartes) ── */
.eh-ck-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	width: 100%;
	height: 100%;
	min-height: 220px;
	padding: 1.5rem;
	background: #f5f5f3;
	color: rgba(0, 0, 0, 0.65);
	font-size: 0.8125rem;
	line-height: 1.5;
	text-align: center;
}

.eh-ck-placeholder[hidden] {
	display: none !important;
}

.eh-ck-placeholder p {
	margin: 0 !important;
	max-width: 28ch;
}

.eh-ck-placeholder .eh-ck__btn {
	min-width: 180px;
}

/* ── Mobile ── */
@media (max-width: 600px) {
	.eh-ck__banner {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom));
		border-width: 1px 0 0;
	}

	.eh-ck__actions {
		grid-template-columns: 1fr;
	}

	.eh-ck__overlay {
		align-items: flex-end;
		padding: 0;
	}

	.eh-ck__modal {
		max-height: 90vh;
		padding: 1.75rem 1.1rem calc(1.25rem + env(safe-area-inset-bottom));
		border-width: 1px 0 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.eh-ck__banner { animation: none; }
	.eh-ck__slider,
	.eh-ck__slider::after,
	.eh-ck__btn { transition: none; }
}
