/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
	--dst-primary:      #d7006d;
	--dst-primary-dark: #b5005b;
	--dst-bg:           #ffffff;
	--dst-text:         #1a1a1a;
	--dst-muted:        #555555;
	--dst-border:       #e5e5e5;
	--dst-toggle-off:   #cccccc;
	--dst-always:       #27ae60;
	--dst-radius:       8px;
	--dst-z:            999999;
}

/* ── Bannière principale ────────────────────────────────────────────────── */
#dst-consent-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--dst-bg);
	border-top: 3px solid var(--dst-primary);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, .14);
	z-index: var(--dst-z);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--dst-text);
	transform: translateY(100%);
	transition: transform .3s cubic-bezier(.4, 0, .2, 1);
	max-height: 90vh;
	overflow-y: auto;
}

#dst-consent-banner.dst-open {
	transform: translateY(0);
}

.dst-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 20px;
}

/* ── Vue simple ─────────────────────────────────────────────────────────── */
.dst-view-simple {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.dst-intro {
	margin: 0;
	color: var(--dst-muted);
}

.dst-link-btn {
	background: none;
	border: none;
	padding: 0;
	color: var(--dst-primary);
	cursor: pointer;
	font-size: inherit;
	text-decoration: underline;
	font-family: inherit;
}

.dst-link-btn:hover {
	color: var(--dst-primary-dark);
}

.dst-intro-wrap {
	flex: 1;
	min-width: 200px;
}

.dst-refuse-link {
	background: none;
	border: none;
	padding: 0;
	color: var(--dst-muted);
	cursor: pointer;
	font-size: 12px;
	font-family: inherit;
	text-decoration: underline;
	opacity: .65;
	margin-top: 6px;
	display: inline-block;
}
.dst-refuse-link:hover {
	opacity: 1;
}

.dst-simple-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
}

/* ── Vue détaillée ──────────────────────────────────────────────────────── */
.dst-view-detail {
	display: none;
}

#dst-consent-banner.dst-detail .dst-view-simple { display: none; }
#dst-consent-banner.dst-detail .dst-view-detail { display: block; }

.dst-detail-title {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 16px;
}

.dst-categories {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 20px;
}

.dst-cat {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 14px;
	border: 1px solid var(--dst-border);
	border-radius: var(--dst-radius);
}

.dst-cat-info {
	flex: 1;
}

.dst-cat-name {
	font-weight: 600;
	font-size: 13px;
	margin: 0 0 2px;
}

.dst-cat-desc {
	color: var(--dst-muted);
	font-size: 12px;
	margin: 0;
}

.dst-always-on {
	font-size: 11px;
	font-weight: 700;
	color: var(--dst-always);
	background: rgba(39, 174, 96, .1);
	border-radius: 4px;
	padding: 3px 9px;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ── Toggle ─────────────────────────────────────────────────────────────── */
.dst-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
	cursor: pointer;
}

.dst-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.dst-thumb {
	position: absolute;
	inset: 0;
	background: var(--dst-toggle-off);
	border-radius: 12px;
	transition: background .2s;
}

.dst-thumb::before {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
	transition: transform .2s;
}

.dst-toggle input:checked + .dst-thumb {
	background: var(--dst-primary);
}

.dst-toggle input:checked + .dst-thumb::before {
	transform: translateX(20px);
}

.dst-toggle input:focus-visible + .dst-thumb {
	outline: 2px solid var(--dst-primary);
	outline-offset: 2px;
}

/* ── Boutons ─────────────────────────────────────────────────────────────── */
.dst-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 18px;
	border-radius: var(--dst-radius);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border: 2px solid transparent;
	transition: background .15s, border-color .15s, color .15s;
	white-space: nowrap;
	font-family: inherit;
	line-height: 1;
}

.dst-btn-primary {
	background: var(--dst-primary);
	color: #fff;
	border-color: var(--dst-primary);
}
.dst-btn-primary:hover {
	background: var(--dst-primary-dark);
	border-color: var(--dst-primary-dark);
}

.dst-btn-ghost {
	background: transparent;
	color: var(--dst-muted);
	border-color: var(--dst-border);
}
.dst-btn-ghost:hover {
	border-color: #aaa;
	color: var(--dst-text);
}

.dst-btn-outline {
	background: transparent;
	color: var(--dst-primary);
	border-color: var(--dst-primary);
}
.dst-btn-outline:hover {
	background: var(--dst-primary);
	color: #fff;
}

.dst-detail-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
	flex-wrap: wrap;
}

/* ── Overlay clic-en-dehors ─────────────────────────────────────────────── */
#dst-consent-overlay {
	position: fixed;
	inset: 0;
	z-index: calc(var(--dst-z) - 2);
	cursor: pointer;
	background: transparent;
}

/* ── Bouton flottant "gérer les cookies" ────────────────────────────────── */
#dst-manage-btn {
	position: fixed;
	bottom: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--dst-primary);
	color: #fff;
	border: none;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
	z-index: calc(var(--dst-z) - 1);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .15s, opacity .2s;
	padding: 0;
}

#dst-manage-btn:hover {
	transform: scale(1.1);
}

/* Masquer le bouton flottant quand la bannière est ouverte */
#dst-consent-banner.dst-open + #dst-manage-btn {
	opacity: 0;
	pointer-events: none;
}

/* ── Placeholder YouTube ─────────────────────────────────────────────────── */
.dst-yt-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #111;
	min-height: 200px;
	border-radius: 4px;
	overflow: hidden;
	width: 100%;
}

.dst-yt-inner {
	text-align: center;
	color: #fff;
	padding: 24px 16px;
}

.dst-yt-inner svg {
	display: block;
	margin: 0 auto 14px;
	opacity: .8;
}

.dst-yt-title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 6px;
}

.dst-yt-reason {
	font-size: 12px;
	opacity: .7;
	margin: 0;
}

.dst-yt-btn {
	margin-top: 14px;
	padding: 8px 20px;
	background: #ff0000;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: background .15s;
}

.dst-yt-btn:hover {
	background: #cc0000;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
	.dst-view-simple {
		flex-direction: column;
		align-items: stretch;
	}
	.dst-simple-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}
	.dst-detail-actions {
		flex-direction: column;
	}
	.dst-detail-actions .dst-btn {
		width: 100%;
		justify-content: center;
	}
	.dst-cat {
		flex-wrap: wrap;
	}
}
