/* ══════════════════════════════════════════════════════════════════════════════
   MESSAGERIE — page /messages
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Layout viewport-filling (body class injecté par le template) ── */
/* Le thème a déjà body { display:flex; flex-direction:column; min-height:100vh }
   On supprime les espacements de .site-content pour que la messagerie colle
   au header et que le footer reste visible sans scroll. */
body.ttm-messages-body .site-content {
	padding-top: 0;
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

body.ttm-messages-body .content-container {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 0;
}

body.ttm-messages-body .ttm-page--messages {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

/* ── Corrections barre admin WordPress (admin uniquement) ── */
html:has(body.admin-bar.ttm-messages-body) {
	overflow: hidden;
}
body.admin-bar.ttm-messages-body {
	overflow: hidden;
}
body.admin-bar.ttm-messages-body .site-content {
	margin-top: var(--header-height);
}
@media screen and (max-width: 782px) {
	body.admin-bar.ttm-messages-body .site-content {
		margin-top: var(--header-height);
	}
}

/* ── Layout principal ── */
.ttm-page--messages {
	padding: 0;
}

.ttm-messages-layout {
	display: flex;
	flex: 1;
	overflow: hidden;
}

/* ── Boutons icon et petits boutons (messagerie + éventuellement ailleurs) ── */
.ttm-btn--icon {
	padding: 0;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.06);
	color: var(--ttm-color-text);
	border: 1px solid var(--ttm-color-border);
	font-size: 1rem;
}

.ttm-btn--icon:hover {
	background: rgba(255, 255, 255, 0.14);
}

html.light-mode .ttm-btn--icon {
	background: rgba(0, 0, 0, 0.05);
}

html.light-mode .ttm-btn--icon:hover {
	background: rgba(0, 0, 0, 0.10);
}

.ttm-btn--sm {
	padding: 0.35rem 0.85rem;
	font-size: 0.875rem;
}

/* ── Sidebar inbox ── */
.ttm-messages-sidebar {
	width: 320px;
	min-width: 280px;
	box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
	z-index: 1;
	display: flex;
	flex-direction: column;
	background: var(--ttm-color-surface);
	flex-shrink: 0;
	overflow: hidden;
}

html.light-mode .ttm-messages-sidebar {
	box-shadow: 4px 0 16px rgba(119, 92, 49, 0.12);
}

.ttm-inbox-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
	padding: 0 1.25rem;
	border-bottom: 1px solid var(--ttm-color-border);
	gap: 0.5rem;
	flex-shrink: 0;
}

.ttm-inbox-title {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--ttm-color-text);
}

.ttm-new-conv-form {
	padding: 0.625rem 0.875rem 0.75rem;
	border-bottom: 1px solid var(--ttm-color-border);
	display: flex;
	gap: 0.5rem;
	flex-direction: column;
	flex-shrink: 0;
	background: rgba(119, 92, 49, 0.05);
	animation: ttm-new-conv-in 0.16s ease-out;
}

@keyframes ttm-new-conv-in {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

.ttm-new-conv-form[hidden] { display: none; }

.ttm-recipient-wrap {
	position: relative;
}

.ttm-new-conv-input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.45rem 0.75rem 0.45rem 2rem;
	border: 1px solid var(--ttm-color-border);
	border-radius: 999px;
	background: var(--ttm-color-bg);
	color: var(--ttm-color-text);
	font-size: 0.82rem;
	font-family: inherit;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238b949e'%3E%3Cpath d='M8 8a3 3 0 100-6 3 3 0 000 6zm-5 6a5 5 0 0110 0H3z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 0.55rem center;
	background-size: 0.9rem;
	transition: border-color 0.2s;
}

.ttm-new-conv-input:focus {
	outline: none;
	border-color: var(--ttm-color-primary);
}

.ttm-new-conv-input::placeholder {
	color: var(--ttm-color-muted);
}

.ttm-new-conv-input:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ttm-new-conv-error {
	margin: 0;
	color: var(--ttm-color-error);
	font-size: 0.82rem;
}

.ttm-inbox-list {
	flex: 1;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: var(--ttm-scrollbar-thumb) transparent;
}

.ttm-inbox-list::-webkit-scrollbar {
	width: 4px;
}
.ttm-inbox-list::-webkit-scrollbar-track {
	background: transparent;
}
.ttm-inbox-list::-webkit-scrollbar-thumb {
	background: var(--ttm-scrollbar-thumb);
	border-radius: 2px;
}
.ttm-inbox-list::-webkit-scrollbar-thumb:hover {
	background: rgba(119, 92, 49, 0.6);
}

.ttm-inbox-loading {
	padding: 1.5rem 1rem;
	color: var(--ttm-color-muted);
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
}

.ttm-inbox-loading[hidden] { display: none; }

.ttm-inbox-empty {
	padding: 1.5rem 1rem;
	color: var(--ttm-color-muted);
	font-size: 0.9rem;
	text-align: center;
}

/* ── Item inbox ── */
.ttm-inbox-item {
	display: flex;
	align-items: center;
	cursor: pointer;
	gap: 0.75rem;
	width: 100%;
	padding: 0.85rem 1rem;
	background: none;
	border: none;
	border-bottom: 1px solid var(--ttm-color-border);
	text-align: left;
	color: var(--ttm-color-text);
	transition: background 0.15s, padding-left 0.15s;
}

.ttm-inbox-item:hover,
.ttm-inbox-item:focus-visible {
	background: rgba(255, 255, 255, 0.05);
	padding-left: 1.15rem;
	outline: none;
}

html.light-mode .ttm-inbox-item:hover,
html.light-mode .ttm-inbox-item:focus-visible {
	background: rgba(0, 0, 0, 0.04);
}

.ttm-inbox-item--active {
	background: rgba(119, 92, 49, 0.13);
}

html.light-mode .ttm-inbox-item--active {
	background: rgba(119, 92, 49, 0.1);
}

.ttm-inbox-item--active .ttm-inbox-item__name {
	color: var(--ttm-color-primary);
}

.ttm-inbox-item__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.ttm-inbox-item__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.ttm-inbox-item__name {
	font-weight: 500;
	font-size: 0.9rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--ttm-color-text);
}

.ttm-inbox-item__preview {
	color: var(--ttm-color-muted);
	font-size: 0.8rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.ttm-inbox-item__badge {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--ttm-color-error);
	color: #ffffff;
	font-size: 0.65rem;
	font-weight: 700;
	line-height: 1;
	border: 2px solid var(--color-background, #0b1a22);
	box-sizing: content-box;
	flex-shrink: 0;
}

/* "…" menu button on inbox items */
.ttm-inbox-item__menu-btn {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--ttm-color-muted);
	width: 30px;
	height: 30px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	letter-spacing: -0.05em;
	flex-shrink: 0;
	line-height: 1;
}

.ttm-inbox-item__menu-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--ttm-color-text);
}

html.light-mode .ttm-inbox-item__menu-btn:hover {
	background: rgba(0, 0, 0, 0.06);
}

/* Shared floating context menu (inbox items + QC items) */
.ttm-float-menu {
	background: var(--ttm-color-surface);
	border: 1px solid var(--ttm-color-border);
	border-radius: var(--ttm-radius);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
	min-width: 200px;
	padding: 0.25rem 0;
}

.ttm-float-menu__item {
	width: 100%;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	padding: 0.5rem 0.875rem;
	font-size: 0.875rem;
	color: var(--ttm-color-text);
	display: flex;
	align-items: center;
	gap: 0.5rem;
	transition: background 0.1s;
}

.ttm-float-menu__item:hover {
	background: rgba(255, 255, 255, 0.07);
}

html.light-mode .ttm-float-menu__item:hover {
	background: rgba(0, 0, 0, 0.05);
}

.ttm-float-menu__item--warning {
	color: #c9a227;
}

.ttm-float-menu__item--warning:hover {
	background: rgba(201, 162, 39, 0.1);
	color: #c9a227;
}

.ttm-float-menu__item--danger {
	color: var(--ttm-color-error);
}

.ttm-float-menu__item--danger:hover {
	background: rgba(231, 76, 60, 0.08);
}

.ttm-float-menu__item--success {
	color: #2a9d5c;
}

.ttm-float-menu__item--success:hover {
	background: rgba(42, 157, 92, 0.1);
	color: #2a9d5c;
}

/* ── Panneau conversation ── */
.ttm-messages-conv {
	flex: 1;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: var(--ttm-color-bg);
	min-width: 0;
}

.ttm-conv-empty {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	padding: 2rem;
}

.ttm-conv-empty[hidden] { display: none; }

.ttm-conv-empty__icon {
	font-size: 3.5rem;
	color: var(--ttm-color-primary);
	opacity: 0.65;
	filter: drop-shadow(0 0 24px rgba(119, 92, 49, 0.4));
	margin-bottom: 0.25rem;
}

.ttm-conv-empty__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--ttm-color-text);
}

.ttm-conv-empty__text {
	margin: 0;
	font-size: 0.88rem;
	text-align: center;
	max-width: 260px;
	line-height: 1.5;
	color: var(--ttm-color-muted);
}

.ttm-conv-empty__cta {
	margin-top: 0.5rem;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.ttm-conv-active {
	display: flex;
	flex-direction: column;
	flex: 1;
	overflow: hidden;
}

.ttm-conv-active[hidden] { display: none; }

.ttm-conv-active:not([hidden]) {
	animation: ttm-conv-in 0.18s ease-out;
}

@keyframes ttm-conv-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* ── Header conversation ── */
.ttm-conv-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	height: 64px;
	padding: 0 1rem;
	border-bottom: 1px solid var(--ttm-color-border);
	background: var(--ttm-color-surface);
	flex-shrink: 0;
}

.ttm-conv-partner-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
}

.ttm-conv-partner-name {
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--ttm-color-text);
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Liste des messages ── */
.ttm-messages-list {
	flex: 1;
	overflow-y: auto;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	scrollbar-width: thin;
	scrollbar-color: var(--ttm-scrollbar-thumb) transparent;
}

.ttm-messages-list::-webkit-scrollbar {
	width: 4px;
}
.ttm-messages-list::-webkit-scrollbar-track {
	background: transparent;
}
.ttm-messages-list::-webkit-scrollbar-thumb {
	background: var(--ttm-scrollbar-thumb);
	border-radius: 2px;
}
.ttm-messages-list::-webkit-scrollbar-thumb:hover {
	background: rgba(119, 92, 49, 0.6);
}

.ttm-messages-load-more {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
	color: var(--ttm-color-muted);
	font-size: 0.78rem;
}

.ttm-messages-load-more::before,
.ttm-messages-load-more::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--ttm-color-border);
}

/* ── Bulles de messages ── */
.ttm-msg {
	max-width: 72%;
}

.ttm-msg--mine {
	display: flex;
	flex-direction: column;
	align-self: flex-end;
	align-items: flex-end;
}

.ttm-msg--theirs {
	display: flex;
	flex-direction: row;
	align-items: flex-end;
	align-self: flex-start;
	gap: 0.4rem;
}

.ttm-msg__avatar {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.ttm-msg__main {
	display: flex;
	flex-direction: column;
}

.ttm-msg__bubble {
	padding: 0.6rem 0.9rem;
	border-radius: 1rem;
	font-size: 0.9rem;
	line-height: 1.45;
	white-space: pre-wrap;
	word-break: break-word;
	color: var(--ttm-color-text);
}

.ttm-msg--mine .ttm-msg__bubble {
	background: #8d7b54;
	border: 1px solid #d4b680;
	color: #fff;
	border-bottom-right-radius: 0.35rem;
}

.ttm-msg--theirs .ttm-msg__bubble {
	background: #6a7785;
	border: 1px solid #9ab0bc;
	color: #fff;
	border-bottom-left-radius: 0.35rem;
}

html.light-mode .ttm-msg--mine .ttm-msg__bubble {
	background: var(--clr-accent-gold, #CDA158);
	border-color: var(--clr-accent-gold-darker, #B8894A);
	color: #ffffff;
}
html.light-mode .ttm-msg--theirs .ttm-msg__bubble {
	background: #E8DCC8;
	border-color: #D4C0A5;
	color: var(--color-text, #4A3B31);
}

.ttm-msg__time {
	font-size: 0.72rem;
	color: var(--ttm-color-muted);
	margin-top: 0.15rem;
	padding: 0 0.25rem;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.ttm-msg:hover .ttm-msg__time,
.ttm-msg:focus-within .ttm-msg__time {
	opacity: 1;
}

/* Bouton signalement — visible au hover de la bulle reçue */
.ttm-msg__actions {
	display: flex;
	align-items: center;
	opacity: 0;
	transition: opacity 0.15s ease;
	flex-shrink: 0;
	align-self: center;
}

.ttm-msg--theirs:hover .ttm-msg__actions,
.ttm-msg--theirs:focus-within .ttm-msg__actions {
	opacity: 1;
}

.ttm-msg__report-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 3px 5px;
	color: var(--ttm-color-muted);
	font-size: 0.75rem;
	border-radius: 4px;
	transition: color 0.1s, background 0.1s;
	line-height: 1;
}

.ttm-msg__report-btn:hover {
	color: var(--ttm-color-error);
	background: rgba(231, 76, 60, 0.1);
}

.ttm-msg__report-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

/* ── Zone de saisie ── */
.ttm-compose {
	padding: 0.75rem 1rem;
	border-top: 1px solid var(--ttm-color-border);
	background: var(--ttm-color-surface);
	flex-shrink: 0;
}

.ttm-compose__inner {
	display: flex;
	align-items: flex-end;
	gap: 0.35rem;
	background: var(--ttm-color-bg);
	border: 1px solid var(--ttm-color-border);
	border-radius: 1rem;
	padding: 0.35rem 0.4rem 0.35rem 0.5rem;
	transition: border-color 0.2s;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.ttm-compose__inner:focus-within {
	border-color: var(--ttm-color-primary);
}

.ttm-compose__emoji-wrap {
	position: relative;
	flex-shrink: 0;
	align-self: flex-end;
}

/* Wrapper relatif autour du textarea pour positionner le compteur en overlay */
.ttm-compose__input-wrap {
	position: relative;
	flex: 1;
}

.ttm-compose__input {
	width: 100%;
	box-sizing: border-box;
	resize: none;
	background: transparent;
	border: none;
	border-radius: 0;
	color: var(--ttm-color-text);
	padding: 0.5rem 2rem 0.5rem 0.25rem;
	font-size: 0.9rem;
	font-family: inherit;
	line-height: 1.4;
	min-height: 36px;
	max-height: 120px;
	overflow-y: auto;
}

.ttm-compose__input::placeholder {
	color: var(--ttm-color-muted);
	opacity: 0.7;
}

.ttm-compose__input:focus {
	outline: none;
}

/* Compteur en overlay bas-droite du textarea */
.ttm-compose__char-count {
	position: absolute;
	bottom: 6px;
	right: 8px;
	font-size: 0.7rem;
	color: var(--ttm-color-muted);
	opacity: 0.4;
	pointer-events: none;
	line-height: 1;
	user-select: none;
}

.ttm-compose__char-count--warning {
	color: var(--ttm-color-error);
	opacity: 0.85;
}

.ttm-compose__send {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	align-self: flex-end;
	padding: 0.5rem 0.9rem;
	border-radius: 0.75rem;
	clip-path: none;
	transition: opacity 0.15s, transform 0.15s;
}

.ttm-compose__send:hover {
	transform: scale(1.04);
}

.ttm-compose__send:disabled {
	transform: none;
}

.ttm-compose__error {
	color: var(--ttm-color-error);
	font-size: 0.82rem;
	margin-top: 0.25rem;
}

/* ── Autocomplete destinataire ── */
.ttm-autocomplete {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 200;
	background: var(--ttm-color-surface);
	border: 1px solid var(--ttm-color-border);
	border-top: none;
	border-radius: 0 0 var(--ttm-radius) var(--ttm-radius);
	max-height: 200px;
	overflow-y: auto;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.ttm-autocomplete[hidden] { display: none; }

.ttm-autocomplete__item {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.5rem 0.75rem;
	cursor: pointer;
	font-size: 0.875rem;
	color: var(--ttm-color-text);
	border: none;
	background: transparent;
	width: 100%;
	text-align: left;
	transition: background 0.1s;
}

.ttm-autocomplete__item:hover,
.ttm-autocomplete__item[aria-selected="true"] {
	background: rgba(255, 255, 255, 0.06);
}

html.light-mode .ttm-autocomplete__item:hover,
html.light-mode .ttm-autocomplete__item[aria-selected="true"] {
	background: rgba(0, 0, 0, 0.05);
}

.ttm-autocomplete__avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.ttm-autocomplete__name {
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ── Emoji picker ── */
.ttm-emoji-picker {
	position: absolute;
	bottom: calc(100% + 8px);
	left: 0;
	z-index: 100;
	box-shadow: 0 4px 20px rgba(0,0,0,0.4);
	border-radius: 0.5rem;
	overflow: hidden;
}

emoji-picker {
	--background: var(--ttm-color-surface);
	--border-color: var(--ttm-color-border);
	--indicator-color: var(--ttm-color-primary);
	--input-border-radius: 0.4rem;
	--input-font-size: 0.85rem;
	--emoji-size: 1.4rem;
}

/* ── Recherche inbox ── */
.ttm-inbox-search-wrap {
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--ttm-color-border);
	flex-shrink: 0;
}

.ttm-inbox-search {
	width: 100%;
	box-sizing: border-box;
	padding: 0.45rem 0.75rem 0.45rem 2rem;
	border: 1px solid var(--ttm-color-border);
	border-radius: 999px;
	background: var(--ttm-color-bg);
	color: var(--ttm-color-text);
	font-size: 0.82rem;
	font-family: inherit;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%238b949e'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 100 11 5.5 5.5 0 000-11zM2 9a7 7 0 1112.452 4.391l3.328 3.329a.75.75 0 11-1.06 1.06l-3.329-3.328A7 7 0 012 9z' clip-rule='evenodd'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 0.55rem center;
	background-size: 0.9rem;
}

.ttm-inbox-search:focus {
	outline: none;
	border-color: var(--ttm-color-primary);
}

.ttm-inbox-search::placeholder {
	color: var(--ttm-color-muted);
}

.ttm-inbox-item[hidden] { display: none; }

/* ── Spinner ── */
.ttm-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: ttm-spin 0.7s linear infinite;
}

@keyframes ttm-spin {
	to { transform: rotate(360deg); }
}

/* ── Badges "bloqué" dans les items inbox / causette ── */
.ttm-inbox-item__blocked-tag,
.ttm-cst__item-blocked-tag {
	display: inline-block;
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 0.1rem 0.45rem;
	border-radius: 999px;
	background: rgba(139, 148, 158, 0.14);
	color: var(--ttm-color-muted);
	vertical-align: middle;
	margin-left: 0.4rem;
	line-height: 1.6;
}

/* ── Overlay conversation bloquée ── */
#ttm-conv-active,
#ttm-cst-conv {
	position: relative;
}

.ttm-conv-blocked-overlay {
	position: absolute;
	inset: 0;
	z-index: 10;
	background: rgba(13, 17, 23, 0.84);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.875rem;
	padding: 2rem 1.5rem;
	text-align: center;
	border-radius: inherit;
}

.ttm-conv-blocked-overlay[hidden] {
	display: none;
}

html.light-mode .ttm-conv-blocked-overlay {
	background: rgba(240, 242, 245, 0.9);
}

.ttm-conv-blocked-overlay .fas {
	font-size: 2rem;
	color: var(--ttm-color-muted);
	opacity: 0.6;
}

.ttm-conv-blocked-overlay p {
	font-size: 0.875rem;
	color: var(--ttm-color-muted);
	max-width: 280px;
	line-height: 1.6;
	margin: 0;
}

/* ── Zone de saisie bloquée ── */
.ttm-compose--blocked {
	opacity: 0.45;
	pointer-events: none;
}

/* ── Responsive — mobile ── */
@media (max-width: 640px) {
	/* Sur mobile on laisse défiler la page normalement */
	body.ttm-messages-body .site-content,
	body.ttm-messages-body .ttm-page--messages {
		overflow: visible;
	}

	.ttm-messages-layout {
		flex-direction: column;
		overflow: visible;
		flex: none;
		min-height: 100svh;
	}

	.ttm-messages-sidebar {
		width: 100%;
		max-height: 50vh;
		box-shadow: none;
		border-bottom: 1px solid var(--ttm-color-border);
		overflow-y: auto;
	}

	.ttm-messages-conv {
		min-height: 50vh;
	}

	.ttm-msg {
		max-width: 88%;
	}

	.ttm-compose__send-label {
		display: none;
	}
}

/* ── Ajustements barre admin WordPress ── */
/* Panneau Causette (mobile ≤640px) : à ≤640px la barre admin est toujours 46px */
@media (max-width: 640px) {
	body.admin-bar .ttm-cst__panel {
		top: 46px;
		height: calc(100vh - 46px);
	}
}
/* Layout messagerie mobile : min-height 100svh crée du scroll avec la barre admin */
@media (max-width: 640px) {
	body.admin-bar .ttm-messages-layout {
		min-height: calc(100svh - 46px);
	}
}
