/* Savoirs : notes partagées, documentation technique, pièces jointes (tablette d'abord : cibles tactiles >= 44 px). */
.sv-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sv-note { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface, transparent); cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sv-note:hover, .sv-note:focus-visible { border-color: var(--accent); outline: none; }
.sv-note.sv-pin { border-left: 4px solid var(--orange, #f2a900); }
.sv-note h4 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.sv-extrait { margin: 0; color: var(--muted, #888); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.sv-note footer { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.sv-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.sv-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--hover, rgba(127, 127, 127, .15)); }
.sv-liens { display: flex; flex-wrap: wrap; gap: 6px; }
.sv-chip { font-size: 12px; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--border); text-decoration: none; color: inherit; }
a.sv-chip:hover { border-color: var(--accent); }
.sv-sub { font-size: 12px; color: var(--muted, #888); }

/* Texte riche (affichage) */
.sv-rich { line-height: 1.55; overflow-wrap: anywhere; }
.sv-rich h3, .sv-rich h4 { margin: 14px 0 6px; }
.sv-rich p { margin: 0 0 10px; }
.sv-rich ul, .sv-rich ol { margin: 0 0 10px; padding-left: 22px; }
.sv-rich blockquote { margin: 0 0 10px; padding: 4px 12px; border-left: 3px solid var(--border); color: var(--muted, #888); }

/* Éditeur */
.sv-form input[type=text], .sv-form select { width: 100%; }
.sv-editor { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.sv-tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--hover, rgba(127, 127, 127, .08)); }
.sv-tools button { min-width: 40px; min-height: 36px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: inherit; cursor: pointer; font-size: 13px; }
.sv-tools button:hover { border-color: var(--accent); }
.sv-edit { min-height: 180px; max-height: 50vh; overflow: auto; padding: 10px 12px; outline: none; line-height: 1.5; }
.sv-edit:empty::before { content: attr(data-placeholder); color: var(--muted, #888); }
.sv-edit:focus { box-shadow: inset 0 0 0 2px var(--accent); }

/* Pièces jointes */
.sv-pj .panel-head { flex-wrap: wrap; gap: 8px; }
.sv-pj-btns { margin-left: auto; display: inline-flex; gap: 8px; flex-wrap: wrap; }
.sv-pj-btns .btn { cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; }
.sv-drop { border: 2px dashed transparent; border-radius: 8px; transition: border-color .15s; }
.sv-drop.sv-over { border-color: var(--accent); background: var(--hover, rgba(127, 127, 127, .08)); }
.sv-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.sv-file { position: relative; border: 1px solid var(--border); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sv-file-thumb { border: 0; padding: 0; background: var(--hover, rgba(127, 127, 127, .1)); border-radius: 8px; height: 120px; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; color: inherit; }
.sv-file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv-ico { font-weight: 700; font-size: 20px; letter-spacing: .04em; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: #fff; }
.sv-ico-pdf { background: #c0392b; } .sv-ico-mp4, .sv-ico-webm { background: #6c3fb5; } .sv-ico-docx { background: #2b579a; } .sv-ico-xlsx, .sv-ico-csv { background: #217346; } .sv-ico-pptx { background: #d24726; } .sv-ico-txt { background: #666; }
.sv-file-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-file-sub { font-size: 11px; color: var(--muted, #888); }
.sv-cote { align-self: flex-start; max-width: 100%; min-height: 24px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.sv-cote-client { border-color: oklch(62% 0.15 255); color: oklch(52% 0.16 255); }
.sv-cote-fournisseur { border-color: oklch(66% 0.14 60); color: oklch(52% 0.14 60); }
.sv-cote-neutre { border-color: oklch(62% 0.14 145); color: oklch(46% 0.14 145); }
.sv-cote-interne { border-color: oklch(62% 0.15 26); color: oklch(50% 0.16 26); }
.sv-privee { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; }
.sv-file-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.sv-lightbox { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: 6px; }

/* Documentation */
.sv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.sv-chipbtn { min-height: 40px; padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: inherit; cursor: pointer; font-size: 13px; }
.sv-chipbtn span { opacity: .6; margin-left: 4px; }
.sv-chipbtn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.sv-docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sv-doc { border: 1px solid var(--border); border-radius: 10px; padding: 14px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sv-doc:hover, .sv-doc:focus-visible { border-color: var(--accent); outline: none; }
.sv-doc h4 { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.sv-doc-meta { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 760px) {
  .sv-notes, .sv-docs { grid-template-columns: 1fr; }
  .sv-files { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .sv-form .btn, .sv-form input, .sv-form select { min-height: 44px; }
}
.sv-pick { display: none; position: absolute; top: 10px; right: 10px; }
.sv-doc { position: relative; }
.sv-select .sv-pick { display: flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; margin: -8px -8px 0 0; }
.sv-select .sv-pick input { width: 20px; height: 20px; }
.sv-select .sv-doc { padding-right: 44px; }
.sv-selbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--accent); border-radius: 10px; position: sticky; top: 0; z-index: 5; background: var(--bg, #fff); }
.sv-selbar[hidden] { display: none; }
.sv-selbar-a { display: inline-flex; gap: 6px; flex-wrap: wrap; }

