/* Pages Légales Auto — bandeau de consentement.
   Sélecteurs volontairement spécifiques : certains thèmes forcent
   un fond de couleur sur TOUS les <button> via !important. */

#pla-cc[hidden] { display: none; }

#pla-cc {
	position: fixed;
	inset: 0;
	z-index: 999999;
	pointer-events: none;
	font-size: 15px;
	line-height: 1.5;
	color: #1a1a1a;
}

#pla-cc .pla-cc__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .45);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s;
}

#pla-cc.pla-cc--center .pla-cc__overlay,
#pla-cc.pla-cc--prefs .pla-cc__overlay {
	opacity: 1;
	pointer-events: auto;
}

/* ------------------------------------------------------------- bandeau */

#pla-cc .pla-cc__banner {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	width: min(1100px, calc(100% - 32px));
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
	padding: 18px 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 20px;
	pointer-events: auto;
}

#pla-cc.pla-cc--center .pla-cc__banner {
	top: 50%;
	bottom: auto;
	transform: translate(-50%, -50%);
	width: min(560px, calc(100% - 32px));
	display: block;
}

#pla-cc .pla-cc__body { flex: 1 1 420px; min-width: 260px; }

#pla-cc .pla-cc__title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
	color: #111;
}

#pla-cc .pla-cc__text {
	margin: 0;
	font-size: 14px;
	color: #333;
}

#pla-cc .pla-cc__text a { color: var(--pla-accent, #1e73be); }

#pla-cc .pla-cc__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

#pla-cc.pla-cc--center .pla-cc__actions { margin-top: 16px; }

/* ------------------------------------------------------------- boutons */

#pla-cc .pla-cc__actions button.pla-cc__btn,
#pla-cc .pla-cc__pfoot button.pla-cc__btn,
.pla-embed .pla-embed__box button.pla-embed__btn {
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid #c9c9c9;
	background: #fff !important;
	background-image: none !important;
	color: #222 !important;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	padding: 11px 16px;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	min-height: 0;
	white-space: nowrap;
}

#pla-cc .pla-cc__actions button.pla-cc__btn--main,
#pla-cc .pla-cc__pfoot button.pla-cc__btn--main,
.pla-embed .pla-embed__box button.pla-embed__btn {
	background: var(--pla-accent, #1e73be) !important;
	border-color: var(--pla-accent, #1e73be);
	color: #fff !important;
}

#pla-cc button.pla-cc__btn:hover,
.pla-embed button.pla-embed__btn:hover { filter: brightness(.94); }

#pla-cc button.pla-cc__btn:focus-visible,
.pla-embed button.pla-embed__btn:focus-visible {
	outline: 2px solid var(--pla-accent, #1e73be);
	outline-offset: 2px;
}

/* --------------------------------------------------- panneau détaillé */

#pla-cc .pla-cc__panel {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(620px, calc(100% - 24px));
	max-height: min(85vh, 720px);
	overflow: auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
	pointer-events: auto;
	-webkit-overflow-scrolling: touch;
}

#pla-cc .pla-cc__panel[hidden] { display: none; }

#pla-cc .pla-cc__phead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border-bottom: 1px solid #eee;
	position: sticky;
	top: 0;
	background: #fff;
}

#pla-cc button.pla-cc__close {
	appearance: none;
	-webkit-appearance: none;
	background: transparent !important;
	background-image: none !important;
	border: 0;
	color: #666 !important;
	font-size: 26px;
	line-height: 1;
	padding: 0 4px;
	cursor: pointer;
	box-shadow: none;
}

#pla-cc .pla-cc__pbody { padding: 6px 20px 12px; }

#pla-cc .pla-cc__cat { border-bottom: 1px solid #f0f0f0; }
#pla-cc .pla-cc__cat:last-child { border-bottom: 0; }

#pla-cc .pla-cc__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	margin: 0;
	cursor: pointer;
	font-size: 14px;
}

#pla-cc .pla-cc__row strong { display: block; color: #111; }

#pla-cc .pla-cc__d {
	display: block;
	margin-top: 3px;
	font-size: 13px;
	color: #555;
}

#pla-cc .pla-cc__row input[type="checkbox"] {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--pla-accent, #1e73be);
	cursor: pointer;
}

#pla-cc .pla-cc__row input[disabled] { opacity: .5; cursor: not-allowed; }

#pla-cc .pla-cc__pfoot {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	padding: 14px 20px;
	border-top: 1px solid #eee;
	position: sticky;
	bottom: 0;
	background: #fff;
}

/* ------------------------------------------------------ bouton flottant */

button.pla-cc__fab {
	position: fixed;
	left: 14px;
	bottom: 14px;
	z-index: 99998;
	width: 40px;
	height: 40px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, .12);
	background: #fff !important;
	background-image: none !important;
	color: #444 !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
	cursor: pointer;
	opacity: .75;
}

button.pla-cc__fab:hover { opacity: 1; }

/* ------------------------------------------------- contenus externes */

.pla-embed {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 220px;
	padding: 24px 18px;
	border: 1px dashed rgba(128, 128, 128, .5);
	border-radius: 10px;
	background: rgba(128, 128, 128, .06);
	text-align: center;
}

.pla-embed .pla-embed__box { display: block; max-width: 460px; }
.pla-embed .pla-embed__t { display: block; margin: 0 0 6px; font-weight: 700; font-size: 15px; }
.pla-embed .pla-embed__d { display: block; margin: 0 0 12px; font-size: 14px; opacity: .8; }
.pla-embed .pla-embed__a { display: block; }
.pla-embed .pla-embed__link { font-size: 13px; margin-left: 8px; }

@media (max-width: 640px) {
	#pla-cc .pla-cc__banner {
		bottom: 0;
		border-radius: 12px 12px 0 0;
		width: 100%;
		max-height: 85vh;
		overflow: auto;
	}
	#pla-cc .pla-cc__actions { width: 100%; }
	#pla-cc .pla-cc__actions button.pla-cc__btn { flex: 1 1 100%; }
	#pla-cc .pla-cc__pfoot button.pla-cc__btn { flex: 1 1 100%; }
	button.pla-cc__fab { bottom: 10px; left: 10px; }
}
