/**
 * Design calqué sur sobery-assistant-noto
 * (crème #F7F0E8, accent #d98563, Maven Pro / Larken)
 */

html.sobery-cc-page,
html.sobery-cc-page body {
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 100% !important;
	overflow: hidden !important;
	background-color: #f0f0f0 !important;
	box-sizing: border-box;
}

html.sobery-cc-page body * {
	box-sizing: border-box;
}

#sobery-cc-app-container {
	--sobery-bg: #F7F0E8;
	--sobery-accent: #d98563;
	--sobery-accent-hover: #c57452;
	--sobery-text: #3C3633;
	--sobery-white: #FFFFFF;
	--sobery-user-msg: #d98563;
	--sobery-bot-msg: #FFFFFF;

	font-family: 'Maven Pro', sans-serif;
	background-color: #f0f0f0;
	margin: 0;
	display: flex;
	justify-content: center;
	align-items: stretch;
	min-height: 100vh;
	min-height: 100dvh;
	max-height: 100vh;
	max-height: 100dvh;
	width: 100%;
	position: relative;
	z-index: 1;
	overflow: hidden;
	color: var(--sobery-text);
	line-height: 1.5;
}

/* Mode page dédiée = vrai plein écran */
html.sobery-cc-page #sobery-cc-app-container {
	position: fixed;
	inset: 0;
	/* Sous la barre d’admin WP (z-index 99999) pour garder menus / logout accessibles */
	z-index: 99990;
	background-color: var(--sobery-bg);
}

/* Barre d’admin visible : décaler le chat sous #wpadminbar (32px / 46px) */
html.sobery-cc-page body.admin-bar #sobery-cc-app-container {
	top: 32px;
	right: 0;
	bottom: 0;
	left: 0;
	height: auto;
	min-height: 0;
	max-height: none;
}

@media screen and (max-width: 782px) {
	html.sobery-cc-page body.admin-bar #sobery-cc-app-container {
		top: 46px;
	}
}

#sobery-cc-chatbot-wrapper {
	width: 100%;
	max-width: 1100px;
	background-color: var(--sobery-bg);
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	height: 80vh;
	min-height: 600px;
	max-height: 800px;
	position: relative;
	overflow: hidden;
}

html.sobery-cc-page #sobery-cc-chatbot-wrapper {
	max-width: none;
	width: 100%;
	height: 100%;
	min-height: 100%;
	max-height: none;
	border-radius: 0;
	box-shadow: none;
}

html.sobery-cc-page .sobery-cc-chat-header {
	border-radius: 0;
}

html.sobery-cc-page .sobery-cc-chat-controls {
	border-radius: 0;
	padding-left: max(1rem, calc((100% - 85rem) / 2));
	padding-right: max(1rem, calc((100% - 85rem) / 2));
}

@media (min-width: 640px) {
	html.sobery-cc-page .sobery-cc-chat-controls {
		padding-left: max(1.5rem, calc((100% - 85rem) / 2));
		padding-right: max(1.5rem, calc((100% - 85rem) / 2));
	}
}

@media (min-width: 1024px) {
	html.sobery-cc-page .sobery-cc-chat-controls {
		padding-left: max(2rem, calc((100% - 85rem) / 2));
		padding-right: max(2rem, calc((100% - 85rem) / 2));
	}
}

html.sobery-cc-page .sobery-cc-message {
	max-width: min(720px, 100%);
}

html.sobery-cc-page #sobery-cc-chat-window {
	/* Même bande utile que le header sobery (85rem) */
	padding: 24px max(1rem, calc((100% - 85rem) / 2));
}

@media (min-width: 640px) {
	html.sobery-cc-page #sobery-cc-chat-window {
		padding-left: max(1.5rem, calc((100% - 85rem) / 2));
		padding-right: max(1.5rem, calc((100% - 85rem) / 2));
	}
}

@media (min-width: 1024px) {
	html.sobery-cc-page #sobery-cc-chat-window {
		padding-left: max(2rem, calc((100% - 85rem) / 2));
		padding-right: max(2rem, calc((100% - 85rem) / 2));
	}
}

.sobery-cc-chat-header {
	background: linear-gradient(135deg, var(--sobery-white) 0%, #fafafa 100%);
	padding: 0;
	text-align: left;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	display: block;
	border-radius: 16px 16px 0 0;
	flex-shrink: 0;
	position: relative;
	min-height: 0;
}

/* Aligné sur sobery-theme header : max-w-[85rem] mx-auto px-4 sm:px-6 lg:px-8 */
.sobery-cc-chat-header__inner {
	width: 100%;
	max-width: 85rem;
	margin: 0 auto;
	padding: 0.85rem 1rem;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	box-sizing: border-box;
}

@media (min-width: 640px) {
	.sobery-cc-chat-header__inner {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
		padding-top: 0.95rem;
		padding-bottom: 0.95rem;
	}
}

@media (min-width: 1024px) {
	.sobery-cc-chat-header__inner {
		padding-left: 2rem;
		padding-right: 2rem;
	}
}

.sobery-cc-chat-header__brand {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	min-width: 0;
	flex: 1 1 auto;
}

.sobery-cc-chat-header__copy {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
	padding-left: 1.25rem;
	border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.sobery-cc-chat-header__actions {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex-shrink: 0;
}

.sobery-cc-credits {
	display: inline-flex;
	align-items: baseline;
	gap: 0.35rem;
	padding: 0.3rem 0.7rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.04);
	border: 1px solid rgba(0, 0, 0, 0.06);
	font-size: 0.78rem;
	line-height: 1.25;
	color: #666;
	margin: 0;
	white-space: nowrap;
}
.sobery-cc-credits__label {
	font-weight: 500;
}
.sobery-cc-credits__value {
	font-weight: 700;
	color: var(--sobery-text, #3c3633);
	font-variant-numeric: tabular-nums;
}
.sobery-cc-credits.is-unlimited .sobery-cc-credits__value {
	color: var(--sobery-accent, #d98563);
}
.sobery-cc-credits.is-empty {
	background: #fdecea;
	border-color: rgba(155, 44, 44, 0.15);
	color: #9b2c2c;
}
.sobery-cc-credits.is-empty .sobery-cc-credits__value {
	color: #9b2c2c;
}

#sobery-cc-app-container.is-credits-exhausted #sobery-cc-chat-controls {
	opacity: 0.55;
	pointer-events: none;
}

.sobery-cc-chat-header h2 {
	margin: 0;
	font-size: 1rem;
	letter-spacing: 0;
	font-weight: 700;
	font-family: 'larken', serif;
	color: var(--sobery-accent);
	line-height: 0;
	flex-shrink: 0;
}

.sobery-cc-chat-header h2 a {
	color: #000 !important;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.3s ease;
}

.sobery-cc-chat-header h2 a:hover {
	opacity: 0.8;
}

.sobery-cc-logo {
	display: block;
	height: 28px;
	width: auto;
}

.sobery-cc-chat-header__title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--sobery-text, #3c3633);
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sobery-cc-header-note {
	font-size: 0.78rem;
	color: #888;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sobery-cc-restart-btn {
	margin: 0;
	appearance: none;
	border: 1px solid rgba(0, 0, 0, 0.12);
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	padding: 0.4rem 0.85rem;
	border-radius: 999px;
	cursor: pointer;
	white-space: nowrap;
	line-height: 1.25;
}
.sobery-cc-restart-btn:hover {
	border-color: rgba(0, 0, 0, 0.28);
	background: rgba(0, 0, 0, 0.03);
}
.sobery-cc-restart-btn__short {
	display: none;
}
.sobery-cc-restart-btn__full {
	display: inline;
}

.sobery-cc-turn-limit {
	padding: 0.25rem 0;
}
.sobery-cc-turn-limit .sobery-cc-chat-btn {
	margin-top: 0.35rem;
}

#sobery-cc-app-container.is-turn-limited #sobery-cc-chat-controls {
	opacity: 0.55;
	pointer-events: none;
}

#sobery-cc-chat-window {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
	scroll-behavior: smooth;
	display: flex;
	flex-direction: column;
	gap: 15px;
	min-height: 0;
	-webkit-overflow-scrolling: touch;
}

#sobery-cc-chat-window::-webkit-scrollbar {
	width: 6px;
}

#sobery-cc-chat-window::-webkit-scrollbar-thumb {
	background-color: rgba(0, 0, 0, 0.1);
	border-radius: 3px;
}

.sobery-cc-message {
	max-width: 85%;
	padding: 14px 18px;
	border-radius: 18px;
	font-size: 0.95rem;
	line-height: 1.5;
	position: relative;
	animation: sobery-cc-slideUp 0.3s ease-out;
	word-wrap: break-word;
}

.sobery-cc-bot-msg {
	align-self: flex-start;
	background-color: var(--sobery-bot-msg);
	color: var(--sobery-text);
	border-bottom-left-radius: 4px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
	padding-right: 42px;
}

.sobery-cc-copy-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 30px;
	height: 30px;
	border: none;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.04);
	color: #777;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background 0.15s ease, color 0.15s ease;
}

.sobery-cc-copy-btn:hover {
	background: rgba(217, 133, 99, 0.15);
	color: var(--sobery-accent-hover);
}

.sobery-cc-copy-btn.is-copied {
	background: rgba(46, 125, 50, 0.12);
	color: #2e7d32;
}

.sobery-cc-product-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 12px;
	margin: 0.35em 0 0;
}

.sobery-cc-product-card {
	display: flex;
	flex-direction: column;
	background: #faf7f3;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 12px;
	overflow: hidden;
	min-width: 0;
	position: relative;
}

.sobery-cc-pick {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #b9b3ad;
	display: grid;
	place-items: center;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.sobery-cc-pick svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
}

.sobery-cc-pick.is-on {
	color: var(--sobery-accent, #d98563);
}

.sobery-cc-pick.is-on svg {
	fill: currentColor;
	stroke: none;
}

.sobery-cc-product-card__media {
	display: block;
	aspect-ratio: 4 / 3;
	background: #f0ebe4;
	overflow: hidden;
	position: relative;
	border-radius: 12px 12px 0 0;
	flex-shrink: 0;
}

.sobery-cc-swatches {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin: 4px 0 2px;
	padding: 3px 0;
	overflow: visible;
}

.sobery-cc-swatch {
	display: inline-block;
	box-sizing: border-box;
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.2);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
	text-decoration: none;
	cursor: pointer;
	vertical-align: middle;
	transition: transform 0.12s ease, box-shadow 0.12s ease, outline-color 0.12s ease;
}

a.sobery-cc-swatch:hover,
a.sobery-cc-swatch:focus-visible {
	transform: scale(1.15);
	outline: 2px solid rgba(217, 133, 99, 0.7);
	outline-offset: 1px;
}

.sobery-cc-swatch.is-light {
	border-color: rgba(0, 0, 0, 0.28);
}

.sobery-cc-swatch.is-matched {
	outline: 2px solid var(--sobery-accent, #d98563);
	outline-offset: 1px;
	border-color: rgba(0, 0, 0, 0.25);
}

.sobery-cc-swatch.is-unknown {
	background-image: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 2px,
		rgba(0, 0, 0, 0.08) 2px,
		rgba(0, 0, 0, 0.08) 4px
	);
}

.sobery-cc-swatch-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 16px;
	padding: 0 5px;
	border-radius: 8px;
	font-size: 0.65rem;
	font-weight: 700;
	line-height: 1;
	color: #666;
	background: rgba(0, 0, 0, 0.06);
	cursor: help;
}

.sobery-cc-tooltip {
	position: fixed;
	z-index: 100000;
	max-width: min(260px, calc(100vw - 16px));
	padding: 6px 9px;
	border-radius: 8px;
	background: #2a2a2a;
	color: #fff;
	font-size: 0.72rem;
	line-height: 1.35;
	font-weight: 500;
	pointer-events: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	transform: translate(-50%, calc(-100% - 8px));
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.08s ease;
}

.sobery-cc-tooltip.is-visible {
	opacity: 1;
	visibility: visible;
}

.sobery-cc-product-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sobery-cc-product-card__placeholder {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 96px;
	background: linear-gradient(135deg, #efe8df, #e4ddd3);
}

.sobery-cc-product-card__body {
	display: grid;
	gap: 4px;
	padding: 10px 11px 12px;
	min-width: 0;
}

.sobery-cc-product-card__title {
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--sobery-text);
	text-decoration: none;
}

a.sobery-cc-product-card__title:hover {
	color: var(--sobery-accent);
}

.sobery-cc-product-card__meta {
	font-size: 0.72rem;
	color: #777;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.sobery-cc-badge {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #6b5a3e;
	background: #f3ebe0;
	padding: 0.1em 0.45em;
	border-radius: 3px;
}

.sobery-cc-badge--secondary {
	color: #6b5a3e;
	background: #f3ebe0;
}

.sobery-cc-product-card__price {
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--sobery-text);
	margin-top: 2px;
}

.sobery-cc-product-card__link {
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--sobery-accent);
	text-decoration: none;
	margin-top: 2px;
}

.sobery-cc-product-card__link:hover {
	text-decoration: underline;
}

.sobery-cc-product-card__contact {
	display: inline-block;
	margin-top: 4px;
	padding: 0;
	border: 0;
	background: none;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--sobery-accent);
	text-decoration: none;
	white-space: nowrap;
}

.sobery-cc-product-card__contact:hover {
	text-decoration: underline;
}

.sobery-cc-product-card--supplier .sobery-cc-product-card__meta {
	color: #8a6a3a;
}

.sobery-cc-user-msg {
	align-self: flex-end;
	background-color: var(--sobery-user-msg);
	color: var(--sobery-white);
	border-bottom-right-radius: 4px;
	box-shadow: 0 2px 5px rgba(217, 133, 99, 0.3);
}

.sobery-cc-error-msg {
	align-self: flex-start;
	background-color: #fdecea;
	color: #9b2c2c;
	border-bottom-left-radius: 4px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.sobery-cc-reply {
	white-space: normal;
	display: flex;
	flex-direction: column;
	gap: 0.75em;
	color: var(--sobery-text);
}

/*
 * Le thème sobery (global.css) force `p { color: var(--color-neutral-grey) }`.
 * On ré-harmonise toute la prose bot sur --sobery-text ; le méta (CO₂ / disclaimer) reste atténué.
 */
.sobery-cc-bot-msg,
.sobery-cc-bot-msg .sobery-cc-reply {
	color: var(--sobery-text);
}

.sobery-cc-reply p,
.sobery-cc-bot-msg > .sobery-cc-reply > p,
.sobery-cc-narrative,
.sobery-cc-reply .sobery-cc-narrative,
.sobery-cc-reply .sobery-cc-handoff-hint {
	margin: 0;
	color: var(--sobery-text);
	font-size: 0.95rem;
	line-height: 1.5;
	font-weight: 400;
}

.sobery-cc-reply-body {
	margin: 0;
	color: var(--sobery-text);
}

.sobery-cc-reply h3,
.sobery-cc-reply-body > h3 {
	margin: 0 0 0.4em;
	font-family: 'larken', serif;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--sobery-text);
	line-height: 1.35;
}

.sobery-cc-reply-body > h3:not(:first-child) {
	margin-top: 0.85em;
}

.sobery-cc-reply ul,
.sobery-cc-reply ol {
	margin: 0.35em 0 0.9em;
	padding-left: 1.25em;
}

.sobery-cc-reply li {
	margin: 0.25em 0;
}

.sobery-cc-reply a:not(.sobery-cc-chat-btn) {
	color: var(--sobery-accent);
	font-weight: 600;
	text-decoration: none;
}

.sobery-cc-reply a:not(.sobery-cc-chat-btn):hover {
	text-decoration: underline;
}

.sobery-cc-reply code,
.sobery-cc-reply .sobery-cc-sku {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.88em;
	background: rgba(0, 0, 0, 0.04);
	padding: 0.1em 0.35em;
	border-radius: 4px;
	white-space: nowrap;
}

.sobery-cc-reply .sobery-cc-gap,
.sobery-cc-reply p.sobery-cc-disclaimer,
.sobery-cc-reply .sobery-cc-disclaimer {
	color: #666;
	font-size: 0.88rem;
	line-height: 1.45;
}

.sobery-cc-service-error {
	display: grid;
	gap: 12px;
}

.sobery-cc-service-error p {
	margin: 0;
	color: var(--sobery-text, #3c3633);
	line-height: 1.45;
}

.sobery-cc-oos {
	display: grid;
	gap: 12px;
}

.sobery-cc-oos p {
	margin: 0;
	color: var(--sobery-text, #3c3633);
	line-height: 1.45;
}

.sobery-cc-contact-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	text-decoration: none !important;
	margin-top: 2px;
	color: #fff !important;
}

a.sobery-cc-contact-btn:hover,
a.sobery-cc-contact-btn:focus-visible {
	text-decoration: none !important;
	color: #fff !important;
	filter: brightness(0.97);
}

.sobery-cc-handoff-hint {
	margin: 0;
	line-height: 1.5;
}

.sobery-cc-handoff {
	margin-top: 1.15em;
	padding: 0.95em 1em 1em;
	border: 1px solid rgba(217, 133, 99, 0.55);
	border-radius: 14px;
	background: rgba(217, 133, 99, 0.1);
	display: grid;
	gap: 0.55em;
}

.sobery-cc-handoff[hidden] {
	display: none;
}

.sobery-cc-handoff p {
	margin: 0;
	line-height: 1.45;
}

.sobery-cc-handoff__lead {
	font-size: 0.95rem;
	color: var(--sobery-text, #3c3633);
}

.sobery-cc-handoff__need {
	font-size: 0.9rem;
	font-weight: 600;
	color: #8a3d32;
}

.sobery-cc-handoff .sobery-cc-chat-btn {
	width: fit-content;
}

/* Contrat de tour : critères actifs + boutons d’offres (DialogPolicy). */
.sobery-cc-reply p.sobery-cc-recap,
.sobery-cc-recap {
	margin: 0 0 0.7em;
	font-size: 0.82rem;
	line-height: 1.4;
	color: #6f6863;
}

.sobery-cc-recap__label {
	display: inline-block;
	margin-right: 0.4em;
	padding: 0.1em 0.55em;
	border-radius: 999px;
	background: rgba(217, 133, 99, 0.12);
	color: #8a4a33;
	font-weight: 600;
	font-size: 0.72rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.sobery-cc-offers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-top: 0.9em;
}

.sobery-cc-offer {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0.35em 1em;
	border: 1px solid var(--sobery-accent, #d98563);
	border-radius: 999px;
	background: #fff;
	color: var(--sobery-accent-hover, #c57452);
	font-family: 'Maven Pro', sans-serif;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.25;
	text-align: left;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.sobery-cc-offer:hover:not(:disabled),
.sobery-cc-offer:focus-visible {
	background: var(--sobery-accent, #d98563);
	color: #fff;
	transform: translateY(-1px);
}

.sobery-cc-offer.is-chosen {
	background: var(--sobery-accent, #d98563);
	color: #fff;
	opacity: 1;
}

.sobery-cc-offer:disabled:not(.is-chosen) {
	opacity: 0.45;
	cursor: default;
}

.sobery-cc-compare {
	overflow-x: auto;
	margin: 0.6em 0;
}

.sobery-cc-compare__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}

.sobery-cc-compare__table th,
.sobery-cc-compare__table td {
	padding: 0.45em 0.6em;
	border-bottom: 1px solid rgba(0, 0, 0, 0.07);
	text-align: left;
	vertical-align: top;
}

.sobery-cc-compare__table thead th {
	font-weight: 600;
	color: var(--sobery-text, #3c3633);
}

.sobery-cc-compare__table tbody th {
	white-space: nowrap;
	color: #6f6863;
	font-weight: 600;
}

.sobery-cc-product-card--selected {
	outline: 2px solid var(--sobery-accent, #d98563);
	outline-offset: 2px;
}

.sobery-cc-reply p.sobery-cc-carbon,
.sobery-cc-carbon {
	margin: 0;
	padding-top: 0.55em;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
	font-size: 0.68rem;
	line-height: 1.4;
	color: #9a9590;
	letter-spacing: 0.01em;
	cursor: help;
}

.sobery-cc-carbon strong {
	font-weight: 600;
	color: #7a756f;
}

.sobery-cc-carbon__label {
	text-transform: uppercase;
	font-size: 0.62rem;
	letter-spacing: 0.04em;
	color: #aea9a3;
}

.sobery-cc-carbon__sep {
	opacity: 0.55;
	margin: 0 0.15em;
}

.sobery-cc-qualify {
	display: grid;
	gap: 0.65em;
}

.sobery-cc-qualify p {
	margin: 0;
	color: var(--sobery-text);
	font-size: 0.95rem;
	line-height: 1.5;
}

.sobery-cc-qualify__questions {
	margin: 0.15em 0 0;
	padding-left: 1.25em;
	display: grid;
	gap: 0.45em;
}

.sobery-cc-qualify__questions li {
	padding-left: 0.15em;
	line-height: 1.4;
}

.sobery-cc-qualify__known-label,
.sobery-cc-qualify__ask-label,
.sobery-cc-qualify__ideas-label,
.sobery-cc-qualify__related-label {
	margin-top: 0.35em !important;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--sobery-text);
}

.sobery-cc-qualify__related {
	margin: 0;
	padding-left: 1.25em;
	color: #5a5550;
	font-size: 0.9rem;
	display: grid;
	gap: 0.25em;
}

.sobery-cc-related {
	margin: 0.35em 0 0;
	padding-left: 1.25em;
	font-size: 0.92rem;
	display: grid;
	gap: 0.3em;
}

.sobery-cc-qualify__known {
	margin: 0;
	padding-left: 1.25em;
	color: #5a5550;
	font-size: 0.9rem;
	display: grid;
	gap: 0.25em;
}

.sobery-cc-qualify__ideas-label {
	margin-top: 0.35em !important;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--sobery-text);
}

.sobery-cc-qualify__ideas {
	margin: 0;
	padding-left: 1.25em;
	color: #666;
	font-size: 0.9rem;
	display: grid;
	gap: 0.3em;
}

.sobery-cc-qualify__cta {
	margin-top: 0.25em !important;
	font-size: 0.88rem;
	color: #777;
}

.sobery-cc-typing-indicator {
	align-self: flex-start;
	background-color: rgba(255, 255, 255, 0.85);
	padding: 12px 16px;
	border-radius: 16px;
	font-size: 0.86rem;
	color: #666;
	display: none;
	align-items: center;
	gap: 10px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	max-width: 92%;
}

.sobery-cc-typing-indicator[aria-hidden="false"],
.sobery-cc-typing-indicator:not([hidden]) {
	display: inline-flex;
}

.sobery-cc-typing-pulse {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--sobery-accent);
	flex-shrink: 0;
	animation: sobery-cc-pulse 1.1s ease-in-out infinite;
}

.sobery-cc-typing-step {
	line-height: 1.35;
	font-weight: 500;
	color: #555;
}

.sobery-cc-products {
	display: grid;
	gap: 10px;
	margin-top: 14px;
	white-space: normal;
}

.sobery-cc-products-title {
	font-family: 'larken', serif;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--sobery-text);
}

.sobery-cc-products-note {
	color: #888;
	font-size: 0.72rem;
}

.sobery-cc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.82rem;
	background: #faf7f3;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 12px;
	overflow: hidden;
}

.sobery-cc-table th {
	text-align: left;
	padding: 8px 10px;
	background: rgba(217, 133, 99, 0.12);
	color: var(--sobery-accent-hover);
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sobery-cc-table td {
	padding: 9px 10px;
	vertical-align: top;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	color: var(--sobery-text);
}

.sobery-cc-table tr:last-child td {
	border-bottom: none;
}

.sobery-cc-td-type {
	white-space: nowrap;
	font-weight: 600;
	font-size: 0.75rem;
	color: #666;
}

.sobery-cc-td-name {
	font-weight: 600;
}

.sobery-cc-td-colors {
	color: #888;
	font-size: 0.72rem;
	margin-top: 2px;
}

.sobery-cc-td-sku {
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	font-size: 0.75rem;
	white-space: nowrap;
}

.sobery-cc-td-price {
	white-space: nowrap;
	font-weight: 600;
}

.sobery-cc-td-link a {
	color: var(--sobery-accent);
	font-weight: 700;
	text-decoration: none;
}

.sobery-cc-td-link a:hover {
	text-decoration: underline;
}

@keyframes sobery-cc-slideUp {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

@keyframes sobery-cc-pulse {
	0%, 100% { opacity: 0.35; transform: scale(0.85); }
	50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 640px) {
	.sobery-cc-table th:nth-child(4),
	.sobery-cc-table td:nth-child(4) {
		display: none;
	}

	.sobery-cc-td-type {
		white-space: normal;
		max-width: 72px;
	}
}

.sobery-cc-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 14px;
	white-space: normal;
}

.sobery-cc-chat-controls {
	--sobery-cc-field-h: 46px;

	background-color: var(--sobery-white);
	min-height: 0;
	padding: 14px 16px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 10px;
	border-top: 1px solid rgba(0, 0, 0, 0.05);
	border-radius: 0 0 16px 16px;
	flex-shrink: 0;
	position: relative;
	z-index: 10;
}

.sobery-cc-chat-input-text {
	flex: 1;
	min-width: 200px;
	box-sizing: border-box;
	height: var(--sobery-cc-field-h);
	min-height: var(--sobery-cc-field-h) !important;
	max-height: 120px;
	padding: 11px 18px !important;
	border: 1px solid transparent;
	background-color: #f5f5f5;
	border-radius: 30px;
	outline: none;
	font-family: 'Maven Pro', sans-serif;
	font-size: 15px;
	color: var(--sobery-text);
	transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
	resize: none;
	line-height: 1.35;
	overflow-y: auto;
}

.sobery-cc-chat-input-text::placeholder {
	color: #999;
}

.sobery-cc-chat-input-text:focus {
	background-color: #ffffff;
	border-color: var(--sobery-accent);
	box-shadow: 0 4px 12px rgba(217, 133, 99, 0.15);
}

.sobery-cc-chat-btn {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: var(--sobery-cc-field-h, 46px);
	background: transparent;
	border: 1px solid var(--sobery-accent);
	color: var(--sobery-accent);
	padding: 0 24px;
	border-radius: 30px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	font-family: 'Maven Pro', sans-serif;
}

.sobery-cc-chat-btn:hover,
.sobery-cc-chat-btn:active {
	background-color: var(--sobery-accent);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(217, 133, 99, 0.2);
}

.sobery-cc-chat-btn--primary {
	background-color: var(--sobery-accent);
	color: white;
	border: none;
	padding: 0 28px;
}

.sobery-cc-chat-btn--primary:hover {
	background-color: var(--sobery-accent-hover);
}

.sobery-cc-chat-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

@media (max-width: 768px) {
	/* Plein écran mobile = page dédiée uniquement (pas shortcode embarqué) */
	html.sobery-cc-page #sobery-cc-app-container {
		padding: 0;
		align-items: stretch;
		min-height: 100vh;
		min-height: 100dvh;
		max-height: 100vh;
		max-height: 100dvh;
		position: fixed;
		inset: 0;
	}

	/* Ne pas écraser le décalage barre admin (46px sous 783px) */
	html.sobery-cc-page body.admin-bar #sobery-cc-app-container {
		top: 46px;
		right: 0;
		bottom: 0;
		left: 0;
	}

	html.sobery-cc-page #sobery-cc-chatbot-wrapper {
		max-width: 100%;
		width: 100%;
		height: 100%;
		min-height: 100%;
		max-height: none;
		border-radius: 0;
		box-shadow: none;
		padding-bottom: env(safe-area-inset-bottom);
	}

	html.sobery-cc-page .sobery-cc-chat-header {
		padding: 0;
		border-radius: 0;
	}

	.sobery-cc-chat-header__inner {
		padding-top: 0.75rem;
		padding-bottom: 0.75rem;
		gap: 0.75rem;
	}

	/* Safe-area seulement sans barre d’admin (sinon déjà décalé via top: 46px) */
	html.sobery-cc-page body:not(.admin-bar) .sobery-cc-chat-header__inner {
		padding-top: calc(0.75rem + env(safe-area-inset-top));
	}

	.sobery-cc-chat-header__brand {
		gap: 0.85rem;
	}

	.sobery-cc-chat-header__copy {
		padding-left: 0.85rem;
	}

	.sobery-cc-logo {
		height: 24px;
	}

	.sobery-cc-chat-header__title {
		font-size: 0.88rem;
	}

	.sobery-cc-header-note {
		display: none;
	}

	.sobery-cc-credits__label {
		display: none;
	}

	.sobery-cc-restart-btn__full {
		display: none;
	}

	.sobery-cc-restart-btn__short {
		display: inline;
	}

	html.sobery-cc-page .sobery-cc-chat-controls {
		padding: 15px;
		padding-bottom: calc(15px + env(safe-area-inset-bottom));
		border-radius: 0;
		min-height: auto;
	}

	.sobery-cc-message {
		max-width: 92%;
	}
}

/* Shortcode embarqué / onglet catalogue : exploite largeur + hauteur viewport sous chrome */
body:not(.sobery-cc-page) #sobery-cc-app-container,
#sobery-cc-app-container.sobery-cc--embed {
	--sobery-cc-embed-chrome: 11.5rem;

	min-height: auto !important;
	max-height: none !important;
	height: auto !important;
	padding: 0 0 0.35rem;
	background: transparent;
	position: relative !important;
	inset: auto !important;
	overflow: visible;
}

body.admin-bar:not(.sobery-cc-page) #sobery-cc-app-container,
body.admin-bar #sobery-cc-app-container.sobery-cc--embed {
	/* +1.5rem ≈ barre admin 32px (mesuré DevTools, ~16px de marge basse) */
	--sobery-cc-embed-chrome: 13rem;
}

body:not(.sobery-cc-page) #sobery-cc-chatbot-wrapper,
#sobery-cc-app-container.sobery-cc--embed #sobery-cc-chatbot-wrapper {
	width: 100%;
	max-width: none;
	height: calc(100dvh - var(--sobery-cc-embed-chrome));
	min-height: 400px;
	max-height: none;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	margin: 0;
}

@media (max-width: 768px) {
	body:not(.sobery-cc-page) #sobery-cc-app-container,
	#sobery-cc-app-container.sobery-cc--embed {
		/* Header fixe + onglets + safe-area (mesuré DevTools ~390×844) */
		--sobery-cc-embed-chrome: 12.75rem;
		padding: 0 0 0.25rem;
	}

	body.admin-bar:not(.sobery-cc-page) #sobery-cc-app-container,
	body.admin-bar #sobery-cc-app-container.sobery-cc--embed {
		/* Admin mobile 46px + header fixe */
		--sobery-cc-embed-chrome: 15.25rem;
	}

	body:not(.sobery-cc-page) #sobery-cc-chatbot-wrapper,
	#sobery-cc-app-container.sobery-cc--embed #sobery-cc-chatbot-wrapper {
		min-height: 320px;
		border-radius: 12px;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
		padding-bottom: env(safe-area-inset-bottom);
	}

	body:not(.sobery-cc-page) .sobery-cc-chat-header,
	#sobery-cc-app-container.sobery-cc--embed .sobery-cc-chat-header {
		border-radius: 12px 12px 0 0;
	}

	body:not(.sobery-cc-page) .sobery-cc-chat-controls,
	#sobery-cc-app-container.sobery-cc--embed .sobery-cc-chat-controls {
		padding: 12px 15px;
		padding-bottom: calc(12px + env(safe-area-inset-bottom));
		border-radius: 0 0 12px 12px;
		min-height: auto;
	}
}

/* Gate mot de passe */
#sobery-cc-app-container.is-locked #sobery-cc-chat-window,
#sobery-cc-app-container.is-locked #sobery-cc-chat-controls {
	filter: blur(2px);
	opacity: 0.45;
	pointer-events: none;
	user-select: none;
}

.sobery-cc-gate {
	position: absolute;
	inset: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	background: rgba(247, 240, 232, 0.72);
	backdrop-filter: blur(6px);
}

.sobery-cc-gate[hidden] {
	display: none;
}

.sobery-cc-gate__panel {
	width: 100%;
	max-width: 360px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
	padding: 28px 24px 24px;
	display: grid;
	gap: 12px;
}

.sobery-cc-gate__panel h3 {
	margin: 0;
	font-family: 'larken', serif;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--sobery-text, #3c3633);
	text-align: center;
}

.sobery-cc-gate__hint {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.45;
	color: #666;
	text-align: center;
}

.sobery-cc-gate__input {
	width: 100%;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 1rem;
	font-family: inherit;
	background: #faf7f3;
	color: var(--sobery-text, #3c3633);
}

.sobery-cc-gate__input:focus {
	outline: none;
	border-color: var(--sobery-accent, #d98563);
	box-shadow: 0 0 0 3px rgba(217, 133, 99, 0.2);
}

.sobery-cc-gate__error {
	margin: 0;
	color: #b42318;
	font-size: 0.86rem;
	text-align: center;
}

.sobery-cc-gate__panel .sobery-cc-chat-btn {
	width: 100%;
	justify-content: center;
}
