/* FCA Consent — bandeau discret en bas de page.
   Personnalisable par le thème via les variables --fcc-* (définies sur .fcc). */

.fcc {
	--fcc-bg: #ffffff;
	--fcc-fg: #1f2933;
	--fcc-muted: #5b6673;
	--fcc-border: #e3e7eb;
	--fcc-accent: #1f2933;
	--fcc-accent-fg: #ffffff;
	--fcc-radius: 6px;
	--fcc-font: inherit;
	--fcc-shadow: 0 -8px 30px -12px rgba(0, 0, 0, 0.25);
	--fcc-z: 9990;

	position: fixed;
	inset: auto 0 0 0;
	z-index: var(--fcc-z);
	font-family: var(--fcc-font);
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--fcc-fg);
}
.fcc[hidden] { display: none; }

/* Barre */
.fcc__bar {
	background: var(--fcc-bg);
	border-top: 1px solid var(--fcc-border);
	box-shadow: var(--fcc-shadow);
	padding: 0.75rem 1.25rem;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	transform: translateY(100%);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.fcc.is-visible .fcc__bar { transform: translateY(0); }
.fcc__body { flex: 1 1 32rem; min-width: 0; }
.fcc__title { margin: 0 0 0.125rem; font-weight: 600; font-size: 0.875rem; }
.fcc__text { margin: 0; color: var(--fcc-muted); }
.fcc__text a, .fcc__more { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.fcc__more { margin-left: 0.35em; white-space: nowrap; }
.fcc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-left: auto; }

/* Boutons */
.fcc__btn {
	font: inherit; font-weight: 600; font-size: 0.8125rem; line-height: 1;
	padding: 0.65rem 1rem; border-radius: var(--fcc-radius); cursor: pointer;
	border: 1px solid var(--fcc-accent); background: transparent; color: var(--fcc-accent);
	transition: background-color 0.15s, color 0.15s, opacity 0.15s;
}
.fcc__btn:hover { background: color-mix(in srgb, var(--fcc-accent) 10%, transparent); }
.fcc__btn:focus-visible { outline: 2px solid var(--fcc-accent); outline-offset: 2px; }
.fcc__btn--primary { background: var(--fcc-accent); color: var(--fcc-accent-fg); }
.fcc__btn--primary:hover { opacity: 0.9; background: var(--fcc-accent); }
.fcc__btn--secondary { }
.fcc__btn--link { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; padding-inline: 0.5rem; }
.fcc__btn--link:hover { background: transparent; opacity: 0.8; }

/* Panneau de personnalisation */
.fcc.is-panel::before { content: ""; position: fixed; inset: 0; background: rgba(15, 23, 32, 0.45); }
.fcc.is-panel .fcc__bar { visibility: hidden; }
.fcc__panel {
	position: fixed; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 1rem;
}
.fcc__panel[hidden] { display: none; }
.fcc__panel-inner {
	position: relative; width: 100%; max-width: 34rem; max-height: calc(100vh - 2rem); overflow: auto;
	background: var(--fcc-bg); color: var(--fcc-fg); border: 1px solid var(--fcc-border); border-radius: var(--fcc-radius);
	padding: 1.5rem; box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.45);
}
.fcc__panel-title { margin: 0 0 0.5rem; font-size: 1.125rem; font-weight: 600; line-height: 1.3; }
.fcc__panel-text { margin: 0 0 1rem; color: var(--fcc-muted); }
.fcc__cats { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fcc-border); }
.fcc__cat { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.875rem 0; border-bottom: 1px solid var(--fcc-border); }
.fcc__cat-name { display: block; font-weight: 600; font-size: 0.875rem; }
.fcc__cat-desc { display: block; color: var(--fcc-muted); margin-top: 0.125rem; }
.fcc__always { flex-shrink: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fcc-muted); }

/* Interrupteur */
.fcc__switch { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; cursor: pointer; }
.fcc__switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fcc__slider { position: relative; flex-shrink: 0; width: 2.5rem; height: 1.4rem; border-radius: 999px; background: #c8ced4; transition: background-color 0.2s; }
.fcc__slider::after { content: ""; position: absolute; top: 0.15rem; left: 0.15rem; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s; }
.fcc__switch input:checked + .fcc__slider { background: var(--fcc-accent); }
.fcc__switch input:checked + .fcc__slider::after { transform: translateX(1.1rem); }
.fcc__switch input:focus-visible + .fcc__slider { outline: 2px solid var(--fcc-accent); outline-offset: 2px; }

.fcc__panel-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem; margin-top: 1.25rem; }
.fcc__close { position: absolute; top: 0.5rem; right: 0.5rem; width: 2rem; height: 2rem; border: 0; background: transparent; color: var(--fcc-muted); font-size: 1.5rem; line-height: 1; cursor: pointer; border-radius: var(--fcc-radius); }
.fcc__close:hover { color: var(--fcc-fg); }
.fcc__close:focus-visible { outline: 2px solid var(--fcc-accent); }

/* Mobile */
@media (max-width: 640px) {
	.fcc__bar { padding: 0.75rem 1rem; }
	.fcc__actions { width: 100%; margin-left: 0; }
	.fcc__actions .fcc__btn--secondary, .fcc__actions .fcc__btn--primary { flex: 1 1 0; }
	.fcc__panel { padding: 0; align-items: flex-end; }
	.fcc__panel-inner { max-width: none; border-radius: var(--fcc-radius) var(--fcc-radius) 0 0; max-height: 92vh; }
}

@media (prefers-reduced-motion: reduce) {
	.fcc__bar, .fcc__slider, .fcc__slider::after { transition: none; }
}
