/* Kermaint — pages liste du panel (onglets, filtres, tableau, tiroir, modale) */
.btn-sm { height: 36px; padding: 0 16px; font-size: 13.5px; }

.tabs { display: flex; gap: 4px; margin-top: 26px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; margin-bottom: -1px; }
.tabs button span { font-size: 11.5px; background: #e8ecee; color: var(--ink-2); padding: 1px 7px; border-radius: 10px; }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tabs button.active span { background: var(--brand-50); color: var(--brand); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.filters .search { width: 260px; }
.filters select {
  height: 36px; border: 1px solid var(--line); border-radius: 4px; background-color: #fff;
  font: inherit; font-size: 13px; padding: 0 30px 0 12px; color: var(--ink); width: auto; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%237a8288%22 stroke-width=%222%22%3E%3Cpath d=%22m6 9 6 6 6-6%22/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 14px;
}
.filters .reset { background: none; border: 0; color: var(--brand); font-size: 13px; font-weight: 600; padding: 0 8px; }
.filters .result { margin-left: auto; font-size: 12.5px; color: var(--ink-2); }

.list-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 16px; }
.list-card .table-wrap { margin-top: 0; }
.list-card table { min-width: 900px; }
.list-card th { background: #fafbfb; border-bottom: 1px solid var(--line); border-radius: 0 !important; padding: 11px 16px; }
.list-card td { padding: 13px 16px; vertical-align: middle; white-space: nowrap; }
.list-card td.cell-main { white-space: normal; min-width: 240px; }
.list-card th { white-space: nowrap; }
.list-card tbody tr { cursor: pointer; }
.list-card tbody tr:hover { background: #fafbfb; }
.list-card tbody tr.selected { background: var(--brand-50); }
.list-card tbody tr:last-child td { border-bottom: 0; }
.cell-main b { display: block; font-weight: 600; }
.cell-main small { color: var(--ink-2); font-size: 12px; }
.type { font-size: 12.5px; color: var(--ink-2); display: inline-flex; gap: 7px; align-items: center; }
.type i { width: 8px; height: 8px; border-radius: 2px; background: var(--brand); }
.type.corr i { background: #b9bebe; }
.prio-wrap { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.prio { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.prio i { width: 3px; background: var(--line); border-radius: 1px; }
.prio i:nth-child(1) { height: 5px; } .prio i:nth-child(2) { height: 8px; } .prio i:nth-child(3) { height: 12px; }
.prio[data-l="1"] i:nth-child(1), .prio[data-l="2"] i:nth-child(-n+2) { background: var(--ink-2); }
.prio[data-l="3"] i { background: var(--red); }
.due.late { color: var(--red); font-weight: 600; }
.tech { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tech .avatar { width: 24px; height: 24px; font-size: 10px; }
.empty { padding: 48px 16px; text-align: center; color: var(--ink-2); font-size: 14px; }

.pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); gap: 12px; flex-wrap: wrap; }
.pager .pages { display: flex; gap: 4px; }
.pager button { min-width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 4px; font-size: 12.5px; color: var(--ink); }
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .4; cursor: default; }

/* Tiroir de détail */
.overlay { position: fixed; inset: 0; background: rgba(20, 26, 30, .32); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 60; }
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); background: #fff; z-index: 70; transform: translateX(100%); visibility: hidden; transition: transform .22s ease, visibility 0s .22s; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.12); }
.drawer.open { transform: none; visibility: visible; transition: transform .22s ease; }
.drawer-head { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head small { color: var(--ink-2); font-size: 12.5px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.drawer-head h3 { font-size: 18px; font-weight: 600; margin-top: 6px; }
.drawer-head .icon-btn { margin-left: auto; }
.drawer-body { padding: 20px 24px; overflow-y: auto; flex: 1; display: grid; gap: 26px; align-content: start; }
.drawer-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; font-size: 13px; margin: 0; }
.meta dt { color: var(--ink-2); font-size: 12px; }
.meta dd { margin: 3px 0 0; font-weight: 600; }
.d-section h4 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.d-section p { font-size: 13.5px; color: var(--ink-2); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline small { display: block; color: var(--ink-2); font-size: 12px; }
.parts { width: 100%; min-width: 0; font-size: 13px; }
.parts td { padding: 9px 0; border-bottom: 1px solid var(--line); }
.parts td:first-child { font-weight: 500; }
.parts td:last-child { text-align: right; color: var(--ink-2); }

/* Modale */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; pointer-events: none; visibility: hidden; }
.modal.open { pointer-events: auto; visibility: visible; }
.modal-card { background: #fff; border-radius: 8px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 24px 60px rgba(0,0,0,.2); opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .18s, transform .18s; }
.modal.open .modal-card { opacity: 1; transform: none; }
.modal-form { padding: 20px 24px; display: grid; gap: 16px; }
.modal-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.modal-form input, .modal-form select, .modal-form textarea { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 4px; padding: 9px 12px; background: #fff; width: 100%; color: var(--ink); }
.modal-form textarea { min-height: 90px; resize: vertical; }
.modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus { outline: 3px solid var(--brand-50); border-color: var(--brand); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-label { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.seg label { flex: 1; display: block !important; cursor: pointer; position: relative; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: block; text-align: center; padding: 9px 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); border-right: 1px solid var(--line); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: -2px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 13.5px; opacity: 0; transition: .2s; z-index: 90; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Équipements ===== */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 24px; }
.stat-strip div { padding: 16px 20px; border-right: 1px solid var(--line); }
.stat-strip div:last-child { border-right: 0; }
.stat-strip small { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.stat-strip strong { display: block; font-size: 22px; font-weight: 600; margin-top: 6px; }

.split-list { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-top: 20px; align-items: start; }
.split-list .filters { margin-top: 0; }
.split-list > * { min-width: 0; }
.tree { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; position: sticky; top: 83px; }
.tree h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 6px 10px 8px; }
.tree button { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; border-radius: 4px; padding: 7px 10px; font-size: 13.5px; color: var(--ink-2); text-align: left; }
.tree button svg { width: 15px; height: 15px; flex: none; }
.tree button span { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.tree button.sub { padding-left: 34px; }
.tree button:hover { background: var(--bg); color: var(--ink); }
.tree button.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.tree button.active span { color: var(--brand); }

.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; font-weight: 600; }
.crit { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; font-size: 11.5px; font-weight: 700; background: #e8ecee; color: #4b5a63; }
.crit.A { background: var(--red-50); color: var(--red); }
.crit.B { background: #f4ecdf; color: var(--amber); }
.state { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; }
.state.down { color: var(--red); }
.state.stop { color: var(--amber); }
.avail { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; min-width: 120px; }
.avail .bar { width: 64px; margin: 0; height: 5px; }
.avail.low .bar i { background: var(--amber); }
.avail.crit .bar i { background: var(--red); }
.next.soon { color: var(--amber); font-weight: 600; }
.next.late { color: var(--red); font-weight: 600; }

.qr-box { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fafbfb; }
.qr-img { width: 112px; height: 112px; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 6px; display: grid; place-items: center; }
.qr-img svg, .qr-img img { width: 100%; height: 100%; }
.qr-box b { font-size: 13.5px; display: block; }
.qr-box p { font-size: 12.5px; color: var(--ink-2); margin: 4px 0 12px; }
.counter { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: 13px; }
.counter .bar { grid-column: 1 / -1; margin: 0; height: 6px; }
.counter small { color: var(--ink-2); font-size: 12px; grid-column: 1 / -1; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.link-list li:last-child { border-bottom: 0; }
.link-list a { color: var(--brand); font-weight: 600; }
.link-list small { color: var(--ink-2); font-size: 12px; display: block; }
.doc-ico { width: 30px; height: 34px; border: 1px solid var(--line); border-radius: 3px; display: grid; place-items: center; font-size: 8.5px; font-weight: 800; color: var(--red); flex: none; }
.doc { display: flex; gap: 12px; align-items: center; }

/* ===== Préventif ===== */
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; }
.view-switch button { background: none; border: 0; padding: 0 14px; height: 34px; font-size: 13px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 8px; }
.view-switch button + button { border-left: 1px solid var(--line); }
.view-switch button svg { width: 15px; height: 15px; }
.view-switch button.active { background: var(--brand-50); color: var(--brand); font-weight: 600; }
.trigger { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; }
.trigger svg { width: 14px; height: 14px; color: var(--ink-2); }
.reg { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 3px; background: #e8ecee; color: #4b5a63; margin-left: 6px; vertical-align: 1px; }
.status.late { background: var(--red-50); color: var(--red); }
.status.soon { background: #f4ecdf; color: var(--amber); }
.status.ok { background: var(--green-50); color: var(--brand); }

.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 16px; overflow: hidden; }
.cal-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cal-head h2 { font-size: 15px; font-weight: 600; text-transform: capitalize; min-width: 140px; }
.cal-head .nav-btns { display: flex; gap: 4px; }
.cal-head .nav-btns button { width: 30px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 4px; display: grid; place-items: center; color: var(--ink-2); }
.cal-head .nav-btns button svg { width: 15px; height: 15px; }
.cal-head .today-btn { height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 4px; padding: 0 12px; font-size: 12.5px; }
.cal-head .legend { margin-left: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 8px 10px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line); background: #fafbfb; }
.cal-day { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: #fafbfb; }
.cal-day.out .num { color: #b9bebe; }
.cal-day.we { background: #fbfbfb; }
.cal-day .num { font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 2px 4px; align-self: flex-start; border-radius: 10px; }
.cal-day.today .num { background: var(--brand); color: #fff; padding: 2px 7px; }
.ev { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--brand); background: var(--brand-50); color: var(--ink); font-size: 11.5px; font-weight: 500; padding: 3px 6px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.late { border-color: var(--red); background: var(--red-50); }
.ev.soon { border-color: var(--amber); background: #f4ecdf; }
.ev.done { border-color: #b9bebe; background: #f1f2f2; color: var(--ink-2); text-decoration: line-through; }
.ev:hover { filter: brightness(.97); }
.more-ev { font-size: 11px; color: var(--ink-2); padding: 0 6px; background: none; border: 0; text-align: left; }
.checklist { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.checklist li { counter-increment: s; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.freq-row { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.check-inline { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; }
.check-inline input { width: 16px !important; height: 16px; accent-color: var(--brand); }

@media (max-width: 760px) {
  .cal-day { min-height: 64px; padding: 4px 3px; }
  .ev { font-size: 0; padding: 0; height: 6px; border-left: 0; border-radius: 3px; background: var(--brand); }
  .ev.late { background: var(--red); } .ev.soon { background: var(--amber); } .ev.done { background: #b9bebe; }
  .cal-head { flex-wrap: wrap; }
  .cal-head .legend { margin-left: 0; width: 100%; }
  .cal-dow { padding: 6px 4px; font-size: 10px; text-align: center; }
}

/* ===== Stocks ===== */
.qty { display: inline-flex; align-items: center; gap: 10px; min-width: 130px; }
.qty b { min-width: 34px; text-align: right; font-weight: 600; }
.qty .lvl { position: relative; width: 70px; height: 6px; border-radius: 4px; background: var(--line); }
.qty .lvl i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--brand); }
.qty .lvl s { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); text-decoration: none; }
.qty.low .lvl i { background: var(--amber); }
.qty.out .lvl i { background: var(--red); }
.qty.out b { color: var(--red); }
.num-cell { text-align: right; font-variant-numeric: tabular-nums; }
th.num-cell { text-align: right; }
.status.low { background: #f4ecdf; color: var(--amber); }
.status.out { background: var(--red-50); color: var(--red); }
.status.order { background: #e5edf3; color: #2f5d7c; }
.mvt { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.mvt:last-child { border-bottom: 0; }
.mvt .ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--green-50); color: var(--brand); }
.mvt.out .ico { background: var(--red-50); color: var(--red); }
.mvt.inv .ico { background: #e8ecee; color: #4b5a63; font-size: 11px; }
.mvt small { display: block; color: var(--ink-2); font-size: 12px; }
.mvt .q { font-weight: 700; font-variant-numeric: tabular-nums; }
.mvt.out .q { color: var(--red); }
.mvt.in .q { color: var(--brand); }
.big-stock { display: flex; align-items: flex-end; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fafbfb; }
.big-stock strong { font-size: 32px; font-weight: 600; line-height: 1; }
.big-stock small { color: var(--ink-2); font-size: 12.5px; display: block; margin-top: 6px; }
.big-stock .qty { margin-left: auto; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--ink-2); }
.big-stock .qty .lvl { width: 150px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { font-size: 12.5px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.chips a:hover { border-color: var(--brand); color: var(--brand); }

/* ===== Techniciens ===== */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 16px; }
.member { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.member:hover { border-color: #cfd4d6; box-shadow: 0 6px 18px rgba(16,24,32,.06); }
.member-top { display: flex; gap: 12px; align-items: center; }
.member .avatar, .avatar.lg { width: 42px; height: 42px; font-size: 14px; background: var(--brand-50); color: var(--brand); border-color: transparent; position: relative; flex: none; }
.avatar .pres { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; background: var(--brand); }
.avatar .pres.busy { background: var(--amber); }
.avatar .pres.away { background: #b9bebe; }
.member-top b { display: block; font-size: 14.5px; font-weight: 600; }
.member-top small { color: var(--ink-2); font-size: 12.5px; }
.presence { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.skills { display: flex; flex-wrap: wrap; gap: 5px; }
.skill { font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 3px; background: #eef0f0; color: var(--ink-2); }
.load { display: grid; gap: 6px; font-size: 12px; color: var(--ink-2); }
.load-row { display: flex; justify-content: space-between; }
.load-row b { color: var(--ink); font-weight: 600; }
.load .bar { margin: 0; height: 5px; }
.load.high .bar i { background: var(--amber); }
.member-foot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; font-size: 12px; color: var(--ink-2); }
.member-foot b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.warn-line { font-size: 12px; color: var(--amber); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.warn-line.red { color: var(--red); }

.licence-banner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-top: 16px; }
.licence-banner .lic-count { font-size: 24px; font-weight: 600; }
.licence-banner .lic-count small { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.licence-banner .bar { width: 220px; margin: 8px 0 0; height: 6px; }
.licence-banner p { font-size: 13px; color: var(--ink-2); max-width: 420px; }
.licence-banner .btn { margin-left: auto; }
.role { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 3px; background: #eef0f0; color: var(--ink-2); white-space: nowrap; }
.role.admin { background: var(--brand-50); color: var(--brand); }
.role.manager { background: #e5edf3; color: #2f5d7c; }
.role.op { background: #fff; border: 1px dashed var(--line); }
.lic { font-size: 12.5px; }
.lic.free { color: var(--muted); }
.habil { list-style: none; padding: 0; margin: 0; }
.habil li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.habil li:last-child { border-bottom: 0; }
.habil small { display: block; color: var(--ink-2); font-size: 12px; }
.habil .exp { font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.habil .exp.soon { color: var(--amber); }
.habil .exp.late { color: var(--red); }
.profile { display: flex; gap: 14px; align-items: center; }
.profile .avatar.lg { width: 52px; height: 52px; font-size: 16px; }
.profile p { font-size: 13px; color: var(--ink-2); }
.skill-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-pick label { display: block !important; cursor: pointer; }
.skill-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.skill-pick span { display: block; font-size: 12.5px; font-weight: 500; padding: 5px 10px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-2); }
.skill-pick input:checked + span { background: var(--brand-50); border-color: var(--brand); color: var(--brand); }
.skill-pick input:focus-visible + span { outline: 2px solid var(--brand); }
.notice { font-size: 12.5px; padding: 10px 12px; border-radius: 4px; background: #f4ecdf; color: var(--amber); }

/* ===== Rapports ===== */
:root { --s1: #00876c; --s2: #4a7fd0; --s3: #c0862a; } /* palette graphique validée (CVD + contraste) */
.kpi-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 24px; }
.kpi-row .kpi strong { font-size: 23px; }
.kpi small .up { color: var(--brand); font-weight: 600; }
.kpi small .down { color: var(--red); font-weight: 600; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.chart-card.wide { grid-column: 1 / -1; }
.chart-card .block-head { align-items: flex-start; }
.chart-card .block-head p { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.chart-card svg { width: 100%; height: auto; display: block; margin-top: 12px; overflow: visible; }
.chart-card svg text { font-family: var(--font); font-size: 10.5px; fill: var(--ink-2); }
.chart-card svg .lbl { fill: var(--ink); font-weight: 600; }
.chart-card svg .grid line { stroke: var(--line); }
.chart-card .legend i.s1 { background: var(--s1); } .chart-card .legend i.s2 { background: var(--s2); } .chart-card .legend i.s3 { background: var(--s3); }
.chart-card .legend i.ref { background: none; border-top: 2px dashed var(--muted); height: 0; width: 14px; border-radius: 0; }
.hit { fill: transparent; cursor: crosshair; }
.hbar-hit { fill: transparent; }
.tooltip b { display: block; margin-bottom: 2px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 6px; }
.tooltip .tt-row i { width: 8px; height: 8px; border-radius: 2px; }
.reports-list { list-style: none; padding: 0; margin: 12px 0 0; }
.reports-list li { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.reports-list li:last-child { border-bottom: 0; }
.reports-list b { font-size: 13.5px; display: block; }
.reports-list small { font-size: 12px; color: var(--ink-2); }
.table-toggle { background: none; border: 0; color: var(--brand); font-size: 12.5px; font-weight: 600; padding: 0; }
.data-table { margin-top: 12px; font-size: 12.5px; min-width: 0 !important; }
.data-table td, .data-table th { padding: 6px 8px; }

/* ===== Paramètres ===== */
.settings { display: grid; grid-template-columns: 210px 1fr; gap: 24px; margin-top: 24px; align-items: start; padding-bottom: 80px; }
.settings > * { min-width: 0; }
.set-nav { position: sticky; top: 83px; display: grid; gap: 2px; }
.set-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 4px; font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.set-nav a svg { width: 16px; height: 16px; flex: none; }
.set-nav a:hover { background: #fff; color: var(--ink); }
.set-nav a.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: inset 2px 0 0 var(--brand); }
.set-section { display: grid; gap: 16px; }
.set-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.set-card > header { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.set-card > header h2 { font-size: 15px; font-weight: 600; }
.set-card > header p { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.set-body { padding: 20px 22px; display: grid; gap: 18px; }
.set-body label:not(.switch):not(.check-inline) { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.set-body input:not([type=checkbox]):not([type=radio]), .set-body select, .set-body textarea { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 4px; padding: 9px 12px; background: #fff; width: 100%; color: var(--ink); }
.set-body input:focus, .set-body select:focus, .set-body textarea:focus { outline: 3px solid var(--brand-50); border-color: var(--brand); }
.set-body input[readonly] { background: #fafbfb; color: var(--ink-2); }
.set-body .hint { font-size: 12px; color: var(--ink-2); font-weight: 400; }
.form-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row b { font-size: 13.5px; font-weight: 600; display: block; }
.set-row small { font-size: 12.5px; color: var(--ink-2); }
.set-row select { width: auto !important; min-width: 160px; }
.lock { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 3px; background: #e5edf3; color: #2f5d7c; margin-left: 8px; vertical-align: 1px; }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: #cfd4d6; border-radius: 22px; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.switch input:disabled + span { opacity: .45; }

.logo-up { display: flex; align-items: center; gap: 16px; }
.logo-prev { width: 64px; height: 64px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; overflow: hidden; flex: none; }
.logo-prev img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

.zone-list { display: flex; flex-wrap: wrap; gap: 8px; }
.zone-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; background: #fff; }
.zone-chip small { color: var(--muted); font-size: 11.5px; }
.zone-chip button { border: 0; background: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); padding: 0; }
.zone-chip button:hover { background: var(--red-50); color: var(--red); }
.zone-chip button svg { width: 12px; height: 12px; }
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; }
.site-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.site-item:last-child { border-bottom: 0; }
.site-item b { font-size: 14px; display: block; }
.site-item small { font-size: 12.5px; color: var(--ink-2); }

.plan-now { display: grid; grid-template-columns: 1.3fr 1fr 1fr; }
.plan-now > div { padding: 20px 22px; border-right: 1px solid var(--line); }
.plan-now > div:last-child { border-right: 0; }
.plan-now small { font-size: 12.5px; color: var(--ink-2); display: block; }
.plan-now strong { font-size: 22px; font-weight: 600; display: block; margin-top: 4px; }
.plan-now .bar { display: block; margin: 10px 0 0; height: 6px; }
.plans-cmp { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 20px 22px; }
.plans-cmp .opt { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.plans-cmp .opt.cur { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.plans-cmp .opt b { font-size: 15px; }
.plans-cmp .opt .p { font-size: 18px; font-weight: 700; }
.plans-cmp .opt ul { margin: 4px 0 10px; padding-left: 16px; color: var(--ink-2); }
.plans-cmp .opt .btn { margin-top: auto; width: 100%; }
.plans-cmp .opt .btn[disabled] { opacity: .6; cursor: default; }
.notif-table { width: 100%; min-width: 0 !important; border-collapse: collapse; font-size: 13px; }
.notif-table th { background: none; font-size: 12px; color: var(--ink-2); padding: 12px 22px; border-bottom: 1px solid var(--line); text-align: left; }
.notif-table th:not(:first-child), .notif-table td:not(:first-child) { text-align: center; width: 110px; }
.notif-table td { padding: 12px 22px; border-bottom: 1px solid var(--line); }
.notif-table tr:last-child td { border-bottom: 0; }
.notif-table td:first-child { font-weight: 400; }
.notif-table td b { font-weight: 600; display: block; }
.notif-table td small { color: var(--ink-2); font-size: 12px; }
.danger-zone { border-color: #ecc9c5; }
.btn-danger { background: #fff; border-color: #ecc9c5; color: var(--red); }
.btn-danger:hover { background: var(--red-50); }

.save-bar { position: fixed; left: 220px; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16,24,32,.06); padding: 12px 32px; display: flex; align-items: center; gap: 12px; transform: translateY(100%); transition: transform .2s; }
.save-bar.show { transform: none; }
.save-bar.show ~ .toast { bottom: 80px; }
.save-bar p { font-size: 13.5px; font-weight: 600; margin-right: auto; display: flex; align-items: center; gap: 8px; }

@media (max-width: 1100px) { .form-3 { grid-template-columns: 1fr 1fr; } .plans-cmp { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .settings { grid-template-columns: 1fr; }
  .set-nav { position: static; display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .set-nav a { white-space: nowrap; }
  .set-nav a.active { box-shadow: inset 0 -2px 0 var(--brand); }
  .form-3 { grid-template-columns: 1fr; }
  .plan-now { grid-template-columns: 1fr; }
  .plan-now > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .set-row { padding: 14px 16px; flex-wrap: wrap; }
  .set-row > div { flex: 1 1 200px; }
  .set-body, .set-card > header { padding-left: 16px; padding-right: 16px; }
  .notif-table th, .notif-table td { padding: 10px 12px; }
  .notif-table th:not(:first-child), .notif-table td:not(:first-child) { width: 64px; }
  .save-bar { left: 0; padding: 12px 16px; }
}

.view-switch button { white-space: nowrap; }
.mini-select { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; background: #fff; max-width: 100%; }
.alerts li a { display: block; }
.alerts li a:hover b { color: var(--brand); }
.page-head .actions { flex-wrap: wrap; }
.chart-scroll { overflow-x: auto; }

@media (max-width: 1100px) { .kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .report-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .chart-card .block-head { flex-wrap: wrap; }
  .chart-scroll svg { min-width: 600px; } /* graphiques mensuels : défilement horizontal plutôt que texte illisible */
}
@media print {
  .sidebar, .topbar, .page-head .actions, .no-print, .toast, .tooltip { display: none !important; }
  .app { display: block; }
  body.panel { background: #fff; }
  .content { padding: 0; max-width: none; }
  .chart-card, .kpi, .list-card { break-inside: avoid; }
  .report-grid { grid-template-columns: 1fr 1fr; }
  .print-head { display: block !important; }
}

@media (max-width: 1100px) {
  .split-list { grid-template-columns: 1fr; }
  .tree { position: static; display: flex; gap: 6px; overflow-x: auto; padding: 8px; scrollbar-width: none; }
  .tree h3 { display: none; }
  .tree button, .tree button.sub { width: auto; white-space: nowrap; padding: 7px 12px; }
  .tree button svg { display: none; }
}

@media (max-width: 860px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-strip div:nth-child(2) { border-right: 0; }
  .stat-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .filters .search { width: 100%; }
  .filters select { flex: 1; min-width: 140px; }
  .filters .result { margin-left: 0; width: 100%; }
  .form-row { grid-template-columns: 1fr; }
}

/* Compte créé : identifiants à transmettre */
.temp-pass { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; background: var(--brand-50); border: 1px solid #bfe0d6; border-radius: 6px; padding: 14px 16px; }
.temp-pass span { display: grid; gap: 2px; }
.temp-pass small { font-size: 11.5px; color: var(--ink-2); }
.temp-pass b { font-size: 15px; word-break: break-all; }
.temp-pass .btn { margin-left: auto; }
.inline-edit { display: flex; gap: 6px; }
.inline-edit input { flex: 1; min-width: 0; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; }
.skill.toggle { cursor: pointer; border: 1px dashed transparent; }
.skill.toggle.off { background: #fff; border-color: var(--line); color: var(--muted); }
.cert-form { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cert-form input { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 4px; padding: 6px 8px; }
.cert-form input[name=name] { flex: 1; min-width: 160px; }
.habil .del { background: none; border: 0; color: var(--muted); padding: 2px 6px; font-size: 16px; line-height: 1; }
.habil .del:hover { color: var(--red); }
.drawer-body > *, .meta > div { min-width: 0; }
.meta .mini-select, .inline-edit { width: 100%; }
