/* v2.6.1 : miniatures des images jointes et grand aperçu (technicien et portail). Variables des thèmes si présentes. */
.att-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 2px 0 6px; }
.att-thumb { display: flex; flex-direction: column; width: 168px; border: 1px solid var(--border, #DCE6F0); border-radius: 10px;
  overflow: hidden; background: var(--panel, #fff); text-decoration: none; color: inherit; transition: box-shadow .15s, border-color .15s; }
.att-thumb:hover, .att-thumb:focus-visible { border-color: var(--blue, #0079B6); box-shadow: 0 2px 10px rgba(4, 46, 110, .15); }
.att-thumb img { display: block; width: 100%; height: 120px; object-fit: cover; background: var(--bg, #F2F7FC); cursor: zoom-in; }
.att-thumb-name { font-size: 12px; padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted, #647892); }
.att-files { margin-top: 2px; }
@media (max-width: 560px) { .att-thumb { width: calc(50% - 5px); } .att-thumb img { height: 110px; } }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
dialog.lightbox::backdrop { background: rgba(6, 16, 34, .88); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 64px; box-sizing: border-box; }
.lightbox-inner img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; background: #fff; box-shadow: 0 8px 40px rgba(0, 0, 0, .5); }
.lightbox-bar { display: flex; align-items: center; gap: 14px; margin-top: 12px; color: #fff; font-size: 14px; flex-wrap: wrap; justify-content: center; }
.lightbox-bar a { color: #9AD5F4; }
.lightbox-btn { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 44px; height: 44px; border-radius: 50%;
  font-size: 24px; line-height: 44px; text-align: center; cursor: pointer; padding: 0; }
.lightbox-btn:hover, .lightbox-btn:focus-visible { background: rgba(255, 255, 255, .28); }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-btn[hidden] { display: none; }
@media (max-width: 560px) { .lightbox-inner { padding: 60px 8px 16px; } .lightbox-prev, .lightbox-next { top: auto; bottom: 14px; transform: none; } }

/* aperçu des images avant envoi (zone Pièces jointes) */
.attach-list li img.attach-prev { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 8px; border: 1px solid var(--border, #DCE6F0); }
