:root {
  color-scheme: dark;
  --fond: #0b0c0f;
  --bloc: #14161a;
  --case: #1c1f25;
  --survol: #262a32;
  --texte: #f1f2f4;
  --terne: #9198a4;
  --filet: #262a31;
  --bleu: #3a9be0;
  --rouge: #e5706c;
  --rayon: 10px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--texte);
  background: var(--fond);
  font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1 { margin: 0; font-size: 20px; font-weight: 800; }

input, select, button { font: inherit; color: inherit; }

input, select {
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--filet);
  border-radius: var(--rayon);
  outline: none;
  background: var(--case);
}

input:focus, select:focus { border-color: var(--bleu); }

button {
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--rayon);
  font-weight: 700;
  background: var(--bleu);
  cursor: pointer;
  transition: filter .15s, background-color .15s;
}

button:hover { filter: brightness(1.08); }
button.discret { font-weight: 600; background: var(--case); }
button.discret:hover { background: var(--survol); filter: none; }

.connexion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(340px, calc(100vw - 32px));
  margin: 18vh auto 0;
  padding: 24px;
  border-radius: 14px;
  background: var(--bloc);
}

.erreur { min-height: 20px; margin: 0; color: var(--rouge); }

main { max-width: 1500px; margin: 0 auto; padding: 20px 24px; }

header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filtres > input { flex: 1 1 220px; }
.filtres label { display: flex; align-items: center; gap: 6px; color: var(--terne); }

.corps { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 16px; align-items: start; }

.ligne {
  display: grid;
  grid-template-columns: 130px 130px minmax(0, 1fr) 190px;
  gap: 12px;
  width: 100%;
  height: auto;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 400;
  text-align: left;
  background: none;
}

.ligne:hover { background: var(--case); filter: none; }
.ligne.on { background: var(--case); box-shadow: inset 2px 0 0 var(--bleu); }
.ligne > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ligne b { font-weight: 600; }
.date, .cat { color: var(--terne); }
.etat { color: var(--terne); text-align: center; }
#plus { display: block; margin: 8px auto; }

.fiche {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 16px;
  border-radius: 14px;
  background: var(--bloc);
}

.fiche h2 { margin: 0 0 4px; font-size: 16px; }
.fiche h3 { margin: 16px 0 6px; color: var(--terne); font-size: 12px; font-weight: 600; }
.fiche p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.fiche dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.fiche dt { color: var(--terne); }
.fiche dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 1050px) {
  .corps { grid-template-columns: 1fr; }
  .fiche { position: static; max-height: none; }
  .ligne { grid-template-columns: 110px minmax(0, 1fr); }
  .cat, .qui { display: none; }
}

/* Aucune barre de defilement visible : le defilement reste actif a la molette. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
