/* « Mes actions », dans le téléphone (actions-ui.js), et « C'est pour moi » dans un compte rendu. */

.todo-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Ajouter une action à soi. */
.todo-add {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border-radius: 16px;
  background: var(--glass-hi);
  box-shadow: inset 0 1px 0 var(--glass-rim);
}
.todo-add > .ic {
  color: var(--text-3);
}
.todo-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: var(--fs-body);
  color: var(--text);
  padding: 6px 0;
  outline: none;
}
.todo-add-btn {
  padding: 6px 12px;
  font-size: var(--fs-footnote);
}

.todo-list {
  list-style: none;
  margin: 0;
  padding: 4px 14px;
  border-radius: 18px;
  background: var(--glass-hi);
  box-shadow: inset 0 1px 0 var(--glass-rim);
}
.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
}
.todo-item + .todo-item {
  border-top: 1px solid var(--hairline);
}

/* La coche ronde de Rappels : vide à faire, pleine (et cochée) une fois fait. */
.todo-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--text-3);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.todo-check:hover {
  border-color: var(--accent);
}
.todo-check:active {
  transform: scale(0.9);
}
.todo-check.done {
  border-color: var(--accent);
  background: var(--accent);
}
.todo-check svg {
  width: 14px;
  height: 14px;
  stroke-width: 3;
}

.todo-main {
  flex: 1;
  min-width: 0;
}
.todo-what {
  margin: 2px 0 0;
  font-size: var(--fs-body);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.todo-item.done .todo-what {
  color: var(--text-3);
  text-decoration: line-through;
}
.todo-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 8px;
  margin-top: 5px;
}
.todo-meta .ic svg {
  width: 12px;
  height: 12px;
}
/* « Nouvelle » : un mot, pas seulement une couleur. */
.todo-new {
  padding: 1px 7px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: #fff;
  font-size: var(--fs-caption);
  font-weight: 700;
}
.todo-due {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--orange) 22%, transparent);
  font-size: var(--fs-caption);
  font-weight: 700;
}
.todo-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: var(--fs-footnote);
  text-align: left;
  cursor: pointer;
}
.todo-source:hover {
  text-decoration: underline;
}
.todo-source.plain {
  color: var(--text-2);
  cursor: default;
}
.todo-source.plain:hover {
  text-decoration: none;
}

/* « Pas pour moi » (ou la corbeille d'une action à soi) : discret, à droite. */
.todo-more {
  flex: none;
  margin-top: 1px;
  padding: 4px 9px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--text-2);
  font: inherit;
  font-size: var(--fs-caption);
  font-weight: 600;
  cursor: pointer;
}
.todo-more:hover {
  background: var(--fill-2);
  color: var(--text);
}
.todo-more.icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
}
.todo-more.icon svg {
  width: 14px;
  height: 14px;
}

.todo-done > summary {
  cursor: pointer;
  list-style: none;
}
.todo-done > summary::-webkit-details-marker {
  display: none;
}
.todo-done > summary::before {
  content: "›";
  display: inline-block;
  margin-right: 6px;
  transition: transform var(--dur-fast) var(--ease-out);
}
.todo-done[open] > summary::before {
  transform: rotate(90deg);
}
.todo-done[open] > summary {
  margin-bottom: 8px;
}

/* Dans un compte rendu : à prendre, ou déjà à soi. */
.rec-action-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.rec-take {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font: inherit;
  font-size: var(--fs-caption);
  font-weight: 700;
  cursor: pointer;
}
.rec-take:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.rec-take:disabled {
  opacity: 0.5;
  cursor: default;
}
.rec-yours {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-2);
  font-size: var(--fs-caption);
  font-weight: 600;
}
.rec-take .ic svg,
.rec-yours .ic svg {
  width: 12px;
  height: 12px;
}
