/* Top 99 Recettes — Promo Livre : styles frontend (non-intrusifs) */

#top99-promo-root {
	--top99-accent: #d9762f;
	--top99-accent-dark: #a84e1c;
	--top99-ink: #2b2420;
	--top99-cream: #fbf5ea;
	--top99-muted: #786a5c;
	font-family: Georgia, 'Cambria', 'Times New Roman', serif;
}
#top99-promo-root * { box-sizing: border-box; }

/* ---------- Bouton flottant ---------- */
.top99-fab {
	position: fixed;
	bottom: 22px;
	z-index: 999998;
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--top99-cream);
	border: 1px solid rgba(0,0,0,0.08);
	border-radius: 999px;
	padding: 6px 18px 6px 6px;
	box-shadow: 0 10px 30px rgba(20,14,8,0.22);
	cursor: pointer;
	opacity: 0;
	transform: translateY(14px) scale(0.96);
	transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s ease;
	max-width: calc(100vw - 32px);
}
.top99-pos-right .top99-fab { right: 22px; }
.top99-pos-left .top99-fab { left: 22px; }

#top99-promo-root.top99-visible .top99-fab {
	opacity: 1;
	transform: translateY(0) scale(1);
}
.top99-fab:hover { box-shadow: 0 14px 36px rgba(20,14,8,0.3); }

.top99-fab-badge {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: block;
	flex-shrink: 0;
}
.top99-fab-text {
	font-size: 0.92rem;
	color: var(--top99-ink);
	font-weight: bold;
	white-space: nowrap;
}
.top99-fab-close {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid rgba(0,0,0,0.12);
	color: var(--top99-muted);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.top99-fab-close:hover { color: var(--top99-accent-dark); }

@media (max-width: 480px) {
	.top99-fab-text { display: none; }
	.top99-fab { padding: 6px; }
}

/* ---------- Bandeau bas de page ---------- */
.top99-bar {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 999997;
	background: #14100b;
	opacity: 0;
	transform: translateY(100%);
	transition: opacity 0.5s ease, transform 0.5s ease;
	max-height: 70px;
	overflow: hidden;
	box-shadow: 0 -6px 20px rgba(0,0,0,0.25);
}
#top99-promo-root.top99-visible .top99-bar {
	opacity: 1;
	transform: translateY(0);
}
.top99-bar-img {
	display: block;
	width: 100%;
	height: 70px;
	object-fit: cover;
	object-position: center 30%;
	cursor: pointer;
}
.top99-bar-close {
	position: absolute;
	top: 6px;
	right: 10px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: rgba(0,0,0,0.55);
	border: none;
	color: #fff;
	font-size: 16px;
	cursor: pointer;
	z-index: 2;
}

/* ---------- Popover de capture email ---------- */
.top99-popover {
	position: fixed;
	bottom: 92px;
	z-index: 999999;
	width: 320px;
	max-width: calc(100vw - 32px);
	background: var(--top99-cream);
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(20,14,8,0.35);
	padding: 22px 22px 18px;
	opacity: 0;
	transform: translateY(10px) scale(0.97);
	transition: opacity 0.25s ease, transform 0.25s ease;
}
.top99-pos-right .top99-popover { right: 22px; }
.top99-pos-left .top99-popover { left: 22px; }
.top99-popover.top99-open {
	opacity: 1;
	transform: translateY(0) scale(1);
}
.top99-popover[hidden] { display: none; }

.top99-popover-badge {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	display: block;
	margin: 0 auto 10px;
}
.top99-popover-title {
	margin: 0 0 6px;
	font-size: 1.15rem;
	text-align: center;
	color: var(--top99-ink);
}
.top99-popover-text {
	margin: 0 0 14px;
	font-size: 0.82rem;
	line-height: 1.5;
	text-align: center;
	color: var(--top99-muted);
	font-family: 'Segoe UI', system-ui, sans-serif;
}
.top99-popover-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 18px;
	color: var(--top99-muted);
	cursor: pointer;
	line-height: 1;
}
.top99-popover-close:hover { color: var(--top99-accent-dark); }

#top99-email {
	width: 100%;
	padding: 11px 14px;
	border-radius: 8px;
	border: 1px solid rgba(0,0,0,0.15);
	font-family: 'Segoe UI', system-ui, sans-serif;
	font-size: 0.9rem;
	margin-bottom: 10px;
}
#top99-email:focus {
	outline: 2px solid var(--top99-accent);
	outline-offset: 1px;
	border-color: var(--top99-accent);
}
.top99-submit {
	width: 100%;
	padding: 11px 14px;
	border-radius: 8px;
	border: none;
	background: var(--top99-accent);
	color: #fff;
	font-family: 'Segoe UI', system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.92rem;
	cursor: pointer;
	transition: background 0.2s ease;
}
.top99-submit:hover { background: var(--top99-accent-dark); }
.top99-submit:disabled { opacity: 0.6; cursor: default; }
.top99-submit:focus-visible, .top99-fab:focus-visible, .top99-fab-close:focus-visible, .top99-popover-close:focus-visible {
	outline: 2px solid var(--top99-accent-dark);
	outline-offset: 2px;
}

.top99-msg {
	margin: 8px 0 0;
	font-family: 'Segoe UI', system-ui, sans-serif;
	font-size: 0.8rem;
	text-align: center;
	min-height: 1em;
}
.top99-msg.top99-error { color: #b3261e; }
.top99-msg.top99-success { color: #2e7d32; }

.top99-promo-result {
	text-align: center;
	padding: 6px 0 2px;
	font-family: 'Segoe UI', system-ui, sans-serif;
}
.top99-promo-result-label {
	display: block;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--top99-muted);
	margin-bottom: 6px;
}
.top99-promo-result-code {
	display: inline-block;
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	color: var(--top99-accent-dark);
	background: var(--top99-cream);
	border: 2px dashed var(--top99-accent);
	border-radius: 10px;
	padding: 10px 20px;
}
.top99-promo-result-note {
	margin: 12px 0 0;
	font-size: 0.78rem;
	color: var(--top99-muted);
}

.top99-privacy {
	margin: 10px 0 0;
	font-family: 'Segoe UI', system-ui, sans-serif;
	font-size: 0.68rem;
	color: var(--top99-muted);
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.top99-fab, .top99-bar, .top99-popover {
		transition: none !important;
	}
}
