/* ============================================
   MAIN.CSS - Styles centralisés pour l'admin
   ============================================ */

/* ============================================
   1. STYLES DE BASE
   ============================================ */

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

body {
	font-family: system-ui, Arial, sans-serif;
	margin: 0;
	background: #0f172a;
	color: #e2e8f0;
	overflow-x: hidden;
	width: 100%;
	max-width: 100%;
}

/* ============================================
   2. LAYOUT PRINCIPAL
   ============================================ */

.dashboard-shell {
	display: block;
	min-height: 100vh;
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
	position: relative;
}

/* Sidebar — fixe à gauche (desktop) */
.sidebar {
	width: 260px;
	background: #0b1220;
	border-right: 1px solid rgba(148, 163, 184, 0.18);
	padding: 20px 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	position: fixed;
	left: 0;
	top: 0;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	z-index: 40;
	transition: transform 0.28s ease;
	-webkit-overflow-scrolling: touch;
}

.sidebar-header {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(148, 163, 184, 0.12);
	flex-shrink: 0;
}

.sidebar .brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sidebar .brand-icon {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.38), rgba(14, 116, 144, 0.35));
	display: grid;
	place-items: center;
	font-size: 20px;
	flex-shrink: 0;
}

.sidebar .brand-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.sidebar .brand-text strong {
	font-size: 15px;
	line-height: 1.2;
}

.sidebar .brand-text span {
	font-size: 12px;
	color: rgba(226, 232, 240, 0.6);
}

.nav-sections {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.sidebar-group {
	border-radius: 12px;
	background: rgba(15, 23, 42, 0.45);
	border: 1px solid rgba(148, 163, 184, 0.1);
	overflow: hidden;
	flex-shrink: 0;
}

.sidebar-group-trigger {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	cursor: pointer;
	list-style: none;
	user-select: none;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(148, 163, 184, 0.85);
	transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-group-trigger::-webkit-details-marker {
	display: none;
}

.sidebar-group-trigger:hover {
	background: rgba(30, 41, 59, 0.55);
	color: rgba(226, 232, 240, 0.95);
}

.sidebar-group-icon {
	font-size: 14px;
	line-height: 1;
}

.sidebar-group-label {
	flex: 1;
	min-width: 0;
}

.sidebar-group-chevron {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
	opacity: 0.7;
	margin-right: 2px;
}

.sidebar-group[open] .sidebar-group-chevron {
	transform: rotate(-135deg);
	margin-top: 4px;
}

.sidebar-group-items {
	list-style: none;
	margin: 0;
	padding: 4px 8px 10px;
	display: grid;
	gap: 4px;
}

.nav-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 12px;
	border-radius: 10px;
	text-decoration: none;
	color: rgba(203, 213, 225, 0.92);
	background: transparent;
	border: 1px solid transparent;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
	border-color: rgba(59, 130, 246, 0.35);
	background: rgba(30, 41, 59, 0.65);
	color: #fff;
}

.nav-item.active {
	border-color: rgba(59, 130, 246, 0.55);
	background: rgba(37, 99, 235, 0.28);
	color: #fff;
	box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.9);
}

.nav-link-label {
	font-weight: 600;
	font-size: 14px;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.nav-link-desc {
	font-size: 11px;
	color: rgba(148, 163, 184, 0.85);
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.nav-item.active .nav-link-desc {
	color: rgba(191, 219, 254, 0.85);
}

.sidebar-footer {
	margin-top: auto;
	padding-top: 8px;
	flex-shrink: 0;
}

.sidebar-logout {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 14px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 13px;
	text-decoration: none;
	background: rgba(239, 68, 68, 0.1);
	color: #fca5a5;
	border: 1px solid rgba(239, 68, 68, 0.25);
	transition: background 0.15s ease, transform 0.15s ease;
}

.sidebar-logout:hover {
	background: rgba(239, 68, 68, 0.18);
	transform: translateY(-1px);
}

.sidebar-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.72);
	backdrop-filter: blur(4px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s ease;
	z-index: 35;
}

.sidebar-backdrop.active {
	opacity: 1;
	pointer-events: auto;
}

body.sidebar-open {
	overflow: hidden;
}

.header-toggle {
	display: none;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	border: 1px solid rgba(148, 163, 184, 0.28);
	background: rgba(15, 23, 42, 0.55);
	cursor: pointer;
	position: relative;
	flex-shrink: 0;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.header-toggle span {
	position: absolute;
	left: 10px;
	right: 10px;
	height: 2px;
	border-radius: 999px;
	background: #e2e8f0;
	transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.header-toggle span:nth-child(1) { top: 13px; }
.header-toggle span:nth-child(2) { top: 19px; }
.header-toggle span:nth-child(3) { top: 25px; }

.header-toggle.is-open span:nth-child(1) {
	top: 19px;
	transform: rotate(45deg);
}

.header-toggle.is-open span:nth-child(2) {
	opacity: 0;
}

.header-toggle.is-open span:nth-child(3) {
	top: 19px;
	transform: rotate(-45deg);
}

.header-toggle:hover {
	background: rgba(30, 41, 59, 0.75);
	border-color: rgba(148, 163, 184, 0.45);
}

.main-column {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh;
	margin-left: 260px;
	width: calc(100% - 260px);
	max-width: calc(100% - 260px);
	background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.12), transparent 55%);
	overflow-x: hidden;
}

.main-content {
	flex: 1;
	padding: 24px 0 48px;
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
	overflow-x: hidden;
}

.container {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	display: grid;
	gap: 32px;
	padding: 0 24px;
	box-sizing: border-box;
	min-width: 0;
	overflow-x: hidden;
}

/* ============================================
   3. NAVIGATION HORIZONTALE
   ============================================ */

/* ============================================
   4. HEADER
   ============================================ */

.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 24px;
	background: rgba(15, 23, 42, 0.88);
	border-bottom: 1px solid rgba(148, 163, 184, 0.2);
	backdrop-filter: blur(20px);
	position: sticky;
	top: 0;
	z-index: 30;
	gap: 16px;
	transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
	flex-shrink: 0;
}

.admin-topbar .header-leading {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1;
}

.header-brand--compact .brand-icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.38), rgba(14, 116, 144, 0.35));
	display: grid;
	place-items: center;
	font-size: 18px;
}

.header-page-title {
	display: block;
	font-size: 15px;
	line-height: 1.2;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.header-logout--desktop {
	display: inline-flex;
	align-items: center;
	padding: 8px 14px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: rgba(226, 232, 240, 0.9);
	border: 1px solid rgba(148, 163, 184, 0.25);
	background: rgba(15, 23, 42, 0.5);
	transition: background 0.15s ease, border-color 0.15s ease;
}

.header-logout--desktop:hover {
	background: rgba(239, 68, 68, 0.12);
	border-color: rgba(239, 68, 68, 0.35);
	color: #fca5a5;
}

.header.scrolled {
	background: rgba(15, 23, 42, 0.95);
	backdrop-filter: blur(24px);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	opacity: 0.98;
}

.header.scrolled-top {
	background: rgba(15, 23, 42, 0.75);
	backdrop-filter: blur(18px);
	box-shadow: none;
	opacity: 1;
}

.header-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.header-brand .brand-icon {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.38), rgba(14, 116, 144, 0.35));
	display: grid;
	place-items: center;
	font-size: 20px;
}

.header-brand strong {
	display: block;
	font-size: 16px;
	line-height: 1.2;
}

.header-brand .small {
	display: block;
	font-size: 12px;
	color: rgba(226, 232, 240, 0.65);
	line-height: 1.2;
}

.header-nav {
	display: flex;
	align-items: center;
	gap: 16px;
	flex: 1;
	justify-content: flex-end;
}

.nav-menu {
	display: flex;
	align-items: center;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-menu-item {
	position: relative;
}

.nav-menu-trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 10px;
	color: rgba(226, 232, 240, 0.9);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
	font-family: inherit;
}

.nav-menu-trigger:hover,
.nav-menu-item:hover > .nav-menu-trigger {
	background: rgba(30, 41, 59, 0.65);
	border-color: rgba(59, 130, 246, 0.35);
	color: #fff;
}

.nav-menu-trigger[aria-expanded="true"],
.nav-menu-item:hover > .nav-menu-trigger[aria-expanded="true"] {
	background: rgba(37, 99, 235, 0.25);
	border-color: rgba(59, 130, 246, 0.5);
}

.nav-menu-icon {
	font-size: 16px;
	line-height: 1;
}

.nav-menu-label {
	font-size: 14px;
}

.nav-menu-arrow {
	font-size: 10px;
	transition: transform 0.15s ease;
	opacity: 0.7;
}

.nav-menu-item:hover > .nav-menu-trigger .nav-menu-arrow,
.nav-menu-trigger[aria-expanded="true"] .nav-menu-arrow {
	transform: rotate(180deg);
}

.nav-submenu {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	min-width: 240px;
	max-width: 320px;
	background: rgba(11, 18, 32, 0.98);
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
	padding: 8px;
	list-style: none;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
	z-index: 1000;
	backdrop-filter: blur(12px);
}

/* Menu ouvert au survol (comportement par défaut) */
.nav-menu-item:hover > .nav-submenu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Menu ouvert via classe .open (gestion JavaScript) - Permet de garder ouvert après clic */
.nav-menu-item.open > .nav-submenu,
.nav-submenu.open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Menu ouvert via aria-expanded sur le trigger (gestion JavaScript) */
.nav-menu-item:has(.nav-menu-trigger[aria-expanded="true"]) > .nav-submenu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.nav-submenu-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px 14px;
	border-radius: 10px;
	text-decoration: none;
	color: rgba(203, 213, 225, 0.9);
	background: transparent;
	border: 1px solid transparent;
	transition: all 0.15s ease;
}

.nav-submenu-item:hover {
	background: rgba(30, 41, 59, 0.65);
	border-color: rgba(59, 130, 246, 0.35);
	color: #fff;
}

.nav-submenu-item.active {
	background: rgba(37, 99, 235, 0.35);
	border-color: rgba(59, 130, 246, 0.6);
	color: #fff;
}

.nav-submenu-label {
	font-weight: 600;
	font-size: 14px;
}

.nav-submenu-desc {
	font-size: 12px;
	color: rgba(148, 163, 184, 0.85);
	line-height: 1.4;
}

/* Gestion du positionnement des sous-menus pour rester dans le viewport */
.nav-submenu.nav-submenu-left {
	right: auto;
	left: 0;
}

.nav-submenu.nav-submenu-right {
	right: 0;
	left: auto;
}

.nav-submenu.nav-submenu-top {
	top: auto;
	bottom: calc(100% + 8px);
	transform: translateY(8px);
}

/* Menu ouvert au survol avec positionnement top */
.nav-menu-item:hover > .nav-submenu.nav-submenu-top {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}

/* Menu ouvert (via classe .open) avec positionnement top */
.nav-menu-item.open > .nav-submenu.nav-submenu-top,
.nav-submenu.nav-submenu-top.open {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}

/* Menu ouvert via aria-expanded avec positionnement top */
.nav-menu-item:has(.nav-menu-trigger[aria-expanded="true"]) > .nav-submenu.nav-submenu-top {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.header-logout {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 10px;
	font-weight: 600;
	text-decoration: none;
	background: rgba(59, 130, 246, 0.12);
	color: #93c5fd;
	border: 1px solid rgba(59, 130, 246, 0.25);
	transition: background 0.15s ease, transform 0.15s ease;
	font-size: 14px;
}

.header-logout:hover {
	background: rgba(59, 130, 246, 0.2);
	transform: translateY(-1px);
}

/* ============================================
   5. COMPOSANTS DE CONTENU
   ============================================ */

.feature-section {
	display: grid;
	gap: 18px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	overflow-x: hidden;
}

.feature-headline {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.feature-headline h2 {
	margin: 0;
	font-size: 24px;
	overflow-wrap: anywhere;
}

.feature-description {
	font-size: 14px;
	color: rgba(148, 163, 184, 0.8);
	margin: 0;
	overflow-wrap: anywhere;
}

.feature-grid {
	display: grid;
	gap: 24px;
	min-width: 0;
}

.feature-grid[data-columns="two"] {
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.card {
	background: #0b1220;
	padding: 24px;
	border-radius: 18px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(148, 163, 184, 0.15);
	max-width: 100%;
	min-width: 0;
	overflow-x: hidden;
}

/* Scroll horizontal interne — tableaux et bandes de cartes */
.table-responsive,
.admin-scroll-x,
.table-scroll-wrap {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(148, 163, 184, 0.45) rgba(15, 23, 42, 0.4);
}

.table-responsive > table {
	width: max-content;
	min-width: 100%;
}

.card h3 {
	margin: 0 0 14px;
	font-size: 20px;
}

.card p {
	margin: 0 0 16px;
	color: rgba(226, 232, 240, 0.82);
	line-height: 1.5;
}

/* ============================================
   6. MESSAGES FLASH
   ============================================ */

.flash {
	margin: 18px 0;
	padding: 14px 18px;
	border-radius: 14px;
	border: 1px solid transparent;
	font-weight: 600;
}

.flash-success {
	background: rgba(34, 197, 94, 0.12);
	border-color: rgba(74, 222, 128, 0.35);
	color: #4ade80;
}

.flash-error {
	background: rgba(248, 113, 113, 0.12);
	border-color: rgba(248, 113, 113, 0.4);
	color: #f87171;
}

/* ============================================
   7. BOUTONS
   ============================================ */

.btn {
	display: inline-block;
	padding: 12px 18px;
	border-radius: 12px;
	background: #22c55e;
	color: #052e16;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	border: none;
	cursor: pointer;
}

.btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(34, 197, 94, 0.35);
}

.btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
}

.btn-blue {
	background: #2563eb;
	color: #fff;
}

.btn-danger {
	background: #ef4444;
	color: #fff;
}

.btn-danger:hover {
	box-shadow: 0 10px 22px rgba(239, 68, 68, 0.35);
}

.btn-outline {
	background: transparent;
	color: rgba(226, 232, 240, 0.9);
	border: 1px solid rgba(148, 163, 184, 0.45);
}

.btn-outline:hover {
	background: rgba(148, 163, 184, 0.12);
	color: #fff;
}

.toggle-btn {
	min-width: 120px;
	border-radius: 999px;
	padding: 10px 18px;
	border: none;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.toggle-btn.on {
	background: linear-gradient(135deg, #22c55e, #16a34a);
	color: #052e16;
}

.toggle-btn.off {
	background: rgba(71, 85, 105, 0.92);
	color: rgba(226, 232, 240, 0.9);
}

.toggle-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.3);
}

.toggle-btn[disabled] {
	opacity: 0.55;
	cursor: progress;
	transform: none;
	box-shadow: none;
}

/* ============================================
   8. BADGES ET INDICATEURS
   ============================================ */

.badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 9px;
	border-radius: 999px;
}

.badge-success {
	background: rgba(74, 222, 128, 0.25);
	color: #4ade80;
}

.badge-warning {
	background: rgba(250, 204, 21, 0.25);
	color: #facc15;
}

.badge-muted {
	background: rgba(148, 163, 184, 0.25);
	color: rgba(226, 232, 240, 0.7);
}

.jobs-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 999px;
	background: rgba(59, 130, 246, 0.2);
	color: #bfdbfe;
	font-size: 12px;
	font-weight: 600;
}

.jobs-pill.off {
	background: rgba(148, 163, 184, 0.2);
	color: rgba(226, 232, 240, 0.72);
}

.table-count {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: rgba(59, 130, 246, 0.2);
	color: #bfdbfe;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
}

/* ============================================
   9. FORMULAIRES
   ============================================ */

.scheduler-job-form {
	border: 1px solid rgba(148, 163, 184, 0.18);
	border-radius: 16px;
	padding: 20px 22px;
	background: rgba(15, 23, 42, 0.55);
	display: none;
	gap: 18px;
}

.scheduler-job-form.active {
	display: grid;
}

.scheduler-job-form h4 {
	margin: 0;
	font-size: 18px;
}

.scheduler-job-grid {
	display: grid;
	gap: 14px;
}

.scheduler-job-grid .form-row {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.scheduler-job-grid .form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.scheduler-job-grid label {
	font-size: 13px;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.9);
}

.scheduler-job-grid input[type="text"],
.scheduler-job-grid input[type="number"],
.scheduler-job-grid textarea,
.scheduler-job-grid select {
	background: rgba(15, 23, 42, 0.65);
	border: 1px solid rgba(148, 163, 184, 0.32);
	border-radius: 10px;
	padding: 10px 12px;
	color: rgba(226, 232, 240, 0.95);
	font-size: 14px;
}

.scheduler-job-grid textarea {
	min-height: 70px;
	resize: vertical;
}

.scheduler-job-grid .mode-options {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.scheduler-job-grid .mode-options label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.scheduler-job-grid .mode-options input {
	margin: 0;
}

.scheduler-job-grid small {
	font-size: 12px;
	color: rgba(148, 163, 184, 0.72);
}

.frequency-fields {
	display: none;
}

.frequency-fields.active {
	display: grid;
}

.scheduler-job-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.scheduler-job-actions .btn {
	margin-right: 0;
}

.scheduler-job-message {
	font-size: 13px;
	color: rgba(148, 163, 184, 0.75);
}

/* Icône d'information dans les labels */
.info-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-left: 6px;
	width: 18px;
	height: 18px;
	cursor: pointer;
	color: rgba(148, 163, 184, 0.72);
	transition: color 0.2s ease;
	vertical-align: middle;
}

.info-icon:hover {
	color: rgba(59, 130, 246, 0.9);
}

.info-icon svg {
	width: 100%;
	height: 100%;
}

/* Tooltip arguments (sources scrapers + scheduler) */
.args-tooltip {
	max-height: 350px;
	overflow-y: auto;
	position: fixed;
	padding: 0.75rem;
	background: #1f2937;
	color: #f9fafb;
	border-radius: 6px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 10px 15px rgba(0, 0, 0, 0.1);
	z-index: 10000;
	max-width: 420px;
	font-size: 0.875rem;
	line-height: 1.5;
	opacity: 0;
	transform: translateY(-10px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	pointer-events: none;
}

.args-tooltip.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.args-tooltip code {
	cursor: pointer;
	border-radius: 4px;
	transition: background-color 0.15s ease, color 0.15s ease;
	color: #34d399;
	font-size: 0.8125rem;
}

.args-tooltip code:hover {
	background-color: rgba(52, 211, 153, 0.18);
	color: #6ee7b7 !important;
}

/* Modal pour les arguments des jobs */
.job-arguments-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.job-arguments-modal.active {
	display: flex;
	opacity: 1;
}

.job-arguments-modal[aria-hidden="true"] {
	display: none;
}

.job-arguments-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(15, 23, 42, 0.85);
	backdrop-filter: blur(4px);
}

.job-arguments-modal-content {
	position: relative;
	z-index: 1;
	background: rgba(15, 23, 42, 0.95);
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	max-width: 700px;
	width: 100%;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.job-arguments-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.job-arguments-modal-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.95);
}

.job-arguments-modal-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 8px;
	color: rgba(148, 163, 184, 0.72);
	cursor: pointer;
	transition: all 0.2s ease;
}

.job-arguments-modal-close:hover {
	background: rgba(148, 163, 184, 0.12);
	color: rgba(226, 232, 240, 0.95);
}

.job-arguments-modal-close svg {
	width: 20px;
	height: 20px;
}

.job-arguments-modal-body {
	padding: 24px;
	overflow-y: auto;
	flex: 1;
}

.job-arguments-description {
	margin-bottom: 20px;
	padding: 16px;
	background: rgba(59, 130, 246, 0.08);
	border: 1px solid rgba(59, 130, 246, 0.18);
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(226, 232, 240, 0.85);
}

.job-arguments-script {
	margin-bottom: 24px;
	padding: 18px 20px;
	border-radius: 12px;
	background: rgba(15, 23, 42, 0.75);
	border: 1px solid rgba(148, 163, 184, 0.18);
	box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
}

.job-arguments-script-title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.95);
}

.job-arguments-script-meta {
	margin-bottom: 14px;
	font-size: 13px;
	color: rgba(148, 163, 184, 0.85);
}

.job-arguments-script-description p {
	margin: 0 0 10px;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(226, 232, 240, 0.9);
}

.job-arguments-script-description p:last-child {
	margin-bottom: 0;
}

.job-arguments-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.job-argument-item {
	padding: 18px;
	background: rgba(15, 23, 42, 0.65);
	border: 1px solid rgba(148, 163, 184, 0.18);
	border-radius: 12px;
}

.job-argument-name {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.job-argument-name code {
	background: rgba(59, 130, 246, 0.15);
	border: 1px solid rgba(59, 130, 246, 0.25);
	border-radius: 6px;
	padding: 4px 8px;
	font-size: 13px;
	font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
	color: rgba(147, 197, 253, 0.9);
}

.job-argument-type {
	display: inline-block;
	padding: 2px 8px;
	background: rgba(148, 163, 184, 0.15);
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	color: rgba(148, 163, 184, 0.85);
}

.job-argument-description {
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.6;
	color: rgba(226, 232, 240, 0.85);
}

.job-argument-example {
	margin-bottom: 12px;
	padding: 10px 14px;
	background: rgba(15, 23, 42, 0.85);
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 8px;
	font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
	font-size: 12px;
	color: rgba(147, 197, 253, 0.9);
}

.job-argument-notes {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.job-argument-notes ul {
	margin: 0;
	padding-left: 20px;
	list-style-type: disc;
}

.job-argument-notes li {
	margin-bottom: 8px;
	font-size: 13px;
	line-height: 1.5;
	color: rgba(148, 163, 184, 0.85);
}

.job-argument-notes li:last-child {
	margin-bottom: 0;
}

.job-arguments-empty {
	padding: 40px 20px;
	text-align: center;
	color: rgba(148, 163, 184, 0.72);
	font-size: 14px;
}

/* ============================================
   10. CRON BUILDER
   ============================================ */

.cron-builder {
	margin-top: 12px;
	border: 1px solid rgba(148, 163, 184, 0.18);
	border-radius: 16px;
	background: rgba(15, 23, 42, 0.6);
	padding: 18px;
	display: grid;
	gap: 14px;
}

.cron-builder header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.cron-builder header h5 {
	margin: 0;
	font-size: 15px;
}

.cron-builder .hint {
	font-size: 12px;
	color: rgba(148, 163, 184, 0.72);
}

.cron-preview {
	border: 1px dashed rgba(148, 163, 184, 0.28);
	border-radius: 12px;
	padding: 14px;
	display: grid;
	gap: 12px;
	background: rgba(15, 23, 42, 0.45);
}

.cron-preview strong {
	font-size: 13px;
}

.cron-preview .preview-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	gap: 10px;
}

.cron-preview .preview-box {
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 10px;
	padding: 10px;
	display: grid;
	gap: 4px;
	font-size: 12px;
}

.cron-preview .preview-box strong {
	font-size: 14px;
}

.cron-sections {
	display: grid;
	gap: 16px;
}

.cron-section {
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 12px;
	padding: 14px;
	display: grid;
	gap: 10px;
}

.cron-section header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.cron-section header h6 {
	margin: 0;
	font-size: 14px;
}

.cron-section .cron-selectors {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.cron-section .cron-selectors button {
	background: rgba(37, 99, 235, 0.18);
	border: 1px solid rgba(59, 130, 246, 0.35);
	color: #bfdbfe;
	border-radius: 999px;
	padding: 6px 12px;
	font-size: 12px;
	cursor: pointer;
	transition: transform 0.15s ease, background 0.15s ease;
}

.cron-section .cron-selectors button:hover {
	transform: translateY(-1px);
	background: rgba(59, 130, 246, 0.28);
}

.cron-section .cron-selectors button[data-selector-trigger] {
	background: rgba(59, 130, 246, 0.22);
	color: #fff;
}

.cron-selector {
	display: none;
	border-top: 1px dashed rgba(148, 163, 184, 0.25);
	padding-top: 12px;
	margin-top: 12px;
}

.cron-selector.active {
	display: block;
}

.cron-selector .options-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
	gap: 10px;
}

.cron-selector label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
}

.cron-selector input[type="checkbox"] {
	accent-color: #2563eb;
}

.cron-selector .selector-toolbar {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 12px;
}

.cron-selector-close {
	background: none;
	border: 1px solid rgba(148, 163, 184, 0.35);
	color: rgba(226, 232, 240, 0.9);
	border-radius: 10px;
	padding: 6px 12px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.cron-selector-close:hover {
	background: rgba(148, 163, 184, 0.18);
	color: #fff;
}

/* ============================================
   11. TABLEAUX
   ============================================ */

.data-table-wrapper {
	border: 1px solid rgba(148, 163, 184, 0.18);
	border-radius: 16px;
	overflow-x: auto;
	overflow-y: visible;
	background: rgba(15, 23, 42, 0.55);
	position: relative;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	-webkit-overflow-scrolling: touch;
	display: block;
	scrollbar-width: thin;
	scrollbar-color: rgba(148, 163, 184, 0.4) rgba(15, 23, 42, 0.5);
	min-width: 0;
}

/* Scrollbar personnalisée pour le wrapper du tableau */
.data-table-wrapper::-webkit-scrollbar {
	height: 8px;
}

.data-table-wrapper::-webkit-scrollbar-track {
	background: rgba(15, 23, 42, 0.5);
	border-radius: 4px;
}

.data-table-wrapper::-webkit-scrollbar-thumb {
	background: rgba(148, 163, 184, 0.4);
	border-radius: 4px;
}

.data-table-wrapper::-webkit-scrollbar-thumb:hover {
	background: rgba(148, 163, 184, 0.6);
}

.data-table {
	border-collapse: separate;
	border-spacing: 0;
	/* Le tableau peut être plus large que son conteneur, ce qui déclenchera le scroll */
	table-layout: auto;
	/* Forcer le tableau à prendre la largeur de son contenu, sans limite minimale */
	width: max-content;
	/* Forcer le tableau à garder sa largeur naturelle */
	display: table;
	/* S'assurer que le tableau ne se compresse pas */
	flex-shrink: 0;
}

/* Colonne de sélection */
.data-table th.selection-column,
.data-table td.selection-column {
	position: sticky;
	left: 0;
	background: rgba(30, 41, 59, 0.95);
	z-index: 12;
	border-right: 2px solid rgba(148, 163, 184, 0.25);
	box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
	width: 50px;
	min-width: 50px;
	max-width: 50px;
	text-align: center;
	padding: 10px 6px;
}

.data-table thead th.selection-column {
	background: rgba(30, 41, 59, 0.95);
	z-index: 13;
}

.data-table tbody td.selection-column {
	background: rgba(15, 23, 42, 0.95);
}

.data-table tbody tr:hover td.selection-column {
	background: rgba(37, 99, 235, 0.15);
}

.data-table .selection-column input[type="checkbox"] {
	cursor: pointer;
	width: 18px;
	height: 18px;
	accent-color: rgba(37, 99, 235, 0.8);
}

/* Colonne Action */
.data-table th.action-column,
.data-table td.action-column {
	width: 80px;
	min-width: 80px;
	max-width: 80px;
	text-align: center;
	padding: 8px;
	white-space: nowrap;
}

.data-table .delete-btn {
	background: rgba(239, 68, 68, 0.2);
	border: 1px solid rgba(239, 68, 68, 0.4);
	border-radius: 6px;
	padding: 6px 10px;
	cursor: pointer;
	font-size: 16px;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
}

.data-table .delete-btn:hover:not(:disabled) {
	background: rgba(239, 68, 68, 0.3);
	border-color: rgba(239, 68, 68, 0.6);
	transform: scale(1.05);
}

.data-table .delete-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Colonnes figées (source_id et title) */
.data-table th.frozen-column,
.data-table td.frozen-column {
	position: sticky;
	left: 50px; /* Valeur par défaut (sera recalculée par JS) */
	background: rgba(30, 41, 59, 0.95) !important;
	z-index: 10;
	border-right: 2px solid rgba(148, 163, 184, 0.25);
	box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(2px);
}

.data-table thead th.frozen-column {
	background: rgba(30, 41, 59, 0.95);
	z-index: 11;
}

.data-table tbody td.frozen-column {
	background: rgba(15, 23, 42, 0.95);
}

.data-table tbody tr:hover td.frozen-column {
	background: rgba(20, 51, 118, 0.95);
}

/* Cellule title avec image en arrière-plan */
.data-table td.cell-title-with-image {
	position: relative;
	overflow: hidden;
}

.data-table td.cell-title-with-image .title-bg-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0.7;
	transition: opacity 0.3s ease;
	z-index: 0;
	pointer-events: none;
}

.data-table td.cell-title-with-image:hover .title-bg-overlay {
	opacity: 1;
}

.data-table td.cell-title-with-image > *:not(.title-bg-overlay) {
	position: relative;
	z-index: 1;
}

/* Indicateur pour images expirées */
.data-table td.cell-title-with-image.image-expired {
	border-left: 3px solid #f59e0b;
}

.data-table td.cell-title-with-image.image-expired::after {
	content: "⚠️ Image expirée";
	position: absolute;
	top: 4px;
	right: 4px;
	background: rgba(245, 158, 11, 0.9);
	color: white;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 10px;
	z-index: 2;
	pointer-events: none;
}

.data-table td.cell-title-with-image.image-checking {
	opacity: 0.8;
}

.data-table thead {
	background: rgba(30, 41, 59, 0.9);
}

.data-table th {
	padding: 12px 14px;
	text-align: left;
	font-size: 13px;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.9);
	border-bottom: 2px solid rgba(148, 163, 184, 0.18);
	white-space: nowrap;
	/* S'assurer que les en-têtes ne se rétrécissent pas - largeur minimale basée sur le contenu */
	min-width: fit-content;
	/* Empêcher les en-têtes de se rétrécir pour s'adapter au wrapper */
	width: auto;
	/* Forcer les en-têtes à garder leur largeur naturelle */
	flex-shrink: 0;
}

.data-table td {
	padding: 10px 14px;
	font-size: 13px;
	color: rgba(226, 232, 240, 0.82);
	border-bottom: 1px solid rgba(148, 163, 184, 0.12);
	vertical-align: top;
	/* S'assurer que les cellules ne se rétrécissent pas en dessous de leur contenu */
	min-width: fit-content;
	/* Empêcher les cellules de se rétrécir pour s'adapter au wrapper */
	width: auto;
	/* Forcer les cellules à garder leur largeur naturelle */
	flex-shrink: 0;
}

.data-table tbody tr:hover {
	background: rgba(37, 99, 235, 0.12);
}

.data-table tbody tr:last-child td {
	border-bottom: none;
}

.data-table-empty {
	text-align: center;
	padding: 48px 24px;
	color: rgba(148, 163, 184, 0.7);
}

.data-table-error {
	padding: 24px;
	background: rgba(239, 68, 68, 0.12);
	border: 1px solid rgba(239, 68, 68, 0.3);
	border-radius: 12px;
	color: #f87171;
	font-size: 14px;
}

.cell-content {
	/* Limiter la largeur du contenu mais permettre à la cellule de dépasser si nécessaire */
	max-width: 300px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	/* S'assurer que le contenu ne force pas la cellule à se rétrécir */
	display: inline-block;
	min-width: 0;
}

.cell-content-long {
	max-width: 500px;
	word-break: break-word;
	white-space: normal;
}

.cell-null {
	color: rgba(148, 163, 184, 0.5);
	font-style: italic;
}

.cell-boolean {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
}

.cell-boolean.true {
	background: rgba(34, 197, 94, 0.2);
	color: #4ade80;
}

.cell-boolean.false {
	background: rgba(148, 163, 184, 0.2);
	color: rgba(226, 232, 240, 0.6);
}

.source-favicon {
	width: 20px;
	height: 20px;
	vertical-align: middle;
	border-radius: 3px;
	display: inline-block;
}

.source-id-link {
	color: #3b82f6;
	text-decoration: none;
	transition: color 0.2s ease;
}

.source-id-link:hover {
	color: #2563eb;
	text-decoration: underline;
}

.cell-raw-trigger {
	color: #3b82f6;
	cursor: pointer;
	text-decoration: underline;
	text-decoration-style: dotted;
	position: relative;
}

.cell-description {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.5;
	max-height: 3em; /* 2 lignes * 1.5 line-height */
	word-wrap: break-word;
	white-space: normal;
}

/* Largeur minimale pour la colonne description */
.data-table td.cell-description-wrapper {
	min-width: 400px;
	max-width: 600px;
	width: 500px;
}

/* Cibler l'en-tête de la colonne description */
.data-table th.column-description {
	min-width: 400px;
	max-width: 600px;
	width: 500px;
}

.cell-raw-trigger:hover {
	color: #60a5fa;
}

/* Style pour l'ID cliquable */
.cell-id-link {
	color: #8b5cf6;
	cursor: pointer;
	text-decoration: underline;
	text-decoration-style: dotted;
	font-weight: 600;
}

.cell-id-link:hover {
	color: #a78bfa;
	background-color: rgba(139, 92, 246, 0.1);
	border-radius: 4px;
	padding: 2px 4px;
}

/* Styles pour la colonne content_hash avec bouton de copie */
.cell-content-hash-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
}

.copy-hash-btn {
	background: transparent;
	border: 1px solid rgba(148, 163, 184, 0.3);
	border-radius: 4px;
	padding: 4px 8px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.copy-hash-btn:hover {
	background: rgba(59, 130, 246, 0.2);
	border-color: rgba(59, 130, 246, 0.5);
}

.copy-hash-btn:active {
	transform: scale(0.95);
}

.copy-icon {
	font-size: 14px;
	line-height: 1;
	user-select: none;
}

.raw-modal {
	display: none;
	position: fixed;
	z-index: 1000;
	background: rgba(15, 23, 42, 0.98);
	border: 2px solid rgba(59, 130, 246, 0.4);
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
	width: min(800px, 90vw);
	max-width: 90vw;
	max-height: 90vh;
	overflow: hidden;
	pointer-events: auto;
}

.raw-modal.active {
	display: block;
}

.raw-modal-header {
	padding: 16px 20px;
	background: rgba(30, 41, 59, 0.9);
	border-bottom: 1px solid rgba(148, 163, 184, 0.18);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.raw-modal-header h4 {
	margin: 0;
	font-size: 16px;
	color: rgba(226, 232, 240, 0.9);
}

.raw-modal-actions {
	display: flex;
	gap: 8px;
	align-items: center;
}

.raw-modal-copy {
	background: transparent;
	border: 1px solid rgba(148, 163, 184, 0.32);
	color: rgba(226, 232, 240, 0.85);
	border-radius: 8px;
	padding: 6px 12px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.raw-modal-copy:hover {
	background: rgba(59, 130, 246, 0.2);
	color: #60a5fa;
	border-color: rgba(59, 130, 246, 0.4);
}

.raw-modal-close {
	background: transparent;
	border: 1px solid rgba(148, 163, 184, 0.32);
	color: rgba(226, 232, 240, 0.85);
	border-radius: 8px;
	padding: 6px 12px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.raw-modal-close:hover {
	background: rgba(239, 68, 68, 0.2);
	color: #f87171;
	border-color: rgba(239, 68, 68, 0.4);
}

.raw-modal-content {
	padding: 20px;
	overflow: auto;
	max-height: calc(90vh - 80px);
	font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 13px;
	line-height: 1.6;
	color: rgba(226, 232, 240, 0.9);
	white-space: pre-wrap;
	word-break: break-word;
}

.raw-modal-content code {
	background: rgba(15, 23, 42, 0.6);
	padding: 2px 6px;
	border-radius: 4px;
}

/* ============================================
   PROCESSING HISTORY MODAL
   ============================================ */

.cell-processing-state {
	cursor: pointer;
	text-decoration: underline;
	text-decoration-style: dotted;
	color: rgba(59, 130, 246, 0.9);
	transition: color 0.15s ease;
}

.cell-processing-state:hover {
	color: #60a5fa;
}

.processing-history-modal {
	width: min(600px, 90vw);
}

.processing-history-content {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	white-space: normal;
}

.processing-history-loading {
	text-align: center;
	padding: 20px;
	color: rgba(226, 232, 240, 0.7);
}

.processing-history-error {
	padding: 20px;
	color: rgba(239, 68, 68, 0.9);
	text-align: center;
}

.processing-history-container {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.processing-current-state {
	padding: 12px 16px;
	background: rgba(59, 130, 246, 0.15);
	border-left: 3px solid rgba(59, 130, 246, 0.6);
	border-radius: 6px;
	color: rgba(226, 232, 240, 0.95);
}

.processing-current-state strong {
	color: #60a5fa;
}

.processing-history-section,
.processing-remaining-section {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.processing-history-section h5,
.processing-remaining-section h5 {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: rgba(226, 232, 240, 0.9);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.processing-history-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.processing-history-item {
	padding: 10px 14px;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	transition: background 0.15s ease;
}

.processing-history-item.completed {
	background: rgba(34, 197, 94, 0.1);
	border-left: 3px solid rgba(34, 197, 94, 0.5);
}

.processing-history-item.completed.current {
	background: rgba(59, 130, 246, 0.15);
	border-left: 3px solid rgba(59, 130, 246, 0.6);
}

.processing-history-item.remaining {
	background: rgba(148, 163, 184, 0.1);
	border-left: 3px solid rgba(148, 163, 184, 0.3);
	opacity: 0.6;
}

.processing-state-label {
	flex: 1;
	color: rgba(226, 232, 240, 0.9);
	font-size: 13px;
}

.processing-history-item.completed .processing-state-label {
	color: rgba(226, 232, 240, 0.95);
}

.processing-history-item.remaining .processing-state-label {
	color: rgba(148, 163, 184, 0.7);
}

.processing-state-date {
	font-size: 11px;
	color: rgba(148, 163, 184, 0.6);
	font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

.processing-state-badge {
	font-size: 10px;
	padding: 2px 8px;
	background: rgba(59, 130, 246, 0.3);
	color: #60a5fa;
	border-radius: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.processing-complete {
	padding: 16px;
	background: rgba(34, 197, 94, 0.15);
	border-left: 3px solid rgba(34, 197, 94, 0.6);
	border-radius: 6px;
	text-align: center;
	color: rgba(226, 232, 240, 0.9);
}

.processing-complete p {
	margin: 0;
	font-size: 13px;
}

/* ============================================
   PAGINATION
   ============================================ */

.pagination-container {
	margin-top: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: center;
}

.pagination {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}

.pagination-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	background: rgba(30, 41, 59, 0.9);
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 10px;
	color: rgba(226, 232, 240, 0.9);
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.15s ease;
	cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
	background: rgba(37, 99, 235, 0.2);
	border-color: rgba(59, 130, 246, 0.4);
	color: #60a5fa;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.pagination-btn.disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

.pagination-btn span {
	display: inline-block;
	line-height: 1;
}

.pagination-numbers {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.pagination-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	background: rgba(30, 41, 59, 0.9);
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 10px;
	color: rgba(226, 232, 240, 0.9);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.15s ease;
	cursor: pointer;
}

.pagination-number:hover {
	background: rgba(37, 99, 235, 0.2);
	border-color: rgba(59, 130, 246, 0.4);
	color: #60a5fa;
	transform: translateY(-1px);
}

.pagination-number.active {
	background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.25));
	border-color: rgba(59, 130, 246, 0.5);
	color: #60a5fa;
	box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.pagination-ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	color: rgba(148, 163, 184, 0.6);
	font-size: 14px;
	font-weight: 600;
}

.pagination-info {
	display: flex;
	align-items: center;
	justify-content: center;
}

.pagination-text {
	font-size: 13px;
	color: rgba(148, 163, 184, 0.8);
	font-weight: 500;
}

.table-info {
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.table-info-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.table-info-left {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.table-info-right {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	justify-content: flex-end;
	gap: 12px;
	min-width: 0;
	flex-wrap: wrap;
}

.limit-selector-label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: rgba(148, 163, 184, 0.8);
	white-space: nowrap;
}

.limit-selector {
	padding: 6px 10px;
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 8px;
	color: rgba(226, 232, 240, 0.9);
	font-size: 13px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.limit-selector:hover {
	border-color: rgba(148, 163, 184, 0.4);
	background: rgba(15, 23, 42, 0.8);
}

.limit-selector:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.table-info h3 {
	margin: 0;
	font-size: 18px;
	color: rgba(226, 232, 240, 0.9);
}

.table-count {
	font-size: 13px;
	color: rgba(148, 163, 184, 0.7);
	font-weight: 500;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ============================================
   RECHERCHE TABLEAUX
   ============================================ */

.table-search {
	width: 100%;
	max-width: 400px;
}

.search-form {
	width: 100%;
}

.search-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
}

.search-input {
	flex: 1;
	padding: 10px 40px 10px 14px;
	background: rgba(30, 41, 59, 0.9);
	border: 1px solid rgba(148, 163, 184, 0.25);
	border-radius: 10px;
	color: rgba(226, 232, 240, 0.9);
	font-size: 14px;
	transition: all 0.15s ease;
	outline: none;
}

.search-input:focus {
	border-color: rgba(59, 130, 246, 0.5);
	background: rgba(30, 41, 59, 1);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
	color: rgba(148, 163, 184, 0.5);
}

.search-clear {
	position: absolute;
	right: 55px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	background: rgba(148, 163, 184, 0.2);
	border-radius: 50%;
	color: rgba(226, 232, 240, 0.7);
	text-decoration: none;
	font-size: 18px;
	line-height: 1;
	transition: all 0.15s ease;
	cursor: pointer;
}

.search-clear:hover {
	background: rgba(239, 68, 68, 0.2);
	color: #f87171;
	transform: scale(1.1);
}

.search-clear span {
	display: inline-block;
	line-height: 1;
	margin-top: -2px;
}

.search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: rgba(37, 99, 235, 0.2);
	border: 1px solid rgba(59, 130, 246, 0.35);
	border-radius: 10px;
	color: #60a5fa;
	font-size: 16px;
	cursor: pointer;
	transition: all 0.15s ease;
	flex-shrink: 0;
}

.search-submit:hover {
	background: rgba(37, 99, 235, 0.3);
	border-color: rgba(59, 130, 246, 0.5);
	color: #93c5fd;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.search-submit:active {
	transform: translateY(0);
}

.search-submit span {
	display: inline-block;
	line-height: 1;
}

.jobs-table-wrapper {
	border: 1px solid rgba(148, 163, 184, 0.15);
	border-radius: 16px;
	overflow-x: auto;
	overflow-y: visible;
	background: rgba(11, 18, 32, 0.85);
	width: 100%;
	max-width: 100%;
	min-width: 0;
	-webkit-overflow-scrolling: touch;
}

.jobs-table {
	width: 100%;
	min-width: 720px;
	border-collapse: collapse;
}

.jobs-table thead {
	background: rgba(15, 23, 42, 0.95);
}

.jobs-table th,
.jobs-table td {
	padding: 14px 16px;
	text-align: left;
	font-size: 14px;
	border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.jobs-table th {
	font-weight: 600;
	color: rgba(226, 232, 240, 0.9);
	white-space: nowrap;
}

.jobs-table td {
	color: rgba(226, 232, 240, 0.82);
	vertical-align: top;
}

.jobs-table tbody tr:last-child td {
	border-bottom: none;
}

.jobs-table tbody tr:hover {
	background: rgba(37, 99, 235, 0.12);
}

.jobs-table-empty td {
	text-align: center;
}

.jobs-runs-cell {
	font-size: 12px;
}

.jobs-runs-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.jobs-run-item {
	white-space: nowrap;
	color: rgba(226, 232, 240, 0.72);
	font-size: 12px;
	line-height: 1.4;
}

.jobs-run-item.jobs-run-last {
	font-weight: 600;
	color: rgba(226, 232, 240, 0.9);
}

.jobs-run-link {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.2s;
}

.jobs-run-link:hover {
	opacity: 0.8;
	text-decoration: underline;
}

.jobs-runs-cell .jobs-status-inline {
	border-top: none !important;
	margin-top: 8px;
}

/* ============================================
   12. ONGLETS (TABS)
   ============================================ */

.database-viewer {
	margin-top: 24px;
	/* Limiter la largeur pour éviter le débordement */
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
	box-sizing: border-box;
}

.tabs-container {
	background: #111827;
	border-radius: 18px;
	padding: 24px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	/* Empêcher le débordement horizontal du conteneur */
	overflow-x: hidden;
	overflow-y: visible;
	min-width: 0;
}

.tabs-header {
	display: flex;
	gap: 8px;
	border-bottom: 2px solid rgba(148, 163, 184, 0.18);
	margin-bottom: 24px;
	overflow-x: auto;
	padding-bottom: 0;
}

.tabs-header::-webkit-scrollbar {
	height: 6px;
}

.tabs-header::-webkit-scrollbar-track {
	background: rgba(15, 23, 42, 0.5);
	border-radius: 3px;
}

.tabs-header::-webkit-scrollbar-thumb {
	background: rgba(148, 163, 184, 0.4);
	border-radius: 3px;
}

.tabs-header::-webkit-scrollbar-thumb:hover {
	background: rgba(148, 163, 184, 0.6);
}

.tab-button {
	padding: 12px 20px;
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	color: rgba(226, 232, 240, 0.7);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
	white-space: nowrap;
	position: relative;
	bottom: -2px;
}

.tab-button:hover {
	color: rgba(226, 232, 240, 0.9);
	background: rgba(30, 41, 59, 0.5);
}

.tab-button.active {
	color: #3b82f6;
	border-bottom-color: #3b82f6;
	background: rgba(59, 130, 246, 0.1);
}

.tab-content {
	display: none;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow-x: hidden;
	min-width: 0;
}

.tab-content.active {
	display: block;
}

.table-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
	padding: 14px 18px;
	background: rgba(30, 41, 59, 0.5);
	border-radius: 12px;
	border: 1px solid rgba(148, 163, 184, 0.18);
	flex-wrap: wrap;
	gap: 12px;
	min-width: 0;
}

.table-info h3 {
	margin: 0;
	font-size: 18px;
	color: rgba(226, 232, 240, 0.9);
}

/* ============================================
   13. LOGS ET VISUALISATION
   ============================================ */

.log-container {
	margin-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.log-header {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.log-viewer {
	background: rgba(15, 23, 42, 0.85);
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 12px;
	padding: 14px;
	font-family: SFMono-Regular, Consolas, Monaco, monospace;
	font-size: 13px;
	line-height: 1.45;
	color: rgba(226, 232, 240, 0.92);
	max-height: 260px;
	overflow-y: auto;
	white-space: pre-wrap;
}

.jobs-log-panel {
	margin-top: 18px;
	border: 1px solid rgba(148, 163, 184, 0.18);
	border-radius: 16px;
	padding: 18px 20px;
	background: rgba(15, 23, 42, 0.55);
	display: none;
	flex-direction: column;
	gap: 14px;
}

.jobs-log-panel.active {
	display: flex;
}

.jobs-log-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.jobs-log-header h4 {
	margin: 0;
	font-size: 17px;
	color: rgba(226, 232, 240, 0.92);
}

.jobs-log-close,
.jobs-log-refresh,
.jobs-log-copy,
.jobs-log-pause-play {
	background: transparent;
	border: 1px solid rgba(148, 163, 184, 0.32);
	color: rgba(226, 232, 240, 0.85);
	border-radius: 8px;
	padding: 6px 12px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.jobs-log-close {
	border-color: rgba(239, 68, 68, 0.5);
	color: #ef4444;
	padding: 6px 10px;
	font-size: 20px;
	line-height: 1;
	min-width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.jobs-log-close:hover {
	background: rgba(239, 68, 68, 0.2);
	border-color: rgba(239, 68, 68, 0.7);
	color: #f87171;
	transform: translateY(-1px);
}

.jobs-log-refresh:hover,
.jobs-log-copy:hover,
.jobs-log-pause-play:hover {
	background: rgba(59, 130, 246, 0.22);
	color: #fff;
	transform: translateY(-1px);
}

.jobs-log-pause-play {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	position: absolute;
	top: 20px;
	right: 140px;
	z-index: 10;
	min-width: 32px;
	height: 32px;
	padding: 6px 8px;
}

.jobs-log-pause-play .pause-icon,
.jobs-log-pause-play .play-icon {
	font-size: 14px;
	line-height: 1;
}

.jobs-log-refresh {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	position: absolute;
	top: 20px;
	right: 90px;
	z-index: 10;
}

.jobs-log-copy {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	position: absolute;
	top: 20px;
	right: 10px;
	z-index: 10;
}

.jobs-log-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.jobs-log-select {
	background: rgba(15, 23, 42, 0.65);
	border: 1px solid rgba(148, 163, 184, 0.28);
	border-radius: 8px;
	padding: 6px 10px;
	color: rgba(226, 232, 240, 0.85);
	font-size: 13px;
}

.jobs-log-viewer-wrapper {
	position: relative;
	max-width: 100%;
	min-width: 0;
}

.jobs-log-viewer {
	background: rgba(29, 29, 29);
	border: 1px solid rgba(148, 163, 184, 0.22);
	border-radius: 12px;
	padding: 14px;
	font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 12px;
	line-height: 1.45;
	color: rgba(226, 232, 240, 0.85);
	max-height: 360px;
	max-width: 100%;
	overflow: auto;
	white-space: pre-wrap;
	word-break: break-word;
	overflow-wrap: anywhere;
}

.jobs-log-meta {
	color: rgba(148, 163, 184, 0.78);
	font-size: 12px;
}

/* ============================================
   14. SCHEDULER ET QUEUE
   ============================================ */

.scheduler-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin: 16px 0;
}

.scheduler-summary-card {
	margin: 18px 0;
	padding: 16px 18px;
	border-radius: 14px;
	background: rgba(11, 18, 32, 0.7);
	border: 1px solid rgba(148, 163, 184, 0.15);
	display: grid;
	gap: 8px;
	font-size: 14px;
}

.scheduler-summary-card strong {
	font-weight: 600;
}

.scheduler-jobs {
	margin-top: 24px;
	display: grid;
	gap: 18px;
}

.scheduler-jobs-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.scheduler-jobs-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.jobs-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.jobs-actions button {
	background: transparent;
	border: 1px solid rgba(148, 163, 184, 0.32);
	color: rgba(226, 232, 240, 0.85);
	border-radius: 8px;
	padding: 6px 12px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.jobs-actions button:hover {
	background: rgba(59, 130, 246, 0.22);
	color: #fff;
	transform: translateY(-1px);
}

.jobs-actions button.jobs-delete:hover {
	background: rgba(239, 68, 68, 0.2);
	color: #fee2e2;
}

.jobs-actions button.jobs-logs:hover {
	background: rgba(14, 165, 233, 0.25);
	color: #e0f2fe;
}

.queue-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 24px;
}

.queue-status {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.queue-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.queue-active,
.queue-pending,
.queue-history {
	margin-top: 24px;
	display: grid;
	gap: 12px;
}

.queue-active-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
}

.queue-active-grid dt {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(148, 163, 184, 0.75);
	margin-bottom: 4px;
}

.queue-active-grid dd {
	margin: 0;
	font-size: 14px;
	color: rgba(226, 232, 240, 0.9);
	word-break: break-word;
}

#queue-active-run {
	white-space: nowrap;
	/*	overflow: hidden;*/
	/*	text-overflow: ellipsis;*/
}

.queue-active-grid .queue-active-grid-full-width {
	grid-column: 1 / -1;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.queue-active-loader {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	padding: 32px;
	min-height: 120px;
}

.queue-active-loader-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid rgba(59, 130, 246, 0.2);
	border-top-color: rgba(59, 130, 246, 0.8);
	border-radius: 50%;
	animation: queue-loader-spin 0.8s linear infinite;
}

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

.queue-active-loader-text {
	margin: 0;
	font-size: 14px;
	color: rgba(226, 232, 240, 0.75);
	text-align: center;
}

.queue-history table,
.queue-pending table {
	width: 100%;
}

.queue-actions .btn {
	padding: 10px 16px;
}

.queue-actions .btn-danger {
	background: rgba(239, 68, 68, 0.85);
}

.queue-history-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.queue-history-controls {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.queue-history-filters {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.queue-history-filters .btn-sm {
	padding: 6px 12px;
	font-size: 13px;
}

.queue-history-filters .btn-sm.active {
	background: rgba(59, 130, 246, 0.3);
	border-color: rgba(59, 130, 246, 0.6);
	color: #bfdbfe;
}

.queue-history-date-input {
	background: rgba(30, 41, 59, 0.6);
	border: 1px solid rgba(148, 163, 184, 0.32);
	border-radius: 8px;
	padding: 6px 10px;
	font-size: 13px;
	color: rgba(226, 232, 240, 0.9);
	font-family: inherit;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.queue-history-date-input:focus {
	outline: none;
	border-color: rgba(59, 130, 246, 0.6);
	background: rgba(30, 41, 59, 0.8);
}

.queue-history-date-input::-webkit-calendar-picker-indicator {
	filter: invert(0.8);
	cursor: pointer;
}

.queue-history-limit-label {
	font-size: 13px;
	color: rgba(226, 232, 240, 0.7);
	margin: 0;
	white-space: nowrap;
}

.queue-history-limit-select {
	background: rgba(30, 41, 59, 0.6);
	border: 1px solid rgba(148, 163, 184, 0.32);
	border-radius: 8px;
	padding: 6px 10px;
	font-size: 13px;
	color: rgba(226, 232, 240, 0.9);
	font-family: inherit;
	transition: border-color 0.15s ease, background 0.15s ease;
	cursor: pointer;
	min-width: 60px;
}

.queue-history-limit-select:focus {
	outline: none;
	border-color: rgba(59, 130, 246, 0.6);
	background: rgba(30, 41, 59, 0.8);
}

.queue-history-limit-select:hover {
	border-color: rgba(148, 163, 184, 0.5);
}

.queue-history-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.queue-history-pagination-info {
	font-size: 13px;
	color: rgba(226, 232, 240, 0.75);
}

.queue-history-pagination .btn-sm {
	padding: 6px 14px;
	font-size: 13px;
}

.queue-history-pagination .btn-sm:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.queue-history-run-id-link {
	/* La couleur est définie via les styles inline dans le JavaScript */
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.queue-history-run-id-link:hover {
	opacity: 0.85;
	text-decoration: underline;
	transform: scale(1.02);
}

.queue-history-run-id-link:active {
	opacity: 0.75;
	transform: scale(0.98);
}

/* ============================================
   15. SERVICES ET AUTRES SECTIONS
   ============================================ */

.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 18px;
}

.service-card {
	background: rgba(11, 18, 32, 0.9);
	border-radius: 14px;
	padding: 18px;
	border: 1px solid rgba(148, 163, 184, 0.15);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.service-card .icon {
	font-size: 30px;
}

.service-card h3 {
	margin: 0;
	font-size: 18px;
}

.storage-meta {
	margin-top: 18px;
	padding: 16px;
	border-radius: 12px;
	background: rgba(11, 18, 32, 0.7);
	border: 1px solid rgba(148, 163, 184, 0.15);
	display: grid;
	gap: 12px;
}

.storage-meta .meta-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 6px;
	font-size: 14px;
}

.storage-meta code {
	background: rgba(15, 23, 42, 0.6);
	padding: 2px 6px;
	border-radius: 6px;
	color: #bfdbfe;
}

/* Conteneur scroll horizontal réutilisable */
.admin-scroll-x,
.table-scroll-wrap {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	overflow-y: visible;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
}

.queue-history,
.queue-pending,
.queue-running-jobs {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
}

.queue-history table,
.queue-pending table,
.queue-running-jobs table {
	min-width: 640px;
}

.toggle-list {
	list-style: none;
	padding: 0;
	margin: 16px 0 0;
	display: grid;
	gap: 16px;
	min-width: 0;
}

.toggle-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	background: rgba(11, 18, 32, 0.9);
	border-radius: 14px;
	padding: 16px 18px;
	border: 1px solid rgba(148, 163, 184, 0.15);
	min-width: 0;
	flex-wrap: wrap;
}

.toggle-item h4 {
	margin: 0;
	font-size: 16px;
}

.scraper-title {
	display: flex;
	align-items: center;
	gap: 10px;
}

.scraper-favicon {
	width: 20px;
	height: 20px;
	object-fit: contain;
	flex-shrink: 0;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.05);
	padding: 2px;
}

.toggle-item p {
	margin: 6px 0 0;
	font-size: 13px;
	color: rgba(226, 232, 240, 0.72);
}

/* ============================================
   16. PAGE DE CONNEXION
   ============================================ */

/* Styles spécifiques pour la page de login */
body.login-page {
	display: flex;
	min-height: 100vh;
	align-items: center;
	justify-content: center;
}

body.login-page .card {
	background: #111827;
	padding: 24px;
	border-radius: 16px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
	width: 360px;
}

body.login-page input {
	width: 100%;
	padding: 12px 14px;
	margin: 8px 0;
	border-radius: 10px;
	border: 1px solid #334155;
	background: #0b1220;
	color: #e2e8f0;
	box-sizing: border-box;
}

body.login-page button {
	width: 100%;
	padding: 12px 14px;
	margin-top: 10px;
	border-radius: 10px;
	border: 0;
	background: #2563eb;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

body.login-page .error {
	background: #7f1d1d;
	color: #fecaca;
	padding: 8px 12px;
	border-radius: 8px;
	margin-bottom: 10px;
}

/* ============================================
   17. UTILITAIRES
   ============================================ */

.muted {
	font-size: 13px;
	color: rgba(148, 163, 184, 0.72);
}

.text-center {
	text-align: center;
}

.mt-3 {
	margin-top: 12px;
}

.mt-3-5 {
	margin-top: 14px;
}

.ml-1 {
	margin-left: 6px;
}

.hidden {
	display: none !important;
}

.d-none {
	display: none !important;
}

.font-mono {
	font-family: var(--font-mono, "SFMono-Regular", Consolas, Monaco, monospace);
	font-size: 12px;
}

.text-mono {
	font-family: var(--font-mono, "SFMono-Regular", Consolas, Monaco, monospace);
}

.text-sm {
	font-size: 12px;
}

.italic {
	font-style: italic;
}

.small {
	opacity: 0.8;
}

/* ============================================
   18. MEDIA QUERIES - RESPONSIVE
   ============================================ */

@media (max-width: 1080px) {
	.header {
		padding: 10px 16px;
	}

	.header-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.main-column {
		margin-left: 0;
		width: 100%;
		max-width: 100%;
	}

	.sidebar {
		transform: translateX(-110%);
		width: min(280px, 88vw);
		box-shadow: 0 18px 48px rgba(2, 6, 23, 0.65);
	}

	.sidebar.is-open {
		transform: translateX(0);
	}

	.header-brand--compact .small {
		display: none;
	}

	.header-logout--desktop {
		display: none;
	}
}

@media (max-width: 900px) {
	.scheduler-jobs-layout {
		grid-template-columns: 1fr !important;
		grid-template-rows: auto auto !important;
		height: auto !important;
		max-height: none !important;
		overflow: visible !important;
	}

	.scheduler-jobs-tree-wrap,
	.scheduler-job-detail {
		max-height: min(50vh, 420px);
		overflow-y: auto;
	}

	.queue-history-controls,
	.queue-history-filters,
	.queue-actions,
	.scheduler-jobs-actions {
		width: 100%;
	}

	.queue-history-date-input,
	.queue-history-limit-select,
	.queue-history-type-filter-select {
		width: 100%;
		max-width: 100%;
	}

	.table-info-header {
		flex-direction: column;
		align-items: stretch;
	}

	.table-info-right {
		justify-content: flex-start;
	}

	.tabs-container {
		padding: 16px;
	}

	.feature-grid[data-columns="two"] {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 720px) {
	.main-content {
		padding: 16px 0 40px;
	}

	.container {
		padding: 0 16px;
		gap: 24px;
	}

	.feature-section {
		padding: 0;
	}

	.feature-headline h2 {
		font-size: 1.25rem;
	}

	.card {
		padding: 16px;
	}

	.jobs-table-wrapper,
	.table-scroll-wrap,
	.data-table-wrapper,
	.admin-scroll-x {
		width: 100%;
		max-width: 100%;
	}

	.scheduler-jobs-layout {
		grid-template-columns: 1fr !important;
	}

	.processing-steps-horizontal,
	#processing-stats .processing-steps-horizontal {
		flex-wrap: nowrap !important;
		overflow-x: auto;
		max-width: 100%;
		min-width: 0;
	}

	.processing-step-card-horizontal {
		flex: 0 0 auto;
		width: min(72vw, 200px);
		min-width: 160px;
	}

	.docker-services-grid,
	.services-grid,
	.feature-grid {
		grid-template-columns: 1fr !important;
	}

	.toggle-item {
		flex-direction: column;
		align-items: stretch;
	}

	.toggle-btn {
		width: 100%;
	}

	.queue-active-grid {
		grid-template-columns: 1fr !important;
	}

	.header-page-title {
		max-width: 52vw;
	}

	#pipeline-incidents .table-responsive {
		overflow-x: auto;
	}
}

@media (max-width: 480px) {
	.header {
		padding: 10px 12px;
	}

	.header-page-title {
		font-size: 14px;
	}

	.server-time-label {
		display: none;
	}

	.container {
		padding: 0 12px;
	}

	.processing-step-card-horizontal {
		width: min(78vw, 200px);
		min-width: 150px;
	}
}

@media (min-width: 1081px) {
	.container {
		max-width: 100%;
		padding: 0 32px;
	}
}

@media (min-width: 1400px) {
	.container {
		max-width: 1600px;
		padding: 0 40px;
	}
}

@media (min-width: 1920px) {
	.container {
		max-width: 1800px;
		padding: 0 48px;
	}
}
