/* Widget de chat "Linéa" */

.linea-widget {
	position: fixed;
	right: 22px;
	/* Positionné au-dessus du bouton "retour en haut" (46px + marge) pour ne pas se superposer. */
	bottom: 82px;
	z-index: 1050;
	font-family: inherit;
}

@media (max-width: 991.98px) {
	.linea-widget {
		right: 16px;
		bottom: 76px;
	}
}

.linea-bubble {
	display: flex;
	align-items: center;
	gap: 10px;
	border: none;
	border-radius: 999px;
	padding: 10px 18px 10px 10px;
	background: #1f2a44;
	color: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
	cursor: pointer;
	transition: transform .15s ease;
}

.linea-bubble:hover {
	transform: translateY(-2px);
}

.linea-bubble__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	background: #fff;
}

.linea-bubble__label {
	font-size: .95rem;
	font-weight: 600;
	white-space: nowrap;
}

.linea-panel {
	position: fixed;
	right: 22px;
	bottom: 150px;
	width: min(360px, calc(100vw - 32px));
	max-height: min(520px, calc(100vh - 200px));
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, .22);
	overflow: hidden;
}

.linea-panel__header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: #1f2a44;
	color: #fff;
}

.linea-panel__avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	object-fit: cover;
	background: #fff;
}

.linea-panel__title {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
	flex: 1;
}

.linea-panel__title span {
	font-size: .78rem;
	opacity: .8;
}

.linea-panel__close {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.linea-panel__messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #f6f7fb;
}

.linea-msg {
	max-width: 85%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: .92rem;
	line-height: 1.4;
}

.linea-msg--bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e5e7eb;
}

.linea-msg--bot a {
	color: #1f2a44;
	font-weight: 600;
	text-decoration: underline;
}

.linea-msg--user {
	align-self: flex-end;
	background: #1f2a44;
	color: #fff;
}

.linea-msg--typing {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e5e7eb;
	color: #9ca3af;
	font-style: italic;
}

.linea-panel__form {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #e5e7eb;
	background: #fff;
}

.linea-panel__form textarea {
	flex: 1;
	resize: none;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	padding: 8px 10px;
	font-size: .9rem;
	max-height: 90px;
	font-family: inherit;
}

.linea-panel__form button {
	border: none;
	background: #1f2a44;
	color: #fff;
	border-radius: 10px;
	width: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.linea-panel__form button:disabled {
	opacity: .5;
	cursor: default;
}

@media (max-width: 480px) {
	.linea-bubble__label {
		display: none;
	}

	.linea-panel {
		right: 16px;
		bottom: 140px;
	}
}
