/* CH Cookies — bannière de consentement (site public). Neutre pour tout thème ; couleur des boutons :
   réglage du module, sinon variable --ch-cs-brand posée par le thème, sinon gris très foncé.
   « Tout refuser » en haut à droite dès le premier écran (lien « Continuer sans accepter » admis par la CNIL),
   « Choisir les options » et « Tout accepter » en bas. */
.ch-cs-root {
	--ch-cs-ink: #1d1d1f;
	--ch-cs-soft: #5f6368;
	--ch-cs-line: #e3e3e6;
	--ch-cs-btn: var(--ch-cs-brand, #1d1d1f);
	position: fixed;
	z-index: 2147483000;
	box-sizing: border-box;
	color: var(--ch-cs-ink);
	font-size: var(--rmp-fs-body, 14px);
	line-height: 1.5;
	text-align: left;
}
.ch-cs-root[hidden], .ch-cs-reopen[hidden], .ch-cs-prefs[hidden], .ch-cs-btn[hidden], .ch-cs-pref[hidden], .ch-cs-gpc[hidden], .ch-cs-id[hidden] { display: none !important; }
.ch-cs-root *, .ch-cs-root *::before, .ch-cs-root *::after { box-sizing: border-box; }

.ch-cs-root--corner { left: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); }
.ch-cs-root--bar { left: 0; right: 0; bottom: 0; }

.ch-cs-box {
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 20px;
	background: #fff;
	border: 1px solid var(--ch-cs-line);
	border-radius: 14px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}
.ch-cs-root--bar .ch-cs-box { max-width: 960px; margin: 0 auto 16px; }

.ch-cs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 6px; }
.ch-cs-head .ch-cs-title { flex: 1 1 12em; min-width: 0; margin: 0; } /* a larger text: the link goes under the title rather than squeezing it */
.ch-cs-icon { flex: none; display: inline-flex; width: 40px; height: 40px; }
.ch-cs-icon svg { display: block; width: 100%; height: 100%; animation: ch-cs-wobble .6s ease-out .2s 1 both; transform-origin: 50% 60%; }
@keyframes ch-cs-wobble { 0% { transform: rotate(-14deg) scale(.85); } 60% { transform: rotate(6deg) scale(1.04); } 100% { transform: none; } }
.ch-cs-title { margin: 0 0 6px; font-size: var(--rmp-fs-body, 16px); font-weight: 600; line-height: 1.35; color: var(--ch-cs-ink); }
.ch-cs-text { margin: 0 0 16px; color: var(--ch-cs-soft); }
.ch-cs-link { color: inherit; text-decoration: underline; }

.ch-cs-prefs { display: grid; gap: 10px; margin: 0 0 16px; }
.ch-cs-pref {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--ch-cs-line);
	border-radius: 10px;
	cursor: pointer;
}
.ch-cs-pref__text { display: grid; gap: 2px; min-width: 0; }
.ch-cs-pref__text strong { font-weight: 600; color: var(--ch-cs-ink); }
.ch-cs-pref__text span { font-size: var(--rmp-fs-body, 13px); color: var(--ch-cs-soft); }

/* Interrupteur : un vrai <input type="checkbox">, accessible au clavier. */
.ch-cs-switch {
	flex: none;
	position: relative;
	width: 40px;
	height: 24px;
	margin: 0;
	border-radius: 999px;
	background: #c9c9ce;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: background-color 0.15s;
}
.ch-cs-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	transition: transform 0.15s;
}
.ch-cs-switch:checked { background: var(--ch-cs-btn); }
.ch-cs-switch:checked::after { transform: translateX(16px); }
.ch-cs-switch:disabled { opacity: 0.55; cursor: default; }
.ch-cs-switch:focus-visible { outline: 2px solid var(--ch-cs-btn); outline-offset: 2px; }

.ch-cs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ch-cs-root .ch-cs-btn {
	margin: 0;
	min-height: 44px;
	padding: 0 16px;
	border-radius: 10px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: none;
	text-transform: none;
	letter-spacing: 0;
}
.ch-cs-root .ch-cs-btn--choice {
	flex: 1 1 0;
	border: 1px solid var(--ch-cs-btn);
	background: var(--ch-cs-btn);
	color: #fff;
}
.ch-cs-root .ch-cs-btn--choice:hover { filter: brightness(1.08); }
.ch-cs-root .ch-cs-btn--save {
	flex: 1 1 0;
	border: 1px solid var(--ch-cs-btn);
	background: #fff;
	color: var(--ch-cs-btn);
}
.ch-cs-root .ch-cs-btn--link {
	order: -1;
	flex: 1 1 100%;
	min-height: 36px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--ch-cs-ink);
	text-decoration: underline;
	text-align: left;
}
.ch-cs-root .ch-cs-btn--deny {
	flex: none;
	align-self: center;
	min-height: 32px;
	padding: 0 2px;
	border: 0;
	background: transparent;
	color: var(--ch-cs-ink);
	font-size: var(--rmp-fs-body, 14px);
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}
.ch-cs-root .ch-cs-btn--deny:hover { color: var(--ch-cs-btn); }
.ch-cs-root .ch-cs-btn--save:hover { background: #f6f6f7; }
.ch-cs-btn:focus-visible { outline: 2px solid var(--ch-cs-btn); outline-offset: 2px; }

.ch-cs-reopen {
	position: fixed;
	left: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 2147482000;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid #e3e3e6;
	border-radius: 50%;
	background: #fff;
	color: #1d1d1f;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease;
	animation: ch-cs-pop .35s ease-out both;
}
.ch-cs-reopen--right { left: auto; right: 16px; }
.ch-cs-reopen--brand { border-color: transparent; background: var(--ch-cs-brand, #1d1d1f); color: #fff; }
.ch-cs-reopen svg { display: block; flex: none; }
.ch-cs-reopen:hover { transform: rotate(-12deg) scale(1.06); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16); }
@keyframes ch-cs-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
.ch-cs-reopen:focus-visible { outline: 2px solid var(--ch-cs-brand, #1d1d1f); outline-offset: 2px; }

@media (max-width: 600px) {
	.ch-cs-root--corner, .ch-cs-root--bar { left: 0; right: 0; bottom: 0; width: auto; }
	.ch-cs-icon { width: 32px; height: 32px; }
	.ch-cs-box, .ch-cs-root--bar .ch-cs-box { margin: 0; border-radius: 16px 16px 0 0; border-bottom: 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
	.ch-cs-switch, .ch-cs-switch::after { transition: none; }
	.ch-cs-icon svg, .ch-cs-reopen { animation: none; transition: none; }
	.ch-cs-reopen:hover { transform: none; }
}

.ch-cs-gpc { margin: -8px 0 16px; padding: 8px 10px; border-radius: 8px; background: #f3f4f6; color: var(--ch-cs-ink); font-size: var(--rmp-fs-body, 13px); }
.ch-cs-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 0; font-size: var(--rmp-fs-body, 12px); color: var(--ch-cs-soft); }
.ch-cs-id code { font-size: var(--rmp-fs-body, 11px); word-break: break-all; }

/* Contenu tiers bloqué (vidéo, carte…) : encart à la place de l'iframe. */
iframe[data-ch-ck-src] { display: none !important; }
.ch-ck-embed {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 200px;
	margin: 0 0 1em;
	padding: 20px;
	border: 1px solid #e3e3e6;
	border-radius: 12px;
	background: #f5f5f7;
	color: #1d1d1f;
	text-align: center;
	font-size: var(--rmp-fs-body, 14px);
	line-height: 1.5;
}
.ch-ck-embed__text { max-width: 460px; margin: 0; }
.ch-ck-embed__btn {
	min-height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: 10px;
	background: var(--ch-cs-brand, #1d1d1f);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.ch-ck-embed__link { color: inherit; font-size: var(--rmp-fs-meta, 13px); }

/* Liste des cookies ([ch_cookies_list]). */
.ch-ck-list__scroll { overflow-x: auto; margin: 0 0 1.5em; }
.ch-ck-list__table { width: 100%; border-collapse: collapse; font-size: var(--rmp-fs-body, 0.9em); }
.ch-ck-list__table th, .ch-ck-list__table td { padding: 8px 10px; border-bottom: 1px solid #e3e3e6; text-align: left; vertical-align: top; }
.ch-ck-list__table { min-width: 34em; } /* scrolls sideways (.ch-ck-list__scroll) rather than squeezing the columns */
.ch-ck-list__table code { word-break: normal; overflow-wrap: anywhere; }
