/* Propriétés et vues des bases de données. */
.pill { display: inline-block; padding: 0 7px; border-radius: 4px; font-size: 13px; line-height: 20px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.c0 { background: var(--c0); } .c1 { background: var(--c1); } .c2 { background: var(--c2); } .c3 { background: var(--c3); }
.c4 { background: var(--c4); } .c5 { background: var(--c5); } .c6 { background: var(--c6); } .c7 { background: var(--c7); }
.props { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; }
.prop { display: flex; align-items: center; min-height: 32px; }
.prop-n { width: 170px; flex: none; text-align: left; color: var(--muted); padding: 4px; border-radius: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.prop-n:hover, .prop-add:hover { background: var(--hover); }
.prop-v { flex: 1; min-width: 0; }
.prop-add { padding: 4px 6px; border-radius: 4px; font-size: 14px; }
.cell { width: 100%; border: 0; background: transparent; padding: 5px 8px; outline: none; border-radius: 4px; min-height: 32px; text-align: left; }
.cell:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.cell:hover { background: var(--hover); }
.cell.pills { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cell-url { display: flex; align-items: center; }
.cell-url a { padding: 0 8px; text-decoration: none; color: var(--accent); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0 8px; vertical-align: middle; }

/* ---------- bases de données ---------- */
.db-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.tabs { display: flex; flex-wrap: wrap; flex: 1; }
.tab { padding: 6px 10px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-color: var(--text); font-weight: 600; }
.db-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 4px 0; font-size: 13px; }
.db-opt { display: flex; align-items: center; gap: 4px; color: var(--muted); white-space: nowrap; }
.db-opt select { border: 1px solid var(--line); border-radius: 5px; padding: 3px 4px; background: var(--bg); max-width: 130px; }
.db-opt input[type=checkbox] { margin: 0 2px; }
.filter { width: 130px; }
.need { text-align: center; padding: 40px 20px; border: 1px dashed var(--line); border-radius: 8px; }

.tbl-wrap { overflow-x: auto; }
.tbl { border-collapse: collapse; min-width: 100%; }
.tbl th, .tbl td { border: 1px solid var(--line); padding: 0; min-width: 130px; height: 34px; }
.tbl th:first-child, .tbl td:first-child { border-left: 0; }
.tbl th:last-child, .tbl td:last-child { border-right: 0; }
.tbl th { font-weight: 500; color: var(--muted); text-align: left; font-size: 14px; white-space: nowrap; }
.tbl th button { width: 100%; text-align: left; padding: 6px 8px; height: 100%; }
.tbl th button:hover { background: var(--hover); }
.th-name { padding: 6px 8px !important; min-width: 260px !important; }
.th-add, .td-x { min-width: 40px !important; width: 40px; text-align: center !important; }
.th-add button { text-align: center !important; }
.td-name { position: relative; }
.cell.name { font-weight: 500; padding-right: 86px; }
.open { position: absolute; right: 6px; top: 5px; font-size: 12px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--muted); opacity: 0; }
tr:hover .open, .open:focus { opacity: 1; }
.td-x .ib { opacity: 0; } tr:hover .td-x .ib { opacity: 1; }
.row-add { display: block; width: 100%; text-align: left; padding: 7px 8px; border-radius: 4px; }
.row-add:hover { background: var(--hover); }
.count { font-size: 12px; padding: 4px 8px; }

.board { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 20px; }
.col { width: 270px; flex: none; border-radius: 8px; padding: 6px; background: var(--side); }
.col.over, .cal-day.over, .wk-slot.over, .wk-ad.over { outline: 2px solid var(--accent); outline-offset: -2px; }
.col-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px 8px; font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; cursor: pointer; box-shadow: 0 1px 2px rgba(15, 15, 15, .06); }
.card:hover { border-color: var(--muted); }
.card-t { font-weight: 500; word-break: break-word; }
.card-m { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.meta { font-size: 12px; color: var(--muted); }
.col-add { flex: none; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.col-add:hover { background: var(--hover); }

.cal-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cal-nav strong { font-size: 16px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.cal-dow { font-size: 12px; text-align: right; padding: 2px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 112px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3px; }
.cal-day.out { background: var(--side); }
.cal-day.out .num { color: var(--muted); }
.cal-d { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; height: 26px; }
.num { font-size: 13px; padding: 0 5px; }
.today .num { background: var(--danger); color: #fff; border-radius: 10px; }
.cal-plus { opacity: 0; } .cal-day:hover .cal-plus { opacity: 1; }
.chip { font-size: 12px; line-height: 18px; padding: 2px 6px; border-radius: 4px; margin-top: 2px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chip:hover, .wk-ev:hover { filter: brightness(.95); }

.wk-scroll { overflow-x: auto; }
.wk { min-width: 760px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.wk-row { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.wk-head, .wk-all { border-bottom: 1px solid var(--line); }
.wk-dh { text-align: center; padding: 6px 0; font-weight: 600; font-size: 13px; border-left: 1px solid var(--line); }
.wk-gut { font-size: 11px; text-align: right; padding-right: 6px; }
.wk-all .wk-gut { padding-top: 6px; }
.wk-ad { min-height: 30px; border-left: 1px solid var(--line); padding: 2px; cursor: pointer; }
.wk-hour { transform: translateY(-8px); }
.wk-hour:first-child { visibility: hidden; }
.wk-col { position: relative; border-left: 1px solid var(--line); }
.wk-slot { border-bottom: 1px solid var(--line); cursor: pointer; }
.wk-slot:last-of-type { border-bottom: 0; }
.wk-slot:hover { background: var(--hover); }
.wk-ev { position: absolute; border-radius: 5px; padding: 2px 6px; font-size: 12px; line-height: 1.3; overflow: hidden; cursor: pointer; border-left: 3px solid rgba(0, 0, 0, .25); display: flex; flex-direction: column; }
.wk-ev b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.wk-ev span { opacity: .75; white-space: nowrap; }
