.rows {
  list-style: none;
}

.row {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.56rem;
  padding: 0.19rem 0 0.19rem 0.125rem;
  border-radius: 6px;
}

.row.dragging {
  opacity: 0.4;
}

.row.drop-before::before,
.row.drop-after::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.row.drop-before::before {
  top: -1px;
}

.row.drop-after::after {
  bottom: -1px;
}

/* ---------- Case à cocher ---------- */

.check {
  flex: none;
  display: grid;
  place-items: center;
  width: 1.31rem;
  height: 1.31rem;
  margin-top: 0.19rem;
  border: 1.6px solid var(--line-strong);
  border-radius: 50%;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.1s ease;
}

.check:active {
  transform: scale(0.88);
}

.check svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.12s ease, transform 0.16s cubic-bezier(0.3, 1.5, 0.6, 1);
}

.row[data-done="1"] .check {
  background: var(--accent);
  border-color: var(--accent);
}

.row[data-done="1"] .check svg {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Texte ---------- */

.row .text {
  flex: 1;
  min-width: 0;
  padding: 2px 0;
  resize: none;
  overflow: hidden;
  line-height: 1.45;
  word-break: break-word;
  transition: color 0.14s ease;
}

.row[data-done="1"] .text {
  color: var(--text-faint);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.row[data-kind="heading"] {
  padding-top: 1rem;
  padding-left: 0;
}

.row[data-kind="heading"] .text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.row[data-kind="heading"] .check {
  display: none;
}

.row[data-kind="heading"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: var(--line);
}

/* ---------- Attribution discrète ---------- */

.row .who {
  flex: none;
  align-self: center;
  max-width: 40%;
  padding-left: 6px;
  font-size: 0.71875rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.row:hover .who,
.row:focus-within .who {
  opacity: 1;
}

@media (hover: none) {
  .row .who {
    display: none;
  }

  /* Sans survol, la poignée doit rester visible pour être découvrable. */
  .row .grip,
  .list-link .grip {
    opacity: 0.4;
  }
}

.row .grip {
  flex: none;
  align-self: center;
  width: 22px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--text-faint);
  opacity: 0;
  cursor: grab;
  touch-action: none;
  transition: opacity 0.15s ease;
}

.row:hover .grip,
.row:focus-within .grip {
  opacity: 1;
}

.row .grip svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* ---------- Barre d'ajout ---------- */

.add-bar {
  display: flex;
  align-items: center;
  gap: 0.56rem;
  width: 100%;
  padding: 0.56rem 0 0.56rem 0.125rem;
  color: var(--text-faint);
  font-size: 0.9375rem;
}

.add-bar:hover {
  color: var(--text-muted);
}

.add-bar .plus {
  display: grid;
  place-items: center;
  width: 1.31rem;
  height: 1.31rem;
  border: 1.6px dashed var(--line-strong);
  border-radius: 50%;
}

.add-bar .plus svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.list-actions {
  display: flex;
  gap: 14px;
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
}

.list-actions button {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.list-actions button:hover {
  color: var(--text);
}

.list-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}

.list-actions button:disabled:hover {
  color: var(--text-muted);
}

/* ---------- Vue d'ensemble ---------- */

.overview-group {
  margin-bottom: 1.5rem;
}

.overview-heading {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
  padding: 0 0 0.375rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.overview-heading:hover {
  color: var(--accent);
}

.overview-heading .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-heading .count {
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.overview-text {
  padding: 2px 0;
  line-height: 1.45;
  word-break: break-word;
}
