:root{
  --rows-bg-odd: #f9f9f9;
  --rows-bg-even: #ffffff;
  --row-hover: #f1f7ff;
  --table-bg: #ffffff;
  --card-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background: #f8f9fa;
  color: #222;
}

header {
  text-align: center;
  margin-bottom: 12px;
}

.controls {
  margin: 10px 0;
}

.meta {
  margin-top: 6px;
  color: #444;
  font-size: 14px;
}

/* table */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--table-bg);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

th, td {
  padding: 8px;
  text-align: center;
  border-bottom: 1px solid #e6e6e6;
  font-size: 13px;
  vertical-align: middle; /* centre le contenu verticalement */
}

th {
  background: #f1f1f1;
  cursor: pointer;
  user-select: none;
  position: relative;
}

th .sort-indicator {
  display: inline-block;
  width: 12px;
  margin-left: 6px;
  font-size: 12px;
  vertical-align: middle;
}

/* zebra + hover */
tbody tr:nth-child(even) { background: var(--rows-bg-even); }
tbody tr:nth-child(odd)  { background: var(--rows-bg-odd); }
tbody tr:hover { background: var(--row-hover); }

/* progression */
.progression {
  display: grid;
  gap: 1px;
  align-items: center;
  justify-items: stretch;
  /* grid-template-columns is set inline by JS to repeat(39,1fr) */
  padding: 4px 0;
  height: 20px; /* règle une hauteur raisonnable pour centrer */
  box-sizing: border-box;
}

.bar {
  width: 12px;
  height: 12px;
  background: #ccc;
  border-radius: 12px;
  /*width: 100%;*/
}

.bar.present { background: #28a745; }
.bar.absent { background: #dc3545; }
.bar.retard { background: #ffc107; }

/* small responsive niceties */
@media (max-width: 900px) {
  .progression { height: 14px; }
  .bar { height: 10px; }
  th, td { font-size: 12px; padding: 6px; }
}

.text-left {
  text-align: left;
}
.w-50 {
  width: 50%;
}
.w-10 {
  width: 10%;
}