/*! IMMO KLIA - Chatbot du site v1.0.0
 * Mise en page inspirée du chatbot de maxinvest.be (rond en bas à droite, en-tête bleu, accueil centré),
 * aux couleurs du site : bleu #153048, doré #E9DE91 > #C4B14A > #8F7D1D, police Poppins.
 * Rayons : boutons en pilule, cartes et bulles 16 px, champs 12 px.
 */
#imkc {
	--imkc-ink: #153048;
	--imkc-ink-2: #1f4466;
	--imkc-gold: #C4B14A;
	--imkc-gold-d: #8F7D1D;
	--imkc-grad: linear-gradient(180deg, #E9DE91 0%, #C4B14A 52%, #8F7D1D 100%);
	--imkc-ring: linear-gradient(140deg, #E9DE91 0%, #C4B14A 45%, #8F7D1D 100%);
	--imkc-text: #24323f;
	--imkc-muted: #5e6977;
	--imkc-soft: #f1f3f6;
	--imkc-line: #e1e6ec;
	--imkc-field: #cfd6df;
	--imkc-err: #b3261e;
	--imkc-off: var(--imkc-offset, 0px);
	font-family: Poppins, Arial, Helvetica, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--imkc-text);
	-webkit-font-smoothing: antialiased;
}
#imkc *, #imkc *::before, #imkc *::after { box-sizing: border-box; }
#imkc [hidden] { display: none !important; }
#imkc p { margin: 0; }
#imkc button, #imkc input, #imkc select, #imkc textarea { font-family: inherit; letter-spacing: normal; text-transform: none; }
#imkc a { color: var(--imkc-ink); }
#imkc .imkc-ico { width: 18px; height: 18px; flex: 0 0 auto; }

/* Rond en bas à droite ------------------------------------------------ */
#imkc .imkc-launcher {
	position: fixed;
	right: 24px;
	bottom: calc(24px + var(--imkc-off));
	z-index: 9990;
	width: 66px;
	height: 66px;
	padding: 3px;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: var(--imkc-ring);
	box-shadow: 0 12px 26px rgba(21, 48, 72, .28), 0 3px 8px rgba(21, 48, 72, .16);
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease;
}
#imkc .imkc-launcher:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(21, 48, 72, .32), 0 4px 10px rgba(21, 48, 72, .16); }
#imkc .imkc-launcher:focus-visible { outline: 3px solid var(--imkc-ink); outline-offset: 3px; }
#imkc .imkc-launcher__face,
#imkc .imkc-launcher__x {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: radial-gradient(circle at 50% 35%, #24496b 0%, #153048 70%);
	border: 2px solid #fff;
	overflow: hidden;
}
#imkc .imkc-launcher__face img { width: 76%; height: 76%; object-fit: contain; display: block; }
#imkc .imkc-launcher__x { display: none; color: #fff; }
#imkc .imkc-launcher__x .imkc-ico { width: 26px; height: 26px; }
#imkc.imkc--open .imkc-launcher__face { display: none; }
#imkc.imkc--open .imkc-launcher__x { display: flex; }

/* Avatar (papillon IMMO KLIA dans un rond bleu à bord doré) ------------ */
#imkc .imkc-avatar {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	padding: 2px;
	background: var(--imkc-ring);
}
#imkc .imkc-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: radial-gradient(circle at 50% 35%, #24496b 0%, #153048 70%);
	object-fit: contain;
	padding: 14%;
}
#imkc .imkc-avatar--head { width: 40px; height: 40px; }
#imkc .imkc-avatar--msg { width: 30px; height: 30px; margin-top: 2px; }
#imkc .imkc-avatar--big { width: 76px; height: 76px; padding: 3px; box-shadow: 0 8px 20px rgba(21, 48, 72, .16); }

/* Fenêtre ------------------------------------------------------------- */
#imkc .imkc-panel {
	position: fixed;
	right: 24px;
	bottom: calc(104px + var(--imkc-off));
	z-index: 9991;
	width: 410px;
	height: min(640px, calc(100vh - 130px - var(--imkc-off)));
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(21, 48, 72, .26), 0 4px 14px rgba(21, 48, 72, .10);
	transform-origin: 100% 100%;
	animation: imkc-in .2s ease-out;
}
@keyframes imkc-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

#imkc .imkc-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 13px 10px 13px 16px;
	background: var(--imkc-ink);
	color: #fff;
}
#imkc .imkc-head__txt { flex: 1 1 auto; min-width: 0; }
#imkc .imkc-head__title { font-size: 15.5px; font-weight: 600; line-height: 1.25; color: #fff; letter-spacing: .02em; }
#imkc .imkc-head__sub { font-size: 12px; line-height: 1.35; color: rgba(255, 255, 255, .78); }
#imkc .imkc-head__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
}
#imkc .imkc-head__btn .imkc-ico { width: 20px; height: 20px; }
#imkc .imkc-head__btn:hover { background: rgba(255, 255, 255, .12); }
#imkc .imkc-head__btn:focus-visible { outline: 2px solid var(--imkc-gold); outline-offset: 1px; }

/* Conversation -------------------------------------------------------- */
#imkc .imkc-log {
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 18px 16px 12px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fff;
	scrollbar-width: thin;
}
#imkc .imkc-welcome {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 18px 8px 2px;
	text-align: center;
}
#imkc .imkc-welcome__text { font-size: 14.5px; line-height: 1.6; color: var(--imkc-text); max-width: 330px; }
#imkc .imkc-welcome__text strong { color: var(--imkc-ink); font-weight: 600; }

#imkc .imkc-row { display: flex; gap: 10px; align-items: flex-start; max-width: 100%; }
#imkc .imkc-row--user { justify-content: flex-end; }
#imkc .imkc-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: calc(100% - 40px); }
#imkc .imkc-msg {
	padding: 10px 14px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.55;
	overflow-wrap: anywhere;
}
#imkc .imkc-msg--bot { align-self: flex-start; background: var(--imkc-soft); color: var(--imkc-text); border-top-left-radius: 6px; }
#imkc .imkc-row--user .imkc-col { align-items: flex-end; max-width: 85%; }
#imkc .imkc-msg--user { background: var(--imkc-ink); color: #fff; border-top-right-radius: 6px; }
#imkc .imkc-msg a { color: var(--imkc-ink); text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }
#imkc .imkc-msg--user a { color: #fff; }
#imkc .imkc-msg__src { margin-top: 6px; font-size: 12.5px; color: var(--imkc-muted); }
#imkc .imkc-msg__note { margin-top: 6px; font-size: 11.5px; color: var(--imkc-muted); }

/* Écriture en cours */
#imkc .imkc-typing .imkc-msg { display: inline-flex; gap: 4px; padding: 14px 16px; }
#imkc .imkc-typing .imkc-msg span { width: 6px; height: 6px; border-radius: 50%; background: #9aa5b2; animation: imkc-dot 1s infinite ease-in-out; }
#imkc .imkc-typing .imkc-msg span:nth-child(2) { animation-delay: .15s; }
#imkc .imkc-typing .imkc-msg span:nth-child(3) { animation-delay: .3s; }
@keyframes imkc-dot { 0%, 80%, 100% { opacity: .35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Choix --------------------------------------------------------------- */
#imkc .imkc-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 40px; }
#imkc .imkc-actions--center { justify-content: center; padding: 0 4px; }
#imkc .imkc-actions--list { flex-direction: column; align-items: stretch; }
#imkc .imkc-actions--list .imkc-chip { justify-content: flex-start; text-align: left; border-radius: 14px; }
#imkc .imkc-actions--grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
#imkc .imkc-actions--grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
#imkc .imkc-actions--grid .imkc-chip,
#imkc .imkc-actions--grid4 .imkc-chip { justify-content: center; padding: 8px 6px; font-size: 13px; }
#imkc .imkc-actions--form { display: block; }
#imkc .imkc-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-height: 40px;
	margin: 0;
	padding: 8px 15px;
	border: 1.5px solid var(--imkc-ink);
	border-radius: 999px;
	background: #fff;
	color: var(--imkc-ink);
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
#imkc .imkc-chip .imkc-ico { width: 17px; height: 17px; color: var(--imkc-gold-d); }
#imkc .imkc-chip:hover { background: var(--imkc-ink); border-color: var(--imkc-ink); color: #fff; }
#imkc .imkc-chip:hover .imkc-ico { color: var(--imkc-gold); }
#imkc .imkc-chip:focus-visible { outline: 2px solid var(--imkc-gold-d); outline-offset: 2px; }

/* Biens --------------------------------------------------------------- */
#imkc .imkc-cards { display: flex; flex-direction: column; gap: 10px; width: 100%; }
#imkc .imkc-card {
	display: flex;
	gap: 12px;
	padding: 10px;
	background: #fff;
	border: 1px solid var(--imkc-line);
	border-radius: 16px;
	box-shadow: 0 6px 16px rgba(21, 48, 72, .08);
}
#imkc .imkc-card__media {
	flex: 0 0 96px;
	height: 96px;
	border-radius: 12px;
	overflow: hidden;
	background: linear-gradient(135deg, #153048, #24496b);
}
#imkc .imkc-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
#imkc .imkc-card__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#imkc .imkc-card__status {
	align-self: flex-start;
	padding: 1px 9px;
	border: 1px solid var(--imkc-gold);
	border-radius: 999px;
	background: var(--imkc-ink);
	color: #fff;
	font-size: 11px;
	font-weight: 500;
}
#imkc .imkc-card__title {
	color: var(--imkc-ink);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
#imkc .imkc-card__title:hover { text-decoration: underline; }
#imkc .imkc-card__price { font-size: 12px; color: var(--imkc-muted); line-height: 1.35; }
#imkc .imkc-card__price strong { color: var(--imkc-ink); font-size: 14px; font-weight: 600; }
#imkc .imkc-card__meta { font-size: 12px; color: var(--imkc-muted); }
#imkc .imkc-card__acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
#imkc .imkc-mini {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 30px;
	margin: 0;
	padding: 4px 12px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	background: var(--imkc-grad);
	color: var(--imkc-ink);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(143, 125, 29, .22);
}
#imkc .imkc-mini .imkc-ico { width: 14px; height: 14px; }
#imkc .imkc-mini--ghost { background: #fff; border-color: var(--imkc-ink); box-shadow: none; }
#imkc .imkc-mini:hover { transform: translateY(-1px); }
#imkc .imkc-mini:focus-visible { outline: 2px solid var(--imkc-ink); outline-offset: 2px; }

#imkc .imkc-links { display: flex; flex-direction: column; gap: 6px; width: 100%; }
#imkc .imkc-links__title { font-size: 12.5px; color: var(--imkc-muted); }
#imkc .imkc-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 9px 12px;
	border: 1px solid var(--imkc-line);
	border-radius: 12px;
	background: #fff;
	color: var(--imkc-ink);
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
}
#imkc .imkc-link .imkc-ico { width: 16px; height: 16px; color: var(--imkc-gold-d); }
#imkc .imkc-link:hover { border-color: var(--imkc-gold); }

/* Mini formulaires ---------------------------------------------------- */
#imkc .imkc-form {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px;
	margin-left: 40px;
	background: #fff;
	border: 1px solid var(--imkc-line);
	border-radius: 16px;
	box-shadow: 0 6px 16px rgba(21, 48, 72, .08);
}
#imkc .imkc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
#imkc .imkc-field { display: flex; flex-direction: column; gap: 4px; }
#imkc .imkc-field label { font-size: 12.5px; font-weight: 500; color: var(--imkc-muted); }
#imkc .imkc-field input,
#imkc .imkc-field select,
#imkc .imkc-field textarea {
	width: 100%;
	height: 42px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--imkc-field);
	border-radius: 12px;
	background: #fff;
	color: var(--imkc-ink);
	font-size: 14px;
	line-height: 1.4;
	box-shadow: none;
	appearance: auto;
}
#imkc .imkc-field textarea { height: auto; min-height: 74px; padding: 10px 12px; resize: vertical; }
#imkc .imkc-field input:focus,
#imkc .imkc-field select:focus,
#imkc .imkc-field textarea:focus { outline: none; border-color: var(--imkc-gold); box-shadow: 0 0 0 3px rgba(196, 177, 74, .25); }
#imkc .imkc-field [aria-invalid="true"] { border-color: var(--imkc-err); }
#imkc .imkc-field__err,
#imkc .imkc-form__err { font-size: 12px; color: var(--imkc-err); }
#imkc .imkc-consent { display: flex; align-items: flex-start; gap: 8px; }
#imkc .imkc-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--imkc-gold-d); }
#imkc .imkc-consent label { font-size: 12px; line-height: 1.45; color: var(--imkc-muted); }
#imkc .imkc-form__note { font-size: 12px; color: var(--imkc-muted); }
#imkc .imkc-submit {
	width: 100%;
	min-height: 46px;
	margin: 2px 0 0;
	padding: 10px 18px;
	border: 0;
	border-radius: 999px;
	background: var(--imkc-grad);
	color: var(--imkc-ink);
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 8px 18px rgba(143, 125, 29, .28);
	transition: transform .15s ease, box-shadow .15s ease;
}
#imkc .imkc-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 22px rgba(143, 125, 29, .32); }
#imkc .imkc-submit:disabled { opacity: .7; cursor: progress; transform: none; }
#imkc .imkc-submit:focus-visible { outline: 2px solid var(--imkc-ink); outline-offset: 2px; }

/* Zone de saisie ------------------------------------------------------ */
#imkc .imkc-compose {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 12px 14px 14px;
	border-top: 1px solid var(--imkc-line);
	background: #fff;
}
#imkc .imkc-compose__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid var(--imkc-field);
	border-radius: 999px;
	background: #fff;
	color: var(--imkc-ink);
	font-size: 14px;
	box-shadow: 0 2px 8px rgba(21, 48, 72, .06);
}
#imkc .imkc-compose__input:focus { outline: none; border-color: var(--imkc-gold); box-shadow: 0 0 0 3px rgba(196, 177, 74, .22); }
#imkc .imkc-compose__send {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--imkc-ink);
	color: #fff;
	cursor: pointer;
	transition: background-color .15s ease;
}
#imkc .imkc-compose__send .imkc-ico { width: 20px; height: 20px; }
#imkc .imkc-compose__send:hover { background: var(--imkc-ink-2); }
#imkc .imkc-compose__send:disabled { opacity: .55; cursor: progress; }
#imkc .imkc-compose__send:focus-visible { outline: 2px solid var(--imkc-gold-d); outline-offset: 2px; }

/* Bouton « haut de page » du thème : au-dessus du rond */
html.imkc-on .back-to-top-wrap { bottom: calc(var(--imkc-offset, 0px) + 104px) !important; }

/* Téléphone : plein écran --------------------------------------------- */
@media (max-width: 599px) {
	#imkc .imkc-launcher { right: 16px; bottom: calc(16px + var(--imkc-off)); width: 60px; height: 60px; }
	#imkc.imkc--open .imkc-launcher { display: none; }
	#imkc .imkc-panel {
		inset: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		height: 100%;
		height: 100dvh;
		border-radius: 0;
		z-index: 100000;
	}
	#imkc .imkc-head { padding-top: calc(12px + env(safe-area-inset-top)); }
	#imkc .imkc-compose { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
	#imkc .imkc-compose__input,
	#imkc .imkc-field input,
	#imkc .imkc-field select,
	#imkc .imkc-field textarea { font-size: 16px; }
	#imkc .imkc-actions { padding-left: 0; }
	#imkc .imkc-form { margin-left: 0; }
	html.imkc-on .back-to-top-wrap { bottom: calc(var(--imkc-offset, 0px) + 88px) !important; }
	html.imkc-lock, html.imkc-lock body { overflow: hidden !important; }
}
@media (min-width: 600px) and (max-height: 700px) {
	#imkc .imkc-panel { height: calc(100vh - 120px - var(--imkc-off)); }
}

@media (prefers-reduced-motion: reduce) {
	#imkc .imkc-panel { animation: none; }
	#imkc .imkc-launcher, #imkc .imkc-submit, #imkc .imkc-mini { transition: none; }
	#imkc .imkc-launcher:hover, #imkc .imkc-submit:hover, #imkc .imkc-mini:hover { transform: none; }
	#imkc .imkc-typing .imkc-msg span { animation: none; opacity: .6; }
}

@media print { #imkc { display: none !important; } }

/* 28/11/2026 : coins de la fenêtre -------------------------------------
   Plus de coins blancs derrière l'en-tête bleu arrondi : le fond blanc ne sort
   plus des arrondis (en-tête arrondi en haut, zone de saisie arrondie en bas),
   même pendant l'animation d'ouverture ou si le navigateur coupe mal les coins. */
#imkc .imkc-panel { background: transparent; isolation: isolate; }
#imkc .imkc-head { border-radius: 16px 16px 0 0; }
#imkc .imkc-log { background: #fff; }
#imkc .imkc-compose { background: #fff; border-radius: 0 0 16px 16px; }
@media (max-width: 599px) {
	#imkc .imkc-panel { background: #fff; }
	#imkc .imkc-head,
	#imkc .imkc-compose { border-radius: 0; }
}

/* 30/11/2026 : boutons dorés du chat identiques aux boutons dorés du site ----
   Mêmes variables que le site (--ik-btn-or…, définies par immoklia-home-cta.php) :
   dégradé horizontal doré, texte blanc en gras avec ombre légère, ombre douce,
   le bouton monte au survol. Valeurs de secours si les variables manquent. */
#imkc .imkc-submit,
#imkc .imkc-mini:not(.imkc-mini--ghost),
#imkc .imkc-mini--ghost:hover,
#imkc .imkc-mini--ghost:focus-visible {
	background: var(--ik-btn-or, linear-gradient(90deg, #e9de91 0%, #c4b14a 50%, #8f7d1d 100%));
	border-color: transparent;
	color: var(--ik-btn-or-texte, #fff);
	text-shadow: var(--ik-btn-or-texte-ombre, 0 1px 2px rgba(21, 48, 72, .35));
	font-weight: 600;
}
#imkc .imkc-submit,
#imkc .imkc-mini:not(.imkc-mini--ghost) {
	box-shadow: var(--ik-btn-or-ombre, 0 10px 22px rgba(21, 48, 72, .18));
	transition: transform .3s ease-out, box-shadow .25s;
}
#imkc .imkc-mini { transition: transform .3s ease-out, box-shadow .25s; }
#imkc .imkc-submit:not(:disabled):hover,
#imkc .imkc-submit:focus-visible {
	transform: translateY(-4px);
	box-shadow: var(--ik-btn-or-ombre-survol, 0 14px 28px rgba(21, 48, 72, .24));
}
#imkc .imkc-mini:hover,
#imkc .imkc-mini:focus-visible {
	transform: translateY(-2px);
	box-shadow: var(--ik-btn-or-ombre-survol, 0 14px 28px rgba(21, 48, 72, .24));
}
#imkc .imkc-submit:disabled { transform: none; }
@media (prefers-reduced-motion: reduce) {
	#imkc .imkc-submit:not(:disabled):hover, #imkc .imkc-mini:hover { transform: none; }
}
