/* Console v3 — Bibliothèque › Fonds. Grille de vignettes 16:9 ; la fenêtre de cadrage a ses
   propres styles (web/background-crop.js). */

.v3b svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.v3b-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.v3b-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; max-width: 660px; margin: 4px 0 24px; }
.v3b-notice p { flex: 1 1 260px; margin: 0; }
.v3b-notice > svg { flex: none; width: 18px; height: 18px; }
p.v3b-notice { display: block; }

.v3b-section { margin: 0 0 32px; }
.v3b-section-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; }
.v3b-section-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.v3b-count { color: var(--muted); font-size: 14px; font-weight: 600; }
.v3b-team-note { margin: -6px 0 14px; color: var(--muted); font-size: 13px; }

.v3b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 20px; align-items: start; max-width: 1240px; }
.v3b-empty { padding: 8px 0; }

/* Carte : vignette 16:9, nom, une ligne d'usage. Le menu « … » déborde de la carte. */
.v3b-card { position: relative; display: flex; flex-direction: column; overflow: visible; padding: 0; }
.v3b-card:has(details[open]) { z-index: 6; }
.v3b-visual { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-top-left-radius: inherit; border-top-right-radius: inherit;
  background: var(--surface-muted, #F8F7F4); }
.v3b-thumb { display: block; width: 100%; height: 100%; object-fit: cover; }
.v3b-empty-visual { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.v3b-empty-visual svg { width: 30px; height: 30px; }
.v3b-badge { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(16, 16, 14, .66); color: #fff; font-size: 11px; font-weight: 700; }
.v3b-busy { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; background: rgba(16, 16, 14, .5); color: #fff; font-size: 14px; font-weight: 600; text-align: center; }
.v3b-card.is-busy .v3b-busy { animation: v3b-pulse 1.6s ease-in-out infinite; }
@keyframes v3b-pulse { 50% { background: rgba(16, 16, 14, .38); } }
@media (prefers-reduced-motion: reduce) { .v3b-card.is-busy .v3b-busy { animation: none; } }

.v3b-body { display: grid; gap: 4px; padding: 12px 14px 14px; }
.v3b-heading { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.v3b-heading h3 { flex: 1; min-width: 0; margin: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.v3b-meta { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.v3b-limit { color: var(--ink); }
.v3b-card .avatar-actions-list { min-width: 200px; }
.v3b-menu-hint { max-width: 240px; margin: 2px 8px 6px; font-size: 12px; white-space: normal; }

/* « Ajouter un fond » : cadre 16:9 en tirets, carré central, signe plus. */
.v3b-add-visual { padding: 0; border: 0; color: inherit; font: inherit; cursor: pointer; }
.v3b-add-frame { position: absolute; inset: 10px; display: grid; place-items: center; border: 2px dashed var(--line-strong, #D9D6CF); border-radius: 8px; }
.v3b-add-square { position: absolute; top: 0; bottom: 0; left: 21.875%; width: 56.25%; border-left: 1px dashed var(--line-strong, #D9D6CF); border-right: 1px dashed var(--line-strong, #D9D6CF); }
.v3b-add-frame svg { position: relative; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--ink); color: var(--surface); stroke-width: 2.4;
  box-shadow: 0 8px 24px rgba(20, 20, 30, .18); transition: transform .15s ease; }
.v3b-add-visual:not(:disabled):hover .v3b-add-frame svg { transform: scale(1.06); }
.v3b-add-visual:focus-visible { outline: 3px solid var(--blue, #2454de); outline-offset: -3px; }
.v3b-add-visual:disabled { cursor: not-allowed; }
.v3b-add-visual:disabled .v3b-add-frame svg { background: var(--muted); box-shadow: none; }

/* Fenêtres : renommer, supprimer. */
.v3b-modal { display: grid; gap: 12px; }
.v3b-modal-error { margin: 0; color: var(--danger, #B42318); font-size: 14px; }
.v3b-field { display: grid; gap: 6px; }
.v3b-field-label { font-size: 14px; font-weight: 600; }
.v3b-field input { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong, #D9D6CF); border-radius: 10px; font: inherit; }

@media (max-width: 560px) {
  .v3b-grid { grid-template-columns: 1fr; }
}
