/*
 * Feuille de style unique du portail (section 4 du cahier des charges :
 * pas de framework, pas de build). Mobile-first : les techniciens
 * consultent depuis le terrain.
 */

.agpst-portal {
	max-width: 420px;
	margin: 2rem auto;
	padding: 0 1rem;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: #1d2327;
}

.agpst-form p {
	margin: 0 0 1rem;
}

.agpst-form label {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}

.agpst-form input[type="email"],
.agpst-form input[type="password"],
.agpst-form input[type="text"] {
	width: 100%;
	padding: 0.6rem 0.75rem;
	font-size: 1rem;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	box-sizing: border-box;
}

.agpst-form button {
	width: 100%;
	padding: 0.7rem 1rem;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	background-color: #1d4ed8;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.agpst-form button:hover {
	background-color: #1e40af;
}

.agpst-form-links {
	text-align: center;
	font-size: 0.9rem;
}

.agpst-notice {
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
	border-radius: 4px;
	background-color: #f0f0f1;
	border-left: 4px solid #8c8f94;
}

.agpst-notice--reset_done {
	border-left-color: #00a32a;
}

.agpst-notice--locked,
.agpst-notice--invalid,
.agpst-notice--invalid_code,
.agpst-notice--reset_invalid,
.agpst-notice--weak_password {
	border-left-color: #d63638;
}

.agpst-password-rules {
	margin: 0 0 1rem;
	padding-left: 1.25rem;
	font-size: 0.9rem;
	color: #50575e;
}

/* Liste et detail des tickets (section 9) : plus larges que le formulaire
   de connexion, toujours lisibles sur telephone. */
.agpst-portal-tickets,
.agpst-portal-ticket {
	max-width: 900px;
}

.agpst-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.agpst-filters label {
	display: flex;
	flex-direction: column;
	font-weight: 600;
	font-size: 0.9rem;
}

.agpst-filters select {
	margin-top: 0.25rem;
	padding: 0.4rem;
	border: 1px solid #8c8f94;
	border-radius: 4px;
}

.agpst-filters button {
	padding: 0.5rem 1rem;
	font-weight: 600;
	color: #fff;
	background-color: #1d4ed8;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.agpst-empty {
	color: #50575e;
}

.agpst-tickets-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.agpst-tickets-table th,
.agpst-tickets-table td {
	padding: 0.6rem 0.5rem;
	text-align: left;
	border-bottom: 1px solid #dcdcde;
	vertical-align: top;
}

.agpst-ticket-row--late td {
	background-color: #fcf0f1;
}

.agpst-late-flag {
	display: inline-block;
	margin-left: 0.4rem;
	padding: 0.1rem 0.4rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: #fff;
	background-color: #d63638;
	border-radius: 3px;
}

.agpst-pagination {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 1.5rem;
	font-size: 0.9rem;
}

.agpst-ticket-fields {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.4rem 1rem;
	margin: 1rem 0;
}

.agpst-ticket-fields dt {
	font-weight: 600;
	color: #50575e;
}

.agpst-ticket-fields dd {
	margin: 0;
}

.agpst-ticket-description {
	white-space: pre-line;
}

.agpst-ticket-shop {
	font-style: normal;
	line-height: 1.6;
}

@media (max-width: 640px) {
	.agpst-tickets-table thead {
		display: none;
	}

	.agpst-tickets-table,
	.agpst-tickets-table tbody,
	.agpst-tickets-table tr,
	.agpst-tickets-table td {
		display: block;
		width: 100%;
	}

	.agpst-tickets-table tr {
		margin-bottom: 1rem;
		border-bottom: 2px solid #dcdcde;
	}

	.agpst-tickets-table td {
		border-bottom: none;
		padding: 0.3rem 0;
	}

	.agpst-ticket-fields {
		grid-template-columns: 1fr;
	}
}
