/* ==========================================================================
   HCOMZ CLIENT PORTAL - STYLESHEET (DESKTOP, TABLETTE, MOBILE & PWA)
   ========================================================================== */

/* 1. RESET & VARIABLES */
*, *::before, *::after {
	box-sizing: border-box;
}

:root {
	--hcomz-primary: #C97C64;
	--hcomz-primary-hover: #B56C55;
	--hcomz-primary-light: #FAF7F0;
	--hcomz-dark: #0E3B3E;
	--hcomz-dark-hover: #175256;
	--hcomz-accent: #D9A62E;
	--hcomz-on-dark: #F0F5F4;
	--hcomz-bg: #FAF7F0;
	--hcomz-card: #ffffff;
	--hcomz-border: #E8DFD3;
	--hcomz-border-subtle: #E8DFD3;
	--hcomz-text: #3A4443;
	--hcomz-muted: #5F5E5A;
	--hcomz-radius: 12px;
	--hcomz-radius-sm: 8px;
	--hcomz-shadow: 0 4px 20px rgba(201, 124, 100, 0.08);
	--hcomz-shadow-sm: 0 2px 8px rgba(14, 59, 62, 0.05);
	--hcomz-shadow-lg: 0 12px 36px rgba(14, 59, 62, 0.15);
	--hcomz-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.hcomz-portal-standalone-body {
	margin: 0 !important;
	padding: 0 !important;
	background-color: var(--hcomz-bg) !important;
	color: var(--hcomz-text);
	font-family: var(--hcomz-font);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* Support des encoches iOS (iPhone Island & Home indicator) en mode PWA */
	padding-top: env(safe-area-inset-top) !important;
	padding-bottom: env(safe-area-inset-bottom) !important;
	padding-left: env(safe-area-inset-left) !important;
	padding-right: env(safe-area-inset-right) !important;
}

.hcomz-portal-wrapper {
	--hcomz-primary: var(--hcomz-dark);
	--hcomz-primary-hover: var(--hcomz-dark-hover);
	font-family: var(--hcomz-font);
	color: var(--hcomz-text);
	background-color: var(--hcomz-bg);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	width: 100%;
}

/* 2. NAVBAR (HEADER) */
.hcomz-navbar {
	background: var(--hcomz-card);
	border-bottom: 1px solid var(--hcomz-border);
	padding: 16px 30px;
	position: sticky;
	top: 0;
	z-index: 100;
	box-shadow: 0 2px 10px rgba(14, 59, 62, 0.03);
}

.hcomz-navbar-container {
	max-width: 1180px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.hcomz-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	flex-shrink: 0;
}

.hcomz-brand-logo {
	height: 38px;
	width: auto;
	max-width: 140px;
	object-fit: contain;
	display: block;
}

.hcomz-logo {
	font-size: 24px;
	font-weight: 900;
	color: var(--hcomz-dark);
	letter-spacing: -0.5px;
}

.hcomz-logo span {
	color: var(--hcomz-dark);
}

.hcomz-tag {
	background: var(--hcomz-primary-light);
	color: var(--hcomz-dark);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 4px 8px;
	border-radius: 6px;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

.hcomz-user-block {
	display: flex;
	align-items: center;
	gap: 16px;
}

.hcomz-btn-pwa-header {
	display: none;
	background: var(--hcomz-primary-light);
	color: var(--hcomz-dark);
	border: 1px solid var(--hcomz-border);
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	align-items: center;
	gap: 4px;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.hcomz-btn-pwa-header:hover {
	background: var(--hcomz-primary);
	color: #ffffff;
	border-color: var(--hcomz-dark);
}

.hcomz-user-meta {
	text-align: right;
	line-height: 1.3;
}

.hcomz-user-name {
	display: block;
	font-weight: 700;
	font-size: 13.5px;
	color: var(--hcomz-dark);
}

.hcomz-user-email {
	display: block;
	font-size: 12px;
	color: var(--hcomz-muted);
}

.hcomz-btn-logout {
	border: 1.5px solid var(--hcomz-border);
	padding: 7px 14px;
	border-radius: 7px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--hcomz-muted);
	text-decoration: none;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	white-space: nowrap;
}

.hcomz-btn-logout:hover {
	background: var(--hcomz-primary);
	color: #ffffff;
	border-color: var(--hcomz-dark);
}

/* 3. MAIN CONTAINER */
.hcomz-main-container {
	max-width: 1180px;
	margin: 28px auto;
	padding: 0 24px;
	flex: 1;
	width: 100%;
}

/* 4. BANDEAU DE BIENVENUE & SÉLECTEUR DE SITE */
.hcomz-welcome-banner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	margin-bottom: 25px;
	background: var(--hcomz-card);
	border: 1px solid var(--hcomz-border);
	border-radius: var(--hcomz-radius);
	padding: 24px 28px;
	box-shadow: var(--hcomz-shadow);
}

.hcomz-welcome-banner h2 {
	margin: 0 0 6px 0;
	font-size: 24px;
	font-weight: 800;
	color: var(--hcomz-dark);
	letter-spacing: -0.3px;
}

.hcomz-welcome-banner p {
	margin: 0;
	color: var(--hcomz-muted);
	font-size: 14px;
	line-height: 1.4;
}

.hcomz-site-selector-bar {
	margin-top: 14px;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.hcomz-site-selector-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--hcomz-dark);
	white-space: nowrap;
}

.hcomz-site-select {
	padding: 8px 14px;
	border: 1.5px solid var(--hcomz-primary);
	border-radius: 7px;
	background-color: #ffffff;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--hcomz-dark);
	min-width: 240px;
	cursor: pointer;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hcomz-site-select:focus {
	border-color: var(--hcomz-primary-hover);
	box-shadow: 0 0 0 3px var(--hcomz-primary-light);
}

.hcomz-quota-card {
	background: var(--hcomz-bg);
	border: 1.5px solid var(--hcomz-primary);
	padding: 14px 22px;
	border-radius: var(--hcomz-radius-sm);
	text-align: right;
	flex-shrink: 0;
}

.quota-title {
	display: block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--hcomz-dark);
	letter-spacing: 0.5px;
}

.quota-num {
	display: block;
	font-size: 22px;
	font-weight: 800;
	color: var(--hcomz-dark);
	margin: 2px 0;
}

.quota-sub {
	display: block;
	font-size: 11.5px;
	color: var(--hcomz-muted);
}

/* 5. TABS NAVIGATION (DESKTOP) & SÉLECTEUR MOBILE */
.hcomz-tabs-nav-container {
	margin-bottom: 25px;
}

.hcomz-tab-nav {
	display: flex;
	gap: 8px;
	border-bottom: 1.5px solid var(--hcomz-border);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 2px;
}

.hcomz-tab-nav::-webkit-scrollbar {
	display: none;
}

.hcomz-tab-mobile-wrapper {
	display: none;
}

.hcomz-tab-link {
	background: transparent;
	border: none;
	padding: 12px 20px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--hcomz-muted);
	cursor: pointer;
	border-bottom: 3px solid transparent;
	transition: all 0.2s ease;
	white-space: nowrap;
	flex-shrink: 0;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px 4px 0 0;
}

.hcomz-tab-link:hover {
	color: var(--hcomz-dark);
	background: rgba(14, 59, 62, 0.04);
}

.hcomz-tab-link.active {
	color: var(--hcomz-dark);
	border-bottom-color: var(--hcomz-dark);
	font-weight: 700;
}

.hcomz-tab-panel {
	display: none;
	animation: hcomzFadeIn 0.25s ease-in-out;
}

.hcomz-tab-panel.active {
	display: block;
}

@keyframes hcomzFadeIn {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* 6. KPI GRID */
.hcomz-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 25px;
}

.hcomz-kpi-card {
	background: var(--hcomz-card);
	border: 1px solid var(--hcomz-border);
	padding: 20px;
	border-radius: var(--hcomz-radius);
	box-shadow: var(--hcomz-shadow);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hcomz-kpi-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(201, 124, 100, 0.12);
}

.kpi-label {
	display: block;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--hcomz-muted);
	margin-bottom: 8px;
	letter-spacing: 0.5px;
}

.kpi-value {
	font-size: 26px;
	font-weight: 800;
	color: var(--hcomz-dark);
	letter-spacing: -0.5px;
	line-height: 1.2;
}

/* 7. BOX & CONTENT CONTAINERS */
.hcomz-box {
	background: var(--hcomz-card);
	border: 1px solid var(--hcomz-border);
	border-radius: var(--hcomz-radius);
	padding: 26px;
	box-shadow: var(--hcomz-shadow);
	margin-bottom: 24px;
}

.hcomz-box-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.hcomz-box-header h3,
.hcomz-box h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--hcomz-dark);
	letter-spacing: -0.2px;
}

.hcomz-chart-box {
	position: relative;
	width: 100%;
	height: 320px;
	margin-top: 15px;
}

/* 8. TABLES & RESPONSIVE CONTAINERS */
.hcomz-table-responsive {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border-radius: 8px;
}

.hcomz-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
	min-width: 580px;
}

.hcomz-table th {
	background: var(--hcomz-primary-light);
	text-align: left;
	padding: 12px 16px;
	border-bottom: 1px solid var(--hcomz-border);
	color: var(--hcomz-dark);
	font-weight: 700;
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

.hcomz-table td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--hcomz-border-subtle);
	vertical-align: middle;
}

.hcomz-table tbody tr:hover {
	background-color: rgba(251, 238, 232, 0.35);
}

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

/* 9. MAINTENANCE REPORTS GRID & CARDS */
.hcomz-reports-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
	gap: 20px;
}

.hcomz-report-card {
	background: #ffffff;
	border: 1px solid var(--hcomz-border);
	border-radius: var(--hcomz-radius);
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	box-shadow: var(--hcomz-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hcomz-report-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--hcomz-shadow);
}

.hcomz-report-card-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
	border-bottom: 1px solid var(--hcomz-border-subtle);
	padding-bottom: 14px;
}

.hcomz-report-period-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.hcomz-report-badge {
	font-size: 14px;
	font-weight: 800;
	color: var(--hcomz-dark);
}

.hcomz-report-date {
	font-size: 12px;
	color: var(--hcomz-muted);
}

.hcomz-report-score {
	text-align: right;
	background: var(--hcomz-primary-light);
	border: 1px solid var(--hcomz-border);
	padding: 6px 12px;
	border-radius: 8px;
}

.hcomz-report-score-num {
	display: block;
	font-size: 15px;
	font-weight: 800;
	color: var(--hcomz-dark);
}

.hcomz-report-score-label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--hcomz-muted);
}

.hcomz-report-metrics {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	background: var(--hcomz-bg);
	padding: 12px;
	border-radius: 8px;
}

.hcomz-report-metric-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.metric-key {
	font-size: 11px;
	color: var(--hcomz-muted);
	font-weight: 600;
}

.metric-val {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--hcomz-dark);
}

.status-ok {
	color: #166534;
}

.status-warn {
	color: #92400e;
}

.hcomz-report-details {
	font-size: 13px;
	color: var(--hcomz-text);
	line-height: 1.5;
	background: #fff;
	border-left: 3px solid var(--hcomz-primary);
	padding: 10px 14px;
	border-radius: 0 6px 6px 0;
	background: #faf8f6;
}

.hcomz-report-footer {
	margin-top: auto;
	padding-top: 6px;
}

.hcomz-btn-pdf {
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}

/* 10. BOUTONS & BADGES */
.hcomz-btn-primary {
	background: var(--hcomz-primary);
	color: #ffffff !important;
	border: none;
	padding: 9px 18px;
	border-radius: 7px;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 38px;
	transition: background-color 0.2s ease, transform 0.1s ease;
	white-space: nowrap;
}

.hcomz-btn-primary:hover {
	background: var(--hcomz-primary-hover);
}

.hcomz-btn-primary:active {
	transform: scale(0.98);
}

.hcomz-btn-sm {
	padding: 6px 12px;
	font-size: 12px;
	min-height: 32px;
}

.badge {
	padding: 4px 9px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: inline-block;
	white-space: nowrap;
}

.badge-minor_edit { background: var(--hcomz-primary-light); color: var(--hcomz-dark); }
.badge-incident   { background: #fee2e2; color: #991b1b; }
.badge-open       { background: #fef3c7; color: #92400e; }
.badge-in_progress{ background: #e0f2fe; color: #0369a1; }
.badge-resolved   { background: #dcfce7; color: #166534; }
.badge-closed     { background: #f3f4f6; color: #4b5563; }
.badge-paid       { background: #dcfce7; color: #166534; }
.badge-pending    { background: #fef3c7; color: #92400e; }
.badge-overdue    { background: #fee2e2; color: #991b1b; }
.badge-cancelled  { background: #f3f4f6; color: #5F5E5A; }

/* 11. MODALE */
.hcomz-modal-overlay {
	position: fixed;
	top: 0; left: 0; width: 100%; height: 100%;
	background: rgba(14, 59, 62, 0.7);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 20px;
}

.hcomz-modal-dialog {
	background: var(--hcomz-card);
	border: 1px solid var(--hcomz-border);
	border-radius: var(--hcomz-radius);
	width: 100%;
	max-width: 560px;
	max-height: 90vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 28px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hcomz-modal-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--hcomz-border);
	padding-bottom: 12px;
}

.hcomz-modal-top h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--hcomz-dark);
}

.hcomz-modal-close {
	background: none;
	border: none;
	font-size: 26px;
	cursor: pointer;
	color: var(--hcomz-muted);
	padding: 4px 8px;
	line-height: 1;
	transition: color 0.2s ease;
	min-height: 36px;
	min-width: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hcomz-modal-close:hover {
	color: var(--hcomz-dark);
}

.hcomz-field {
	margin-bottom: 16px;
}

.hcomz-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--hcomz-dark);
}

.hcomz-field input[type="text"],
.hcomz-field input[type="url"],
.hcomz-field input[type="file"],
.hcomz-field select,
.hcomz-field textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid var(--hcomz-border);
	background: var(--hcomz-bg);
	border-radius: 8px;
	font-size: 14px;
	color: var(--hcomz-text);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	font-family: inherit;
}

.hcomz-field input:focus,
.hcomz-field select:focus,
.hcomz-field textarea:focus {
	outline: none;
	border-color: var(--hcomz-dark);
	box-shadow: 0 0 0 3px var(--hcomz-primary-light);
	background: var(--hcomz-bg);
}

.hcomz-form-actions {
	text-align: right;
	margin-top: 24px;
}

/* 12. PAGE DE CONNEXION DÉDIÉE (FRONT-END) */
.hcomz-login-page-wrapper {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--hcomz-bg);
	padding: 24px 16px;
	font-family: var(--hcomz-font);
}

.hcomz-login-card {
	background: var(--hcomz-card);
	border: 1px solid var(--hcomz-border);
	border-radius: 16px;
	padding: 40px 36px;
	width: 100%;
	max-width: 440px;
	box-shadow: 0 10px 30px rgba(201, 124, 100, 0.08);
}

.hcomz-login-header {
	text-align: center;
	margin-bottom: 28px;
}

.hcomz-login-brand {
	display: inline-block;
	text-decoration: none;
	margin-bottom: 16px;
}

.hcomz-login-logo-img {
	height: 48px;
	width: auto;
	max-width: 180px;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

.hcomz-login-header h2 {
	margin: 0 0 8px 0;
	font-size: 22px;
	font-weight: 800;
	color: var(--hcomz-dark);
}

.hcomz-login-header p {
	margin: 0;
	font-size: 13.5px;
	color: var(--hcomz-muted);
	line-height: 1.4;
}

.hcomz-alert {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 13px;
	margin-bottom: 20px;
	line-height: 1.4;
}

.hcomz-alert-error {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.hcomz-alert-success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.hcomz-input {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--hcomz-border);
	background: #ffffff;
	border-radius: 8px;
	font-size: 14px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	font-family: inherit;
}

.hcomz-input:focus {
	outline: none;
	border-color: var(--hcomz-dark);
	box-shadow: 0 0 0 3px var(--hcomz-primary-light);
	background: var(--hcomz-bg);
}

.hcomz-link-forgot {
	font-size: 12.5px;
	color: var(--hcomz-dark);
	text-decoration: none;
	font-weight: 600;
}

.hcomz-link-forgot:hover {
	text-decoration: underline;
}

.hcomz-login-remember {
	margin: 16px 0 24px 0;
	font-size: 13px;
	color: var(--hcomz-text);
}

.hcomz-login-remember label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.hcomz-btn-submit {
	width: 100%;
	background: var(--hcomz-primary);
	color: #ffffff;
	border: none;
	padding: 13px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease;
	min-height: 48px;
}

.hcomz-btn-submit:hover {
	background: var(--hcomz-primary-hover);
}

.hcomz-login-footer {
	text-align: center;
	margin-top: 24px;
	padding-top: 18px;
	border-top: 1px solid var(--hcomz-border);
}

.hcomz-login-footer a {
	color: var(--hcomz-muted);
	font-size: 13px;
	text-decoration: none;
	transition: color 0.2s ease;
}

.hcomz-login-footer a:hover {
	color: var(--hcomz-dark);
}

/* 13. FOOTER */
.hcomz-footer {
	background: var(--hcomz-card);
	border-top: 1px solid var(--hcomz-border);
	padding: 20px 24px;
	margin-top: auto;
}

.hcomz-footer-container {
	max-width: 1180px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12.5px;
	color: var(--hcomz-muted);
	gap: 16px;
}

.hcomz-footer-links {
	display: flex;
	gap: 20px;
	align-items: center;
	flex-wrap: wrap;
}

.hcomz-footer-links a {
	color: var(--hcomz-muted);
	text-decoration: none;
	transition: color 0.2s ease;
}

.hcomz-footer-links a:hover {
	color: var(--hcomz-dark);
}


/* 14. COMPOSANTS PROGRESSIVE WEB APP (PWA) — RÉSERVÉS EXCLUSIVEMENT AU MOBILE & TABLETTE */

/* Masqué par défaut sur ordinateur de bureau (Desktop) */
.hcomz-pwa-banner {
	display: none !important;
}

/* Bannière flottante d'installation PWA */
.hcomz-pwa-banner {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%);
	width: calc(100% - 32px);
	max-width: 480px;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1.5px solid var(--hcomz-primary);
	border-radius: 14px;
	padding: 12px 16px;
	box-shadow: var(--hcomz-shadow-lg);
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	z-index: 99998;
	animation: hcomzSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hcomzSlideUp {
	from { opacity: 0; transform: translate(-50%, 20px); }
	to { opacity: 1; transform: translate(-50%, 0); }
}

.hcomz-pwa-banner-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.hcomz-pwa-banner-icon {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	object-fit: cover;
	flex-shrink: 0;
	box-shadow: 0 2px 8px rgba(201, 124, 100, 0.2);
}

.hcomz-pwa-banner-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.hcomz-pwa-banner-info strong {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--hcomz-dark);
}

.hcomz-pwa-banner-info span {
	font-size: 11.5px;
	color: var(--hcomz-muted);
	line-height: 1.2;
}

.hcomz-pwa-banner-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.hcomz-pwa-banner-close {
	background: none;
	border: none;
	color: var(--hcomz-muted);
	font-size: 20px;
	cursor: pointer;
	padding: 4px;
	line-height: 1;
	border-radius: 4px;
	transition: color 0.2s ease;
}

.hcomz-pwa-banner-close:hover {
	color: var(--hcomz-dark);
}

/* Modale explicative iOS Safari */
.hcomz-pwa-ios-dialog {
	max-width: 460px;
}

.hcomz-pwa-ios-steps {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 10px;
}

.hcomz-pwa-ios-step {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: var(--hcomz-bg);
	padding: 12px 14px;
	border-radius: 10px;
	border: 1px solid var(--hcomz-border);
}

.step-num {
	background: var(--hcomz-primary);
	color: #ffffff;
	font-weight: 800;
	font-size: 13px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-top: 2px;
}

.step-desc {
	font-size: 13px;
	line-height: 1.4;
	color: var(--hcomz-text);
}

.ios-share-badge {
	display: inline-block;
	background: #ffffff;
	border: 1px solid var(--hcomz-border);
	padding: 1px 6px;
	border-radius: 4px;
	font-weight: 700;
	color: #007aff;
	font-size: 14px;
}


/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (TABLETTE & MOBILE DANS LES RÈGLES DE L'ART)
   ========================================================================== */

/* --------------------------------------------------------------------------
   A. TABLETTE (max-width: 992px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 992px) {
	.hcomz-navbar {
		padding: 14px 20px;
	}

	.hcomz-main-container {
		padding: 0 16px;
		margin: 20px auto;
	}

	.hcomz-welcome-banner {
		flex-direction: column;
		align-items: flex-start;
		padding: 20px;
	}

	.hcomz-quota-card {
		width: 100%;
		box-sizing: border-box;
		text-align: left;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 12px 18px;
	}

	.quota-sub {
		display: inline;
		margin-left: 8px;
	}

	.hcomz-kpi-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}

	.hcomz-chart-box {
		height: 270px;
	}

	.hcomz-reports-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
}


/* --------------------------------------------------------------------------
   B. MOBILE LARGE & SMARTPHONES (max-width: 768px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
	.hcomz-navbar-container {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: center;
	}

	.hcomz-brand-logo {
		height: 32px;
	}

	.hcomz-logo {
		font-size: 20px;
	}

	.hcomz-tag {
		font-size: 10px;
		padding: 3px 6px;
	}

	.hcomz-user-block {
		gap: 10px;
	}

	.hcomz-user-email {
		display: none;
	}

	.hcomz-user-name {
		font-size: 12.5px;
	}

	.hcomz-btn-logout {
		padding: 5px 10px;
		font-size: 12px;
		min-height: 32px;
	}

	.hcomz-site-selector-bar {
		width: 100%;
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.hcomz-site-select {
		width: 100%;
		min-width: unset;
		font-size: 16px; /* Empêche le zoom auto sur iOS */
	}

	/* Masque la barre d'onglets classique sur mobile au profit du sélecteur déroulant */
	.hcomz-tab-nav {
		display: none !important;
	}

	.hcomz-tab-mobile-wrapper {
		display: block;
		margin-bottom: 20px;
	}

	.hcomz-tab-mobile-label {
		display: block;
		font-size: 13px;
		font-weight: 700;
		color: var(--hcomz-dark);
		margin-bottom: 6px;
	}

	.hcomz-tab-select-box {
		position: relative;
		width: 100%;
	}

	.hcomz-tab-mobile-select {
		width: 100%;
		padding: 12px 16px;
		background-color: #ffffff;
		border: 2px solid var(--hcomz-primary);
		border-radius: 10px;
		font-size: 16px !important; /* Empêche le zoom intrusif iOS Safari */
		font-weight: 700;
		color: var(--hcomz-dark);
		box-shadow: var(--hcomz-shadow-sm);
		outline: none;
		cursor: pointer;
		transition: all 0.2s ease;
		appearance: auto;
		-webkit-appearance: auto;
	}

	.hcomz-tab-mobile-select:focus {
		border-color: var(--hcomz-primary-hover);
		box-shadow: 0 0 0 3px var(--hcomz-primary-light);
	}

	.hcomz-box {
		padding: 18px 16px;
		border-radius: 10px;
	}

	.hcomz-box-header {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.hcomz-box-header .hcomz-btn-primary {
		width: 100%;
		text-align: center;
		justify-content: center;
	}

	.hcomz-reports-grid {
		grid-template-columns: 1fr;
	}

	.hcomz-footer-container {
		flex-direction: column;
		text-align: center;
		gap: 12px;
	}

	.hcomz-footer-links {
		justify-content: center;
	}

	/* Modale adaptée mobile */
	.hcomz-modal-overlay {
		padding: 12px;
	}

	.hcomz-modal-dialog {
		padding: 20px 16px;
		border-radius: 12px;
	}

	.hcomz-form-actions button {
		width: 100%;
	}

	/* Prévention du zoom sur les inputs iOS (font-size >= 16px) */
	.hcomz-field input,
	.hcomz-field select,
	.hcomz-field textarea,
	.hcomz-input {
		font-size: 16px !important;
	}

	/* Affichage de la bannière d'installation PWA UNIQUEMENT en bas d'écran sur mobile */
	.hcomz-pwa-banner.hcomz-pwa-visible {
		display: flex !important;
	}
}


/* --------------------------------------------------------------------------
   C. TRANSFORMATION DES TABLEAUX EN CARTES MOBILES (max-width: 640px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 640px) {
	.hcomz-table-responsive {
		overflow-x: visible;
	}

	.hcomz-table {
		min-width: unset;
		display: block;
	}

	.hcomz-table thead {
		display: none;
	}

	.hcomz-table tbody {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	.hcomz-table tbody tr {
		display: block;
		background: #ffffff;
		border: 1px solid var(--hcomz-border);
		border-radius: 10px;
		padding: 14px 16px;
		box-shadow: var(--hcomz-shadow-sm);
	}

	.hcomz-table tbody tr:hover {
		background-color: #ffffff;
	}

	.hcomz-table td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 8px 0;
		border-bottom: 1px solid #f7f1ed;
		font-size: 13px;
		text-align: right;
	}

	.hcomz-table td:last-child {
		border-bottom: none;
		padding-top: 10px;
	}

	.hcomz-table td::before {
		content: attr(data-label);
		font-weight: 700;
		color: var(--hcomz-muted);
		font-size: 11.5px;
		text-transform: uppercase;
		letter-spacing: 0.5px;
		text-align: left;
		margin-right: 12px;
		flex-shrink: 0;
	}

	.hcomz-table td[data-label="Action"] {
		justify-content: stretch;
	}

	.hcomz-table td[data-label="Action"]::before {
		display: none;
	}

	.hcomz-table td[data-label="Action"] .btn-send-invoice-mail {
		width: 100%;
		justify-content: center;
		margin-top: 4px;
	}

	/* Ajustement KPI sur mobile compact */
	.hcomz-kpi-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.hcomz-kpi-card {
		padding: 14px 12px;
	}

	.kpi-label {
		font-size: 10.5px;
		margin-bottom: 4px;
	}

	.kpi-value {
		font-size: 20px;
	}

	.hcomz-chart-box {
		height: 220px;
	}

	.hcomz-login-card {
		padding: 28px 20px;
		border-radius: 14px;
	}
}


/* --------------------------------------------------------------------------
   D. ULTRA COMPACT MOBILE (max-width: 420px)
   -------------------------------------------------------------------------- */
@media screen and (max-width: 420px) {
	.hcomz-navbar {
		padding: 10px 12px;
	}

	.hcomz-brand {
		gap: 8px;
	}

	.hcomz-logo {
		font-size: 18px;
	}

	.hcomz-welcome-banner h2 {
		font-size: 20px;
	}

	.hcomz-welcome-banner p {
		font-size: 13px;
	}

	.hcomz-quota-card {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.quota-sub {
		display: block;
		margin-left: 0;
	}

	.hcomz-kpi-grid {
		grid-template-columns: 1fr;
	}

	.hcomz-report-metrics {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   15. SKELETON LOADERS (ANIMATIONS DE CHARGEMENT ÉLÉGANTES)
   ========================================================================== */
.hcomz-skeleton-bar {
	display: block;
	height: 16px;
	width: 100%;
	background: linear-gradient(90deg, #f2e9e4 25%, #fbf1ee 50%, #f2e9e4 75%);
	background-size: 200% 100%;
	animation: hcomzShimmer 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
	border-radius: 6px;
}

.hcomz-skeleton-row td {
	padding: 16px 16px !important;
	border-bottom: 1px solid var(--hcomz-border-subtle) !important;
}

.hcomz-skeleton-card {
	opacity: 0.75;
	border-style: dashed !important;
	border-color: var(--hcomz-border) !important;
}

@keyframes hcomzShimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}
/* Petroleum button variants. */
.hcomz-btn-primary,
.hcomz-btn-submit {
 background: var(--hcomz-dark);
 border: 1px solid var(--hcomz-dark);
 border-radius: 999px;
 color: #FFFFFF !important;
 font-size: 19px;
 font-weight: 700;
 white-space: normal;
 transition: background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.hcomz-btn-primary:hover,
.hcomz-btn-submit:hover {
 background: var(--hcomz-dark-hover);
 border-color: var(--hcomz-dark-hover);
 transform: translateY(-2px);
 box-shadow: var(--hcomz-shadow-sm);
}
.hcomz-btn-primary.hcomz-btn-sm,
.hcomz-report-card .hcomz-btn-primary {
 background: var(--hcomz-dark);
 border-color: var(--hcomz-dark);
 color: var(--hcomz-on-dark) !important;
 font-size: 13px;
}
.hcomz-btn-primary.hcomz-btn-sm:hover,
.hcomz-report-card .hcomz-btn-primary:hover {
 background: var(--hcomz-dark-hover);
 border-color: var(--hcomz-dark-hover);
 color: #FFFFFF !important;
}
.hcomz-btn-logout,
.hcomz-btn-pwa-header {
 background: var(--hcomz-dark);
 border-color: var(--hcomz-dark);
 border-radius: 999px;
 color: #FFFFFF;
}
.hcomz-btn-logout:hover,
.hcomz-btn-pwa-header:hover {
 background: var(--hcomz-dark-hover);
 border-color: var(--hcomz-dark-hover);
 color: #FFFFFF;
}
.hcomz-link-forgot {
 display: inline-block;
 transition: transform .2s ease;
 text-decoration: underline;
 text-underline-offset: .2em;
}
.hcomz-link-forgot:hover {
 color: var(--hcomz-dark);
 transform: translateX(2px);
}
.step-num {
 background: var(--hcomz-accent);
 color: var(--hcomz-dark);
}
.hcomz-portal-wrapper :is(a, button, input, select, textarea):focus-visible,
.hcomz-login-page-wrapper :is(a, button, input, select, textarea):focus-visible {
 outline: 2px solid var(--hcomz-dark);
 outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
 .hcomz-portal-wrapper *,
 .hcomz-login-page-wrapper * {
  animation: none !important;
  transition: none !important;
 }
 .hcomz-btn-primary:hover,
 .hcomz-btn-primary:active,
 .hcomz-btn-submit:hover,
 .hcomz-kpi-card:hover,
 .hcomz-report-card:hover,
 .hcomz-link-forgot:hover {
  transform: none;
 }
}
