/*
 * SF Chat — widget visiteur.
 * Palette bleu nuit / or, empruntée à l'identité du cabinet.
 * Aucune police distante n'est chargée : le widget hérite de celle du site.
 */

.sfchat-root {
	--sfchat-accent: #1b2a5c;
	--sfchat-gold: #c9a227;
	--sfchat-ink: #14182b;
	--sfchat-paper: #ffffff;
	--sfchat-veil: #f4f2ee;
	--sfchat-line: rgba( 20, 24, 43, 0.12 );
	--sfchat-muted: #6b7185;
	--sfchat-radius: 14px;
	--sfchat-shadow: 0 18px 48px -12px rgba( 20, 24, 43, 0.34 );

	position: fixed;
	inset: auto 0 0 auto;
	z-index: 99990;
	font-size: 15px;
	line-height: 1.5;
	color: var( --sfchat-ink );
	-webkit-font-smoothing: antialiased;
}

.sfchat-root *,
.sfchat-root *::before,
.sfchat-root *::after {
	box-sizing: border-box;
}

.sfchat-root--left {
	inset: auto auto 0 0;
}

/* ---------------------------------------------------------------- Bulle */

.sfchat-launcher {
	position: fixed;
	right: 22px;
	bottom: 22px;
	width: 60px;
	height: 60px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var( --sfchat-accent );
	color: #fff;
	cursor: pointer;
	box-shadow: var( --sfchat-shadow );
	transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.sfchat-root--left .sfchat-launcher {
	right: auto;
	left: 22px;
}

.sfchat-launcher:hover {
	transform: translateY( -2px );
}

.sfchat-launcher:focus-visible {
	outline: 3px solid var( --sfchat-gold );
	outline-offset: 3px;
}

.sfchat-launcher svg {
	width: 26px;
	height: 26px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/*
 * Signature du widget : un halo qui se dilate sur un cycle de 5,5 s,
 * le rythme d'une respiration calme. Il ne bat que lorsque le cabinet répond
 * en direct — la disponibilité se lit avant même d'ouvrir le panneau.
 */
.sfchat-launcher::before {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 1px solid var( --sfchat-gold );
	opacity: 0;
}

.sfchat-root--online .sfchat-launcher::before {
	animation: sfchat-breathe 5.5s ease-in-out infinite;
}

@keyframes sfchat-breathe {
	0%   { transform: scale( 0.94 ); opacity: 0; }
	28%  { opacity: 0.85; }
	55%  { transform: scale( 1.16 ); opacity: 0; }
	100% { transform: scale( 0.94 ); opacity: 0; }
}

.sfchat-badge {
	position: absolute;
	top: -3px;
	right: -3px;
	min-width: 21px;
	height: 21px;
	padding: 0 5px;
	display: none;
	place-items: center;
	border-radius: 11px;
	background: var( --sfchat-gold );
	color: #241d00;
	font-size: 12px;
	font-weight: 700;
}

.sfchat-badge.is-visible {
	display: grid;
}

/* -------------------------------------------------------------- Panneau */

.sfchat-panel {
	position: fixed;
	right: 22px;
	bottom: 94px;
	width: 372px;
	min-height: min( 420px, calc( 100vh - 130px ) );
	max-height: min( 620px, calc( 100vh - 130px ) );
	display: none;
	flex-direction: column;
	overflow: hidden;
	border-radius: var( --sfchat-radius );
	background: var( --sfchat-paper );
	box-shadow: var( --sfchat-shadow );
}

.sfchat-root--left .sfchat-panel {
	right: auto;
	left: 22px;
}

.sfchat-panel.is-open {
	display: flex;
	animation: sfchat-rise 0.26s cubic-bezier( 0.2, 0.8, 0.3, 1 );
}

@keyframes sfchat-rise {
	from { opacity: 0; transform: translateY( 12px ); }
	to   { opacity: 1; transform: none; }
}

.sfchat-header {
	padding: 16px 18px 14px;
	background: var( --sfchat-accent );
	color: #fff;
}

.sfchat-header-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.sfchat-header-identity {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.sfchat-header-titles {
	min-width: 0;
}

.sfchat-agent-avatar {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	overflow: hidden;
	background: rgba( 255, 255, 255, 0.16 );
	border: 2px solid rgba( 255, 255, 255, 0.34 );
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.03em;
}

.sfchat-agent-avatar img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sfchat-header h2 {
	margin: 0;
	font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	font-size: 19px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: #fff;
}

.sfchat-header p {
	margin: 2px 0 0;
	font-size: 13px;
	color: rgba( 255, 255, 255, 0.72 );
}

.sfchat-close {
	flex: none;
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.12 );
	color: #fff;
	font-size: 17px;
	line-height: 1;
	cursor: pointer;
}

.sfchat-close:hover {
	background: rgba( 255, 255, 255, 0.22 );
}

.sfchat-status {
	margin-top: 12px;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 4px 10px 4px 8px;
	border-radius: 999px;
	background: rgba( 255, 255, 255, 0.12 );
	font-size: 12.5px;
	letter-spacing: 0.02em;
	color: rgba( 255, 255, 255, 0.92 );
}

.sfchat-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var( --sfchat-gold );
}

.sfchat-root--offline .sfchat-dot {
	background: rgba( 255, 255, 255, 0.4 );
}

/* ---------------------------------------------------------------- Fil */

/*
 * Le fil absorbe seul la réduction de hauteur. Avec `min-height: 150px` et un
 * panneau en `overflow: hidden`, un écran court (téléphone en paysage, portable
 * avec beaucoup de barres) faisait passer le bouton Envoyer sous la découpe.
 */
.sfchat-body {
	flex: 1 1 auto;
	min-height: 0;
	max-height: 100%;
	padding: 16px 18px;
	overflow-y: auto;
	background: var( --sfchat-veil );
	overscroll-behavior: contain;
}

.sfchat-header,
.sfchat-agent-typing,
.sfchat-form {
	flex: 0 0 auto;
}

.sfchat-intro {
	margin: 0 0 14px;
	padding: 12px 14px;
	border-left: 2px solid var( --sfchat-gold );
	background: var( --sfchat-paper );
	border-radius: 0 10px 10px 0;
	font-size: 14px;
	color: var( --sfchat-ink );
}

.sfchat-intro span {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	color: var( --sfchat-muted );
}

.sfchat-msg {
	max-width: 84%;
	margin-bottom: 10px;
	padding: 9px 13px;
	border-radius: 14px;
	font-size: 14.5px;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.sfchat-msg--visitor {
	margin-left: auto;
	border-bottom-right-radius: 4px;
	background: var( --sfchat-accent );
	color: #fff;
}

.sfchat-msg--agent {
	margin-right: auto;
	border-bottom-left-radius: 4px;
	background: var( --sfchat-paper );
	border: 1px solid var( --sfchat-line );
}

/*
 * Séparateur de date et notice locale : discrets, centrés, sans bulle.
 * Le message automatique du serveur, lui, est un vrai message : il doit se
 * lire comme tel, sinon l'accusé de réception passe pour une date.
 */
.sfchat-msg--day,
.sfchat-msg--note {
	max-width: 100%;
	margin: 12px 0;
	padding: 0;
	background: none;
	text-align: center;
	font-size: 12.5px;
	color: var( --sfchat-muted );
}

.sfchat-msg--system {
	margin-right: auto;
	border-bottom-left-radius: 4px;
	border: 1px solid var( --sfchat-line );
	border-left: 3px solid var( --sfchat-gold );
	background: var( --sfchat-paper );
	color: var( --sfchat-ink );
}

.sfchat-msg a {
	color: inherit;
	text-decoration: underline;
}

.sfchat-time {
	display: block;
	margin-top: 4px;
	font-size: 11.5px;
	opacity: 0.62;
}

/* ------------------------------------------------------------ Formulaire */

.sfchat-form {
	padding: 12px 18px 16px;
	border-top: 1px solid var( --sfchat-line );
	background: var( --sfchat-paper );
}

.sfchat-identity {
	display: none;
	gap: 8px;
	flex-direction: column;
	margin-bottom: 10px;
}

.sfchat-identity.is-visible {
	display: flex;
}

.sfchat-field {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var( --sfchat-line );
	border-radius: 9px;
	background: #fff;
	font: inherit;
	font-size: 14px;
	color: var( --sfchat-ink );
}

.sfchat-field:focus {
	outline: 2px solid var( --sfchat-accent );
	outline-offset: -1px;
	border-color: transparent;
}

.sfchat-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 12.5px;
	line-height: 1.45;
	color: var( --sfchat-muted );
}

.sfchat-consent input {
	margin-top: 2px;
	flex: none;
	accent-color: var( --sfchat-accent );
}

.sfchat-consent a {
	color: var( --sfchat-accent );
}

.sfchat-notice {
	margin: 0 0 10px;
	font-size: 12px;
	color: var( --sfchat-muted );
}

.sfchat-compose {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.sfchat-textarea {
	flex: 1;
	min-height: 42px;
	max-height: 132px;
	padding: 10px 12px;
	border: 1px solid var( --sfchat-line );
	border-radius: 10px;
	font: inherit;
	font-size: 14.5px;
	line-height: 1.45;
	resize: none;
	color: var( --sfchat-ink );
	background: #fff;
}

.sfchat-textarea:focus {
	outline: 2px solid var( --sfchat-accent );
	outline-offset: -1px;
	border-color: transparent;
}

.sfchat-send {
	flex: none;
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: var( --sfchat-accent );
	color: #fff;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.sfchat-send:disabled {
	opacity: 0.45;
	cursor: default;
}

.sfchat-send svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sfchat-error {
	display: none;
	margin: 8px 0 0;
	font-size: 13px;
	color: #a1201c;
}

.sfchat-error.is-visible {
	display: block;
}

.sfchat-resume {
	display: none;
	width: 100%;
	margin-top: 8px;
	padding: 8px;
	border: 1px dashed var( --sfchat-line );
	border-radius: 9px;
	background: none;
	font: inherit;
	font-size: 13px;
	color: var( --sfchat-muted );
	cursor: pointer;
}

.sfchat-resume.is-visible {
	display: block;
}

.sfchat-reset {
	display: none;
	margin: 8px auto 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 11.5px;
	color: var( --sfchat-muted );
	text-decoration: underline;
	cursor: pointer;
}

.sfchat-reset.is-visible {
	display: block;
}

/* Piège à robots : hors flux et hors lecteurs d'écran. */
.sfchat-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------- Mobile */

@media ( max-width: 520px ) {

	.sfchat-panel {
		right: 0;
		left: 0;
		bottom: 0;
		width: 100%;
		max-height: 100dvh;
		height: 100dvh;
		border-radius: 0;
	}

	.sfchat-root--left .sfchat-panel {
		left: 0;
	}

	.sfchat-launcher {
		right: 16px;
		bottom: 16px;
	}

	.sfchat-root--left .sfchat-launcher {
		left: 16px;
	}
}

@media ( prefers-reduced-motion: reduce ) {

	.sfchat-root--online .sfchat-launcher::before {
		animation: none;
		opacity: 0.5;
	}

	.sfchat-panel.is-open,
	.sfchat-launcher {
		animation: none;
		transition: none;
	}
}


/* ------------------------------------------------------ Pièces jointes */

.sfchat-clip {
	flex: none;
	width: 38px;
	height: 42px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	background: none;
	color: var( --sfchat-muted );
	cursor: pointer;
	border-radius: 8px;
}

.sfchat-clip:hover {
	color: var( --sfchat-accent );
	background: var( --sfchat-veil );
}

.sfchat-clip:disabled {
	opacity: 0.4;
	cursor: default;
}

.sfchat-clip svg {
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.sfchat-file {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 4px;
	padding: 7px 9px;
	border-radius: 9px;
	background: rgba( 255, 255, 255, 0.14 );
	color: inherit;
	text-decoration: none;
	font-size: 13.5px;
}

.sfchat-msg--agent .sfchat-file {
	background: var( --sfchat-veil );
}

.sfchat-file svg {
	flex: none;
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	opacity: 0.8;
}

.sfchat-file span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sfchat-file em {
	display: block;
	font-style: normal;
	font-size: 11.5px;
	opacity: 0.7;
}

.sfchat-file--image {
	display: block;
	padding: 0;
	overflow: hidden;
	background: none;
}

.sfchat-file--image img {
	display: block;
	width: 100%;
	max-height: 190px;
	object-fit: cover;
	border-radius: 9px;
}

.sfchat-file--image span {
	display: block;
	padding: 4px 2px 0;
	font-size: 11.5px;
	opacity: 0.75;
}

.sfchat-panel.is-dropping {
	outline: 2px dashed var( --sfchat-gold );
	outline-offset: -6px;
}

.sfchat-file--audio {
	display: block;
	padding: 6px 0 0;
	background: none;
}

.sfchat-file--audio audio {
	width: 100%;
	height: 34px;
}

.sfchat-file--audio em {
	display: block;
	margin-top: 3px;
	font-style: normal;
	font-size: 11.5px;
	opacity: 0.75;
}

/* 1.5 — indicateur de frappe opérateur. */
.sfchat-agent-typing {
	min-height: 24px;
	padding: 3px 18px 0;
	background: var( --sfchat-paper );
	color: var( --sfchat-muted );
	font-size: 12px;
	font-style: italic;
}
.sfchat-agent-typing:not(.is-visible) { visibility: hidden; }

/* Nom réel de l'opérateur ayant envoyé la réponse. */
.sfchat-agent-name {
	display: block;
	margin-bottom: 3px;
	font-size: 11px;
	font-weight: 700;
	opacity: .78;
}


/* 1.8.6 — lecture vocale robuste sur téléphone. */
.sfchat-audio-fallback { display: inline-block; margin-top: 4px; font-size: 11.5px; }
@media ( max-width: 520px ) {
	.sfchat-file--audio { width: 100%; min-width: 0; }
	.sfchat-file--audio audio { display: block; width: 100%; min-width: 0; height: 44px; }
}


/*
 * 1.8.11 — vocal refusé par le lecteur du système (iOS notamment).
 * Le lecteur natif barré ne dit rien à l'utilisateur : on l'efface au profit
 * d'un lien de téléchargement explicite.
 */
/* Le lecteur reste en place : le masquer supprimait toute possibilité de
   réessayer, y compris quand l'échec n'était que passager. */

.sfchat-file--audio.is-unplayable::before {
	content: "Format non lisible par ce navigateur.";
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
	opacity: 0.85;
}

.sfchat-file--audio.is-unplayable .sfchat-audio-fallback {
	display: inline-block;
	padding: 6px 10px;
	border: 1px solid currentColor;
	border-radius: 8px;
	font-size: 12.5px;
	text-decoration: none;
}

/* Turnstile 1.9.0 : challenge uniquement avant la premiere conversation. */
.sfchat-turnstile{margin-top:8px;min-height:65px;max-width:100%;overflow:hidden;}
.sfchat-turnstile iframe{max-width:100%;}

/* 1.10.3 — assistant contextuel, recommandations scrollables et actions toujours visibles. */
.sfchat-profile-assistant{display:none;padding:0 12px 8px;background:#fff}
.sfchat-profile-assistant.is-visible{display:block}
.sfchat-profile-card{border:1px solid #d9dde7;border-radius:12px;padding:10px;background:#f8f9fc;font-size:13px;line-height:1.35}
.sfchat-profile-intro,.sfchat-profile-prompt{margin:0 0 8px;color:#566070}
.sfchat-profile-context{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap;margin:0 0 8px;padding:6px 8px;border-radius:8px;background:#eef2ff;color:#283347}.sfchat-profile-context strong{font-size:12px}.sfchat-profile-context span{font-size:12px}
.sfchat-profile-notice{margin:0 0 8px;padding:6px 8px;border-radius:8px;background:#fff8db;color:#554a20;font-size:12px}
.sfchat-profile-prompt{color:#283347}
.sfchat-profile-question{display:block;margin:0 0 8px;color:#1f2937}
.sfchat-profile-options,.sfchat-profile-menu{display:flex;flex-wrap:wrap;gap:6px}
.sfchat-profile-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.sfchat-profile-options button,.sfchat-profile-menu button,.sfchat-profile-location button,.sfchat-profile-event-actions button,.sfchat-profile-event-actions a,.sfchat-profile-event-next button,.sfchat-profile-nav button{border:1px solid var(--sfchat-accent);background:#fff;color:var(--sfchat-accent);border-radius:9px;padding:8px 10px;cursor:pointer;font:inherit;text-decoration:none;text-align:center}
.sfchat-profile-options button:hover,.sfchat-profile-menu button:hover,.sfchat-profile-location button:hover,.sfchat-profile-event-actions button:hover,.sfchat-profile-event-actions a:hover,.sfchat-profile-event-next button:hover,.sfchat-profile-nav button:hover{background:var(--sfchat-accent);color:#fff}
.sfchat-profile-location{display:grid;grid-template-columns:1fr 110px auto;gap:6px}
.sfchat-profile-location input{min-width:0;border:1px solid #cbd1dc;border-radius:8px;padding:7px 8px;font:inherit}
.sfchat-profile-geolocate{margin-top:7px;border:1px solid var(--sfchat-accent);background:#fff;color:var(--sfchat-accent);border-radius:999px;padding:7px 10px;cursor:pointer;font:inherit}
.sfchat-profile-geolocate:hover{background:var(--sfchat-accent);color:#fff}
.sfchat-profile-skip{margin-top:8px;border:0;background:transparent;color:#687386;text-decoration:underline;cursor:pointer;padding:2px;font:inherit}
.sfchat-profile-events{margin-top:9px;display:grid;gap:8px}
.sfchat-profile-event-card{border:1px solid #dce2ec;border-radius:10px;background:#fff;padding:9px;display:grid;gap:8px}
.sfchat-profile-event-main{min-width:0}.sfchat-profile-event-main strong{display:block;color:#202a3d}.sfchat-profile-event-main small{display:block;margin-top:3px;color:#687386}
.sfchat-profile-event-main .sfchat-profile-availability{color:#4c5f3d;font-weight:700}
.sfchat-profile-event-actions{display:flex;flex-wrap:wrap;gap:6px}
.sfchat-profile-event-actions a,.sfchat-profile-event-actions button{padding:6px 8px;font-size:12px;line-height:1.2}
.sfchat-profile-event-actions a{font-weight:700}
.sfchat-profile-event-next,.sfchat-profile-nav{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
.sfchat-profile-event-next button,.sfchat-profile-nav button{padding:6px 8px;font-size:12px;background:#fdfdff}
.sfchat-profile-selected-event{margin:8px 0;border-left:3px solid var(--sfchat-gold);padding:6px 8px;background:#fff}
.sfchat-profile-selected-event strong,.sfchat-profile-selected-event small{display:block}.sfchat-profile-selected-event small{margin-top:2px;color:#687386}
@media(max-width:520px){
	.sfchat-profile-assistant{padding:0 8px 6px}
	.sfchat-profile-card{padding:9px}
	.sfchat-profile-location{grid-template-columns:1fr 105px}
	.sfchat-profile-location button{grid-column:1/-1}
	.sfchat-profile-menu{grid-template-columns:1fr}
	.sfchat-profile-event-card{padding:10px}
	.sfchat-profile-event-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
	.sfchat-profile-event-actions a{grid-column:1/-1}
	.sfchat-profile-event-actions a,.sfchat-profile-event-actions button{min-height:38px;display:flex;align-items:center;justify-content:center;white-space:normal}
	.sfchat-profile-event-next,.sfchat-profile-nav{display:grid;grid-template-columns:1fr 1fr}
	.sfchat-profile-event-next button,.sfchat-profile-nav button{min-height:36px;white-space:normal}
}


/* 1.10.3 : en mode recommandations, seule la liste des formations défile.
 * La barre d'actions reste toujours visible, même sur un petit iPhone. */
.sfchat-profile-assistant.is-events{
	flex:0 1 auto;
	min-height:0;
	max-height:min(52dvh,390px);
	overflow:hidden;
}
.sfchat-profile-assistant.is-events .sfchat-profile-card{
	display:flex;
	flex-direction:column;
	min-height:0;
	max-height:100%;
	overflow:hidden;
}
.sfchat-profile-assistant.is-events .sfchat-profile-events{
	display:flex;
	flex-direction:column;
	min-height:0;
	margin-top:0;
	flex:1 1 auto;
}
.sfchat-profile-events-list{
	display:grid;
	gap:8px;
	min-height:0;
	overflow-y:auto;
	overscroll-behavior:contain;
	-webkit-overflow-scrolling:touch;
	padding:1px 3px 2px 0;
	scrollbar-gutter:stable;
}
.sfchat-profile-event-filters{flex:0 0 auto;display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-top:7px;padding-top:7px;border-top:1px solid #dce2ec;font-size:11.5px;color:#687386}.sfchat-profile-event-filters span{font-weight:700}.sfchat-profile-event-filters button{border:1px solid var(--sfchat-accent);background:#fff;color:var(--sfchat-accent);border-radius:999px;padding:4px 8px;cursor:pointer;font:inherit;font-size:11.5px}.sfchat-profile-event-filters button.is-active{background:var(--sfchat-accent);color:#fff}
.sfchat-profile-actionbar{
	flex:0 0 auto;
	display:grid;
	grid-template-columns:repeat(2,minmax(0,1fr));
	gap:6px;
	margin-top:8px;
	padding-top:8px;
	border-top:1px solid #dce2ec;
	background:#f8f9fc;
}
.sfchat-profile-actionbar button{
	min-width:0;
	min-height:36px;
	border:1px solid var(--sfchat-accent);
	background:#fff;
	color:var(--sfchat-accent);
	border-radius:9px;
	padding:6px 7px;
	cursor:pointer;
	font:inherit;
	font-size:12px;
	line-height:1.2;
	white-space:normal;
}
.sfchat-profile-actionbar button:hover{background:var(--sfchat-accent);color:#fff}
@media(max-width:520px){
	.sfchat-profile-assistant.is-events{max-height:min(48dvh,350px)}
	.sfchat-profile-events-list{max-height:245px}
	.sfchat-profile-event-card{gap:6px;padding:8px}
	.sfchat-profile-event-actions a,.sfchat-profile-event-actions button{min-height:34px;padding:5px 6px;font-size:11.5px}
	.sfchat-profile-actionbar{position:relative;z-index:2;margin-left:-1px;margin-right:-1px;padding-bottom:1px}
}
@media(min-width:521px){
	.sfchat-profile-events-list{max-height:285px}
}

/* 1.10.9 — confirmation explicite de la ville détectée. */
.sfchat-profile-location-confirm{display:flex;flex-wrap:wrap;gap:7px;margin-top:7px}
.sfchat-profile-location-confirm button{border:1px solid var(--sfchat-accent);background:#fff;color:var(--sfchat-accent);border-radius:9px;padding:8px 10px;cursor:pointer;font:inherit}
.sfchat-profile-location-confirm button:first-child{background:var(--sfchat-accent);color:#fff;font-weight:600}
.sfchat-profile-location-edit{margin-top:8px}
.sfchat-profile-location-edit[hidden]{display:none!important}
@media(max-width:520px){
	.sfchat-profile-location-confirm{display:grid;grid-template-columns:1fr 1fr}
	.sfchat-profile-location-confirm button{min-height:38px;padding:7px 8px}
}

/* 1.10.9 — confirmation robuste, attribution OSM discrète et safe-area iPhone. */
.sfchat-profile-attribution{display:block;margin-top:8px;padding-top:6px;border-top:1px solid rgba(20,24,43,.08);font-size:9.5px;line-height:1.25;color:#8a91a1;text-align:right}
@media(max-width:520px){
  .sfchat-panel{height:100svh;max-height:100svh;}
  @supports(height:100dvh){.sfchat-panel{height:100dvh;max-height:100dvh;}}
  .sfchat-form{padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px));}
  .sfchat-body{padding:12px 12px 10px;}
  .sfchat-profile-attribution{font-size:9px;margin-top:6px;}
}


/* 1.10.10 — les cartes TEC ne doivent jamais s'effondrer à 0 px sur mobile. */
.sfchat-profile-assistant.is-events .sfchat-profile-events-list{
	flex:1 1 150px;
	min-height:110px;
	max-height:none;
}
.sfchat-panel.has-profile-events .sfchat-body{
	flex:0 1 120px;
	min-height:56px;
	max-height:135px;
}
.sfchat-panel.has-profile-events .sfchat-profile-assistant.is-events{
	flex:1 1 250px;
	min-height:220px;
	max-height:none;
}
.sfchat-panel.has-profile-events .sfchat-profile-assistant.is-events .sfchat-profile-card{
	height:100%;
}
@media(max-width:520px){
	.sfchat-panel.has-profile-events .sfchat-body{
		flex-basis:92px;
		min-height:48px;
		max-height:112px;
	}
	.sfchat-panel.has-profile-events .sfchat-profile-assistant.is-events{
		flex:1 1 260px;
		min-height:230px;
		max-height:none;
		padding:0 8px 5px;
	}
	.sfchat-profile-assistant.is-events .sfchat-profile-events-list{
		flex:1 1 135px;
		min-height:118px;
		max-height:none;
	}
	.sfchat-profile-assistant.is-events .sfchat-profile-prompt{
		margin-bottom:5px;
		line-height:1.25;
	}
	.sfchat-profile-assistant.is-events .sfchat-profile-context{
		margin-bottom:5px;
		padding:5px 7px;
	}
	.sfchat-profile-event-filters{
		flex-wrap:wrap;
		overflow:visible;
		padding-bottom:1px;
	}
	.sfchat-profile-event-filters button{
		flex:0 0 auto;
		white-space:nowrap;
	}
	.sfchat-profile-actionbar{
		display:flex;
		flex-wrap:nowrap;
		overflow-x:auto;
		gap:5px;
		padding-top:6px;
		margin-top:6px;
		-webkit-overflow-scrolling:touch;
	}
	.sfchat-profile-actionbar button{
		flex:0 0 auto;
		min-height:34px;
		padding:5px 8px;
		white-space:nowrap;
	}
}


/* 1.10.11 — un seul scroller pour l'assistant de recommandations.
 * Les cartes ne vivent plus dans un scroller imbrique qui pouvait etre
 * rogne a quelques pixels selon la hauteur CSS reelle du navigateur. */
.sfchat-panel.has-profile-events .sfchat-profile-assistant.is-events{
	min-height:0;
	overflow:hidden;
}
.sfchat-panel.has-profile-events .sfchat-profile-assistant.is-events .sfchat-profile-card{
	height:100%;
	min-height:0;
	display:block;
	overflow-y:auto;
	overflow-x:hidden;
	overscroll-behavior:contain;
	-webkit-overflow-scrolling:touch;
	scrollbar-gutter:stable;
}
.sfchat-profile-assistant.is-events .sfchat-profile-events{
	display:block;
	min-height:0;
	margin-top:8px;
}
.sfchat-profile-assistant.is-events .sfchat-profile-events-list{
	display:grid;
	gap:8px;
	flex:none;
	min-height:0;
	max-height:none;
	overflow:visible;
	padding:4px 2px 6px 0;
}
.sfchat-profile-assistant.is-events .sfchat-profile-event-card{
	min-height:max-content;
}
.sfchat-profile-assistant.is-events .sfchat-profile-event-filters,
.sfchat-profile-assistant.is-events .sfchat-profile-actionbar{
	position:relative;
	z-index:2;
}
@media(max-width:520px){
	.sfchat-panel.has-profile-events .sfchat-profile-assistant.is-events{
		min-height:165px;
	}
	.sfchat-panel.has-profile-events .sfchat-profile-assistant.is-events .sfchat-profile-card{
		padding-bottom:8px;
	}
	.sfchat-profile-assistant.is-events .sfchat-profile-events-list{
		min-height:0;
	}
}


/* 1.10.12 — rendu TEC direct et resistant aux styles du thème.
 * Les cartes sont désormais des enfants directs de .sfchat-profile-events :
 * aucun wrapper de liste ne peut s'effondrer entre le titre et les dates. */
.sfchat-profile-assistant.is-events .sfchat-profile-events{
	display:block!important;
	height:auto!important;
	min-height:0!important;
	max-height:none!important;
	overflow:visible!important;
}
.sfchat-profile-assistant.is-events .sfchat-profile-events-title{
	display:block;
	margin:0 0 6px;
}
.sfchat-profile-assistant.is-events .sfchat-profile-event-card{
	display:block!important;
	position:relative!important;
	float:none!important;
	clear:both!important;
	width:100%!important;
	height:auto!important;
	min-height:72px!important;
	max-height:none!important;
	margin:0 0 8px!important;
	overflow:visible!important;
	visibility:visible!important;
	opacity:1!important;
}
.sfchat-profile-assistant.is-events .sfchat-profile-event-main{display:block!important;min-height:0!important}
.sfchat-profile-assistant.is-events .sfchat-profile-event-actions{margin-top:7px}
@media(max-width:520px){
	.sfchat-profile-assistant.is-events .sfchat-profile-event-card{min-height:66px!important;padding:8px!important}
	.sfchat-profile-assistant.is-events .sfchat-profile-event-actions{display:flex;flex-wrap:wrap;gap:5px}
	.sfchat-profile-assistant.is-events .sfchat-profile-event-actions a,
	.sfchat-profile-assistant.is-events .sfchat-profile-event-actions button{min-height:30px;padding:4px 6px;font-size:11px}
}

/* 1.10.14 — fenêtre mobile compacte.
 * Le chat reste une carte flottante afin de laisser le site visible derrière,
 * tout en utilisant dvh pour suivre la hauteur réellement disponible sur iOS/Android. */
@media ( max-width: 520px ) {
	.sfchat-root .sfchat-panel {
		left: auto;
		right: 12px;
		bottom: calc( 12px + env( safe-area-inset-bottom, 0px ) );
		width: min( 390px, calc( 100vw - 24px ) );
		height: clamp( 460px, 78dvh, 680px );
		min-height: 0;
		max-height: calc( 100dvh - 24px - env( safe-area-inset-bottom, 0px ) );
		border-radius: 16px;
	}

	.sfchat-root--left .sfchat-panel {
		left: 12px;
		right: auto;
	}
}

/* En paysage ou lorsque le clavier réduit fortement le viewport, on garde
 * une marge autour du panneau plutôt que de dépasser de l'écran. */
@media ( max-width: 520px ) and ( max-height: 560px ) {
	.sfchat-root .sfchat-panel {
		bottom: calc( 8px + env( safe-area-inset-bottom, 0px ) );
		width: min( 390px, calc( 100vw - 16px ) );
		height: calc( 100dvh - 16px - env( safe-area-inset-bottom, 0px ) );
		max-height: calc( 100dvh - 16px - env( safe-area-inset-bottom, 0px ) );
		border-radius: 14px;
	}
	.sfchat-root--left .sfchat-panel { left: 8px; }
	.sfchat-root:not(.sfchat-root--left) .sfchat-panel { right: 8px; }
}

/* 1.10.15 — cartes de contact / information déclenchées par les intentions. */
.sfchat-profile-info-card{
	margin:8px 0 2px;
	padding:9px;
	border:1px solid #dce2ec;
	border-radius:10px;
	background:#fff;
}
.sfchat-profile-info-title{display:block;margin-bottom:7px;color:#202a3d;font-size:13px}
.sfchat-profile-info-text{margin:0 0 8px;color:#566070;font-size:12.5px;line-height:1.4}
.sfchat-profile-info-row{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:10px;
	padding:7px 0;
	border-top:1px solid #edf0f5;
}
.sfchat-profile-info-row:first-of-type{border-top:0}
.sfchat-profile-info-row span{min-width:0;display:block}
.sfchat-profile-info-row strong{display:block;font-size:11px;color:#687386;text-transform:uppercase;letter-spacing:.02em}
.sfchat-profile-info-row em{display:block;margin-top:2px;color:#202a3d;font-style:normal;overflow-wrap:anywhere}
.sfchat-profile-info-row a,
.sfchat-profile-info-actions a,
.sfchat-profile-info-actions button{
	flex:0 0 auto;
	border:1px solid var(--sfchat-accent);
	background:#fff;
	color:var(--sfchat-accent);
	border-radius:9px;
	padding:6px 9px;
	font:inherit;
	font-size:12px;
	line-height:1.2;
	text-decoration:none;
	cursor:pointer;
}
.sfchat-profile-info-row a:hover,
.sfchat-profile-info-actions a:hover,
.sfchat-profile-info-actions button:hover{background:var(--sfchat-accent);color:#fff}
.sfchat-profile-info-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;padding-top:8px;border-top:1px solid #edf0f5}
@media(max-width:520px){
	.sfchat-profile-info-card{padding:8px}
	.sfchat-profile-info-row{align-items:flex-start;gap:7px}
	.sfchat-profile-info-row a{padding:6px 8px}
	.sfchat-profile-info-actions{display:grid;grid-template-columns:1fr 1fr}
	.sfchat-profile-info-actions a,.sfchat-profile-info-actions button{display:flex;align-items:center;justify-content:center;min-height:34px;text-align:center}
}


/* 1.10.16 — cartes d'information mobiles : actions finales toujours visibles.
 * Le contenu des coordonnées défile dans sa propre zone tandis que les actions
 * restent dans un pied de carte fixe. Le formulaire du chat reste hors de cette
 * zone et ne peut plus être poussé sous la découpe du panneau. */
.sfchat-profile-info-content{min-width:0}
@media(max-width:520px){
	.sfchat-panel.has-profile-info .sfchat-body{
		flex:0 1 78px;
		min-height:42px;
		max-height:96px;
		padding-top:9px;
		padding-bottom:8px;
	}
	.sfchat-panel.has-profile-info .sfchat-profile-assistant.is-info{
		flex:1 1 210px;
		min-height:180px;
		max-height:none;
		overflow:hidden;
		padding:0 8px 7px;
	}
	.sfchat-profile-assistant.is-info .sfchat-profile-card{
		display:flex;
		flex-direction:column;
		height:100%;
		min-height:0;
		overflow:hidden;
		padding:9px;
	}
	.sfchat-profile-assistant.is-info .sfchat-profile-info-card{
		display:flex;
		flex:1 1 auto;
		flex-direction:column;
		min-height:0;
		overflow:hidden;
		padding:8px 8px 6px;
	}
	.sfchat-profile-assistant.is-info .sfchat-profile-info-content{
		flex:1 1 auto;
		min-height:0;
		overflow-y:auto;
		overflow-x:hidden;
		overscroll-behavior:contain;
		-webkit-overflow-scrolling:touch;
		padding:0 2px 8px 0;
		scrollbar-gutter:stable;
	}
	.sfchat-profile-assistant.is-info .sfchat-profile-info-actions{
		flex:0 0 auto;
		display:grid;
		grid-template-columns:repeat(2,minmax(0,1fr));
		gap:6px;
		margin:0 -2px;
		padding:8px 2px 2px;
		border-top:1px solid #dce2ec;
		background:#fff;
		box-shadow:0 -8px 14px rgba(32,42,61,.045);
	}
	.sfchat-profile-assistant.is-info .sfchat-profile-info-actions a,
	.sfchat-profile-assistant.is-info .sfchat-profile-info-actions button{
		min-width:0;
		min-height:36px;
		padding:6px 7px;
		display:flex;
		align-items:center;
		justify-content:center;
		white-space:normal;
		text-align:center;
	}
	.sfchat-profile-assistant.is-info .sfchat-profile-info-actions > :last-child:nth-child(odd){
		grid-column:1/-1;
	}
}
@media(max-width:340px){
	.sfchat-profile-assistant.is-info .sfchat-profile-info-actions{
		grid-template-columns:1fr;
	}
	.sfchat-profile-assistant.is-info .sfchat-profile-info-actions > *{
		grid-column:1!important;
	}
}


/* 1.10.20 - distance mode hardening.
 * The first selector is driven by the current JS. The :has() fallback also
 * hides the city action when an older cached JS bundle still renders it. */
.sfchat-profile-assistant.is-distance .sfchat-profile-actionbar [data-profile-field="assistant_change_location"]{
	display:none!important;
}
.sfchat-profile-assistant:has(.sfchat-profile-event-filters [data-profile-value="distance"].is-active) .sfchat-profile-actionbar [data-profile-field="assistant_change_location"]{
	display:none!important;
}
