/* VSA – Assistant immobilier : bulle de discussion (styles isolés du thème) */

#vsaa-root {
	--vsaa-color: #1f4e79;
	--vsaa-ink: #1c2430;
	--vsaa-muted: #6b7380;
	--vsaa-line: #e4e7ec;
	--vsaa-soft: #f3f5f8;
	position: fixed;
	bottom: 20px;
	z-index: 99990;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--vsaa-ink);
	letter-spacing: normal;
	text-transform: none;
}
#vsaa-root.vsaa-pos-right { right: 20px; }
#vsaa-root.vsaa-pos-left { left: 20px; }
#vsaa-root *, #vsaa-root *::before, #vsaa-root *::after { box-sizing: border-box; }
#vsaa-root button, #vsaa-root textarea, #vsaa-root a {
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	box-shadow: none;
	margin: 0;
	min-height: 0;
	min-width: 0;
}
#vsaa-root svg { width: 22px; height: 22px; display: block; }
#vsaa-root [hidden] { display: none !important; }

/* Bouton d'ouverture */
#vsaa-root .vsaa-launcher {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	background: var(--vsaa-color);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 24px rgba(16, 24, 40, .25);
	transition: transform .15s ease;
	margin-left: auto;
}
#vsaa-root.vsaa-pos-left .vsaa-launcher { margin-left: 0; }
#vsaa-root .vsaa-launcher:hover { transform: scale(1.05); }
#vsaa-root .vsaa-launcher svg { width: 28px; height: 28px; }
#vsaa-root.is-open .vsaa-launcher { display: none; }

/* Fenêtre */
#vsaa-root .vsaa-panel {
	width: 380px;
	height: min(620px, calc(100vh - 40px));
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 18px 50px rgba(16, 24, 40, .28);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(16, 24, 40, .06);
}

#vsaa-root .vsaa-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 12px 14px 16px;
	background: var(--vsaa-color);
	color: #fff;
}
#vsaa-root .vsaa-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .18);
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
}
#vsaa-root .vsaa-who { flex: 1; min-width: 0; }
#vsaa-root .vsaa-name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vsaa-root .vsaa-sub { font-size: 12.5px; opacity: .85; display: flex; align-items: center; gap: 6px; }
#vsaa-root .vsaa-sub::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; }
#vsaa-root .vsaa-demo { background: #fde68a; color: #713f12; border-radius: 8px; padding: 0 6px; font-size: 11px; font-weight: 700; }
#vsaa-root .vsaa-icon {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	border: 0;
	padding: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	flex: none;
}
#vsaa-root .vsaa-icon:hover, #vsaa-root .vsaa-icon:focus-visible { background: rgba(255, 255, 255, .16); outline: none; }
#vsaa-root .vsaa-icon svg { width: 20px; height: 20px; }

/* Messages */
#vsaa-root .vsaa-list {
	flex: 1;
	overflow-y: auto;
	padding: 16px 14px 8px;
	background: #fafbfc;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
#vsaa-root .vsaa-row { display: flex; }
#vsaa-root .vsaa-row--user { justify-content: flex-end; }
#vsaa-root .vsaa-bubble {
	max-width: 85%;
	padding: 9px 13px;
	border-radius: 14px;
	word-wrap: break-word;
	overflow-wrap: anywhere;
	font-size: 14.5px;
}
#vsaa-root .vsaa-row--assistant .vsaa-bubble { background: #fff; border: 1px solid var(--vsaa-line); border-bottom-left-radius: 4px; }
#vsaa-root .vsaa-row--user .vsaa-bubble { background: var(--vsaa-color); color: #fff; border-bottom-right-radius: 4px; }
#vsaa-root .vsaa-bubble a { color: inherit; text-decoration: underline; }
#vsaa-root .vsaa-bubble strong { font-weight: 700; }

#vsaa-root .vsaa-typing { display: flex; gap: 4px; padding: 12px 14px; }
#vsaa-root .vsaa-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa3ae; animation: vsaa-dot 1.2s infinite ease-in-out; }
#vsaa-root .vsaa-typing span:nth-child(2) { animation-delay: .15s; }
#vsaa-root .vsaa-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes vsaa-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Cartes de biens */
#vsaa-root .vsaa-cards { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 6px; }
#vsaa-root .vsaa-card {
	display: flex;
	background: #fff;
	border: 1px solid var(--vsaa-line);
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: var(--vsaa-ink);
	transition: border-color .15s ease, box-shadow .15s ease;
}
#vsaa-root .vsaa-card:hover { border-color: var(--vsaa-color); box-shadow: 0 4px 14px rgba(16, 24, 40, .08); }
#vsaa-root .vsaa-card-img {
	width: 104px;
	flex: none;
	background: var(--vsaa-soft) center / cover no-repeat;
	min-height: 92px;
}
#vsaa-root .vsaa-card-img.is-empty { display: flex; align-items: center; justify-content: center; color: #b3bac4; }
#vsaa-root .vsaa-card-body { padding: 9px 11px; min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
#vsaa-root .vsaa-card-title { font-weight: 650; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#vsaa-root .vsaa-card-meta { font-size: 12px; color: var(--vsaa-muted); }
#vsaa-root .vsaa-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 4px; }
#vsaa-root .vsaa-card-price { font-weight: 700; font-size: 13.5px; color: var(--vsaa-color); white-space: nowrap; }
#vsaa-root .vsaa-card-link { font-size: 12px; color: var(--vsaa-muted); white-space: nowrap; }

/* Suggestions */
#vsaa-root .vsaa-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 14px 10px; background: #fafbfc; }
#vsaa-root .vsaa-chip {
	border: 1px solid var(--vsaa-color);
	color: var(--vsaa-color);
	background: #fff;
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 13px;
	cursor: pointer;
	line-height: 1.2;
}
#vsaa-root .vsaa-chip:hover { background: var(--vsaa-color); color: #fff; }

/* Saisie */
#vsaa-root .vsaa-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--vsaa-line); background: #fff; }
#vsaa-root .vsaa-input {
	flex: 1;
	resize: none;
	border: 1px solid var(--vsaa-line);
	border-radius: 12px;
	padding: 9px 12px;
	font-size: 14.5px;
	line-height: 1.4;
	max-height: 110px;
	background: var(--vsaa-soft);
	color: var(--vsaa-ink);
	outline: none;
	width: auto;
	height: 40px;
}
#vsaa-root .vsaa-input:focus { border-color: var(--vsaa-color); background: #fff; }
#vsaa-root .vsaa-send {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	background: var(--vsaa-color);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
}
#vsaa-root .vsaa-send:disabled { opacity: .5; cursor: default; }
#vsaa-root .vsaa-send svg { width: 18px; height: 18px; }
#vsaa-root .vsaa-notice { font-size: 11px; color: var(--vsaa-muted); text-align: center; padding: 0 14px 9px; background: #fff; line-height: 1.35; }

/* Téléphone : plein écran */
@media (max-width: 600px) {
	#vsaa-root { bottom: 14px; }
	#vsaa-root.vsaa-pos-right { right: 14px; }
	#vsaa-root.vsaa-pos-left { left: 14px; }
	#vsaa-root.is-open { inset: 0; }
	#vsaa-root.is-open .vsaa-panel { width: 100%; height: 100%; border-radius: 0; border: 0; }
	#vsaa-root .vsaa-input { font-size: 16px; }
}
