/* Boutons, champs, tableau des coups, cartes, fenêtre de saisie */

/* Boutons et champs */
.btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--muted); }
.btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.btn--red:hover { background: #c41a20; border-color: #c41a20; }
.btn--ghost { background: transparent; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; }
.input {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
}
.input:focus { border-color: var(--muted); outline: none; }
#search { flex: 1 1 260px; }
.input::placeholder { color: var(--muted); }

/* Tableau des coups */
.table { width: 100%; border-collapse: collapse; min-width: 820px; }
.table th {
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr.row { cursor: pointer; }
.table tr.row:hover td { background: rgba(255, 255, 255, 0.025); }
.table tr.row:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.table tr.row[aria-expanded="true"] td { border-bottom-color: transparent; background: var(--panel-2); }
.table .date { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.table .charge-cell { display: flex; gap: 12px; align-items: flex-start; }
.table .charge-cell .ticon { margin-top: 2px; }
.table .charge { font-weight: 700; font-size: 1.0625rem; }
.table .type { display: block; color: var(--muted); font-size: 0.8125rem; font-weight: 500; }
.table .penalty { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .penalty--none { color: var(--muted); }
.table .detail td { background: var(--panel-2); padding-top: 0; }
.detail__text { margin: 0 0 6px; max-width: 70ch; color: var(--text); line-height: 1.6; }
.row-actions { display: flex; gap: 12px; }
.empty { color: var(--muted); padding: 18px; margin: 0; }

/* Cartes */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.item { display: flex; flex-direction: column; gap: 6px; }

.item .row-actions { margin-top: auto; padding-top: 8px; }
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--head);
  font-weight: 700;
  flex: none;
}
.plate {
  align-self: flex-start;
  background: #f4f4f4;
  color: #1b2f8f;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 10px;
  border-radius: 4px;
  border: 2px solid #1b2f8f;
  font-size: 0.875rem;
}

/* Fenêtre de saisie */
.dialog {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
}
.dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.dialog h2 { margin: 0 0 16px; font-family: var(--head); font-weight: 700; font-size: 1.5rem; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field--wide { grid-column: 1 / -1; }
.field span { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.field input, .field select, .field textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}
.dialog__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
