/* Navigateur de fichiers d'échange (shared/exchange-browser/exchange-browser.js) — suit le thème clair/sombre via les variables de theme.css */
.fxb { position: relative; display: flex; flex-direction: column; gap: 12px; font-size: var(--text-sm, 14px); color: var(--noir-focal, #141210); min-width: 0; }
.fxb * { box-sizing: border-box; }
.fxb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fxb-trail { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; color: var(--gris-moyen, #6b6560); }
.fxb-trail i { font-size: 14px; opacity: .6; }
.fxb-crumb { cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: background-color .15s, color .15s; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxb-crumb:hover { background: var(--gris-tres-clair, #f2efea); color: var(--noir-focal, #141210); }
.fxb-crumb.is-current { color: var(--noir-focal, #141210); cursor: default; }
.fxb-crumb.is-current:hover { background: none; }
.fxb-crumb.is-over, .fxb-row.is-over { background: var(--fp-tint, #f4ebdb); outline: 1px dashed var(--ocre-focal, #c4903a); }
.fxb-actions { display: flex; gap: 8px; }

.fxb-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--gris-clair, #dad6d0); border-radius: 999px; background: transparent; color: var(--noir-focal, #141210); font: inherit; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.fxb-btn:hover { border-color: var(--noir-focal, #141210); }
.fxb-btn:disabled { opacity: .45; cursor: default; }
.fxb-btn i { font-size: 16px; }
.fxb-primary { background: var(--noir-focal, #141210); color: var(--blanc-focal, #fff); border-color: transparent; }
.fxb-primary:hover { background: var(--ocre-focal, #c4903a); border-color: transparent; }
.fxb-danger { background: var(--rouge-alerte, #c4452f); color: #fff; border-color: transparent; }
.fxb-danger:hover { filter: brightness(1.1); border-color: transparent; }
.fxb-ib { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 4px; background: transparent; color: var(--gris-moyen, #6b6560); cursor: pointer; transition: background-color .15s, color .15s; }
.fxb-ib:hover { background: var(--gris-tres-clair, #f2efea); color: var(--noir-focal, #141210); }
.fxb-ib i { font-size: 16px; }
.fxb .fxb-ib.js-trash:hover { color: var(--rouge-alerte, #c4452f); }

.fxb-status { margin: 0; min-height: 0; font-size: 13px; color: var(--gris-moyen, #6b6560); }
.fxb-status:empty { display: none; }
.fxb-status.is-error { color: var(--rouge-alerte, #c4452f); }

.fxb-list { border: 1px solid var(--gris-clair, #dad6d0); border-radius: 4px; background: var(--fp-white, #fff); overflow: hidden; }
.fxb { --fxb-cols: 34px minmax(0, 1fr) 150px 120px 76px 96px 40px; }     /* icône · nom · type · auteur · taille · modifié · actions */
.fxb-row { user-select: none; -webkit-user-select: none; display: grid; grid-template-columns: var(--fxb-cols); align-items: center; column-gap: 12px; padding: 8px 12px; min-height: 52px; border-bottom: 1px solid var(--gris-clair, #dad6d0); transition: background-color .12s; }
.fxb-row:last-child { border-bottom: 0; }
.fxb-row:hover { background: var(--gris-tres-clair, #f7f5f1); }
.fxb-row.is-drag { opacity: .45; }
.fxb-row.is-busy { opacity: .6; pointer-events: none; }
.fxb-ico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 4px; background: var(--gris-tres-clair, #f2efea); color: var(--gris-moyen, #6b6560); }
.fxb-ico i { font-size: 18px; }
.fxb-t-folder { color: var(--ocre-focal, #c4903a); }
.fxb-t-pdf { color: #d6523f; }
.fxb-t-ppt { color: #d9792a; }
.fxb-t-doc { color: #4f7fe0; }
.fxb-t-xls { color: #2f9a60; }
.fxb-t-cad { color: #9a5fd0; }
.fxb-t-d3 { color: #1f9ea8; }
.fxb-t-img { color: #b9852f; }
.fxb-t-vid { color: #cf4f8c; }
.fxb-t-arc { color: #8d867d; }
.fxb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; color: var(--noir-focal, #141210); }
.fxb-name:focus-visible, .fxb-crumb:focus-visible { outline: 2px solid var(--ocre-focal, #c4903a); outline-offset: 2px; }
.fxb-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gris-moyen, #6b6560); font-variant-numeric: tabular-nums; font-size: 13px; }
.fxb-size { text-align: right; }
.fxb-date { text-align: right; }
.fxb-acts { justify-self: end; display: inline-flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.fxb-row:hover .fxb-acts, .fxb-row:focus-within .fxb-acts { opacity: 1; }
@media (hover: none) { .fxb-acts { opacity: 1; } }
.fxb-confirm { grid-column: 3 / -1; justify-self: end; display: inline-flex; align-items: center; gap: 8px; color: var(--gris-moyen, #6b6560); }
.fxb-edit { grid-column: 2 / -1; display: flex; gap: 8px; align-items: center; min-width: 0; }
.fxb-edit input { flex: 1; min-width: 0; padding: 7px 12px; border: 1px solid var(--noir-focal, #141210); border-radius: 4px; background: var(--fp-white, #fff); color: var(--noir-focal, #141210); font: inherit; }
.fxb-more { margin: 0; padding: 10px 14px; color: var(--gris-moyen, #6b6560); font-size: 13px; }

.fxb-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 20px; text-align: center; color: var(--gris-moyen, #6b6560); }
.fxb-empty i { font-size: 28px; }
.fxb-empty h4 { margin: 0; font-weight: 500; color: var(--noir-focal, #141210); }
.fxb-empty p { margin: 0; max-width: 420px; }
.fxb-skel { height: 52px; border-bottom: 1px solid var(--gris-clair, #dad6d0); background: linear-gradient(90deg, transparent, var(--gris-tres-clair, #f2efea), transparent); background-size: 200% 100%; animation: fxb-sh 1.4s infinite linear; } /* charte-ok : fonctionnel (lisibilité sur image, texture, sélecteur) */
@keyframes fxb-sh { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.fxb-uploads:empty { display: none; }
.fxb-uploads { display: flex; flex-direction: column; gap: 6px; }
.fxb-up { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; border: 1px solid var(--gris-clair, #dad6d0); border-radius: 4px; background: var(--fp-white, #fff); }
.fxb-up-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxb-up-state { flex: none; color: var(--gris-moyen, #6b6560); font-variant-numeric: tabular-nums; font-size: 13px; }
.fxb-bar-p { position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--gris-tres-clair, #f2efea); overflow: hidden; }
.fxb-bar-p span { display: block; height: 100%; background: var(--ocre-focal, #c4903a); transition: width .2s; }
.fxb-up.is-done i { color: var(--vert-validation, #3a9a62); }
.fxb-up.is-error { border-color: var(--rouge-alerte, #c4452f); }
.fxb-up.is-error i, .fxb-up.is-error .fxb-up-state { color: var(--rouge-alerte, #c4452f); }

.fxb-drop { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 2px dashed var(--ocre-focal, #c4903a); border-radius: 4px; background: color-mix(in srgb, var(--blanc-focal, #fff) 88%, transparent); text-align: center; z-index: 5; pointer-events: none; }
.fxb-drop i { font-size: 30px; color: var(--ocre-focal, #c4903a); }
.fxb-drop span { color: var(--gris-moyen, #6b6560); }
.fxb.is-dropping .fxb-drop { display: flex; }

/* Déplacer */
.fxb-mv { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 18, 16, .45); }
.fxb-mv-card { width: min(420px, 100%); max-height: 80vh; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 4px; background: var(--fp-white, #fff); color: var(--noir-focal, #141210); box-shadow: 0 0 0 1px var(--gris-clair); }
.fxb-mv-card h4 { margin: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxb-mv-trail { color: var(--gris-moyen, #6b6560); font-size: 13px; }
.fxb-mv-trail a, .fxb-mv-item { cursor: pointer; }
.fxb-mv-trail a:hover { color: var(--noir-focal, #141210); text-decoration: underline; }
.fxb-mv-list { overflow: auto; min-height: 120px; border: 1px solid var(--gris-clair, #dad6d0); border-radius: 4px; }
.fxb-mv-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--gris-clair, #dad6d0); }
.fxb-mv-item:last-child { border-bottom: 0; }
.fxb-mv-item:hover { background: var(--gris-tres-clair, #f2efea); }
.fxb-mv-none { margin: 0; padding: 24px; text-align: center; color: var(--gris-moyen, #6b6560); }
.fxb-mv-foot { display: flex; justify-content: flex-end; gap: 8px; }
.fxb-mv, .fxb-preview { font-size: 14px; }
.fxb-mv .fxb-btn { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--gris-clair, #dad6d0); border-radius: 999px; background: transparent; color: var(--noir-focal, #141210); font: inherit; cursor: pointer; }
.fxb-mv .fxb-primary { background: var(--noir-focal, #141210); color: var(--blanc-focal, #fff); border-color: transparent; }
.fxb-mv .fxb-btn:disabled { opacity: .45; cursor: default; }

/* Aperçu */
.fxb-preview { position: fixed; inset: 0; z-index: 10001; display: flex; flex-direction: column; background: #141210; color: #ece8e2; }
.fxb-pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.fxb-pv-bar strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxb-preview .fxb-ib { color: #ece8e2; }
.fxb-preview .fxb-ib:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.fxb-pv-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 16px 16px; }
.fxb-pv-body img, .fxb-pv-body video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.fxb-pv-body iframe { width: min(1000px, 100%); height: 100%; border: 0; border-radius: 4px; background: #fff; }
.fxb-pv-load { color: #b9b3aa; }

@media (max-width: 640px) {
    .fxb { --fxb-cols: 34px minmax(0, 1fr) 76px 40px; }
    .fxb-type, .fxb-by, .fxb-h-type, .fxb-h-by, .fxb-size, .fxb-h-size { display: none; }
    .fxb-confirm { grid-column: 3 / -1; }
    .fxb-btn span { display: none; }
    .fxb-btn { padding: 8px 12px; }
    .fxb-confirm { flex-wrap: wrap; justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) { .fxb-skel { animation: none; } }

/* En-têtes de colonnes (cliquables : tri) */
.fxb-head { min-height: 38px; padding-top: 4px; padding-bottom: 4px; background: var(--gris-tres-clair, #f7f5f1); }
.fxb-head:hover { background: var(--gris-tres-clair, #f7f5f1); }
.fxb-h { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; margin-left: -6px; border: 0; border-radius: 4px; background: transparent; color: var(--gris-moyen, #6b6560); font: inherit; font-size: 12px; letter-spacing: .02em; cursor: pointer; white-space: nowrap; min-width: 0; }
.fxb-h:hover, .fxb-h.is-sorted { color: var(--noir-focal, #141210); }
.fxb-h i { font-size: 12px; opacity: .45; }
.fxb-h.is-sorted i { opacity: 1; }
.fxb-h-size, .fxb-h-date { justify-self: end; margin-left: 0; margin-right: -6px; }
.fxb-h-size { flex-direction: row-reverse; }
.fxb-h-date { flex-direction: row-reverse; }
.fxb-pv-text { margin: 0; width: min(900px, 100%); max-height: 100%; overflow: auto; padding: 16px 20px; border-radius: 4px; background: #1b1916; color: #e8e4de; font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.fxb-pv-body audio { width: min(520px, 100%); }
.fxb-pv-load .fxb-btn { margin-top: 12px; border-color: rgba(255, 255, 255, .35); color: #ece8e2; }
.fxb-pv-bar { cursor: default; }

/* Squelette : mêmes colonnes que la liste, barres grises qui pulsent (utilisé au chargement du dossier et, en statique, au 1er chargement de /app) */
@keyframes fxb-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.fxb-sk { display: block; height: 12px; max-width: 100%; border-radius: 999px; background: var(--gris-clair, #dad6d0); animation: fxb-pulse 1.3s ease-in-out infinite; }
.fxb-sk.fxb-ico { width: 34px; height: 34px; border-radius: 4px; }
.fxb-sk-btn { width: 118px; height: 34px; }
.fxb-sk-row:hover { background: none; }
.fxb-sk-row .fxb-sk:nth-child(n+3) { justify-self: start; }
.fxb-sk-row .fxb-sk:nth-child(5), .fxb-sk-row .fxb-sk:nth-child(6) { justify-self: end; }
@media (max-width: 640px) { .fxb-sk-row .fxb-sk:nth-child(3), .fxb-sk-row .fxb-sk:nth-child(4), .fxb-sk-row .fxb-sk:nth-child(5) { display: none; } }
@media (prefers-reduced-motion: reduce) { .fxb-sk { animation: none; } }

/* Squelette de l'aperçu (fond identique à la visionneuse partagée : la transition vers elle est invisible) */
.fxb-pv-prog { height: 2px; background: rgba(221, 217, 211, .08); overflow: hidden; flex: none; }
.fxb-pv-prog span { display: block; height: 100%; width: 0; background: var(--ocre-focal, #c4903a); transition: width .2s linear; }
.fxb-pv-prog.is-indet span { width: 32%; animation: fxb-indet 1.2s ease-in-out infinite; }
@keyframes fxb-indet { from { transform: translateX(-100%); } to { transform: translateX(320%); } }
.fxb-pvs { display: block; border-radius: 999px; background: rgba(221, 217, 211, .13); animation: fxb-pulse 1.3s ease-in-out infinite; }
.fxb-pv-body:has(.fxb-pvs-doc) { padding: 0; align-items: stretch; justify-content: flex-start; }
.fxb-pvs-doc { flex: 1; display: flex; min-height: 0; }
.fxb-pvs-thumbs { flex: none; width: 216px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 0; }
.fxb-pvs-thumb { width: 168px; height: 234px; border-radius: 3px; }
.fxb-pvs-stage { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: flex-start; padding: 16px 24px; overflow: hidden; }
.fxb-pvs-page { width: min(60vw, 100%); aspect-ratio: 1 / 1.414; max-height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 7% 8%; border-radius: 3px; background: #1f1c19; box-shadow: 0 0 0 1px var(--gris-clair); }
.fxb-pvs-page .fxb-pvs { background: rgba(221, 217, 211, .1); }
.fxb-pvs-img { width: 100%; flex: 1; min-height: 60px; border-radius: 4px; }
.fxb-pvs-photo { width: min(70vw, 1000px); height: min(70vh, 640px); border-radius: 4px; }
.fxb-pvs-video { width: min(70vw, 960px); aspect-ratio: 16 / 9; display: grid; place-items: center; border-radius: 4px; color: rgba(221, 217, 211, .25); font-size: 40px; }
.fxb-pvs-video i { animation: none; background: none; }
.fxb-pvs-text { width: min(900px, 92%); display: flex; flex-direction: column; gap: 14px; padding: 16px 20px; align-self: flex-start; }
@media (max-width: 640px) { .fxb-pvs-thumbs { display: none; } .fxb-pvs-stage { padding: 12px; } .fxb-pvs-page { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .fxb-pvs, .fxb-pv-prog.is-indet span { animation: none; } }

/* Recherche */
.fxb-search { position: relative; display: inline-flex; align-items: center; }
.fxb-search i { position: absolute; left: 11px; font-size: 15px; color: var(--gris-moyen, #6b6560); pointer-events: none; }
.fxb-q { width: 190px; padding: 7px 12px 7px 32px; border: 1px solid var(--gris-clair, #dad6d0); border-radius: 999px; background: transparent; color: var(--noir-focal, #141210); font: inherit; transition: border-color .15s, width .2s; }
.fxb-q:hover { border-color: var(--noir-focal, #141210); }
.fxb-q:focus { outline: none; border-color: var(--noir-focal, #141210); width: 240px; }
.fxb-q::placeholder { color: var(--gris-moyen, #6b6560); }
@media (max-width: 640px) { .fxb-search { flex: 1; } .fxb-q { width: 100%; } .fxb-q:focus { width: 100%; } }

/* Sélection multiple : au survol l'icône de type devient une case ; cochée = fond ocre */
.fxb-ico { cursor: pointer; position: relative; }
.fxb-ico .fxb-ico-c { position: absolute; opacity: 0; font-size: 18px; color: var(--blanc-focal, #fff); transition: opacity .12s; }
.fxb-row:hover .fxb-ico:not(.fxb-sk) { box-shadow: inset 0 0 0 1px var(--gris-clair, #dad6d0); }
.fxb-row:hover .fxb-ico .fxb-ico-t { opacity: .0; }
.fxb-row:hover .fxb-ico .fxb-ico-c { opacity: .35; color: var(--noir-focal, #141210); }
.fxb-row.is-sel { background: var(--fp-tint, #f4ebdb); }
.fxb-row.is-sel:hover { background: var(--fp-tint, #f4ebdb); }
.fxb-row.is-sel .fxb-ico { background: var(--ocre-focal, #c4903a); box-shadow: none; }
.fxb-row.is-sel .fxb-ico .fxb-ico-t { opacity: 0; }
.fxb-row.is-sel .fxb-ico .fxb-ico-c { opacity: 1; color: #fff; }
@media (hover: none) { .fxb-row .fxb-ico .fxb-ico-t { opacity: 1; } .fxb-row .fxb-ico .fxb-ico-c { opacity: 0; } .fxb-row.is-sel .fxb-ico .fxb-ico-t { opacity: 0; } .fxb-row.is-sel .fxb-ico .fxb-ico-c { opacity: 1; } }
.fxb-ck { width: 22px; height: 22px; margin-left: 6px; display: inline-grid; place-items: center; border: 1px solid var(--gris-clair, #dad6d0); border-radius: 4px; background: transparent; color: var(--blanc-focal, #fff); cursor: pointer; transition: background-color .12s, border-color .12s; }
.fxb-ck:hover { border-color: var(--noir-focal, #141210); }
.fxb-ck.is-on { background: var(--ocre-focal, #c4903a); border-color: var(--ocre-focal, #c4903a); }
.fxb-ck i { font-size: 14px; }
.fxb-selbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 8px 8px 16px; border-radius: 4px; background: var(--fp-tint, #f4ebdb); color: var(--noir-focal, #141210); }
.fxb-selbar[hidden] { display: none; }
.fxb-sel-n { font-size: 13px; }
.fxb-sel-acts { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fxb-selbar .fxb-btn { border-color: var(--gris-clair, #dad6d0); color: inherit; padding: 5px 12px; }
.fxb-selbar .fxb-btn:hover { border-color: var(--noir-focal, #141210); }
.fxb-selbar .fxb-btn:disabled { opacity: .5; }
.fxb-selbar .fxb-danger { background: var(--rouge-alerte, #c4452f); border-color: transparent; color: #fff; }
.fxb-selbar .fxb-ib { color: inherit; }
.fxb-selbar .fxb-ib:hover { background: rgba(var(--ink-rgb, 20, 18, 16), .1); color: inherit; }
@media (max-width: 640px) { .fxb-selbar .fxb-btn span { display: inline; } .fxb-sel-acts .fxb-btn { padding: 5px 10px; } }

/* Vignette d'image / de PDF à la place de l'icône de type */
.fxb-ico.has-thumb { background-size: cover; background-position: center; background-repeat: no-repeat; box-shadow: inset 0 0 0 1px rgba(128, 120, 110, .25); }
.fxb-ico.has-thumb .fxb-ico-t { opacity: 0 !important; }
.fxb-row:hover .fxb-ico.has-thumb .fxb-ico-c { opacity: .9; color: #fff; text-shadow: 0 0 6px rgba(0, 0, 0, .7); } /* charte-ok : fonctionnel (lisibilité sur image, texture, sélecteur) */
.fxb-row.is-sel .fxb-ico.has-thumb { background-color: var(--ocre-focal, #c4903a); background-image: none !important; }
.fxb-row input { user-select: text; -webkit-user-select: text; }

/* Lasso de sélection et image de glisser */
.fxb-band { position: fixed; z-index: 9990; pointer-events: none; border: 1px solid var(--ocre-focal, #c4903a); background: rgba(196, 144, 58, .14); border-radius: 4px; }
.fxb-dragimg { position: fixed; top: -200px; left: -200px; padding: 8px 14px; border-radius: 999px; background: #141210; color: #fff; font: 13px/1 system-ui, sans-serif; white-space: nowrap; }
.fxb-row { cursor: default; }
.fxb-row.is-sel { cursor: default; }
.fxb-name, .fxb-ico { cursor: pointer; }

/* Libellé de l'étape + pourcentage (aperçu des documents Office) */
.fxb-pv-stage { flex: 1; text-align: center; font-style: normal; font-size: 12px; color: rgba(221, 217, 211, .6); white-space: nowrap; }
.fxb-pv-stage::after { content: ' ' attr(data-p); font-variant-numeric: tabular-nums; color: rgba(221, 217, 211, .85); }
.fxb-pv-bar strong { flex: 0 1 auto; }

/* Interrupteur lignes / icônes */
.fxb-view { display: inline-flex; padding: 2px; gap: 2px; border-radius: 999px; background: var(--gris-tres-clair, #f2efea); }
.fxb-vb { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--gris-moyen, #6b6560); cursor: pointer; transition: background-color .15s, color .15s; }
.fxb-vb i { font-size: 15px; }
.fxb-vb:hover { color: var(--noir-focal, #141210); }
.fxb-vb.is-on { background: var(--fp-white, #fff); color: var(--noir-focal, #141210); box-shadow: 0 0 0 1px var(--gris-clair, #dad6d0); }

/* Vue icônes : les mêmes lignes deviennent des tuiles (grande vignette ou icône, nom sur 2 lignes, taille et date dessous) */
.fxb-list.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.fxb-list.is-grid .fxb-row { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "ico ico" "name name" "size date"; row-gap: 8px; align-items: start; min-height: 0; padding: 10px; border: 1px solid var(--gris-clair, #dad6d0); border-radius: 4px; background: var(--fp-white, #fff); }
.fxb-list.is-grid .fxb-row:last-child { border-bottom: 1px solid var(--gris-clair, #dad6d0); }
.fxb-list.is-grid .fxb-row:hover { background: var(--gris-tres-clair, #f7f5f1); }
.fxb-list.is-grid .fxb-ico { grid-area: ico; width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 4px; pointer-events: none; box-shadow: none; }
.fxb-list.is-grid .fxb-ico i.fxb-ico-t { font-size: 40px; opacity: 1 !important; }
.fxb-list.is-grid .fxb-ico .fxb-ico-c { display: none; }
.fxb-list.is-grid .fxb-ico.has-thumb i.fxb-ico-t { opacity: 0 !important; }
.fxb-list.is-grid .fxb-name { grid-area: name; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; word-break: break-word; }
.fxb-list.is-grid .fxb-size { grid-area: size; width: auto; text-align: left; }
.fxb-list.is-grid .fxb-date { grid-area: date; width: auto; text-align: right; }
.fxb-list.is-grid .fxb-type, .fxb-list.is-grid .fxb-by { display: none; }
.fxb-list.is-grid .fxb-acts { position: absolute; top: 16px; right: 16px; padding: 2px; border-radius: 4px; background: var(--fp-white, #fff); box-shadow: 0 0 0 1px var(--gris-clair); }
.fxb-list.is-grid .fxb-confirm { grid-area: auto; grid-column: 1 / -1; justify-self: stretch; flex-wrap: wrap; }
.fxb-list.is-grid .fxb-edit { grid-area: auto; grid-column: 1 / -1; }
.fxb-list.is-grid .fxb-row.is-sel { background: var(--fp-tint, #f4ebdb); border-color: var(--ocre-focal, #c4903a); box-shadow: 0 0 0 1px var(--ocre-focal, #c4903a); }
.fxb-list.is-grid .fxb-row.is-sel::before { content: "\2713"; position: absolute; top: 16px; left: 16px; z-index: 1; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--ocre-focal, #c4903a); color: #fff; font-size: 13px; }
.fxb-list.is-grid .fxb-row.is-sel .fxb-ico { background: var(--gris-tres-clair, #f2efea); }
.fxb-list.is-grid .fxb-sk-row { grid-template-areas: none; grid-template-columns: 1fr; }
@media (max-width: 640px) { .fxb-list.is-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; } .fxb-list.is-grid .fxb-size { display: block; } }

/* Fichier en cours d'envoi : une vraie ligne, avec une fine barre de progression au bas */
.fxb-row.is-pending { position: relative; }
.fxb-row.is-pending .fxb-name, .fxb-row.is-pending .fxb-meta { opacity: .7; }
.fxb-row.is-pending .fxb-name.is-static { cursor: default; text-decoration: none; color: var(--noir-focal, #141210); }
.fxb-row.is-pending:hover { background: transparent; }
.fxb-row.is-pending .fxb-ico { cursor: default; box-shadow: none; }
.fxb-row.is-pending .fxb-ico .fxb-ico-t { opacity: 1 !important; }
.fxb-pbar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; pointer-events: none; }
.fxb-pbar span { display: block; height: 100%; background: var(--ocre-focal, #c4903a); transition: width .2s linear; }
.fxb-pend { justify-self: end; font-size: 12px; color: var(--gris-moyen, #6b6560); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fxb-pend b { font-weight: 400; }
.fxb-row.is-failed .fxb-name { color: var(--rouge-alerte, #c4452f) !important; }
.fxb-pend-err { margin-right: 6px; font-size: 12px; color: var(--rouge-alerte, #c4452f); white-space: nowrap; align-self: center; }
.fxb-acts.is-on { opacity: 1; }
.fxb-list.is-grid .fxb-row.is-pending .fxb-pend { position: absolute; top: 16px; right: 16px; padding: 2px 8px; border-radius: 999px; background: var(--fp-white, #fff); box-shadow: 0 0 0 1px var(--gris-clair); }
.fxb-list.is-grid .fxb-row.is-pending .fxb-pbar { left: 10px; right: 10px; bottom: 6px; border-radius: 2px; }



/* Popup « télécharger ? » */
.fxb-mv-card.fxb-dl { align-items: flex-start; gap: 12px; width: min(400px, 100%); }
.fxb-mv-card.fxb-dl .fxb-ico { cursor: default; }
.fxb-mv-card.fxb-dl h4 { white-space: normal; }
.fxb-mv-card.fxb-dl p { margin: 0; color: var(--gris-moyen, #6b6560); line-height: 1.45; word-break: break-word; }
.fxb-mv-card.fxb-dl .fxb-mv-foot { align-self: stretch; }

/* Vue icônes : plus de boîte autour du fichier — la vignette porte son propre fond, seul le survol / la sélection teinte la tuile */
.fxb-list.is-grid { gap: 8px 12px; }
.fxb-list.is-grid .fxb-row, .fxb-list.is-grid .fxb-row:last-child { padding: 6px; border: 0; border-radius: 4px; background: transparent; }
.fxb-list.is-grid .fxb-row:hover { background: rgba(var(--ink-rgb, 20, 18, 16), .05); }
.fxb-list.is-grid .fxb-row.is-sel, .fxb-list.is-grid .fxb-row.is-sel:hover { background: var(--fp-tint, #f4ebdb); border: 0; box-shadow: 0 0 0 2px var(--ocre-focal, #c4903a); }
.fxb-list.is-grid .fxb-row.is-sel::before, .fxb-list.is-grid .fxb-row::before { top: 12px; left: 12px; }
.fxb-list.is-grid .fxb-acts, .fxb-list.is-grid .fxb-row.is-pending .fxb-pend { top: 12px; right: 12px; }
.fxb-list.is-grid .fxb-ico { background: var(--gris-tres-clair, #f2efea); }
.fxb-list.is-grid .fxb-row.is-pending .fxb-pbar { left: 6px; right: 6px; bottom: 2px; }

/* Icônes de type en noir et blanc : le contour suit le thème (noir en clair, clair en sombre), le fond est le même partout */
.fxb-t-folder, .fxb-t-pdf, .fxb-t-ppt, .fxb-t-doc, .fxb-t-xls, .fxb-t-cad, .fxb-t-d3, .fxb-t-img, .fxb-t-vid, .fxb-t-arc, .fxb-t-txt, .fxb-t-file { color: var(--noir-focal, #141210); }

/* Barre de sélection dans la barre du haut : elle prend la place des actions (même gabarit de pastilles), plus de bandeau dans la page */
.fxb-actions[hidden] { display: none; }
.nav-files .fxb-selbar { display: flex; align-items: center; gap: var(--space-xs, 8px); flex-wrap: nowrap; padding: 0; border-radius: 0; background: transparent; color: var(--noir-focal, #141210); }
.nav-files .fxb-selbar[hidden] { display: none; }
.nav-files .fxb-sel-n { margin-right: 4px; font-size: var(--text-sm, 14px); white-space: nowrap; }
.nav-files .fxb-sel-acts { display: inline-flex; align-items: center; gap: var(--space-xs, 8px); flex-wrap: nowrap; }
.nav-files .fxb-selbar .fxb-btn { border: 0; padding: 4px 16px; border-radius: 999px; background: var(--gris-tres-clair, #f2efea); color: var(--noir-focal, #141210); font: inherit; font-size: var(--text-sm, 14px); font-weight: 500; }
.nav-files .fxb-selbar .fxb-btn:hover { background: var(--gris-clair, #dad6d0); border: 0; }
.nav-files .fxb-selbar .fxb-btn.fxb-danger { background: var(--rouge-alerte, #c4452f); color: #fff; }
.nav-files .fxb-selbar .fxb-btn.fxb-danger:hover { filter: brightness(1.1); background: var(--rouge-alerte, #c4452f); }
.nav-files .fxb-selbar .fxb-ib { color: var(--noir-focal, #141210); }
@keyframes fxb-swap { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.nav-files > .fxb-actions:not([hidden]), .nav-files > .fxb-selbar:not([hidden]) { animation: fxb-swap .26s cubic-bezier(.22, .8, .24, 1); }
@media (prefers-reduced-motion: reduce) { .nav-files > .fxb-actions, .nav-files > .fxb-selbar { animation: none !important; } }

/* Fil d'Ariane sans mot « Fichiers » : vide à la racine, icône maison dans un sous-dossier */
.fxb-trail:empty { display: none; }
.fxb-bar:not(:has(.fxb-actions)):has(.fxb-trail:empty) { display: none; }
.fxb-crumb.fxb-home { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; }
.fxb-crumb.fxb-home i { font-size: 15px; opacity: 1; }

/* Le nom ne s'ouvre qu'en cliquant PILE dessus : le lien fait la largeur du texte, pas de la colonne (ailleurs sur la ligne, un clic sélectionne) */
.fxb-name { justify-self: start; max-width: 100%; }
.fxb-row.is-pending .fxb-name.is-static { pointer-events: none; }

/* Éléments coupés (Ctrl + X) : atténués jusqu'au collage */
.fxb-row.is-cut { opacity: .45; }

/* Envoi en cours : un anneau de progression entoure l'icône, qui rétrécit le temps du transfert */
.fxb-ico-up { position: relative; }
.fxb-ico-up .fxb-ring { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); transform: rotate(-90deg); pointer-events: none; }
.fxb-ring circle { fill: none; stroke-width: 2.2; }
.fxb-ring .bg { stroke: var(--gris-clair, #dad6d0); opacity: .6; }
.fxb-ring .fg { stroke: var(--ocre-focal, #c4903a); stroke-linecap: round; stroke-dasharray: 100.53; transition: stroke-dashoffset .25s linear; }
.fxb-row.is-pending .fxb-ico-up i { font-size: 12px; transition: font-size .25s cubic-bezier(.22, .8, .24, 1); }
.fxb-row.is-failed .fxb-ring .fg { stroke: var(--rouge-alerte, #c4452f); }
.fxb-row.is-failed .fxb-ring .bg { stroke: var(--rouge-alerte, #c4452f); opacity: .35; }
.fxb-list.is-grid .fxb-row.is-pending .fxb-ico-up .fxb-ring { inset: auto; top: 50%; left: 50%; width: 64px; height: 64px; transform: translate(-50%, -50%) rotate(-90deg); }
.fxb-list.is-grid .fxb-row.is-pending .fxb-ico-up i { font-size: 22px; }

/* Pendant l'envoi : l'icône n'a pas de fond, seul l'anneau de progression l'entoure */
.fxb-row.is-pending .fxb-ico-up, .fxb-list.is-grid .fxb-row.is-pending .fxb-ico-up { background: transparent; box-shadow: none; }

/* Survol d'une ligne en cours d'envoi : l'icône devient un bouton « annuler » (croix) */
.fxb-ico-up .fxb-ico-x { position: absolute; font-size: 16px; opacity: 0; transform: scale(.7); transition: opacity .15s, transform .2s cubic-bezier(.22, .8, .24, 1); }
.fxb-row.is-pending:not(.is-failed) .fxb-ico-up { cursor: pointer; }
.fxb-row.is-pending:not(.is-failed):hover .fxb-ico-up .fxb-ico-t { opacity: 0 !important; }
.fxb-row.is-pending:not(.is-failed):hover .fxb-ico-up .fxb-ico-x { opacity: 1; transform: none; }
.fxb-row.is-pending:not(.is-failed) .fxb-ico-up:hover .fxb-ico-x { color: var(--rouge-alerte, #c4452f); }
.fxb-list.is-grid .fxb-row.is-pending .fxb-ico-up { pointer-events: auto; }
.fxb-list.is-grid .fxb-row.is-pending .fxb-ico-up .fxb-ico-x { font-size: 24px; }

/* Aucun fond ni liseré sur l'icône d'une ligne en cours d'envoi, même au survol (les états de survol de la liste ne s'y appliquent pas) */
.fxb-row.is-pending .fxb-ico-up, .fxb-row.is-pending:hover .fxb-ico-up, .fxb-row.is-pending .fxb-ico-up:hover,
.fxb-list.is-grid .fxb-row.is-pending:hover .fxb-ico-up { background: transparent !important; box-shadow: none !important; }

/* Champ de renommage / nouveau dossier : largeur = celle du texte (réglée par autosize), boutons juste à côté */
.fxb-edit input { flex: 0 1 auto; min-width: 140px; max-width: calc(100% - 190px); transition: width .08s ease-out; }

/* Le nom n'est PAS un lien : ni curseur main ni soulignement (clic = sélection, double-clic = ouverture) */
.fxb-name, .fxb-name:hover { cursor: default; text-decoration: none; }



/* Fichiers du poste glissés sur un dossier : le dossier s'allume (le grand message de dépôt est masqué) */
.fxb.has-target .fxb-drop { display: none; }
.fxb.is-dropping { outline: none; }
.fxb-row.is-folder.is-over { background: var(--fp-tint, #f4ebdb); outline: 2px solid var(--ocre-focal, #c4903a); outline-offset: -2px; border-radius: 4px; }

/* Barre du squelette d'aperçu : mêmes cotes que la barre de la visionneuse (56 px, marges de 24 px), le titre ne « saute » pas au chargement */
.fxb-pv-bar { box-sizing: border-box; height: 56px; padding: 0 24px; }
.fxb-pv-bar strong { font-size: var(--text-sm, 14px); font-weight: 500; letter-spacing: 0; color: #ece8e2; }

/* Fichier tout juste envoyé, en attente de la confirmation de Google : déjà une ligne normale ; ses actions n'agissent qu'une fois confirmée */
.fxb-row.is-sync .fxb-acts { pointer-events: none; opacity: .35; }

/* Noms tronqués au milieu : le début rétrécit avec « … », la fin (derniers caractères + extension) reste visible */
.fxb-name, .fxb-up-name, .fxb-pv-bar strong { display: flex; min-width: 0; }
.fxb-n1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxb-n2 { flex: none; white-space: pre; }
.fxb-list.is-grid .fxb-name { display: -webkit-box; }
.fxb-list.is-grid .fxb-n1, .fxb-list.is-grid .fxb-n2 { display: inline; overflow: visible; white-space: normal; }

/* Les actions d'une ligne sont derrière « ⋮ » (menu contextuel), toujours affiché — plus seulement au survol */
.fxb-acts, .fxb-row .fxb-acts { opacity: 1; }
.fxb-acts .js-more { color: var(--gris-moyen, #6b6560); }
.fxb-row:hover .fxb-acts .js-more, .fxb-acts .js-more:hover { color: var(--noir-focal, #141210); }
.fxb-list.is-grid .fxb-acts { padding: 0; }
.fxb-list.is-grid .fxb-acts .js-more { width: 28px; height: 28px; color: var(--noir-focal, #141210); }

/* Panneau « Informations » : glisse depuis la droite (détails + historique d'activité tiré du journal) */
.fxb-info { position: fixed; top: 0; right: 0; bottom: 0; z-index: 10003; display: flex; flex-direction: column; width: min(380px, 100vw); box-sizing: border-box; background: var(--blanc-focal, #fff); border-left: 1px solid var(--gris-clair, #dad6d0); box-shadow: 0 0 0 1px var(--gris-clair); color: var(--noir-focal, #141210); font-size: var(--text-sm, 14px); transform: translateX(104%); transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.fxb-info.is-open { transform: none; }
.fxb-info-head { display: flex; align-items: center; gap: 12px; box-sizing: border-box; height: var(--space-xl, 64px); flex: none; padding: 0 var(--space-xs, 8px) 0 var(--space-m, 24px); border-bottom: 1px solid var(--gris-clair, #dad6d0); }   /* même hauteur que la barre du haut de /app (.main-nav) */
.fxb-info-head .fxb-ico { flex: none; cursor: default; }
.fxb-info-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fxb-info-title strong { display: flex; min-width: 0; font-weight: 500; }
.fxb-info-title small { color: var(--gris-moyen, #6b6560); font-size: 12px; }
.fxb-info-body { flex: 1; overflow-y: auto; padding: 20px; }
.fxb-info-body section + section { margin-top: 28px; }
.fxb-info-body h5 { margin: 0 0 12px; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--gris-moyen, #6b6560); }
.fxb-dl { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.fxb-dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.fxb-dl dt { color: var(--gris-moyen, #6b6560); }
.fxb-dl dd { margin: 0; word-break: break-word; }
.fxb-tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fxb-ev { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.fxb-ev:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--gris-clair, #dad6d0); }
.fxb-ev-ico { flex: none; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--gris-tres-clair, #f2efea); }
.fxb-ev-ico i { font-size: 14px; }
.fxb-ev-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 3px; }
.fxb-ev-txt strong { font-weight: 500; }
.fxb-ev-sub { color: var(--noir-focal, #141210); opacity: .8; word-break: break-word; }
.fxb-ev-meta { color: var(--gris-moyen, #6b6560); font-size: 12px; }
.fxb-info-none { margin: 0; color: var(--gris-moyen, #6b6560); }
@media (prefers-reduced-motion: reduce) { .fxb-info { transition: none; } }

/* « Dossier vide » apparu de façon optimiste : fondu d'entrée */
@keyframes fxb-empty-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fxb-empty.is-in { animation: fxb-empty-in .28s cubic-bezier(.22, .8, .24, 1) both; }
@media (prefers-reduced-motion: reduce) { .fxb-empty.is-in { animation: none; } }

/* iPad / tactile : cibles de 44 px, pas de zoom de saisie iOS (police ≥ 16 px), pas de loupe ni de menu natif pendant l'appui long, pas de délai de double-tap */
@media (pointer: coarse) {
    .fxb { --fxb-cols: 44px minmax(0, 1fr) 150px 120px 76px 96px 48px; }
    .fxb-row { min-height: 60px; -webkit-touch-callout: none; touch-action: manipulation; }
    .fxb-ico { width: 40px; height: 40px; }
    .fxb-ib { width: 44px; height: 44px; }
    .fxb-btn { min-height: 44px; }
    .fxb-vb { width: 38px; height: 38px; }
    .fxb-q, .fxb-edit input { font-size: 16px; }
    .fxb-crumb { padding: 10px 12px; }
    .fxb-h { padding: 12px 8px; }
    .fxb-ck { width: 28px; height: 28px; }
    .fxb-row .fxb-name { -webkit-user-select: none; user-select: none; }
    .fxb-info-head { padding: 0 var(--space-xs, 8px) 0 var(--space-m, 24px); }
}
@media (pointer: coarse) and (max-width: 640px) { .fxb { --fxb-cols: 44px minmax(0, 1fr) 76px 48px; } }

.fxb-path { color: var(--gris-moyen, #6b6560); font-size: 12px; margin-left: 6px; }
.fxb-deepbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Corbeille consultable (panneau latéral) */
.fxb-tr { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gris-clair, #dad6d0); }
.fxb-tr .fxb-ico { flex: none; cursor: default; }
.fxb-tr-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fxb-tr-t strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fxb-tr-t span { font-size: 12px; color: var(--gris-moyen, #6b6560); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Panneau d'informations épinglé : la liste se rétrécit de la largeur du panneau (--fxb-info-w, posée par dockInfo) au lieu d'être recouverte */
.fxb { box-sizing: border-box; padding-right: var(--fxb-info-w, 0px); transition: padding-right .3s cubic-bezier(.22, 1, .36, 1); }
@media (prefers-reduced-motion: reduce) { .fxb { transition: none; } }
.fxb-info-head .fxb-ib { border-radius: 999px; background: var(--gris-tres-clair, #eceae7); }   /* même bouton rond que dans la barre du haut */
.fxb-info-head .fxb-ib:hover { background: var(--gris-clair, #dad6d0); }

/* Envoi en cours : le nom et l'estimation de fin pulsent doucement (noir ↔ ocre) pour attirer l'œil sur ce qui se passe */
@keyframes fxb-pulse { 0%, 100% { color: var(--noir-focal, #141210); } 50% { color: var(--ocre-focal, #c4903a); } }
.fxb-row.is-pending:not(.is-failed) .fxb-name, .fxb-row.is-pending:not(.is-failed) .fxb-date { animation: fxb-pulse 1.6s ease-in-out infinite; }
.fxb-row.is-pending:not(.is-failed) .fxb-name * { color: inherit; }
@media (prefers-reduced-motion: reduce) { .fxb-row.is-pending .fxb-name, .fxb-row.is-pending .fxb-date { animation: none; } }
