/* Econovape Chat — bulle visiteur */
#evc-widget {
	--evc-primary: #00b3a6;
	--evc-dark: #0a1f3d;
	--evc-bg: #f4f6f9;
	--evc-text: #1b2536;
	--evc-muted: #6b7686;
	position: fixed;
	bottom: 20px;
	z-index: 999990;
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.45;
	color: var(--evc-text);
}
#evc-widget.evc-pos-right { right: 20px; }
#evc-widget.evc-pos-left { left: 20px; }
#evc-widget *, #evc-widget *::before, #evc-widget *::after { box-sizing: border-box; }
#evc-widget [hidden] { display: none !important; }

#evc-widget .evc-launcher {
	position: relative;
	width: 60px; height: 60px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	margin: 0;
	background: var(--evc-primary);
	color: #fff;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	box-shadow: 0 8px 24px rgba(10, 31, 61, .28);
	transition: transform .18s ease, box-shadow .18s ease;
}
#evc-widget.evc-pos-left .evc-launcher { margin-right: auto; }
#evc-widget.evc-pos-right .evc-launcher { margin-left: auto; }
#evc-widget .evc-launcher:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(10, 31, 61, .34); }
#evc-widget .evc-launcher:focus-visible { outline: 3px solid var(--evc-dark); outline-offset: 3px; }
#evc-widget .evc-badge {
	position: absolute; top: -3px; right: -3px;
	min-width: 22px; height: 22px; padding: 0 6px;
	border-radius: 11px;
	background: #e5484d; color: #fff;
	font-size: 12px; font-weight: 700; line-height: 22px; text-align: center;
	border: 2px solid #fff;
}

#evc-widget .evc-panel {
	position: absolute;
	bottom: 76px;
	width: 370px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 110px);
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	display: flex; flex-direction: column;
	box-shadow: 0 18px 50px rgba(10, 31, 61, .28);
	animation: evc-in .2s ease;
}
#evc-widget.evc-pos-right .evc-panel { right: 0; }
#evc-widget.evc-pos-left .evc-panel { left: 0; }
@keyframes evc-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

#evc-widget .evc-head {
	background: var(--evc-dark);
	color: #fff;
	padding: 16px 14px 16px 16px;
	display: flex; align-items: center; gap: 12px;
}
#evc-widget .evc-avatar {
	width: 40px; height: 40px; border-radius: 50%;
	background: var(--evc-primary); color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-weight: 800; font-size: 18px; flex: none;
}
#evc-widget .evc-head-txt { flex: 1; min-width: 0; }
#evc-widget .evc-title { font-weight: 700; font-size: 16px; }
#evc-widget .evc-sub { font-size: 12.5px; opacity: .85; display: flex; align-items: center; gap: 6px; }
#evc-widget .evc-dot { width: 8px; height: 8px; border-radius: 50%; background: #8a94a6; flex: none; }
#evc-widget.is-online .evc-dot { background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .25); }
#evc-widget .evc-close {
	background: transparent; border: 0; color: #fff; cursor: pointer;
	width: 36px; height: 36px; border-radius: 50%; padding: 0;
	display: flex; align-items: center; justify-content: center; opacity: .85;
}
#evc-widget .evc-close:hover { background: rgba(255, 255, 255, .12); opacity: 1; }

#evc-widget .evc-body { flex: 1; overflow-y: auto; background: var(--evc-bg); padding: 14px 14px 6px; }
#evc-widget .evc-banner {
	font-size: 12.5px; color: var(--evc-muted);
	background: #fff; border: 1px solid #e3e8ef; border-radius: 10px;
	padding: 8px 10px; margin-bottom: 12px; text-align: center;
}
#evc-widget .evc-msg { display: flex; flex-direction: column; margin: 0 0 10px; max-width: 86%; }
#evc-widget .evc-msg.evc-visitor { margin-left: auto; align-items: flex-end; }
#evc-widget .evc-label { font-size: 11.5px; color: var(--evc-muted); margin: 0 0 3px 4px; display: flex; align-items: center; gap: 6px; font-weight: 600; }
#evc-widget .evc-ai-tag { background: #e6f7f5; color: #007d74; border-radius: 4px; padding: 0 5px; font-size: 10px; font-weight: 700; letter-spacing: .3px; }
#evc-widget .evc-bubble {
	padding: 9px 12px; border-radius: 16px;
	white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere;
}
#evc-widget .evc-visitor .evc-bubble { background: var(--evc-primary); color: #fff; border-bottom-right-radius: 5px; }
#evc-widget .evc-agent .evc-bubble,
#evc-widget .evc-ai .evc-bubble,
#evc-widget .evc-bot .evc-bubble { background: #fff; color: var(--evc-text); border: 1px solid #e3e8ef; border-bottom-left-radius: 5px; }
#evc-widget .evc-agent .evc-bubble { border-left: 3px solid var(--evc-dark); }
#evc-widget .evc-system { max-width: 100%; }
#evc-widget .evc-system .evc-label { display: none; }
#evc-widget .evc-system .evc-bubble { background: transparent; color: var(--evc-muted); font-size: 12.5px; font-style: italic; text-align: center; padding: 4px 8px; }
#evc-widget .evc-bubble a { color: inherit; text-decoration: underline; font-weight: 600; }
#evc-widget .evc-agent .evc-bubble a, #evc-widget .evc-ai .evc-bubble a, #evc-widget .evc-bot .evc-bubble a { color: #007d74; }
#evc-widget .evc-time { font-size: 10.5px; color: var(--evc-muted); margin: 2px 6px 0; }
#evc-widget .evc-pending { opacity: .6; }
#evc-widget .evc-failed .evc-bubble { background: #e5484d; }

#evc-widget .evc-typing { display: inline-flex; gap: 4px; background: #fff; border: 1px solid #e3e8ef; border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; }
#evc-widget .evc-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa5b5; animation: evc-dot 1.2s infinite ease-in-out; }
#evc-widget .evc-typing span:nth-child(2) { animation-delay: .15s; }
#evc-widget .evc-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes evc-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

#evc-widget .evc-email { display: flex; gap: 6px; padding: 8px 12px; background: #fff; border-top: 1px solid #e3e8ef; }
#evc-widget .evc-email input { flex: 1; border: 1px solid #cfd6e0; border-radius: 8px; padding: 8px 10px; font: inherit; min-width: 0; }
#evc-widget .evc-email button { background: var(--evc-dark); color: #fff; border: 0; border-radius: 8px; padding: 0 14px; font: inherit; font-weight: 700; cursor: pointer; }

#evc-widget .evc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid #e3e8ef; margin: 0; }
#evc-widget .evc-form textarea {
	flex: 1; resize: none; border: 1px solid #cfd6e0; border-radius: 12px;
	padding: 9px 12px; font: inherit; color: var(--evc-text); background: #fff;
	max-height: 110px; min-height: 40px; line-height: 1.4; margin: 0; box-shadow: none;
}
#evc-widget .evc-form textarea:focus { outline: none; border-color: var(--evc-primary); box-shadow: 0 0 0 3px rgba(0, 179, 166, .15); }
#evc-widget .evc-send {
	width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; margin: 0;
	background: var(--evc-primary); color: #fff; cursor: pointer; flex: none;
	display: flex; align-items: center; justify-content: center;
}
#evc-widget .evc-send:hover { filter: brightness(.95); }

#evc-widget .evc-foot { background: #fff; padding: 0 12px 10px; font-size: 11px; color: var(--evc-muted); }
#evc-widget .evc-link { background: none; border: 0; padding: 0; margin: 0 0 4px; color: #007d74; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: block; }
#evc-widget .evc-legal a { color: var(--evc-muted); }

@media (max-width: 640px) {
	#evc-widget { bottom: 14px; }
	#evc-widget.evc-pos-right { right: 14px; }
	#evc-widget.evc-pos-left { left: 14px; }
	#evc-widget .evc-launcher { width: 54px; height: 54px; }
	#evc-widget.is-open .evc-launcher { display: none; }
	#evc-widget .evc-panel {
		position: fixed; inset: 0; width: 100%; max-width: none;
		height: 100%; max-height: none; border-radius: 0; bottom: 0;
	}
	#evc-widget .evc-form textarea { font-size: 16px; } /* évite le zoom iOS */
}
