/* FCG Cookie Consent — reprend les polices du theme quand elles existent.
   --fcgc-primary est defini sur :root par le plugin (reglage "Couleur"). */
:root { --fcgc-primary: #7a1e2b; }

.fcgc {
	--fcgc-bg: #ffffff;
	--fcgc-surface: #f7f5f0;
	--fcgc-text: #1c1c1c;
	--fcgc-muted: #5a5a5a;
	--fcgc-border: #e4e0d8;
	--fcgc-on-primary: #ffffff;
	--fcgc-radius: 16px;
	--fcgc-shadow: 0 24px 60px -18px rgba(20, 8, 10, 0.35), 0 2px 8px rgba(20, 8, 10, 0.06);
	--fcgc-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--fcgc-font: var(--fcg-font-body, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
	--fcgc-font-heading: var(--fcg-font-heading, Georgia, serif);
	font-family: var(--fcgc-font);
	color: var(--fcgc-text);
	-webkit-font-smoothing: antialiased;
}

.fcgc-theme--dark {
	--fcgc-bg: #1b1416;
	--fcgc-surface: #261c1f;
	--fcgc-text: #f5f0ee;
	--fcgc-muted: #bfb3b1;
	--fcgc-border: #3a2d30;
}

@media (prefers-color-scheme: dark) {
	.fcgc-theme--auto {
		--fcgc-bg: #1b1416;
		--fcgc-surface: #261c1f;
		--fcgc-text: #f5f0ee;
		--fcgc-muted: #bfb3b1;
		--fcgc-border: #3a2d30;
	}
}

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

.fcgc [hidden] { display: none !important; }

/* ---------------- Boutons ---------------- */

.fcgc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	font: 600 14px/1 var(--fcgc-font);
	letter-spacing: 0.01em;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--fcgc-ease);
	white-space: nowrap;
}
.fcgc-btn:active { transform: scale(0.98); }
.fcgc-btn--primary { background: var(--fcgc-primary); color: var(--fcgc-on-primary); }
.fcgc-btn--primary:hover { background: color-mix(in srgb, var(--fcgc-primary) 86%, #000); }
.fcgc-btn--ghost { background: transparent; color: var(--fcgc-text); border-color: var(--fcgc-border); }
.fcgc-btn--ghost:hover { border-color: var(--fcgc-text); }
.fcgc-btn--sm { min-height: 38px; padding: 0 16px; font-size: 13px; }

.fcgc-link {
	padding: 6px 2px;
	border: 0;
	background: none;
	color: var(--fcgc-text);
	font: 600 14px/1.2 var(--fcgc-font);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
	cursor: pointer;
}
.fcgc-link:hover { text-decoration-color: currentColor; }

.fcgc :focus-visible {
	outline: 2px solid var(--fcgc-primary);
	outline-offset: 2px;
}

/* ---------------- Bandeau ---------------- */

.fcgc-banner {
	position: fixed;
	z-index: 99990;
	bottom: 20px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 24px;
	background: var(--fcgc-bg);
	border: 1px solid var(--fcgc-border);
	border-radius: var(--fcgc-radius);
	box-shadow: var(--fcgc-shadow);
	opacity: 0;
	transform: translateY(16px);
	transition: opacity 0.4s var(--fcgc-ease), transform 0.4s var(--fcgc-ease);
}
.fcgc.is-banner-open .fcgc-banner { opacity: 1; transform: none; }

.fcgc--box .fcgc-banner { width: min(420px, calc(100vw - 40px)); }
.fcgc--box.fcgc--left .fcgc-banner { left: 20px; }
.fcgc--box.fcgc--right .fcgc-banner { right: 20px; }

.fcgc--bar .fcgc-banner {
	left: 20px;
	right: 20px;
	max-width: 1160px;
	margin-inline: auto;
	flex-direction: row;
	align-items: center;
	gap: 32px;
}

.fcgc-banner__title {
	margin: 0 0 8px;
	font: 600 20px/1.25 var(--fcgc-font-heading);
	color: var(--fcgc-text);
}
.fcgc-banner__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--fcgc-muted);
}
.fcgc-banner__text a { color: var(--fcgc-text); font-weight: 600; text-underline-offset: 3px; }

.fcgc-banner__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	align-items: center;
}
.fcgc-banner__actions .fcgc-link { grid-column: 1 / -1; justify-self: center; }

.fcgc--bar .fcgc-banner__actions {
	display: flex;
	flex-shrink: 0;
	flex-direction: row-reverse;
}
.fcgc--bar .fcgc-banner__actions .fcgc-link { order: -1; }

/* ---------------- Fenetre de preferences ---------------- */

.fcgc-modal {
	position: fixed;
	inset: 0;
	z-index: 99995;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.fcgc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(18, 8, 10, 0.55);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.3s var(--fcgc-ease);
}
.fcgc-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(620px, 100%);
	max-height: min(760px, calc(100vh - 40px));
	background: var(--fcgc-bg);
	border-radius: var(--fcgc-radius);
	box-shadow: var(--fcgc-shadow);
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	transition: opacity 0.3s var(--fcgc-ease), transform 0.3s var(--fcgc-ease);
	outline: none;
}
.fcgc.is-modal-open .fcgc-modal__backdrop,
.fcgc.is-modal-open .fcgc-modal__dialog { opacity: 1; transform: none; }

.fcgc-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px;
	border-bottom: 1px solid var(--fcgc-border);
}
.fcgc-modal__title { margin: 0; font: 600 22px/1.2 var(--fcgc-font-heading); color: var(--fcgc-text); }
.fcgc-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: var(--fcgc-surface);
	color: var(--fcgc-text);
	cursor: pointer;
}
.fcgc-modal__close:hover { background: var(--fcgc-border); }

.fcgc-modal__body {
	overflow-y: auto;
	padding: 20px 24px;
	overscroll-behavior: contain;
}
.fcgc-modal__intro,
.fcgc-modal__gpc { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: var(--fcgc-muted); }
.fcgc-modal__gpc { padding: 12px 14px; border-radius: 10px; background: var(--fcgc-surface); }
.fcgc-modal__id { margin: 16px 0 0; font-size: 12px; color: var(--fcgc-muted); }
.fcgc-modal__id code { font-size: 12px; background: none; padding: 0; color: inherit; }

.fcgc-modal__foot {
	display: flex;
	justify-content: flex-end;
	flex-wrap: wrap;
	gap: 10px;
	padding: 16px 24px;
	border-top: 1px solid var(--fcgc-border);
}

html.fcgc-lock { overflow: hidden; }

/* ---------------- Categories ---------------- */

.fcgc-cat {
	padding: 16px 18px;
	border: 1px solid var(--fcgc-border);
	border-radius: 12px;
}
.fcgc-cat + .fcgc-cat { margin-top: 10px; }
.fcgc-cat__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.fcgc-cat__label { margin: 0 0 4px; font: 600 15px/1.3 var(--fcgc-font); color: var(--fcgc-text); }
.fcgc-cat__desc { margin: 0; font-size: 13px; line-height: 1.55; color: var(--fcgc-muted); }
.fcgc-cat__always {
	flex-shrink: 0;
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--fcgc-surface);
	font-size: 12px;
	font-weight: 600;
	color: var(--fcgc-muted);
	white-space: nowrap;
}

.fcgc-cat__details { margin-top: 10px; }
.fcgc-cat__details summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--fcgc-text);
	cursor: pointer;
	list-style: none;
}
.fcgc-cat__details summary::-webkit-details-marker { display: none; }
.fcgc-cat__details summary::after {
	content: '';
	width: 7px;
	height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.2s;
}
.fcgc-cat__details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }

.fcgc-cookies { margin: 10px 0 0; padding: 0; list-style: none; }
.fcgc-cookies li {
	display: grid;
	gap: 2px;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--fcgc-surface);
	font-size: 12.5px;
	line-height: 1.5;
}
.fcgc-cookies li + li { margin-top: 6px; }
.fcgc-cookies__name { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; color: var(--fcgc-text); word-break: break-word; }
.fcgc-cookies__meta { color: var(--fcgc-muted); }
.fcgc-cookies__purpose { color: var(--fcgc-text); }

/* Interrupteur */
.fcgc-switch { position: relative; flex-shrink: 0; display: inline-flex; cursor: pointer; }
.fcgc-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.fcgc-switch__track {
	position: relative;
	width: 46px;
	height: 26px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--fcgc-muted) 40%, transparent);
	transition: background-color 0.25s;
}
.fcgc-switch__track::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.25s var(--fcgc-ease);
}
.fcgc-switch input:checked + .fcgc-switch__track { background: var(--fcgc-primary); }
.fcgc-switch input:checked + .fcgc-switch__track::after { transform: translateX(20px); }
.fcgc-switch input:focus-visible + .fcgc-switch__track { outline: 2px solid var(--fcgc-primary); outline-offset: 2px; }

/* ---------------- Bouton flottant ---------------- */

.fcgc-fab {
	position: fixed;
	z-index: 59;
	left: 20px;
	bottom: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--fcgc-border);
	border-radius: 50%;
	background: var(--fcgc-bg);
	color: var(--fcgc-primary);
	box-shadow: 0 8px 22px -10px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	transition: transform 0.25s var(--fcgc-ease);
}
.fcgc-fab:hover { transform: translateY(-2px); }
.fcgc--box.fcgc--right .fcgc-fab { left: auto; right: 20px; bottom: 96px; }

/* ---------------- Contenus bloques ---------------- */

.fcgc-embed { position: relative; display: block; }
.fcgc-embed:not(.is-loaded) iframe { visibility: hidden; }
.fcgc-embed__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-height: 200px;
	padding: 24px;
	background: var(--fcg-color-bg-alt, #f7f5f0);
	border: 1px solid var(--fcg-color-border, #e4e0d8);
	border-radius: inherit;
	text-align: center;
	font-family: var(--fcg-font-body, sans-serif);
	line-height: 1.5;
}
.fcgc-embed__text { max-width: 420px; margin: 0; font-size: 14px; color: var(--fcg-color-text-muted, #5a5a5a); }
.fcgc-embed__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.fcgc-embed .fcgc-btn--primary { background: var(--fcgc-primary, #7a1e2b); color: #fff; }
.fcgc-embed .fcgc-btn--ghost { color: var(--fcg-color-text, #1c1c1c); border-color: var(--fcg-color-border, #e4e0d8); }
.fcgc-embed .fcgc-btn--ghost:hover { border-color: currentColor; }

/* ---------------- Declaration (code court) ---------------- */

.fcgc-declaration__scroll { overflow-x: auto; margin-bottom: 1.5em; }
.fcgc-declaration table { width: 100%; border-collapse: collapse; font-size: 0.92em; }
.fcgc-declaration th,
.fcgc-declaration td { padding: 10px 12px; border-bottom: 1px solid var(--fcg-color-border, #e4e0d8); text-align: left; vertical-align: top; }
.fcgc-declaration th { font-weight: 600; }

/* ---------------- Mobile ---------------- */

@media (max-width: 640px) {
	.fcgc-banner,
	.fcgc--box .fcgc-banner,
	.fcgc--bar .fcgc-banner {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 20px;
	}
	.fcgc--bar .fcgc-banner__actions { display: grid; }
	.fcgc--bar .fcgc-banner__actions .fcgc-link { order: 0; }
	.fcgc-banner__title { font-size: 18px; }

	.fcgc-modal { padding: 0; align-items: flex-end; }
	.fcgc-modal__dialog { max-height: 92vh; border-radius: var(--fcgc-radius) var(--fcgc-radius) 0 0; }
	.fcgc-modal__foot { display: grid; grid-template-columns: 1fr 1fr; }
	.fcgc-modal__foot .fcgc-btn--primary { grid-column: 1 / -1; order: -1; }
	.fcgc-fab { left: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.fcgc *,
	.fcgc *::before,
	.fcgc *::after { transition: none !important; }
}
