/* ============================================================
   DRIVE DE L'AGENCE (Franck, 23/10/2026 : « une interface style drive (google drive / dropbox) »)
   templates/drive/index.html.twig + public/js/drive.js. Habit SF de l'admin (variables d'app.css).
   Mobile d'abord : une colonne, l'arbre en tiroir, cibles au doigt de 44 px ; ≥ 900 px : arbre à gauche.
   ============================================================ */

/* ---------- Bouton de l'en-tête : icône seule, infobulle « Drive » (même habit que les sons) ---------- */
.top-drive {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 26px; padding: 0; border-radius: 6px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--border); color: var(--muted);
}
.top-drive:hover, .top-drive:focus-visible { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.top-drive svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- Plein écran dans la modale de DELMAK ---------- */
.mdl:has(.dr-app) { padding-top: 2.5vh; }
.mdl-box:has(.dr-app) { max-width: none; width: calc(100vw - 32px); height: 95vh; height: 95dvh; max-height: none; }
.mdl-body:has(.dr-app) { flex: 1; min-height: 0; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.mdl-body > .frag:has(.dr-app) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
@media (max-width: 899px) {
  .mdl:has(.dr-app) { padding: 0; }
  .mdl-box:has(.dr-app) { width: 100%; height: 100vh; height: 100dvh; }
}
/* Page /drive en accès direct : la hauteur de l'écran, sous l'en-tête. */
main > .dr-app { height: calc(100vh - 110px); height: calc(100dvh - 110px); min-height: 460px; border: 1px solid var(--border); border-radius: 14px;
  background: linear-gradient(180deg, var(--card-2), var(--card)); overflow: hidden; }

/* ---------- Châssis ---------- */
.dr-app { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; color: var(--fg); font-size: 13px; }
.dr-app[aria-busy="true"] .dr-liste { opacity: .6; transition: opacity .2s .15s; }
.dr-app svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.dr-barre {
  display: grid; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border);
  grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "arbre fil" "cherche cherche" "outils outils";
  align-items: center;
}
.dr-bt-arbre { grid-area: arbre; }
.dr-fil { grid-area: fil; }
.dr-cherche { grid-area: cherche; }
.dr-outils { grid-area: outils; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.dr-bt {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--border-lit); color: var(--fg);
  font: 500 12.5px var(--font); white-space: nowrap;
}
.dr-bt:hover:not([disabled]), .dr-bt:focus-visible { border-color: var(--accent); color: var(--accent); }
.dr-bt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dr-bt[disabled] { opacity: .4; cursor: not-allowed; }
.dr-bt svg { width: 17px; height: 17px; flex: none; }
.dr-bt-accent { background: var(--accent-soft); border-color: rgba(53, 208, 242, .45); color: var(--accent); }
.dr-bt-danger { color: var(--danger); border-color: rgba(251, 95, 122, .4); }
.dr-bt-danger:hover:not([disabled]) { border-color: var(--danger); color: var(--danger); }
.dr-bt-ico { font-size: 14px; line-height: 1; }
.dr-bt-vue { padding: 0; }
.dr-vues { display: inline-flex; gap: 4px; margin-left: auto; }
.dr-bt-vue[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dr-outils .dr-lib { display: none; }
/* `.dr-app` devant : app.css habille déjà select et input[type=search|text] (spécificité plus forte qu'une classe seule). */
.dr-app .dr-tri {
  min-height: 44px; padding: 0 32px 0 10px; border-radius: 8px; max-width: 150px; width: auto;
  background: var(--bg-2); border: 1px solid var(--border-lit); color: var(--fg); font: 500 12.5px var(--font);
}

/* Fil d'Ariane : une ligne, coupé proprement. */
.dr-fil { display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; font-family: var(--font-brand); }
.dr-fil-seg {
  min-width: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; padding: 6px 8px; border-radius: 6px;
  background: none; border: 1px solid transparent; color: var(--muted); font: 600 13px var(--font-brand); cursor: pointer;
}
button.dr-fil-seg:hover { color: var(--accent); }
.dr-fil-courant { color: var(--fg); cursor: default; flex: 0 1 auto; font-size: 14px; }
.dr-fil-sep, .dr-fil-plie { color: var(--dim); flex: none; }
.dr-fil-seg.dr-survol { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.dr-cherche { position: relative; min-width: 0; }
.dr-cherche svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--dim); pointer-events: none; }
.dr-app .dr-cherche-champ {
  width: 100%; min-height: 44px; padding: 0 12px 0 36px; border-radius: 8px;
  background: var(--bg-2); border: 1px solid var(--border-lit); color: var(--fg); font: 400 16px var(--font);
}
.dr-app .dr-cherche-champ:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53, 208, 242, .15); }

/* ---------- Corps : arbre + zone ---------- */
.dr-corps { position: relative; flex: 1; min-height: 0; display: flex; }

.dr-arbre {
  position: absolute; z-index: 30; left: 0; top: 0; bottom: 0; width: min(300px, 86vw);
  display: flex; flex-direction: column; background: linear-gradient(180deg, var(--card-2), var(--card));
  border-right: 1px solid var(--border-lit); box-shadow: 20px 0 50px rgba(0, 0, 0, .5);
  transform: translateX(-102%); transition: transform .22s ease; visibility: hidden;
}
.dr-arbre-ouvert .dr-arbre { transform: none; visibility: visible; }
.dr-voile-arbre { position: absolute; inset: 0; z-index: 29; background: rgba(4, 7, 13, .55); }
.dr-voile-arbre[hidden] { display: none; }
.dr-arbre-defile { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 8px; }
.dr-arbre-liste, .dr-arbre-liste ul { list-style: none; margin: 0; padding: 0; }
.dr-noeud { display: flex; align-items: center; min-height: 40px; padding-left: calc(var(--niveau, 0) * 14px); border-radius: 8px; border: 1px solid transparent; }
.dr-noeud-courant { background: var(--accent-soft); border-color: rgba(53, 208, 242, .3); }
.dr-noeud.dr-survol, .dr-arbre-corbeille.dr-survol { border-color: var(--accent); border-style: dashed; background: var(--accent-soft); }
.dr-noeud-bascule {
  flex: none; width: 28px; height: 36px; border: 0; background: none; color: var(--dim); cursor: pointer; font-size: 11px;
  transition: transform .15s;
}
.dr-noeud-bascule[disabled] { visibility: hidden; }
[aria-expanded="true"] > .dr-noeud > .dr-noeud-bascule { transform: rotate(90deg); }
.dr-noeud-nom {
  flex: 1; min-width: 0; min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 2px;
  border: 0; background: none; color: var(--fg); font: 500 13px var(--font); text-align: left; cursor: pointer;
}
.dr-noeud-racine .dr-noeud-nom { padding-left: 8px; font-weight: 600; }
.dr-noeud-nom:hover { color: var(--accent); }
.dr-noeud-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-noeud-ico { flex: none; display: inline-flex; }
.dr-noeud-ico svg { width: 18px; height: 18px; }
.dr-arbre-corbeille {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; margin-top: 8px; padding: 0 10px;
  border-radius: 8px; border: 1px solid transparent; background: none; color: var(--muted); font: 500 13px var(--font); cursor: pointer;
}
.dr-arbre-corbeille:hover { color: var(--accent); }
.dr-arbre-corbeille svg { width: 18px; height: 18px; }
.dr-arbre-corbeille b { margin-left: auto; font: 700 11px var(--font-num); color: var(--dim); }
.dr-arbre-corbeille.dr-noeud-courant { color: var(--fg); }
.dr-espace { margin: 0; padding: 10px 14px 12px; border-top: 1px solid var(--border); color: var(--dim); font-size: 11.5px; line-height: 1.45; }

.dr-zone { position: relative; flex: 1; min-width: 0; overflow-y: auto; padding: 12px 12px 90px; -webkit-overflow-scrolling: touch; }

/* ---------- Note, sélection, vide ---------- */
.dr-note { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.dr-note[hidden] { display: none; }
.dr-note p { margin: 0; flex: 1 1 260px; color: var(--muted); font-size: 12.5px; }
.dr-vider { flex: none; }

.dr-selbar {
  position: sticky; top: -12px; z-index: 6; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: -12px -12px 12px; padding: 8px 12px; background: linear-gradient(180deg, var(--card-2), var(--card));
  border-bottom: 1px solid rgba(53, 208, 242, .35); box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}
.dr-selbar[hidden] { display: none; }
.dr-selbar-nb { font: 600 13px var(--font-brand); color: var(--accent); margin-right: auto; }
.dr-selbar-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-selbar-actions .dr-lib { display: none; }

.dr-vide { text-align: center; padding: 48px 16px; color: var(--muted); }
.dr-vide[hidden] { display: none; }
.dr-vide-titre { margin: 0 0 6px; font: 600 15px var(--font-brand); color: var(--fg); }
.dr-vide-aide { margin: 0 auto; max-width: 420px; font-size: 12.5px; }

/* ---------- Éléments : vue grille (défaut) ---------- */
.dr-liste:focus { outline: none; }
.dr-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.dr-it {
  position: relative; display: grid; gap: 4px; padding: 8px; border-radius: 10px; min-width: 0;
  background: rgba(255, 255, 255, .025); border: 1px solid var(--border); cursor: default;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.dr-it:hover { border-color: var(--border-lit); background: rgba(255, 255, 255, .045); }
.dr-it:focus { outline: none; }
.dr-it:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dr-it.dr-sel { border-color: rgba(53, 208, 242, .7); background: rgba(53, 208, 242, .11); box-shadow: inset 0 0 0 1px rgba(53, 208, 242, .25); }
.dr-it.dr-survol { outline: 2px dashed var(--accent); outline-offset: 2px; background: var(--accent-soft); }
.dr-glisse-en-cours .dr-it.dr-sel { opacity: .55; }

.dr-ico {
  position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3;
  border-radius: 8px; background: rgba(255, 255, 255, .03); overflow: hidden; color: var(--muted);
}
.dr-ico svg { width: 44%; height: auto; stroke-width: 1.3; }
.dr-ico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dr-ico.dr-ico-image svg, .dr-ico.dr-ico-image .dr-ext { visibility: hidden; }
.dr-ext {
  position: absolute; left: 50%; bottom: 17%; transform: translateX(-50%); padding: 1px 5px; border-radius: 3px;
  font: 700 9.5px/1.3 var(--font-num); letter-spacing: .04em;
  /* Pastille de la couleur de la famille (currentColor), lettres sombres. */
  color: inherit; background: currentColor; -webkit-text-fill-color: #071019;
}
.dr-nom { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; font-weight: 500; overflow-wrap: anywhere; }
.dr-sous { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: 11.5px; }
.dr-col { display: none; }

/* Couleurs par famille. */
.dr-ico[data-genre="dossier"], .dr-noeud-ico[data-genre="dossier"], .dr-noeud-ico[data-genre="racine"] { color: var(--accent); }
.dr-ico[data-genre="dossier"] svg, .dr-noeud-ico[data-genre="dossier"] svg, .dr-noeud-ico[data-genre="racine"] svg { fill: rgba(53, 208, 242, .16); }
.dr-ico[data-genre="clients"], .dr-ico[data-genre="client"], .dr-noeud-ico[data-genre="clients"], .dr-noeud-ico[data-genre="client"] { color: #a79bff; }
.dr-ico[data-genre="clients"] svg, .dr-ico[data-genre="client"] svg, .dr-noeud-ico[data-genre="clients"] svg, .dr-noeud-ico[data-genre="client"] svg { fill: rgba(124, 108, 246, .2); }
.dr-ico[data-genre="image"] { color: #c4b5fd; }
.dr-ico[data-genre="pdf"] { color: #fb7185; }
.dr-ico[data-genre="tableur"] { color: #34d399; }
.dr-ico[data-genre="document"] { color: #60a5fa; }
.dr-ico[data-genre="presentation"] { color: var(--orange); }
.dr-ico[data-genre="archive"] { color: var(--warn); }
.dr-ico[data-genre="audio"] { color: #f472b6; }
.dr-ico[data-genre="video"] { color: #e879f9; }
.dr-ico[data-genre="code"] { color: var(--accent); }
.dr-ico[data-genre="texte"] { color: #cbd5e1; }
.dr-ico[data-genre="police"], .dr-ico[data-genre="autre"] { color: #94a3b8; }

/* Case à cocher et bouton ⋯ : toujours là au doigt, au survol ou en sélection à la souris. */
.dr-case {
  position: absolute; z-index: 2; top: 2px; left: 2px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.dr-case input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.dr-plus {
  position: absolute; z-index: 2; top: 2px; right: 2px; width: 44px; height: 44px; border: 0; border-radius: 8px;
  background: none; color: var(--fg); font-size: 20px; line-height: 1; cursor: pointer; text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}
.dr-plus:hover { color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .dr-case, .dr-plus { opacity: 0; }
  .dr-it:hover .dr-case, .dr-it:hover .dr-plus, .dr-it.dr-sel .dr-case, .dr-it.dr-sel .dr-plus,
  .dr-mode-sel .dr-case, .dr-it:focus-visible .dr-plus { opacity: 1; }
}

/* ---------- Vue liste ---------- */
.dr-entete-liste { display: none; }
.dr-vue-liste { display: flex; flex-direction: column; gap: 2px; }
.dr-vue-liste .dr-it {
  grid-template-columns: 44px 32px minmax(0, 1fr) 44px; grid-template-rows: auto auto; column-gap: 8px; row-gap: 0;
  align-items: center; padding: 4px 4px; min-height: 52px; border-radius: 8px; background: none; border-color: transparent;
}
.dr-vue-liste .dr-it:hover { background: rgba(255, 255, 255, .035); }
.dr-vue-liste .dr-it.dr-sel { background: rgba(53, 208, 242, .1); border-color: rgba(53, 208, 242, .45); }
.dr-vue-liste .dr-case { position: static; grid-column: 1; grid-row: 1 / 3; }
.dr-vue-liste .dr-ico { grid-column: 2; grid-row: 1 / 3; width: 32px; height: 32px; aspect-ratio: auto; border-radius: 6px; background: none; }
.dr-vue-liste .dr-ico svg { width: 24px; }
.dr-vue-liste .dr-ext { display: none; }
.dr-vue-liste .dr-nom { grid-column: 3; grid-row: 1; -webkit-line-clamp: 1; }
.dr-vue-liste .dr-sous { grid-column: 3; grid-row: 2; }
.dr-vue-liste .dr-plus { position: static; grid-column: 4; grid-row: 1 / 3; text-shadow: none; }

/* ---------- Dépôt depuis le Finder ---------- */
.dr-depot-voile {
  position: absolute; inset: 6px; z-index: 15; display: none; align-items: center; justify-content: center;
  border: 2px dashed var(--accent); border-radius: 14px; background: rgba(8, 20, 32, .82); pointer-events: none;
}
.dr-depot-voile * { pointer-events: none; }
.dr-depot .dr-depot-voile { display: flex; }
.dr-depot-refus .dr-depot-voile { border-color: var(--danger); }
.dr-depot-voile p { display: grid; justify-items: center; gap: 10px; margin: 0; padding: 0 20px; text-align: center; font: 600 15px var(--font-brand); color: var(--accent); }
.dr-depot-refus .dr-depot-voile p { color: var(--danger); }
.dr-depot-voile svg { width: 42px; height: 42px; }
.dr-glisse {
  position: fixed; top: -200px; left: 0; padding: 7px 12px; border-radius: 8px;
  background: var(--accent); color: #04121a; font: 700 12px var(--font);
}

/* ---------- Envois ---------- */
.dr-envois {
  position: absolute; z-index: 20; right: 12px; bottom: 12px; width: min(380px, calc(100% - 24px)); max-height: 46%;
  display: flex; flex-direction: column; background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--border-lit); border-radius: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); overflow: hidden;
}
.dr-envois[hidden] { display: none; }
.dr-envois-tete { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 14px; }
.dr-envois-titre { flex: 1; min-width: 0; font: 600 12.5px var(--font-brand); }
.dr-envois-tete .dr-bt { border-color: transparent; background: none; }
.dr-envois-global { height: 3px; background: rgba(255, 255, 255, .06); }
.dr-envois-global i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .25s; }
.dr-envois-fini .dr-envois-global i { background: var(--success); }
.dr-envois-liste { list-style: none; margin: 0; padding: 4px 0; overflow-y: auto; }
.dr-envoi { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px; align-items: center; column-gap: 8px; padding: 6px 6px 6px 14px; }
.dr-envoi-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.dr-envoi-etat { font: 600 11px var(--font-num); color: var(--muted); white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.dr-envoi-erreur .dr-envoi-etat { color: var(--danger); white-space: normal; font-family: var(--font); font-weight: 500; grid-column: 1 / 3; grid-row: 2; max-width: none; }
.dr-envoi-fini .dr-envoi-etat { color: var(--success); }
.dr-envoi-x { width: 36px; height: 36px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.dr-envoi-x:hover { color: var(--danger); }
.dr-envoi-x[hidden] { visibility: hidden; display: block; }
.dr-envoi-barre { grid-column: 1 / -1; height: 3px; margin-top: 5px; border-radius: 2px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.dr-envoi-barre i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.dr-envoi-fini .dr-envoi-barre i { background: var(--success); }
.dr-envoi-erreur .dr-envoi-barre, .dr-envoi-annule .dr-envoi-barre { display: none; }
.dr-envoi-annule .dr-envoi-nom { text-decoration: line-through; color: var(--dim); }

/* ---------- Menu contextuel ---------- */
.dr-menu {
  position: fixed; z-index: 140; min-width: 230px; max-width: calc(100vw - 16px); padding: 6px;
  background: linear-gradient(180deg, #172238, var(--card)); border: 1px solid var(--border-lit); border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7), 0 0 0 1px rgba(53, 208, 242, .1);
}
.dr-menu[hidden] { display: none; }
.dr-menu-it {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 36px; padding: 0 12px;
  border: 0; border-radius: 6px; background: none; color: var(--fg); font: 500 13px var(--font); text-align: left; cursor: pointer;
}
.dr-menu-it:hover:not([disabled]), .dr-menu-it:focus { background: var(--accent-soft); color: var(--accent); outline: none; }
.dr-menu-it[disabled] { opacity: .38; cursor: not-allowed; }
.dr-menu-danger { color: var(--danger); }
.dr-menu-danger:hover:not([disabled]), .dr-menu-danger:focus { background: rgba(251, 95, 122, .12); color: var(--danger); }
.dr-menu-it kbd { flex: none; }
/* Au téléphone : une feuille en bas de l'écran, au doigt. */
.dr-menu.dr-menu-feuille { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); top: auto; min-width: 0; padding: 8px; }
.dr-menu-feuille .dr-menu-it { min-height: 48px; font-size: 14.5px; }
.dr-menu-feuille kbd { display: none; }

/* ---------- Message ---------- */
.dr-toast {
  position: absolute; z-index: 25; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px);
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 10px;
  background: #0c1626f2; border: 1px solid var(--border-lit); box-shadow: 0 14px 40px rgba(0, 0, 0, .6); font-size: 13px;
}
.dr-toast[hidden] { display: none; }
.dr-toast-alerte { border-color: rgba(251, 95, 122, .55); }
.dr-toast-action { min-height: 36px; padding: 0 12px; border-radius: 6px; border: 1px solid rgba(53, 208, 242, .45); background: var(--accent-soft); color: var(--accent); font: 600 12.5px var(--font); cursor: pointer; }
.dr-toast-x { width: 36px; height: 36px; border: 0; background: none; color: var(--muted); cursor: pointer; flex: none; }

/* ---------- Boîte (nouveau dossier, renommer, déplacer, confirmer) ---------- */
.dr-dlg {
  width: min(480px, calc(100vw - 24px)); max-height: calc(100vh - 48px); padding: 0; color: var(--fg);
  background: linear-gradient(180deg, var(--card-2), var(--card)); border: 1px solid var(--border-lit); border-radius: 14px;
  box-shadow: 0 40px 110px rgba(0, 0, 0, .78), 0 0 0 1px rgba(53, 208, 242, .14);
}
.dr-dlg::backdrop { background: rgba(3, 6, 12, .6); }
.dr-dlg-form { display: flex; flex-direction: column; gap: 12px; padding: 18px; max-height: calc(100vh - 48px); }
.dr-dlg-titre { margin: 0; font: 600 15px var(--font-brand); overflow-wrap: anywhere; }
.dr-dlg-corps { min-height: 0; overflow-y: auto; }
.dr-dlg-texte { margin: 0; color: var(--muted); line-height: 1.5; }
.dr-app .dr-dlg-champ {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: 8px; background: var(--bg-2);
  border: 1px solid var(--border-lit); color: var(--fg); font: 400 16px var(--font);
}
.dr-app .dr-dlg-champ:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(53, 208, 242, .15); }
.dr-dlg-erreur { margin: 0; color: var(--danger); font-size: 12.5px; }
.dr-dlg-erreur:empty { display: none; }
.dr-dlg-pied { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.dr-dlg-pied .btn { min-height: 44px; }
.dr-choix { list-style: none; margin: 0; padding: 0; max-height: 52vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.dr-choix-it {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 10px 0 calc(10px + var(--niveau, 0) * 16px);
  border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--fg); font: 500 13px var(--font); text-align: left; cursor: pointer;
}
.dr-choix li:last-child .dr-choix-it { border-bottom: 0; }
.dr-choix-it:hover:not([disabled]) { background: rgba(255, 255, 255, .04); }
.dr-choix-it[disabled] { opacity: .45; cursor: not-allowed; }
.dr-choix-on, .dr-choix-on:hover { background: var(--accent-soft) !important; color: var(--accent); }
.dr-choix-it span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dr-sans-js { padding: 30px; text-align: center; color: var(--muted); }

/* ---------- Tablette et ordinateur ---------- */
@media (min-width: 600px) {
  .dr-outils .dr-bt-accent .dr-lib, .dr-outils .dr-bt-plein .dr-lib { display: inline; }
  .dr-selbar-actions .dr-lib { display: inline; }
  .dr-grille { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (min-width: 900px) {
  .dr-barre { grid-template-columns: minmax(0, 1fr) minmax(200px, 300px) auto; grid-template-areas: "fil cherche outils"; padding: 10px 14px; }
  .dr-bt-arbre { display: none; }
  .dr-outils { flex-wrap: nowrap; }
  .dr-app .dr-bt, .dr-app .dr-tri, .dr-app .dr-cherche-champ { min-height: 34px; }
  .dr-app .dr-cherche-champ { font-size: 13.5px; }
  .dr-bt { min-width: 34px; padding: 0 10px; }
  .dr-bt-vue { padding: 0; }
  .dr-arbre { position: static; transform: none; visibility: visible; width: 240px; flex: none; box-shadow: none; transition: none; border-right: 1px solid var(--border); background: rgba(255, 255, 255, .012); }
  .dr-voile-arbre { display: none !important; }
  .dr-noeud, .dr-noeud-nom { min-height: 32px; }
  .dr-noeud-bascule { height: 30px; }
  .dr-arbre-corbeille { min-height: 36px; }
  .dr-zone { padding: 14px 16px 90px; }
  .dr-selbar { top: -14px; margin: -14px -16px 12px; padding: 8px 16px; }
  .dr-selbar .dr-bt { min-height: 32px; }
  .dr-case { width: 34px; height: 34px; }
  .dr-plus { width: 34px; height: 34px; }
  .dr-grille { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .dr-menu-it { min-height: 34px; }

  .dr-en-liste .dr-entete-liste {
    display: grid; grid-template-columns: 34px 28px minmax(0, 1fr) 110px 120px 150px 34px; column-gap: 10px; align-items: center;
    position: sticky; top: -14px; z-index: 5; margin: 0 -16px 4px; padding: 6px 20px; background: var(--card);
    border-bottom: 1px solid var(--border); font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  }
  .dr-app:has(.dr-selbar:not([hidden])) .dr-entete-liste { top: 34px; }
  .dr-entete-liste button { justify-self: start; padding: 4px 0; border: 0; background: none; color: var(--dim); font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
  .dr-entete-liste button:hover, .dr-entete-liste .dr-tri-actif { color: var(--accent); }
  .dr-entete-liste button[data-sens]:not([data-sens=""])::after { content: ' ' attr(data-sens); }
  .dr-vue-liste .dr-it { grid-template-columns: 34px 28px minmax(0, 1fr) 110px 120px 150px 34px; grid-template-rows: auto; column-gap: 10px; min-height: 40px; padding: 2px 4px; }
  .dr-vue-liste .dr-case, .dr-vue-liste .dr-ico, .dr-vue-liste .dr-nom, .dr-vue-liste .dr-plus { grid-row: 1; }
  .dr-vue-liste .dr-ico { width: 28px; height: 28px; }
  .dr-vue-liste .dr-ico svg { width: 22px; }
  .dr-vue-liste .dr-sous { display: none; }
  .dr-vue-liste .dr-col { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
  .dr-vue-liste .dr-taille { grid-column: 4; font-family: var(--font-num); font-size: 11.5px; }
  .dr-vue-liste .dr-date { grid-column: 5; }
  .dr-vue-liste .dr-auteur { grid-column: 6; }
  .dr-vue-liste .dr-plus { grid-column: 7; }
  /* Recherche et corbeille : l'emplacement remplace l'auteur. */
  [data-vue="recherche"] .dr-vue-liste .dr-sous, [data-vue="corbeille"] .dr-vue-liste .dr-sous { display: block; grid-column: 6; grid-row: 1; }
  [data-vue="recherche"] .dr-vue-liste .dr-auteur, [data-vue="corbeille"] .dr-vue-liste .dr-auteur { display: none; }

  .dr-app:has(.dr-envois:not([hidden])) .dr-toast { left: 16px; transform: none; }
}
@media (max-width: 599px) {
  .dr-app:has(.dr-envois:not([hidden])) .dr-toast { bottom: auto; top: 8px; }
  .dr-dlg-pied .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .dr-arbre, .dr-noeud-bascule, .dr-envois-global i, .dr-envoi-barre i { transition: none; }
}

/* TABLETTE AU DOIGT (iPad, 31/10/2026) : au-dessus de 900 px le Drive passe en tailles de souris ;
   au doigt, on garde des cibles de 40-44 px (la disposition, elle, reste celle de l'ordinateur). */
@media (pointer: coarse) {
  .top-drive { width: 40px; height: 38px; }
}
@media (min-width: 900px) and (pointer: coarse) {
  .dr-app .dr-bt, .dr-app .dr-tri, .dr-app .dr-cherche-champ { min-height: 44px; }
  .dr-noeud, .dr-noeud-nom { min-height: 44px; }
  .dr-noeud-bascule { height: 40px; }
  .dr-arbre-corbeille { min-height: 44px; }
  .dr-selbar .dr-bt { min-height: 40px; }
  .dr-menu-it { min-height: 44px; }
}
