/* Agensis Chatbot — widget aux couleurs du site */
:root {
	--agchat-red: #E83F39;
	--agchat-blue: #24528C;
	--agchat-cream: #F0ECCE;
	--agchat-ink: #333;
	--agchat-radius: 14px;
	--agchat-font: 'Poppins', Helvetica, Arial, sans-serif;
}

.agchat, .agchat * { box-sizing: border-box; font-family: var(--agchat-font); }

/* ---------- Fenêtre de chat (commune inline / bulle) ---------- */
.agchat-window {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--agchat-radius);
	box-shadow: 0 8px 32px rgba(36, 82, 140, .18);
	overflow: hidden;
	width: 100%;
	height: 100%;
}

.agchat-header {
	background: var(--agchat-blue);
	color: #fff;
	padding: 14px 18px;
	display: flex;
	align-items: center;
	gap: 10px;
}
.agchat-header-dot {
	width: 10px; height: 10px; border-radius: 50%;
	background: #7ED957;
	flex: none;
}
.agchat-header-title { font-weight: 600; font-size: 15px; line-height: 1.3; }
.agchat-header-sub { font-size: 11px; opacity: .8; line-height: 1.3; }
.agchat-close {
	margin-left: auto;
	background: none; border: 0; color: #fff;
	font-size: 22px; line-height: 1; cursor: pointer;
	padding: 4px 8px; border-radius: 8px;
}
.agchat-close:hover { background: rgba(255,255,255,.15); }

.agchat-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: var(--agchat-cream);
	display: flex;
	flex-direction: column;
	gap: 10px;
	scroll-behavior: smooth;
}

.agchat-msg {
	max-width: 85%;
	padding: 10px 14px;
	border-radius: var(--agchat-radius);
	font-size: 14px;
	line-height: 1.6em;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.agchat-msg a { color: var(--agchat-blue); text-decoration: underline; }
.agchat-msg--bot {
	background: #fff;
	color: var(--agchat-ink);
	align-self: flex-start;
	border-bottom-left-radius: 4px;
}
.agchat-msg--user {
	background: var(--agchat-blue);
	color: #fff;
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}
.agchat-msg--typing { display: flex; gap: 5px; align-items: center; padding: 14px; }
.agchat-msg--typing span {
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--agchat-blue); opacity: .4;
	animation: agchat-blink 1.2s infinite;
}
.agchat-msg--typing span:nth-child(2) { animation-delay: .2s; }
.agchat-msg--typing span:nth-child(3) { animation-delay: .4s; }
@keyframes agchat-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.agchat-inputrow {
	display: flex;
	gap: 8px;
	padding: 12px;
	background: #fff;
	border-top: 1px solid rgba(36, 82, 140, .1);
}
.agchat-input {
	flex: 1;
	border: 1.5px solid rgba(36, 82, 140, .25);
	border-radius: 999px;
	padding: 10px 16px;
	font-size: 14px;
	outline: none;
	color: var(--agchat-ink);
	background: #fff;
	min-width: 0;
}
.agchat-input:focus { border-color: var(--agchat-blue); }
.agchat-send {
	background: var(--agchat-red);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	flex: none;
	transition: transform .12s ease, opacity .12s ease;
}
.agchat-send:hover { transform: scale(1.04); }
.agchat-send:disabled { opacity: .5; cursor: default; transform: none; }

.agchat-disclaimer {
	font-size: 10.5px;
	color: rgba(51,51,51,.55);
	text-align: center;
	padding: 0 12px 10px;
	background: #fff;
	line-height: 1.5;
}

/* ---------- Version inline (page Chatbot) ---------- */
.agchat--inline .agchat-window {
	height: 560px;
	max-width: 720px;
	margin: 0 auto;
}

/* ---------- Bulle flottante ---------- */
.agchat-fab {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 99998;
	width: 60px; height: 60px;
	border-radius: 50%;
	background: var(--agchat-red);
	color: #fff;
	border: 0;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(232, 63, 57, .4);
	display: flex; align-items: center; justify-content: center;
	transition: transform .15s ease;
}
.agchat-fab:hover { transform: scale(1.08); }
.agchat-fab svg { width: 28px; height: 28px; }

.agchat-panel {
	position: fixed;
	right: 22px;
	bottom: 94px;
	z-index: 99999;
	width: min(380px, calc(100vw - 32px));
	height: min(560px, calc(100vh - 130px));
	display: none;
}
.agchat-panel.is-open { display: block; }

@media (max-width: 480px) {
	.agchat-panel { right: 16px; bottom: 88px; }
	.agchat--inline .agchat-window { height: 480px; }
}
