/* Consentement Cookies */

.ccs-ui [hidden],
.ccs-ui[hidden] {
	display: none !important;
}

html.ccs-is-open {
	overflow: hidden;
}

/* ---------- Fenêtre ---------- */

.ccs-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 16px;
	background: rgba(12, 14, 24, 0.55);
}

.ccs-overlay .ccs-dialog {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 34rem;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	padding: 1rem 1.75rem 1.5rem;
	background: #fff;
	color: #1f2430;
	border-top: 6px solid var(--ccs-color, #0A0337);
	border-radius: 10px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
	font-size: 16px;
	line-height: 1.55;
	text-align: left;
	animation: ccs-in 0.18s ease-out;
}

.ccs-overlay .ccs-dialog:focus {
	outline: none;
}

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

.ccs-overlay button.ccs-skip,
.ccs-overlay button.ccs-skip:hover,
.ccs-overlay button.ccs-skip:focus {
	display: block;
	margin: 0 0 0.25rem auto;
	padding: 0.35rem 0.25rem;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: #4a5060;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 400;
	text-decoration: underline;
	text-transform: none;
	white-space: normal;
	cursor: pointer;
}

.ccs-overlay button.ccs-skip:hover {
	color: var(--ccs-color, #0A0337);
}

.ccs-overlay .ccs-title {
	margin: 0 0 0.6rem;
	padding: 0;
	color: var(--ccs-color, #0A0337);
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.25;
}

.ccs-overlay .ccs-message {
	margin: 0 0 0.5rem;
}

.ccs-overlay .ccs-policy {
	margin: 0;
	font-size: 0.9rem;
}

.ccs-overlay .ccs-policy a {
	color: var(--ccs-color, #0A0337);
	text-decoration: underline;
}

/* ---------- Choix par catégorie ---------- */

.ccs-overlay .ccs-cats {
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid #e3e5ec;
}

.ccs-overlay .ccs-cat {
	margin: 0;
	padding: 0.8rem 0;
	border-bottom: 1px solid #e3e5ec;
}

.ccs-overlay .ccs-cat__head,
.ccs-overlay .ccs-switch {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.ccs-overlay .ccs-switch {
	position: relative;
	width: 100%;
	margin: 0;
	cursor: pointer;
}

.ccs-overlay .ccs-cat__label {
	font-weight: 600;
}

.ccs-overlay .ccs-cat__always {
	color: #4a5060;
	font-size: 0.85rem;
}

.ccs-overlay .ccs-cat__desc {
	margin: 0.3rem 0 0;
	color: #4a5060;
	font-size: 0.9rem;
}

.ccs-overlay .ccs-switch input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.ccs-overlay .ccs-switch__track {
	position: relative;
	order: 2;
	flex: 0 0 auto;
	width: 44px;
	height: 24px;
	border-radius: 12px;
	background: #b9bdc9;
	transition: background 0.15s;
}

.ccs-overlay .ccs-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.15s;
}

.ccs-overlay .ccs-switch input:checked + .ccs-switch__track {
	background: var(--ccs-color, #0A0337);
}

.ccs-overlay .ccs-switch input:checked + .ccs-switch__track::after {
	transform: translateX(20px);
}

.ccs-overlay .ccs-switch input:focus-visible + .ccs-switch__track {
	outline: 3px solid var(--ccs-color, #0A0337);
	outline-offset: 2px;
}

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

.ccs-overlay .ccs-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-top: 1.25rem;
}

.ccs-ui button.ccs-btn {
	flex: 1 1 9rem;
	box-sizing: border-box;
	min-height: 44px;
	margin: 0;
	padding: 0.6rem 1rem;
	border: 2px solid var(--ccs-color, #0A0337);
	border-radius: 6px;
	box-shadow: none;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	white-space: normal;
	cursor: pointer;
	transition: none;
}

.ccs-ui button.ccs-btn--main,
.ccs-ui button.ccs-btn--main:focus {
	background: var(--ccs-color, #0A0337);
	color: #fff;
}

.ccs-ui button.ccs-btn--main:hover {
	background: var(--ccs-color, #0A0337);
	color: #fff;
	opacity: 0.88;
}

.ccs-ui button.ccs-btn--ghost,
.ccs-ui button.ccs-btn--ghost:focus {
	background: #fff;
	color: var(--ccs-color, #0A0337);
}

.ccs-ui button.ccs-btn--ghost:hover {
	background: #eef0f6;
	color: var(--ccs-color, #0A0337);
}

.ccs-ui button.ccs-btn:focus-visible,
.ccs-overlay button.ccs-skip:focus-visible {
	outline: 3px solid var(--ccs-color, #0A0337);
	outline-offset: 2px;
}

/* ---------- Contenu externe bloqué ---------- */

.ccs-ui.ccs-embed {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 220px;
	aspect-ratio: 16 / 9;
	padding: 1.25rem;
	background: #f3f4f8;
	border: 1px solid #dcdfe8;
	border-radius: 8px;
	color: #1f2430;
	font-size: 0.95rem;
	line-height: 1.5;
	text-align: center;
}

.ccs-ui .ccs-embed__box {
	max-width: 28rem;
}

.ccs-ui .ccs-embed__text {
	margin: 0 0 0.9rem;
}

.ccs-ui.ccs-embed button.ccs-btn,
.ccs-ui.ccs-note button.ccs-btn {
	flex: none;
}

.ccs-ui .ccs-embed__link {
	display: block;
	margin-top: 0.6rem;
	color: inherit;
	font-size: 0.85rem;
	text-decoration: underline;
}

/* ---------- Message au-dessus des formulaires reCAPTCHA ---------- */

.ccs-ui.ccs-note {
	box-sizing: border-box;
	margin: 0 0 1rem;
	padding: 0.9rem 1rem;
	background: #f3f4f8;
	border-left: 4px solid var(--ccs-color, #0A0337);
	border-radius: 4px;
	color: #1f2430;
	font-size: 0.95rem;
	line-height: 1.5;
}

.ccs-ui.ccs-note p {
	margin: 0 0 0.6rem;
}

/* ---------- Petits écrans et mouvements réduits ---------- */

@media (max-width: 480px) {
	.ccs-overlay .ccs-dialog {
		padding: 0.75rem 1.1rem 1.25rem;
	}
	.ccs-overlay .ccs-actions button.ccs-btn {
		flex-basis: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ccs-overlay .ccs-dialog {
		animation: none;
	}
	.ccs-overlay .ccs-switch__track,
	.ccs-overlay .ccs-switch__track::after {
		transition: none;
	}
}
