/* Portail binotech — même direction que Veille données : lisible par tous, contours francs, jaune. */
@font-face {
  font-family: "Figtree";
  src: url("/static/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --soft: #f4f4f2;
  --ink: #1f1f1f;
  --ink-2: #3d3d3a;
  --muted: #61615c;
  --line: #1f1f1f;
  --hair: #dcdcd6;
  --todo: #ffe36e;
  --todo-ink: #5c4500;
  --stop: #ffd2cc;
  --stop-ink: #8f1d12;
  --done: #c9f0d4;
  --done-ink: #12572b;
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --surface: #1d1d1b;
    --soft: #262624;
    --ink: #f3f3ee;
    --ink-2: #d8d8d0;
    --muted: #a9a9a0;
    --line: #6f6e67;
    --hair: #2c2c28;
    --stop: #ffb8ae;
    --done: #a8e6bb;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 19px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
h1 {
  font-size: 2.2rem;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
}
h2 {
  font-size: 1.3rem;
  margin: 0 0 0.6rem;
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.small {
  font-size: 0.9rem;
}
.muted {
  color: var(--muted);
}
.lead {
  color: var(--muted);
  font-size: 1.1rem;
}

/* ——— Connexion : carte sur fond jaune ——— */
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 16px;
  background: var(--todo);
  color: #1f1f1f;
}
.card {
  width: 100%;
  max-width: 28rem;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid #1f1f1f;
  border-radius: 28px;
  box-shadow: 0 8px 0 #1f1f1f;
  padding: 2.1rem 1.5rem 1.8rem;
  display: grid;
  gap: 1.1rem;
  text-align: center;
  justify-items: center;
}
.card .form,
.card .button,
.card > form {
  width: 100%;
}
.card .field {
  text-align: left;
}
.card p {
  color: var(--ink-2);
}

/* ——— Pages connectées ——— */
.page {
  min-height: 100vh;
  padding: 0 16px 3rem;
}
.page-inner {
  max-width: 44rem;
  margin: 0 auto;
  display: grid;
  gap: 1.3rem;
}
.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 2px solid var(--hair);
  margin-bottom: 0.6rem;
}
.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.topbar nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 2px solid transparent;
}
.topbar nav a[aria-current="page"] {
  border-color: var(--line);
  background: var(--todo);
  color: #1f1f1f;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.25rem;
}
.logo {
  width: 40px;
  height: 40px;
  flex: none;
}
.panel {
  border: 2px solid var(--line);
  border-radius: 22px;
  padding: 1.2rem;
  background: var(--surface);
  display: grid;
  gap: 0.8rem;
}
.panel.highlight {
  background: var(--todo);
  color: #1f1f1f;
  border-color: #1f1f1f;
}
.tiles,
.users {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}
.tile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.3rem;
  border: 2px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 5px 0 var(--line);
  background: var(--surface);
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
}
.tile:hover {
  background: var(--todo);
  color: #1f1f1f;
}
.empty {
  padding: 1.2rem;
  border: 2px dashed var(--hair);
  border-radius: 22px;
  color: var(--muted);
}
.user.off {
  opacity: 0.7;
}
.user-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.7rem;
  align-items: baseline;
}
.badge {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 2px solid #1f1f1f;
  color: #1f1f1f;
}
.badge.todo {
  background: var(--todo);
}
.badge.stop {
  background: var(--stop);
}

/* ——— Formulaires ——— */
.form {
  display: grid;
  gap: 0.95rem;
}
.field {
  display: grid;
  gap: 0.35rem;
}
.field > span:first-child {
  font-weight: 700;
}
.hint {
  font-size: 0.85rem;
  color: var(--muted);
}
input {
  font: inherit;
  width: 100%;
  min-height: 54px;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
input[readonly] {
  background: var(--soft);
  color: var(--ink-2);
}
.secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  background: #ffffff;
  color: #1f1f1f;
  border: 2px solid #1f1f1f;
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  word-break: break-all;
  user-select: all;
  -webkit-user-select: all;
}
fieldset {
  border: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
legend {
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.check {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  min-height: 44px;
}
.check input {
  width: 24px;
  min-height: 24px;
  height: 24px;
  accent-color: var(--ink);
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
button,
.button {
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.65rem 1.3rem;
  min-height: 52px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
button:hover,
.button:hover {
  background: var(--soft);
}
button.primary {
  background: var(--ink);
  color: var(--bg);
}
button.primary:hover {
  background: var(--ink-2);
}
button.danger {
  background: var(--stop);
  color: #1f1f1f;
}
button.big,
.button.big {
  min-height: 62px;
  font-size: 1.1rem;
  width: 100%;
}
button.link {
  border: none;
  background: none;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  padding: 0.4rem;
  min-height: 48px;
  font-weight: 700;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 4px solid var(--todo);
  outline-offset: 2px;
}
.notice,
.card .notice {
  border: 2px solid #1f1f1f;
  border-radius: 14px;
  padding: 0.7rem 0.9rem;
  font-weight: 700;
  color: #1f1f1f;
  text-align: left;
  width: 100%;
}
.notice.bad {
  background: var(--stop);
}
.notice.ok {
  background: var(--done);
}
@media (prefers-reduced-motion: no-preference) {
  .card {
    animation: up 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  @keyframes up {
    from {
      transform: translateY(12px);
      opacity: 0;
    }
  }
}
