/* RGPD Consent Manager – bannière (charte Permis-France par défaut, couleurs modifiables dans les réglages) */
#rcm-root {
	--rcm-primary: #cd3d67;
	--rcm-dark: #3c404f;
	--rcm-accent: #2e9996;
	--rcm-bg: #ffffff;
	--rcm-fg: var(--rcm-dark);
	--rcm-muted: #5b6070;
	--rcm-line: #e6e8ee;
	--rcm-soft: #f5f7fa;
	--rcm-radius: 8px;
	--rcm-btn-radius: 4px;
	--rcm-shadow: 0 12px 40px rgba(60, 64, 79, .22);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--rcm-fg);
}
#rcm-root.rcm-theme-dark {
	--rcm-bg: var(--rcm-dark);
	--rcm-fg: #ffffff;
	--rcm-muted: #d5d7de;
	--rcm-line: rgba(255, 255, 255, .16);
	--rcm-soft: rgba(255, 255, 255, .06);
}
#rcm-root [hidden] { display: none !important; }
#rcm-root *, #rcm-root *::before, #rcm-root *::after { box-sizing: border-box; }
#rcm-root p { margin: 0 0 .6em; }
#rcm-root a { color: var(--rcm-primary); text-decoration: underline; }
#rcm-root.rcm-theme-dark a { color: #f6a9c0; }

/* --------------------------------------------------------------- Boutons */
#rcm-root .rcm-btn,
.rcm-placeholder .rcm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 10px 18px;
	border-radius: var(--rcm-btn-radius, 4px);
	border: 2px solid var(--rcm-primary);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	width: auto;
	margin: 0;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease, filter .15s ease;
}

/* « Tout accepter » : bouton plein, couleur principale */
#rcm-root .rcm-btn-choice,
.rcm-placeholder .rcm-btn-accept {
	background: var(--rcm-primary);
	border-color: var(--rcm-primary);
	color: #fff;
}
#rcm-root .rcm-btn-accept { box-shadow: 0 4px 12px rgba(60, 64, 79, .18); }
#rcm-root .rcm-btn-choice:hover,
.rcm-placeholder .rcm-btn-accept:hover { filter: brightness(1.08); }

/* « Tout refuser » : bouton secondaire, même taille et même niveau (mode « accent ») */
#rcm-root.rcm-buttons-accent .rcm-btn-reject {
	background: #fff;
	border-color: #c9ccd5;
	color: var(--rcm-dark);
	box-shadow: none;
}
#rcm-root.rcm-buttons-accent .rcm-btn-reject:hover {
	border-color: var(--rcm-dark);
	filter: none;
}
#rcm-root.rcm-buttons-accent.rcm-theme-dark .rcm-btn-reject {
	background: transparent;
	border-color: rgba(255, 255, 255, .45);
	color: #fff;
}

/* « Personnaliser » / « Enregistrer » */
#rcm-root .rcm-btn-ghost,
.rcm-placeholder .rcm-btn-ghost {
	background: transparent;
	border-color: transparent;
	color: var(--rcm-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
	font-weight: 600;
}
#rcm-root .rcm-modal-foot .rcm-btn-ghost {
	border-color: var(--rcm-dark);
	text-decoration: none;
}
#rcm-root.rcm-theme-dark .rcm-btn-ghost { color: #fff; }
#rcm-root.rcm-theme-dark .rcm-modal-foot .rcm-btn-ghost { border-color: rgba(255, 255, 255, .6); }

#rcm-root button:focus-visible,
#rcm-root a:focus-visible,
#rcm-root summary:focus-visible,
#rcm-root input:focus-visible + .rcm-slider,
.rcm-placeholder button:focus-visible {
	outline: 3px solid var(--rcm-primary);
	outline-offset: 2px;
}

/* --------------------------------------------------------------- Bannière */
#rcm-root .rcm-banner {
	position: fixed;
	z-index: 2147483600;
	background: var(--rcm-bg);
	color: var(--rcm-fg);
	box-shadow: var(--rcm-shadow);
	padding: 22px 24px 20px;
	border: 1px solid var(--rcm-line);
	border-top: 4px solid var(--rcm-primary);
}
#rcm-root .rcm-title {
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 8px;
	padding-right: 130px;
	color: var(--rcm-fg);
}
#rcm-root .rcm-desc { color: var(--rcm-muted); font-size: 14px; }
#rcm-root .rcm-links { font-size: 14px; font-weight: 600; }
#rcm-root .rcm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 14px;
}
#rcm-root .rcm-actions .rcm-btn-choice { flex: 1 1 140px; }
#rcm-root .rcm-actions .rcm-btn-ghost { flex: 1 1 100%; min-height: 36px; padding: 4px 8px; }
#rcm-root .rcm-continue {
	position: absolute;
	top: 16px;
	right: 18px;
	background: none;
	border: 0;
	padding: 4px;
	margin: 0;
	font: inherit;
	font-size: 13px;
	color: var(--rcm-muted);
	text-decoration: underline;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: none;
	min-height: 0;
}

/* Encart */
#rcm-root.rcm-pos-box .rcm-banner {
	left: 16px;
	bottom: 16px;
	width: calc(100% - 32px);
	max-width: 450px;
	border-radius: var(--rcm-radius);
}
#rcm-root.rcm-pos-box.rcm-side-right .rcm-banner { left: auto; right: 16px; }

/* Bandeau */
#rcm-root.rcm-pos-bar .rcm-banner {
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: 0;
	border-width: 4px 0 0;
}
@media (min-width: 960px) {
	#rcm-root.rcm-pos-bar .rcm-banner {
		display: grid;
		grid-template-columns: 1fr auto;
		grid-template-areas: "title actions" "desc actions";
		column-gap: 28px;
		padding: 18px 32px;
	}
	#rcm-root.rcm-pos-bar .rcm-title { grid-area: title; }
	#rcm-root.rcm-pos-bar .rcm-desc { grid-area: desc; max-width: 900px; }
	#rcm-root.rcm-pos-bar .rcm-actions { grid-area: actions; align-self: center; flex-wrap: nowrap; margin: 0; max-width: 520px; }
	#rcm-root.rcm-pos-bar .rcm-actions .rcm-btn-ghost { flex: 0 0 auto; }
	#rcm-root.rcm-pos-bar .rcm-continue { top: 10px; right: 32px; }
}

/* Fenêtre centrée */
#rcm-root.rcm-pos-center .rcm-banner {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: calc(100% - 32px);
	max-width: 580px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	border-radius: var(--rcm-radius);
}

/* --------------------------------------------------------------- Overlay & préférences */
#rcm-root .rcm-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483500;
	background: rgba(60, 64, 79, .6);
}
#rcm-root .rcm-modal {
	position: fixed;
	z-index: 2147483640;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	pointer-events: none;
}
#rcm-root .rcm-modal-inner {
	pointer-events: auto;
	background: var(--rcm-bg);
	color: var(--rcm-fg);
	width: 100%;
	max-width: 660px;
	max-height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
	border-radius: var(--rcm-radius);
	border-top: 4px solid var(--rcm-primary);
	box-shadow: var(--rcm-shadow);
	overflow: hidden;
}
#rcm-root .rcm-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	border-bottom: 1px solid var(--rcm-line);
}
#rcm-root .rcm-modal-head .rcm-title { margin: 0; padding: 0; }
#rcm-root .rcm-x {
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	color: var(--rcm-muted);
	cursor: pointer;
	padding: 4px 8px;
	margin: 0;
	min-height: 0;
	box-shadow: none;
}
#rcm-root .rcm-modal-body { padding: 16px 24px; overflow-y: auto; }
#rcm-root .rcm-intro { color: var(--rcm-muted); font-size: 14px; }
#rcm-root .rcm-cat {
	border: 1px solid var(--rcm-line);
	border-radius: 6px;
	padding: 14px 16px;
	margin: 12px 0;
	background: var(--rcm-soft);
}
#rcm-root .rcm-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
#rcm-root .rcm-cat-title { font-weight: 700; margin: 0; }
#rcm-root .rcm-cat-desc { font-size: 14px; color: var(--rcm-muted); margin: 8px 0 0; }
#rcm-root .rcm-always { font-size: 13px; font-weight: 700; color: var(--rcm-dark); white-space: nowrap; }
#rcm-root.rcm-theme-dark .rcm-always { color: #fff; }
#rcm-root .rcm-services { margin-top: 8px; font-size: 13px; }
#rcm-root .rcm-services summary { cursor: pointer; color: var(--rcm-primary); font-weight: 700; }
#rcm-root.rcm-theme-dark .rcm-services summary { color: #f6a9c0; }
#rcm-root .rcm-services ul { margin: 8px 0 0; padding-left: 18px; }
#rcm-root .rcm-services li { margin-bottom: 8px; }
#rcm-root .rcm-provider, #rcm-root .rcm-purpose, #rcm-root .rcm-cookies { color: var(--rcm-muted); }
#rcm-root .rcm-consent-id { font-size: 12px; color: var(--rcm-muted); margin-top: 14px; word-break: break-all; }
#rcm-root .rcm-modal-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 14px 24px 18px;
	border-top: 1px solid var(--rcm-line);
}
#rcm-root .rcm-modal-foot .rcm-btn { flex: 1 1 150px; }

/* Interrupteurs */
#rcm-root .rcm-switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: 0 0 auto; cursor: pointer; margin: 0; }
#rcm-root .rcm-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
#rcm-root .rcm-slider {
	position: absolute;
	inset: 0;
	background: #a3a7b3;
	border-radius: 28px;
	transition: background-color .15s ease;
}
#rcm-root .rcm-slider::before {
	content: "";
	position: absolute;
	width: 22px;
	height: 22px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
	transition: transform .15s ease;
}
#rcm-root .rcm-switch input:checked + .rcm-slider { background: var(--rcm-accent); }
#rcm-root .rcm-switch input:checked + .rcm-slider::before { transform: translateX(20px); }
#rcm-root .rcm-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* --------------------------------------------------------------- Bouton flottant */
#rcm-root .rcm-floating {
	position: fixed;
	z-index: 2147483400;
	bottom: 16px;
	left: 16px;
	width: 44px;
	height: 44px;
	min-height: 0;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	border: 0;
	background: var(--rcm-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(60, 64, 79, .3);
	cursor: pointer;
}
#rcm-root.rcm-side-right .rcm-floating { left: auto; right: 16px; }

/* --------------------------------------------------------------- Contenus bloqués */
.rcm-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 20px;
	margin: 0 auto 1em;
	text-align: center;
	background: #f5f7fa;
	border: 2px dashed #d6d9e1;
	border-radius: 6px;
	color: var(--rcm-dark, #3c404f);
	font-size: 14px;
	line-height: 1.5;
}
.rcm-placeholder p { margin: 0; max-width: 520px; }
.rcm-placeholder .rcm-btn { min-height: 40px; font-size: 14px; }

/* --------------------------------------------------------------- Mention reCAPTCHA */
.rcm-recaptcha-notice {
	clear: both;
	margin: 10px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: #6b7080;
}

/* --------------------------------------------------------------- Audit */
#rcm-root .rcm-toast {
	position: fixed;
	z-index: 2147483647;
	right: 16px;
	top: 16px;
	max-width: 380px;
	background: var(--rcm-dark);
	color: #fff;
	padding: 12px 14px;
	border-radius: 6px;
	border-left: 4px solid var(--rcm-accent);
	font-size: 13px;
	box-shadow: var(--rcm-shadow);
}
#rcm-root .rcm-toast button {
	display: block;
	margin-top: 8px;
	background: #fff;
	color: var(--rcm-dark);
	border: 0;
	border-radius: 4px;
	padding: 6px 10px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

@media (max-width: 480px) {
	#rcm-root .rcm-title { padding-right: 0; margin-top: 18px; font-size: 17px; }
	#rcm-root .rcm-desc { font-size: 13px; line-height: 1.45; }
	#rcm-root.rcm-pos-box .rcm-banner { left: 8px; bottom: 8px; width: calc(100% - 16px); }
}
@media (prefers-reduced-motion: reduce) {
	#rcm-root *, .rcm-placeholder * { transition: none !important; }
}
@media print {
	#rcm-root { display: none !important; }
}
