@charset "utf-8";
/* CSS Document - Modernized */

/* General Table/Form Styles */
table.formulaire,
table.liste {
	width: 100% !important;
	max-width: 100% !important;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
	margin-bottom: 0px;
	/* Reduced to join with following table */
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	box-sizing: border-box;
}

/* When a list table immediately follows a search table (formulaire) */
table.formulaire+span+table.liste,
table.formulaire+table.liste,
form+table.liste {
	margin-top: 0 !important;
	border-top: none !important;
	border-radius: 0 0 8px 8px !important;
}

table.formulaire:has(+ span + table.liste),
table.formulaire:has(+ table.liste) {
	margin-bottom: 0 !important;
	border-radius: 8px 8px 0 0 !important;
}

/* Fallback for browsers that don't support :has */
table.formulaire-joined {
	margin-bottom: 0 !important;
	border-radius: 8px 8px 0 0 !important;
}

table.liste-joined {
	margin-top: 0 !important;
	border-top: none !important;
	border-radius: 0 0 8px 8px !important;
}


/* Modern Spacious Add Form */
table.formulaire {
	border: none;
	margin-bottom: 25px;
	background: #ffffff;
	box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	overflow: hidden;
	border-collapse: separate;
	border-spacing: 0;
	box-sizing: border-box;
	table-layout: fixed;
	width: 100% !important;
}

table.formulaire tr td {
	padding: 12px 15px;
	vertical-align: middle;
	border-bottom: 1px solid #f1f5f9;
	box-sizing: border-box;
}

/* 6-Column Grid Definition */
table.formulaire tr td:nth-child(1),
table.formulaire tr td:nth-child(3),
table.formulaire tr td:nth-child(5) {
	width: 13.33%;
	/* Labels */
}

table.formulaire tr td:nth-child(2),
table.formulaire tr td:nth-child(4),
table.formulaire tr td:nth-child(6) {
	width: 20%;
	/* Inputs */
}

table.formulaire input[type="text"],
table.formulaire input[type="password"],
table.formulaire select,
table.formulaire textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	height: 36px;
	padding: 6px 12px;
	font-size: 13px;
	font-weight: 500;
	color: #0f172a;
	background-color: #f8fafc;
	border: 1.5px solid #cbd5e1;
	border-radius: 8px;
	transition: all 0.2s ease;
	outline: none;
}

table.formulaire input[type="text"]:focus,
table.formulaire input[type="password"]:focus,
table.formulaire select:focus,
table.formulaire textarea:focus {
	outline: none;
	border-color: #2563eb;
	background-color: #ffffff;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Helper for inline groups like time ranges */
table.formulaire td [style*="display: flex"]>input,
table.formulaire td [style*="display: flex"]>select {
	flex: 1;
	width: auto !important;
	min-width: 0;
}

.inline-group {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}



/* Compact Search Form */
table.formulaire-compact {
	margin-bottom: 5px !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
	border: 1px solid #e0e0e0 !important;
	background: #fff !important;
	width: 100%;
	border-collapse: separate !important;
	border-spacing: 0 !important;
	border-radius: 8px !important;
	box-sizing: border-box !important;
}

table.formulaire-compact tr td {
	padding: 3px 6px !important;
	border-bottom: none !important;
}

table.formulaire-compact input[type="text"],
table.formulaire-compact select {
	height: 30px !important;
	padding: 4px 8px !important;
	font-size: 12px !important;
}

/* Headers */
table.formulaire tr th,
table.liste tr th,
.listehead {
	background: #34495e;
	color: #fff;
	padding: 12px 15px;
	text-align: left;
	font-weight: 500;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border: none;
}

/* Header style for Compact Forms (Search) */
table.formulaire-compact tr th {
	background: #34495e;
	/* Match main header */
	color: #fff;
	padding: 8px 10px;
	/* More compact padding */
	text-align: right;
	/* Push buttons to right */
	border-radius: 8px 8px 0 0;
	font-weight: 500;
	font-size: 13px;
	border: none;
}

table.formulaire tr th.az {
	background: #34495e;
	text-align: right;
}

/* Buttons aligned right in Add form header */
table.formulaire tr th {
	text-align: right;
}

table.formulaire tr th input[type="button"],
table.formulaire-compact tr th input[type="button"],
table.formulaire tr th input[type="submit"] {
	/* Apply to all header buttons */
	float: none;
	margin-left: 10px;
	width: auto !important;
}

table.formulaire tr th img,
table.formulaire-compact tr th img {
	/* Apply to both */
	height: 20px;
	width: 20px;
	vertical-align: middle;
	margin-right: 10px;
}

/* Form Cells - Redundant rule removed */


table.formulaire tr td.label {
	background: #f8fafc !important; /* Slight background for labels */
	border: none !important;
	border-right: 1px solid #e2e8f0 !important;
	font-weight: 600;
	color: #475569;
	text-align: right;
	padding-right: 15px;
	white-space: nowrap;
}

/* List Tables (Data Grids) */
table.liste tr td {
	padding: 10px 12px;
	border-bottom: 1px solid #e9ecef;
	color: #2c3e50;
	/* Darker text */
	font-size: 13px;
	font-weight: normal;
	border-right: none;
	/* Cleaner look */
	border-left: none;
	vertical-align: middle;
}

/* Zebra Striping */
table.liste tr:nth-child(even) {
	background-color: #f8faff;
	/* Subtle blue tint */
}

/* Hover Effect */
table.liste tr:hover {
	background-color: #e3f2fd;
	/* Clearer hover state */
	cursor: default;
}

/* Headers Refinement */
table.liste tr th {
	font-weight: 600;
	letter-spacing: 0.5px;
	border-bottom: 3px solid #3498db;
	/* Accent border */
}

/* Buttons */
input[type=button],
input[type=submit],
button {
	padding: 10px 22px;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	margin: 4px 5px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	width: auto;
	/* Default safe color to ensure visibility */
	background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
	color: #ffffff;
}

input[type=button]:hover,
input[type=submit]:hover,
button:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(100, 116, 139, 0.3);
}

/* Specific buttons by value for common TTS app buttons (Without the 'i' flag for browser compatibility) */
input[type=button][value*="NREGISTRER"],
input[type=button][value*="nregistrer"],
input[type=button][value*="Nregistrer"],
input[type=button][value*="OUVEAU"],
input[type=button][value*="ouveau"],
input[type=button][value*="Ouveau"],
input[type=submit],
#button3 {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	color: #ffffff;
}

input[type=button][value*="NREGISTRER"]:hover,
input[type=button][value*="nregistrer"]:hover,
input[type=button][value*="Nregistrer"]:hover,
input[type=button][value*="OUVEAU"]:hover,
input[type=button][value*="ouveau"]:hover,
input[type=button][value*="Ouveau"]:hover,
input[type=submit]:hover,
#button3:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

input[type=button][value*="ETOUR"],
input[type=button][value*="etour"],
input[type=button][value*="Etour"],
input[type=button][value*="NNULER"],
input[type=button][value*="nnuler"],
input[type=button][value*="Nnuler"],
#button2 {
	background: linear-gradient(135deg, #64748b 0%, #475569 100%);
	color: #ffffff;
}

input[type=button][value*="ETOUR"]:hover,
input[type=button][value*="etour"]:hover,
input[type=button][value*="Etour"]:hover,
input[type=button][value*="NNULER"]:hover,
input[type=button][value*="nnuler"]:hover,
input[type=button][value*="Nnuler"]:hover,
#button2:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(100, 116, 139, 0.3);
}

input[type=button][value*="MPRIMER"],
input[type=button][value*="mprimer"],
input[type=button][value*="Mprimer"] {
	background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
	color: #ffffff;
}

input[type=button][value*="MPRIMER"]:hover,
input[type=button][value*="mprimer"]:hover,
input[type=button][value*="Mprimer"]:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

/* Legacy Overrides */
.c2 {
	background: #fff0f0;
	color: #c0392b;
	font-weight: normal;
}

.mnt,
#rr {
	text-decoration: line-through;
	color: #e74c3c;
}

th.tr {
	cursor: pointer;
}

th.tr:hover {
	background-color: #2c3e50;
}

/* Checkboxes */
input[type=checkbox] {
	width: auto;
	margin-right: 5px;
}

/* Typography fix inside tables */
table.liste tr td {
	font-family: inherit;
}

/* ========================================
   ADDITIONAL FORM IMPROVEMENTS
   ======================================== */

/* Select dropdowns in forms */
table.formulaire select {
	padding: 2px 5px !important;
	/* Force compact padding */
	border: 1px solid #ced4da !important;
	border-radius: 4px !important;
	background: #fff !important;
	font-size: 11px !important;
	height: 26px !important;
	/* Match text inputs */
	color: #495057 !important;
	cursor: pointer;
	transition: border-color 0.3s;
}

table.formulaire select:focus {
	border-color: #3498db;
	outline: none;
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* Form labels improvement */
table.formulaire td.label {
	font-weight: 600;
	color: #475569;
	font-size: 14px;
	white-space: nowrap;
	padding-right: 15px;
}

/* Search/Filter row styling */
table.formulaire tr:first-child th {
	border-radius: 8px 8px 0 0;
}

/* Consistent input sizing in filter forms */
table.formulaire input[type="text"] {
	padding: 4px 8px !important;
	/* Force reduced padding */
	font-size: 11px !important;
	/* Force smaller font */
	height: 26px !important;
	/* Force reduced height */
	border: 1px solid #ced4da !important;
	border-radius: 4px !important;
	box-shadow: none !important;
	line-height: normal !important;
}

/* Row striping for list tables */
table.liste tbody tr:nth-child(odd) {
	background-color: #fff;
}

table.liste tbody tr:nth-child(even) {
	background-color: #f8f9fa;
}

table.liste tbody tr:hover {
	background-color: #e3f2fd;
}

/* Table header improvements */
table.liste thead tr th,
table.liste tr.listehead td {
	background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
	color: #fff;
	font-weight: 600;
	padding: 14px 12px;
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 0.5px;
	border: none;
}

/* Row hover with icon images */
table.liste tr td img {
	transition: transform 0.2s;
}

table.liste tr:hover td img {
	transform: scale(1.1);
}

/* Number alignment */
table.liste tr td.nbr {
	text-align: right;
	font-family: 'Roboto Mono', monospace;
	font-size: 13px;
}

/* Action column icons */
table.liste tr td:last-child {
	white-space: nowrap;
}



/* Responsive form container */
@media screen and (max-width: 1200px) {
	table.formulaire {
		width: 100% !important;
	}

	table.formulaire td,
	table.formulaire th {
		display: block;
		width: 100%;
		padding: 8px 15px;
	}

	table.formulaire td.label {
		text-align: left !important;
		padding-bottom: 5px;
	}
}

/* ========================================
   COMPACT TABLE - NO SCROLLBAR
   ======================================== */

/* No scrollbar - all columns visible */
.middle_back {
	max-width: 100%;
}

/* Ultra compact table styling - ADJUSTED TO 13PX */
table.liste {
	width: 100% !important;
	min-width: auto !important;
	table-layout: auto;
	font-size: 13px !important;
}

table.liste th,
table.liste td {
	white-space: nowrap;
	padding: 4px 5px !important;
	font-size: 13px !important;
	line-height: 1.4;
}

table.liste th {
	padding: 6px 5px !important;
	font-size: 13px !important;
	text-transform: uppercase;
}

/* Allow multi-line wrapping for Véhicule and Prestation columns to prevent pushing Action icons */
table.liste td.cell-vehicule,
table.liste td.cell-prestation {
	white-space: normal !important;
	word-wrap: break-word !important;
	word-break: normal !important;
	max-width: 140px !important;
	min-width: 90px !important;
	line-height: 1.3 !important;
}

/* Ensure immatriculation numbers (e.g. 9999-U-99) NEVER break at hyphens */
.immat-tag,
table.liste td.cell-vehicule .immat-tag {
	white-space: nowrap !important;
	display: inline-block !important;
	font-weight: 700 !important;
	color: #0f172a !important;
}

/* Main content area takes more space */
#cent {
	display: flex !important;
	flex-wrap: nowrap;
	gap: 10px;
}

#st11 {
	flex: 1 !important;
	min-width: 0;
	overflow: visible;
}

/* NARROW RIGHT SIDEBAR */
#st31 {
	width: 200px !important;
	max-width: 200px !important;
	min-width: 180px !important;
	flex-shrink: 0;
}

#st31 .st3 {
	padding: 8px;
}

#st31 .title,
#st31 h2.title {
	font-size: 13px !important;
	padding: 10px 12px !important;
}

#st31 .back {
	padding: 8px;
}

#st31 .back ul li {
	padding: 4px 0;
	font-size: 13px;
}

#st31 .back ul li a {
	font-size: 13px;
}

/* Compact calendar */
.ft {
	font-size: 16px !important;
	margin-bottom: 5px;
}

.calendar_table {
	font-size: 11px !important;
}

.calendar_table td,
.calendar_table th {
	padding: 2px !important;
	font-size: 11px !important;
}



/* ========================================
   MODERN UNIFIED SEARCH BAR LAYOUT (FLEXBOX)
   ======================================== */

/* Target search/filter forms and tables containing the search icon */
table.formulaire-compact,
form[action*="rechercher"] table.formulaire,
form[action*="recherche"] table.formulaire,
form[id="form1"] table.formulaire:has(input[src*="245.png"]),
table.formulaire:has(input[src*="245.png"]) {
	display: block !important;
	width: 100% !important;
	background: #ffffff !important;
	border: 1px solid #e2e8f0 !important;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
	border-radius: 8px !important;
	padding: 12px 16px !important;
	box-sizing: border-box !important;
	table-layout: auto !important;
	margin-bottom: 12px !important;
}

/* Force table layout elements to act as block elements */
table.formulaire-compact > tbody,
form[action*="rechercher"] table.formulaire > tbody,
form[action*="recherche"] table.formulaire > tbody,
table.formulaire:has(input[src*="245.png"]) > tbody {
	display: block !important;
	width: 100% !important;
}

/* Header row (contains title and action buttons) */
table.formulaire-compact tr:first-child,
form[action*="rechercher"] table.formulaire tr:first-child,
form[action*="recherche"] table.formulaire tr:first-child,
table.formulaire:has(input[src*="245.png"]) tr:first-child {
	display: flex !important;
	width: 100% !important;
	justify-content: space-between !important;
	align-items: center !important;
	border-bottom: 1px solid #f1f5f9 !important;
	padding-bottom: 8px !important;
	margin-bottom: 12px !important;
	background: transparent !important;
}

table.formulaire-compact tr:first-child th,
form[action*="rechercher"] table.formulaire tr:first-child th,
form[action*="recherche"] table.formulaire tr:first-child th,
table.formulaire:has(input[src*="245.png"]) tr:first-child th {
	display: flex !important;
	width: 100% !important;
	justify-content: space-between !important;
	align-items: center !important;
	background: transparent !important;
	padding: 0 !important;
	color: #1e293b !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	border: none !important;
}

/* Style header titles and icons */
table.formulaire-compact tr:first-child th span,
table.formulaire:has(input[src*="245.png"]) tr:first-child th span {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	color: #1e293b !important;
}

/* Style the buttons in the header row - Match .search-btn styling */
table.formulaire-compact tr:first-child th input[type="button"],
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[type="button"] {
	margin: 0 0 0 6px !important;
	height: 26px !important;
	padding: 0 12px !important;
	font-size: 10px !important;
	font-weight: 600 !important;
	border-radius: 4px !important;
	border: none !important;
	cursor: pointer !important;
	transition: all 0.2s ease-in-out !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-transform: uppercase !important;
	color: #ffffff !important;
	background-color: #64748b !important; /* default slate-500 */
}

table.formulaire-compact tr:first-child th input[type="button"]:hover,
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[type="button"]:hover {
	background-color: #475569 !important;
	box-shadow: 0 2px 4px rgba(100, 116, 139, 0.2) !important;
}

/* Specific button colors */
table.formulaire-compact tr:first-child th input[value*="Nouveau"],
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="Nouveau"],
table.formulaire-compact tr:first-child th input[value*="NOUVEAU"],
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="NOUVEAU"] {
	background-color: #3b82f6 !important; /* blue-500 */
}
table.formulaire-compact tr:first-child th input[value*="Nouveau"]:hover,
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="Nouveau"]:hover,
table.formulaire-compact tr:first-child th input[value*="NOUVEAU"]:hover,
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="NOUVEAU"]:hover {
	background-color: #2563eb !important;
	box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2) !important;
}

table.formulaire-compact tr:first-child th input[value*="Imprimer"],
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="Imprimer"],
table.formulaire-compact tr:first-child th input[value*="IMPRIMER"],
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="IMPRIMER"] {
	background-color: #10b981 !important; /* emerald-500 */
}
table.formulaire-compact tr:first-child th input[value*="Imprimer"]:hover,
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="Imprimer"]:hover,
table.formulaire-compact tr:first-child th input[value*="IMPRIMER"]:hover,
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="IMPRIMER"]:hover {
	background-color: #059669 !important;
	box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
}

table.formulaire-compact tr:first-child th input[value*="Annuler"],
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="Annuler"],
table.formulaire-compact tr:first-child th input[value*="ANNULER"],
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="ANNULER"] {
	background-color: #f43f5e !important; /* rose-500 */
}
table.formulaire-compact tr:first-child th input[value*="Annuler"]:hover,
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="Annuler"]:hover,
table.formulaire-compact tr:first-child th input[value*="ANNULER"]:hover,
table.formulaire:has(input[src*="245.png"]) tr:first-child th input[value*="ANNULER"]:hover {
	background-color: #e11d48 !important;
	box-shadow: 0 2px 4px rgba(244, 63, 94, 0.2) !important;
}

/* The actual input rows (after the header row) - Compact 6-Column Layout Fix */
table.formulaire-compact,
form[action*="rechercher"] table.formulaire,
form[action*="recherche"] table.formulaire,
table.formulaire:has(input[src*="245.png"]) {
	display: table !important;
	width: 100% !important;
	table-layout: fixed !important;
	border-collapse: separate !important;
	border-spacing: 0 3px !important;
	background: #ffffff !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 10px !important;
	padding: 8px 12px !important;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
	margin-bottom: 12px !important;
}

table.formulaire-compact tbody,
table.formulaire:has(input[src*="245.png"]) tbody {
	display: table-row-group !important;
}

table.formulaire-compact tr,
table.formulaire:has(input[src*="245.png"]) tr {
	display: table-row !important;
	height: auto !important;
}

table.formulaire-compact tr:first-child th,
table.formulaire:has(input[src*="245.png"]) tr:first-child th {
	display: table-cell !important;
	padding: 4px 0 8px 0 !important;
	border-bottom: 1px solid #f1f5f9 !important;
	background: transparent !important;
}

table.formulaire-compact tr:not(:first-child) td,
table.formulaire:has(input[src*="245.png"]) tr:not(:first-child) td {
	display: table-cell !important;
	padding: 3px 5px !important;
	vertical-align: middle !important;
	border: none !important;
	background: transparent !important;
	height: auto !important;
}

/* Ensure Spry validation containers do NOT break layout */
table.formulaire-compact td span:not([class*="Msg"]),
table.formulaire:has(input[src*="245.png"]) td span:not([class*="Msg"]) {
	display: block !important;
	width: 100% !important;
}

/* Compact inputs and selects */
table.formulaire-compact input[type="text"],
table.formulaire-compact select,
table.formulaire:has(input[src*="245.png"]) input[type="text"],
table.formulaire:has(input[src*="245.png"]) select {
	height: 28px !important;
	padding: 0 8px !important;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 5px !important;
	background-color: #ffffff !important;
	color: #0f172a !important;
	width: 100% !important;
	min-width: 0 !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	transition: all 0.2s ease !important;
}

table.formulaire-compact input[type="text"]:focus,
table.formulaire-compact select:focus,
table.formulaire:has(input[src*="245.png"]) input[type="text"]:focus,
table.formulaire:has(input[src*="245.png"]) select:focus {
	border-color: #2563eb !important;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
	outline: none !important;
}

/* Compact checkboxes with label */
table.formulaire-compact input[type="checkbox"],
table.formulaire:has(input[src*="245.png"]) input[type="checkbox"] {
	width: 14px !important;
	height: 14px !important;
	margin: 0 4px 0 0 !important;
	vertical-align: middle !important;
	cursor: pointer !important;
}

table.formulaire-compact td label,
table.formulaire:has(input[src*="245.png"]) td label {
	font-size: 11px !important;
	font-weight: 600 !important;
	color: #475569 !important;
	vertical-align: middle !important;
	cursor: pointer !important;
}

/* Styling for non-table search forms (like contratnonpayer.php) */
form:has(input[src*="245.png"]):not(:has(table)) {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	gap: 8px 12px !important;
	background: #ffffff !important;
	border: 1px solid #e2e8f0 !important;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
	border-radius: 8px !important;
	padding: 12px 16px !important;
	margin-bottom: 12px !important;
	box-sizing: border-box !important;
}

form:has(input[src*="245.png"]):not(:has(table)) .label,
form:has(input[src*="245.png"]):not(:has(table)) span.label {
	font-size: 11px !important;
	color: #475569 !important;
	font-weight: 600 !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
}

form:has(input[src*="245.png"]):not(:has(table)) input[type="text"],
form:has(input[src*="245.png"]):not(:has(table)) select {
	height: 28px !important;
	padding: 4px 8px !important;
	font-size: 12px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 4px !important;
	background-color: #ffffff !important;
	color: #1e293b !important;
	min-width: 120px !important;
	max-width: 200px !important;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
	display: inline-block !important;
	vertical-align: middle !important;
	width: auto !important;
}

/* Search image button hover effect */
input[type="image"][src*="245.png"] {
	transition: transform 0.2s ease-in-out !important;
	cursor: pointer !important;
}

input[type="image"][src*="245.png"]:hover {
	transform: scale(1.15) !important;
}

/* ========================================
   MODERN UNIFIED SEARCH CARD SYSTEM
   ======================================== */

.search-card {
	background: #ffffff !important;
	border: 1px solid #e2e8f0 !important;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
	border-radius: 8px !important;
	padding: 8px 12px !important;
	margin-bottom: 8px !important;
	box-sizing: border-box !important;
	width: 100% !important;
	font-family: inherit !important;
}

.search-header {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	border-bottom: 1px solid #f1f5f9 !important;
	padding-bottom: 4px !important;
	margin-bottom: 8px !important;
}

.search-title {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	color: #1e293b !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
}

.search-title img {
	vertical-align: middle !important;
	width: 16px !important;
	height: 16px !important;
}

.search-actions {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
	flex-wrap: wrap !important;
}

.search-actions img[src*="Excel.png"] {
	cursor: pointer !important;
	width: 20px !important;
	height: 20px !important;
	transition: transform 0.2s !important;
}

.search-actions img[src*="Excel.png"]:hover {
	transform: scale(1.1) !important;
}

/* Button styles */
.search-btn {
	height: 24px !important;
	padding: 0 10px !important;
	font-size: 10px !important;
	font-weight: 600 !important;
	border-radius: 4px !important;
	border: none !important;
	cursor: pointer !important;
	transition: all 0.2s ease-in-out !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-transform: uppercase !important;
	color: #ffffff !important;
}

.search-btn-primary {
	background-color: #0284c7 !important;
}
.search-btn-primary:hover {
	background-color: #0369a1 !important;
	box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2) !important;
}

.search-btn-secondary {
	background-color: #10b981 !important;
}
.search-btn-secondary:hover {
	background-color: #059669 !important;
	box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
}

.search-btn-info {
	background-color: #3b82f6 !important;
}
.search-btn-info:hover {
	background-color: #2563eb !important;
	box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2) !important;
}

.search-btn-warning {
	background-color: #f43f5e !important;
}
.search-btn-warning:hover {
	background-color: #e11d48 !important;
	box-shadow: 0 2px 4px rgba(244, 63, 94, 0.2) !important;
}

.search-btn-dark {
	background-color: #64748b !important;
}
.search-btn-dark:hover {
	background-color: #475569 !important;
	box-shadow: 0 2px 4px rgba(100, 116, 139, 0.2) !important;
}

/* Grid layout for search form body */
.search-grid {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 8px 14px !important;
	margin-bottom: 8px !important;
	align-items: end !important;
}

@media (max-width: 900px) {
	.search-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

.search-field {
	display: flex !important;
	flex-direction: column !important;
	gap: 2px !important;
	width: 100% !important;
}

.search-field:has(.search-submit-btn),
.search-field.search-action-right {
	grid-column: auto !important;
	width: 100% !important;
	margin-left: 0 !important;
}

.search-submit-btn {
	width: 100% !important;
	height: 26px !important;
	justify-content: center !important;
	font-weight: 700 !important;
}

.search-field label {
	font-size: 10px !important;
	font-weight: 600 !important;
	color: #475569 !important;
	text-align: left !important;
}

.search-field input[type="text"],
.search-field select {
	height: 24px !important;
	padding: 2px 6px !important;
	font-size: 11px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 4px !important;
	background-color: #ffffff !important;
	color: #1e293b !important;
	width: 100% !important;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
	box-sizing: border-box !important;
	transition: all 0.2s ease-in-out !important;
}

.search-field input[type="text"]:focus,
.search-field select:focus {
	border-color: #3b82f6 !important;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
	outline: none !important;
}

/* Checkbox field styling */
.search-field-checkbox {
	display: flex !important;
	align-items: center !important;
	gap: 4px !important;
	height: 24px !important;
	cursor: pointer !important;
}

.search-field-checkbox input[type="checkbox"] {
	width: 12px !important;
	height: 12px !important;
	cursor: pointer !important;
	margin: 0 !important;
}

.search-field-checkbox label {
	font-size: 11px !important;
	font-weight: 600 !important;
	color: #475569 !important;
	cursor: pointer !important;
}

/* Submit and Footer section */
.search-footer {
	display: flex !important;
	justify-content: space-between !important;
	align-items: center !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
	border-top: 1px solid #f1f5f9 !important;
	padding-top: 8px !important;
}

.search-results-count {
	font-size: 10px !important;
	font-weight: 600 !important;
	color: #64748b !important;
}

.search-submit-container {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
}

.search-submit-btn {
	background-color: #0284c7 !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 4px !important;
	height: 26px !important;
	padding: 0 12px !important;
	font-size: 10px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: all 0.2s ease-in-out !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
}

.search-submit-btn:hover {
	background-color: #0369a1 !important;
	box-shadow: 0 4px 6px -1px rgba(2, 132, 199, 0.2) !important;
}

.search-submit-btn img {
	filter: brightness(0) invert(1) !important;
	width: 12px !important;
	height: 12px !important;
}

/* Info card for legends */
.legend-card {
	background: #f8fafc !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 6px !important;
	padding: 6px 12px !important;
	margin-top: 6px !important;
	display: flex !important;
	justify-content: center !important;
	gap: 15px !important;
	flex-wrap: wrap !important;
}

.legend-item {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
	font-size: 11px !important;
	font-weight: 600 !important;
	color: #475569 !important;
}

.legend-color-box {
	width: 20px !important;
	height: 10px !important;
	border-radius: 2px !important;
	display: inline-block !important;
}

/* ========================================
   PAGINATION COMBO STYLING
   ======================================== */
select[name="pagination"], select#pagination {
	width: auto !important;
	min-width: 150px !important;
	max-width: 250px !important;
	display: inline-block !important;
	padding: 4px 12px !important;
	height: 28px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 6px !important;
	background-color: #f8fafc !important;
	color: #334155 !important;
	cursor: pointer !important;
	box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

select[name="pagination"]:focus, select#pagination:focus {
	border-color: #3b82f6 !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

#pages {
	text-align: center !important;
	margin-top: 15px !important;
	font-size: 13px !important;
	color: #475569 !important;
	font-weight: 600 !important;
}

/* ========================================
   MODERN FORM GRID LAYOUT & BEAUTIFUL FIELDS (ALL AJOUT FORMS)
   ======================================== */
.form-grid {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 16px 24px !important;
	padding: 24px 28px !important;
	background: #ffffff !important;
	border-radius: 0 0 12px 12px !important;
	box-shadow: 0 4px 15px rgba(15, 23, 42, 0.05) !important;
	border: 1px solid #e2e8f0 !important;
	border-top: none !important;
	margin-bottom: 25px !important;
}

@media (max-width: 900px) {
	.form-grid {
		grid-template-columns: 1fr !important;
	}
}

.form-group {
	display: flex !important;
	flex-direction: column !important;
	gap: 6px !important;
	width: 100% !important;
}

.form-group label {
	font-weight: 700 !important;
	font-size: 11.5px !important;
	color: #475569 !important;
	margin-bottom: 2px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.4px !important;
}

.form-group input[type="text"], 
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select {
	width: 100% !important;
	max-width: 100% !important;
	height: 36px !important;
	padding: 6px 12px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	color: #0f172a !important;
	background-color: #f8fafc !important;
	border: 1.5px solid #cbd5e1 !important;
	border-radius: 8px !important;
	transition: all 0.2s ease !important;
	display: block !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	outline: none !important;
}

.form-group textarea {
	width: 100% !important;
	max-width: 100% !important;
	min-height: 80px !important;
	padding: 8px 12px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	color: #0f172a !important;
	background-color: #f8fafc !important;
	border: 1.5px solid #cbd5e1 !important;
	border-radius: 8px !important;
	transition: all 0.2s ease !important;
	display: block !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	outline: none !important;
	resize: vertical !important;
}

.form-group input[type="text"]:focus, 
.form-group input[type="password"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
	border-color: #2563eb !important;
	background-color: #ffffff !important;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
	outline: none !important;
}

/* ===== STYLING COMBO AGENCE ÉLÉGANTE ET COMPACTE ===== */
select[name="agence"],
.actu-agency select,
.search-field select[name="agence"] {
	height: 26px !important;
	padding: 2px 20px 2px 8px !important;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	color: #0f172a !important;
	background-color: #f8fafc !important;
	border: 1.5px solid #cbd5e1 !important;
	border-radius: 6px !important;
	outline: none !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
	max-width: 220px !important;
	display: inline-block !important;
	vertical-align: middle !important;
}

select[name="agence"]:hover,
.actu-agency select:hover {
	border-color: #2563eb !important;
	background-color: #ffffff !important;
}

select[name="agence"]:focus,
.actu-agency select:focus {
	border-color: #2563eb !important;
	background-color: #ffffff !important;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* ========================================
   REGROUPEMENT CLAIR DES ICÔNES D'ACTION TABLEAU
   ======================================== */
table.liste th:last-child,
table.liste td:last-child {
	white-space: nowrap !important;
	width: 1% !important;
	text-align: center !important;
	vertical-align: middle !important;
	padding: 4px 6px !important;
}

.action-group,
table.liste td:last-child > div {
	display: inline-flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 6px !important;
	background: #f8fafc !important;
	border: 1.5px solid #cbd5e1 !important;
	border-radius: 20px !important;
	padding: 3px 10px !important;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
	transition: all 0.2s ease !important;
	margin: 0 auto !important;
}

table.liste tr:hover .action-group,
table.liste tr:hover td:last-child > div {
	background: #ffffff !important;
	border-color: #94a3b8 !important;
	box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1) !important;
}

.action-group img,
.action-group a,
table.liste td:last-child img,
table.liste td:last-child a {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-decoration: none !important;
	vertical-align: middle !important;
}

.action-group img,
table.liste td:last-child img {
	width: 16px !important;
	height: 16px !important;
	padding: 3px !important;
	border-radius: 5px !important;
	cursor: pointer !important;
	transition: transform 0.18s ease, background-color 0.18s ease !important;
	border: none !important;
	background: transparent !important;
	box-shadow: none !important;
	margin: 0 !important;
}

.action-group img:hover,
.action-group a:hover img,
table.liste td:last-child img:hover,
table.liste td:last-child a:hover img {
	background-color: #e2e8f0 !important;
	transform: scale(1.25) !important;
}

/* ====================================================
   ASCENSEURS DE DÉFILEMENT HORIZONTAL POUR TOUTES LES DIVS DE RECHERCHE & TABLEAUX (MOBILE)
   ==================================================== */
.search-card,
.search-container,
.search-panel,
.form-header,
.stats-filter-form,
.control-bar,
.rechercher,
.legend-card,
#search-box,
.search-box,
.recherche,
.middle_back,
#st11,
.table-container,
.table-card,
.report-container {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

@media screen and (max-width: 1024px) {
	/* Conteneur de recherche : S'adapte à 100% de la largeur de l'écran mobile sans déborder */
	.search-card,
	.search-container,
	.search-panel,
	.form-header,
	.stats-filter-form,
	.control-bar,
	.rechercher,
	.legend-card,
	#search-box,
	.search-box,
	.recherche,
	form[name="form1"],
	#form1 {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
		margin-bottom: 12px !important;
		display: block !important;
		overflow: hidden !important;
	}

	/* Empilement propre des champs de recherche (2 colonnes sur tablette, 1 colonne sur mobile) */
	.search-grid,
	.search-card .search-grid,
	.search-panel-body {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 10px 12px !important;
		width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box !important;
	}

	/* Sur écrans smartphones (<= 650px) : 1 champ par ligne (l'un au-dessus de l'autre) */
	@media screen and (max-width: 650px) {
		.search-grid,
		.search-card .search-grid,
		.search-panel-body,
		.stats-filter-form {
			display: flex !important;
			flex-direction: column !important;
			width: 100% !important;
			gap: 8px !important;
		}

		.search-header {
			flex-direction: column !important;
			align-items: flex-start !important;
			gap: 8px !important;
		}
	}

	.search-field,
	.stats-filter-group {
		width: 100% !important;
		min-width: 0 !important;
		display: flex !important;
		flex-direction: column !important;
		box-sizing: border-box !important;
	}

	.search-field input[type="text"],
	.search-field select,
	.stats-filter-form select,
	.stats-filter-form input[type="text"] {
		width: 100% !important;
		min-width: 0 !important;
		box-sizing: border-box !important;
	}

	.search-submit-btn,
	.search-field .search-submit-btn {
		width: 100% !important;
		justify-content: center !important;
	}

	/* Alignement et ascenseur horizontal direct pour tous les tableaux */
	.middle_back,
	#st11,
	.table-container,
	.table-card,
	.report-container,
	table.liste,
	table.lst,
	table.stats-table,
	table.data-table {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch !important;
		padding-bottom: 8px !important;
		display: block !important;
		margin-bottom: 15px !important;
	}
}

/* STYLE DES ASCENSEURS (SCROLLBARS THIN & MODERN) FOR ALL SEARCH & TABLE DIVS */
.middle_back::-webkit-scrollbar,
#st11::-webkit-scrollbar,
.table-container::-webkit-scrollbar,
.table-card::-webkit-scrollbar,
.report-container::-webkit-scrollbar,
.search-card::-webkit-scrollbar,
.search-container::-webkit-scrollbar,
.search-panel::-webkit-scrollbar,
.search-grid::-webkit-scrollbar,
.form-header::-webkit-scrollbar,
.stats-filter-form::-webkit-scrollbar,
.control-bar::-webkit-scrollbar,
.legend-card::-webkit-scrollbar,
#search-box::-webkit-scrollbar,
.search-box::-webkit-scrollbar {
	height: 6px !important;
}

.middle_back::-webkit-scrollbar-track,
#st11::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track,
.table-card::-webkit-scrollbar-track,
.report-container::-webkit-scrollbar-track,
.search-card::-webkit-scrollbar-track,
.search-container::-webkit-scrollbar-track,
.search-panel::-webkit-scrollbar-track,
.search-grid::-webkit-scrollbar-track,
.form-header::-webkit-scrollbar-track,
.stats-filter-form::-webkit-scrollbar-track,
.control-bar::-webkit-scrollbar-track,
.legend-card::-webkit-scrollbar-track,
#search-box::-webkit-scrollbar-track,
.search-box::-webkit-scrollbar-track {
	background: #f1f5f9 !important;
	border-radius: 10px !important;
}

.middle_back::-webkit-scrollbar-thumb,
#st11::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb,
.table-card::-webkit-scrollbar-thumb,
.report-container::-webkit-scrollbar-thumb,
.search-card::-webkit-scrollbar-thumb,
.search-container::-webkit-scrollbar-thumb,
.search-panel::-webkit-scrollbar-thumb,
.search-grid::-webkit-scrollbar-thumb,
.form-header::-webkit-scrollbar-thumb,
.stats-filter-form::-webkit-scrollbar-thumb,
.control-bar::-webkit-scrollbar-thumb,
.legend-card::-webkit-scrollbar-thumb,
#search-box::-webkit-scrollbar-thumb,
.search-box::-webkit-scrollbar-thumb {
	background: #cbd5e1 !important;
	border-radius: 10px !important;
}

.middle_back::-webkit-scrollbar-thumb:hover,
#st11::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover,
.table-card::-webkit-scrollbar-thumb:hover,
.report-container::-webkit-scrollbar-thumb:hover,
.search-card::-webkit-scrollbar-thumb:hover,
.search-container::-webkit-scrollbar-thumb:hover,
.search-panel::-webkit-scrollbar-thumb:hover,
.search-grid::-webkit-scrollbar-thumb:hover,
.form-header::-webkit-scrollbar-thumb:hover,
.stats-filter-form::-webkit-scrollbar-thumb:hover,
.control-bar::-webkit-scrollbar-thumb:hover,
.legend-card::-webkit-scrollbar-thumb:hover,
#search-box::-webkit-scrollbar-thumb:hover,
.search-box::-webkit-scrollbar-thumb:hover {
	background: #2563eb !important;
}

/* ====================================================
   ICÔNES HAUT (20px) & TAILLE TEXTE DU MENU (MOBILE)
   ==================================================== */
@media screen and (max-width: 1024px) {
	/* Réduction de l'écriture du menu principal sur mobile */
	#menu {
		width: 100% !important;
		max-width: 100% !important;
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch !important;
	}

	#menu ul {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		width: max-content !important;
	}

	#menu a {
		font-size: 11.5px !important; /* Texte de menu plus petit sur mobile */
		padding: 8px 10px !important;
		white-space: nowrap !important;
		letter-spacing: 0px !important;
	}

	/* Barre d'icônes supérieure : icônes agrandies (28px) avec espacement serré */
	.barre {
		width: 100% !important;
		max-width: 100% !important;
		box-sizing: border-box !important;
		overflow-x: auto !important;
		-webkit-overflow-scrolling: touch !important;
		white-space: nowrap !important;
		padding: 4px 6px !important;
		margin: 0 0 4px 0 !important;
		background: #ffffff !important;
	}

	.barre table {
		float: none !important;
		display: inline-table !important;
		border-collapse: collapse !important;
		vertical-align: middle !important;
	}

	.barre td {
		padding: 1px 2px !important;
		margin: 0 !important;
		line-height: 1 !important;
	}

	.barre td img,
	.barre a img {
		width: 28px !important; /* Icônes agrandies à 28px */
		height: 28px !important;
		padding: 1px !important;
		margin: 0 !important;
	}

	.barre span[style*="float:right"] {
		float: none !important;
		display: inline-block !important;
		vertical-align: middle !important;
		margin-left: 8px !important;
	}

	.barre span[style*="float:right"] img {
		width: 34px !important;
		height: 30px !important;
	}

	.barre::-webkit-scrollbar {
		height: 4px !important;
	}

	.barre::-webkit-scrollbar-track {
		background: #f1f5f9 !important;
	}

	.barre::-webkit-scrollbar-thumb {
		background: #cbd5e1 !important;
		border-radius: 4px !important;
	}
}