/* Comhi-Tech Chat IA — styles du widget */

#comhi-chat-root {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Bulle flottante */
#comhi-chat-bubble {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #1a73e8;
	color: #fff;
	border: none;
	font-size: 26px;
	line-height: 56px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	z-index: 9999;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#comhi-chat-bubble:hover {
	transform: scale(1.05);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Fenêtre de chat */
#comhi-chat-window {
	position: fixed;
	bottom: 92px;
	right: 24px;
	width: 340px;
	max-height: 520px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	z-index: 9999;
}

#comhi-chat-window.comhi-chat-hidden {
	display: none;
}

/* En-tête */
#comhi-chat-header {
	background: #1a73e8;
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex: 0 0 auto;
}

#comhi-chat-header .comhi-chat-title {
	font-size: 15px;
	font-weight: 600;
}

#comhi-chat-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

/* Zone des messages */
#comhi-chat-messages {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #f7f9fc;
}

.comhi-chat-msg {
	max-width: 80%;
	padding: 9px 13px;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.4;
	word-wrap: break-word;
	white-space: pre-wrap;
}

.comhi-chat-msg.user {
	align-self: flex-end;
	background: #1a73e8;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.comhi-chat-msg.assistant {
	align-self: flex-start;
	background: #e8eaed;
	color: #202124;
	border-bottom-left-radius: 4px;
}

.comhi-chat-msg.typing {
	font-style: italic;
	color: #5f6368;
}

/* Ligne de saisie */
#comhi-chat-input-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #e0e0e0;
	background: #fff;
	flex: 0 0 auto;
}

#comhi-chat-input {
	flex: 1 1 auto;
	border: 1px solid #dadce0;
	border-radius: 20px;
	padding: 9px 14px;
	font-size: 14px;
	outline: none;
}

#comhi-chat-input:focus {
	border-color: #1a73e8;
}

#comhi-chat-send {
	flex: 0 0 auto;
	background: #1a73e8;
	color: #fff;
	border: none;
	border-radius: 20px;
	padding: 9px 16px;
	font-size: 14px;
	cursor: pointer;
}

#comhi-chat-send:hover {
	background: #1666d0;
}

#comhi-chat-send:disabled {
	background: #b0b0b0;
	cursor: not-allowed;
}
