html, body {
	margin: 0;
	height: 100%;
	overflow: hidden;
	background: #000;
	font-family: "Segoe UI", system-ui, sans-serif;
	color: #e6ecf0;
}

#rendu {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	display: block;
	touch-action: none;
}

/* Panneau opérateur : posé sur l'écran « operateur » de la configuration, ou à gauche en aperçu. */
#panneau {
	position: fixed;
	box-sizing: border-box;
	overflow-y: auto;
	padding: 12px 14px 20px;
	background: rgba(18, 22, 27, 0.9);
	border-right: 1px solid #2d3640;
	font-size: 14px;
	line-height: 1.35;
	z-index: 10;
}

#panneau[hidden] {
	display: none;
}

#panneau h1 {
	font-size: 19px;
	margin: 0 0 2px;
}

#panneau h1 span {
	font-size: 12px;
	font-weight: normal;
	color: #8a98a5;
}

#panneau h2 {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #8fb4d4;
	margin: 0 0 6px;
}

#panneau section {
	border-top: 1px solid #2d3640;
	padding-top: 10px;
	margin-top: 10px;
}

#panneau button {
	font: inherit;
	color: #fff;
	background: #2f5f8f;
	border: 1px solid #4a7fb3;
	border-radius: 4px;
	padding: 5px 10px;
	margin: 4px 6px 4px 0;
	cursor: pointer;
}

#panneau button:hover {
	background: #3a71a8;
}

#panneau select {
	font: inherit;
	color: #e6ecf0;
	background: #1f262e;
	border: 1px solid #3b4752;
	border-radius: 3px;
	padding: 2px 4px;
	max-width: 260px;
}

#panneau a {
	display: block;
	margin: 4px 0;
	color: #8fc4ff;
}

.ligne {
	display: grid;
	grid-template-columns: 130px 1fr 70px;
	align-items: center;
	gap: 6px;
	margin: 4px 0;
}

.ligne select {
	grid-column: 2 / span 2;
}

.ligne output {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.case {
	display: block;
	margin: 5px 0;
}

.discret {
	color: #9aa8b4;
	font-size: 13px;
}

.mono {
	font-family: Consolas, monospace;
	font-size: 13px;
	white-space: pre-wrap;
}

.statut {
	margin-bottom: 4px;
}

.statut.erreur, .erreur {
	color: #ff8f80;
	white-space: pre-wrap;
}

.statut.travail {
	color: #ffd27a;
}

.bandeau {
	margin: 6px 0;
	padding: 6px 8px;
	border-radius: 4px;
	font-size: 13px;
}

.bandeau.cave {
	background: #1d3b2a;
	color: #a6e3b8;
}

.bandeau.apercu {
	background: #4a3a14;
	color: #ffe0a0;
}

.avertissements {
	margin: 4px 0 0;
	padding-left: 18px;
	color: #ffcf80;
	font-size: 13px;
}

.avertissements:empty {
	display: none;
}

table.commandes {
	border-collapse: collapse;
	font-size: 12.5px;
	width: 100%;
}

table.commandes th, table.commandes td {
	text-align: left;
	padding: 2px 4px;
	border-bottom: 1px solid #262e36;
	vertical-align: top;
}

table.commandes th {
	color: #8a98a5;
	font-weight: normal;
}

kbd {
	display: inline-block;
	min-width: 1.2em;
	padding: 0 4px;
	margin-right: 2px;
	border: 1px solid #56636f;
	border-radius: 3px;
	background: #252d35;
	font-family: inherit;
	text-align: center;
}

/* Étiquettes des écrans (aperçu et mire). */
#etiquettes {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 5;
}

.zone {
	position: absolute;
	box-sizing: border-box;
}

.zone .nom {
	position: absolute;
	left: 4px;
	top: 4px;
	padding: 1px 6px;
	background: rgba(0, 0, 0, 0.55);
	border-radius: 3px;
	font-size: 12px;
}

body.mire .zone {
	border: 3px solid var(--couleur, #fff);
}

body.mire .zone .nom {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	font-size: clamp(14px, 3.2vh, 48px);
	text-align: center;
	color: var(--couleur, #fff);
	background: rgba(0, 0, 0, 0.7);
	padding: 8px 16px;
}

body:not(.mire):not(.apercu) .zone {
	display: none;
}

#message {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	max-width: min(900px, 90vw);
	padding: 20px 26px;
	background: rgba(40, 16, 16, 0.95);
	border: 1px solid #a5453b;
	border-radius: 6px;
	white-space: pre-wrap;
	font-size: 15px;
	z-index: 20;
}

#message[hidden], #depot[hidden] {
	display: none;
}

#depot {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(20, 60, 100, 0.55);
	border: 4px dashed #8fc4ff;
	font-size: 28px;
	z-index: 30;
	pointer-events: none;
}

#manette {
	white-space: pre-line;
}

.zone .nom .details {
	font-size: 11px;
	color: #c8d2da;
}

body.mire .zone .nom .details {
	font-size: 0.55em;
	margin-top: 4px;
}

#infosModele {
	white-space: pre-line;
}
