/*
 * 01-theme-et-mise-en-page.css
 * Couleurs, typographie, barre latérale et structure des pages.
 */

/* Layout: thème clair assumé — papier rosé, barre latérale blanche, accent rose « pétale », encre prune ; la nuit fleurie reste réservée à l'écran de connexion */
:root {
  color-scheme: light;
  --paper: #fbf8fa;
  --surface: #ffffff;
  --sunk: #f6f1f5;
  --ink: #1f1a35;
  --ink-soft: #5f5a75;
  --ink-faint: #9a95ab;
  --accent: #c2416c;
  --accent-ink: #ffffff;
  --accent-soft: #fde8ef;
  --rose: #e0708f;
  --rose-soft: #fbe3ea;
  --teal: #0f7a74;
  --teal-soft: #dff3f1;
  --line: #efe8ee;
  --line-strong: #e0d5de;
  --hl: #fff3d4;
  --hl-ink: #7a5410;
  --ok: #1b7a55;
  --ok-soft: #dcf3e8;
  --warn: #9a640e;
  --warn-soft: #fdf0d8;
  --bad: #b83434;
  --bad-soft: #fbe2e2;
  --side: #ffffff;
  --side-ink: #1f1a35;
  --side-soft: #6e6984;
  --side-on: #fcedf2;
  --night: #15183a;
  --night-ink: #eef0fb;
  --night-soft: #a5a9c9;
  --night-on: #262a55;
  --shadow: 0 1px 2px rgba(31, 26, 53, 0.04), 0 12px 32px rgba(194, 65, 108, 0.07);
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 14px;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1,
h2,
h3,
h4 {
  font-family: var(--f-display);
  font-weight: 700;
  text-wrap: balance;
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.app {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100%;
}
.side {
  background: var(--side);
  color: var(--side-ink);
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  height: 100vh;
  height: 100dvh;
  overflow: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}
.brand svg {
  flex: none;
}
.brand b {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.1px;
}
.navlist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.navbtn {
  display: flex;
  align-items: center;
  gap: 11px;
  background: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--side-soft);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  font-weight: 500;
  transition:
    background 0.15s,
    color 0.15s;
}
.navbtn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.navbtn:hover {
  color: var(--side-ink);
  background: var(--side-on);
}
.navbtn.on {
  color: var(--accent);
  background: var(--side-on);
  font-weight: 700;
}
.navgroup {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  font-weight: 700;
  padding: 14px 12px 4px;
}
.navbtn .badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 7px;
  font-family: var(--f-mono);
}
.who {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 14px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--side-soft);
}
.who strong {
  color: var(--side-ink);
  font-weight: 700;
  font-size: 14px;
}
.rolesw {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--side-on);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}
.rolesw button {
  flex: 1;
  border: 0;
  background: none;
  color: var(--side-soft);
  padding: 5px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
}
.rolesw button.on {
  background: var(--side-ink);
  color: var(--side);
}
.linkbtn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--side-soft);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

main {
  min-width: 0;
  padding-block: 28px 64px;
  padding-inline: clamp(16px, 4vw, 48px);
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.phead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.phead h1 {
  font-size: clamp(26px, 3.2vw, 32px);
}
.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
  font-weight: 700;
  margin-bottom: 4px;
}
.sub {
  color: var(--ink-soft);
  margin: 4px 0 0;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.banner {
  border: 1px solid var(--line-strong);
  background: var(--sunk);
  border-radius: var(--r);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink-soft);
}
.banner b {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  line-height: 1.2;
}
.btn svg {
  width: 16px;
  height: 16px;
}
.btn.pri {
  background: linear-gradient(135deg, #d24b78, var(--accent));
  color: var(--accent-ink);
  box-shadow: 0 6px 16px rgba(194, 65, 108, 0.22);
}
.btn.pri:hover {
  filter: brightness(1.08);
}
.btn.sec {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn.sec:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn.ghost {
  background: none;
  color: var(--ink-soft);
  padding: 6px 8px;
}
.btn.ghost:hover {
  color: var(--accent);
}
.btn.danger {
  background: var(--bad-soft);
  color: var(--bad);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  max-width: 100%;
}
.chip {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--ink-soft);
}
.chip.on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.search {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 8px;
  padding: 7px 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 5px;
  padding: 2px 7px;
  background: var(--sunk);
  color: var(--ink-soft);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}
.pill {
  font-size: 12px;
  font-weight: 700;
  border-radius: 99px;
  padding: 2px 9px;
  white-space: nowrap;
}
.p-todo {
  background: var(--hl);
  color: var(--hl-ink);
}
.p-late {
  background: var(--bad-soft);
  color: var(--bad);
}
.p-done {
  background: var(--accent-soft);
  color: var(--accent);
}
.p-ok {
  background: var(--ok-soft);
  color: var(--ok);
}
.p-warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.p-live {
  background: var(--rose);
  color: #fff;
}
.mono {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--ink-soft);
}
.faint {
  color: var(--ink-faint);
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.18s,
    box-shadow 0.18s,
    transform 0.18s;
}
.card:hover {
  border-color: var(--rose-soft);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card,
.card * {
  overflow-wrap: anywhere;
}
.card h3 {
  font-size: 18px;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-faint);
  padding-top: 6px;
  flex-wrap: wrap;
}

.list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  width: 100%;
  text-align: left;
}
.item:first-child {
  border-top: 0;
}
.item:hover {
  background: var(--sunk);
}
.item.static {
  cursor: default;
}
.item.static:hover {
  background: none;
}
.item .main {
  flex: 1;
  min-width: 0;
}
.item .t {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item .s {
  font-size: 13px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item .end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}

.cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}
.panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.panel > h2 {
  font-size: 19px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.panel > h2 small {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 13px;
  color: var(--ink-faint);
}
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
}
.stat .k {
  font-size: 12px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}
.stat .v {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.stat .v small {
  font-family: var(--f-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--ink-soft);
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  padding: 26px 20px;
  text-align: center;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.empty h3 {
  font-size: 18px;
  color: var(--ink);
}
.empty p {
  margin: 0;
  max-width: 46ch;
}
