/* ─── MoveWORK IoT — thème clair / sombre ─────────────────────────────────────
   Repris d'IPBX Admin (mêmes variables) ; accent vert propre au site. */

:root {
	color-scheme: light;
	--bg: #f5f5f3;
	--surface: #fcfcfb;
	--border: #dddcd7;
	--text: #0b0b0b;
	--text-2: #52514e;
	--muted: #7a7974;
	--accent: #168a62;
	--ok: #0ca30c;
	--ok-text: #006300;
	--warn: #fab219;
	--warn-text: #8a5a00;
	--err: #d03b3b;
	--err-text: #b02525;
}
@media (prefers-color-scheme: dark) {
	:root:where(:not([data-theme="light"])) {
		color-scheme: dark;
		--bg: #121211;
		--surface: #1a1a19;
		--border: #33332f;
		--text: #f0efec;
		--text-2: #c3c2b7;
		--muted: #8c8b84;
		--accent: #2fbf8c;
		--ok-text: #4fcf4f;
		--warn-text: #fab219;
		--err-text: #ef7a7a;
	}
}
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #121211;
	--surface: #1a1a19;
	--border: #33332f;
	--text: #f0efec;
	--text-2: #c3c2b7;
	--muted: #8c8b84;
	--accent: #2fbf8c;
	--ok-text: #4fcf4f;
	--warn-text: #fab219;
	--err-text: #ef7a7a;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
/* En-tête fixe, seul le contenu défile */
body:has(> .scroller) { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.scroller { flex: 1; min-height: 0; overflow-y: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 15px; margin: 0 0 12px; color: var(--text-2); }
.muted { color: var(--muted); }

/* ─── En-tête ────────────────────────────────────────────────────────────── */
.topbar { display: flex; align-items: center; gap: 24px; padding: 10px 24px; background: var(--surface); flex: none; flex-wrap: wrap;
	border-bottom: 2px solid color-mix(in srgb, var(--accent) 45%, var(--border)); }
.brand { font-weight: 700; font-size: 17px; color: var(--text); display: inline-flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); font-weight: 500; }
.topbar nav { display: flex; gap: 4px; flex: 1; }
.topbar nav a { padding: 6px 12px; border-radius: 6px; color: var(--text-2); }
.topbar nav a.active, .topbar nav a:hover { background: var(--bg); color: var(--text); text-decoration: none; }
.user { display: flex; align-items: center; gap: 12px; color: var(--text-2); }
.icon-btn { background: none; border: 1px solid var(--border); color: var(--text-2); border-radius: 6px; cursor: pointer; padding: 2px 8px; font: inherit; }
main { padding: 24px; max-width: 1760px; margin: 0 auto; }

/* ─── Blocs ──────────────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 18px; overflow-x: auto; }
.card p { margin: 0; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.alert.err { border-color: var(--err); color: var(--err-text); }
.alert.warn { border-color: var(--warn); color: var(--warn-text); }
.alert.ok { border-color: var(--ok); color: var(--ok-text); }
.btn { display: inline-flex; align-items: center; height: 32px; padding: 0 16px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { text-decoration: none; filter: brightness(1.08); }

/* ─── Infobulles (assets/app.js) : bulle stylée après 1 s d'arrêt du curseur ─ */
.tooltip { position: fixed; z-index: 100; max-width: 340px; padding: 7px 10px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 12px;
	line-height: 1.4; pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); white-space: pre-line; }
.tooltip[hidden] { display: none; }

/* ─── Connexion ──────────────────────────────────────────────────────────── */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 32px; max-width: 380px; width: 100%; text-align: center; }
.login-card .brand { font-size: 24px; margin-bottom: 8px; justify-content: center; }
.login-card p { color: var(--text-2); margin-bottom: 22px; }

@media (max-width: 700px) {
	main { padding: 16px; }
	.topbar { padding: 10px 16px; gap: 10px; }
}
