/* ABC Push – front */
:root {
	--abcp-primary: #1d4ed8;
	--abcp-on-primary: #fff;
	--abcp-bg: #fff;
	--abcp-fg: #111827;
	--abcp-muted: #6b7280;
	--abcp-line: #e5e7eb;
	--abcp-soft: #f3f4f6;
	--abcp-shadow: 0 12px 40px rgba(17, 24, 39, .18);
}
@media (prefers-color-scheme: dark) {
	:root {
		--abcp-bg: #1f2937;
		--abcp-fg: #f9fafb;
		--abcp-muted: #9ca3af;
		--abcp-line: #374151;
		--abcp-soft: #111827;
		--abcp-shadow: 0 12px 40px rgba(0, 0, 0, .5);
	}
}

.abcp-unsupported .abcp-inline-btn { display: none !important; }

/* Cloche */
.abcp-bell {
	position: fixed;
	bottom: 20px;
	z-index: 99998;
	width: 52px;
	height: 52px;
	padding: 13px;
	border: 0;
	border-radius: 50%;
	background: var(--abcp-primary);
	color: var(--abcp-on-primary);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
	cursor: pointer;
	transition: transform .2s ease, opacity .2s ease;
	line-height: 0;
}
.abcp-bell.abcp-right { right: 20px; }
.abcp-bell.abcp-left { left: 20px; }
.abcp-bell:hover { transform: scale(1.06); }
.abcp-bell:focus-visible { outline: 3px solid var(--abcp-primary); outline-offset: 3px; }
.abcp-bell svg { width: 26px; height: 26px; }
.abcp-bell:not(.is-on) svg { animation: abcp-ring 3s ease-in-out 2s 2; transform-origin: 50% 10%; }
.abcp-bell.is-on { width: 44px; height: 44px; padding: 11px; opacity: .75; }
.abcp-bell.is-on:hover { opacity: 1; }
.abcp-bell.is-on svg { width: 22px; height: 22px; }
.abcp-dot {
	position: absolute; top: -2px; right: -2px;
	width: 18px; height: 18px; padding: 2px;
	border-radius: 50%; background: #16a34a; color: #fff;
	border: 2px solid var(--abcp-bg);
}
.abcp-dot svg { width: 10px !important; height: 10px !important; display: block; }
@keyframes abcp-ring {
	0%, 20%, 100% { transform: rotate(0); }
	4% { transform: rotate(14deg); } 8% { transform: rotate(-12deg); }
	12% { transform: rotate(8deg); } 16% { transform: rotate(-4deg); }
}
@media (max-width: 640px) {
	.abcp-bell.abcp-hide-mobile { display: none; }
	.abcp-bell { bottom: 16px; }
	.abcp-bell.abcp-right { right: 16px; }
	.abcp-bell.abcp-left { left: 16px; }
}

/* Panneau */
.abcp-panel {
	position: fixed;
	bottom: 86px;
	z-index: 99999;
	width: 360px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 110px);
	overflow-y: auto;
	padding: 20px;
	border-radius: 16px;
	background: var(--abcp-bg);
	color: var(--abcp-fg);
	box-shadow: var(--abcp-shadow);
	font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .22s ease, transform .22s ease;
	box-sizing: border-box;
}
.abcp-panel *, .abcp-panel *::before, .abcp-panel *::after { box-sizing: border-box; }
.abcp-panel.abcp-right { right: 20px; }
.abcp-panel.abcp-left { left: 20px; }
.abcp-panel.is-open { opacity: 1; transform: none; }
.abcp-panel[hidden] { display: none; }

.abcp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.abcp-head strong { flex: 1; font-size: 17px; line-height: 1.3; }
.abcp-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }
.abcp-x {
	flex: none; width: 32px; height: 32px; padding: 0;
	border: 0; border-radius: 50%; background: transparent;
	color: var(--abcp-muted); font-size: 24px; line-height: 1; cursor: pointer;
}
.abcp-x:hover { background: var(--abcp-soft); color: var(--abcp-fg); }
.abcp-panel p { margin: 0 0 12px; color: var(--abcp-muted); }

.abcp-cats { margin: 4px 0 12px; padding: 0; border: 0; }
.abcp-cats legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: var(--abcp-fg); }
.abcp-cats label {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 10px; margin-bottom: 6px;
	border: 1px solid var(--abcp-line); border-radius: 10px;
	cursor: pointer; font-size: 14px;
}
.abcp-cats input { width: 18px; height: 18px; margin: 0; accent-color: var(--abcp-primary); }

.abcp-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.abcp-btn {
	padding: 10px 16px;
	border: 1px solid var(--abcp-primary); border-radius: 10px;
	background: var(--abcp-primary); color: var(--abcp-on-primary);
	font: 600 14px/1.2 inherit; font-family: inherit; cursor: pointer;
}
.abcp-btn:disabled { opacity: .6; cursor: wait; }
.abcp-btn.abcp-ghost { background: transparent; color: var(--abcp-fg); border-color: var(--abcp-line); }
.abcp-link {
	display: block; margin: 12px 0 0; padding: 0;
	border: 0; background: none; color: var(--abcp-muted);
	font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer;
}
.abcp-msg { min-height: 0; margin: 0 0 8px !important; font-size: 13px; }
.abcp-msg:empty { display: none; }
.abcp-msg.is-error { color: #dc2626 !important; }
.abcp-msg.is-ok { color: #16a34a !important; }

.abcp-steps { margin: 0; padding-left: 22px; }
.abcp-steps li { margin-bottom: 8px; }
.abcp-share { width: 20px; height: 20px; vertical-align: -4px; color: #007aff; }

@media (max-width: 640px) {
	.abcp-panel,
	.abcp-panel.abcp-left,
	.abcp-panel.abcp-right {
		left: 0; right: 0; bottom: 0;
		width: 100%; max-width: 100%;
		border-radius: 18px 18px 0 0;
		padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
		transform: translateY(100%);
	}
	.abcp-panel.is-open { transform: none; }
	.abcp-actions .abcp-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.abcp-panel, .abcp-bell { transition: none; }
	.abcp-bell svg { animation: none !important; }
}

/* Bouton du shortcode */
.abcp-inline-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 18px; border: 0; border-radius: 999px;
	background: var(--abcp-primary); color: var(--abcp-on-primary);
	font: 600 15px/1.2 inherit; font-family: inherit; cursor: pointer;
}
.abcp-inline-btn:hover { filter: brightness(1.08); }
