/* FB Cookies : bandeau, fenêtre de choix et bouton « Cookies ».
   Tout est préfixé par #fbck pour passer devant les styles de boutons et de champs des thèmes. */
#fbck {
	--fbck-bg: #fff;
	--fbck-color: #2B2823;
	--fbck-primary: #2B2823;
	--fbck-primary-text: #fff;
	font-size: 15px;
	line-height: 1.5;
}
#fbck *, #fbck *::before, #fbck *::after { box-sizing: border-box; }

/* Remise à zéro des boutons (les thèmes stylent souvent toutes les balises <button>) */
#fbck button {
	min-width: 0;
	min-height: 0;
	height: auto;
	margin: 0;
	box-shadow: none;
	text-shadow: none;
	font-family: inherit;
	font-style: normal;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	transform: none;
}

/* Bandeau (affiché quand <html> porte la classe fbck-ask) */
#fbck .fbck-banner {
	position: fixed;
	z-index: 2147482000; /* sous le contrôle de l'âge, au-dessus du reste */
	display: none;
	left: 16px;
	bottom: 16px;
	max-width: calc(100% - 32px);
}
html.fbck-ask #fbck .fbck-banner { display: flex; }
#fbck .fbck-box {
	position: relative;
	width: 440px;
	max-width: 100%;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 24px;
	background: var(--fbck-bg);
	color: var(--fbck-color);
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
	animation: fbck-in .3s ease both;
}
#fbck.fbck-layout-bar .fbck-banner { left: 0; right: 0; bottom: 0; max-width: none; }
#fbck.fbck-layout-bar.fbck-pos-top .fbck-banner { top: 0; bottom: auto; }
#fbck.fbck-layout-bar .fbck-box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 32px;
	width: 100%;
	padding: 18px 24px;
	border-radius: 0;
}
#fbck.fbck-layout-bar .fbck-box .fbck-title { flex: 0 0 100%; margin: 0; }
#fbck.fbck-layout-bar .fbck-box .fbck-text { flex: 1 1 420px; margin: 0; }
#fbck.fbck-layout-bar .fbck-box .fbck-actions { flex: 0 1 auto; margin: 0; }
#fbck.fbck-layout-modal .fbck-banner {
	inset: 0;
	max-width: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, .5);
}
#fbck.fbck-layout-modal .fbck-box { width: 520px; }

@keyframes fbck-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

#fbck .fbck-title {
	margin: 0 0 8px;
	padding: 0;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	color: inherit;
}
#fbck .fbck-banner .fbck-title { padding-right: 170px; }
#fbck .fbck-text { margin: 0 0 16px; color: inherit; }
#fbck .fbck-text p { margin: 0 0 8px; color: inherit; }
#fbck .fbck-text a, #fbck .fbck-more { color: inherit; text-decoration: underline; }

#fbck .fbck-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: auto;
	padding: 4px;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.2;
	opacity: .75;
	cursor: pointer;
}
#fbck .fbck-close:hover, #fbck .fbck-close:focus { background: none; color: inherit; opacity: 1; text-decoration: underline; }

#fbck .fbck-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#fbck .fbck-btn {
	width: auto;
	padding: 10px 18px;
	border: 2px solid var(--fbck-primary);
	border-radius: 4px;
	background: var(--fbck-primary);
	color: var(--fbck-primary-text);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: filter .2s, background-color .2s, color .2s;
}
#fbck .fbck-btn-main { flex: 1 1 140px; }
#fbck .fbck-btn:hover, #fbck .fbck-btn:focus { background: var(--fbck-primary); color: var(--fbck-primary-text); filter: brightness(1.15); }
#fbck .fbck-btn-ghost { background: transparent; color: inherit; }
#fbck .fbck-btn-ghost:hover, #fbck .fbck-btn-ghost:focus { background: var(--fbck-primary); color: var(--fbck-primary-text); filter: none; }
#fbck .fbck-btn-link,
#fbck .fbck-btn-link:hover,
#fbck .fbck-btn-link:focus {
	flex: 0 0 100%;
	padding: 6px 0 0;
	border: 0;
	background: none;
	color: inherit;
	font-weight: 400;
	text-decoration: underline;
	filter: none;
}
#fbck .fbck-btn-link:hover { text-decoration: none; }
#fbck.fbck-layout-bar .fbck-btn-link { flex: 0 0 auto; padding: 6px 8px; }
#fbck button:focus-visible, #fbck a:focus-visible, #fbck input:focus-visible {
	outline: 3px solid var(--fbck-primary);
	outline-offset: 2px;
}

/* Fenêtre des choix par catégorie */
#fbck .fbck-panel {
	position: fixed;
	inset: 0;
	z-index: 2147482100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
#fbck .fbck-panel[hidden] { display: none; }
#fbck .fbck-panel-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
#fbck .fbck-dialog {
	position: relative;
	width: 600px;
	max-width: 100%;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 28px;
	background: var(--fbck-bg);
	color: var(--fbck-color);
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
	outline: none;
	animation: fbck-in .25s ease both;
}
#fbck .fbck-dialog .fbck-title { padding-right: 40px; }
#fbck .fbck-x,
#fbck .fbck-x:hover,
#fbck .fbck-x:focus {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font-size: 26px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
}
#fbck .fbck-cats { list-style: none; margin: 0 0 20px; padding: 0; }
#fbck .fbck-cat { margin: 0; padding: 14px 0; border-top: 1px solid rgba(127, 127, 127, .25); list-style: none; }
#fbck .fbck-cat::before { content: none; }
#fbck .fbck-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; font-size: inherit; cursor: pointer; }
#fbck .fbck-cat-label { font-weight: 700; }
#fbck .fbck-always { flex: 0 0 auto; font-size: 13px; opacity: .7; }
#fbck .fbck-cat-desc { margin: 4px 0 0; font-size: 14px; line-height: 1.45; opacity: .85; color: inherit; }

/* Interrupteur */
#fbck .fbck-switch {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	display: inline-block;
	width: 44px;
	height: 24px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: #b9b4ad;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .2s;
}
#fbck .fbck-switch::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .2s;
}
#fbck .fbck-switch:checked { background: var(--fbck-primary); }
#fbck .fbck-switch:checked::after { transform: translateX(20px); }

/* Bouton flottant pour changer d'avis (affiché une fois le choix fait) */
#fbck .fbck-revoke {
	position: fixed;
	z-index: 2147481000;
	bottom: 16px;
	display: none;
	align-items: center;
	gap: 6px;
	width: auto;
	padding: 8px 12px;
	border: 0;
	border-radius: 20px;
	background: var(--fbck-bg);
	color: var(--fbck-color);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
	cursor: pointer;
	opacity: .85;
}
#fbck .fbck-revoke:hover, #fbck .fbck-revoke:focus { background: var(--fbck-bg); color: var(--fbck-color); opacity: 1; }
#fbck .fbck-revoke.fbck-side-left { left: 16px; }
#fbck .fbck-revoke.fbck-side-right { right: 16px; }
html.fbck-done #fbck .fbck-revoke { display: inline-flex; }
html.fbck-ask #fbck .fbck-revoke { display: none; }

.fbck-inline-btn { cursor: pointer; }
.fbck-list dt { font-weight: 700; margin-top: 12px; }
.fbck-list dd { margin: 4px 0 0; }

@media (max-width: 600px) {
	#fbck .fbck-banner { left: 0; right: 0; bottom: 0; max-width: none; }
	#fbck .fbck-box { width: 100%; padding: 20px 16px 16px; border-radius: 12px 12px 0 0; }
	#fbck.fbck-layout-modal .fbck-banner { padding: 0; align-items: flex-end; }
	#fbck .fbck-banner .fbck-title { padding-right: 0; margin-top: 22px; }
	#fbck .fbck-dialog { padding: 24px 18px; }
	#fbck .fbck-revoke span { display: none; }
	#fbck .fbck-revoke { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
	#fbck .fbck-box, #fbck .fbck-dialog { animation: none; }
}
