/* Styles généraux */
:root {
	--bg: #0b1020;
	--panel: #11182d;
	--muted: #8892a6;
	--text: #e8eefc;
	--brand: #4f8cff;
	--brand-700: #346fe0;
	--border: #22304f;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
	margin: 0;
	font-family: Inter, system-ui, Arial, sans-serif;
	background: linear-gradient(180deg, #0b1020 0%, #0b1424 100%);
	color: var(--text);
}
.app-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--border);
	background: rgba(0,0,0,.25);
	position: sticky;
	top: 0;
	backdrop-filter: blur(6px);
	z-index: 5;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 48px; width: auto; border-radius: 8px; background: #0d6efd1a; }
.brand-text h1 { margin: 0; font-size: 20px; }
.brand-text p { margin: 0; font-size: 12px; color: var(--muted); }
.header-actions { display: flex; gap: 8px; }

.app-main {
	max-width: 1100px;
	margin: 24px auto;
	padding: 0 20px 40px;
}
.panel {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 18px;
}
.panel h2 {
	font-size: 16px;
	margin: 0 0 12px 0;
}
.actions { display: flex; align-items: center; justify-content: space-between; }

label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }
input, select {
	width: 100%;
	background: #0e152b;
	border: 1px solid var(--border);
	color: var(--text);
	outline: none;
	border-radius: 8px;
	padding: 10px 12px;
}
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px #4f8cff22; }
.inline { display: flex; gap: 8px; align-items: center; }
.field-row { margin: 8px 0; }

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
	.grid.two, .grid.three { grid-template-columns: 1fr; }
}

.button {
	border: 1px solid var(--border);
	background: #0f1a38;
	color: var(--text);
	padding: 10px 14px;
	border-radius: 10px;
	cursor: pointer;
	transition: .15s ease;
	user-select: none;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.button:hover { transform: translateY(-1px); border-color: #2a3c66; }
.button.primary { background: linear-gradient(180deg, var(--brand) 0%, var(--brand-700) 100%); border-color: transparent; }
.button.ghost { background: transparent; }
.button[disabled] { opacity: .6; cursor: not-allowed; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { inline-size: 16px; block-size: 16px; }

.preview-frame {
	width: 100%;
	height: 320px;
	border: 1px dashed #2a3c66;
	border-radius: 8px;
	background: #0e152b;
}

.app-footer {
	padding: 24px 20px 40px;
	text-align: center;
	color: var(--muted);
}

/* Styles utilisés dans la page d'impression */
.label-root {
	position: relative;
	background: #fff;
	color: #000;
	font-family: var(--label-font, Inter, Arial, sans-serif);
	font-size: var(--label-font-size, 8pt);
	line-height: 1.15;
	overflow: hidden;
}
.label-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}
.label-logo { height: 14mm; object-fit: contain; }
.label-top-right { font-size: .9em; white-space: nowrap; }
.label-hr { height: 2px; background: #000; margin: 2mm 0; }
.label-grid {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 6mm;
}
.kv-row { margin: 1mm 0; }
.kv-row b { display: inline-block; min-width: 28mm; }
.qr-box { width: var(--qr-size-mm, 28mm); height: var(--qr-size-mm, 28mm); }
.qr-box canvas, .qr-box img { max-width: 100%; max-height: 100%; display: block; }
.barcode-wrap { margin-top: 2mm; }
.barcode-text { text-align: center; font-size: .9em; }

@media print {
	body { background: #fff; }
	.panel, .app-header, .app-footer { display: none !important; }
}


