/* Plateforme Cowork Cépière — layout: barre latérale + contenu */
body { background: var(--bg-soft); font-size: 15px }
.shell { display: flex; flex-wrap: wrap; min-height: 100vh }
.side { flex: 1 1 240px; max-width: 100%; background: var(--ink); color: #fff; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px }
.side .logo { color: #fff }
.side .who { font-size: 13px; color: #BDBDBB; line-height: 1.4; padding: 0 8px }
.side .who b { color: #fff; display: block; font-size: 14px }
.side nav { display: flex; flex-direction: column; gap: 2px }
.side nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; color: #D6D6D4; text-decoration: none; font-weight: 500; border-left: 3px solid transparent }
.side nav a:hover { background: #1C1C1B; color: #fff }
.side nav a.on { background: #1C1C1B; color: #fff; border-left-color: var(--accent) }
.side nav .count { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px }
.side .bottom { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 8px; font-size: 13px }
.side .bottom a, .side .bottom button { color: #BDBDBB; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; text-decoration: underline }
.main { flex: 999 1 640px; min-width: 0; padding: 28px max(20px, env(safe-area-inset-right, 0px)) 80px max(20px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 22px }
@media (min-width: 900px) { .side { flex: 0 0 250px; position: sticky; top: 0; height: 100vh; overflow-y: auto } .shell { flex-wrap: nowrap } }
@media (max-width: 899px) { .side nav { flex-direction: row; flex-wrap: wrap } .side .bottom { flex-direction: row; flex-wrap: wrap; gap: 14px } }

h1 { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: -.035em; margin: 0; line-height: 1.05; text-wrap: balance }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin: 0 }
h3 { font-size: 15px; font-weight: 700; margin: 0 }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px }
.head p { margin: 6px 0 0; color: var(--muted) }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center }
.panel { background: var(--surface); border: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0 }
.grid { display: grid; gap: 16px }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)) }
.kpi { background: var(--surface); border: 1px solid var(--line); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px }
.kpi .l { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
.kpi .v { font-size: 28px; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums }
.kpi .h { font-size: 13px; color: var(--muted) }
.kpi.alert { border-color: var(--accent) } .kpi.alert .v { color: var(--accent-text) }

.tbox { overflow-x: auto; border: 1px solid var(--line); background: var(--surface) }
table { border-collapse: collapse; width: 100%; font-size: 14px }
th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg-soft); white-space: nowrap }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle }
tr:last-child td { border-bottom: 0 }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums }
.sub { font-size: 12.5px; color: var(--muted) }

.pill { display: inline-flex; align-items: center; padding: 2px 9px; font-size: 12px; font-weight: 600; border-radius: 999px; white-space: nowrap; background: var(--bg-soft); color: var(--muted) }
.pill.ok { background: var(--ok-bg); color: var(--ok) } .pill.warn { background: var(--warn-bg); color: var(--warn) } .pill.bad { background: var(--bad-bg); color: var(--bad) } .pill.ink { background: var(--ink); color: #fff }

.list { display: flex; flex-direction: column }
.li { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line) }
.li:last-child { border-bottom: 0 }
.li .m { flex: 1 1 220px; min-width: 0 }
.empty { padding: 26px; text-align: center; color: var(--muted); border: 1px dashed var(--line); background: var(--surface) }
.empty b { display: block; color: var(--ink); margin-bottom: 4px }
.note { font-size: 13px; color: var(--muted); margin: 0 }
.banner { padding: 14px 16px; border: 1.5px solid var(--accent); background: var(--surface); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center }
.banner.ok { border-color: var(--ok) }

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px }
.form .full { grid-column: 1 / -1 }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500 }
.field input, .field select, .field textarea { min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); background: #fff; font-size: 15px; font-weight: 400; width: 100% }
.field textarea { min-height: 88px; resize: vertical }
.field.check { flex-direction: row; align-items: center; gap: 10px }
.field.check input { width: 20px; min-height: 20px }
.field .hint { font-weight: 400; color: var(--muted); font-size: 12px }

.offices { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px }
.ofc { aspect-ratio: 1 / 1; max-width: 100%; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; border: 1.5px solid var(--line); background: var(--surface); text-align: left; cursor: pointer; min-width: 0 }
.ofc b { font-size: 22px; font-weight: 800; letter-spacing: -.04em }
.ofc span { font-size: 11.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical }
.ofc.occupé { background: var(--ink); color: #fff; border-color: var(--ink) }
.ofc.réservé { background: var(--warn-bg); border-color: var(--warn) }
.ofc.travaux { background: repeating-linear-gradient(45deg, var(--bg-soft) 0 6px, #fff 6px 12px); border-style: dashed }

.steps { display: flex; flex-wrap: wrap; gap: 6px }
.steps span { padding: 6px 12px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface) }
.steps span.on { border-color: var(--ink); color: var(--ink) } .steps span.done { background: var(--ink); color: #fff; border-color: var(--ink) }

.doc { border: 1px solid var(--line); background: #fff; padding: 36px; max-height: 560px; overflow: auto; font-size: 14px; line-height: 1.55 }
.doc h1 { font-size: 22px } .doc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-top: 18px }
.doc table td, .doc table th { border: 1px solid #ccc; padding: 6px 8px }
.sigpad { border: 1.5px dashed var(--ink); background: #fff; width: 100%; max-width: 520px; height: 180px; touch-action: none; display: block }
.sigimg { max-width: 260px; max-height: 90px; display: block }

.cal { display: grid; grid-template-columns: 56px 1fr; border: 1px solid var(--line); background: var(--surface); max-height: 560px; overflow-y: auto }
.cal .h { font-size: 12px; color: var(--muted); padding: 0 6px; border-top: 1px solid var(--line); height: 34px; display: flex; align-items: flex-start; justify-content: flex-end; padding-top: 2px; font-variant-numeric: tabular-nums }
.cal .slots { position: relative; border-left: 1px solid var(--line) }
.cal .slot { height: 34px; border-top: 1px solid var(--line) }
.cal .bk { position: absolute; left: 6px; right: 6px; background: var(--ink); color: #fff; font-size: 12px; padding: 4px 8px; overflow: hidden; border-left: 4px solid var(--accent) }
.cal .bk.mine { background: var(--accent); border-left-color: var(--ink) }

dialog { border: 1.5px solid var(--ink); padding: 0; width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--ink) }
dialog::backdrop { background: rgba(10,10,10,.55) }
.dlg { padding: 22px; display: flex; flex-direction: column; gap: 16px }
.dlg-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap }
.toast { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; font-size: 14px; font-weight: 500; z-index: 3000; max-width: calc(100vw - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.25) }
.toast.err { background: var(--bad) }

.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px max(16px, env(safe-area-inset-left, 0px)) }
.auth .box { width: min(440px, 100%); background: #fff; border: 1.5px solid var(--ink); padding: 32px; display: flex; flex-direction: column; gap: 18px }
.tabs2 { display: flex; border-bottom: 1px solid var(--line) }
.tabs2 button { flex: 1; border: 0; background: none; padding: 10px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer }
.tabs2 button.on { color: var(--ink); border-bottom-color: var(--accent) }
.code { font-family: var(--mono); font-size: 13px; background: var(--bg-soft); border: 1px solid var(--line); padding: 8px 10px; word-break: break-all }
.bigcode { font-family: var(--mono); font-size: 30px; font-weight: 600; letter-spacing: .12em }
