/* Bouton fixe : accès rapide au chat MxChat dans le footer */

.footer-chat-scroll-btn {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	padding: 10px;
	border: 2px solid #E23D3D;
	border-radius: 50%;
	background-color: #ffffff;
	cursor: pointer;
	line-height: 0;
	box-sizing: border-box;
	box-shadow: 0 4px 14px rgba(34, 34, 34, 0.22);
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
	overflow: hidden;
}

.footer-chat-scroll-btn__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center center;
}

.footer-chat-scroll-btn.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.footer-chat-scroll-btn:hover,
.footer-chat-scroll-btn:focus {
	background-color: #ffffff;
	transform: scale(1.05);
	box-shadow: 0 6px 18px rgba(226, 61, 61, 0.35);
}

.footer-chat-scroll-btn:focus {
	outline: 2px solid #222222;
	outline-offset: 3px;
}

/* -------------------------------------------------------------------------
 * Chat MxChat embarqué dans le footer (NEFLETTE)
 * ------------------------------------------------------------------------- */

footer .col-widget-3.col-widget-3--chat {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	/* style.css : 4vw / 12vw — décale le chat vers la gauche dans le dégradé */
	padding-left: 28px !important;
	padding-right: 28px !important;
	box-sizing: border-box;
}

footer .col-footer-newsletter.col-footer-newsletter--chat {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: none;
	margin: 0;
}

.footer-mxchat {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
}

#footer-mxchat-chatbot.footer-mxchat .mxchat-chatbot-wrapper {
	width: 100% !important;
	max-width: min(100%, 380px) !important;
	margin-left: auto !important;
	margin-right: auto !important;
	border: 2px solid #E23D3D;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(34, 34, 34, 0.18);
	background-color: #ffffff;
	height: 520px !important;
	max-height: min(520px, calc(100vh - 120px)) !important;
	overflow: hidden;
}

.footer-mxchat .mxchat-chatbot-wrapper .chatbot-top-bar {
	background: #E23D3D !important;
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	padding: 10px 14px;
	min-height: 52px;
}

.footer-mxchat .mxchat-chatbot-wrapper .chatbot-top-bar .chatbot-title {
	font-family: "Lato", sans-serif !important;
	font-weight: 700 !important;
	font-size: 16px !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #ffffff !important;
}

.footer-mxchat .mxchat-chatbot-wrapper .chatbot-top-bar .chat-mode-indicator {
	background: rgba(255, 255, 255, 0.2) !important;
	color: #ffffff !important;
	font-family: "Lato", sans-serif;
	font-size: 12px;
}

.footer-mxchat .mxchat-chatbot-wrapper .chatbot-top-bar .mxchat-header-btn,
.footer-mxchat .mxchat-chatbot-wrapper .chatbot-top-bar .mxchat-menu-trigger {
	color: #ffffff !important;
}

.footer-mxchat .mxchat-chatbot {
	background-color: #ffffff !important;
}

.footer-mxchat .mxchat-chatbot .chat-container .chat-box {
	padding: 16px 14px 8px;
	background-color: #ffffff;
}

.footer-mxchat .mxchat-chatbot .chat-container .chat-box .bot-message,
.footer-mxchat .mxchat-chatbot .chat-container .chat-box .agent-message,
.footer-mxchat .mxchat-chatbot .chat-container .chat-box .mxchat-intro-message {
	background: #E23D3D !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 12px !important;
	box-shadow: none !important;
}

.footer-mxchat .mxchat-chatbot .chat-container .chat-box .bot-message a {
	color: #ffffff !important;
}

.footer-mxchat .mxchat-popular-questions {
	padding: 0 14px 8px;
}

.footer-mxchat .mxchat-popular-questions-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	max-height: 220px;
}

.footer-mxchat .mxchat-popular-question {
	width: 100%;
	max-width: 320px;
	padding: 12px 16px;
	text-align: center;
	background-color: #ffffff;
	border: 1px solid #cccccc;
	border-radius: 8px;
	color: #222222;
	font-family: "Lato", sans-serif;
	font-size: 14px;
	line-height: 20px;
	box-shadow: none;
}

.footer-mxchat .mxchat-popular-question:hover {
	background-color: #f8f8f8;
	border-color: #aaaaaa;
	transform: none;
}

.footer-mxchat .mxchat-chatbot .chat-container .input-container {
	margin: 0 14px 12px;
	border: 1px solid #cccccc;
	border-radius: 10px;
	background-color: #ffffff;
}

.footer-mxchat .mxchat-chatbot .chat-container .input-container .chat-input {
	font-family: "Lato", sans-serif;
	font-size: 15px;
	color: #222222;
}

.footer-mxchat .mxchat-chatbot .chat-container .input-container .chat-input::placeholder {
	color: #888888;
}

.footer-mxchat .mxchat-chatbot-wrapper .chatbot-footer {
	padding: 8px 14px 12px;
	font-family: "Lato", sans-serif;
	color: #666666;
}

.footer-mxchat .mxchat-chatbot-wrapper .chatbot-footer .privacy-notice {
	font-weight: 400;
	color: #666666;
}

.footer-mxchat .mxchat-chatbot-wrapper .chatbot-footer .privacy-notice a {
	color: #E23D3D;
	font-weight: bold;
	text-decoration: none;
}

@media screen and (max-width: 767px) {
	.footer-chat-scroll-btn {
		right: 12px;
		bottom: 12px;
		width: 56px;
		height: 56px;
		padding: 8px;
		border-width: 2px;
		box-shadow: 0 3px 10px rgba(34, 34, 34, 0.2);
	}

	footer .col-widget-3.col-widget-3--chat {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	#footer-mxchat-chatbot.footer-mxchat .mxchat-chatbot-wrapper {
		max-width: 100% !important;
		height: min(520px, calc(100dvh - 100px)) !important;
		max-height: min(520px, calc(100dvh - 100px)) !important;
	}
}

/*
 * Scroll to top (legacy — réactiver avec le bouton commenté dans footer.php)
 *
 * #scrollToTop {
 *     display: none;
 *     position: fixed;
 *     bottom: 10px;
 *     right: 10px;
 *     z-index: 99;
 *     border: none;
 *     outline: none;
 *     background-color: #E23D3D !important;
 *     color: #ffffff !important;
 *     cursor: pointer;
 *     padding: 10px 15px;
 *     border-radius: 5px;
 *     font-size: 20px;
 * }
 *
 * #scrollToTop:hover {
 *     background-color: #E23D3D;
 * }
 */
