.views { display: grid; gap: 4px; margin-bottom: 28px; }
.views .theme { font-weight: 800; }
.themes #themes .theme { overflow-wrap: anywhere; }
.themes .section-title { margin-bottom: 8px; }
.catalogue-tools { margin-bottom: 26px; }
.catalogue-tools .filters { margin-bottom: 8px; }
.catalogue-tools .filters label { flex: 1 1 175px; }
.catalogue-tools select { width: 100%; background: white; }
.library-heading .heading-actions { flex-shrink: 0; }
.library-heading p { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.book-list { background: white; border-radius: var(--radius); }
.book-row { display: grid; grid-template-columns: 66px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 22px; border-bottom: 1px solid var(--line); }
.book-row:last-child { border-bottom: 0; }
.book-cover { width: 66px; height: 88px; object-fit: contain; background: var(--accent-soft); border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.book-cover svg { width: 32px; height: 32px; }
.book-open { display: block; text-align: left; background: transparent; border: 0; padding: 0; min-height: 46px; font-size: 1.08rem; line-height: 1.35; overflow-wrap: anywhere; }
.book-open:hover { background: transparent; color: var(--accent); }
.book-meta { color: var(--muted); font-size: .85rem; margin-top: 3px; overflow-wrap: anywhere; }
.location { display: flex; gap: 7px; align-items: baseline; color: var(--ink); font-size: .87rem; margin-top: 9px; overflow-wrap: anywhere; }
.location svg { flex-shrink: 0; align-self: center; }
.book-actions { display: grid; justify-items: end; gap: 10px; }
.availability { color: var(--green); font-size: .82rem; font-weight: 700; }
.availability.unavailable { color: var(--amber); }
.tags { margin-top: 9px; }
.view-heading { margin-bottom: 28px; }
.view-heading > button { margin-bottom: 20px; }
.view-heading p { color: var(--muted); margin-top: 10px; }
.book-detail { display: grid; grid-template-columns: 135px minmax(0,1fr); gap: 28px; align-items: start; }
.book-detail .book-cover { width: 135px; height: 180px; }
.book-detail h1 { overflow-wrap: anywhere; }
.cover-quick { display: grid; gap: 8px; justify-items: center; cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--accent); text-align: center; }
.cover-quick:hover span, .cover-quick:focus-within span { text-decoration: underline; }
.cover-quick:focus-within .book-cover { outline: 3px solid var(--accent); outline-offset: 2px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .75fr); gap: 34px; margin-top: 32px; }
.paper { background: white; border-radius: var(--radius); padding: 24px; min-width: 0; }
.paper h2 { margin-bottom: 16px; }
.detail-layout section + section { margin-top: 30px; }
.detail-actions, .document-actions, .inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-actions { margin-top: 20px; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { padding: 14px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.file-list li:first-child { padding-top: 0; }
.file-list li:last-child { border: 0; }
.file-list a { display: inline-block; padding: 8px 0; font-weight: 700; }
.file-list small { display: block; color: var(--muted); }
.loan { padding: 18px 0; border-bottom: 1px solid var(--line); }
.loan:last-child { border: 0; padding-bottom: 0; }
.loan p { overflow-wrap: anywhere; }
.loan .inline-actions { margin-top: 12px; }
.loan .tag { margin-top: 8px; }
.loan-title { display: block; font-weight: 800; }
.borrower { display: grid; gap: 14px; }
.borrower-field { display: flex; align-items: center; gap: 10px; }
.borrower-field input { flex: 1; min-width: 0; }
.student-photo { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
.student-photo:empty { display: none; }
.student-photo img { width: 100%; height: 100%; object-fit: cover; }
.student-picker { display: grid; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--ground); }
.student-picker[hidden] { display: none; }
.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 264px; overflow-y: auto; padding: 2px; }
.student { display: grid; justify-items: center; gap: 6px; min-width: 0; padding: 10px 4px; font-size: .82rem; background: white; border: 1px solid var(--line); }
.student > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student .student-photo { width: 52px; height: 52px; }
.student[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.loan-detail { font-size: .86rem; color: var(--muted); margin-top: 4px; }
.loan-history { margin-top: 24px; }
.loan-history summary { font-size: .95rem; }
.loan-list { padding: 6px 24px; }
.loan-list .loan { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; align-items: center; }
.loan-list .inline-actions { margin-top: 0; }
.editor { max-width: 850px; }
.editor section + section { margin-top: 32px; padding-top: 26px; border-top: 1px solid var(--line); }
.editor h2 { margin-bottom: 20px; }
.editor .form-grid { margin-top: 18px; }
.editor input:not([type=checkbox]), .editor textarea { width: 100%; }
.editor fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.editor legend { font-size: .9rem; font-weight: 700; margin-bottom: 8px; }
.checkboxes { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.check { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 4px 0; font-weight: 400; overflow-wrap: anywhere; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
.inline-create { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.inline-create input { flex: 1; min-width: 0; }
.inline-create button { flex-shrink: 0; }
.editor .help { margin-top: 8px; font-weight: 400; }
.editor .file-list { margin-top: 16px; }
.attachment-edit { display: grid; grid-template-columns: minmax(0,1fr) 46px; gap: 10px; margin-top: 12px; align-items: end; }
.editor-footer { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 28px; }
.cover-edit { display: flex; flex-wrap: wrap; gap: 16px; align-items: start; }
.cover-edit > div { flex: 1 1 180px; }
.cover-edit .book-cover { flex: 0 0 66px; }
.management-group + .management-group { margin-top: 32px; }
.management-group h3 { margin-bottom: 14px; }
.group-row { align-items: center; }
.group-row form { display: flex; flex: 1; gap: 8px; min-width: 0; }
.group-row input { width: 100%; min-width: 0; }
.group-row button { flex-shrink: 0; }
.group-row .icon-button { font-size: 1.1rem; }
.success { background: #e7f3eb; color: #276344; padding: 14px 30px; }
#message a { display: inline-block; margin-left: 8px; color: inherit; }
#message { overflow-wrap: anywhere; }
#confirmation { width: min(520px, calc(100% - 32px)); }
.print-only { display: none; }
@media (max-width: 1050px) {
 .detail-layout { grid-template-columns: 1fr; gap: 24px; }
 .book-row { grid-template-columns: 55px minmax(0,1fr); gap: 16px; padding: 18px; }
 .book-row .book-cover { width: 55px; height: 76px; }
 .book-actions { grid-column: 2; justify-items: start; display: flex; align-items: center; flex-wrap: wrap; }
 .loan-list .loan { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
 .views { display: flex; margin-bottom: 16px; gap: 8px; }
 .views .theme { width: auto; flex: 1; font-size: .85rem; }
 .views .count { margin-left: 8px; }
 .themes .section-title { margin: 0; }
 .themes .section-title h2 { font-size: .85rem; }
 .themes #themes { margin-top: 4px; }
 .library { padding: 26px 16px 48px; }
 .catalogue-tools .filters label { flex-basis: 100%; }
 .book-row { padding: 16px; gap: 13px; }
 .book-open { font-size: 1rem; }
 .book-detail { grid-template-columns: 75px minmax(0,1fr); gap: 16px; }
 .book-detail .book-cover { width: 75px; height: 104px; }
 .book-detail h1 { font-size: 1.55rem; }
 .book-detail .detail-actions { margin-top: 12px; }
 .paper { padding: 20px 16px; }
 .editor .form-grid { grid-template-columns: 1fr; }
 .group-row { flex-wrap: wrap; }
 .group-row form { flex-basis: 100%; }
 .editor-footer .primary { width: 100%; }
 .library-heading .heading-actions { width: 100%; }
 .sidebar-tools { margin-top: 16px; padding-top: 10px; }
 .success, .error { padding: 14px 16px; }
 .header-actions #etat { flex: 1; }
 .header-actions { width: 100%; }
}
@media print {
 .app-header, .themes, #message, .skip, .catalogue-tools, .heading-actions, .book-actions, .detail-actions, .view-heading > button, .inline-actions, dialog, .loan-history { display: none !important; }
 .workspace { display: block; }
 .library { padding: 0; }
 .book-row, .loan { break-inside: avoid; }
 .book-list, .paper { background: white; }
 .book-row { grid-template-columns: 55px minmax(0,1fr); }
 .detail-layout { display: block; }
 .paper { padding: 12px 0; }
 .print-only { display: block; }
 body { background: white; }
}
