.publicnewticketform {
	--tu-ticket-primary: var(--colorbackhmenu1, var(--colorthemebackhmenu, #966EA2F2));
	--tu-ticket-primary-soft: color-mix(in srgb, var(--tu-ticket-primary) 12%, #ffffff);
}

.publicnewticketform2 {
	display: flex;
	width: 100%;
	flex-direction: column;
	align-items: stretch;
}

.publicnewticketform2>footer {
	display: flex !important;
	width: 252px;
	margin: 0 auto 18px;
	align-items: center;
	justify-content: center;
	color: transparent;
	font-size: 0 !important;
	background: linear-gradient(#d9cfe0, #d9cfe0) center / 100% 1px no-repeat;
}

.publicnewticketform2>footer::after {
	content: '\f025  Soci';
	padding: 0 14px;
	color: var(--tu-ticket-primary);
	background: #fff;
	font-family: 'Font Awesome 5 Free', Arial, sans-serif;
	font-size: 13px;
	font-weight: 600;
}

.publicnewticketform2>footer span {
	display: none;
}

.ticketpublicarea {
	--tu-ticket-primary: var(--colorbackhmenu1, var(--colorthemebackhmenu, #966EA2F2));
	--tu-ticket-primary-soft: color-mix(in srgb, var(--tu-ticket-primary) 12%, #ffffff);
	box-sizing: border-box;
	width: min(980px, calc(100% - 32px));
	margin: 36px auto 24px;
	padding: 30px 38px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 28px rgba(58, 40, 95, .13);
}

.ticketpublicarea .tu-ticket-guide-preview-button {
	top: 20px;
	right: 38px;
}

.ticketpublicarea .ticketpublictable {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
}

.ticketpublicarea .ticketpublictable tr {
	border-bottom: 1px solid #eeeaf2;
}

.ticketpublicarea .ticketpublictable td {
	padding: 11px 12px;
	color: #1f1b2d;
	border: 0;
}

.ticketpublicarea .ticketpublictable td:first-child {
	width: 34%;
	color: #534166;
	font-weight: 700;
	background: #fbf9fd;
}

.ticketpublicarea .ticketpublictable tr:first-child td:first-child {
	border-top-left-radius: 7px;
}

.ticketpublicarea .ticketpublictable tr:first-child td:last-child {
	border-top-right-radius: 7px;
}

.ticketpublicarea .ticketpublictable tr:last-child td:first-child {
	border-bottom-left-radius: 7px;
}

.ticketpublicarea .ticketpublictable tr:last-child td:last-child {
	border-bottom-right-radius: 7px;
}

.ticketpublicarea .ticketpublictable a {
	color: var(--tu-ticket-primary);
}

.ticketpublicarea .butAction,
.ticketpublicarea input[type="submit"] {
	color: #fff !important;
	background: var(--tu-ticket-primary) !important;
	border-color: var(--tu-ticket-primary) !important;
	border-radius: 6px;
	transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.ticketpublicarea .butAction:hover,
.ticketpublicarea input[type="submit"]:hover {
	transform: translateY(-2px);
	filter: brightness(1.05);
	box-shadow: 0 6px 14px color-mix(in srgb, var(--tu-ticket-primary) 35%, transparent);
}

.tu-ticket-view-intro {
	margin-bottom: 28px;
	text-align: center;
}

.tu-ticket-view-intro__icon {
	display: inline-flex;
	width: 50px;
	height: 50px;
	align-items: center;
	justify-content: center;
	color: var(--tu-ticket-primary);
	background: var(--tu-ticket-primary-soft);
	border-radius: 50%;
	font-size: 22px;
}

.tu-ticket-view-intro h1 {
	margin: 12px 0 5px;
	color: #30253f;
	font-size: 21px;
}

.tu-ticket-view-intro p {
	margin: 0;
	color: #77708a;
	font-size: 12px;
}

#form_view_ticket {
	max-width: 520px;
	margin: 0 auto;
	padding: 28px;
	background: #fafafa;
	border: 1px solid #ded7e7;
	border-radius: 9px;
	box-shadow: 0 4px 10px rgba(45, 34, 72, .12);
}

#form_view_ticket p {
	display: grid;
	grid-template-columns: 145px 1fr;
	gap: 14px;
	align-items: center;
	margin: 13px 0;
}

#form_view_ticket p:last-of-type {
	display: flex;
	justify-content: center;
	gap: 14px;
	margin-top: 25px;
}

#form_view_ticket p:last-of-type input {
	margin: 0 !important;
}

#form_view_ticket p:last-of-type input[type="submit"],
#form_view_ticket p:last-of-type input.button-cancel {
	box-sizing: border-box;
	width: 226px !important;
}

#form_view_ticket label {
	color: #111;
	font-size: 13px;
	font-weight: 700;
}

#form_view_ticket input[type="text"],
#form_view_ticket input:not([type]) {
	box-sizing: border-box;
	width: 100%;
	height: 40px;
	border: 1px solid #ded7e7;
	border-radius: 6px;
}

#form_view_ticket .button-cancel {
	color: #fff !important;
	background: var(--tu-ticket-primary) !important;
	border-color: var(--tu-ticket-primary) !important;
}

.tu-ticket-view-details-header {
	display: flex;
	gap: 13px;
	align-items: center;
	margin: 2px 0 22px;
}

.tu-ticket-view-details-header__icon {
	display: inline-flex;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	align-items: center;
	justify-content: center;
	color: var(--tu-ticket-primary);
	background: var(--tu-ticket-primary-soft);
	border-radius: 8px;
	font-size: 17px;
}

.tu-ticket-view-details-header h1 {
	margin: 0;
	color: #30253f;
	font-size: 17px;
	line-height: 1.2;
}

.tu-ticket-view-details-header p {
	margin: 4px 0 0;
	color: #77708a;
	font-size: 11px;
}

.ticketpublicarea #form_view_ticket.margintoponly {
	max-width: none;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.ticketpublicarea .ticketpublictable {
	overflow: hidden;
	border: 1px solid #ece8f2;
	border-radius: 8px;
}

.ticketpublicarea .ticketpublictable tr {
	border: 0;
}

.ticketpublicarea .ticketpublictable td {
	padding: 9px 13px;
	border-bottom: 1px solid #f0edf4;
	font-size: 12px;
}

.ticketpublicarea .ticketpublictable tr:last-child td {
	border-bottom: 0;
}

.ticketpublicarea .ticketpublictable td:first-child {
	width: 38%;
	color: #534166;
	background: #fcfbfe;
	font-size: 12px;
	font-weight: 600;
}

.ticketpublicarea .ticketpublictable td:nth-child(2) {
	background: #fff;
}

.ticketpublicarea .ticketpublictable .pictofixedwidth {
	display: none;
}

.ticketpublicarea .tu-ticket-view-row td:first-child::before {
	display: inline-block;
	width: 18px;
	margin-right: 5px;
	color: var(--tu-ticket-primary);
	font-family: 'Font Awesome 5 Free';
	font-size: 11px;
	font-weight: 900;
	text-align: center;
}

.ticketpublicarea .tu-ticket-view-row--ref td:first-child::before,
.ticketpublicarea .tu-ticket-view-row--track td:first-child::before {
	content: '\f3ff';
}

.ticketpublicarea .tu-ticket-view-row--subject td:first-child::before {
	content: '\f075';
}

.ticketpublicarea .tu-ticket-view-row--status td:first-child::before {
	content: '\f111';
}

.ticketpublicarea .tu-ticket-view-row--type td:first-child::before {
	content: '\f02b';
}

.ticketpublicarea .tu-ticket-view-row--category td:first-child::before {
	content: '\f02c';
}

.ticketpublicarea .tu-ticket-view-row--severity td:first-child::before {
	content: '\f024';
}

.ticketpublicarea .tu-ticket-view-row--date td:first-child::before,
.ticketpublicarea .tu-ticket-view-row--expected-date td:first-child::before {
	content: '\f133';
}

.ticketpublicarea .tu-ticket-view-row--author td:first-child::before,
.ticketpublicarea .tu-ticket-view-row--assigned td:first-child::before {
	content: '\f2bd';
}

.ticketpublicarea .tu-ticket-view-row--read-date td:first-child::before {
	content: '\f06e';
}

.ticketpublicarea .tu-ticket-view-row--close-date td:first-child::before {
	content: '\f00d';
}

.ticketpublicarea .tu-ticket-view-row--progress td:first-child::before {
	content: '\f201';
}

.tu-ticket-view-back-form {
	margin: 22px 0 0;
	text-align: center;
}

.tu-ticket-view-back-button {
	padding: 8px 14px;
	color: var(--tu-ticket-primary);
	background: #fff;
	border: 1px solid color-mix(in srgb, var(--tu-ticket-primary) 32%, #fff);
	border-radius: 6px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 600;
}

.tu-ticket-view-back-button:hover {
	color: #fff;
	background: var(--tu-ticket-primary);
	transform: translateY(-2px);
	box-shadow: 0 5px 12px color-mix(in srgb, var(--tu-ticket-primary) 28%, transparent);
}

.tu-ticket-chat {
	margin-top: 32px;
	padding: 22px;
	background: #fcfbfe;
	border: 1px solid #ece8f2;
	border-radius: 10px;
}

.tu-ticket-chat__header {
	display: flex;
	gap: 11px;
	align-items: center;
	padding-bottom: 16px;
	margin-bottom: 18px;
	border-bottom: 1px solid #ebe7f1;
}

.tu-ticket-chat__header-icon {
	display: inline-flex;
	width: 32px;
	height: 32px;
	align-items: center;
	justify-content: center;
	color: var(--tu-ticket-primary);
	background: var(--tu-ticket-primary-soft);
	border-radius: 8px;
	font-size: 14px;
}

.tu-ticket-chat__header h2 {
	margin: 0;
	color: #30253f;
	font-size: 15px;
	line-height: 1.2;
}

.tu-ticket-chat__header p {
	margin: 3px 0 0;
	color: #77708a;
	font-size: 10px;
}

.tu-ticket-chat-message {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 14px 0;
}

.tu-ticket-chat-message--external {
	justify-content: flex-start;
}

.tu-ticket-chat-message--internal {
	justify-content: flex-end;
}

.tu-ticket-chat-message__participant {
	display: flex;
	width: 56px;
	flex: 0 0 56px;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	color: #77708a;
	font-size: 9px;
	line-height: 1.1;
	text-align: center;
	word-break: break-word;
}

.tu-ticket-chat-message__avatar {
	display: inline-flex;
	width: 29px;
	height: 29px;
	align-items: center;
	justify-content: center;
	color: var(--tu-ticket-primary);
	background: var(--tu-ticket-primary-soft);
	border-radius: 50%;
	font-size: 10px;
	font-weight: 700;
}

.tu-ticket-chat-message__author {
	max-width: 56px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tu-ticket-chat-message__bubble {
	position: relative;
	max-width: min(68%, 560px);
	padding: 11px 13px 24px;
	color: #30253f;
	background: #fff;
	border: 1px solid #e8e3ee;
	border-radius: 9px;
	box-shadow: 0 2px 7px rgba(48, 37, 63, .05);
	font-size: 12px;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.tu-ticket-chat-message--internal .tu-ticket-chat-message__participant {
	order: 2;
}

.tu-ticket-chat-message--internal .tu-ticket-chat-message__avatar {
	color: #fff;
	background: var(--tu-ticket-primary);
}

.tu-ticket-chat-message--internal .tu-ticket-chat-message__bubble {
	order: 1;
	background: color-mix(in srgb, var(--tu-ticket-primary) 14%, #fff);
	border-color: color-mix(in srgb, var(--tu-ticket-primary) 30%, #fff);
}

.tu-ticket-chat-message__bubble::after {
	position: absolute;
	top: 11px;
	width: 8px;
	height: 8px;
	content: '';
	background: inherit;
	border: inherit;
	transform: rotate(45deg);
}

.tu-ticket-chat-message--external .tu-ticket-chat-message__bubble::after {
	left: -5px;
	border-top: 0;
	border-right: 0;
}

.tu-ticket-chat-message--internal .tu-ticket-chat-message__bubble::after {
	right: -5px;
	border-bottom: 0;
	border-left: 0;
}

.tu-ticket-chat-message__bubble time {
	position: absolute;
	right: 11px;
	bottom: 7px;
	color: #8a8496;
	font-size: 9px;
}

.tu-ticket-chat-message__attachments {
	margin-top: 9px;
	padding-top: 8px;
	border-top: 1px solid rgba(152, 162, 179, .35);
}

.tu-ticket-chat-message__attachments a {
	display: inline-flex;
	max-width: 100%;
	align-items: center;
	gap: 4px;
	color: #475467;
	font-size: 11px;
	font-weight: 600;
	overflow-wrap: anywhere;
	text-decoration: none;
}

.tu-ticket-chat-message__attachments a:hover {
	text-decoration: underline;
}

@media (max-width: 650px) {
	.ticketpublicarea {
		width: calc(100% - 16px);
		padding: 22px 16px;
	}

	.ticketpublicarea .ticketpublictable td:first-child {
		width: 42%;
	}

	.ticketpublicarea .ticketpublictable td {
		padding: 9px 7px;
		font-size: 13px;
	}

	.tu-ticket-chat {
		padding: 16px 10px;
	}

	.tu-ticket-chat-message {
		gap: 6px;
	}

	.tu-ticket-chat-message__participant {
		width: 42px;
		flex-basis: 42px;
	}

	.tu-ticket-chat-message__bubble {
		max-width: calc(100% - 58px);
	}
}

/* Attached files and the original ticket message keep their Dolibarr markup,
   while this wrapper gives both sections the same public-ticket visual language. */
.tu-ticket-view-section {
	margin-top: 28px;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid #e9e5ef;
	border-radius: 10px;
	box-shadow: 0 5px 18px rgba(48, 37, 63, .05);
}

.tu-ticket-view-section--documents .titre,
.tu-ticket-view-section--documents .titre_inline,
.tu-ticket-view-section--documents .fiche-title,
.tu-ticket-view-section--documents .titlefield,
.tu-ticket-view-section--documents .liste_titre td:first-child,
.tu-ticket-view-section--initial-message .liste_titre td:first-child {
	color: #30253f;
	font-weight: 700;
}

.tu-ticket-view-section--documents .fiche-title,
.tu-ticket-view-section--documents .titre,
.tu-ticket-view-section--documents .titre_inline {
	margin: 0;
	padding: 0;
	border: 0;
}

.tu-ticket-view-section--documents .table-fiche-title {
	margin: 0;
	border: 0;
	background: #ffffff;
}

.tu-ticket-view-section--documents .table-fiche-title tr {
	display: flex;
	gap: 11px;
	align-items: center;
	min-height: 72px;
	padding: 0 20px;
	border-bottom: 1px solid #ebe7f1;
}

.tu-ticket-view-section--documents .table-fiche-title td {
	display: block;
	border: 0;
}

.tu-ticket-view-section--documents .table-fiche-title .pictotitle {
	width: 21px;
	height: 21px;
	opacity: .62;
}

.tu-ticket-view-section .div-table-responsive-no-min {
	margin: 0;
}

.tu-ticket-view-section table.liste,
.tu-ticket-view-section table.noborder {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
}

.tu-ticket-view-section table.liste tr.liste_titre td,
.tu-ticket-view-section table.noborder tr.liste_titre td {
	padding: 12px 16px;
	color: #5d6470 !important;
	background: #f4f6f8;
	border: 0;
	border-bottom: 1px solid #e7e2ec;
	font-size: 12px;
	font-weight: 700;
}

.tu-ticket-view-section table.liste tr.liste_titre td a,
.tu-ticket-view-section table.noborder tr.liste_titre td a {
	color: #5d6470 !important;
}

.tu-ticket-view-section table.liste tr.oddeven td,
.tu-ticket-view-section table.noborder tr:not(.liste_titre) td {
	padding: 14px 16px;
	color: #3f4650 !important;
	border: 0;
	border-bottom: 1px solid #f0edf3;
	background: #ffffff;
	font-size: 12px;
	vertical-align: middle;
}

.tu-ticket-view-section table.liste tr.oddeven td a,
.tu-ticket-view-section table.noborder tr:not(.liste_titre) td a {
	color: #3f4650 !important;
	font-weight: 600;
}

.tu-ticket-view-section--documents table.liste tr.oddeven:hover td {
	background: #f8fafc;
}

.tu-ticket-view-section--documents .opacitymedium {
	color: #96909f;
}

.tu-ticket-view-section--initial-message .underbanner {
	display: none;
}

.tu-ticket-view-section--initial-message .longmessagecut {
	max-height: none;
	color: #40384d;
	line-height: 1.6;
}

#ticket .tu-ticket-reply-submit-wrapper {
	display: inline-block;
	position: relative;
}

#ticket .tu-ticket-reply-submit-wrapper input.tu-ticket-reply-submit--loading {
	color: transparent !important;
	cursor: wait;
	pointer-events: none;
	opacity: .58;
}

#ticket .tu-ticket-reply-submit-label {
	align-items: center;
	color: #fff;
	display: flex;
	font: inherit;
	inset: 0;
	justify-content: center;
	pointer-events: none;
	position: absolute;
}

@media (max-width: 650px) {
	.tu-ticket-view-section {
		margin-top: 20px;
		border-radius: 8px;
	}

	.tu-ticket-view-section table.liste tr.liste_titre td,
	.tu-ticket-view-section table.noborder tr.liste_titre td,
	.tu-ticket-view-section table.liste tr.oddeven td,
	.tu-ticket-view-section table.noborder tr:not(.liste_titre) td {
		padding: 11px 10px;
	}
}
