/* Bureau : connexion, puis une seule page de travail. */

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(400px, 100%);
  display: grid;
  gap: 14px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.brand {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-card h1,
.block-head h1 {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lede,
.sub,
.auth-hint,
.mode-caption {
  color: var(--muted);
}

.login-card .stack,
.auth-fields {
  display: grid;
  gap: 12px;
}

.login-card .btn.primary {
  width: 100%;
  margin-top: 4px;
}

.desk main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 28px 24px 80px;
  display: grid;
  gap: 36px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 52px;
  padding: 8px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar nav {
  display: flex;
  gap: 16px;
}

.topbar a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.topbar a:hover,
.topbar a:focus-visible {
  color: var(--text);
}

.topbar .btn {
  margin-left: auto;
}

.block {
  scroll-margin-top: 68px;
  display: grid;
  gap: 12px;
}

.block-head,
.head-actions,
.progress-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.block-head h2 {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
}

.head-actions {
  align-items: center;
}

.launch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.launch .auth-section,
.mode-caption {
  grid-column: 1 / -1;
}

.mode-caption {
  margin: 0;
  text-align: left;
  max-width: none;
}

.launch.bulk {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.mode {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.mode-caption {
  color: var(--muted);
  font-size: var(--fs-small);
}

.auth-section summary {
  width: fit-content;
}

.auth-fields {
  margin-top: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 12px;
}

.catalog > summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
}

.catalog[open] > summary {
  margin-bottom: 12px;
}

.catalog > .sub {
  margin-bottom: 12px;
}

#resultRail { display: grid; gap: 12px; }
.meter { display: grid; gap: 4px; }
.meter-top { display: flex; justify-content: space-between; gap: 12px; }
.meter-track { height: 8px; border-radius: 999px; background: var(--rule); overflow: hidden; }
.meter-fill { height: 100%; border-radius: inherit; background: var(--chart-muted); }
.meter.hot .num { color: var(--chart-1); font-weight: 600; }
.meter.hot .meter-fill { background: var(--chart-1); }

td.actions {
  text-align: right;
  white-space: nowrap;
}

td.actions .btn + .btn {
  margin-left: 6px;
}

@media (max-width: 800px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .topbar nav {
    grid-column: 1 / -1;
    order: 3;
  }

  .launch,
  .launch.bulk,
  .auth-fields,
  .split,
  .block-head,
  .head-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .mode {
    justify-items: start;
  }

  .mode-caption {
    text-align: left;
    max-width: none;
  }

  .head-actions {
    justify-items: start;
  }
}
