.photo-library{--photo-ink:var(--mobile-ink,#172334);--photo-muted:var(--mobile-muted,#657184);--photo-surface:var(--mobile-surface,#fff);--photo-line:var(--mobile-line,#e5e9ef);--photo-blue:var(--mobile-blue,#2463eb);color:var(--photo-ink)}
.dark .photo-library{--photo-ink:#edf2f9;--photo-muted:#a2aec0;--photo-surface:#151f2e;--photo-line:#2b3748;--photo-blue:#8bb4ff}
.photo-library-path{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:4px}.photo-library-path button{min-height:44px;padding:8px;border-radius:10px;color:var(--photo-blue);max-width:100%;overflow-wrap:anywhere;text-align:left}.photo-library-help,.photo-library-status{font-size:13px;margin:4px 0 16px;color:var(--photo-muted)}
.photo-library>.grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr))!important;gap:16px!important}.photo-library-item{min-width:0;align-self:start}.photo-library-tile{border:1px solid var(--photo-line);background:var(--photo-surface);border-radius:16px;overflow:hidden}.photo-library-open{display:flex;flex-direction:column;align-items:stretch;width:100%;text-align:left;min-height:44px}.photo-library-open img{width:100%;aspect-ratio:4/3;object-fit:cover;max-height:200px}.photo-library-open strong{padding:10px 12px 0;font-size:15px;line-height:1.4;overflow-wrap:anywhere}.photo-library-open>span:last-child{padding:4px 12px 10px;font-size:13px;color:var(--photo-muted)}.photo-library-folder,.photo-library-file{padding:16px 12px!important;height:86px;font-size:40px;color:var(--photo-blue)!important;background:var(--mobile-blue-soft,#edf3ff)}
.photo-library-actions{display:flex;flex-wrap:wrap;gap:4px;padding:4px 8px}.photo-library-actions button{min-height:44px;padding:8px;border-radius:10px;color:var(--photo-blue);font-size:13px}.photo-library-actions button:disabled{opacity:.55;cursor:default}.photo-library-actions .photo-library-handle{min-width:44px;margin-left:auto;touch-action:none;cursor:grab;font-size:22px}.photo-library-expanded{grid-column:1/-1}.photo-library-expanded>.photo-library-tile{max-width:420px}.photo-library-details{padding-top:12px}.photo-library [data-drop-active=true]{outline:3px solid var(--photo-blue);outline-offset:3px;background:var(--mobile-blue-soft,#edf3ff)}.photo-library button:focus-visible,.photo-move-form :is(button,select):focus-visible{outline:3px solid var(--photo-blue,#2463eb);outline-offset:2px}
.photo-move-form{color:var(--mobile-ink,#172334)}.dark .photo-move-form{color:#edf2f9}.photo-move-form h2{font-size:20px;font-weight:600;overflow-wrap:anywhere}.photo-move-form p{margin:12px 0;font-size:14px}.photo-move-form label{display:block;margin:16px 0 8px;font-weight:600}.photo-move-form select{width:100%;min-height:48px;font-size:16px;border:1px solid var(--mobile-line,#e5e9ef);border-radius:10px;padding:8px;background:var(--mobile-surface,#fff);color:inherit}.photo-move-form .photo-library-actions{justify-content:flex-end;padding:16px 0 0}.photo-move-form .photo-library-primary{background:#2463eb;color:#fff;padding:8px 16px}.photo-library-error{color:#b91c1c}.dark .photo-library-error{color:#fca5a5}
@media(max-width:600px){.photo-library>.grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}.photo-library-open strong{font-size:14px;padding:8px 10px 0}.photo-library-open>span:last-child{padding:4px 10px 8px}.photo-library-actions{padding:2px 4px;gap:0}.photo-library-actions button{padding:6px;font-size:12px}.photo-library-actions .photo-library-handle{margin-left:0}.photo-library-expanded>.photo-library-tile{max-width:none}}
.dark dialog:has(.photo-move-form){background:#151f2e;color:#edf2f9}
@media(max-width:1366px){[data-help-module="photos"]>main>div:has(>button .text-blue-100){margin-bottom:12px}[data-help-module="photos"]>main>div>button:has(.text-blue-100){background:var(--mobile-blue-soft,#edf3ff);color:var(--mobile-blue,#2463eb);border:1px solid var(--mobile-line,#e5e9ef);box-shadow:none;padding:8px 12px}[data-help-module="photos"]>main>div>button:has(.text-blue-100) :is(.text-blue-100,.text-white){color:inherit}[data-help-module="photos"]>main>div>button:has(.text-blue-100) .text-\[10px\]{display:none}}
.photo-library-tile{position:relative}.photo-library-actions .photo-library-handle{position:absolute;top:4px;right:4px;display:flex;align-items:center;justify-content:center;margin:0;background:var(--photo-surface);border:1px solid var(--photo-line);border-radius:10px}.photo-library-open strong{padding-right:14px}.photo-library-open .photo-library-folder,.photo-library-open .photo-library-file{display:flex;align-items:center}
.photo-library-preview{position:relative;display:block;width:100%;aspect-ratio:4/3;max-height:200px;background:var(--mobile-soft,#f3f5f8);overflow:hidden}.photo-library-open .photo-library-preview{padding:0}.photo-library-preview img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.photo-library-preview[data-preview-state=loading] img{opacity:0}.photo-library-preview-message{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:12px;font-size:13px;line-height:1.5;text-align:center}

.photo-library-preview[data-preview-state=loading] .photo-library-preview-message{color:var(--photo-muted)}

.photo-library-handle { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none; }
.photo-library [data-drop-active=true]::after { content: "Déposer ici"; position: relative; display: block; padding: 8px; background: var(--mobile-blue-soft,#edf3ff); color: var(--photo-blue); font-size: 13px; font-weight: 600; text-align: center; }
.photo-library-status { position: fixed; top: calc(var(--app-header-height,64px) + 8px); left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); width: max-content; pointer-events: none; z-index: 70; padding: 10px 12px; border: 1px solid var(--photo-blue); border-radius: 10px; background: var(--photo-surface); color: var(--photo-blue); }
.mobile-priorities-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; }
.mobile-priorities-heading h2 { font-size: 18px; font-weight: 600; }

/* Management stays attached to its card, without enlarging the entire gallery. */
.photo-library .photo-library-expanded { grid-column:auto; }
.photo-library .photo-library-expanded>.photo-library-tile { max-width:none; }
.photo-library .photo-library-details { max-height:420px; overflow:auto; overscroll-behavior:contain; padding:10px; margin-top:8px; border:1px solid var(--photo-line); border-radius:14px; background:var(--photo-surface); }
.photo-library .photo-library-details img { max-height:160px; object-fit:contain; }
.photo-library .photo-library-details .aspect-square { aspect-ratio:4/3; max-height:160px; }
.photo-library .photo-library-details :is(h3,p) { overflow-wrap:anywhere; }
.photo-library .photo-library-details button { min-height:44px; }
.photo-library .photo-library-item { position:relative; }
.photo-library [data-drop-active=true]::after { position:absolute; inset:auto 4px 4px; z-index:3; border-radius:8px; pointer-events:none; }
.photo-library .photo-library-item[draggable=true]>.photo-library-tile { cursor:grab; }
.photo-library .photo-library-details > .group { padding:10px; height:auto; box-shadow:none; }
.photo-library .photo-library-details h3 { font-size:14px; line-height:1.5; }
.photo-library .photo-library-details .flex:has(>button) { flex-wrap:wrap; }
.photo-library .photo-library-details button { min-width:44px; opacity:1; }

.technical-drive { min-width: 0; }
.technical-drive button:focus-visible { outline: 2px solid var(--mobile-blue,#2463eb); outline-offset: 2px; }
@media(max-width:767px) {
 .technical-drive > .flex { gap: 8px; }
 .technical-drive > .flex.flex-col { padding: 12px; }
 .technical-drive > .flex.flex-col > div:first-child { flex-wrap: wrap; overflow: visible; row-gap: 4px; }
 .technical-drive h3 { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
 .technical-drive button { min-height: 44px; }
 .technical-drive .grid > .group:has(img) { padding: 10px; }
 .technical-drive .grid > .group:has(img) > div:first-child { flex-wrap: wrap; }
 .technical-drive .grid > .group:has(img) img { height: auto; aspect-ratio: 4/3; object-fit: contain; max-height: 220px; background: var(--mobile-soft,#f3f5f8); }
}

.dark .technical-drive .bg-white { background:var(--mobile-surface,#151f2e); color:var(--mobile-ink,#edf2f9); }
.dark .technical-drive :is(h3,.text-slate-900) { color:var(--mobile-ink,#edf2f9); }
@media(max-width:767px) {
 .technical-drive .grid > .group:has(img) { display:grid; grid-template-columns:88px minmax(0,1fr); gap:8px; align-items:start; }
 .technical-drive .grid > .group:has(img) > div:first-child { grid-column:2; grid-row:1; margin:0; }
 .technical-drive .grid > .group:has(img) > div:first-child > div:first-child { display:none; }
 .technical-drive .grid > .group:has(img) > div:has(>img) { grid-column:1; grid-row:1 / span 3; margin:0; }
 .technical-drive .grid > .group:has(img) img { aspect-ratio:1; width:88px; height:88px; object-fit:contain; }
 .technical-drive .grid > .group:has(img) > div:last-child { grid-column:2; grid-row:2; border:0; padding:0; }
 .technical-drive .grid > .group:has(img) > p { grid-column:2; }
}

/* Folder names stay fully readable; actions occupy their own row. */
.technical-drive .technical-folder-card { display:grid; grid-template-columns:36px minmax(0,1fr); align-items:start; gap:10px; box-shadow:none; min-height:112px; }
.technical-drive .technical-folder-card > div:last-child { grid-column:1 / -1; justify-content:flex-end; }
.technical-drive .technical-folder-card > div:last-child button { min-width:44px; min-height:44px; opacity:1; }
.technical-drive .technical-folder-name { display:block; overflow:visible; -webkit-line-clamp:unset; font-size:14px; line-height:1.5; font-weight:600; overflow-wrap:anywhere; }
.technical-drive .grid:has(>.technical-folder-card) { grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr)); }

.chat-message-text .chat-mention { display:inline; line-height:inherit; padding:1px 3px; -webkit-box-decoration-break:clone; box-decoration-break:clone; }
