/* Projets, tâches et sous-tâches — confidentialité, archivage et classement. */

.pc-task-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.pc-task-stats article {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  min-height: 52px;
  padding: 11px 14px;
  white-space: nowrap;
  background: #fff;
  border: 1px solid #dce5ee;
  border-radius: 11px;
}

.pc-task-stats article > span {
  color: #718398;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .055em;
}

.pc-task-stats article > strong {
  color: #173d60;
  font-size: 21px;
  font-weight: 650;
  line-height: 1;
}

.pc-task-stats article > small {
  overflow: hidden;
  color: #8090a0;
  font-size: 8px;
  text-overflow: ellipsis;
}

.pc-task-stats article.alert {
  border-color: #e8b2b5;
  background: #fff7f7;
}

.pc-task-stats article.alert > strong,
.pc-task-stats article.alert > span {
  color: #b64048;
}

.pc-task-tabs {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  background: #eaf0f6;
  border-radius: 10px;
}

.pc-task-tabs button {
  min-height: 34px;
  padding: 6px 12px;
  color: #667b8f;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
}

.pc-task-tabs button.active {
  color: #245d9f;
  background: #fff;
  box-shadow: 0 2px 8px #193c6412;
}

.pc-task-layout {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}

.pc-task-project-list,
.pc-task-project-detail {
  overflow: hidden;
}

.pc-task-project-list {
  padding: 12px;
}

.pc-task-project-list > header,
.pc-task-subtasks > header,
.pc-task-user-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pc-task-project-list > header {
  padding: 2px 2px 9px;
}

.pc-task-project-list h2,
.pc-task-project-list p,
.pc-task-subtasks h3,
.pc-task-subtasks p,
.pc-task-user-card h2,
.pc-task-user-card p,
.pc-task-user-card h3 {
  margin: 0;
}

.pc-task-project-list h2,
.pc-task-subtasks h3,
.pc-task-user-card h2 {
  color: #244766;
  font-weight: 650;
}

.pc-task-project-list p,
.pc-task-subtasks p,
.pc-task-user-card p {
  margin-top: 3px;
  color: #8291a1;
  font-size: 9px;
}

.pc-task-project-list > header > button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: #3e78da;
  border: 0;
  border-radius: 9px;
  font-size: 18px;
  font-weight: 700;
}

.pc-task-archive-toggle {
  width: 100%;
  margin: 0 0 8px;
  padding: 6px 8px;
  color: #62778a;
  background: #f4f6f8;
  border: 1px solid #dde4ea;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 600;
}

.pc-task-archive-toggle.active {
  color: #46596a;
  background: #e9edf0;
}

.pc-task-project-list > div {
  display: grid;
  gap: 7px;
}

.pc-task-project-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  padding: 3px;
  background: #f8fafc;
  border: 1px solid #e0e7ee;
  border-radius: 9px;
}

.pc-task-project-entry.active {
  color: #245c99;
  background: #edf4fd;
  border-color: #7ba6e3;
}

.pc-task-project-entry.archived {
  filter: grayscale(.85);
  opacity: .66;
  background: #eef0f2;
  border-color: #d5dade;
}

.pc-task-project-select {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 6px 7px;
  color: #526a7f;
  background: transparent;
  border: 0;
  text-align: left;
}

.pc-task-project-entry.active .pc-task-project-select {
  color: #245c99;
}

.pc-task-order-buttons {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
}

.pc-task-project-entry > .pc-task-order-buttons {
  flex-direction: column;
  align-self: center;
}

.pc-task-order-buttons > button {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  color: #526f8a;
  background: #fff;
  border: 1px solid #d5e0ea;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
}

.pc-task-order-buttons > button:hover:not(:disabled) {
  color: #245c99;
  border-color: #8eafe0;
  background: #f4f8fe;
}

.pc-task-order-buttons > button:disabled {
  opacity: .3;
  cursor: default;
}

.pc-task-project-list > div > button {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  color: #526a7f;
  background: #f8fafc;
  border: 1px solid #e0e7ee;
  border-radius: 9px;
  text-align: left;
}

.pc-task-project-list > div > button.active {
  color: #245c99;
  background: #edf4fd;
  border-color: #7ba6e3;
}

.pc-task-project-list > div > button.archived {
  filter: grayscale(.85);
  opacity: .66;
  background: #eef0f2;
  border-color: #d5dade;
}

.pc-task-project-list-title,
.pc-task-project-list-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.pc-task-project-list-title strong {
  overflow: hidden;
  flex: 1;
  min-width: 0;
  color: #264968;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
}

.pc-task-project-list-title b {
  flex: 0 0 auto;
  padding: 2px 5px;
  color: #b7484d;
  background: #fdebed;
  border-radius: 5px;
  font-size: 6.5px;
  letter-spacing: .04em;
}

.pc-task-project-list-title b.private {
  color: #6d4c9b;
  background: #f0e9fa;
}

.pc-task-project-list-title b.archive {
  color: #5e6973;
  background: #dde1e4;
}

.pc-task-project-list-meta {
  color: #8090a0;
  font-size: 7.5px;
}

.pc-task-project-list-meta > .pc-task-people {
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 40px;
}

.pc-task-project-list-meta > em {
  flex: 0 0 auto;
  padding-left: 5px;
  border-left: 1px solid #d8e0e7;
  font-style: normal;
}

.pc-task-project-detail {
  padding: 0;
}

.pc-task-project-detail.archived {
  filter: grayscale(.78);
  opacity: .76;
}

.pc-task-project-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #e0e7ee;
}

.pc-task-title-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 7px 0 6px;
}

.pc-task-project-copy h2 {
  min-width: 160px;
  margin: 0;
  color: #183d60;
  font-size: 20px;
  font-weight: 650;
}

.pc-task-project-copy > p {
  max-width: 720px;
  margin: 0;
  color: #718396;
  font-size: 10px;
  line-height: 1.5;
}

.pc-task-kicker,
.pc-task-meta,
.pc-task-project-actions,
.pc-task-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.pc-task-kicker {
  justify-content: space-between;
}

.pc-task-kicker > span {
  color: #6948a5;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
}

.pc-task-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 650;
  white-space: nowrap;
}

.pc-task-status.todo { color: #607489; background: #edf1f5; }
.pc-task-status.doing { color: #a65c15; background: #fff0dc; }
.pc-task-status.done { color: #28724a; background: #e6f5ec; }
.pc-task-status.cancelled { color: #7c6870; background: #f2edef; }

.pc-task-deadline {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  gap: 5px;
  max-width: 100%;
  padding: 4px 7px;
  color: #667b8f;
  white-space: nowrap;
  background: #f1f5f8;
  border-radius: 6px;
  font-size: 8.5px;
}

.pc-task-deadline b { font-weight: 650; }

.pc-task-deadline em {
  padding-left: 5px;
  color: #7c8c9a;
  border-left: 1px solid #cfd9e1;
  font-style: normal;
}

.pc-task-deadline.overdue {
  color: #b53e46;
  background: #fdebed;
}

.pc-task-deadline.overdue em {
  color: #b53e46;
  border-color: #e6b8bb;
}

.pc-task-deadline.compact {
  padding: 2px 5px;
  font-size: 7.5px;
}

.pc-task-project-list-meta .pc-task-deadline.compact {
  flex: 0 1 auto;
  max-width: 112px;
  padding: 0;
  background: transparent;
}

.pc-task-project-list-meta .pc-task-deadline em {
  display: none;
}

.pc-task-meta {
  margin-top: 9px;
}

.pc-task-meta > span {
  padding: 4px 7px;
  color: #667b8f;
  background: #f3f6f9;
  border-radius: 6px;
  font-size: 8px;
}

.pc-task-meta > span.urgent {
  color: #b44248;
  background: #fdebed;
}

.pc-task-meta > span.private {
  color: #6d4c9b;
  background: #f0e9fa;
}

.pc-task-people {
  display: block;
  min-width: 0;
  margin-top: 10px;
  color: #526a7f;
  font-size: 8.5px;
}

.pc-task-people > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-task-people > em {
  color: #8996a3;
  font-size: 8px;
  font-style: normal;
}

.pc-task-people.compact {
  margin: 0;
  color: #65798c;
  font-size: 8.5px;
}

.pc-task-project-actions {
  align-content: flex-start;
  justify-content: flex-end;
}

.pc-task-archive-action {
  color: #566b7e !important;
  background: #eef1f4 !important;
}

.pc-task-progress {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(150px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 11px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e0e7ee;
}

.pc-task-progress > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pc-task-progress b {
  color: #31536f;
  font-size: 9px;
  font-weight: 650;
}

.pc-task-progress small {
  color: #7c8c9c;
  font-size: 8px;
}

.pc-task-progress > i {
  display: block;
  overflow: hidden;
  height: 6px;
  background: #dfe8f1;
  border-radius: 999px;
}

.pc-task-progress > i > span {
  display: block;
  height: 100%;
  background: #3e78da;
  border-radius: inherit;
}

.pc-task-completed-filter {
  display: flex;
  justify-content: flex-end;
  padding: 8px 20px;
  background: #fbfcfd;
  border-bottom: 1px solid #e0e7ee;
}

.pc-task-completed-filter button {
  padding: 6px 9px;
  color: #5d7184;
  background: #fff;
  border: 1px solid #d8e1e9;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 650;
}

.pc-task-completed-filter button.active {
  color: #28724a;
  background: #edf8f1;
  border-color: #9ccdaf;
}

.pc-task-subtasks {
  padding: 15px 20px 20px;
}

.pc-task-list {
  display: grid;
  gap: 5px;
  margin-top: 12px;
}

.pc-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 5px 8px;
  border: 1px solid #dfe6ed;
  border-radius: 9px;
}

.pc-task-row.nested {
  position: relative;
  margin-left: 36px;
  min-height: 44px;
  background: #f8fafc;
  border-color: #d8e2eb;
}

.pc-task-row.nested::before {
  position: absolute;
  top: -8px;
  bottom: 50%;
  left: -22px;
  width: 14px;
  content: "";
  border-bottom: 1px solid #b9c9d7;
  border-left: 1px solid #b9c9d7;
  border-radius: 0 0 0 7px;
}

.pc-task-row.status-todo { background: #f7faff; border-color: #d8e3f0; }
.pc-task-row.status-in-progress { background: #fff8e9; border-color: #ead7a7; }
.pc-task-row.status-completed { background: #edf8f1; border-color: #badbc6; }
.pc-task-row.status-cancelled { background: #f0f2f4; border-color: #d3d8dd; }
.pc-task-row.overdue:not(.status-completed):not(.status-cancelled) { background: #fff4f4; border-left: 4px solid #ca4c53; }
.pc-task-row.archived { background: #eef0f2; }

.pc-task-open {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
  color: #526a7f;
  background: transparent;
  border: 0;
  text-align: left;
}

.pc-task-open:disabled {
  cursor: default;
  opacity: 1;
}

.pc-task-row-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.pc-task-row-title > i {
  flex: 0 0 auto;
  color: #8194a5;
  font-size: 11px;
  font-style: normal;
}

.pc-task-open strong {
  overflow: hidden;
  flex: 1 1 150px;
  min-width: 80px;
  color: #254866;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-task-row-title .pc-task-deadline { flex: 0 0 auto; }
.pc-task-row-title .pc-task-status { flex: 0 0 auto; margin-left: auto; }

.pc-task-row-title .pc-task-people {
  overflow: hidden;
  flex: 0 1 150px;
  max-width: 180px;
}

.pc-task-priority {
  flex: 0 0 auto;
  padding: 3px 5px;
  color: #b64048;
  background: #fdebed;
  border-radius: 5px;
  font-size: 6.5px;
  letter-spacing: .04em;
}

.pc-task-row.completed .pc-task-open strong {
  color: #738596;
  text-decoration: line-through;
}

.pc-task-open p {
  overflow: hidden;
  margin: 0;
  color: #8090a0;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pc-task-row-actions {
  justify-content: flex-end;
}

.pc-task-row-actions button {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  color: #647a8f;
  background: #f3f6f9;
  border: 1px solid #dce4eb;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}

.pc-task-empty {
  padding: 20px 10px;
  color: #8291a1;
  text-align: center;
  font-size: 9px;
}

.pc-task-empty.large {
  display: grid;
  place-items: center;
  min-height: 130px;
}

.pc-task-user-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.pc-task-user-card { padding: 15px; }

.pc-task-user-card > header {
  justify-content: flex-start;
  padding-bottom: 11px;
  border-bottom: 1px solid #e2e8ee;
}

.pc-task-user-card > section {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.pc-task-user-card h3 {
  color: #718396;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.pc-task-user-card section > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 39px;
  padding: 7px 9px;
  color: #526a7f;
  background: #f8fafc;
  border: 1px solid #e1e7ed;
  border-radius: 8px;
  text-align: left;
}

.pc-task-user-card section > button > span:first-child {
  display: grid;
  gap: 2px;
}

.pc-task-user-card section > button strong {
  color: #2e516f;
  font-size: 9px;
  font-weight: 600;
}

.pc-task-user-card section > button small {
  color: #8492a0;
  font-size: 7.5px;
}

.pc-task-modal { width: min(760px, 100%); }

.pc-task-modal header p {
  margin: 5px 0 0;
  color: #7e8e9e;
  font-size: 9px;
}

.pc-task-form textarea {
  min-height: 86px;
  resize: vertical;
}

.pc-task-privacy-toggle {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  background: #f8fafc;
  border: 1px solid #dbe4ec;
  border-radius: 9px;
  cursor: pointer;
}

.pc-task-privacy-toggle.selected {
  color: #654395;
  background: #f4eefb;
  border-color: #b8a1d7;
}

.pc-task-privacy-toggle > input {
  width: 17px;
  height: 17px;
  accent-color: #7552a8;
}

.pc-task-privacy-toggle > span {
  display: grid;
  gap: 2px;
}

.pc-task-privacy-toggle strong { font-size: 9px; }
.pc-task-privacy-toggle small { color: #7e8e9e; font-size: 8px; }

.pc-task-assignee-picker {
  padding: 10px;
  border: 1px solid #dbe4ec;
  border-radius: 9px;
}

.pc-task-assignee-picker legend {
  padding: 0 6px;
  color: #536d84;
  font-size: 9px;
  font-weight: 650;
}

.pc-task-assignee-picker > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.pc-task-assignee-picker label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 35px;
  padding: 5px 8px;
  color: #60758a;
  background: #f8fafc;
  border: 1px solid #e0e7ee;
  border-radius: 8px;
  cursor: pointer;
}

.pc-task-assignee-picker label.selected {
  color: #285f9e;
  background: #edf4fd;
  border-color: #79a6e5;
}

.pc-task-assignee-picker label > input { accent-color: #3e78da; }

.pc-task-assignee-picker label > span:last-child {
  overflow: hidden;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .pc-task-layout { grid-template-columns: 225px minmax(0, 1fr); }
  .pc-task-row-title .pc-task-deadline em { display: none; }
}

@media (max-width: 820px) {
  .pc-task-layout,
  .pc-task-user-grid { grid-template-columns: 1fr; }
  .pc-task-project-list > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .pc-task-stats { grid-template-columns: 1fr; }
  .pc-task-stats article { min-height: 46px; }
  .pc-task-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .pc-task-project-list > div { grid-template-columns: 1fr; }
  .pc-task-project-header { grid-template-columns: 1fr; }
  .pc-task-project-actions { justify-content: flex-start; }
  .pc-task-progress { grid-template-columns: 1fr; }
  .pc-task-subtasks > header { align-items: flex-start; flex-direction: column; }
  .pc-task-row { grid-template-columns: minmax(0, 1fr); }
  .pc-task-row-actions { grid-column: 1; justify-content: flex-start; }
  .pc-task-row-title .pc-task-people { max-width: 105px; }
  .pc-task-row.nested { margin-left: 22px; }
  .pc-task-row.nested::before { left: -14px; width: 8px; }
  .pc-task-assignee-picker > div { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .pc-task-assignee-picker > div { grid-template-columns: 1fr; }
  .pc-task-stats article > small { display: none; }
}
