/* =========================================================
   BLUE PRESSING — Interface de gestion
   Palette bleu & blanc, responsive (mobile / tablette / PC)
   ========================================================= */

.bpm-app {
	--bpm-bleu: #0b57a4;
	--bpm-bleu-fonce: #073b73;
	--bpm-bleu-clair: #e8f1fb;
	--bpm-bleu-vif: #1a73e8;
	--bpm-blanc: #ffffff;
	--bpm-gris: #f4f7fb;
	--bpm-gris-bord: #dbe4ef;
	--bpm-texte: #16243a;
	--bpm-texte-doux: #5b6b81;
	--bpm-vert: #128a5c;
	--bpm-orange: #d97706;
	--bpm-rouge: #c0392b;
	--bpm-radius: 12px;
	--bpm-ombre: 0 2px 10px rgba(11, 87, 164, .08);

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--bpm-texte);
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}

.bpm-app *,
.bpm-app *::before,
.bpm-app *::after { box-sizing: border-box; }

.bpm-plein-ecran {
	width: 100%;
	max-width: 100% !important;
	margin: 0;
}

/* ---------- Chargement ---------- */
.bpm-chargement { text-align: center; padding: 60px 20px; color: var(--bpm-texte-doux); }
.bpm-spinner {
	width: 42px; height: 42px; margin: 0 auto 16px;
	border: 4px solid var(--bpm-bleu-clair);
	border-top-color: var(--bpm-bleu);
	border-radius: 50%;
	animation: bpm-tourne .8s linear infinite;
}
@keyframes bpm-tourne { to { transform: rotate(360deg); } }

/* ---------- Connexion ---------- */
.bpm-login {
	min-height: 70vh;
	display: flex; align-items: center; justify-content: center;
	background: linear-gradient(160deg, var(--bpm-bleu) 0%, var(--bpm-bleu-fonce) 100%);
	border-radius: var(--bpm-radius);
	padding: 40px 16px;
}
.bpm-login-carte {
	background: #fff; border-radius: 16px; padding: 32px 28px;
	width: 100%; max-width: 400px; box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
}
.bpm-login-logo { text-align: center; margin-bottom: 22px; }
.bpm-login-logo h1 { font-size: 24px; margin: 0; color: var(--bpm-bleu); letter-spacing: 1px; font-weight: 800; }
.bpm-login-logo p { margin: 4px 0 0; color: var(--bpm-texte-doux); font-size: 13px; }
.bpm-login-logo img { max-height: 64px; margin-bottom: 10px; }

/* ---------- Structure ---------- */
.bpm-shell { display: flex; min-height: 640px; background: var(--bpm-gris); border-radius: var(--bpm-radius); overflow: hidden; }

.bpm-sidebar {
	width: 232px; flex: 0 0 232px;
	background: linear-gradient(180deg, var(--bpm-bleu) 0%, var(--bpm-bleu-fonce) 100%);
	color: #fff; display: flex; flex-direction: column;
}
.bpm-sidebar-entete { padding: 18px 16px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.bpm-sidebar-entete strong { display: block; font-size: 17px; letter-spacing: .6px; }
.bpm-sidebar-entete span { font-size: 11px; opacity: .8; }
.bpm-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.bpm-nav button {
	display: flex; align-items: center; gap: 10px;
	width: 100%; text-align: left; background: transparent; border: 0;
	color: rgba(255, 255, 255, .88); padding: 10px 12px; border-radius: 9px;
	font-size: 14px; cursor: pointer; margin-bottom: 2px; font-family: inherit;
}
.bpm-nav button:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.bpm-nav button.actif { background: #fff; color: var(--bpm-bleu); font-weight: 600; }
.bpm-nav .bpm-ico { width: 18px; text-align: center; font-size: 15px; }
.bpm-nav .bpm-badge { margin-left: auto; background: var(--bpm-orange); color: #fff; border-radius: 20px; font-size: 11px; padding: 1px 7px; }
.bpm-sidebar-pied { padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: 12px; opacity: .85; }

.bpm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bpm-topbar {
	background: #fff; border-bottom: 1px solid var(--bpm-gris-bord);
	padding: 12px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.bpm-topbar h2 { margin: 0; font-size: 18px; color: var(--bpm-bleu-fonce); font-weight: 700; }
.bpm-topbar .bpm-espace { flex: 1; }
.bpm-burger { display: none; background: var(--bpm-bleu); color: #fff; border: 0; border-radius: 8px; width: 38px; height: 38px; font-size: 18px; cursor: pointer; }
.bpm-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--bpm-texte-doux); }
.bpm-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bpm-bleu-clair); color: var(--bpm-bleu); display: flex; align-items: center; justify-content: center; font-weight: 700; }

.bpm-contenu { padding: 18px; flex: 1; overflow-x: hidden; }

/* ---------- Cartes statistiques ---------- */
.bpm-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.bpm-carte {
	background: #fff; border: 1px solid var(--bpm-gris-bord); border-radius: var(--bpm-radius);
	padding: 14px 16px; box-shadow: var(--bpm-ombre); position: relative; overflow: hidden;
}
.bpm-carte::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--bpm-bleu); }
.bpm-carte.vert::before { background: var(--bpm-vert); }
.bpm-carte.orange::before { background: var(--bpm-orange); }
.bpm-carte.rouge::before { background: var(--bpm-rouge); }
.bpm-carte .bpm-carte-titre { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--bpm-texte-doux); margin-bottom: 4px; }
.bpm-carte .bpm-carte-valeur { font-size: 24px; font-weight: 800; color: var(--bpm-bleu-fonce); line-height: 1.2; }
.bpm-carte .bpm-carte-sous { font-size: 12px; color: var(--bpm-texte-doux); margin-top: 2px; }

/* ---------- Panneaux ---------- */
.bpm-panneau { background: #fff; border: 1px solid var(--bpm-gris-bord); border-radius: var(--bpm-radius); box-shadow: var(--bpm-ombre); margin-bottom: 18px; }
.bpm-panneau-entete { padding: 12px 16px; border-bottom: 1px solid var(--bpm-gris-bord); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bpm-panneau-entete h3 { margin: 0; font-size: 15px; color: var(--bpm-bleu-fonce); font-weight: 700; }
.bpm-panneau-corps { padding: 16px; }
.bpm-panneau-corps.sans-padding { padding: 0; }

/* ---------- Tableaux ---------- */
.bpm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bpm-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.bpm-table th { background: var(--bpm-bleu-clair); color: var(--bpm-bleu-fonce); text-align: left; padding: 10px 12px; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.bpm-table td { padding: 10px 12px; border-bottom: 1px solid var(--bpm-gris-bord); vertical-align: middle; }
.bpm-table tbody tr:hover { background: #f9fbfe; }
.bpm-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bpm-vide { text-align: center; padding: 32px 16px; color: var(--bpm-texte-doux); }

/* ---------- Badges ---------- */
.bpm-badge-statut { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.st-recu { background: #e8f1fb; color: #0b57a4; }
.st-en_lavage { background: #e0f2fe; color: #0369a1; }
.st-en_repassage { background: #fef3c7; color: #92400e; }
.st-controle { background: #ede9fe; color: #5b21b6; }
.st-pret { background: #dcfce7; color: #128a5c; }
.st-livre { background: #e2e8f0; color: #334155; }
.st-annule { background: #fee2e2; color: #c0392b; }
.bpm-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; background: var(--bpm-bleu-clair); color: var(--bpm-bleu); }
.bpm-tag.express { background: #fff1e0; color: var(--bpm-orange); }
.bpm-tag.retard { background: #fee2e2; color: var(--bpm-rouge); }

/* ---------- Formulaires ---------- */
.bpm-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.bpm-champ { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.bpm-champ label { font-size: 12px; font-weight: 600; color: var(--bpm-texte-doux); text-transform: uppercase; letter-spacing: .3px; }
.bpm-app input[type="text"],
.bpm-app input[type="tel"],
.bpm-app input[type="number"],
.bpm-app input[type="password"],
.bpm-app input[type="email"],
.bpm-app input[type="date"],
.bpm-app input[type="datetime-local"],
.bpm-app input[type="file"],
.bpm-app select,
.bpm-app textarea {
	width: 100%; padding: 9px 11px; border: 1px solid var(--bpm-gris-bord);
	border-radius: 9px; font-size: 14px; font-family: inherit; background: #fff; color: var(--bpm-texte);
}
.bpm-app input:focus, .bpm-app select:focus, .bpm-app textarea:focus {
	outline: none; border-color: var(--bpm-bleu-vif); box-shadow: 0 0 0 3px rgba(26, 115, 232, .14);
}
.bpm-app textarea { min-height: 74px; resize: vertical; }
.bpm-aide { font-size: 12px; color: var(--bpm-texte-doux); }

/* ---------- Boutons ---------- */
.bpm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	padding: 9px 15px; border-radius: 9px; border: 1px solid transparent;
	background: var(--bpm-bleu); color: #fff; font-size: 14px; font-weight: 600;
	cursor: pointer; font-family: inherit; text-decoration: none; line-height: 1.2;
}
.bpm-btn:hover { background: var(--bpm-bleu-fonce); color: #fff; }
.bpm-btn:disabled { opacity: .55; cursor: not-allowed; }
.bpm-btn.secondaire { background: #fff; color: var(--bpm-bleu); border-color: var(--bpm-gris-bord); }
.bpm-btn.secondaire:hover { background: var(--bpm-bleu-clair); }
.bpm-btn.vert { background: var(--bpm-vert); }
.bpm-btn.rouge { background: var(--bpm-rouge); }
.bpm-btn.orange { background: var(--bpm-orange); }
.bpm-btn.bloc { width: 100%; }
.bpm-btn.petit { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.bpm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Recherche ---------- */
.bpm-recherche { position: relative; flex: 1; min-width: 180px; max-width: 380px; }
.bpm-recherche input { padding-left: 34px !important; }
.bpm-recherche::before { content: "\1F50D"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .6; }

/* ---------- Modale ---------- */
.bpm-modale-fond {
	position: fixed; inset: 0; background: rgba(9, 30, 55, .55);
	display: flex; align-items: flex-start; justify-content: center;
	padding: 24px 12px; z-index: 99999; overflow-y: auto;
}
.bpm-modale { background: #fff; border-radius: 14px; width: 100%; max-width: 720px; box-shadow: 0 22px 60px rgba(0, 0, 0, .3); }
.bpm-modale.large { max-width: 960px; }
.bpm-modale.petite { max-width: 460px; }
.bpm-modale-entete { padding: 14px 18px; border-bottom: 1px solid var(--bpm-gris-bord); display: flex; align-items: center; }
.bpm-modale-entete h3 { margin: 0; font-size: 16px; color: var(--bpm-bleu-fonce); flex: 1; }
.bpm-fermer { background: transparent; border: 0; font-size: 22px; cursor: pointer; color: var(--bpm-texte-doux); line-height: 1; padding: 0 4px; }
.bpm-modale-corps { padding: 18px; max-height: 70vh; overflow-y: auto; }
.bpm-modale-pied { padding: 12px 18px; border-top: 1px solid var(--bpm-gris-bord); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Alertes ---------- */
.bpm-alerte { padding: 10px 14px; border-radius: 9px; margin-bottom: 12px; font-size: 14px; }
.bpm-alerte.erreur { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }
.bpm-alerte.succes { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.bpm-alerte.info { background: var(--bpm-bleu-clair); color: var(--bpm-bleu-fonce); border: 1px solid #bfdbfe; }

.bpm-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100000; display: flex; flex-direction: column; gap: 8px; }
.bpm-toast { background: var(--bpm-bleu-fonce); color: #fff; padding: 11px 16px; border-radius: 9px; box-shadow: 0 8px 24px rgba(0, 0, 0, .28); font-size: 14px; max-width: 330px; }
.bpm-toast.erreur { background: var(--bpm-rouge); }
.bpm-toast.succes { background: var(--bpm-vert); }

/* ---------- Panier de dépôt ---------- */
.bpm-articles-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.bpm-article-btn {
	background: #fff; border: 1px solid var(--bpm-gris-bord); border-radius: 10px;
	padding: 10px 8px; cursor: pointer; text-align: center; font-family: inherit; font-size: 13px;
}
.bpm-article-btn:hover { border-color: var(--bpm-bleu-vif); background: var(--bpm-bleu-clair); }
.bpm-article-btn strong { display: block; color: var(--bpm-texte); font-size: 13px; margin-bottom: 2px; }
.bpm-article-btn span { color: var(--bpm-bleu); font-weight: 700; font-size: 12px; }

.bpm-recap { background: var(--bpm-bleu-clair); border-radius: 10px; padding: 14px; }
.bpm-recap-ligne { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.bpm-recap-ligne.total { border-top: 1px dashed var(--bpm-bleu); margin-top: 6px; padding-top: 8px; font-weight: 800; font-size: 17px; color: var(--bpm-bleu-fonce); }
.bpm-qte { display: flex; align-items: center; gap: 4px; }
.bpm-qte button { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--bpm-gris-bord); background: #fff; cursor: pointer; font-weight: 700; color: var(--bpm-bleu); }
.bpm-qte input { width: 48px; text-align: center; padding: 4px !important; }

/* ---------- Suivi (colonnes) ---------- */
.bpm-kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.bpm-colonne { background: #fff; border: 1px solid var(--bpm-gris-bord); border-radius: var(--bpm-radius); overflow: hidden; }
.bpm-colonne-entete { padding: 10px 12px; background: var(--bpm-bleu-clair); font-weight: 700; font-size: 13px; color: var(--bpm-bleu-fonce); display: flex; justify-content: space-between; }
.bpm-colonne-corps { padding: 8px; max-height: 460px; overflow-y: auto; }
.bpm-mini-carte { border: 1px solid var(--bpm-gris-bord); border-radius: 9px; padding: 9px 10px; margin-bottom: 7px; cursor: pointer; font-size: 13px; background: #fff; }
.bpm-mini-carte:hover { border-color: var(--bpm-bleu-vif); }
.bpm-mini-carte strong { color: var(--bpm-bleu-fonce); display: block; }
.bpm-mini-carte small { color: var(--bpm-texte-doux); }

/* ---------- Graphique simple ---------- */
.bpm-graph { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; }
.bpm-graph-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bpm-graph-barre { width: 100%; max-width: 44px; background: linear-gradient(180deg, var(--bpm-bleu-vif), var(--bpm-bleu)); border-radius: 6px 6px 0 0; min-height: 3px; }
.bpm-graph-label { font-size: 10px; color: var(--bpm-texte-doux); white-space: nowrap; }
.bpm-graph-valeur { font-size: 10px; font-weight: 700; color: var(--bpm-bleu-fonce); }

/* ---------- Onglets ---------- */
.bpm-onglets { display: flex; gap: 4px; border-bottom: 1px solid var(--bpm-gris-bord); margin-bottom: 14px; overflow-x: auto; }
.bpm-onglets button { background: transparent; border: 0; border-bottom: 3px solid transparent; padding: 9px 14px; cursor: pointer; font-size: 14px; color: var(--bpm-texte-doux); font-family: inherit; white-space: nowrap; }
.bpm-onglets button.actif { color: var(--bpm-bleu); border-bottom-color: var(--bpm-bleu); font-weight: 700; }

/* ---------- Reçu ---------- */
.bpm-recu { font-family: "Courier New", monospace; background: #fff; color: #000; padding: 14px; max-width: 340px; margin: 0 auto; font-size: 12px; }
.bpm-recu h2 { text-align: center; margin: 0 0 2px; font-size: 17px; letter-spacing: 1px; }
.bpm-recu .centre { text-align: center; }
.bpm-recu hr { border: 0; border-top: 1px dashed #000; margin: 7px 0; }
.bpm-recu table { width: 100%; border-collapse: collapse; font-size: 11px; }
.bpm-recu table td { padding: 2px 0; vertical-align: top; }
.bpm-recu .droite { text-align: right; }
.bpm-recu .gros { font-size: 14px; font-weight: bold; }
.bpm-qr { text-align: center; margin: 8px 0; }
.bpm-qr img { max-width: 110px; }

@media print {
	body * { visibility: hidden !important; }
	#bpm-zone-impression, #bpm-zone-impression * { visibility: visible !important; }
	#bpm-zone-impression { position: absolute; left: 0; top: 0; width: 100%; }
	.bpm-no-print { display: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.bpm-sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 99998; transform: translateX(-100%); transition: transform .25s ease; }
	.bpm-sidebar.ouvert { transform: translateX(0); }
	.bpm-burger { display: inline-flex; align-items: center; justify-content: center; }
	.bpm-shell { display: block; }
	.bpm-voile { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 99997; }
}

@media (max-width: 620px) {
	.bpm-app { font-size: 14px; }
	.bpm-contenu { padding: 12px; }
	.bpm-cartes { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
	.bpm-carte .bpm-carte-valeur { font-size: 20px; }
	.bpm-topbar { padding: 10px 12px; }
	.bpm-topbar h2 { font-size: 16px; }
	.bpm-modale-corps { max-height: 76vh; }
	.bpm-btn { padding: 8px 12px; font-size: 13px; }
}
