/* Drive à la facture du webmail, de l'agenda et des contacts (webmail.burdigala.cloud) : barre sombre, colonne
   latérale, liste pleine hauteur. Chargé seulement par layouts/suite.blade.php. */
:root { --ds-ink: #1a0a10; --ds-gold: #ffd27a; --ds-coral: #ff9d8a; --ds-indigo: #5b5fc7; --ds-line: var(--mb-color-border); --ds-side: #faf6f6; --ds-hover: #f7f3f1; }
body.ds { margin: 0; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: #fff; }
[hidden] { display: none !important; }
.ds-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barre */
.ds-bar { flex: none; position: relative; z-index: 50; color: #fff; background: radial-gradient(60rem 12rem at 0% 0%, color-mix(in srgb, var(--ds-indigo) 45%, transparent), transparent 70%), radial-gradient(50rem 12rem at 100% 0%, #5b0d1d, transparent 70%), var(--ds-ink); box-shadow: 0 8px 28px rgba(26, 10, 16, .3); }
.ds-bar__inner { height: 4.25rem; padding: 0 clamp(1rem, 2vw, 1.75rem); display: flex; align-items: center; gap: 1.1rem; }
.ds-menu { display: none; width: 2.4rem; height: 2.4rem; border: 0; border-radius: var(--mb-radius-md); background: rgba(255, 255, 255, .1); color: #fff; place-items: center; cursor: pointer; }
.ds-brand { display: flex; align-items: center; gap: .75rem; color: #fff !important; text-decoration: none; font: 600 .92rem var(--mb-font-body); white-space: nowrap; }
.ds-brand img { height: 1.9rem; width: auto; filter: brightness(0) invert(1); }
.ds-brand span { padding-left: .75rem; border-left: 1px solid rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .8); }
/* Lanceur Maison Burdigala : son bouton (ombre fermée) remonte de .5rem sans compensation en bas ; on le recentre. */
.ds-bar mb-launcher { margin-top: .5rem; }
.ds-search { flex: 1; max-width: 36rem; margin: 0 auto; height: 2.5rem; display: flex; align-items: center; gap: .55rem; padding: 0 .9rem; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .8); }
.ds-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; font: .86rem var(--mb-font-body); outline: none; }
.ds-search input::placeholder { color: rgba(255, 255, 255, .7); }
.ds-search:focus-within { background: #fff; color: var(--mb-color-muted); }
.ds-search:focus-within input { color: var(--mb-color-text); }
.ds-tools { display: flex; align-items: center; gap: .6rem; margin-left: auto; flex-shrink: 0; }
.ds-switch { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); color: #fff !important; text-decoration: none; font: 600 .8rem var(--mb-font-body); background: rgba(255, 255, 255, .06); }
.ds-switch:hover { background: rgba(255, 255, 255, .14); }
.ds-primary { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.05rem; border: 0; border-radius: 999px; color: var(--ds-ink) !important; background: linear-gradient(135deg, #fff8ec, #ffe3b0); font: 700 .86rem var(--mb-font-body); cursor: pointer; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.ds-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(40, 6, 14, .32); }
.ds-account { position: relative; }
.ds-account > summary { list-style: none; cursor: pointer; }
.ds-account > summary::-webkit-details-marker { display: none; }
.ds-avatar { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); color: var(--ds-ink); background: linear-gradient(135deg, var(--ds-gold), var(--ds-coral)); font: 700 .78rem var(--mb-font-body); }
.ds-panel { position: absolute; top: calc(100% + .6rem); right: 0; min-width: 15rem; padding: .4rem; border-radius: var(--mb-radius-lg); background: #fff; border: 1px solid var(--ds-line); box-shadow: 0 22px 60px rgba(40, 12, 20, .2); color: var(--mb-color-text); z-index: 60; }
.ds-panel__who { padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--ds-line); margin-bottom: .3rem; }
.ds-panel__who strong { display: block; font-size: .86rem; }
.ds-panel__who small { color: var(--mb-color-muted); }
.ds-panel a, .ds-panel button { display: flex; width: 100%; padding: .6rem .7rem; border: 0; border-radius: var(--mb-radius-md); background: none; color: var(--mb-color-text) !important; font: 500 .84rem var(--mb-font-body); text-align: left; text-decoration: none; cursor: pointer; }
.ds-panel a:hover, .ds-panel button:hover { background: var(--mb-color-primary-soft); color: var(--mb-color-primary) !important; }

/* Corps */
.ds-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); }
.ds-side { display: flex; flex-direction: column; min-height: 0; overflow: auto; padding: .9rem .6rem .6rem; background: var(--ds-side); border-right: 1px solid var(--ds-line); }
.ds-nav { display: grid; gap: .1rem; align-content: start; }
.ds-nav a { display: flex; align-items: center; gap: .6rem; min-height: 2.35rem; padding: .4rem .65rem; border-radius: var(--mb-radius-md); color: #4a3f42 !important; font: 500 .84rem var(--mb-font-body); text-decoration: none; }
.ds-nav a svg { opacity: .75; flex: none; }
.ds-nav a:hover { background: #f1e9ea; }
.ds-nav a[aria-current="page"] { background: var(--mb-color-primary-soft); color: var(--mb-color-primary) !important; font-weight: 700; }
.ds-nav a[aria-current="page"] svg { opacity: 1; }
.ds-nav a em { margin-left: auto; font-style: normal; font-size: .7rem; color: var(--mb-color-muted); }
.ds-label { margin: 1rem .65rem .3rem; font-size: .6rem; font-weight: 700; letter-spacing: .1rem; text-transform: uppercase; color: var(--mb-color-muted); }
.ds-usage { margin: .2rem .65rem; }
.ds-usage__bar { height: .45rem; border-radius: 999px; background: #ece3e4; overflow: hidden; }
.ds-usage__bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a51f3a, var(--mb-color-primary)); }
.ds-usage.is-full .ds-usage__bar span { background: linear-gradient(90deg, #d97706, #b4232c); }
.ds-usage p { margin: .45rem 0 0; font-size: .78rem; color: var(--mb-color-muted); }
.ds-usage a { display: inline-block; margin-top: .45rem; font-size: .8rem; font-weight: 700; color: var(--mb-color-primary); }
.ds-side__foot { margin-top: auto; padding: 1rem .4rem .2rem; }
.ds-side__foot a { font-size: .74rem; color: var(--mb-color-muted); text-decoration: none; }
.ds-main { min-height: 0; overflow: auto; padding: 1.1rem clamp(1rem, 2.5vw, 2rem) 2rem; background: #fff; }
.ds-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: .9rem; }
.ds-head h1 { margin: 0; font: 600 1.3rem var(--mb-font-display); }
.ds-crumbs { margin: 0; font-size: .82rem; color: var(--mb-color-muted); }
.ds-crumbs a { color: var(--mb-color-primary); text-decoration: none; }
.ds-head__tools { margin-left: auto; display: flex; flex-wrap: wrap; gap: .5rem; }

/* Liste de fichiers : lignes aérées comme la liste de messages, au lieu d'un tableau à cadre */
.ds .bc-drive-card, .ds .mb-table-card { border: 0; box-shadow: none; background: none; padding: 0; }
.ds .mb-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.ds .mb-table th { padding: .5rem .7rem; font-size: .66rem; font-weight: 700; letter-spacing: .08rem; text-transform: uppercase; color: var(--mb-color-muted); border-bottom: 1px solid var(--ds-line); background: none; text-align: left; }
.ds .mb-table td { padding: .55rem .7rem; border-bottom: 1px solid #f3eded; vertical-align: middle; font-size: .86rem; }
.ds .mb-table tbody tr:hover td { background: var(--ds-hover); }
.ds .bc-drive-name { display: inline-flex; align-items: center; gap: .65rem; color: var(--mb-color-text); font-weight: 500; text-decoration: none; }
.ds .bc-file-ic { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: .7rem; background: #f4eff0; font-size: 1.05rem; }
.ds .bc-file-ic.is-folder { background: #fdf3dc; }
.ds .bc-drive-actions { display: flex; justify-content: flex-end; gap: .35rem; opacity: .55; transition: opacity .15s; }
.ds tr:hover .bc-drive-actions, .ds .bc-drive-actions:focus-within { opacity: 1; }
.ds .mb-empty { border: 0; background: none; }
.ds-alert { margin-bottom: 1rem; }

@media (max-width: 52rem) {
  .ds-layout { grid-template-columns: 1fr; }
  .ds-side { position: fixed; inset: 4.25rem auto 0 0; width: min(18rem, 85vw); z-index: 40; transform: translateX(-105%); transition: transform .25s; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
  body.ds-side-open .ds-side { transform: none; }
  .ds-menu { display: grid; }
  .ds-brand span, .ds-switch span, .ds-primary span { display: none; }
  .ds-search { display: none; }
  .bc-hide-sm { display: none; }
  .ds .bc-drive-actions { opacity: 1; }
}

/* Drive chiffré de bout en bout (doc 15) */
.bc-e2e-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 .9rem; padding: .55rem .8rem; border-radius: var(--mb-radius-lg); border: 1px solid color-mix(in srgb, var(--ds-indigo) 30%, var(--ds-line)); background: color-mix(in srgb, var(--ds-indigo) 7%, #fff); font-size: .86rem; }
.bc-e2e-bar[hidden] { display: none; }
.bc-e2e-badge { background: color-mix(in srgb, var(--ds-indigo) 12%, #fff); color: var(--ds-indigo); font-size: .7rem; vertical-align: middle; }
.ds-head h1 .bc-e2e-badge { font-size: .72rem; font-weight: 600; }
.bc-e2e-help { margin: -.3rem 0 .9rem; }
.bc-enc:not(.is-open) { font-style: italic; color: var(--mb-color-muted); }
.bc-e2e-check { display: grid; grid-template-columns: auto 1fr; gap: .1rem .45rem; align-items: start; font-size: .86rem; font-weight: 600; }
.bc-e2e-check small { grid-column: 2; font-weight: 400; }
.bc-e2e-dialog { width: min(30rem, calc(100vw - 2rem)); border: 1px solid var(--ds-line); border-radius: var(--mb-radius-lg); padding: 1.3rem; }
.bc-e2e-dialog::backdrop { background: rgba(26, 10, 16, .45); }
.bc-e2e-search { margin-top: 1.4rem; }
.bc-e2e-results { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .35rem; }
.bc-e2e-members { width: min(40rem, calc(100vw - 2rem)); }
.bc-e2e-people, .bc-e2e-journal { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.bc-e2e-people li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .55rem .65rem; border: 1px solid var(--ds-line); border-radius: var(--mb-radius-md, 10px); }
.bc-e2e-journal { margin-top: .5rem; font-size: .84rem; max-height: 14rem; overflow: auto; }
.bc-e2e-members-btn { margin-left: .4rem; vertical-align: middle; }

/* Documents et tableaux collaboratifs chiffrés (DC5, DC6) */
.bc-doc-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.bc-doc-title { flex: 1 1 16rem; min-width: 0; border: 0; border-bottom: 1px dashed transparent; background: none; font: 600 1.5rem var(--mb-font-display, inherit); color: var(--mb-color-text); padding: .1rem 0; }
.bc-doc-title:hover, .bc-doc-title:focus { border-bottom-color: var(--ds-line); outline: none; }
.bc-doc-status { margin-left: auto; }
.bc-doc-status.is-bad { color: var(--mb-color-danger, #b42318); }
.bc-doc-toolbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .2rem; padding: .35rem; margin: .4rem 0 .8rem; border: 1px solid var(--ds-line); border-radius: var(--mb-radius-lg); background: #fff; }
.bc-doc-toolbar[hidden] { display: none; }
.bc-doc-toolbar button { min-width: 2rem; padding: .3rem .5rem; border: 0; border-radius: 8px; background: none; font: 500 .84rem var(--mb-font-body); cursor: pointer; color: var(--mb-color-text); }
.bc-doc-toolbar button:hover { background: var(--ds-hover); }
.bc-doc-toolbar button.is-on { background: color-mix(in srgb, var(--ds-indigo) 14%, #fff); color: var(--ds-indigo); }
.bc-doc-sep { width: 1px; margin: .2rem .25rem; background: var(--ds-line); }
.bc-doc-page { max-width: 52rem; min-height: 60vh; margin: 0 auto; padding: 2.4rem clamp(1rem, 5vw, 3.5rem); border: 1px solid var(--ds-line); border-radius: var(--mb-radius-lg); background: #fff; box-shadow: 0 10px 30px rgba(40, 12, 20, .06); }
.bc-doc-page .tiptap { outline: none; min-height: 50vh; line-height: 1.65; }
.bc-doc-page .tiptap p.is-editor-empty:first-child::before { content: attr(data-placeholder); color: var(--mb-color-muted); float: left; height: 0; pointer-events: none; }
.bc-doc-page .tiptap table { border-collapse: collapse; width: 100%; margin: .8rem 0; }
.bc-doc-page .tiptap td, .bc-doc-page .tiptap th { border: 1px solid var(--ds-line); padding: .35rem .5rem; vertical-align: top; }
.bc-doc-page .tiptap blockquote { margin: .8rem 0; padding-left: 1rem; border-left: 3px solid var(--ds-line); color: var(--mb-color-muted); }
.bc-doc-page .tiptap mark { background: #fff1a8; }
.collaboration-carets__caret { position: relative; margin: 0 -1px; border-left: 1px solid; border-right: 1px solid; pointer-events: none; word-break: normal; }
.collaboration-carets__label { position: absolute; top: -1.35em; left: -1px; padding: .05rem .35rem; border-radius: 4px 4px 4px 0; color: #fff; font: 600 .7rem var(--mb-font-body); white-space: nowrap; user-select: none; }
.bc-doc-people { list-style: none; margin: 0 0 .8rem; padding: 0 .5rem; display: grid; gap: .35rem; font-size: .86rem; }
.bc-doc-dot { display: inline-block; width: .6rem; height: .6rem; margin-right: .45rem; border-radius: 50%; }
.bc-doc-comments { position: fixed; right: 1rem; top: 6rem; width: min(22rem, calc(100vw - 2rem)); max-height: 70vh; overflow: auto; z-index: 20; }
.bc-doc-comments[hidden] { display: none; }
.bc-doc-comments ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.bc-doc-comments li { padding: .5rem; border: 1px solid var(--ds-line); border-radius: 10px; }
.bc-doc-comments li.is-done { opacity: .55; }
.bc-doc-comments blockquote { margin: .3rem 0; padding-left: .5rem; border-left: 3px solid #ffd27a; font-size: .84rem; }
.bc-doc-version { max-height: 40vh; overflow: auto; }
.bc-doc-version:not(:empty) { padding: .8rem; border: 1px solid var(--ds-line); border-radius: 10px; }
.bc-sheet-bar { display: flex; gap: .5rem; align-items: center; margin: .4rem 0 .6rem; }
.bc-sheet-bar[hidden] { display: none; }
.bc-sheet-ref { min-width: 3.2rem; padding: .45rem .5rem; border: 1px solid var(--ds-line); border-radius: 8px; font: 600 .84rem var(--mb-font-body); text-align: center; }
.bc-sheet-input { flex: 1; font-family: ui-monospace, Menlo, monospace; }
.bc-sheet-wrap { overflow: auto; max-height: calc(100vh - 16rem); border: 1px solid var(--ds-line); border-radius: var(--mb-radius-lg); background: #fff; }
.bc-sheet { border-collapse: collapse; font-size: .84rem; outline: none; }
.bc-sheet th { position: sticky; top: 0; z-index: 2; min-width: 2.6rem; padding: .25rem .4rem; background: var(--ds-side); color: var(--mb-color-muted); font-weight: 600; border: 1px solid var(--ds-line); }
.bc-sheet tbody th { position: sticky; left: 0; z-index: 1; }
.bc-sheet td { min-width: 6.5rem; max-width: 14rem; height: 1.7rem; padding: .15rem .4rem; border: 1px solid var(--ds-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: cell; }
.bc-sheet td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.bc-sheet td.is-err { color: var(--mb-color-danger, #b42318); }
.bc-sheet td.is-sel { outline: 2px solid var(--ds-indigo); outline-offset: -2px; background: color-mix(in srgb, var(--ds-indigo) 6%, #fff); }
@media print {
  .ds-bar, .ds-side, .bc-doc-toolbar, .bc-e2e-bar, .bc-doc-head .mb-badge, .bc-doc-status, .bc-doc-comments, .collaboration-carets__caret { display: none !important; }
  .bc-doc-page { border: 0; box-shadow: none; padding: 0; }
  .ds-layout, .ds-main { display: block !important; overflow: visible !important; }
}

/* Sélecteur « Joindre depuis le Drive » */
.bc-pick-foot { position: sticky; bottom: 0; display: flex; align-items: center; gap: .6rem; justify-content: flex-end; margin-top: .9rem; padding: .7rem 0; background: var(--mb-color-bg, #fff); }
.bc-pick-foot [data-pick-state] { margin-right: auto; }
.bc-drive-table tr.is-off { opacity: .55; }
.bc-pick-files { list-style: none; margin: 0 0 .8rem; padding: 0 .6rem; display: grid; gap: .3rem; font-size: .86rem; word-break: break-all; }

/* Drive de l'équipe Maison Burdigala (drive.burdigala.net) : bordeaux de la maison, lanceur et signature du kit 1.1 */
.ds--maison { --ds-ink: #2a0610; --ds-indigo: #781428; --ds-gold: #f4d9a6; --ds-coral: #e7a1ab; --ds-side: #fbf6f6; }
.ds--maison .ds-bar { background: radial-gradient(60rem 14rem at 0% 0%, rgba(120, 20, 40, .9), transparent 70%), radial-gradient(50rem 12rem at 100% 0%, #5b0d1d, transparent 70%), #4b0818; }
.ds--maison .ds-brand img { height: 2.1rem; filter: none; }
.ds--maison mb-launcher { display: inline-flex; align-items: center; }
.ds--maison .ds-primary { background: linear-gradient(135deg, #fff, #f4d9a6); }
.ds--maison .ds-side__foot { padding: .6rem; }
@media (max-width: 1280px) { .ds--maison .ds-switch span { display: none; } .ds--maison .ds-switch { padding: .45rem .55rem; } }

/* Pages de partage (liens /p/…) : même interface que le Drive */
.bc-share-facts { list-style: none; margin: 0 0 .9rem; padding: 0 .6rem; display: grid; gap: .45rem; font-size: .84rem; line-height: 1.45; color: var(--mb-color-text); }
.bc-share-report { padding: 0 .6rem; }
.bc-share-actions { opacity: 1 !important; }
.bc-share-lock { max-width: 26rem; }
.bc-drop-zone { border: 2px dashed var(--ds-line); }
.is-dropping .bc-drop-zone { border-color: var(--ds-indigo); background: color-mix(in srgb, var(--ds-indigo) 6%, #fff); }

/* Éditeur Office en pleine page (ds--editor) : pas de colonne latérale fixe, marges réduites, l'éditeur prend la place. */
.ds--editor .ds-layout { grid-template-columns: minmax(0, 1fr); }
.ds--editor .ds-side { position: fixed; inset: 4.25rem auto 0 0; width: min(18rem, 85vw); z-index: 40; transform: translateX(-105%); transition: transform .25s; box-shadow: 0 0 40px rgba(0, 0, 0, .2); }
.ds--editor.ds-side-open .ds-side { transform: none; }
.ds--editor .ds-main { padding: .25rem; overflow: hidden; }
.ds--editor .ds-bar__inner { height: 3.75rem; }
.ds--editor .ds-side { top: 3.75rem; }
.ds--editor .ds-menu { display: grid; }

/* Menu au clic droit (drive-menu.js) */
.bc-ctx { position: fixed; z-index: 80; min-width: 14.5rem; max-width: 20rem; padding: .35rem; background: #fff; border: 1px solid var(--mb-color-border, #e9e2e3); border-radius: var(--mb-radius-lg, .75rem); box-shadow: var(--mb-shadow-md, 0 10px 35px rgba(44, 18, 23, .08)), 0 2px 6px rgba(44, 18, 23, .06); font: 500 .9rem/1.2 var(--mb-font-body, system-ui); color: var(--mb-color-text, #241b1d); animation: bc-ctx-in .12s ease-out; }
@keyframes bc-ctx-in { from { opacity: 0; transform: translateY(-3px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .bc-ctx { animation: none; } }
.bc-ctx__title { padding: .45rem .65rem .4rem; font-size: .76rem; font-weight: 600; color: var(--mb-color-muted, #7d7174); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--mb-color-border, #e9e2e3); margin-bottom: .3rem; }
.bc-ctx__item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .65rem; border: 0; border-radius: var(--mb-radius-sm, .375rem); background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.bc-ctx__item svg { flex: none; color: var(--mb-color-muted, #7d7174); }
.bc-ctx__item:hover, .bc-ctx__item:focus-visible { background: var(--mb-color-primary-soft, #f8f1f2); color: var(--mb-color-primary, #781428); outline: none; }
.bc-ctx__item:hover svg, .bc-ctx__item:focus-visible svg { color: currentColor; }
.bc-ctx__item.is-danger { color: var(--mb-color-danger, #a42738); }
.bc-ctx__item.is-danger svg { color: currentColor; }
.bc-ctx__item.is-danger:hover, .bc-ctx__item.is-danger:focus-visible { background: var(--mb-color-danger-soft, #fae7e9); color: var(--mb-color-danger, #a42738); }
.bc-ctx__sep { height: 1px; margin: .3rem .2rem; background: var(--mb-color-border, #e9e2e3); }

/* Glisser-déposer : élément saisi, dossier visé, destination refusée */
.bc-drive-table tr.is-ctx > td { background: var(--mb-color-primary-soft, #f8f1f2); }
.bc-drive-table tr[draggable="true"] { cursor: default; }
.bc-drive-table tr.is-dragging { opacity: .45; }
.bc-drive-table tr.is-moving { opacity: .55; pointer-events: none; }
.bc-drive-table tr.is-drop-target > td { background: color-mix(in srgb, var(--mb-color-primary, #781428) 9%, #fff); box-shadow: inset 0 2px 0 var(--mb-color-primary, #781428), inset 0 -2px 0 var(--mb-color-primary, #781428); }
.bc-drive-table tr.is-drop-target > td:first-child { box-shadow: inset 2px 2px 0 var(--mb-color-primary, #781428), inset 0 -2px 0 var(--mb-color-primary, #781428); }
.bc-drive-table tr.is-drop-target > td:last-child { box-shadow: inset -2px 2px 0 var(--mb-color-primary, #781428), inset 0 -2px 0 var(--mb-color-primary, #781428); }
.bc-drive-table tr.is-drop-refused > td { background: var(--mb-color-background, #f7f5f4); cursor: no-drop; }
.bc-crumbs a.is-drop-target { background: var(--mb-color-primary-soft, #f8f1f2); outline: 2px solid var(--mb-color-primary, #781428); outline-offset: 2px; border-radius: var(--mb-radius-sm, .375rem); }
.bc-drag-ghost { position: fixed; top: -100px; left: -100px; padding: .4rem .7rem; border-radius: 999px; background: var(--mb-color-primary, #781428); color: #fff; font: 600 .85rem var(--mb-font-body, system-ui); box-shadow: 0 6px 18px rgba(44, 18, 23, .25); white-space: nowrap; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; }

/* Sélection multiple (drive-menu.js) */
.bc-drive-table .bc-sel { width: 2.4rem; padding-right: 0; }
.bc-sel__box { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--mb-color-primary, #781428); cursor: pointer; vertical-align: middle; }
.bc-drive-table tr.is-selected > td { background: color-mix(in srgb, var(--mb-color-primary, #781428) 6%, #fff); }
.bc-drive-table tr.is-selected > td:first-child { box-shadow: inset 3px 0 0 var(--mb-color-primary, #781428); }
.bc-selbar { position: fixed; z-index: 60; left: 50%; bottom: 1.25rem; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 2rem); display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .7rem; padding: .55rem .6rem .55rem 1rem; border: 1px solid var(--mb-color-border, #e9e2e3); border-radius: 999px; background: #fff; box-shadow: var(--mb-shadow-lg, 0 25px 90px rgba(35, 9, 14, .28)); animation: bc-selbar-in .16s ease-out; }
@keyframes bc-selbar-in { from { opacity: 0; transform: translate(-50%, 8px); } }
@media (prefers-reduced-motion: reduce) { .bc-selbar { animation: none; } }
.bc-selbar[hidden] { display: none; }
.bc-selbar strong { color: var(--mb-color-primary, #781428); font-weight: 600; margin-right: .3rem; }
.bc-selbar__move { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; white-space: nowrap; }
.bc-selbar__move[hidden] { display: none; }
.bc-selbar__move .mb-select { min-width: 12rem; padding-block: .3rem; }
.bc-selbar__clear { border-radius: 999px !important; }
.bc-selbar .mb-btn { border-radius: 999px; }
.bc-selbar [data-sel-status] { flex-basis: 100%; margin: 0 .2rem .2rem; max-width: 40rem; }
.bc-selbar [data-sel-status]:empty { display: none; }
@media (max-width: 760px) { .bc-selbar { border-radius: var(--mb-radius-lg, .75rem); bottom: .75rem; } .bc-selbar__move span { display: none; } .bc-selbar__move .mb-select { min-width: 0; max-width: 11rem; } }

/* Renommer sur place (double-clic sur le nom, F2) */
.bc-rename-wrap { display: inline-flex; align-items: center; gap: .55rem; width: min(100%, 26rem); }
.bc-rename { flex: 1; min-width: 6rem; padding: .3rem .5rem; border: 1px solid var(--mb-color-primary, #781428); border-radius: var(--mb-radius-sm, .375rem); background: #fff; color: var(--mb-color-text, #241b1d); font: 500 .92rem var(--mb-font-body, system-ui); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mb-color-primary, #781428) 15%, transparent); outline: none; }
.bc-rename:disabled { opacity: .6; }

/* Fenêtre de partage (drive-share.js) */
.bc-share { width: min(34rem, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--mb-color-border, #e9e2e3); border-radius: var(--mb-radius-xl, .875rem); box-shadow: var(--mb-shadow-lg, 0 25px 90px rgba(35, 9, 14, .28)); color: var(--mb-color-text, #241b1d); font-family: var(--mb-font-body, system-ui); }
.bc-share::backdrop { background: rgba(36, 27, 29, .38); backdrop-filter: blur(2px); }
.bc-share__form { display: grid; gap: .6rem; padding: 1.2rem 1.3rem 1rem; }
.bc-share__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .2rem; }
.bc-share__head h2 { margin: 0; font: 600 1.2rem/1.3 var(--mb-font-display, Georgia, serif); overflow-wrap: anywhere; }
.bc-share__head h2 span { color: var(--mb-color-primary, #781428); }
.bc-share__x { flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 0; border-radius: 999px; background: transparent; color: var(--mb-color-muted, #7d7174); cursor: pointer; }
.bc-share__x:hover { background: var(--mb-color-primary-soft, #f8f1f2); color: var(--mb-color-primary, #781428); }
.bc-share__msg { resize: vertical; min-height: 2.6rem; }
.bc-share__opts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.bc-share__opts label { display: grid; gap: .25rem; font-size: .8rem; color: var(--mb-color-muted, #7d7174); font-weight: 500; }
.bc-share__more summary { cursor: pointer; font-size: .85rem; color: var(--mb-color-muted, #7d7174); }
.bc-share__more[open] summary { margin-bottom: .45rem; }
.bc-share__send { justify-self: end; min-width: 8rem; }
.bc-share__or { display: flex; align-items: center; gap: .8rem; padding: 0 1.3rem; color: var(--mb-color-muted, #7d7174); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.bc-share__or::before, .bc-share__or::after { content: ''; flex: 1; height: 1px; background: var(--mb-color-border, #e9e2e3); }
.bc-share__apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; padding: .9rem 1.3rem 1.1rem; }
.bc-share__apps button { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .7rem .4rem .6rem; border: 1px solid var(--mb-color-border, #e9e2e3); border-radius: var(--mb-radius-lg, .75rem); background: #fff; color: var(--mb-color-text, #241b1d); font: 500 .8rem var(--mb-font-body, system-ui); cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.bc-share__apps button:hover { background: var(--mb-color-primary-soft, #f8f1f2); border-color: color-mix(in srgb, var(--mb-color-primary, #781428) 25%, #fff); }
.bc-share__apps button:active { transform: scale(.97); }
.bc-share__apps button:disabled { opacity: .6; cursor: progress; }
.bc-share__ic { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 999px; color: #fff; }
.bc-share__ic.is-link { background: var(--mb-color-primary-soft, #f8f1f2); color: var(--mb-color-primary, #781428); }
.bc-share__ic.is-whatsapp { background: #25d366; }
.bc-share__ic.is-telegram { background: #229ed9; }
.bc-share__ic.is-messenger { background: linear-gradient(135deg, #0a7cff, #a334fa 70%, #ff6968); }
.bc-share__ic.is-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.bc-share__ic.is-sms { background: #34c759; }
.bc-share__status { margin: 0; padding: 0 1.3rem 1.1rem; overflow-wrap: anywhere; }
.bc-share__status:empty { display: none; }
.bc-share__status.is-error { color: var(--mb-color-danger, #a42738); }
@media (max-width: 520px) { .bc-share__opts { grid-template-columns: 1fr; } .bc-share__apps { grid-template-columns: repeat(2, 1fr); } }

/* Aperçu au survol (drive-preview.js) */
.bc-peek { position: fixed; z-index: 70; width: 17.5rem; overflow: hidden; pointer-events: none; background: #fff; border: 1px solid var(--mb-color-border, #e9e2e3); border-radius: var(--mb-radius-lg, .75rem); box-shadow: var(--mb-shadow-md, 0 10px 35px rgba(44, 18, 23, .08)), 0 2px 8px rgba(44, 18, 23, .08); animation: bc-peek-in .14s ease-out; }
.bc-peek[hidden] { display: none; }
@keyframes bc-peek-in { from { opacity: 0; transform: translateY(4px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .bc-peek { animation: none; } }
.bc-peek__media { display: grid; place-items: center; height: 12rem; background: var(--mb-color-background, #f7f5f4) repeating-conic-gradient(#efebea 0 25%, transparent 0 50%) 0 0 / 16px 16px; border-bottom: 1px solid var(--mb-color-border, #e9e2e3); overflow: hidden; }
.bc-peek__media[data-kind="pdf"], .bc-peek__media[data-kind="text"], .bc-peek__media[data-kind="file"], .bc-peek__media[data-kind="audio"] { background: var(--mb-color-background, #f7f5f4); }
.bc-peek__media img, .bc-peek__media video { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.bc-peek__media video { width: 100%; height: 100%; background: #000; }
/* Cadre à l'échelle 1/2 : la première page entière tient dans la carte. */
.bc-peek__media iframe { width: 200%; height: 200%; border: 0; transform: scale(.5); transform-origin: 0 0; align-self: start; justify-self: start; background: #fff; }
.bc-peek__media iframe.is-text { background: #fff; }
.bc-peek__icon { font-size: 3.2rem; line-height: 1; filter: saturate(.9); }
.bc-peek__audio { display: grid; justify-items: center; gap: .8rem; width: 100%; padding: 0 .8rem; }
.bc-peek__audio audio { width: 100%; }
.bc-peek__info { display: grid; gap: .15rem; padding: .6rem .8rem .7rem; }
.bc-peek__name { font: 600 .88rem/1.3 var(--mb-font-body, system-ui); color: var(--mb-color-text, #241b1d); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-peek__meta { font-size: .76rem; color: var(--mb-color-muted, #7d7174); }

/* Bascule Liste / Grille */
.bc-viewbar { display: flex; justify-content: flex-end; margin: -.2rem 0 .55rem; }
.bc-view-toggle { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--mb-color-border, #e9e2e3); border-radius: 999px; background: #fff; }
.bc-view-toggle button { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .7rem; border: 0; border-radius: 999px; background: transparent; color: var(--mb-color-muted, #7d7174); font: 500 .8rem var(--mb-font-body, system-ui); cursor: pointer; }
.bc-view-toggle button:hover { color: var(--mb-color-text, #241b1d); }
.bc-view-toggle button[aria-pressed="true"] { background: var(--mb-color-primary-soft, #f8f1f2); color: var(--mb-color-primary, #781428); }
@media (max-width: 560px) { .bc-view-toggle span { display: none; } }

/* Vue en grille (drive-grid.js) : le tableau mis en cartes */
.bc-drive-card.is-grid { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.bc-drive-table.is-grid, .bc-drive-table.is-grid tbody { display: block; }
.bc-drive-table.is-grid thead { display: none; }
.bc-drive-table.is-grid tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .9rem; }
.bc-drive-table.is-grid tr { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--mb-color-border, #e9e2e3); border-radius: var(--mb-radius-lg, .75rem); background: #fff; transition: border-color .15s, box-shadow .15s; }
.bc-drive-table.is-grid tr:hover { border-color: color-mix(in srgb, var(--mb-color-primary, #781428) 28%, #fff); box-shadow: var(--mb-shadow-sm, 0 2px 8px rgba(44, 18, 23, .04)); }
.bc-drive-table.is-grid td { display: block; padding: 0; border: 0; background: transparent !important; box-shadow: none !important; }
.bc-drive-table.is-grid td.bc-hide-sm { display: none; }
.bc-drive-table.is-grid td.bc-sel { position: absolute; z-index: 2; top: .5rem; left: .5rem; width: auto; opacity: 0; transition: opacity .12s; }
.bc-drive-table.is-grid tr:hover td.bc-sel, .bc-drive-table.is-grid tr.is-selected td.bc-sel, .bc-drive-table.is-grid tr:focus-within td.bc-sel { opacity: 1; }
.bc-drive-table.is-grid td.bc-sel .bc-sel__box { width: 1.15rem; height: 1.15rem; box-shadow: 0 0 0 3px rgba(255, 255, 255, .85); border-radius: 4px; }
.bc-drive-table.is-grid tr > td:not(.bc-sel):not(.bc-hide-sm):not(:last-child) { padding: .55rem; }
.bc-drive-table.is-grid .bc-drive-name { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; color: inherit; text-decoration: none; }
.bc-drive-table.is-grid .bc-thumb { grid-area: 1 / 1; display: block; aspect-ratio: 4 / 3; border-radius: calc(var(--mb-radius-lg, .75rem) - 4px); background: var(--mb-color-background, #f7f5f4); overflow: hidden; }
.bc-drive-table.is-grid tr[data-folder] .bc-thumb { background: color-mix(in srgb, var(--mb-color-primary, #781428) 6%, #fff); }
.bc-drive-table.is-grid .bc-thumb img, .bc-drive-table.is-grid .bc-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .2s; }
.bc-drive-table.is-grid .bc-thumb.is-ready img, .bc-drive-table.is-grid .bc-thumb.is-ready video { opacity: 1; }
.bc-drive-table.is-grid .bc-drive-name > .bc-file-ic { grid-area: 1 / 1; place-self: center; width: auto; height: auto; font-size: 2.8rem; line-height: 1; background: none; box-shadow: none; }
.bc-drive-table.is-grid .bc-thumb.has-media ~ .bc-file-ic { place-self: end start; margin: 0 0 .35rem .35rem; padding: .15rem .25rem; font-size: 1rem; border-radius: 6px; background: rgba(255, 255, 255, .9); }
.bc-drive-table.is-grid .bc-grid-name, .bc-drive-table.is-grid .bc-drive-name > span:not(.bc-thumb):not(.bc-file-ic) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: .86rem; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.bc-drive-table.is-grid td > .mb-badge, .bc-drive-table.is-grid td > .mb-help { margin-top: .35rem; font-size: .72rem; }
/* Actions : seul le bouton « … » reste, en haut à droite au survol (le reste est dans le clic droit). */
.bc-drive-table.is-grid tr > td:last-child { position: absolute; z-index: 3; top: .4rem; right: .4rem; }
.bc-drive-table.is-grid .bc-drive-actions > :not(details:last-child) { display: none; }
.bc-drive-table.is-grid .bc-drive-actions > details:last-child > summary { opacity: 0; background: rgba(255, 255, 255, .92); transition: opacity .12s; }
.bc-drive-table.is-grid tr:hover .bc-drive-actions > details > summary, .bc-drive-table.is-grid .bc-drive-actions > details[open] > summary, .bc-drive-table.is-grid tr:focus-within .bc-drive-actions > details > summary { opacity: 1; }
.bc-drive-table.is-grid .bc-drive-pop { right: 0; left: auto; }
/* États : sélection, menu ouvert, cible d'un dépôt */
.bc-drive-table.is-grid tr.is-selected { border-color: var(--mb-color-primary, #781428); background: color-mix(in srgb, var(--mb-color-primary, #781428) 5%, #fff); box-shadow: 0 0 0 1px var(--mb-color-primary, #781428); }
.bc-drive-table.is-grid tr.is-ctx { border-color: color-mix(in srgb, var(--mb-color-primary, #781428) 45%, #fff); }
.bc-drive-table.is-grid tr.is-drop-target { border-color: var(--mb-color-primary, #781428); background: color-mix(in srgb, var(--mb-color-primary, #781428) 9%, #fff); box-shadow: 0 0 0 2px var(--mb-color-primary, #781428); }
.bc-drive-table.is-grid tr.is-drop-refused { opacity: .55; }
@media (max-width: 560px) { .bc-drive-table.is-grid tbody { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .bc-drive-table.is-grid td.bc-sel { opacity: 1; } .bc-drive-table.is-grid .bc-drive-actions > details:last-child > summary { opacity: 1; } }

/* Tri (drive-sort.js) */
.bc-viewbar { align-items: center; gap: .6rem; }
.bc-sortbar { display: inline-flex; align-items: center; gap: .4rem; margin-right: auto; font-size: .8rem; color: var(--mb-color-muted, #7d7174); }
.bc-sortbar .mb-select { width: auto; padding-block: .28rem; font-size: .82rem; }
.bc-sort { display: inline-flex; align-items: center; gap: .25rem; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.bc-sort:hover { color: var(--mb-color-text, #241b1d); }
.bc-sort__arrow { opacity: 0; transition: transform .15s, opacity .15s; }
.bc-sort:hover .bc-sort__arrow { opacity: .45; }
.bc-sort.is-active { color: var(--mb-color-primary, #781428); }
.bc-sort.is-active .bc-sort__arrow { opacity: 1; transform: rotate(180deg); }
.bc-sort.is-active.is-desc .bc-sort__arrow { transform: none; }
@media (max-width: 560px) { .bc-sortbar span { display: none; } }

/* Favoris (drive-favorites.js) */
.bc-fav { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; margin-left: .35rem; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--mb-color-muted, #7d7174); cursor: pointer; vertical-align: middle; opacity: 0; transition: opacity .12s, color .12s, background .12s; }
.bc-fav svg { fill: none; }
.bc-fav[aria-pressed="true"] { opacity: 1; color: #c9a227; }
.bc-fav[aria-pressed="true"] svg { fill: currentColor; }
.bc-drive-table tr:hover .bc-fav, .bc-fav:focus-visible { opacity: 1; }
.bc-fav:hover { background: color-mix(in srgb, #c9a227 14%, #fff); color: #a8861c; }
.bc-drive-table tr.is-leaving { opacity: 0; transition: opacity .2s; }
.bc-drive-table.is-grid .bc-fav { position: absolute; z-index: 3; top: .45rem; right: 2.6rem; margin: 0; background: rgba(255, 255, 255, .92); }
@media (hover: none) { .bc-fav { opacity: 1; } }

/* Recherche instantanée (drive-filter.js) */
.ds-search { position: relative; }
.bc-filter-hint { position: absolute; right: 2.6rem; top: 50%; transform: translateY(-50%); font-size: .72rem; color: rgba(255, 255, 255, .6); pointer-events: none; white-space: nowrap; }
.ds-search:focus-within .bc-filter-hint { color: var(--mb-color-muted, #7d7174); }
.bc-filter-hint[hidden] { display: none; }
.bc-filter-empty { margin: 1rem .2rem; }
.bc-filter-empty[hidden] { display: none; }
@media (max-width: 760px) { .bc-filter-hint { display: none; } }

/* Barre de sélection : centrée sur la zone des fichiers (hors colonne de gauche), largeur bornée, message discret. */
.bc-selbar { max-width: min(56rem, calc(100vw - 2rem)); }
@media (min-width: 901px) { .ds:not(.ds--editor) .bc-selbar { left: calc(17.5rem + (100vw - 17.5rem) / 2); max-width: min(56rem, calc(100vw - 17.5rem - 2rem)); } }
.bc-selbar [data-sel-status] { flex-basis: 100%; margin: -.1rem .3rem .1rem; font-size: .78rem; color: var(--mb-color-muted, #7d7174); }
.bc-selbar__move span { white-space: nowrap; }
.bc-selbar__link { padding: 0; border: 0; background: none; color: var(--mb-color-primary, #781428); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }

/* Historique des versions (drive-versions.js) */
.bc-versions__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; max-height: min(26rem, 60vh); overflow: auto; }
.bc-versions__item { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .6rem .7rem; border: 1px solid var(--mb-color-border, #e9e2e3); border-radius: var(--mb-radius-md, .5625rem); }
.bc-versions__item > div:first-child { display: grid; gap: .1rem; min-width: 0; }
.bc-versions__item strong { font-size: .88rem; font-weight: 600; }
.bc-versions__item span { font-size: .76rem; color: var(--mb-color-muted, #7d7174); }
.bc-versions__item.is-current { background: var(--mb-color-primary-soft, #f8f1f2); border-color: color-mix(in srgb, var(--mb-color-primary, #781428) 25%, #fff); }
.bc-versions__item.is-current strong { color: var(--mb-color-primary, #781428); }
.bc-versions__actions { display: flex; gap: .35rem; flex: none; }
.bc-versions__empty { padding: .8rem .2rem; font-size: .85rem; color: var(--mb-color-muted, #7d7174); }
.bc-versions__policy { margin: .2rem 0 0; font-size: .75rem; }
@media (max-width: 520px) { .bc-versions__item { flex-direction: column; align-items: stretch; } }
/* Fenêtres fermées : jamais affichées, quelles que soient les règles de mise en page de la page. */
dialog.bc-share:not([open]) { display: none !important; }
dialog.bc-share[open] { position: fixed; inset: 0; margin: auto; height: fit-content; max-height: calc(100dvh - 2rem); overflow: auto; }
.bc-versions__actions .mb-btn { display: inline-flex; align-items: center; height: 2rem; padding: 0 .75rem; font-size: .8rem; font-weight: 600; }

/* « Annuler » après une mise à la corbeille (drive-undo.js) */
.bc-undo { position: fixed; z-index: 70; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: flex; align-items: center; gap: .7rem; max-width: calc(100vw - 2rem); padding: .6rem .6rem .6rem 1rem; overflow: hidden; border-radius: 999px; background: #241b1d; color: #fff; font-size: .92rem; box-shadow: var(--mb-shadow-lg, 0 25px 90px rgba(35, 9, 14, .28)); animation: bc-selbar-in .16s ease-out; }
@media (min-width: 900px) { .bc-undo { left: calc(17.5rem + (100vw - 17.5rem) / 2); } }
.bc-undo.is-out { opacity: 0; transition: opacity .2s; }
.bc-undo__btn { border: 0; border-radius: 999px; padding: .35rem .9rem; background: #fff; color: var(--mb-color-primary, #781428); font: 600 .88rem var(--mb-font-body, system-ui); cursor: pointer; }
.bc-undo__btn:hover { background: #f6eef0; }
.bc-undo__btn:focus-visible, .bc-undo__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.bc-undo__close { border: 0; background: none; color: rgba(255, 255, 255, .7); font-size: 1.25rem; line-height: 1; padding: 0 .35rem; cursor: pointer; }
.bc-undo__close:hover { color: #fff; }
.bc-undo__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--mb-color-primary, #781428); transform-origin: left; animation: bc-undo-bar var(--bc-undo-ms, 12s) linear forwards; }
.bc-undo.is-held .bc-undo__bar { animation-play-state: paused; }
@keyframes bc-undo-bar { to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .bc-undo, .bc-undo__bar { animation: none; } }
.bc-trash-left { font-size: .85rem; color: var(--mb-color-muted, #6b5f62); }
.bc-trash-left.is-soon { color: var(--mb-color-danger, #b42318); font-weight: 600; }
.bc-trash-from { margin-right: .3rem; font-size: .9em; }
/* Corbeille : barre d'outils et lignes compactes sur mobile */
.bc-trash-toolbar { flex-wrap: wrap; gap: .6rem; }
.bc-trash-toolbar__first { margin-left: auto; }
.bc-trash-sub { display: none; }
.bc-trash-purge__ic { display: none; }
.bc-trash-table .bc-drive-name { min-width: 0; }
.bc-trash-table td:last-child { width: 1%; white-space: nowrap; }
.bc-trash-table td:last-child .bc-drive-actions { flex-wrap: nowrap; }
.bc-trash-table td:nth-child(3) { white-space: nowrap; }
@media (max-width: 52rem) {
  .bc-trash-toolbar > p { flex-basis: 100%; }
  .bc-trash-toolbar__first { margin-left: 0; }
  .bc-trash-toolbar form { flex: 1; }
  .bc-trash-toolbar form .mb-btn { width: 100%; justify-content: center; }
  .bc-trash-table thead { display: none; }
  .bc-trash-table, .bc-trash-table tbody { display: block; width: 100%; min-width: 0 !important; }
  .bc-trash-table tr { display: flex; align-items: center; gap: .4rem; border-bottom: 1px solid var(--mb-color-border, #e9e2e3); }
  .bc-trash-table tr:last-child { border-bottom: 0; }
  .bc-trash-table td { border: 0 !important; padding-inline: .35rem !important; }
  .bc-trash-restore { padding-inline: .7rem; }
  .bc-trash-table td:first-child { flex: 1; min-width: 0; }
  .bc-trash-table td.bc-hide-sm { display: none; }
  .bc-trash-table .bc-drive-name { display: flex; overflow: hidden; }
  .bc-trash-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bc-trash-sub { display: block; margin: .15rem 0 0 calc(2.1rem + .65rem); font-size: .8rem; color: var(--mb-color-muted, #6b5f62); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bc-trash-sub .bc-trash-left { font-size: inherit; }
  .bc-trash-table td:last-child { flex: none; white-space: nowrap; }
  .bc-trash-purge__ic { display: inline-flex; }
  .bc-trash-purge__txt { display: none; }
  .bc-trash-purge { padding-inline: .55rem; }
}
.bc-guest-name { display: flex; gap: .4rem; margin: 0 0 .35rem; } .bc-guest-name .mb-input { flex: 1; min-width: 0; padding-block: .35rem; }
.bc-share-move-status:empty { display: none; } .bc-share-move-status.is-error { color: var(--mb-color-danger, #b42318); }
/* Page d'un lien de partage : fil d'Ariane sous les outils, comme dans le Drive */
.bc-share-tools { margin: -.2rem 0 1rem; }
.ds-crumbs.bc-share-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .45rem; margin: 0 0 .9rem; padding: .45rem .75rem; border-radius: var(--mb-radius-lg, .75rem); background: var(--mb-color-background, #f7f5f4); font-size: .88rem; font-weight: 500; }
.bc-share-crumbs a { display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .3rem; border-radius: var(--mb-radius-sm, .375rem); }
.bc-share-crumbs a:hover { background: #fff; }
.bc-share-crumbs [aria-current] { color: var(--mb-color-text, #241b1d); font-weight: 600; padding: .1rem .3rem; }
.bc-share-crumbs__sep { color: var(--mb-color-muted, #6b5f62); }
.bc-guest-dialog { width: min(28rem, calc(100vw - 2rem)); }
.bc-guest-error { margin: 0; color: var(--mb-color-danger, #b42318); }
.bc-guest-error:empty { display: none; }
.bc-guest-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .3rem; }
/* Écrans tactiles (pas de survol) : menu « … » et case de sélection des cartes toujours visibles. */
@media (hover: none) { .bc-drive-table.is-grid .bc-drive-actions > details:last-child > summary, .bc-drive-table.is-grid td.bc-sel { opacity: 1; } }
.bc-pending { margin-left: .5rem; font-size: .72rem; font-weight: 600; background: #fff7e6; color: #8a5a00; border: 1px solid #f3d9a4; white-space: nowrap; }
/* Demandes des invités à valider (vue Partages) */
.bc-nav-count { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; margin-left: auto; padding: 0 .35rem; border-radius: 999px; background: var(--mb-color-primary, #781428); color: #fff; font-size: .72rem; font-weight: 700; }
.bc-requests { margin: 0 0 1.4rem; padding: 1rem 1.1rem; border: 1px solid #f3d9a4; border-radius: var(--mb-radius-lg, .75rem); background: #fffaf0; }
.bc-requests h2 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .7rem; font: 600 1.05rem var(--mb-font-display, Georgia, serif); }
.bc-requests h2 .bc-nav-count { margin-left: 0; }
.bc-requests__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.bc-requests__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .65rem .8rem; border-radius: var(--mb-radius-md, .6rem); background: #fff; border: 1px solid var(--mb-color-border, #e9e2e3); }
.bc-requests__what { min-width: 0; line-height: 1.5; }
.bc-requests__node { display: inline-flex; vertical-align: middle; margin: 0 .2rem; font-weight: 600; }
.bc-requests__node .bc-file-ic { width: 1.6rem; height: 1.6rem; font-size: .9rem; }
.bc-requests__meta { display: block; }
.bc-requests__actions { display: flex; gap: .4rem; }
.bc-share__approve { display: grid; gap: .35rem; margin: .2rem 0 0; padding: .7rem .8rem; border: 1px solid var(--mb-color-border, #e9e2e3); border-radius: var(--mb-radius-md, .6rem); }
.bc-share__approve[hidden] { display: none; }
.bc-share__approve legend { padding: 0 .3rem; font-size: .82rem; font-weight: 600; }
.bc-share__approve label { display: flex; align-items: center; gap: .45rem; font-size: .9rem; }
.bc-office-ask { margin: 0 0 0 auto; }
.bc-share-note { margin: -.4rem 0 .8rem; }
.bc-additions { margin: 0 0 .9rem; padding: .6rem .85rem; border: 1px solid #f3d9a4; border-radius: var(--mb-radius-lg, .75rem); background: #fffaf0; font-size: .9rem; }
.bc-additions ul { list-style: none; margin: .35rem 0 0; padding: 0; display: grid; gap: .2rem; }
/* Fenêtre de partage : tableau des droits (peut / doit demander / ne peut pas) */
.bc-perm { margin: .2rem 0 0; padding: 0; border: 0; min-width: 0; }
.bc-perm legend { padding: 0; margin-bottom: .35rem; font-size: .82rem; font-weight: 600; }
.bc-perm__presets { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.bc-perm__preset { padding: .28rem .65rem; border: 1px solid var(--mb-color-border, #e9e2e3); border-radius: 999px; background: #fff; color: var(--mb-color-text, #241b1d); font: 500 .8rem var(--mb-font-body, system-ui); cursor: pointer; }
.bc-perm__preset:hover { border-color: var(--mb-color-primary, #781428); }
.bc-perm__preset[aria-pressed="true"] { border-color: var(--mb-color-primary, #781428); background: var(--mb-color-primary-soft, #f8f1f2); color: var(--mb-color-primary, #781428); }
.bc-perm__preset[hidden] { display: none; }
.bc-perm__table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.bc-perm__table th, .bc-perm__table td { padding: .32rem .4rem; border-bottom: 1px solid var(--mb-color-border, #f0eaeb); }
.bc-perm__table thead th { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--mb-color-muted, #6b5f62); text-align: center; }
.bc-perm__table thead th:first-child, .bc-perm__table tbody th { text-align: left; font-weight: 500; }
.bc-perm__table tr[hidden] { display: none; }
.bc-perm__table td { text-align: center; width: 5.6rem; }
.bc-perm__cell { display: inline-grid; place-items: center; width: 2rem; height: 1.8rem; cursor: pointer; }
.bc-perm__cell input { width: 1.05rem; height: 1.05rem; accent-color: var(--mb-color-primary, #781428); cursor: pointer; }
.bc-perm__cell input:disabled { cursor: not-allowed; opacity: .35; }
.bc-perm__table tbody tr:hover { background: #fbf8f8; }
@media (max-width: 520px) { .bc-perm__table td { width: 3.6rem; } .bc-perm__table thead th { font-size: .62rem; letter-spacing: 0; } }
.bc-decisions { margin: 0 0 1rem; padding: .7rem .9rem; border: 1px solid var(--mb-color-border, #e9e2e3); border-radius: var(--mb-radius-lg, .75rem); background: #f6fbf7; font-size: .9rem; }
.bc-decisions ul { list-style: none; margin: .35rem 0 0; padding: 0; display: grid; gap: .2rem; }
.bc-decisions .is-refused, .bc-decisions .is-failed { color: var(--mb-color-danger, #b42318); }
/* Liste des partages : nom lisible, droits en petit, boutons sur une ligne quand c'est possible */
.bc-shares-table td:first-child { min-width: 12rem; }
.bc-shares-table td:first-child .bc-drive-name { white-space: normal; }
.bc-shares-table td:nth-child(2) { min-width: 14rem; max-width: 26rem; }
.bc-shares-table td:last-child .bc-drive-actions { flex-wrap: wrap; justify-content: flex-end; min-width: 13rem; }
.bc-shares-table td:last-child .mb-btn { white-space: nowrap; }
/* Liste des partages sur mobile : une carte par lien (nom, type et droits, expiration, boutons), sans défilement horizontal */
@media (max-width: 52rem) {
  .bc-shares-table { min-width: 0 !important; }
  .bc-shares-table thead { display: none; }
  .bc-shares-table, .bc-shares-table tbody, .bc-shares-table tr { display: block; width: 100%; }
  .bc-shares-table tr { padding: .75rem .2rem; border-bottom: 1px solid var(--mb-color-border, #e9e2e3); }
  .bc-shares-table tr:last-child { border-bottom: 0; }
  .bc-shares-table td { display: block; min-width: 0 !important; max-width: none !important; padding: .15rem .35rem !important; border: 0 !important; }
  .bc-shares-table td.bc-hide-sm { display: none; }
  .bc-shares-table td:nth-child(2) { font-size: .88rem; }
  .bc-shares-table td:last-child .bc-drive-actions { justify-content: flex-start; min-width: 0; margin-top: .45rem; gap: .4rem; }
}
.bc-perm__toggle { display: inline-flex; align-items: center; gap: .35rem; margin: .1rem 0 .3rem; padding: .2rem 0; border: 0; background: none; color: var(--mb-color-primary, #781428); font: 600 .84rem var(--mb-font-body, system-ui); cursor: pointer; }
.bc-perm__toggle svg { transition: transform .15s; }
.bc-perm__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.bc-perm__toggle:hover span { text-decoration: underline; }
.bc-perm__detail[hidden] { display: none; }
.bc-search-path { display: block; margin: .1rem 0 0 calc(2.1rem + .65rem); font-size: .78rem; }
/* Recherche dans la page d'un lien, sur mobile seulement (la barre du bandeau y est masquée) */
.bc-mobile-search { display: none; }
@media (max-width: 52rem) {
  .ds-main .bc-mobile-search { display: flex; max-width: none; margin: -.3rem 0 .9rem; background: #fff; border: 1px solid var(--mb-color-border, #e9e2e3); color: var(--mb-color-muted, #6b5f62); }
  .ds-main .bc-mobile-search input { color: var(--mb-color-text, #241b1d); }
  .ds-main .bc-mobile-search input::placeholder { color: var(--mb-color-muted, #8a7f82); }
}
/* « Récents » : moment et nature de l'accès sous le nom, sur mobile (la colonne est masquée) */
.bc-recent-when { display: none; }
@media (max-width: 52rem) { .bc-recent-when { display: block; } }
/* Page d'un lien : notice des actions « sur demande » */
.bc-ask-notice { margin: .2rem 0 1.1rem; padding: .75rem .85rem; border: 1px solid #f3d9a4; border-left: 4px solid #e0a93b; border-radius: var(--mb-radius-lg, .75rem); background: #fffaf0; }
.bc-ask-notice__title { display: flex; align-items: center; gap: .4rem; margin: 0 0 .25rem; font-weight: 700; font-size: .9rem; color: #7a4b00; }
.bc-ask-notice__text { margin: 0 0 .5rem; font-size: .8rem; line-height: 1.4; color: var(--mb-color-muted, #6b5f62); }
.bc-ask-notice__list { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.bc-ask-notice__list li { padding: .18rem .55rem; border-radius: 999px; background: #fff; border: 1px solid #f3d9a4; font-size: .78rem; font-weight: 500; color: #5c3a00; }
.bc-ask-notice--allow { border-color: #bfe3c9; border-left-color: #2f9e5b; background: #f3fbf5; }
.bc-ask-notice--allow .bc-ask-notice__title { color: #1d6b3c; }
.bc-ask-notice--allow .bc-ask-notice__list li { border-color: #bfe3c9; color: #1d5a35; }
/* Drive en marque blanche d'un partenaire (drive.quoreom.fr) */
.ds-brand--partner { display: inline-flex; align-items: center; gap: .6rem; }
.ds-brand--partner img { height: 2.1rem; width: auto; filter: none; }
.ds-brand--partner strong { font-size: 1.1rem; letter-spacing: .01em; }
.ds--partner .ds-side__foot span, .ds--partner .ds-side__foot a { font-size: .78rem; color: var(--mb-color-muted, #6b5f62); text-decoration: none; }
