/* PXD Cookie Consent — styles bannière + panneau de préférences */

:root {
	--pxd-cc-accent: #1a73e8;
	--pxd-cc-bg: #ffffff;
	--pxd-cc-fg: #1f2329;
	--pxd-cc-muted: #5b6470;
	--pxd-cc-border: #e6e8eb;
	--pxd-cc-radius: 14px;
	--pxd-cc-shadow: 0 8px 30px rgba(0, 0, 0, .18);
	--pxd-cc-z: 999990;
}

/* ---------- Bannière ---------- */
.pxd-cc-banner {
	position: fixed;
	left: 50%;
	transform: translateX(-50%);
	width: min(1080px, calc(100% - 32px));
	background: var(--pxd-cc-bg);
	color: var(--pxd-cc-fg);
	border: 1px solid var(--pxd-cc-border);
	border-radius: var(--pxd-cc-radius);
	box-shadow: var(--pxd-cc-shadow);
	z-index: var(--pxd-cc-z);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	animation: pxd-cc-in .35s ease;
}
.pxd-cc--bottom { bottom: 16px; }

@keyframes pxd-cc-in {
	from { opacity: 0; transform: translate(-50%, 12px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

.pxd-cc-banner__inner {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 18px 22px;
	flex-wrap: wrap;
}
.pxd-cc-banner__text { flex: 1 1 380px; min-width: 260px; }
.pxd-cc-banner__title { display: block; font-size: 15px; margin-bottom: 4px; }
.pxd-cc-banner__text p { margin: 0; color: var(--pxd-cc-muted); }
.pxd-cc-banner__text a { color: var(--pxd-cc-accent); text-decoration: underline; }

.pxd-cc-banner__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

/* ---------- Boutons ---------- */
.pxd-cc-btn {
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	padding: 11px 18px;
	border-radius: 10px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: all .15s ease;
	white-space: nowrap;
}
.pxd-cc-btn--solid {
	background: var(--pxd-cc-accent);
	color: #fff;
}
.pxd-cc-btn--solid:hover { filter: brightness(.93); }
.pxd-cc-btn--ghost {
	background: transparent;
	color: var(--pxd-cc-fg);
	border-color: var(--pxd-cc-border);
}
.pxd-cc-btn--ghost:hover { background: rgba(0, 0, 0, .04); }
.pxd-cc-btn:focus-visible { outline: 2px solid var(--pxd-cc-accent); outline-offset: 2px; }

/* ---------- Modal préférences ---------- */
.pxd-cc-modal {
	position: fixed;
	inset: 0;
	z-index: calc(var(--pxd-cc-z) + 5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.pxd-cc-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 18, 22, .55);
}
.pxd-cc-modal__box {
	position: relative;
	background: var(--pxd-cc-bg);
	color: var(--pxd-cc-fg);
	width: min(560px, 100%);
	max-height: 90vh;
	overflow-y: auto;
	border-radius: var(--pxd-cc-radius);
	box-shadow: var(--pxd-cc-shadow);
	padding: 24px;
	font-size: 14px;
	line-height: 1.5;
	animation: pxd-cc-pop .25s ease;
}
@keyframes pxd-cc-pop {
	from { opacity: 0; transform: scale(.97); }
	to   { opacity: 1; transform: scale(1); }
}
.pxd-cc-modal__title { margin: 0 0 18px; font-size: 20px; }

/* ---------- Catégories ---------- */
.pxd-cc-cat {
	padding: 14px 0;
	border-top: 1px solid var(--pxd-cc-border);
}
.pxd-cc-cat:first-of-type { border-top: none; }
.pxd-cc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.pxd-cc-cat__name { font-weight: 600; font-size: 15px; }
.pxd-cc-cat__always { font-size: 12px; color: var(--pxd-cc-accent); font-weight: 600; }
.pxd-cc-cat__desc { margin: 6px 0 0; color: var(--pxd-cc-muted); }

.pxd-cc-modal__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 22px;
}
.pxd-cc-modal__actions .pxd-cc-btn { flex: 1 1 auto; text-align: center; }

/* ---------- Interrupteur ---------- */
.pxd-cc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.pxd-cc-switch input { opacity: 0; width: 0; height: 0; }
.pxd-cc-switch__slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #cbd2da;
	border-radius: 999px;
	transition: background .2s ease;
}
.pxd-cc-switch__slider::before {
	content: "";
	position: absolute;
	height: 18px; width: 18px;
	left: 3px; top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s ease;
}
.pxd-cc-switch input:checked + .pxd-cc-switch__slider { background: var(--pxd-cc-accent); }
.pxd-cc-switch input:checked + .pxd-cc-switch__slider::before { transform: translateX(20px); }
.pxd-cc-switch input:focus-visible + .pxd-cc-switch__slider { outline: 2px solid var(--pxd-cc-accent); outline-offset: 2px; }

/* ---------- Lien "Gestion des cookies" (footer) ---------- */
/* Volontairement non stylé : il hérite du style de ton footer. */
.pxd-cc-open { cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.pxd-cc-banner__inner { padding: 16px; }
	.pxd-cc-banner__actions { width: 100%; }
	.pxd-cc-banner__actions .pxd-cc-btn { flex: 1 1 auto; text-align: center; }
}
