/* ===================================================================== */
/*  VARIABLES CSS                                                        */
/* ===================================================================== */

:root {
	/* Couleurs principales */
	--color-primary: #00823c;
	--color-primary-dark: #006830;
	--color-primary-light: #e8f5e9;

	/* Couleurs secondaires (bleu marine pour headers) */
	--color-secondary: #1a365d;
	--color-secondary-dark: #142848;
	--color-secondary-light: #2d4a7c;

	/* Couleurs d'état */
	--color-danger: #dc2626;
	--color-danger-dark: #b91c1c;
	--color-warning: #f59e0b;
	--color-success: #059669;

	/* Neutres */
	--color-bg: #f8fafc;
	--color-bg-gradient: linear-gradient(135deg, #1a365d 0%, #2d4a7c 50%, #00823c 100%);
	--color-surface: #ffffff;
	--color-border: #e2e8f0;
	--color-border-focus: #00823c;
	--color-text: #1e293b;
	--color-text-muted: #64748b;
	--color-text-light: #94a3b8;

	/* Ombres */
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
	--shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

	/* Espacements */
	--spacing-xs: 4px;
	--spacing-sm: 8px;
	--spacing-md: 16px;
	--spacing-lg: 24px;
	--spacing-xl: 32px;

	/* Bordures */
	--radius-sm: 6px;
	--radius-md: 8px;
	--radius-lg: 12px;

	/* Transitions */
	--transition-fast: 150ms ease;
	--transition-normal: 200ms ease;

	/* Aliases courts (utilisés dans les modules TV et Zendesk) */
	--bg:      var(--color-bg);
	--surface: var(--color-surface);
	--border:  var(--color-border);
	--text:    var(--color-text);
	--muted:   var(--color-text-muted);
	--primary: var(--color-primary);
}

/* ===================================================================== */
/*  RESET & BASE                                                         */
/* ===================================================================== */

*, *::before, *::after {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-bg-gradient);
	background-attachment: fixed;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* ===================================================================== */
/*  CONTENEUR PRINCIPAL                                                  */
/* ===================================================================== */

.container {
	max-width: 800px;
	margin: 40px auto;
	background: var(--color-surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-xl);
	padding: var(--spacing-xl);
}

/* ===================================================================== */
/*  TYPOGRAPHIE                                                          */
/* ===================================================================== */

h1 {
	margin: 0 0 var(--spacing-lg) 0;
	color: var(--color-secondary);
	font-size: 1.75rem;
	font-weight: 600;
	letter-spacing: -0.025em;
}

h2 {
	color: var(--color-primary);
	font-size: 1.125rem;
	font-weight: 600;
	margin: var(--spacing-lg) 0 var(--spacing-md) 0;
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
}

h2::before {
	content: '';
	display: inline-block;
	width: 4px;
	height: 1.125rem;
	background: var(--color-primary);
	border-radius: 2px;
}

/* Section (séparateur) */
.section {
	margin-top: var(--spacing-lg);
	padding-top: var(--spacing-lg);
	border-top: 1px solid var(--color-border);
}

.section:first-of-type {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

/* ===================================================================== */
/*  FORMULAIRES                                                          */
/* ===================================================================== */

label {
	font-weight: 600;
	display: block;
	margin-bottom: var(--spacing-sm);
	color: var(--color-text);
	font-size: 0.875rem;
}

.form-group {
	margin-bottom: var(--spacing-md);
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
	width: 100%;
	padding: 10px 14px;
	font-size: 14px;
	font-family: inherit;
	border-radius: var(--radius-md);
	border: 1.5px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-text);
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
select:hover {
	border-color: var(--color-text-light);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--color-primary-light);
}

input::placeholder {
	color: var(--color-text-light);
}

/* Checkbox custom */
.checkbox-inline {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
}

.checkbox-inline label {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	margin: 0;
	font-weight: 400;
	cursor: pointer;
	user-select: none;
}

.checkbox-inline input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--color-primary);
	cursor: pointer;
}

/* ===================================================================== */
/*  BOUTONS                                                              */
/* ===================================================================== */

button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--spacing-sm);
	margin-top: var(--spacing-md);
	padding: 10px 18px;
	font-size: 14px;
	font-family: inherit;
	font-weight: 600;
	border-radius: var(--radius-md);
	border: none;
	cursor: pointer;
	transition: all var(--transition-fast);
	text-decoration: none;
	white-space: nowrap;
}

button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Bouton principal */
button.primary {
	background: var(--color-primary);
	color: #ffffff;
	box-shadow: var(--shadow-sm);
}

button.primary:hover:not(:disabled) {
	background: var(--color-primary-dark);
	box-shadow: var(--shadow-md);
	transform: translateY(-1px);
}

button.primary:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: var(--shadow-sm);
}

/* Bouton secondaire */
button.secondary {
	background: var(--color-secondary);
	color: #ffffff;
	box-shadow: var(--shadow-sm);
}

button.secondary:hover:not(:disabled) {
	background: var(--color-secondary-dark);
	box-shadow: var(--shadow-md);
	transform: translateY(-1px);
}

button.secondary:active:not(:disabled) {
	transform: translateY(0);
}

/* Bouton outline */
button.outline {
	background: transparent;
	color: var(--color-primary);
	border: 1.5px solid var(--color-primary);
}

button.outline:hover:not(:disabled) {
	background: var(--color-primary-light);
}

/* Bouton danger */
button.danger {
	background: var(--color-danger);
	color: #ffffff;
	margin-left: var(--spacing-sm);
}

button.danger:hover:not(:disabled) {
	background: var(--color-danger-dark);
	box-shadow: var(--shadow-md);
	transform: translateY(-1px);
}

button.danger:active:not(:disabled) {
	transform: translateY(0);
}

/* Groupe de boutons */
.form-actions {
	margin-top: var(--spacing-lg);
	display: flex;
	gap: var(--spacing-sm);
	flex-wrap: wrap;
}

.form-actions button {
	margin-top: 0;
}

/* ===================================================================== */
/*  MESSAGES & ALERTES                                                   */
/* ===================================================================== */

p.error {
	background: #fef2f2;
	color: var(--color-danger);
	font-weight: 600;
	padding: var(--spacing-md);
	border-radius: var(--radius-md);
	border-left: 4px solid var(--color-danger);
	margin: 0 0 var(--spacing-md) 0;
}

p.success {
	background: var(--color-primary-light);
	color: var(--color-primary-dark);
	font-weight: 600;
	padding: var(--spacing-md);
	border-radius: var(--radius-md);
	border-left: 4px solid var(--color-primary);
	margin: 0 0 var(--spacing-md) 0;
}

/* Alertes avec bouton de fermeture */
.alert {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--spacing-md);
	border-radius: var(--radius-md);
	margin: 0 0 var(--spacing-md) 0;
	font-weight: 600;
}

.alert-error {
	background: #fef2f2;
	color: var(--color-danger);
	border-left: 4px solid var(--color-danger);
}

.alert-success {
	background: var(--color-primary-light);
	color: var(--color-primary-dark);
	border-left: 4px solid var(--color-primary);
}

.alert-message {
	flex: 1;
}

.alert-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	margin: 0;
	margin-left: var(--spacing-md);
	padding: 0;
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity var(--transition-fast);
	vertical-align: middle;
	flex-shrink: 0;
}

.alert-error .alert-close {
	color: var(--color-danger);
}

.alert-success .alert-close {
	color: var(--color-primary-dark);
}

.alert-close:hover {
	opacity: 1;
}

p.info {
	font-size: 13px;
	color: var(--color-text-muted);
	margin-top: var(--spacing-md);
	line-height: 1.5;
}

p.info.small {
	font-size: 12px;
}

.muted {
	font-size: 12px;
	color: var(--color-text-muted);
}

code {
	background: #f1f5f9;
	color: var(--color-secondary);
	padding: 2px 6px;
	border-radius: 4px;
	font-family: 'Consolas', 'Monaco', monospace;
	font-size: 0.875em;
}

/* ===================================================================== */
/*  TOOLBAR GLOBALE                                                      */
/* ===================================================================== */

.toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #ffffff;
	padding: var(--spacing-md) var(--spacing-lg);
	font-size: 14px;
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	height: 48px;
	box-sizing: border-box;
}

.toolbar-left {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	flex: 1;
}

.toolbar-left strong {
	color: #ffffff;
	font-weight: 600;
}

.toolbar-center {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
}

.toolbar .logo {
	font-weight: 600;
	font-size: 16px;
	color: #fff;
}

.toolbar-right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: var(--spacing-md);
	flex: 1;
}

.toolbar-right .logout-form {
	margin: 0;
}

.toolbar-right button,
.toolbar button {
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: var(--radius-md);
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	margin-top: 0;
	transition: all var(--transition-fast);
	backdrop-filter: blur(4px);
}

.toolbar-right button:hover,
.toolbar button:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
	transform: translateY(-1px);
}

.toolbar button.toolbar-avatar {
	width: 32px; min-width: 32px; height: 32px; border-radius: 50%;
	background: var(--color-primary, #3b82f6); color: #fff;
	border: none; padding: 0; font-size: 14px; font-weight: 700;
	cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
	margin-right: 10px; flex-shrink: 0; backdrop-filter: none;
}
.toolbar button.toolbar-avatar:hover { opacity: .8; background: var(--color-primary, #3b82f6); border: none; transform: none; }

/* Toolbox tabs */
.toolbox-tab.active { color: var(--color-primary, #3b82f6) !important; border-bottom-color: var(--color-primary, #3b82f6) !important; }
.toolbox-tab:hover:not(.active) { color: var(--color-text, #e2e8f0); }

.toolbar button.toolbar-icon-btn,
.toolbar-right button.toolbar-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all var(--transition-fast);
	backdrop-filter: blur(4px);
}

.toolbar button.toolbar-icon-btn:hover,
.toolbar-right button.toolbar-icon-btn:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
	transform: translateY(-1px);
}

.toolbar-icon-btn svg {
	fill: currentColor;
}

.toolbar-version-badge {
	display: inline-flex;
	align-items: center;
	height: 34px;
	padding: 0 12px;
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: var(--radius-sm);
	font-family: 'Courier New', monospace;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: all var(--transition-fast);
	backdrop-filter: blur(4px);
}

.toolbar-version-badge:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
	transform: translateY(-1px);
}

/* ===================================================================== */
/*  CHANGELOG MODAL                                                       */
/* ===================================================================== */

.changelog-version {
	padding: 16px 0;
	border-bottom: 1px solid var(--color-border);
}

.changelog-version:last-child {
	border-bottom: none;
}

.changelog-version-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.changelog-version-header strong {
	font-size: 15px;
	color: var(--color-text);
}

.changelog-date {
	font-size: 12px;
	color: var(--color-text-muted);
}

.changelog-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 4px 0;
	font-size: 13px;
	color: var(--color-text);
}

.changelog-badge {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
	flex-shrink: 0;
	margin-top: 1px;
}

.changelog-badge.feature {
	background: #d1fae5;
	color: #065f46;
}

.changelog-badge.improvement {
	background: #dbeafe;
	color: #1e40af;
}

.changelog-badge.fix {
	background: #fef3c7;
	color: #92400e;
}

/* ===================================================================== */
/*  CONTACT CLIENT (select.php)                                          */
/* ===================================================================== */

.contact-form {
	/* Pas de fond/bordure, le container .report-section suffit */
}

.contact-view {
	margin-top: var(--spacing-md);
}

.contact-view p.info {
	margin-top: 0;
	margin-bottom: var(--spacing-md);
	background: var(--color-surface);
	padding: var(--spacing-md);
	border-radius: var(--radius-sm);
	border: 1px solid var(--color-border);
}

.contact-edit-fields {
	background: var(--color-surface);
	padding: var(--spacing-md);
	border-radius: var(--radius-sm);
	border: 1px solid var(--color-border);
}

/* ===================================================================== */
/*  STYLES ÉDITEUR (view_report.php)                                     */
/* ===================================================================== */

.editor-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
	color: #ffffff;
	padding: var(--spacing-sm) var(--spacing-lg);
	font-size: 14px;
	gap: var(--spacing-lg);
	width: 100%;
	box-shadow: var(--shadow-lg);
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9998;
}

.editor-left {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
}

.editor-user {
	font-size: 13px;
	opacity: 0.9;
}

.editor-user strong {
	font-weight: 600;
	opacity: 1;
}

.editor-toolbar .toolbar-group {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
}

.editor-toolbar .toolbar-group.main-actions {
	background: transparent;
	padding: 0;
}

.editor-toolbar button {
	margin-top: 0;
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	border: none;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	line-height: inherit;
}

.editor-toolbar button:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: translateY(-1px);
}

.editor-toolbar button.primary,
.editor-toolbar a.primary {
	background: var(--color-primary);
}

.editor-toolbar button.primary:hover,
.editor-toolbar a.primary:hover {
	background: var(--color-primary-dark);
}

.editor-toolbar a.primary {
	display: inline-flex;
	align-items: center;
	gap: var(--spacing-sm);
	padding: 6px 14px;
	font-size: 13px;
	font-family: inherit;
	font-weight: 500;
	border-radius: var(--radius-sm);
	border: none;
	color: #ffffff;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: var(--shadow-sm);
	cursor: pointer;
	transition: all var(--transition-fast);
}

.editor-toolbar a.primary:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-1px);
	color: #ffffff;
}

.editor-toolbar button.secondary {
	background: rgba(255, 255, 255, 0.2);
}

.editor-right {
	display: flex;
	align-items: center;
	gap: var(--spacing-md);
}

.editor-toolbar .status {
	font-size: 12px;
	opacity: 0.85;
	background: rgba(0, 0, 0, 0.2);
	padding: 6px 12px;
	border-radius: var(--radius-sm);
}

.editor-toolbar .logout-form {
	margin: 0;
}

.editor-toolbar .logout-form button {
	background: rgba(255, 255, 255, 0.15);
	border: none;
	padding: 6px 14px;
	font-size: 13px;
}

.editor-toolbar .logout-form button:hover {
	background: rgba(255, 255, 255, 0.25);
}

/* Barre de formatage commentaire */
.comment-format-toolbar {
	margin-left: var(--spacing-md);
	display: none;
	align-items: center;
	gap: var(--spacing-xs);
	background: transparent;
	padding: 0;
	border-radius: 0;
	border: none;
}

.comment-format-toolbar .label {
	font-weight: 600;
	margin-right: var(--spacing-sm);
	color: #ffffff;
	white-space: nowrap;
	font-size: 12px;
}

.comment-format-toolbar button {
	padding: 0;
	font-size: 12px;
	border-radius: 4px;
	height: 26px;
	width: 26px;
	background: #ffffff;
	color: var(--color-primary);
	border: none;
	cursor: pointer;
	margin-top: 0;
}

.comment-format-toolbar button:hover {
	background: var(--color-primary-light);
	transform: none;
}

.comment-format-toolbar select,
.comment-format-toolbar input[type="color"] {
	font-size: 12px;
	height: 26px;
	border-radius: 4px;
	border: none;
	margin-left: var(--spacing-xs);
}

.comment-format-toolbar select {
	padding: 0 8px;
	width: auto;
	background: #ffffff;
}

.comment-format-toolbar input[type="color"] {
	width: 26px;
	padding: 2px;
	background: #ffffff;
	cursor: pointer;
}

/* ===================================================================== */
/*  CONTENEUR DU RAPPORT                                                 */
/* ===================================================================== */

#report-wrapper {
	padding: 90px var(--spacing-lg) var(--spacing-lg) var(--spacing-lg);
	max-width: 1440px;
	margin: 0 auto;
}

/* Force le fond gradient même si le CSS du rapport tente de le surcharger */
html body {
	background: var(--color-bg-gradient) !important;
	background-attachment: fixed !important;
}

#report {
	background: var(--color-surface);
	padding: var(--spacing-xl);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-xl);
}

/* Mode PDF : fond blanc forcé */
body.pdf-mode {
	background: #ffffff;
}

body.pdf-mode #report-wrapper,
body.pdf-mode #report {
	background: #ffffff;
	box-shadow: none;
}

/* ===================================================================== */
/*  ÉDITION COMMENTAIRES                                                 */
/* ===================================================================== */

.comment-block {
	border-left: 4px solid var(--color-primary);
	background: #f8fafc;
	padding: var(--spacing-md);
	margin-top: var(--spacing-lg);
	font-size: 13px;
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.comment-block[contenteditable="true"] {
	outline: 2px dashed var(--color-primary);
	outline-offset: 2px;
}

.editable-comment {
	cursor: text;
	transition: background-color var(--transition-fast);
}

.edit-mode .editable-comment {
	background-color: #fffbeb;
	outline: 2px dashed var(--color-warning);
	outline-offset: -2px;
}

.edit-mode .editable-comment:hover {
	background-color: #fef3c7;
}

.edit-mode .editable-comment:focus {
	outline: 2px solid var(--color-primary);
	background-color: #ffffff;
}

/* ===================================================================== */
/*  RESPONSIVE                                                           */
/* ===================================================================== */

@media (max-width: 768px) {
	.container {
		margin: var(--spacing-md);
		padding: var(--spacing-md);
	}

	.toolbar,
	.editor-toolbar {
		flex-wrap: wrap;
		gap: var(--spacing-sm);
		padding: var(--spacing-sm) var(--spacing-md);
	}

	.editor-center {
		order: 3;
		width: 100%;
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.editor-toolbar .toolbar-group {
		flex-wrap: wrap;
	}

	#report-wrapper {
		padding: 100px var(--spacing-md) var(--spacing-md) var(--spacing-md);
	}

	button {
		padding: 8px 14px;
		font-size: 13px;
	}
}

/* ===================================================================== */
/*  ANIMATIONS                                                           */
/* ===================================================================== */

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: translateY(0); }
}

.container {
	animation: fadeIn 0.3s ease-out;
}

/* ===================================================================== */
/*  FOCUS VISIBLE (accessibilité)                                        */
/* ===================================================================== */

button:focus-visible,
input:focus-visible,
select:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 2px;
}

/* ===================================================================== */
/*  SCROLLBAR CUSTOM                                                     */
/* ===================================================================== */

::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 5px;
}

::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* ===================================================================== */
/*  PAGE DE LOGIN                                                        */
/* ===================================================================== */

.login-page {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--spacing-lg);
}

.login-container {
	max-width: 420px;
	width: 100%;
	background: var(--color-surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-xl);
	padding: 40px;
	animation: fadeIn 0.4s ease-out;
	border: 3px solid transparent;
	transition: border-color var(--transition-normal);
}

.login-container.login-error {
	border-color: var(--color-danger);
}

.login-header {
	text-align: center;
	margin-bottom: var(--spacing-xl);
}

.login-logo {
	width: 64px;
	height: 64px;
	background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
	border-radius: var(--radius-lg);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px auto;
	box-shadow: 0 4px 14px rgba(0, 130, 60, 0.3);
}

.login-logo svg {
	width: 36px;
	height: 36px;
	fill: #ffffff;
}

.login-logo.login-logo-error {
	background: linear-gradient(135deg, var(--color-danger) 0%, var(--color-danger-dark) 100%);
	box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
}

.login-header h1 {
	margin: 0 0 var(--spacing-sm) 0;
	font-size: 1.5rem;
	color: var(--color-secondary);
}

.login-header p {
	margin: 0;
	color: var(--color-text-muted);
	font-size: 14px;
}

.login-form .form-group {
	margin-bottom: 20px;
}

.login-form label {
	font-size: 13px;
	color: #475569;
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"] {
	padding: 12px 16px;
	font-size: 15px;
}

.login-form .checkbox-inline {
	margin-top: var(--spacing-xs);
}

.login-form .checkbox-inline label {
	font-size: 13px;
	color: var(--color-text-muted);
}

.login-form button.primary {
	width: 100%;
	padding: 14px var(--spacing-lg);
	font-size: 15px;
	margin-top: var(--spacing-sm);
}

.login-footer {
	text-align: center;
	margin-top: var(--spacing-lg);
	padding-top: var(--spacing-lg);
	border-top: 1px solid var(--color-border);
}

.login-footer p {
	margin: 0;
	font-size: 12px;
	color: var(--color-text-light);
}

/* ===================================================================== */
/*  PAGE DE SÉLECTION DES RAPPORTS                                       */
/* ===================================================================== */

.page-header {
	display: flex;
	align-items: center;
	gap: var(--spacing-md);
	margin-bottom: var(--spacing-lg);
}

.page-header-icon {
	width: 48px;
	height: 48px;
	background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
	border-radius: var(--radius-lg);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.page-header-icon svg {
	width: 24px;
	height: 24px;
	fill: #ffffff;
}

/* Variantes colorées pour les modules */
.page-header-icon.veeam {
	background: linear-gradient(135deg, #00b336 0%, #008f2a 100%);
	box-shadow: 0 4px 14px rgba(0, 179, 54, 0.3);
}

.page-header-icon.bitdefender {
	background: linear-gradient(135deg, #ed1c24 0%, #b71c1c 100%);
	box-shadow: 0 4px 14px rgba(237, 28, 36, 0.3);
}

.page-header-icon.rgsystem {
	background: linear-gradient(135deg, #6c63ff 0%, #2d3561 100%);
	box-shadow: 0 4px 14px rgba(108, 99, 255, 0.3);
}

.page-header-icon.zendesk {
	background: linear-gradient(135deg, #f5a623 0%, #e8890c 100%);
	box-shadow: 0 4px 14px rgba(245, 166, 35, 0.3);
}

.page-header-icon.stats {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.page-header-icon.clients {
	background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
	box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.page-header h1 {
	margin: 0;
}

.client-select-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 6px;
}

.client-select-header label {
	margin: 0;
}

.client-count-label {
	font-size: 13px;
	color: var(--color-text-muted, #64748b);
}

.client-count-label strong {
	color: var(--color-text, #0f172a);
	font-weight: 600;
	margin-left: 4px;
}

.report-section {
	background: #f8fafc;
	border-radius: var(--radius-md);
	padding: 20px;
	margin-top: 20px;
	border: 1px solid var(--color-border);
}

.report-section h2 {
	margin-top: 0;
	display: flex;
	align-items: center;
}

.report-section h2::before {
	display: none;
}

.section-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: var(--color-primary-light);
	border-radius: var(--radius-sm);
	margin-right: 10px;
	flex-shrink: 0;
}

.section-icon svg {
	width: 16px;
	height: 16px;
	fill: var(--color-primary);
}

.section-icon.blue {
	background: #e0e7ff;
}

.section-icon.blue svg {
	fill: var(--color-secondary);
}

.section-icon.green {
	background: #d1fae5;
}

.section-icon.green svg {
	fill: #059669;
}

.button-group {
	display: flex;
	flex-wrap: wrap;
	gap: var(--spacing-sm);
	margin-top: var(--spacing-md);
}

.button-group button {
	margin-top: 0;
}

.button-group button.danger {
	margin-left: auto;
}

.client-selector {
	margin-top: var(--spacing-md);
	padding-top: var(--spacing-md);
	border-top: 1px solid var(--color-border);
}

.empty-state {
	text-align: center;
	padding: var(--spacing-xl) var(--spacing-lg);
	color: var(--color-text-muted);
}

.empty-state svg {
	width: 48px;
	height: 48px;
	fill: var(--color-text-light);
	margin-bottom: var(--spacing-md);
}

.empty-state p {
	margin: 0 auto;
}

/* Bouton validation spécial */
button.validate {
	background: var(--color-success);
	color: #ffffff;
}

button.validate:hover:not(:disabled) {
	background: #047857;
}

/* ===================================================================== */
/*  BITDEFENDER                                                          */
/* ===================================================================== */

/* Couleur Bitdefender (rouge) */
.bitdefender-container {
	max-width: 1000px;
}

.page-header-icon.bitdefender-icon {
	background: linear-gradient(135deg, #ed1c24 0%, #b71c1c 100%);
	box-shadow: 0 4px 14px rgba(237, 28, 36, 0.3);
}

.section-icon.bitdefender {
	background: #ffebee;
}

.section-icon.bitdefender svg {
	fill: #ed1c24;
}

/* Liste des rapports Bitdefender */
.bitdefender-reports-list {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-md);
	margin-top: var(--spacing-md);
}

/* Sélecteurs Bitdefender en cascade */
.bitdefender-selector-container {
	margin: var(--spacing-lg) 0;
}

.selector-row {
	display: flex;
	align-items: center;
	gap: var(--spacing-md);
	margin-bottom: var(--spacing-md);
}

.selector-row label {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	font-weight: 600;
	color: var(--color-text);
	white-space: nowrap;
	min-width: 180px;
}

.selector-row label svg {
	fill: #ed1c24;
}

.bitdefender-select {
	flex: 1;
	padding: 10px 14px;
	font-size: 14px;
	font-family: inherit;
	color: var(--color-text);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all var(--transition-fast);
	min-width: 250px;
}

.bitdefender-select:hover {
	border-color: #ed1c24;
}

.bitdefender-select:focus {
	outline: none;
	border-color: #ed1c24;
	box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.1);
}

#report-card-container {
	margin-top: var(--spacing-lg);
}

.bitdefender-report-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--spacing-md);
	transition: all var(--transition-fast);
}

.bitdefender-report-card:hover {
	border-color: #ed1c24;
	box-shadow: var(--shadow-md);
}

.report-card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: var(--spacing-md);
}

.report-card-date {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	font-weight: 600;
	color: var(--color-secondary);
}

.report-card-date svg {
	fill: var(--color-text-muted);
}

.report-card-files,
.report-card-badges {
	display: flex;
	gap: var(--spacing-xs);
}

.file-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
}

.file-badge.csv {
	background: #e3f2fd;
	color: #1565c0;
}

.file-badge.pdf {
	background: #ffebee;
	color: #c62828;
}

.file-badge.html {
	background: #e8f5e9;
	color: #2e7d32;
}

.report-card-actions {
	display: flex;
	gap: var(--spacing-sm);
	flex-wrap: wrap;
}

/* Boutons d'action style lien/bouton */
.btn-action {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 500;
	border-radius: var(--radius-sm);
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all var(--transition-fast);
	font-family: inherit;
}

.btn-action svg {
	fill: currentColor;
}

.btn-action.primary {
	background: var(--color-primary);
	color: #ffffff;
}

.btn-action.primary:hover {
	background: var(--color-primary-dark);
	transform: translateY(-1px);
}

.btn-action.secondary {
	background: var(--color-secondary);
	color: #ffffff;
}

.btn-action.secondary:hover {
	background: var(--color-secondary-dark);
	transform: translateY(-1px);
}

.btn-action.danger {
	background: var(--color-danger);
	color: #ffffff;
	margin-left: auto;
}

.btn-action.danger:hover {
	background: var(--color-danger-dark);
	transform: translateY(-1px);
}

.btn-action.disabled {
	background: #e2e8f0;
	color: #94a3b8;
	cursor: not-allowed;
}

.btn-action.view {
	background: var(--color-primary);
	color: #ffffff;
}

.btn-action.view:hover {
	background: var(--color-primary-dark);
	transform: translateY(-1px);
}

.btn-action.download {
	background: var(--color-secondary);
	color: #ffffff;
}

.btn-action.download:hover {
	background: var(--color-secondary-dark);
	transform: translateY(-1px);
}

.btn-action.delete {
	background: var(--color-danger);
	color: #ffffff;
	margin-top: 0;
}

.btn-action.delete:hover {
	background: var(--color-danger-dark);
	transform: translateY(-1px);
}

/* Boutons toolbar style lien */
.btn-toolbar {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	border-radius: var(--radius-sm);
	text-decoration: none;
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	border: none;
	cursor: pointer;
	transition: all var(--transition-fast);
}

.btn-toolbar:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: translateY(-1px);
}

.btn-toolbar svg {
	fill: currentColor;
}

/* Info Bitdefender */
.bitdefender-info {
	margin-top: var(--spacing-lg);
	padding-top: var(--spacing-md);
	border-top: 1px solid var(--color-border);
}

/* Rapport Bitdefender */
.bitdefender-report {
	/* Styles spécifiques au contenu du rapport */
}

.bitdefender-report table {
	width: 100%;
	border-collapse: collapse;
	margin: var(--spacing-md) 0;
}

.bitdefender-report th,
.bitdefender-report td {
	padding: 10px 12px;
	text-align: left;
	border: 1px solid var(--color-border);
}

.bitdefender-report th {
	background: #f8fafc;
	font-weight: 600;
	color: var(--color-secondary);
}

.bitdefender-report tr:nth-child(even) {
	background: #fafafa;
}

.bitdefender-report h1,
.bitdefender-report h2,
.bitdefender-report h3 {
	color: var(--color-secondary);
	margin-top: var(--spacing-lg);
}

.bitdefender-report h1:first-child,
.bitdefender-report h2:first-child,
.bitdefender-report h3:first-child {
	margin-top: 0;
}

/* ===================================================================== */
/*  RG SYSTEM                                                            */
/* ===================================================================== */

.section-icon.rgsystem {
	background: #ede9fe;
}

.section-icon.rgsystem svg {
	fill: #6c63ff;
}

.rgsystem-select {
	flex: 1;
	padding: 10px 14px;
	font-size: 14px;
	font-family: inherit;
	color: var(--color-text);
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all var(--transition-fast);
	min-width: 250px;
}

.rgsystem-select:hover {
	border-color: #6c63ff;
}

.rgsystem-select:focus {
	outline: none;
	border-color: #6c63ff;
	box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

.rgsystem-report-card {
	background: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: var(--spacing-md);
	transition: all var(--transition-fast);
}

.rgsystem-report-card:hover {
	border-color: #6c63ff;
	box-shadow: var(--shadow-md);
}

/* ===================================================================== */
/*  SIDEBAR RÉTRACTABLE (select.php)                                     */
/* ===================================================================== */

.app-layout {
	display: flex;
	min-height: 100vh;
	padding-top: 48px; /* Compenser la toolbar fixe */
}

.sidebar {
	width: 240px;
	background: rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #fff;
	display: flex;
	flex-direction: column;
	transition: width 0.25s ease;
	position: fixed;
	top: 48px; /* Sous la toolbar */
	left: 0;
	bottom: 0;
	z-index: 100;
	overflow-y: auto;
}

.sidebar.collapsed {
	width: 60px;
}

.sidebar-header {
	padding: 16px;
	border-bottom: 1px solid rgba(255,255,255,0.1);
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 56px;
}

.sidebar-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	overflow: hidden;
	white-space: nowrap;
}

.sidebar-brand-icon {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
}

.sidebar-brand-icon svg {
	width: 28px;
	height: 28px;
	fill: #fff;
}

.sidebar-brand-text {
	font-size: 14px;
	font-weight: 600;
	opacity: 1;
	transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-brand-text {
	opacity: 0;
	width: 0;
}

.sidebar-toggle {
	background: none;
	border: none;
	color: rgba(255,255,255,0.7);
	cursor: pointer;
	padding: 6px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, color 0.2s;
	flex-shrink: 0;
	margin-top: 0;
}

.sidebar-toggle:hover {
	background: rgba(255,255,255,0.1);
	color: #fff;
}

.sidebar-toggle svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
	transition: transform 0.25s ease;
}

.sidebar.collapsed .sidebar-toggle svg {
	transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-header {
	justify-content: center;
	padding: 16px 8px;
}

.sidebar.collapsed .sidebar-brand {
	display: none;
}

/* Navigation sidebar */
.sidebar-nav {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 16px 0;
	min-height: 0;
}

.sidebar-nav-item {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 12px;
	padding: 12px 16px;
	color: rgba(255,255,255,0.7);
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
	cursor: pointer;
	border: none;
	background: none;
	width: 100%;
	text-align: left;
	font-size: 14px;
	position: relative;
	margin-top: 0;
}

.sidebar-nav-item:hover {
	background: rgba(255,255,255,0.1);
	color: #fff;
}

.sidebar-nav-item.active {
	background: rgba(255,255,255,0.15);
	color: #fff;
}

.sidebar-nav-item.active::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: #3b82f6;
}

/* Groupes repliables dans la sidebar */
.sidebar-nav-group { display: flex; flex-direction: column; }
.sidebar-nav-group .sidebar-nav-chevron {
	margin-left: auto;
	display: flex;
	align-items: center;
	transition: transform .2s ease;
	opacity: .6;
}
.sidebar-nav-group.expanded .sidebar-nav-chevron { transform: rotate(90deg); }
.sidebar-nav-group .sidebar-nav-sublist {
	max-height: 0;
	overflow: hidden;
	transition: max-height .25s ease;
}
.sidebar-nav-group.expanded .sidebar-nav-sublist { max-height: 400px; }
.sidebar-nav-subitem { padding-left: 36px !important; font-size: 13px; }
.sidebar-nav-subitem .sidebar-nav-icon { width: 18px; height: 18px; }
.sidebar-nav-subitem .sidebar-nav-icon svg { width: 18px; height: 18px; }
.sidebar.collapsed .sidebar-nav-chevron { display: none; }
.sidebar.collapsed .sidebar-nav-sublist { display: none !important; }

.sidebar-nav-icon {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sidebar-nav-icon svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.sidebar-nav-icon.veeam svg {
	fill: #00b336;
}

.sidebar-nav-icon.bitdefender svg {
	fill: #e74c3c;
}

.sidebar-nav-icon.rgsystem svg {
	fill: #6c63ff;
}

.sidebar-nav-icon.stats svg {
	fill: #f59e0b;
}

.sidebar-nav-icon.clients svg {
	fill: #3b82f6;
}

.sidebar-nav-text {
	opacity: 1;
	transition: opacity 0.2s ease;
	white-space: nowrap;
}

.sidebar.collapsed .sidebar-nav-text {
	display: none;
}

.sidebar.collapsed .sidebar-nav-item {
	justify-content: center;
	padding: 12px 0;
	gap: 0;
}

.sidebar.collapsed .sidebar-nav {
	overflow: hidden;
}

/* Tooltip pour mode rétracté */
.sidebar-nav-item .tooltip {
	display: none;
	position: absolute;
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	background: #1f2937;
	color: #fff;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 13px;
	white-space: nowrap;
	margin-left: 8px;
	z-index: 1000;
	box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sidebar-nav-item .tooltip::before {
	content: '';
	position: absolute;
	right: 100%;
	top: 50%;
	transform: translateY(-50%);
	border: 6px solid transparent;
	border-right-color: #1f2937;
}

.sidebar.collapsed .sidebar-nav-item:hover .tooltip {
	display: block;
}

/* Contenu principal avec sidebar */
.main-content {
	flex: 1;
	background: transparent;
	min-width: 0;
	margin-left: 240px; /* Compenser la sidebar fixe */
	transition: margin-left 0.25s ease;
}

/* Quand la sidebar est réduite, réduire la marge */
body.sidebar-collapsed .main-content {
	margin-left: 60px;
}

.main-content .container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 32px;
	box-shadow: none;
	border-radius: 0;
	background: transparent;
}

/* Élargir le conteneur à quasi toute la largeur (la sidebar est déjà compensée
   par .main-content { margin-left }, les paddings laissent de petites marges) :
   - Profil en vue tableau (classe prof-wide)
   - module Inventaire (tableau large en permanence) */
.main-content .container:has(.module-section[data-module="profile"].active.prof-wide),
.main-content .container:has(.module-section[data-module="inventory"].active) {
	max-width: none;
}

/* Cadre blanc semi-transparent pour le contenu des modules */
.module-wrapper {
	background: rgba(255, 255, 255, 0.95);
	border-radius: 12px;
	padding: 24px 32px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

/* Masquer les sections non actives */
.module-section {
	display: none;
}

.module-section.active {
	display: block;
}

/* Mobile overlay */
.mobile-overlay {
	display: none;
	position: fixed;
	top: 48px;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.5);
	z-index: 999;
}

.mobile-overlay.active {
	display: block;
}

/* Responsive sidebar */
@media (max-width: 768px) {
	.sidebar {
		position: fixed;
		left: 0;
		top: 48px;
		bottom: 0;
		transform: translateX(-100%);
		z-index: 1000;
	}

	.sidebar.mobile-open {
		transform: translateX(0);
	}

	.sidebar.collapsed {
		width: 240px;
	}

	.main-content {
		margin-left: 0;
	}
}

/* ===================================================================== */
/*  DASHBOARD CLIENT                                                     */
/* ===================================================================== */

body.dashboard-page {
	background: #f0f2f5;
	padding-top: 48px; /* Compenser la toolbar fixe */
}

.dashboard-wrapper {
	max-width: 960px;
	margin: 40px auto;
	padding: 0 20px;
}

.dashboard-container {
	background: #f8f9fa;
	border-radius: 16px;
	padding: 40px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.dashboard-header {
	text-align: center;
	margin-bottom: 40px;
}

.dashboard-header h1 {
	font-size: 28px;
	color: #2c3e50;
	margin-bottom: 8px;
}

.dashboard-header .welcome {
	font-size: 16px;
	color: #6c757d;
}

.dashboard-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 24px;
	margin-bottom: 32px;
}

.dashboard-card {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	border: 1px solid #d1d5db;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.dashboard-card.disabled {
	opacity: 0.6;
	pointer-events: none;
}

.dashboard-card.disabled:hover {
	transform: none;
	box-shadow: none;
}

.card-icon {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
}

.card-icon svg {
	width: 28px;
	height: 28px;
	fill: #fff;
}

.card-icon.veeam {
	background: linear-gradient(135deg, #00b336 0%, #009929 100%);
}

.card-icon.bitdefender {
	background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.card-icon.rgsystem {
	background: linear-gradient(135deg, #6c63ff 0%, #2d3561 100%);
}

.card-icon.zendesk {
	background: linear-gradient(135deg, #f5a623 0%, #e8890c 100%);
}

.card-title {
	font-size: 18px;
	font-weight: 600;
	color: #2c3e50;
	margin-bottom: 8px;
}

.card-description {
	font-size: 14px;
	color: #6c757d;
	line-height: 1.5;
	margin-bottom: 16px;
}

.card-status {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	padding: 8px 12px;
	border-radius: 6px;
	margin-bottom: 16px;
}

.card-status.available {
	background: #d4edda;
	color: #155724;
}

.card-status.unavailable {
	background: #f8d7da;
	color: #721c24;
}

.card-status svg {
	width: 16px;
	height: 16px;
}

.card-status.available svg {
	fill: #155724;
}

.card-status.unavailable svg {
	fill: #721c24;
}

.card-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s;
}

.card-button.veeam {
	background: #00b336;
	color: #fff;
}

.card-button.veeam:hover {
	background: #009929;
}

.card-button.bitdefender {
	background: #e74c3c;
	color: #fff;
}

.card-button.bitdefender:hover {
	background: #c0392b;
}

.card-button.rgsystem {
	background: #6c63ff;
	color: #fff;
}

.card-button.rgsystem:hover {
	background: #5a52d5;
}

.card-button.zendesk {
	background: #f5a623;
	color: #fff;
}

.card-button.zendesk:hover {
	background: #e8890c;
}

.card-button.disabled {
	background: #bdc3c7;
	color: #fff;
	cursor: not-allowed;
}

.card-button svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.dashboard-info {
	text-align: center;
	padding: 16px 20px;
	background: #e9ecef;
	border-radius: 8px;
	color: #495057;
	font-size: 14px;
}

.dashboard-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #ffffff;
	padding: var(--spacing-md) var(--spacing-lg);
	font-size: 14px;
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	height: 48px;
	box-sizing: border-box;
}

.dashboard-toolbar .toolbar-left {
	display: flex;
	align-items: center;
	gap: var(--spacing-sm);
	flex: 1;
}

.dashboard-toolbar .toolbar-left strong {
	color: #ffffff;
	font-weight: 600;
}

.dashboard-toolbar .toolbar-center {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1;
}

.dashboard-toolbar .logo {
	font-weight: 600;
	font-size: 16px;
	color: #fff;
}

.dashboard-toolbar .toolbar-right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: var(--spacing-md);
	flex: 1;
}

.dashboard-toolbar .logout-form {
	margin: 0;
}

.dashboard-toolbar button {
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: var(--radius-md);
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	margin-top: 0;
	transition: all var(--transition-fast);
	backdrop-filter: blur(4px);
}

.dashboard-toolbar button:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
}

.dashboard-toolbar button.toolbar-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
}

/* ===================================================================== */
/*  VISUALISEUR PDF BITDEFENDER                                          */
/* ===================================================================== */

body.pdf-viewer-page {
	padding-top: 56px; /* Compenser la toolbar fixe */
	margin: 0;
	overflow: hidden;
}

#pdf-viewer {
	display: block;
	position: fixed;
	top: 56px; /* Sous la editor-toolbar */
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: calc(100vh - 56px);
	border: none;
	background: transparent;
}

/* ===================================================================== */
/*  GESTION DES RAPPORTS - TOGGLES                                       */
/* ===================================================================== */

.report-toggles {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 20px;
}

.toggle-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	background: #f8fafc;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	transition: background var(--transition-fast);
	min-height: 58px;
}

.toggle-row:hover {
	background: #f1f5f9;
}

.toggle-info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	min-height: 34px;
}

.toggle-label {
	font-weight: 500;
	color: var(--color-text);
}

.toggle-status {
	display: flex;
	align-items: center;
}

.status-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
}

.status-badge.enabled {
	background: #dcfce7;
	color: #166534;
}

.status-badge.disabled {
	background: #fee2e2;
	color: #991b1b;
}

.status-badge.expired {
	background: #fee2e2;
	color: #991b1b;
}

.toggle-form {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
	height: 34px;
}

.btn-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 34px;
	padding: 0 16px;
	margin: 0;
	border: 1px solid #22c55e;
	border-radius: var(--radius-sm);
	background: #22c55e;
	color: #fff;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all var(--transition-fast);
	min-width: 90px;
	vertical-align: middle;
}

.btn-toggle:hover {
	background: #16a34a;
	border-color: #16a34a;
}

/* Quand le rapport est activé, le bouton devient "Désactiver" (rouge/gris) */
.btn-toggle.active {
	background: #64748b;
	border-color: #64748b;
	color: #fff;
}

.btn-toggle.active:hover {
	background: #dc2626;
	border-color: #dc2626;
}

/* Section Notifier */
.notify-section {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--color-border);
}

.notify-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	font-size: 14px;
}

.notify-btn svg {
	flex-shrink: 0;
}

/* Info dernier rapport notifié */
.last-notified-info {
	margin: 0 0 12px;
	font-size: 0.85em;
}

.last-notified-info.has-report {
	color: #64748b;
}

.last-notified-info.no-report {
	color: #dc2626;
}

/* Indicateur de statut des rapports custom */
.report-status-indicator {
	margin: 8px 0 12px;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 0.9em;
}

.report-status-indicator.status-validated {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #86efac;
}

.report-status-indicator.status-customized {
	background: #fef9c3;
	color: #854d0e;
	border: 1px solid #fde047;
}

.report-status-indicator.status-received {
	background: #e0e7ff;
	color: #3730a3;
	border: 1px solid #a5b4fc;
}

.report-status-indicator.status-unknown {
	background: #f1f5f9;
	color: #64748b;
	border: 1px solid #cbd5e1;
}

/* Message "Aucun rapport disponible" sur le dashboard */
.no-reports-message {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 24px;
	background: #f8fafc;
	border-radius: var(--radius-lg);
	border: 2px dashed var(--color-border);
}

.no-reports-message svg {
	margin-bottom: 16px;
}

.no-reports-message p {
	margin: 0;
	color: var(--color-text-muted);
	font-size: 16px;
}

.no-reports-message p.sub {
	margin-top: 8px;
	font-size: 14px;
	color: var(--color-text-light);
}

/* ===================================================================== */
/*  GESTION CLIENTS - CARTE UNIFIÉE                                      */
/* ===================================================================== */

.client-management-card {
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	overflow: hidden;
}

.client-select-section {
	padding: 20px 24px;
	background: #f8fafc;
	border-bottom: 1px solid var(--color-border);
}

.client-select-section .form-group {
	margin-bottom: 0;
}

.client-select-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.client-select-section select {
	max-width: 400px;
	flex: 1;
}

.btn-add-client {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0;
	background: var(--color-primary);
	color: #fff;
	border: none;
	border-radius: var(--radius-md);
	cursor: pointer;
	transition: background-color 0.2s;
	flex-shrink: 0;
}

.btn-add-client:hover {
	background: var(--color-primary-dark);
}

.btn-add-client svg {
	width: 20px;
	height: 20px;
}

.btn-add-client-empty {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 16px;
	padding: 10px 20px;
	background: var(--color-primary);
	color: #fff;
	border: none;
	border-radius: var(--radius-md);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s;
}

.btn-add-client-empty:hover {
	background: var(--color-primary-dark);
}

.client-info-section,
.client-reports-section,
.client-mapping-section,
.client-notify-section,
.client-api-section {
	padding: 20px 24px;
}

.client-info-section h3,
.client-reports-section h3,
.client-mapping-section h3,
.client-notify-section h3,
.client-api-section h3 {
	font-size: 15px;
	font-weight: 600;
	color: var(--color-text);
	margin: 0 0 16px 0;
}

.client-notify-section h3 {
	margin-bottom: 4px;
}

.notify-content {
	margin: 0;
	padding: 0;
}

.notify-content form {
	margin: 0;
	padding: 0;
}

.notify-content button {
	margin-top: 0;
}

/* ===================================================================== */
/*  SECTION MAPPING BITDEFENDER                                          */
/* ===================================================================== */

.client-mapping-section {
	/* Pas de séparateur avec la section précédente */
}

.mapping-description {
	font-size: 13px;
	color: var(--color-text-muted);
	margin: 0 0 12px 0;
	line-height: 1.5;
}

.mapping-form {
	margin: 0;
}

.mapping-input-group {
	display: flex;
	gap: 10px;
	align-items: center;
}

.mapping-input {
	flex: 1;
	padding: 10px 14px;
	font-size: 14px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	background: #fff;
	color: var(--color-text);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.mapping-input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), 0.1);
}

.mapping-input:disabled {
	background: #f1f5f9;
	color: var(--color-text-muted);
	cursor: not-allowed;
}

.mapping-input::placeholder {
	color: #94a3b8;
}

.btn-mapping-save {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 40px;
	padding: 0 16px;
	margin: 0;
	background: var(--color-primary);
	color: #fff;
	border: none;
	border-radius: var(--radius-md);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s, opacity 0.2s;
	white-space: nowrap;
}

.btn-mapping-save:hover:not(:disabled) {
	background: var(--color-primary-dark);
}

.btn-mapping-save:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ===================================================================== */
/*  SECTION CLÉ API                                                      */
/* ===================================================================== */

.client-api-section {
	border-top: 1px solid var(--color-border);
}

.api-key-content {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.api-key-display {
	background: #f8fafc;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: 12px 16px;
	min-height: 42px;
	display: flex;
	align-items: center;
}

.api-key-value {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.api-key-value code {
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
	font-size: 13px;
	color: var(--color-text);
	background: #e2e8f0;
	padding: 6px 12px;
	border-radius: var(--radius-sm);
	letter-spacing: 0.5px;
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.api-key-empty {
	color: var(--color-text-muted);
	font-style: italic;
	font-size: 14px;
}

.btn-copy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	margin: 0;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	color: var(--color-text-muted);
	cursor: pointer;
	transition: all var(--transition-fast);
	flex-shrink: 0;
}

.btn-copy:hover {
	background: #e2e8f0;
	border-color: var(--color-primary);
	color: var(--color-primary);
}

.btn-copy.copied {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

.api-key-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.api-key-actions button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.api-key-actions button svg {
	flex-shrink: 0;
}

.contact-info-display {
	background: #f8fafc;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: 12px 16px;
	margin-bottom: 16px;
}

.info-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
}

.info-row:first-child {
	padding-top: 0;
}

.info-row:last-child {
	padding-bottom: 0;
}

.info-label {
	font-weight: 500;
	color: var(--color-text-muted);
	font-size: 13px;
	min-width: 140px;
}

.info-value {
	color: var(--color-text);
	font-size: 14px;
}

.client-info-section .button-group {
	display: flex;
	gap: 8px;
	margin-bottom: 0;
}

.client-info-section .contact-edit-fields {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var(--color-border);
}

.client-reports-section .report-toggles {
	margin-bottom: 0;
}

.client-reports-section .notify-section {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--color-border);
}

/* Boutons désactivés */
button:disabled,
.btn-toggle:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

/* ===================================================================== */
/*  BOUTONS D'EXPIRATION                                                 */
/* ===================================================================== */

.toggle-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	height: 34px;
}

.btn-expiration {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	margin: 0;
	background: #f1f5f9;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	color: var(--color-text-muted);
	cursor: pointer;
	transition: all var(--transition-fast);
	vertical-align: middle;
}

.btn-expiration:hover:not(:disabled) {
	background: #e2e8f0;
	border-color: var(--color-primary);
	color: var(--color-primary);
}

.btn-expiration:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn-expiration svg {
	flex-shrink: 0;
}

/* Badge d'expiration */
.expiration-info {
	display: flex;
	align-items: center;
}

.expiration-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 500;
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fcd34d;
}

/* ===================================================================== */
/*  MODAL D'EXPIRATION                                                   */
/* ===================================================================== */

.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	padding: 20px;
}

.modal-content {
	background: var(--color-surface);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-xl);
	width: 100%;
	max-width: 400px;
	animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
	from {
		opacity: 0;
		transform: scale(0.95) translateY(-10px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--color-border);
}

.modal-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--color-text);
}

.modal-close {
	background: none;
	border: none;
	font-size: 24px;
	color: var(--color-text-muted);
	cursor: pointer;
	padding: 0;
	margin: 0;
	line-height: 1;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--radius-sm);
	transition: all var(--transition-fast);
}

.modal-close:hover {
	background: #f1f5f9;
	color: var(--color-text);
}

.modal-body {
	padding: 20px;
}

.modal-description {
	margin: 0 0 16px 0;
	font-size: 14px;
	color: var(--color-text-muted);
	line-height: 1.5;
}

.modal-body .form-group {
	margin-bottom: 12px;
}

.modal-field {
	margin-bottom: 16px;
}

.modal-field:last-child {
	margin-bottom: 0;
}

.modal-body .info {
	margin-top: 8px;
	margin-bottom: 0;
	font-size: 12px;
}

.expiration-date-input {
	width: 100%;
	padding: 10px 14px;
	font-size: 14px;
	font-family: inherit;
	border-radius: var(--radius-md);
	border: 1.5px solid var(--color-border);
	background: var(--color-surface);
	color: var(--color-text);
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.expiration-date-input:hover {
	border-color: var(--color-text-light);
}

.expiration-date-input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px var(--color-primary-light);
}

.modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 16px 20px;
	border-top: 1px solid var(--color-border);
	background: #f8fafc;
	border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal-footer button {
	margin-top: 0;
}

/* ===================================================================== */
/*  BOUTONS D'ACTIONS MAC                                                */
/* ===================================================================== */

.mac-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 32px;
}

.btn-mac-edit,
.btn-mac-delete {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 32px;
	padding: 0 12px;
	margin: 0;
	border-radius: var(--radius-sm);
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: all var(--transition-fast);
	white-space: nowrap;
}

.btn-mac-edit {
	background: var(--color-secondary);
	border: 1px solid var(--color-secondary);
	color: #fff;
}

.btn-mac-edit:hover {
	background: var(--color-secondary-dark);
	border-color: var(--color-secondary-dark);
}

.btn-mac-delete {
	background: var(--color-danger);
	border: 1px solid var(--color-danger);
	color: #fff;
}

.btn-mac-delete:hover {
	background: var(--color-danger-dark);
	border-color: var(--color-danger-dark);
}

/* ===================================================================== */
/*  STATISTIQUES                                                         */
/* ===================================================================== */

.section-icon.amber {
	background: #fef3c7;
	color: #d97706;
}

.section-icon.amber svg {
	fill: #d97706;
}
.section-icon.purple {
	background: linear-gradient(135deg, #8b5cf6, #7c3aed);
	box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}
.section-icon.purple svg {
	fill: #fff;
}

/* ── Zendesk groups grid ─────────────────────────────────── */
.zd-groups-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 12px;
}

.zd-group-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--color-bg-card, #ffffff);
	border: 2px solid var(--color-border, #e2e8f0);
	border-radius: var(--radius-md, 8px);
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
	position: relative;
}

.zd-group-card:hover {
	border-color: #d97706;
	box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.15);
}

.zd-group-card.active {
	border-color: #d97706;
	background: rgba(217, 119, 6, 0.05);
}

.zd-group-card input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.zd-group-card-icon {
	width: 40px;
	height: 40px;
	border-radius: var(--radius-md, 8px);
	background: #f1f5f9;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.2s;
}

.zd-group-card.active .zd-group-card-icon {
	background: #fef3c7;
}

.zd-group-card-icon svg {
	width: 20px;
	height: 20px;
	fill: #94a3b8;
	transition: fill 0.2s;
}

.zd-group-card.active .zd-group-card-icon svg {
	fill: #d97706;
}

.zd-group-card-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.zd-group-card-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--color-text, #1e293b);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.zd-group-card-id {
	font-size: 12px;
	color: var(--color-text-muted, #94a3b8);
}

.zd-group-card-check {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #e2e8f0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.2s;
}

.zd-group-card.active .zd-group-card-check {
	background: #d97706;
}

.zd-group-card-check svg {
	width: 14px;
	height: 14px;
	fill: transparent;
	transition: fill 0.2s;
}

.zd-group-card.active .zd-group-card-check svg {
	fill: #fff;
}

.stats-overview-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.stats-card {
	background: #ffffff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	padding: 20px;
	display: flex;
	align-items: center;
	gap: 16px;
	box-shadow: var(--shadow-sm);
	transition: box-shadow 0.2s ease;
}

.stats-card:hover {
	box-shadow: var(--shadow-md);
}

.stats-card-icon {
	width: 48px;
	height: 48px;
	border-radius: var(--radius-md);
	background: #fef3c7;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.stats-card-icon svg {
	width: 24px;
	height: 24px;
	fill: #d97706;
}

.stats-card-content {
	display: flex;
	flex-direction: column;
}

.stats-card-value {
	font-size: 28px;
	font-weight: 700;
	color: var(--color-text);
	line-height: 1;
}

.stats-card-label {
	font-size: 13px;
	color: var(--color-text-muted);
	margin-top: 4px;
}

.stats-filters {
	display: flex;
	align-items: flex-end;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.stats-filters .form-group {
	margin-bottom: 0;
}

.stats-filters input[type="date"],
.stats-filters select {
	padding: 8px 12px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: 14px;
}

.stats-filters button {
	height: 38px;
}

.stats-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
}

.stats-section-header h2 {
	margin-bottom: 0;
}

.stats-section-header select {
	padding: 6px 10px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: 13px;
	color: var(--color-text);
	background: #fff;
	cursor: pointer;
	flex-shrink: 0;
	width: 120px;
}

.stats-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0 4px;
	gap: 16px;
	flex-wrap: wrap;
}

.stats-pagination-left,
.stats-pagination-right {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--color-muted);
	line-height: 32px;
}

.stats-pagination-left label,
.stats-pagination-info,
.stats-page-total {
	white-space: nowrap;
	line-height: 32px;
	margin: 0;
}

.stats-pagination-left select {
	padding: 0 8px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: 13px;
	cursor: pointer;
	width: 64px;
	height: 32px;
	vertical-align: middle;
}

.stats-pagination-info {
	margin-left: 4px;
}

.stats-pagination-right {
	gap: 6px;
}

.stats-page-input {
	width: 48px;
	height: 32px;
	text-align: center;
	padding: 0;
	margin: 0;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: 13px;
	box-sizing: border-box;
	-moz-appearance: textfield;
}

.stats-page-input::-webkit-outer-spin-button,
.stats-page-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.stats-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	background: #fff;
	cursor: pointer;
	color: var(--color-text);
	padding: 0;
	margin: 0;
}

.stats-page-btn:hover:not(:disabled) {
	background: #f1f5f9;
}

.stats-page-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.stats-table-wrapper {
	overflow-x: auto;
}

.stats-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.stats-table thead th {
	background: #f1f5f9;
	padding: 10px 12px;
	text-align: left;
	font-weight: 600;
	color: var(--color-text);
	border-bottom: 2px solid var(--color-border);
	white-space: nowrap;
}

.stats-table tbody td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--color-border);
	color: var(--color-text);
}

.stats-table tbody tr:hover {
	background: #f8fafc;
}

.stats-table code {
	font-family: 'Consolas', 'Monaco', monospace;
	font-size: 12px;
	background: #f1f5f9;
	padding: 2px 6px;
	border-radius: 4px;
}

.stats-event-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

.stats-event-badge.client_login,
.stats-event-badge.admin_login {
	background: #dbeafe;
	color: #1d4ed8;
}

.stats-event-badge.client_view_veeam {
	background: #dcfce7;
	color: #15803d;
}

.stats-event-badge.client_view_bitdefender {
	background: #fee2e2;
	color: #b91c1c;
}

.stats-event-badge.client_view_rgsystem {
	background: #e0e7ff;
	color: #4338ca;
}

.stats-event-badge.admin_validate_report,
.stats-event-badge.admin_customize_report {
	background: #fef3c7;
	color: #b45309;
}

.stats-event-badge.admin_notify_client {
	background: #d1fae5;
	color: #065f46;
}

.stats-event-badge.admin_toggle_service {
	background: #f3e8ff;
	color: #7c3aed;
}

.stats-event-badge.admin_delete_report {
	background: #fef2f2;
	color: #dc2626;
}

.stats-event-badge.admin_create_client {
	background: #e0f2fe;
	color: #0369a1;
}

@media (max-width: 768px) {
	.stats-overview-cards {
		grid-template-columns: repeat(2, 1fr);
	}

	.stats-filters {
		flex-direction: column;
		align-items: stretch;
	}

	.stats-table {
		font-size: 12px;
	}

	.stats-table thead th,
	.stats-table tbody td {
		padding: 6px 8px;
	}
}

@media (max-width: 480px) {
	.stats-overview-cards {
		grid-template-columns: 1fr;
	}
}

/* =============================================
   HISTORIQUE VEEAM
   ============================================= */

.section-icon.history {
	background: #fef3c7;
}

.section-icon.history svg {
	fill: #d97706;
}

.history-filters {
	display: flex;
	gap: 16px;
	padding: 12px 0;
	flex-wrap: wrap;
}

.history-filter-group {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--color-muted);
	white-space: nowrap;
	line-height: 32px;
}

.history-filter-group label {
	white-space: nowrap;
	line-height: 32px;
	margin: 0;
}

.history-filter-group select {
	padding: 0 10px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: 13px;
	cursor: pointer;
	min-width: 160px;
	height: 32px;
	vertical-align: middle;
	box-sizing: border-box;
}

.history-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.history-badge.original {
	background: #e0e7ff;
	color: #4338ca;
}

.history-badge.custom {
	background: #d1fae5;
	color: #065f46;
}

.history-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 500;
}

.history-status.received {
	background: #f1f5f9;
	color: #64748b;
}

.history-status.customized {
	background: #fef3c7;
	color: #92400e;
}

.history-status.validated {
	background: #d1fae5;
	color: #065f46;
}

.history-actions {
	white-space: nowrap;
	display: flex;
	gap: 6px;
	align-items: center;
}

.history-actions .btn-action.small {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	padding: 0;
}

.btn-action.small svg {
	width: 14px;
	height: 14px;
}

/* ===================================================================== */
/*  MODULE IDÉES (superadmin)                                             */
/* ===================================================================== */

/* Sidebar nav icon */
.sidebar-nav-icon.ideas svg {
	fill: #eab308;
}

/* Page header icon */
.page-header-icon.ideas {
	background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
	box-shadow: 0 4px 14px rgba(234, 179, 8, 0.3);
}

/* Scripts clients */
.sidebar-nav-icon.scripts svg {
	fill: #8b5cf6;
}

.page-header-icon.scripts {
	background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
	box-shadow: 0 4px 14px rgba(139, 92, 246, 0.3);
}

#scripts-table.stats-table tbody td {
	vertical-align: middle !important;
}

#scripts-table.stats-table tbody td:last-child form {
	display: inline;
	vertical-align: middle;
	margin: 0;
}

#scripts-table.stats-table tbody td:last-child button {
	vertical-align: middle;
	margin: 0;
}

/* Tableau idées */
#ideas-table.stats-table {
	table-layout: fixed;
	width: 100%;
}

#ideas-table.stats-table thead th:nth-child(1),
#ideas-table.stats-table tbody td:nth-child(1) { width: 10%; }  /* Date */
#ideas-table.stats-table thead th:nth-child(2),
#ideas-table.stats-table tbody td:nth-child(2) { width: 25%; }  /* Auteur */
#ideas-table.stats-table thead th:nth-child(3),
#ideas-table.stats-table tbody td:nth-child(3) { width: 10%; }  /* Rôle */
#ideas-table.stats-table thead th:nth-child(4),
#ideas-table.stats-table tbody td:nth-child(4) { width: 12%; }  /* Catégorie */
#ideas-table.stats-table thead th:nth-child(5),
#ideas-table.stats-table tbody td:nth-child(5) { width: 20%; }  /* Titre */
#ideas-table.stats-table thead th:nth-child(6),
#ideas-table.stats-table tbody td:nth-child(6) { width: 12%; }  /* Statut */
#ideas-table.stats-table thead th:nth-child(7),
#ideas-table.stats-table tbody td:nth-child(7) { width: 11%; }  /* Actions */

#ideas-table.stats-table tbody td {
	vertical-align: middle !important;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#ideas-table.stats-table thead th:last-child,
#ideas-table.stats-table tbody td:last-child {
	text-align: left;
}

#ideas-table.stats-table tbody td:last-child button {
	vertical-align: middle;
	margin: 0;
}

/* Filtres */
.ideas-filters {
	display: flex;
	align-items: flex-end;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.ideas-filters .form-group {
	margin-bottom: 0;
}

.ideas-filters select {
	padding: 8px 12px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	font-size: 14px;
}

.ideas-filters button {
	height: 38px;
}

/* Badges statut */
.ideas-status-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

.ideas-status-badge.new {
	background: #dbeafe;
	color: #1d4ed8;
}

.ideas-status-badge.reviewed {
	background: #fef3c7;
	color: #b45309;
}

.ideas-status-badge.planned {
	background: #e0e7ff;
	color: #4338ca;
}

.ideas-status-badge.done {
	background: #dcfce7;
	color: #15803d;
}

.ideas-status-badge.declined {
	background: #fee2e2;
	color: #b91c1c;
}

/* Badges catégorie */
.ideas-category-badge {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

.ideas-category-badge.bug {
	background: #fee2e2;
	color: #b91c1c;
}

.ideas-category-badge.improvement {
	background: #dbeafe;
	color: #1e40af;
}

.ideas-category-badge.feature {
	background: #d1fae5;
	color: #065f46;
}

/* Badges rôle */
.ideas-role-badge {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 11px;
	font-weight: 500;
}

.ideas-role-badge.admin {
	background: #e0e7ff;
	color: #4338ca;
}

.ideas-role-badge.superadmin {
	background: #fef3c7;
	color: #b45309;
}

.ideas-role-badge.client {
	background: #d1fae5;
	color: #065f46;
}

/* Modal détail idée */
.idea-detail-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
	font-size: 13px;
	color: var(--color-text-muted);
}

.idea-description-box {
	background: #f8fafc;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-sm);
	padding: 12px;
	font-size: 14px;
	line-height: 1.6;
	white-space: pre-wrap;
	max-height: 200px;
	overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
	.ideas-filters {
		flex-direction: column;
		align-items: stretch;
	}
}

/* =============================================================================
   Module Zendesk
   ============================================================================= */

/* --- Tableau organisations (config) --- */
.zd-org-scroll {
	max-height: 400px; overflow-y: auto;
	border: 1px solid var(--border, #e2e8f0); border-radius: 6px;
}
.zd-org-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.zd-org-table th {
	padding: 8px 12px; font-size: 11px; font-weight: 600; text-transform: uppercase;
	letter-spacing: .5px; color: var(--muted, #64748b);
	background: var(--surface-alt, #f8fafc); border-bottom: 2px solid var(--border, #e2e8f0);
	text-align: left; position: sticky; top: 0; z-index: 1;
}
.zd-org-table th:not(:first-child) { text-align: center; width: 80px; }
.zd-org-table td { padding: 8px 12px; border-bottom: 1px solid var(--border, #e2e8f0); vertical-align: middle; }
.zd-org-table td:not(:first-child) { text-align: center; }
.zd-org-table tbody tr:hover { background: var(--surface-alt, #f8fafc); }
.zd-org-table tbody tr.zd-org-hidden { opacity: .45; }
.zd-org-table .zd-org-name { font-weight: 500; }
.zd-org-toggle {
	width: 18px; height: 18px; cursor: pointer;
	accent-color: var(--green, #00823c);
}
.zd-org-toggle.vip { accent-color: #f59e0b; }
.zd-org-vip-rank {
	display: inline-flex; align-items: center; justify-content: center;
	width: 20px; height: 20px; border-radius: 50%;
	background: rgba(245,158,11,.15); color: #d97706;
	font-size: 10px; font-weight: 700;
}
.zd-vip-cell {
	display: flex; align-items: center; justify-content: center; gap: 6px;
}
.zd-org-vip-arrows {
	display: inline-flex; flex-direction: column; gap: 1px;
}
.zd-org-vip-arrows button {
	width: 16px; height: 11px; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--border, #e2e8f0); border-radius: 2px;
	background: var(--bg, #fff); color: var(--muted, #64748b);
	cursor: pointer; font-size: 9px; padding: 0; line-height: 1; margin-top: 0;
}
.zd-org-vip-arrows button:hover { background: var(--surface-alt, #f1f5f9); color: var(--text, #1e293b); }

/* --- Champ de recherche commun --- */
.zd-search-wrap {
	position: relative; display: inline-block; max-width: 300px; width: 100%;
}
.zd-search-wrap svg {
	position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
	width: 14px; height: 14px; color: var(--muted, #94a3b8); pointer-events: none;
}
.zd-search-input {
	width: 100%; max-width: 300px; height: 32px; padding: 0 10px 0 36px;
	border: 1px solid var(--border, #e2e8f0); border-radius: 6px;
	font-size: 13px; background: var(--bg, #fff); color: var(--text, #1e293b);
	margin-bottom: 10px;
}

/* --- Listes ordonnables (groupes, priorités, statuts, VIP) --- */
.zd-sortable-list { display: flex; flex-direction: column; gap: 4px; }
.zd-sortable-item {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 12px; background: var(--bg, #fff);
	border: 1px solid var(--border, #e2e8f0); border-radius: 6px;
	font-size: 13px; user-select: none;
}
.zd-sortable-item:hover { background: var(--surface, #f1f5f9); }
.zd-sortable-handle { cursor: grab; color: var(--muted, #94a3b8); font-size: 16px; line-height: 1; }
.zd-sortable-label { flex: 1; font-weight: 500; }
.zd-sortable-arrows { display: flex; gap: 2px; }
.zd-arrow-btn {
	width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
	border: 1px solid var(--border, #e2e8f0); border-radius: 4px;
	background: var(--bg, #fff); color: var(--muted, #64748b);
	cursor: pointer; font-size: 14px; line-height: 1; padding: 0;
}
.zd-arrow-btn:hover { background: var(--surface, #f1f5f9); color: var(--text, #1e293b); }
.zd-remove-btn:hover { background: rgba(220,38,38,.1); color: #dc2626; }
.zd-vip-rank {
	display: inline-flex; align-items: center; justify-content: center;
	width: 22px; height: 22px; border-radius: 50%;
	background: rgba(245,158,11,.15); color: #d97706;
	font-size: 11px; font-weight: 700; margin-right: 8px;
}

/* --- Tableau tickets par client --- */
@keyframes zd-spin { to { transform: rotate(360deg); } }
.zd-preview-tbl { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.zd-preview-tbl th {
	padding: 10px 14px; font-size: 11px; font-weight: 600;
	text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
	background: var(--surface); border-bottom: 2px solid var(--border);
	position: sticky; top: 0; z-index: 1;
}
.zd-preview-tbl th:first-child { text-align: left; }
.zd-preview-tbl th:not(:first-child),
.zd-preview-tbl td:not(:first-child) { text-align: center; }
.zd-preview-tbl td { padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.zd-preview-tbl tbody tr:hover { background: var(--surface); }
.zd-preview-tbl tbody tr:last-child td { border-bottom: none; }
.zd-preview-tbl tfoot td {
	padding: 10px 14px; font-weight: 700; background: var(--surface);
	border-top: 2px solid var(--border); vertical-align: middle;
}
.zd-preview-tbl .zd-client-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zd-preview-tbl th[data-sort] { cursor: pointer; user-select: none; }
.zd-preview-tbl th[data-sort]:hover { color: var(--primary); }
.zd-preview-tbl th[data-sort] .zd-sort-arrow { opacity: 0; font-size: 10px; margin-left: 3px; transition: opacity .15s; }
.zd-preview-tbl th[data-sort].sort-active { color: var(--primary); }
.zd-preview-tbl th[data-sort].sort-active .zd-sort-arrow { opacity: 1; }
.zd-pill {
	display: inline-block; min-width: 32px; padding: 3px 10px; border-radius: 12px;
	font-size: 13px; font-weight: 600; text-align: center; line-height: 1.4;
}
.zd-pill.red   { background: rgba(220,38,38,.12); color: #dc2626; }
.zd-pill.blue  { background: rgba(59,130,246,.12); color: #3b82f6; }
.zd-pill.green { background: rgba(0,130,60,.12);   color: #00823c; }
.zd-pill.muted { background: var(--surface); color: var(--muted); }

/* --- Barre de filtres période --- */
.zd-toolbar {
	display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
}
.zd-toolbar > * {
	margin-top: 0;
	line-height: 32px;
}
.zd-toolbar label {
	font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap;
	display: flex; align-items: center; height: 32px; line-height: 1;
}
.zd-date-input {
	height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px;
	font-size: 13px; background: var(--bg); color: var(--text);
}
.zd-toolbar-sep {
	display: inline-block; width: 1px; height: 20px; background: var(--border); margin: 0 2px; align-self: center; flex-shrink: 0;
}
.zd-period-btn {
	height: 32px; padding: 0 11px; border: 1px solid var(--border); border-radius: 6px;
	font-size: 12px; font-weight: 500; background: var(--surface); color: var(--text);
	margin-top: 0; line-height: 1; cursor: pointer;
	transition: background .15s, border-color .15s, color .15s; white-space: nowrap;
}
.zd-period-btn:hover {
	background: var(--primary, #6366f1); border-color: var(--primary, #6366f1); color: #fff;
}