/* TismailB2B — style.css */
/* DA inspiré LCF : Bleu marine / Blanc / Rouge — Made in France */

@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700&family=Barlow:wght@300;400;500;600&display=swap");

:root {
	--primary: #003087; /* Bleu marine LCF */
	--primary-dark: #001f5c;
	--primary-light: #0040a8;
	--red: #e30613; /* Rouge vif Made in France */
	--red-hover: #c00410;

	--white: #ffffff;
	--bg: #f5f6f8;
	--bg-card: #ffffff;
	--bg-hover: #f0f2f7;

	--border: #dde2ed;
	--border-strong: #c8cfdf;

	--text-primary: #0d1a36;
	--text-secondary: #4a5578;
	--text-muted: #8892aa;

	--success: #0a7c42;
	--warning: #d97706;
	--danger: #e30613;

	--radius: 3px;
	--radius-lg: 6px;

	--shadow-sm: 0 1px 4px rgba(0, 48, 135, 0.08);
	--shadow-md: 0 4px 16px rgba(0, 48, 135, 0.12);
	--shadow-lg: 0 8px 32px rgba(0, 48, 135, 0.18);

	--font-display: "Barlow Condensed", sans-serif;
	--font-body: "Barlow", sans-serif;
}

/* ─── RESET ─── */
*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: var(--font-body);
	background: var(--bg);
	color: var(--text-primary);
	line-height: 1.6;
	font-size: 15px;
	-webkit-font-smoothing: antialiased;
}

/* ─── NAVBAR ─── */
.navbar {
	background: var(--primary);
	padding: 0 2.5rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 58px;
	border-bottom: 3px solid var(--red);
	position: sticky;
	top: 0;
	z-index: 100;
}

.navbar-brand a {
	color: white;
	text-decoration: none;
	font-family: var(--font-display);
	font-size: 1.4rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.navbar-links {
	display: flex;
	align-items: center;
	gap: 0.2rem;
}

.navbar-links a {
	color: rgba(255, 255, 255, 0.72);
	text-decoration: none;
	font-family: var(--font-display);
	font-size: 0.88rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.4rem 0.9rem;
	border-radius: var(--radius);
	transition:
		color 0.15s,
		background 0.15s;
}

.navbar-links a:hover {
	color: white;
	background: rgba(255, 255, 255, 0.1);
}

.navbar-user {
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.8rem;
	padding: 0 0.75rem;
	border-left: 1px solid rgba(255, 255, 255, 0.2);
	margin-left: 0.5rem;
}

.btn-logout {
	background: var(--red) !important;
	color: white !important;
	padding: 0.35rem 1rem;
	border-radius: var(--radius);
	font-family: var(--font-display);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transition: background 0.15s;
	margin-left: 0.5rem;
}

.btn-logout:hover {
	background: var(--red-hover) !important;
}

/* ─── CONTAINER ─── */
.container {
	max-width: 1160px;
	margin: 0 auto;
	padding: 2.5rem 2rem;
}

.container h2 {
	font-family: var(--font-display);
	font-size: 2rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--primary);
	margin-bottom: 2rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.container h2::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 1.8rem;
	background: var(--red);
	border-radius: 2px;
	flex-shrink: 0;
}

.container h3 {
	font-family: var(--font-display);
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--primary);
	margin-bottom: 1.25rem;
}

/* ─── LOGIN ─── */
.login-page {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	background: var(--primary);
	position: relative;
	overflow: hidden;
}

.login-page::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		45deg,
		transparent,
		transparent 40px,
		rgba(255, 255, 255, 0.02) 40px,
		rgba(255, 255, 255, 0.02) 80px
	);
}

.login-container {
	background: var(--white);
	padding: 3rem;
	border-radius: var(--radius-lg);
	width: 100%;
	max-width: 420px;
	box-shadow: var(--shadow-lg);
	border-top: 4px solid var(--red);
	position: relative;
	z-index: 1;
}

.login-container h1 {
	font-family: var(--font-display);
	text-align: center;
	font-size: 1.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--primary);
	margin-bottom: 0.25rem;
}

.login-subtitle {
	text-align: center;
	color: var(--text-muted);
	margin-bottom: 2rem;
	font-size: 0.82rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.login-demo {
	margin-top: 1.5rem;
	padding: 1rem 1.25rem;
	background: var(--bg);
	border-radius: var(--radius);
	border-left: 3px solid var(--primary);
	font-size: 0.8rem;
	color: var(--text-secondary);
	line-height: 1.9;
}

/* ─── FORMS ─── */
.form-group {
	margin-bottom: 1.25rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.4rem;
	font-weight: 600;
	font-size: 0.78rem;
	color: var(--text-secondary);
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
	width: 100%;
	padding: 0.7rem 1rem;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	font-size: 0.92rem;
	font-family: var(--font-body);
	background: var(--white);
	color: var(--text-primary);
	transition:
		border-color 0.2s,
		box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.1);
}

/* ─── BUTTONS ─── */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.6rem 1.4rem;
	border: none;
	border-radius: var(--radius);
	font-family: var(--font-display);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	text-decoration: none;
	transition:
		background 0.15s,
		transform 0.1s;
}

.btn:active {
	transform: translateY(1px);
}

.btn-primary {
	background: var(--primary);
	color: white;
}
.btn-primary:hover {
	background: var(--primary-dark);
}

.btn-danger {
	background: var(--red);
	color: white;
}
.btn-danger:hover {
	background: var(--red-hover);
}

.btn-outline {
	background: transparent;
	color: var(--primary);
	border: 2px solid var(--primary);
}
.btn-outline:hover {
	background: var(--bg-hover);
}

.btn-sm {
	padding: 0.3rem 0.75rem;
	font-size: 0.72rem;
}

/* ─── ALERTS ─── */
.alert {
	padding: 0.9rem 1.1rem;
	border-radius: var(--radius);
	margin-bottom: 1.5rem;
	font-size: 0.88rem;
}

.alert-error {
	background: #fff0f0;
	color: var(--red);
	border: 1px solid #ffb3b3;
	border-left: 3px solid var(--red);
}

.alert-success {
	background: #f0fff6;
	color: var(--success);
	border: 1px solid #a3dbb8;
	border-left: 3px solid var(--success);
}

/* ─── STATS GRID ─── */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1.25rem;
	margin-bottom: 2.5rem;
}

.stat-card {
	background: var(--bg-card);
	padding: 1.75rem 1.5rem;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border);
	border-left: 4px solid var(--primary);
	transition:
		box-shadow 0.2s,
		transform 0.2s;
}

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

.stat-number {
	display: block;
	font-family: var(--font-display);
	font-size: 2.8rem;
	font-weight: 700;
	color: var(--primary);
	line-height: 1;
	margin-bottom: 0.4rem;
}

.stat-label {
	display: block;
	font-family: var(--font-display);
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--text-muted);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* ─── CARDS ─── */
.card {
	background: var(--bg-card);
	padding: 1.75rem;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border);
	margin-bottom: 1.5rem;
}

/* ─── TABLES ─── */
.table {
	width: 100%;
	border-collapse: collapse;
	background: var(--bg-card);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	border: 1px solid var(--border);
	margin-bottom: 1.5rem;
}

.table th,
.table td {
	padding: 0.85rem 1.1rem;
	text-align: left;
	border-bottom: 1px solid var(--border);
}

.table th {
	background: var(--primary);
	color: rgba(255, 255, 255, 0.85);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

.table td {
	font-size: 0.88rem;
}
.table tr:last-child td {
	border-bottom: none;
}
.table tbody tr {
	transition: background 0.12s;
}
.table tbody tr:hover {
	background: var(--bg-hover);
}

/* ─── BADGES ─── */
.badge {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.65rem;
	border-radius: 2px;
	font-family: var(--font-display);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
}

.badge-pending,
.badge-en_attente {
	background: #fff3cd;
	color: #7a5000;
	border: 1px solid #ffd97a;
}

.badge-validee,
.badge-en_cours,
.badge-termine {
	background: #d4edda;
	color: #0a5c2a;
	border: 1px solid #8fd4a8;
}

.badge-expediee {
	background: #d0e8ff;
	color: #003087;
	border: 1px solid #80beff;
}

.badge-inactif,
.badge-rejete {
	background: #ffe0e0;
	color: #8c0000;
	border: 1px solid #ffaaaa;
}

/* ─── STATUS BAR ─── */
.status-bar {
	display: flex;
	margin-bottom: 2rem;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--border);
}

.status-step {
	flex: 1;
	text-align: center;
	padding: 0.75rem;
	background: var(--bg);
	color: var(--text-muted);
	font-family: var(--font-display);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	border-right: 1px solid var(--border);
}

.status-step:last-child {
	border-right: none;
}
.status-step.active {
	background: var(--primary);
	color: white;
}
.status-step.done {
	background: var(--success);
	color: white;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
	.navbar {
		padding: 0 1rem;
	}
	.navbar-links a {
		padding: 0.3rem 0.5rem;
		font-size: 0.75rem;
	}
	.container {
		padding: 1.5rem 1rem;
	}
	.stats-grid {
		grid-template-columns: 1fr 1fr;
	}
	.table th,
	.table td {
		padding: 0.6rem 0.7rem;
	}
}

@media (max-width: 480px) {
	.stats-grid {
		grid-template-columns: 1fr;
	}
}

.btn + .btn {
	margin-left: 0.75rem;
}

.container h3 {
	margin-top: 2rem;
}
