/* Page glue that is not a design-system component. */

a.stat {
  color: inherit;
  text-decoration: none;
}

a.stat:focus-visible {
  outline: 2px solid var(--accent-mid);
  outline-offset: 2px;
}

.table tbody tr[data-href] {
  cursor: pointer;
}

.table tbody tr[data-href]:focus-visible {
  outline: 2px solid var(--accent-mid);
  outline-offset: -2px;
}

.ecole-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}

.ecole-row:last-child {
  border-bottom: 0;
}

.ecole-row__nom {
  font-weight: 600;
}

.ecole-row__ville {
  color: var(--fg-dim);
  font-size: 12px;
}

/* The preview is a real A4 sheet rendered by the server, so it is given the
   width of the paper and enough height for two pages. */
.fiche-preview {
  display: block;
  width: 100%;
  height: 80vh;
  min-height: 640px;
  border: 0;
  background: var(--gray-25);
}

.edit-hint {
  margin: 0;
  padding: var(--sp-3) var(--sp-6);
  border-bottom: 1px solid var(--border);
  background: var(--accent-soft);
  color: var(--fg);
  font-size: 12.5px;
}

/* Generator form: four fields per row, the lesson selector takes the width of
   two so the second row stays balanced instead of leaving a hole. */
#gen-form .form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#gen-form .field--span2 {
  grid-column: span 2;
}

@media (max-width: 1080px) {
  #gen-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #gen-form .field--span2 { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  #gen-form .form-grid { grid-template-columns: 1fr; }
}
