/* ==========================================================
   VM Support Widget — Styles (mode conversation)
   ========================================================== */

#vms-widget-root {
	position: fixed;
	bottom: 20px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#vms-widget-root.vms-pos-right { right: 20px; }
#vms-widget-root.vms-pos-left  { left: 20px; }

/* --- Bouton flottant --- */
.vms-bubble {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0,0,0,0.2);
	border: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	overflow: hidden;
	padding: 0;
}
.vms-bubble:hover {
	transform: scale(1.06);
	box-shadow: 0 8px 26px rgba(0,0,0,0.28);
}
.vms-bubble img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}
.vms-bubble .vms-emoji {
	font-size: 26px;
	line-height: 1;
}
.vms-bubble .vms-icon-svg {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}
.vms-bubble .vms-close-icon {
	font-size: 22px;
	line-height: 1;
	font-weight: 300;
}

/* --- Panneau --- */
.vms-panel {
	position: absolute;
	bottom: 74px;
	width: 360px;
	max-width: calc(100vw - 40px);
	height: 520px;
	max-height: 72vh;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0,0,0,0.18);
	display: none;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #eee;
}
#vms-widget-root.vms-pos-right .vms-panel { right: 0; }
#vms-widget-root.vms-pos-left  .vms-panel { left: 0; }
.vms-panel.vms-open { display: flex; }

.vms-panel-header {
	padding: 16px 20px;
	color: #fff;
	flex-shrink: 0;
}
.vms-panel-header .vms-company {
	font-size: 12.5px;
	opacity: 0.85;
	margin: 0 0 3px 0;
}
.vms-panel-header h3 {
	margin: 0;
	font-size: 17px;
}

/* --- Zone de conversation --- */
.vms-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: #f7f7f8;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.vms-msg-row {
	display: flex;
	width: 100%;
}
.vms-msg-row.vms-msg-bot  { justify-content: flex-start; }
.vms-msg-row.vms-msg-user { justify-content: flex-end; }

.vms-msg-bubble {
	max-width: 82%;
	padding: 10px 13px;
	border-radius: 14px;
	font-size: 13.5px;
	line-height: 1.5;
}
.vms-msg-bubble-bot {
	background: #fff;
	border: 1px solid #ececec;
	color: #222;
	border-bottom-left-radius: 4px;
}
.vms-msg-bubble-user {
	border-bottom-right-radius: 4px;
	font-weight: 500;
}

.vms-answer-text { margin: 0 0 8px 0; }
.vms-msg-bubble p:last-child { margin-bottom: 0; }

.vms-answer-link {
	display: inline-block;
	margin-top: 4px;
	padding: 8px 14px;
	border-radius: 8px;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}

/* --- Suggestions rapides (chips) --- */
.vms-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-left: 2px;
}
.vms-chip {
	background: #fff;
	border: 1.5px solid #ddd;
	border-radius: 20px;
	padding: 7px 13px;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}
.vms-chip:hover { background: #f0f0f0; }

/* --- Bloc contact (inline dans une réponse bot) --- */
.vms-contact-block {
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.8;
}
.vms-contact-block a {
	color: inherit;
	text-decoration: underline;
	font-weight: 600;
}
.vms-contact-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* --- Barre de saisie --- */
.vms-input-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid #eee;
	background: #fff;
	flex-shrink: 0;
}
.vms-input {
	flex: 1;
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	padding: 10px 15px;
	font-size: 13.5px;
	outline: none;
	box-sizing: border-box;
}
.vms-input:focus { border-color: #bbb; }

.vms-send-btn {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	flex-shrink: 0;
	font-size: 15px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.vms-send-btn:hover { opacity: 0.9; }

/* --- Footer CTA --- */
.vms-panel-footer {
	padding: 10px 14px 14px 14px;
	background: #fff;
	flex-shrink: 0;
}
.vms-cta-btn {
	display: block;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	padding: 11px;
	border-radius: 10px;
	text-decoration: none;
	font-weight: 700;
	font-size: 13.5px;
}

/* --- Responsive --- */
@media (max-width: 480px) {
	.vms-panel {
		width: calc(100vw - 24px);
		height: 65vh;
		bottom: 74px;
	}
}

body.vms-hide-mobile #vms-widget-root {
	display: none;
}
