/* PLAYCUT · espace client et panel équipe (complète styles.css) */
.app { min-height: 100svh; background: var(--soft); padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.app h1 { font-size: clamp(1.6rem, 4.6vw, 2.3rem); line-height: 1.08; }
.app h2 { font: 600 1rem/1.25 var(--font-display); letter-spacing: -.02em; }
.app h2 small { font: 600 .84rem/1 var(--font-body); color: var(--muted); letter-spacing: 0; }

.appbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) 12px; background: rgba(255, 255, 255, .86); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px); border-bottom: 1px solid var(--line); }
.appbar__who { padding: 6px 12px; border-radius: 999px; background: var(--soft); font-weight: 700; font-size: .8rem; color: var(--muted); }
.appbar__who:empty { display: none; }

.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 12px var(--gutter); background: var(--ink); color: var(--white); font-size: .88rem; }
.banner b { color: var(--green); }
.banner .seg button { border-color: rgba(255, 255, 255, .22); background: transparent; color: var(--white); box-shadow: none; }
.banner .seg button[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--ink); }

.view { max-width: 1120px; margin: 0 auto; padding: clamp(22px, 4vw, 44px) var(--gutter) 40px; }
.view__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin-bottom: 22px; }
.cliplabel { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-weight: 700; font-size: .82rem; color: var(--muted); }
.cliplabel::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.cliplabel span { font-weight: 600; }
.lead { max-width: 36em; margin-top: 12px; color: var(--muted); }
.fine { margin-top: 12px; font-size: .84rem; line-height: 1.5; color: var(--muted); }

/* Barre d'onglets flottante */
.tabbar { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 50; transform: translateX(-50%); display: flex; gap: 4px; width: min(430px, calc(100% - 28px)); padding: 6px; border: 1px solid var(--line); border-radius: 26px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(1.5) blur(18px); backdrop-filter: saturate(1.5) blur(18px); box-shadow: var(--shadow-lg); }
.tab { position: relative; flex: 1 1 0; display: grid; justify-items: center; gap: 3px; padding: 9px 4px 8px; border: 0; border-radius: 20px; background: none; color: var(--muted); font-weight: 700; font-size: .72rem; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s; }
.tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab:hover { color: var(--ink); background: var(--soft); }
.tab[aria-current="true"] { background: var(--ink); color: var(--white); }
.tab i { position: absolute; top: 5px; left: calc(50% + 6px); min-width: 18px; padding: 2px 5px; border-radius: 999px; background: var(--green); color: var(--ink); font-style: normal; font-size: .66rem; line-height: 1.2; text-align: center; }

/* Segments, filtres */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button, .chip { height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white); cursor: pointer; white-space: nowrap; font-weight: 700; font-size: .82rem; color: var(--ink); transition: background-color .2s, border-color .2s, color .2s; }
.seg button:hover, .chip:hover { border-color: rgba(10, 19, 12, .34); }
.seg button[aria-pressed="true"], .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.filters { display: flex; gap: 6px; margin: 0 calc(var(--gutter) * -1) 16px; padding: 2px var(--gutter); overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip i { font-style: normal; opacity: .55; margin-left: 6px; }

/* Chiffres clés et recherche */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.panelcard .stats { margin: 14px 0 4px; }
.stat.stat--static { cursor: default; box-shadow: none; }
.stat.stat--static:hover { transform: none; }
.install small { display: block; }
.member__btns { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.chip.chip--danger { color: #B42318; border-color: rgba(180, 35, 24, .3); }
.chip.chip--danger:hover { background: rgba(180, 35, 24, .08); }
.member.is-blocked > div:first-child { opacity: .6; }
.minver { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 16px; margin: 6px 0 4px; border-radius: 14px; background: var(--soft, #F3F6F2); }
.minver b { display: block; }
.minver small { color: var(--muted); }
details.howadd { list-style: none; padding-left: 0; margin-top: 14px; }
details.howadd summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details.howadd p { margin-top: 8px; }
/* Messagerie */
.threads { display: grid; gap: 2px; padding: 8px; }
.thread { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 14px; text-align: left; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; }
.thread:hover { background: var(--soft, #F3F6F2); }
.thread__av { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--green); font: 700 15px/1 var(--font-display); font-style: normal; }
.thread__txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.thread__txt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread.is-unread .thread__txt small { color: var(--ink); font-weight: 600; }
.thread__side { display: grid; justify-items: end; gap: 4px; flex: none; }
.thread__side small { color: var(--muted); font-size: .78rem; }
.thread__side i { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--green); color: var(--ink); font: 800 .72rem/20px var(--font-body, inherit); font-style: normal; text-align: center; }
.chatbox { display: flex; flex-direction: column; gap: 12px; }
.bubs { display: flex; flex-direction: column; gap: 6px; max-height: min(60vh, 560px); overflow-y: auto; padding: 4px 2px; }
.bub { max-width: min(560px, 82%); padding: 10px 14px 8px; border-radius: 18px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bub time { display: block; margin-top: 4px; font-size: .72rem; opacity: .6; text-align: right; }
.bub--them { align-self: flex-start; background: var(--soft, #F3F6F2); border-bottom-left-radius: 6px; }
.bub--me { align-self: flex-end; background: var(--green); color: var(--ink); border-bottom-right-radius: 6px; }
.bub--me a { color: var(--ink); text-decoration: underline; }
.bub--intro { color: var(--muted); }
.bubfile { display: block; margin-bottom: 4px; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: inherit; text-decoration: underline; cursor: pointer; text-align: left; }
.bubwho { margin: 8px 6px -2px; font-size: .74rem; font-weight: 800; color: var(--muted); }
.bubwho--me { align-self: flex-end; }
.bubwho--them { align-self: flex-start; }
.bubday { align-self: center; margin: 10px 0 2px; font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: capitalize; }
.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { flex: 1; resize: vertical; min-height: 48px; max-height: 180px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2, rgba(0,0,0,.14)); font: inherit; }
.composer textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft, rgba(109,187,69,.2)); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.blocknote { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: rgba(180, 35, 24, .08); border: 1px solid rgba(180, 35, 24, .25); color: #7A1A12; }
.stat { display: grid; gap: 5px; padding: 16px 18px; text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s, color .2s; }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.stat b { font: 700 clamp(1.5rem, 4vw, 2rem)/1 var(--font-display); letter-spacing: -.04em; }
.stat span { font-weight: 700; font-size: .8rem; color: var(--muted); }
.stat[aria-pressed="true"] span { color: rgba(255, 255, 255, .7); }
.stat small { font-weight: 800; font-size: .8rem; color: var(--green-ink); }
.stat[aria-pressed="true"] small { color: var(--green); }
.search { width: 100%; margin-bottom: 12px; padding: 13px 16px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--white); font-size: 1rem; }
.search:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }

/* Liste + détail */
.split { display: grid; gap: 18px; align-items: start; }
.olist { display: grid; gap: 10px; min-width: 0; }
.ocard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; width: 100%; text-align: left; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
.ocard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ocard[aria-current="true"] { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), var(--shadow); }
.ocard__ref { font-weight: 700; font-size: .78rem; letter-spacing: .04em; color: var(--muted); }
.ocard__title { grid-column: 1 / -1; font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.ocard__meta { grid-column: 1 / -1; font-size: .86rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; background: var(--soft-2); font-weight: 700; font-size: .74rem; white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.pill--en_cours { background: var(--green-soft); color: var(--green-ink); } .pill--en_cours::before { background: var(--green); }
.pill--a_valider { background: var(--ink); color: var(--white); } .pill--a_valider::before { background: var(--green); }
.pill--livree { background: var(--green); color: var(--ink); } .pill--livree::before { background: var(--ink); }
.pill--annulee { color: var(--muted); text-decoration: line-through; }

.detail, .panelcard { min-width: 0; padding: clamp(18px, 3vw, 30px); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.panelcard { margin-bottom: 14px; }
.panelcard > h2 { margin-bottom: 6px; }
.panelcard > p { color: var(--muted); font-size: .95rem; }
.panelcard .fields, .panelcard .seg, .panelcard .rowbtn { margin-top: 16px; }
.detail__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.detail h1 { font-size: clamp(1.3rem, 3.2vw, 1.8rem); }
.detail hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* Avancement */
.track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 20px 0 22px; }
.track li { padding-top: 12px; border-top: 4px solid var(--soft-2); border-radius: 2px; font-weight: 700; font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track li.is-done { border-top-color: var(--green); color: var(--ink); }
.track li.is-now { border-top-color: var(--green); color: var(--ink); }
.track li.is-now::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); vertical-align: 1px; }

.kv { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 11px 14px; }
.kv dt { padding-top: 2px; font-weight: 600; font-size: .84rem; color: var(--muted); }
.kv dd { font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
.kv dd small { font-weight: 500; color: var(--muted); }
.kv a { text-underline-offset: 3px; }

.note { margin-bottom: 18px; padding: 14px 16px; border-radius: 16px; background: var(--green-soft); }
.note--alert { background: #FFF3D1; }
.note b { display: block; margin-bottom: 4px; font-weight: 800; font-size: .82rem; color: var(--green-ink); }
.note--alert b { color: #7A5200; }
.note p { white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 600; }
.actions { margin-bottom: 24px; padding: 20px; border-radius: var(--r); background: var(--soft); }
.actions h2 { margin-bottom: 12px; }
.actions form { margin-top: 14px; display: grid; gap: 12px; }

.rowbtn { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.msg { min-height: 1.4em; margin-top: 12px; font-weight: 700; font-size: .9rem; }
.msg--err { color: #C2301F; }
.msg--ok { color: var(--green-ink); }
.empty { padding: 48px 22px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: rgba(255, 255, 255, .5); text-align: center; color: var(--muted); }
.empty .btn { margin-top: 16px; }
.state { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: .92rem; }
.state::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.state--on::before { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.rowbtn small { color: var(--muted); font-size: .86rem; line-height: 1.45; }

.member { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.member:first-of-type { border-top: 0; }
.member b { display: block; }
.member small { color: var(--muted); overflow-wrap: anywhere; }
.howadd { margin-top: 12px; padding-left: 20px; list-style: decimal; display: grid; gap: 8px; font-size: .95rem; color: var(--muted); }
.howadd b { color: var(--ink); }

.auth { max-width: 460px; margin: clamp(8px, 4vh, 40px) auto 0; }
.auth .seg { margin: 22px 0 14px; }
.auth form { display: grid; gap: 16px; }
.auth .link { display: inline-block; margin-top: 18px; }

@media (min-width: 960px) {
  .split--open { grid-template-columns: 380px minmax(0, 1fr); }
  .split--open .detail { position: sticky; top: 84px; }
  .detail__back { display: none; }
}
@media (max-width: 959px) {
  .split--open .olist, .is-detail .view__head, .is-detail .filters, .is-detail .stats, .is-detail .search { display: none; }
}
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 10px; }
  .track li { font-size: .7rem; }
}

@media print {
  .appbar, .tabbar, .banner, .olist, .view__head, .filters, .stats, .search, .noprint { display: none !important; }
  body.app { background: var(--white); padding: 0; }
  .view { padding: 0; }
  .detail { border: 0; padding: 0; box-shadow: none; }
}

/* Démarchage */
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; align-items: start; }
.pcard { display: grid; gap: 14px; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.pcard__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pcard__name { display: block; font: 600 1.05rem/1.2 var(--font-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.pcard__meta { display: block; margin-top: 4px; font-size: .86rem; color: var(--muted); }
.pcard__contact { font-size: .86rem; font-weight: 600; overflow-wrap: anywhere; }
.pcard .fine { margin-top: 0; }
.pcard .fine a { color: inherit; }
.pcard__msg { border-radius: 16px; background: var(--soft); }
.pcard__msg summary { padding: 13px 16px; font-weight: 800; font-size: .92rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.pcard__msg summary::-webkit-details-marker { display: none; }
.pcard__msg summary::after { content: '+'; font-weight: 600; font-size: 1.2rem; color: var(--muted); transition: transform .25s var(--ease); }
.pcard__msg[open] summary::after { transform: rotate(45deg); }
.pcard__msg > :not(summary) { margin: 0 14px 14px; }
.pcard__msg textarea { display: block; width: calc(100% - 28px); padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--white); font-size: .92rem; line-height: 1.5; resize: vertical; }
.pcard__msg textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.pcard .seg button { height: 32px; padding: 0 11px; font-size: .78rem; }
.pcard__del { justify-self: start; font-size: .84rem; color: var(--muted); }
