/* CEH Cookies — bandeau (style neutre, mode clair par défaut).
 * Couleurs fournies par le plugin : --cehc-bg, --cehc-text, --cehc-muted,
 * --cehc-line, --cehc-accent, --cehc-on-accent. */
.cehc {
	--cehc-bg: #ffffff;
	--cehc-text: #111827;
	--cehc-muted: #4b5563;
	--cehc-line: #e5e7eb;
	--cehc-accent: #1f2937;
	--cehc-on-accent: #ffffff;
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999;
	display: flex; justify-content: center; padding: 16px;
	pointer-events: none;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.cehc[hidden] { display: none; }
.cehc__box {
	position: relative; width: 100%; max-width: 920px;
	padding: 24px 28px 20px;
	border: 1px solid var(--cehc-line); border-radius: 12px;
	background: var(--cehc-bg); color: var(--cehc-muted);
	box-shadow: 0 10px 40px rgba(17, 24, 39, .12), 0 2px 8px rgba(17, 24, 39, .06);
	pointer-events: auto;
	transform: translateY(16px); opacity: 0;
	transition: transform .25s ease, opacity .25s ease;
	font-size: 14px; line-height: 1.6;
}
.cehc.is-open .cehc__box { transform: none; opacity: 1; }
.cehc__title { margin: 0 0 6px; padding-right: 180px; color: var(--cehc-text); font-size: 16px; font-weight: 600; }
.cehc__text { margin: 0; }
.cehc__text a { color: var(--cehc-text); text-decoration: underline; text-underline-offset: 3px; }
.cehc__continue { position: absolute; top: 14px; right: 16px; padding: 4px 6px; border: 0; background: none; color: var(--cehc-muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cehc__continue:hover { color: var(--cehc-text); }

.cehc__prefs { margin-top: 16px; border-top: 1px solid var(--cehc-line); }
.cehc__prefs[hidden], .cehc__pref[hidden] { display: none; }
.cehc__pref { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--cehc-line); }
.cehc__pref strong { display: block; color: var(--cehc-text); font-size: 14px; font-weight: 600; }
.cehc__pref span { display: block; font-size: 13px; color: var(--cehc-muted); }
.cehc__always { flex: none; color: var(--cehc-text) !important; font-weight: 600; font-size: 12.5px !important; white-space: nowrap; }
.cehc__switch { position: relative; flex: none; display: inline-block; width: 44px; height: 24px; cursor: pointer; }
.cehc__switch input { position: absolute; z-index: 1; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cehc__slider { position: absolute; inset: 0; border-radius: 24px; background: #d1d5db; transition: background-color .2s; }
.cehc__slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.cehc__switch input:checked + .cehc__slider { background: var(--cehc-accent); }
.cehc__switch input:checked + .cehc__slider::before { transform: translateX(20px); }
.cehc__switch input:focus-visible + .cehc__slider { outline: 2px solid var(--cehc-accent); outline-offset: 2px; }
.cehc__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

.cehc__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.cehc__btn { min-width: 150px; padding: 11px 20px; border: 1px solid var(--cehc-accent); border-radius: 8px; background: var(--cehc-accent); color: var(--cehc-on-accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: opacity .2s, background-color .2s, color .2s; }
.cehc__btn:hover { opacity: .88; }
.cehc__btn:focus-visible, .cehc__continue:focus-visible, .cehc-float:focus-visible, .cehc-link:focus-visible { outline: 2px solid var(--cehc-accent); outline-offset: 2px; }
.cehc__btn--link { min-width: 0; margin-right: auto; padding-inline: 4px; border-color: transparent; background: transparent; color: var(--cehc-text); text-decoration: underline; text-underline-offset: 3px; }
.cehc__btn--ghost { background: transparent; color: var(--cehc-text); border-color: var(--cehc-line); }
.cehc__btn[hidden] { display: none; }

@media (max-width: 640px) {
	.cehc { padding: 8px; }
	.cehc__box { max-height: 88vh; overflow-y: auto; padding: 42px 18px 16px; border-radius: 12px; }
	.cehc__title { padding-right: 0; }
	.cehc__actions { flex-direction: column-reverse; align-items: stretch; }
	.cehc__btn { width: 100%; }
	.cehc__btn--link { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { .cehc__box { transition: none; } }

/* Bouton flottant « Gérer les cookies » */
.cehc-float { position: fixed; left: 16px; bottom: 16px; z-index: 99990; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--cehc-line, #e5e7eb); border-radius: 50%; background: var(--cehc-bg, #fff); color: var(--cehc-text, #111827); box-shadow: 0 4px 14px rgba(17, 24, 39, .15); cursor: pointer; }
.cehc-float:hover { box-shadow: 0 6px 18px rgba(17, 24, 39, .22); }

/* Lien shortcode */
.cehc-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Politique de cookies */
.cehc-policy__table-wrap { overflow-x: auto; margin: 0 0 1.5em; }
.cehc-policy__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cehc-policy__table th, .cehc-policy__table td { padding: 10px 12px; border: 1px solid #e5e7eb; text-align: left; vertical-align: top; }
.cehc-policy__table th { background: #f9fafb; }
.cehc-policy .cehc-link { padding: 10px 18px; border: 1px solid currentColor; border-radius: 8px; text-decoration: none; font-weight: 600; }
