@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/barlow-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/barlow-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/barlow-condensed-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url(/static/fonts/barlow-condensed-latin-700-normal.woff2) format('woff2'); }
:root {
  color-scheme: dark;
  --bg: #0c131b;
  --panel: #121b25;
  --panel-2: #18232f;
  --line: #243241;
  --text: #e6edf3;
  --muted: #8b9bab;
  --accent: #12c6ea;        /* Aureltech */
  --accent-ink: #032029;
  --accent-soft: rgba(18,198,234,.12);
  --focus: #12c6ea;
  --c-DA: #f5a524;
  --c-DM: #ff4d4d;
  --c-GAINE: #5b9bff;
  --c-VESDA: #3fd17a;
  --ok: #3fd17a;
  --danger: #ff6b6b;
  --radius-s: 6px;
  --radius-m: 10px;
  --font: "Barlow", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-num: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", var(--font);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.45;
  color: var(--text); background: var(--bg); -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hidden { display: none !important; }
::selection { background: rgba(18,198,234,.35); }

/* Voyants */
.led { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); flex: none; }
.led.DA { background: var(--c-DA); box-shadow: 0 0 8px var(--c-DA); }
.led.DM { background: var(--c-DM); box-shadow: 0 0 8px var(--c-DM); }
.led.GAINE { background: var(--c-GAINE); box-shadow: 0 0 8px var(--c-GAINE); }
.led.VESDA { background: var(--c-VESDA); box-shadow: 0 0 8px var(--c-VESDA); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 42px; padding: 0 16px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-weight: 600;
  text-decoration: none; color: var(--text); transition: border-color .15s, background .15s;
}
.btn:hover { border-color: #3f5670; background: #213042; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: #3fd3f0; border-color: #3fd3f0; }
.btn.danger { color: var(--danger); border-color: #5a2a2e; background: transparent; }
.btn.danger:hover { background: #2a1719; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn.icon { width: 42px; padding: 0; font-size: 20px; line-height: 1; }

input[type=text], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-s); background: #0b1118; color: var(--text);
}
input::placeholder, textarea::placeholder { color: #5f6f80; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
select option { background: var(--panel); }
textarea { min-height: 70px; resize: vertical; }
label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin: 12px 0 5px; }

/* Badge type */
.type {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-num); font-weight: 600; font-size: 15px;
  padding: 2px 10px; border-radius: 4px; border: 1px solid currentColor; color: var(--c-DA); background: rgba(245,165,36,.08);
}
.type::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.type.DM { color: var(--c-DM); background: rgba(255,77,77,.08); }
.type.GAINE { color: var(--c-GAINE); background: rgba(91,155,255,.08); }
.type.VESDA { color: var(--c-VESDA); background: rgba(63,209,122,.08); }

.msg { padding: 10px 12px; border-radius: var(--radius-s); background: #2a1719; border: 1px solid #5a2a2e; color: #ffb3b3; font-size: 15px; margin: 10px 0; }
.msg.ok { background: #12281c; border-color: #22553a; color: #9ff0c0; }

/* Barre du haut */
.top {
  display: flex; align-items: center; gap: 16px; padding: 0 16px; min-height: 60px;
  background: #0a1017; border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; text-decoration: none; color: inherit; }
.brand .logo { height: 30px; width: auto; display: block; }
.brand .sep { width: 1px; height: 28px; background: var(--line); flex: none; }
.brand .txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand b { font-size: 16px; font-weight: 600; white-space: nowrap; }
.brand span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.top .spacer { flex: 1; }
.status { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); padding-right: 4px; }
.status .clock { color: var(--text); font-family: var(--font-num); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; padding-left: 10px; border-left: 1px solid var(--line); margin-left: 4px; }
.userbtn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 6px 0 12px; border-radius: 21px;
  border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--text); font-weight: 600; font-size: 14px;
}
.userbtn:hover { border-color: #37506a; }
.userbtn .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.foot { font-size: 12px; color: #5f7080; display: flex; gap: 6px; align-items: center; }
.foot img { height: 13px; opacity: .75; }
.menu { position: relative; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 240px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m);
  box-shadow: 0 16px 40px rgba(0,0,0,.5); padding: 6px;
}
.menu-list a, .menu-list button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none;
  border-radius: var(--radius-s); text-decoration: none; cursor: pointer; color: var(--text);
}
.menu-list a:hover, .menu-list button:hover { background: var(--panel-2); }
.menu-list .who { padding: 8px 12px 10px; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* Dialogues */
dialog { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px; width: min(440px, calc(100vw - 24px)); background: var(--panel); color: var(--text); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(5,9,14,.7); }
dialog h2 { margin: 0 0 6px; font-family: var(--font-num); font-size: 24px; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

@media (max-width: 900px) { .status .lbl, .userbtn .nm { display: none; } .userbtn { padding: 0 5px; } }
@media (max-width: 640px) { .brand .txt, .brand .sep, .status .led { display: none; } .brand .logo { height: 26px; } .top { gap: 10px; padding: 0 10px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
