/*
 * Assistant Upcreation : habillage du chat.
 *
 * Le plugin upcreation-assistant ne pose aucun style visuel : il sort le HTML (classes cB-*, as-*,
 * qa-*, cf-*) et c'est cette feuille, celle du thème, qui le dessine. Elle est annoncée au plugin
 * par le filtre upca_feuille_style (inc/assets.php) et chargée seulement avec le chat : avec la
 * page Contact, ou au premier clic sur une icône chat. Aucune couleur, police ni taille en dur.
 *
 * Deux contextes : la card de la page Contact (.up-contact-chat) et le panneau (.as-ovl) :
 * compact sur le côté en desktop, plein écran en mobile.
 */

/* Un élément masqué par l'attribut hidden le reste, quel que soit son display. */
.up-assistant [hidden],
.as-ovl [hidden] {
	display: none !important;
}

.up-ic {
	display: inline-flex;
	flex: none;
}

/* ------------------------------------------------------------------ */
/* Card                                                               */
/* ------------------------------------------------------------------ */

.up-assistant.cB-chat {
	display: flex;
	flex-direction: column;
	min-width: 0;
	min-height: 0;
	max-width: 100%;
	overflow: hidden;
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--texte);
	font-family: var(--wp--preset--font-family--dm-sans);
}

.cB-in {
	flex: 1;
	min-width: 0;
	min-height: 0;
	max-width: 100%;
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
	overflow: hidden;
}

/* Un onglet : sa zone remplit la card. */
.cB-pane {
	flex: 1;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 1.125rem;
}

/* ------------------------------------------------------------------ */
/* En-tête : avatar, nom, deux onglets                                */
/* ------------------------------------------------------------------ */

.as-head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--wp--preset--color--fond);
}

.as-head .as-av {
	width: var(--wp--custom--assistant--avatar);
	height: var(--wp--custom--assistant--avatar);
}

.as-id {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.as-id strong {
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: var(--wp--preset--font-size--lien-carte);
	line-height: 1.2;
	color: var(--wp--preset--color--marine);
}

/* Avatar : cube (ou image choisie dans l'admin), sans fond ni contour. */
.cB-av {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--outremer);
}

.cB-av svg,
.cB-av img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.cB-bot > .cB-av {
	width: var(--wp--custom--assistant--avatar-bulle);
	height: var(--wp--custom--assistant--avatar-bulle);
}

.as-tabs {
	flex: none;
	display: flex;
	gap: 0.5rem;
}

.as-tab,
.as-x {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--assistant--onglet);
	height: var(--wp--custom--assistant--onglet);
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition:
		background-color 0.3s var(--wp--custom--transition--douce),
		color 0.3s var(--wp--custom--transition--douce),
		box-shadow 0.3s var(--wp--custom--transition--douce);
}

/* Onglet : rond à contour Outremer (comme la maquette), l'actif plein en dégradé. */
.as-tab {
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--outremer);
	box-shadow: inset 0 0 0 1.5px var(--wp--preset--color--outremer);
}

.as-tab:is(:hover, :focus-visible) {
	background: var(--wp--preset--color--fond);
}

.as-tab.is-on {
	background: var(--wp--preset--gradient--bouton);
	color: var(--wp--preset--color--blanc);
	box-shadow: none;
}

.as-x {
	background: var(--wp--preset--color--fond);
	color: var(--wp--preset--color--marine);
}

.as-x:is(:hover, :focus-visible) {
	background: var(--wp--preset--color--outremer);
	color: var(--wp--preset--color--blanc);
}

/* ------------------------------------------------------------------ */
/* Fil de bulles                                                       */
/* ------------------------------------------------------------------ */

.cB-tw {
	position: relative;
	flex: 1;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.cB-thread {
	flex: 1;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0 -0.625rem;
	padding: 0.875rem 0.625rem 0.625rem;
	overflow-x: hidden;
	overflow-y: auto;
	scrollbar-width: none;
	-webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 1.125rem);
	mask-image: linear-gradient(to bottom, transparent 0, #000 1.125rem);
}

.cB-thread::-webkit-scrollbar {
	display: none;
}

/* Les bulles se posent en bas du fil. */
.cB-thread > :first-child {
	margin-top: auto;
}

.cB-step {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* Bouton « Réponses précédentes » : remonte en haut du fil (réduit de 30 % à la demande de Damien). */
.cB-up {
	position: absolute;
	top: 0.5rem;
	left: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	height: 1.3125rem;
	padding: 0 0.625rem;
	border: 0;
	border-radius: var(--wp--custom--rayon--pilule);
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--outremer);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--outremer);
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: calc(var(--wp--preset--font-size--legende) * 0.7);
	font-weight: 700;
	letter-spacing: 0.04em;
	white-space: nowrap;
	cursor: pointer;
	translate: -50% 0;
	transition:
		background-color 0.25s,
		color 0.25s;
}

.cB-up svg {
	width: 0.6875rem;
	height: 0.6875rem;
}

.cB-up:is(:hover, :focus-visible) {
	background: var(--wp--preset--color--outremer);
	color: var(--wp--preset--color--blanc);
}

/* Bulle du bot */
.cB-bot {
	position: relative;
	display: flex;
	align-items: flex-end;
	gap: 0.625rem;
	min-width: 0;
	max-width: var(--wp--custom--assistant--bulle-largeur);
}

.cB-b {
	min-width: 0;
	margin: 0;
	padding: 0.75rem 1rem;
	border-radius: var(--wp--custom--rayon--interne) var(--wp--custom--rayon--interne) var(--wp--custom--rayon--interne) var(--wp--custom--assistant--coin);
	background: var(--wp--preset--color--fond);
	font-size: var(--wp--preset--font-size--texte);
	line-height: 1.45;
	color: var(--wp--preset--color--texte);
	overflow-wrap: anywhere;
}

.cB-tag {
	display: block;
	margin: 0 0 0.1875rem;
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: var(--wp--preset--font-size--etiquette);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--outremer);
}

/* « L'assistant écrit » : trois points à la place de la bulle, avant son arrivée. */
.cB-dots {
	position: absolute;
	left: calc(var(--wp--custom--assistant--avatar-bulle) + 0.625rem);
	bottom: 0;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	height: 2.5rem;
	padding: 0 1rem;
	border-radius: var(--wp--custom--rayon--interne) var(--wp--custom--rayon--interne) var(--wp--custom--rayon--interne) var(--wp--custom--assistant--coin);
	background: var(--wp--preset--color--fond);
	opacity: 0;
}

.cB-dots i {
	width: 0.375rem;
	height: 0.375rem;
	border-radius: 50%;
	background: var(--wp--preset--color--ardoise);
}

/* Réponse du visiteur (zone de saisie ou pastilles) */
.cB-me-a {
	align-self: flex-end;
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.5rem;
	box-sizing: border-box;
	width: 85%;
	min-width: 0;
	max-width: 100%;
}

.cB-me-a > .cB-go {
	align-self: flex-end;
}

.cB-err {
	flex: 1 1 100%;
	margin: 0;
	font-size: var(--wp--preset--font-size--legende);
	font-weight: 700;
	line-height: 1.4;
	text-align: right;
	color: var(--wp--preset--color--outremer);
}

/* Réponse envoyée par le visiteur dans le canal question */
.qa-me {
	align-self: flex-end;
	max-width: 70%;
	margin: 0;
	padding: 0.75rem 1rem;
	border-radius: var(--wp--custom--rayon--interne) var(--wp--custom--rayon--interne) var(--wp--custom--assistant--coin) var(--wp--custom--rayon--interne);
	background: var(--wp--preset--gradient--bouton);
	font-size: var(--wp--preset--font-size--texte);
	line-height: 1.45;
	color: var(--wp--preset--color--blanc);
	overflow-wrap: anywhere;
}

.qa-ans {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.qa-ans p {
	margin: 0;
}

.qa-link {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	align-self: flex-start;
	padding: 0.625rem 0.875rem;
	border-radius: var(--wp--custom--rayon--interne);
	background: var(--wp--preset--color--blanc);
	color: var(--wp--preset--color--outremer);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--outremer);
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: var(--wp--preset--font-size--texte-etape);
	font-weight: 700;
	text-decoration: none;
	transition:
		background-color 0.3s,
		color 0.3s;
}

.qa-link:is(:hover, :focus-visible) {
	background: var(--wp--preset--color--outremer);
	color: var(--wp--preset--color--blanc);
}

/* ------------------------------------------------------------------ */
/* Champs, pastilles, boutons                                          */
/* ------------------------------------------------------------------ */

/* Champ : contour 1,5 px Outremer, aucune ombre. */
.cB-inp {
	flex: 1;
	min-width: 0;
	box-sizing: border-box;
	padding: 0.9375rem 1.125rem;
	border: 1.5px solid var(--wp--preset--color--outremer);
	border-radius: var(--wp--custom--rayon--interne) var(--wp--custom--rayon--interne) var(--wp--custom--assistant--coin) var(--wp--custom--rayon--interne);
	background: var(--wp--preset--color--blanc);
	box-shadow: none;
	font: inherit;
	font-size: var(--wp--preset--font-size--texte);
	color: var(--wp--preset--color--texte);
}

/* Le contour Outremer du champ sert déjà de repère : pas d'anneau de focus en plus (double contour). */
.cB-inp:focus,
.cB-inp:focus-visible {
	outline: none;
}

.cB-inp::placeholder {
	color: var(--wp--preset--color--ardoise);
}

.cB-ta {
	min-height: 4rem;
	resize: none;
}

/* Pastille de choix : Outremer sur blanc, choisie = fond Outremer et texte blanc. */
.chip {
	padding: 0.5rem 0.8125rem;
	border: 1.5px solid var(--wp--preset--color--outremer);
	border-radius: var(--wp--custom--rayon--pilule);
	background: transparent;
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: var(--wp--preset--font-size--legende);
	font-weight: 700;
	color: var(--wp--preset--color--outremer);
	cursor: pointer;
	transition:
		background-color 0.25s,
		color 0.25s;
}

.chip:is(:hover, :focus-visible),
.chip.is-on {
	background: var(--wp--preset--color--outremer);
	color: var(--wp--preset--color--blanc);
}

.cB-chips {
	width: 85%;
}

/* Bouton rond de validation (flèche) */
.cB-go {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wp--custom--assistant--envoi);
	height: var(--wp--custom--assistant--envoi);
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--gradient--bouton);
	color: var(--wp--preset--color--blanc);
	cursor: pointer;
	transition:
		transform 0.35s var(--wp--custom--transition--douce),
		background-color 0.35s var(--wp--custom--transition--douce),
		color 0.35s var(--wp--custom--transition--douce),
		box-shadow 0.35s var(--wp--custom--transition--douce);
}

.cB-go:is(:hover, :focus-visible) {
	transform: translateY(var(--wp--custom--bouton--montee));
	background: transparent;
	color: var(--wp--preset--color--outremer);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--outremer);
}

/* Boutons « Envoyer ma demande » (principal) et « Envoyer une autre demande » (secondaire) */
.cb {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	box-sizing: border-box;
	min-height: var(--wp--custom--bouton--hauteur);
	padding: 0 var(--wp--custom--bouton--pad-x-compact);
	border: 0;
	border-radius: var(--wp--custom--rayon--pilule);
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: var(--wp--preset--font-size--bouton);
	font-weight: 700;
	letter-spacing: 0.06em;
	white-space: nowrap;
	cursor: pointer;
	transition:
		background-color 0.35s var(--wp--custom--transition--douce),
		color 0.35s var(--wp--custom--transition--douce),
		box-shadow 0.35s var(--wp--custom--transition--douce),
		transform 0.35s var(--wp--custom--transition--douce);
}

.cb:is(:hover, :focus-visible) {
	transform: translateY(var(--wp--custom--bouton--montee));
}

.cb:disabled {
	cursor: progress;
	opacity: 0.7;
}

.cb-p {
	background: var(--wp--preset--gradient--bouton);
	color: var(--wp--preset--color--blanc);
}

.cb-p:is(:hover, :focus-visible):not(:disabled) {
	background: transparent;
	color: var(--wp--preset--color--outremer);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--outremer);
}

.cb-s {
	background: transparent;
	color: var(--wp--preset--color--outremer);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--outremer);
}

.cb-s:is(:hover, :focus-visible) {
	background: var(--wp--preset--gradient--bouton);
	color: var(--wp--preset--color--blanc);
	box-shadow: none;
}

/* ------------------------------------------------------------------ */
/* Canal question : suggestions et saisie                              */
/* ------------------------------------------------------------------ */

.qa-bar {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
	min-width: 0;
	max-width: 100%;
	padding-top: 0.875rem;
	border-top: 1px solid var(--wp--preset--color--fond);
}

.qa-sugg {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.375rem;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.qa-sugg::-webkit-scrollbar {
	display: none;
}

.qa-sugg .chip {
	flex: none;
	white-space: nowrap;
}

.qa-in {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-width: 0;
}

.qa-in .cB-inp {
	min-height: var(--wp--custom--assistant--champ);
	padding-block: 0.75rem;
	border-radius: var(--wp--custom--rayon--pilule);
}

.qa-in .cB-go {
	width: var(--wp--custom--assistant--champ);
	height: var(--wp--custom--assistant--champ);
}

/* ------------------------------------------------------------------ */
/* Canal projet : consentement, envoi, confirmation                    */
/* ------------------------------------------------------------------ */

.cB-foot {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.875rem;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--fond);
}

.cB-foot .cB-err {
	text-align: left;
}

.cB-foot .cb {
	width: 100%;
}

.cf-ok {
	flex: none;
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	min-width: 0;
	font-size: var(--wp--preset--font-size--legende);
	line-height: 1.45;
	color: var(--wp--preset--color--ardoise);
	cursor: pointer;
}

.cf-ok input {
	flex: none;
	width: var(--wp--custom--icone--coche);
	height: var(--wp--custom--icone--coche);
	margin: 0.125rem 0 0;
	accent-color: var(--wp--preset--color--outremer);
}

.cf-ok a {
	color: var(--wp--preset--color--outremer);
}

.cf-done {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 1.5rem;
	text-align: center;
	outline: none;
}

.cf-done-i {
	display: flex;
	color: var(--wp--preset--color--outremer);
}

.cf-done h2 {
	margin: 0;
	font-family: var(--wp--preset--font-family--space-grotesk);
	font-size: var(--wp--preset--font-size--titre-intro);
	line-height: 1.05;
	color: var(--wp--preset--color--marine);
}

.cf-done p {
	max-width: 25rem;
	margin: 0;
	font-size: var(--wp--preset--font-size--texte);
	line-height: 1.6;
	color: var(--wp--preset--color--ardoise);
}

/* ------------------------------------------------------------------ */
/* Animations : bulles enchaînées, jamais superposées                  */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
	/* Une animation terminée est coupée (classe posée par le script) : une bulle déplacée ne la rejoue pas. */
	.is-fait {
		animation: none !important;
	}

	.cB-grow {
		display: grid;
		grid-template-rows: 1fr;
		animation: upca-grandit var(--wp--custom--assistant--duree) var(--wp--custom--transition--douce) backwards;
	}

	.cB-late .cB-dots {
		animation:
			upca-pastilles-entre 0.3s 0.35s forwards,
			upca-pastilles-sortent 0.01s 1.3s forwards;
	}

	.cB-late .cB-dots i {
		animation: upca-saut 1s ease-in-out infinite;
	}

	.cB-late .cB-dots i:nth-child(2) {
		animation-delay: 0.15s;
	}

	.cB-late .cB-dots i:nth-child(3) {
		animation-delay: 0.3s;
	}

	.cB-late .cB-b {
		animation: upca-bulle var(--wp--custom--assistant--duree) var(--wp--custom--transition--douce) 1.3s backwards;
	}

	.cB-late-a,
	.cB-foot {
		animation: upca-bulle var(--wp--custom--assistant--duree) var(--wp--custom--transition--douce) 1.6s backwards;
	}

	.qa-me {
		animation: upca-bulle var(--wp--custom--assistant--duree) var(--wp--custom--transition--douce) backwards;
	}

	.cf-done {
		animation: upca-bulle 0.6s var(--wp--custom--transition--douce) backwards;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cB-grow {
		display: grid;
		grid-template-rows: 1fr;
	}

	.cB-dots {
		display: none;
	}
}

@keyframes upca-bulle {
	from {
		opacity: 0;
		transform: translateY(0.625rem);
	}
}

@keyframes upca-grandit {
	from {
		grid-template-rows: 0fr;
	}
}

@keyframes upca-pastilles-entre {
	to {
		opacity: 1;
	}
}

@keyframes upca-pastilles-sortent {
	to {
		opacity: 0;
		visibility: hidden;
	}
}

@keyframes upca-saut {
	0%,
	60%,
	100% {
		transform: translateY(0);
		opacity: 0.5;
	}

	30% {
		transform: translateY(-4px);
		opacity: 1;
	}
}

/* Étape qui grandit : le contenu ne déborde pas pendant l'ouverture. */
.cB-grow-in {
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0 -0.5rem -0.625rem;
	padding: 0.75rem 0.5rem 0.625rem;
	overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Panneau : compact sur le côté (desktop), plein écran (mobile)       */
/* ------------------------------------------------------------------ */

.as-ovl {
	position: fixed;
	inset: 0;
	z-index: 90;
	box-sizing: border-box;
	display: flex;
	background: var(--wp--preset--color--marine);
	opacity: 0;
	visibility: hidden;
	transition:
		opacity 0.35s var(--wp--custom--transition--douce),
		visibility 0s 0.35s;
}

.as-ovl.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.35s var(--wp--custom--transition--douce);
}

/* Connecté : le plein écran mobile commence sous la barre d'administration. */
.admin-bar .as-ovl {
	top: var(--wp-admin--admin-bar--height, 0);
}

.as-ovl-in {
	position: relative;
	flex: 1;
	min-width: 0;
	min-height: 0;
	display: flex;
	translate: 0 1.75rem;
	transition: translate 0.7s var(--wp--custom--transition--douce);
}

.as-ovl.is-open .as-ovl-in {
	translate: none;
}

.as-ovl .up-assistant.cB-chat {
	flex: 1;
	box-shadow: none;
	border-radius: 0;
	padding: calc(1.125rem + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom));
}

.as-ovl .cB-in {
	width: 100%;
	max-width: 55rem;
	margin: 0 auto;
}

.as-ovl .cB-grow-in {
	overflow: clip;
}

/* La validation de l'étape en cours reste collée en bas du fil. */
.as-ovl .cB-me-a:has(> .cB-go) {
	position: sticky;
	bottom: 0;
	z-index: 3;
	margin-inline: -0.625rem;
	padding: 0.75rem 0.625rem 0.375rem;
	background: var(--wp--preset--color--blanc);
}

@media (min-width: 1024px) and (pointer: fine), (min-width: 1024px) and (min-height: 820px) {
	.admin-bar .as-ovl {
		top: auto;
	}

	.as-ovl {
		inset: auto var(--wp--custom--assistant--panneau-bord) var(--wp--custom--assistant--panneau-bas) auto;
		width: var(--wp--custom--assistant--panneau-largeur);
		height: min(var(--wp--custom--assistant--panneau-hauteur), calc(100svh - 7.5rem));
		background: transparent;
		pointer-events: none;
	}

	.as-ovl.is-open {
		pointer-events: auto;
	}

	.as-ovl .up-assistant.cB-chat {
		border-radius: var(--wp--custom--rayon--card);
		box-shadow: var(--wp--preset--shadow--unique);
		padding: var(--wp--custom--pad-interne);
	}

	.as-ovl .cB-in {
		max-width: none;
	}

	.as-ovl .cB-bot {
		max-width: 94%;
	}

	.as-ovl .cB-me-a {
		width: 100%;
	}

	.as-ovl .as-head {
		gap: 0.5rem;
	}

	.as-ovl .as-head .as-av {
		width: var(--wp--custom--assistant--avatar-panneau);
		height: var(--wp--custom--assistant--avatar-panneau);
	}

	.as-ovl .as-id strong {
		font-size: var(--wp--preset--font-size--texte);
	}

	.as-ovl .as-tab,
	.as-ovl .as-x {
		width: var(--wp--custom--assistant--onglet-panneau);
		height: var(--wp--custom--assistant--onglet-panneau);
	}

	.as-ovl .qa-sugg .chip {
		padding: 0.4375rem 0.75rem;
	}
}

/* ------------------------------------------------------------------ */
/* Mobile (card de la page Contact et panneau)                         */
/* ------------------------------------------------------------------ */

@media (max-width: 1023px), (min-width: 1024px) and (pointer: coarse) and (max-height: 819px) {
	html.up-assistant-ouvert,
	html.up-assistant-ouvert body {
		overflow: hidden;
	}

	.cB-inp,
	.qa-in .cB-inp {
		font-size: var(--wp--preset--font-size--champ);
	}

	/* Une réponse par ligne, validation calée à droite. */
	.cB-me-a,
	.cB-chips {
		width: 100%;
	}

	.cB-me-a > .cB-inp {
		flex: 1 1 100%;
	}

	.cB-me-a > .cB-go {
		margin-left: auto;
	}

	.cB-bot,
	.as-ovl .cB-bot {
		max-width: 94%;
	}

	.cB-foot {
		flex-direction: column;
		align-items: stretch;
	}

	.cB-foot .cb {
		width: 100%;
	}

	/* La card de la page Contact a la hauteur de l'écran, le fil défile dedans. */
	.up-contact-chat > .up-assistant.cB-chat {
		flex: none;
		height: calc(100svh - 7.5rem);
		min-height: 30rem;
		padding: 1.5rem 1.25rem;
	}

	.up-contact-chat .cB-grow-in {
		overflow: clip;
	}

	.up-contact-chat .cB-me-a:has(> .cB-go) {
		position: sticky;
		bottom: 0;
		z-index: 3;
		margin-inline: -0.625rem;
		padding: 0.75rem 0.625rem 0.375rem;
		background: var(--wp--preset--color--blanc);
	}

	.as-head .as-id strong {
		font-size: var(--wp--preset--font-size--texte);
	}

	.qa-sugg .chip {
		padding: 0.4375rem 0.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.as-ovl,
	.as-ovl-in {
		transition: none;
	}
}
