/* Project page and home page. */
.pj-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.pj-head .grow { flex: 1; }
.presence { display: inline-flex; align-items: center; gap: .3rem; }
.pj-title { margin-bottom: .8rem; }
.pj-title h1, .pj-title-input { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.pj-title-input { width: 100%; border: 1px solid transparent; background: none; padding: .2rem .3rem; margin-left: -.3rem; }
.pj-title-input:hover { border-color: var(--line); }
.pj-title-input:focus { border-color: var(--line-strong); background: var(--surface); }
.pj-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.pj-main > .panel + .panel, .pj-side > .panel + .panel { margin-top: 1rem; }
.pj-side { position: sticky; top: calc(var(--header-h) + 12px); }
.pj-info { padding: .6rem .2rem; display: flex; flex-direction: column; gap: .2rem; }

/* properties */
.props { display: grid; grid-template-columns: 1fr 1fr; }
.prop { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: .5rem; padding: .35rem .8rem; border-bottom: 1px solid var(--line); align-items: start; min-width: 0; }
.prop.wide { grid-column: 1 / -1; }
.prop:nth-child(odd):not(.wide) { border-right: 1px solid var(--line); }
.prop .pl { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding-top: .45rem; }
.prop .pv { min-width: 0; padding-top: .1rem; }
.prop .pv > select, .prop .pv > input { width: 100%; }
.prop .pv .ms { border-color: var(--line); }
.prop .pv .ms:hover { border-color: var(--line-strong); }
.prop .pv .ms.ro { border-color: transparent; }
.state-select { font-weight: 700; color: var(--c, var(--text)); border-left: 5px solid var(--c, var(--line-strong)); }
.contact-lines { margin-top: .3rem; display: flex; flex-direction: column; gap: .1rem; }
.members { display: flex; flex-direction: column; gap: .25rem; }
.member { display: flex; align-items: center; gap: .4rem; }
.member input { width: 9rem; padding: .2rem .4rem; font-size: .85rem; }
.slots { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.slot { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.slot input { padding: .25rem .35rem; font-size: .9rem; }
.slot .sl-label { width: 12rem; }
.slot-ro { padding: .3rem 0; }

/* documents */
.doc-tabs { margin: 0; padding: 0 .4rem; background: var(--surface-2); }
.doc-tabs .add-page { color: var(--accent); }
.pj-docs > .pb { min-height: 160px; }
.doc-bar { float: right; margin: 0 0 .4rem .6rem; }
.doc .md { min-height: 2rem; }
.doc-actions { margin-top: .5rem; }
.md-split:has(> .hidden) { grid-template-columns: 1fr; }
.page-tools { margin-bottom: .6rem; border-bottom: 1px dashed var(--line); padding-bottom: .4rem; }
.remote-change { margin-bottom: .6rem; }

/* tasks */
ul.tasks { list-style: none; margin: 0 0 .6rem; padding: 0; }
.task-row { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.task-row .t-title { flex: 1 1 200px; cursor: text; min-width: 0; overflow-wrap: anywhere; }
.task-row .t-title.done { text-decoration: line-through; color: var(--muted); }
.task-row select, .task-row input[type=date] { padding: .2rem .35rem; font-size: .85rem; max-width: 11rem; }
.task-row > input[type=text] { flex: 1 1 200px; }
.task-row .late, .late { color: var(--danger); font-weight: 600; }
.task-add { display: flex; gap: .4rem; flex-wrap: wrap; }
.task-add input[type=text] { flex: 1 1 240px; }

/* comments */
.c-list { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .8rem; }
.thread { border-bottom: 1px solid var(--line); padding: .5rem 0; }
.replies { margin-left: 2rem; }
.comment { display: flex; gap: .55rem; padding: .3rem 0; }
.comment .c-body { flex: 1; min-width: 0; }
.comment .c-meta { margin-bottom: .1rem; }
.comment .c-actions { display: flex; gap: .8rem; margin-top: .15rem; }
.composer { display: flex; flex-direction: column; gap: .4rem; }
.composer.reply { margin: .3rem 0 .5rem 2rem; }

/* side */
.place-list { list-style: none; margin: .6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.pj-minimap { min-width: 0; }
.link-edit { display: grid; grid-template-columns: 1fr 1.4fr auto auto; gap: .3rem; margin-bottom: .3rem; align-items: center; }
.link-edit input { min-width: 0; padding: .25rem .4rem; }
.pj-links .pb > div > a { overflow-wrap: anywhere; }
.share-link { display: flex; flex-direction: column; gap: .3rem; padding-bottom: .6rem; margin-bottom: .6rem; border-bottom: 1px solid var(--line); }
.share-link input { width: 100%; font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }
.pj-note textarea { min-height: 90px; }

/* history */
ol.history { list-style: none; margin: 0; padding: 0; }
ol.history > li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
pre.version { white-space: pre-wrap; max-height: 260px; overflow: auto; background: var(--surface-2); padding: .5rem; font-size: .82rem; margin: .2rem 0 .5rem; }
details summary { cursor: pointer; color: var(--accent); margin-top: .2rem; }

/* ---------- home ("Ma semaine") */
.home-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.home-head h1 { font-size: 1.5rem; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.home-grid > div > .panel + .panel { margin-top: 1rem; }
.day { border-bottom: 1px solid var(--line); }
.day:last-child { border-bottom: 0; }
.day > h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .45rem .8rem .2rem; }
.day.today > h3 { color: var(--accent); }
.day.today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.ev { display: flex; gap: .7rem; padding: .35rem .8rem; text-decoration: none; color: var(--text); align-items: baseline; border-left: 4px solid var(--c, transparent); }
.ev:hover { background: var(--accent-soft); }
.ev .tm { font-variant-numeric: tabular-nums; min-width: 6.5rem; color: var(--muted); font-size: .88rem; }
.ev .what { flex: 1; min-width: 0; }
.ev .what b { display: block; }
.ev .sub { font-size: .82rem; color: var(--muted); }
.mytasks { list-style: none; margin: 0; padding: 0; }
.mytasks li { display: flex; gap: .5rem; align-items: flex-start; padding: .35rem .8rem; border-bottom: 1px solid var(--line); }
.mytasks li .grow { flex: 1; }
.mytasks li.done .tt { text-decoration: line-through; color: var(--muted); }
.mytasks .add { display: flex; gap: .4rem; padding: .5rem .8rem; }
.mytasks .add input[type=text] { flex: 1; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: .4rem .8rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.waiting a { display: flex; gap: .5rem; align-items: center; padding: .4rem .8rem; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; flex-wrap: wrap; }
.waiting a:hover { background: var(--accent-soft); }
.waiting a .grow { flex: 1; min-width: 0; }

@media (max-width: 1100px) {
  .pj-grid, .home-grid { grid-template-columns: minmax(0, 1fr); }
  .pj-side { position: static; }
}
@media (max-width: 760px) {
  .props { grid-template-columns: 1fr; }
  .prop { grid-template-columns: 1fr; gap: .15rem; }
  .prop:nth-child(odd):not(.wide) { border-right: 0; }
  .prop .pl { padding-top: .2rem; }
  .slot .sl-label { width: 100%; }
  .pj-title h1, .pj-title-input { font-size: 1.3rem; }
  .link-edit { grid-template-columns: 1fr auto auto; }
  .link-edit input:first-child { grid-column: 1 / -1; }
  .replies, .composer.reply { margin-left: .8rem; }
}
@media print {
  .pj-side .pj-note, .pj-share, .pj-comments, .doc-bar, .doc-tabs .add-page, .task-add, .pj-head button, .pj-head .presence { display: none !important; }
  .pj-grid { grid-template-columns: 1fr; }
  .panel { break-inside: avoid; border-color: #999; }
}
