/* Simulateur de Circuits Électroniques — styles front.
   Personnalisez les couleurs en surchargeant les variables dans votre thème. */
.scir {
	--scir-accent: #1d4ed8;
	--scir-accent-hover: #1e40af;
	--scir-border: #d6dbe4;
	--scir-surface: #f6f8fb;
	--scir-text: #1f2937;
	--scir-muted: #5b6475;
	--scir-radius: 10px;
	margin: 1.5em 0;
	border: 1px solid var(--scir-border);
	border-radius: var(--scir-radius);
	background: #fff;
	color: var(--scir-text);
	overflow: hidden;
	font-size: 15px;
	line-height: 1.5;
}

.scir-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--scir-border);
}

.scir .scir-title {
	margin: 0;
	font-size: 1.1em;
	line-height: 1.3;
}

.scir-select {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 0.93em;
	color: var(--scir-muted);
}

.scir-select select {
	max-width: 100%;
	padding: 6px 10px;
	border: 1px solid var(--scir-border);
	border-radius: 6px;
	background: #fff;
	color: var(--scir-text);
	font-size: 15px;
}

.scir-consignes {
	padding: 12px 16px;
	border-bottom: 1px solid var(--scir-border);
	background: #f8fafc;
}

.scir-consignes > :first-child { margin-top: 0; }
.scir-consignes > :last-child { margin-bottom: 0; }

.scir-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	background: var(--scir-surface);
	border-bottom: 1px solid var(--scir-border);
}

.scir .scir-btn {
	appearance: none;
	margin: 0;
	padding: 6px 12px;
	border: 1px solid var(--scir-border);
	border-radius: 6px;
	background: #fff;
	color: var(--scir-text);
	font: inherit;
	font-size: 0.9em;
	line-height: 1.4;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
}

.scir .scir-btn:hover { border-color: #b4bccb; background: #fdfdfe; }
.scir .scir-btn:focus-visible { outline: 2px solid var(--scir-accent); outline-offset: 2px; }

.scir .scir-btn-primary {
	border-color: var(--scir-accent);
	background: var(--scir-accent);
	color: #fff;
}

.scir .scir-btn-primary:hover { background: var(--scir-accent-hover); border-color: var(--scir-accent-hover); }

.scir-status {
	flex: 1 1 200px;
	min-width: 0;
	font-size: 0.86em;
	color: var(--scir-muted);
}

.scir-status-ok { color: #15803d; }
.scir-status-error { color: #b91c1c; }

.scir-hint {
	margin: 0;
	padding: 6px 16px;
	font-size: 0.86em;
	color: var(--scir-muted);
	background: var(--scir-surface);
	border-bottom: 1px solid var(--scir-border);
}

.scir-frame {
	position: relative;
	width: 100%;
	background: #fff;
}

.scir-frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.scir-loading {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	text-align: center;
	color: var(--scir-muted);
	background: #fff;
	pointer-events: none;
}

.scir-loading[hidden] { display: none; }

/* Plein écran */
.scir:fullscreen {
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 0;
	border-radius: 0;
}

.scir:fullscreen .scir-frame { flex: 1 1 auto; height: auto !important; }

.scir-notice {
	margin: 1em 0;
	padding: 12px 16px;
	border: 1px solid #d6dbe4;
	border-radius: 8px;
	background: #f6f8fb;
}

.scir-notice-error { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

@media (max-width: 600px) {
	.scir-frame { height: 480px !important; }
	.scir .scir-btn { padding: 6px 10px; }
}
