:root { --fond: #f6f7f9; --texte: #1b1f24; --accent: #0b5cad; --bord: #c3c9d1; --blanc: #fff; }
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.bandeau {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .5rem 1rem; background: var(--accent); color: var(--blanc);
}
.bandeau-admin { background: #1b1f24; }
.bandeau a, .bandeau button { color: var(--blanc); }
.bandeau nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
.bandeau a, .bandeau button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 .5rem;
  background: none; border: 0; font: inherit; text-decoration: underline; cursor: pointer;
}
.bandeau form { margin: 0; }
main { max-width: 40rem; margin: 0 auto; padding: 1rem; }
h1 { font-size: 1.5rem; margin: .5rem 0 1rem; }
label { display: block; margin: .75rem 0 .25rem; font-weight: 600; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: .5rem; font: inherit;
  border: 1px solid var(--bord); border-radius: 6px; background: var(--blanc); color: var(--texte);
}
input[type="checkbox"], input[type="radio"] { width: 1.5rem; min-height: 1.5rem; }
button, .bouton {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.25rem;
  font: inherit; font-weight: 600; color: var(--blanc); background: var(--accent);
  border: 0; border-radius: 6px; cursor: pointer; text-decoration: none;
}
a { color: var(--accent); }
.erreur { padding: .75rem; border-left: 4px solid #b00020; background: #fdecea; color: #7a0016; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .5rem; border-bottom: 1px solid var(--bord); text-align: left; }
main:has(.tableau-comptes) { max-width: 64rem; }
.formulaire { max-width: 40rem; }
.case { display: flex; align-items: center; gap: .5rem; font-weight: 400; min-height: 44px; }
.case input { flex: none; }
.recherche { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem 1rem; margin-bottom: 1rem; }
.recherche label { margin: 0; flex: 1 1 12rem; }
.briques { list-style: none; padding: 0; display: grid; gap: .75rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.actions form { margin: 0; }
.provisoire-bloc { padding: .75rem; border-left: 4px solid #1b7a3d; background: #e8f5ec; }
.provisoire { font-size: 1.25rem; font-weight: 700; user-select: all; }
@media (max-width: 640px) {
  table.cartes thead { display: none; }
  table.cartes, table.cartes tbody, table.cartes tr, table.cartes td { display: block; width: 100%; }
  table.cartes tr { margin-bottom: .75rem; padding: .25rem; background: var(--blanc); border: 1px solid var(--bord); border-radius: 6px; }
  table.cartes td { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 0; }
  table.cartes td::before { content: attr(data-label); font-weight: 600; }
}
