/* === Layout global === */
html, body {
	height: 100%;
	margin: 0;
}

.page-wrapper {
	height: 100vh;
	display: flex;
	flex-direction: column;
}

.page-content {
	flex: 1; /* occupe tout l'espace vertical restant */
	min-height: 0;
	/* IMPORTANT pour permettre le scroll des enfants flex */
	padding: 10px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	/* évite un scroll global en plus du scroll interne */
}

body {
	font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	margin: 0;
	padding: 0;
	background-color: #f6f7fb;
	color: #333;
}

h1, h2, h3 {
	color: #003366;
}

input:focus, select:focus {
	border-color: #007ad9;
	outline: none;
}

.ui-datatable th {
	background-color: #f0f3f7;
	font-weight: 600;
}

.ui-datatable td {
	padding: 0.5rem !important;
}

.ui-paginator {
	padding: 0px !important;
}

/* Tooltip container */
.tr-tooltip {
	position: relative;
	cursor: pointer;
}

/* Tooltip text */
.tr-tooltip .tooltip-text {
	visibility: hidden;
	width: max-content;
	max-width: 300px;
	background-color: #333;
	color: #fff;
	text-align: left;
	padding: 6px 10px;
	border-radius: 4px;
	font-size: 0.85rem;
	line-height: 1.2rem;
	position: absolute;
	z-index: 1000;
	top: -5px;
	left: 105%;
	white-space: pre-line; /* pour garder les sauts de ligne */
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
	opacity: 0;
	transition: opacity 0.2s;
}

/* Tooltip visible */
.tr-tooltip:hover .tooltip-text {
	visibility: visible;
	opacity: 1;
}

.invalid-field .ui-inputfield, .invalid-field, .ui-inputfield.invalid-field
	{
	border: 1px solid #e53935 !important;
	background-color: #fff5f5 !important;
	box-shadow: 0 0 3px rgba(229, 57, 53, 0.5) !important;
}

.invalid-field:focus {
	outline: none !important;
	box-shadow: 0 0 4px #e53935 !important;
}

.ui-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Full page overlay */
.custom-loader-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

/* Spinner PrimeFlex style */
.custom-loader-spinner {
	width: 60px;
	height: 60px;
	border: 6px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

@keyframes spin {
	to { transform:rotate(360deg);}
}