/* Zeshel Drive — même charte que Zeshel Mail et Zeshel Calendar (barre du haut, recherche, sidebar, menus, popups). */
:root{font-family:"Sansation",-apple-system,"Segoe UI",ui-sans-serif,system-ui,BlinkMacSystemFont,sans-serif;color:#18212f;background:#f5f7fb;color-scheme:light;font-synthesis:none;text-rendering:optimizeLegibility;--brand:#473FC5;--brand-soft:#e9e7ff;--line:#d6dce5;--line-2:#cdd4df;--muted:#64748b;--pop-border:rgba(17,24,39,.3)}
:root.dark{color:#e5e7eb;background:#0f1115;color-scheme:dark;--brand:#a5a0f5;--brand-soft:#29234a;--line:#292e38;--line-2:#303642;--muted:#94a3b8;--pop-border:rgba(255,255,255,.3)}
*{box-sizing:border-box}
body{margin:0;min-width:320px;background:#f5f7fb}.dark body{background:#0f1115}
button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}
button:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid rgba(99,102,241,.4);outline-offset:2px}
svg{flex:0 0 auto}

/* ---------- Écran de chargement (même animation que Mail / Calendar) ---------- */
.boot-splash{position:fixed;inset:0;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:#F4F5F8;transition:opacity .25s ease}
.dark .boot-splash{background:#0e1116}
.boot-splash.out{opacity:0;pointer-events:none}
.boot-splash-mark{width:104px;height:104px;display:grid;place-items:center}
.boot-splash-mark.boot-anim{width:auto;height:auto;overflow:visible}
.boot-anim svg{display:block;overflow:visible;filter:saturate(.78) brightness(1.04);opacity:.95}
.dark .boot-anim svg{filter:saturate(.7) brightness(.96);opacity:.92}
.boot-anim svg *{transform-box:fill-box}
.boot-splash-name{font-size:15px;font-weight:800;color:#2B2790;letter-spacing:.2px}
.dark .boot-splash-name{color:#f3f4f6}
.boot-splash-text{font-size:11.5px;color:#667085}.dark .boot-splash-text{color:#9ca3af}
.boot-splash-bar{width:300px;max-width:70vw;height:7px;border-radius:4px;background:#D9DDE6;overflow:hidden}
.dark .boot-splash-bar{background:#252a33}
.boot-splash-bar span{display:block;width:40%;height:100%;border-radius:4px;background:linear-gradient(90deg,#473FC5,#27B86B);animation:boot-slide 1.2s ease-in-out infinite}
.bd-doc{transform-origin:50% 50%;animation:bd-doc 1.7s cubic-bezier(.4,0,.2,1) infinite}
.bd-front{transform-origin:50% 100%;animation:bd-front 1.7s ease-in-out infinite}
.bd-lip{animation:bd-front 1.7s ease-in-out infinite}
@keyframes boot-slide{0%{transform:translateX(-100%)}100%{transform:translateX(450%)}}
@keyframes bd-doc{0%,6%{transform:translate(70px,-250px) rotate(-24deg);opacity:0}16%{opacity:1}52%{transform:translate(0,-6px) rotate(-6deg);opacity:1}68%{transform:translate(0,64px) rotate(-5deg);opacity:1}78%,100%{transform:translate(0,64px) rotate(-5deg);opacity:0}}
@keyframes bd-front{0%,60%{transform:translateY(0)}68%{transform:translateY(-5px)}76%,100%{transform:translateY(0)}}
@media (prefers-reduced-motion:reduce){.bd-doc,.bd-front,.bd-lip{animation:none}.bd-doc{opacity:0}}

/* ---------- Barre du haut ---------- */
.app{height:100vh;overflow:hidden;background:#fff}.dark .app{background:#11141a}
.topbar{height:54px;display:flex;align-items:center;gap:12px;padding:0 12px;border-bottom:1px solid var(--line);background:#fff}.dark .topbar{background:#15181e}
.top-left{display:flex;align-items:center;gap:10px;min-width:210px}
.top-logo{width:28px;height:28px;display:block;margin-right:-2px;user-select:none;-webkit-user-drag:none}
.top-brand{font-size:16px;font-weight:900;letter-spacing:-.2px;color:#111827;white-space:nowrap;user-select:none}.dark .top-brand{color:#f3f4f6}
.icon-btn{border:0;border-radius:7px;background:transparent;color:#475569;display:grid;place-items:center;width:34px;height:34px}.dark .icon-btn{color:#cbd5e1}
.icon-btn:hover,.icon-btn.on{background:#eef2f7}.dark .icon-btn:hover,.dark .icon-btn.on{background:#252a33}
.icon-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:square;stroke-linejoin:miter}
.menu-btn svg{width:18px;height:18px}
.top-actions{min-width:210px;display:flex;justify-content:flex-end;align-items:center;gap:7px}

.search{position:relative;flex:1;max-width:580px;margin:0 auto;display:flex;align-items:center;gap:7px;padding:0 10px;height:34px;border-radius:8px;background:#f1f4f8;color:var(--muted)}.dark .search{background:#20242c;color:#94a3b8}
.search svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:square}
.search input{height:auto;border:0;background:transparent;padding:0;box-shadow:none;font-size:14px;width:100%;outline:none;color:inherit}.search input::placeholder{color:#94a3b8}
.dark .search input{color:#f3f4f6}
.search:focus-within{background:#e9eef6;box-shadow:0 0 0 2px rgba(71,63,197,.14)}.dark .search:focus-within{background:#252a34;box-shadow:0 0 0 2px rgba(129,140,248,.18)}
.search kbd{font:inherit;font-size:8px;padding:3px 5px;border:1px solid #d7dde5;border-radius:4px;color:#94a3b8;background:#fff}.dark .search kbd{background:#171a20;border-color:#343a45}
.search-clear{border:0;background:transparent;color:#94a3b8;width:22px;height:22px;font-size:17px;line-height:1;border-radius:6px}.search-clear:hover{background:rgba(100,116,139,.15)}
.search-dropdown{position:absolute;top:calc(100% + 8px);left:0;right:0;max-height:430px;overflow-y:auto;background:#fff;border:1px solid #e3e7ed;border-radius:12px;box-shadow:0 14px 34px rgba(15,23,42,.14);padding:6px;z-index:60;text-align:left}
.dark .search-dropdown{background:#1a1e26;border-color:#303642;box-shadow:0 14px 34px rgba(0,0,0,.45)}
.search-group{padding:4px 0}.search-group+.search-group{border-top:1px solid #eef1f5;margin-top:2px;padding-top:6px}.dark .search-group+.search-group{border-color:#2a303a}
.search-group-label{display:block;font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#9aa4b2;padding:5px 10px 3px}
.search-result{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:7px 10px;border:0;background:transparent;border-radius:8px;color:#1f2937}.dark .search-result{color:#e5e7eb}
.search-result:hover,.search-result.hot{background:#f1f4f8}.dark .search-result:hover,.dark .search-result.hot{background:#252a33}
.search-result .file-icon{width:28px;height:28px;flex:0 0 28px;border-radius:7px}.search-result .file-icon svg{width:17px;height:17px}.search-result .file-glyph{font-size:7px}
.search-result-text{display:flex;flex-direction:column;min-width:0;overflow:hidden}
.search-result-text strong{font-size:14.5px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-result-text small{font-size:13px;color:#8a93a3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.search-all{display:block;width:100%;margin-top:4px;padding:9px 10px;border:0;border-top:1px solid #eef1f5;background:transparent;color:var(--brand);font-size:14px;font-weight:800;text-align:left;border-radius:0 0 8px 8px}.dark .search-all{border-color:#2a303a}.search-all:hover{background:#f1f4f8}.dark .search-all:hover{background:#252a33}
.search-empty{padding:16px 10px;font-size:14.5px;color:#8a93a3;text-align:center}

/* Menus de la barre : applications et profil */
.help-pop-enter-active,.help-pop-leave-active{transition:opacity .16s ease,transform .16s ease}
.help-pop-enter-from,.help-pop-leave-to{opacity:0;transform:translateY(-6px) scale(.97)}
.apps-wrap,.profile-wrap{position:relative;display:inline-flex}
.apps-wrap .icon-btn.on{background:#EEEDFB;color:#473FC5}.dark .apps-wrap .icon-btn.on{background:#29234a;color:#c4b5fd}
.apps-wrap .icon-btn svg{fill:currentColor;stroke:none}
.apps-menu{position:absolute;right:0;top:calc(100% + 7px);width:264px;padding:10px;background:#fff;border:1px solid var(--line-2);border-radius:13px;box-shadow:0 18px 55px rgba(15,23,42,.18);z-index:150;transform-origin:top right}
.dark .apps-menu{background:#1a1e26;border-color:#303642;box-shadow:0 18px 55px rgba(0,0,0,.45)}
.apps-title{padding:0 4px 8px;font-size:12px;font-weight:900;letter-spacing:.06em;text-transform:uppercase;color:#98A2B3}
.apps-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;max-height:340px;overflow-y:auto;scrollbar-width:none}.apps-grid::-webkit-scrollbar{display:none}
.app-tile{display:flex;flex-direction:column;align-items:center;gap:5px;padding:9px 4px 7px;border-radius:10px;text-decoration:none;color:#344054;border:1px solid transparent;transition:background-color .15s,border-color .15s}
.dark .app-tile{color:#dbe3ef}
.app-tile:hover{background:#F5F4FF;border-color:#dcd9f8}.dark .app-tile:hover{background:#252a33;border-color:#343a4a}
.app-tile.current{background:#EEEDFB;border-color:#cfcaf5}.dark .app-tile.current{background:#29234a;border-color:#3d3570}
.app-icon{width:34px;height:34px;display:grid;place-items:center}.app-icon img{width:34px;height:34px;object-fit:contain}
.app-icon.generic{background:#E7E9F0;color:#667085;border-radius:8px;width:32px;height:32px}.dark .app-icon.generic{background:#2a303a;color:#9aa4b2}
.app-generic svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:square;stroke-linejoin:miter}
.app-name{font-size:12.5px;font-weight:800;text-align:center;line-height:1.25;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.apps-loading{padding:22px 14px}.apps-loading .boot-splash-bar{width:100%;max-width:none;height:5px}
.apps-error,.apps-empty{padding:14px 6px;font-size:14px;font-weight:700;color:#667085;text-align:center;display:flex;flex-direction:column;gap:10px;align-items:center}
.apps-error button{height:30px;padding:0 14px;border:1px solid #dfe4ec;border-radius:8px;background:#fff;font-weight:800;font-size:13px;color:#344054}.dark .apps-error button{background:#252a33;border-color:#343a45;color:#dbe3ef}

.avatar-btn{width:33px;height:33px;border:0;border-radius:50%;display:grid;place-items:center;background:#111827;color:#fff;font-size:11px;font-weight:900}.dark .avatar-btn{background:#e5e7eb;color:#111827}
.profile-menu{position:absolute;right:0;top:41px;width:280px;padding:10px;background:#fff;border:1px solid var(--line-2);border-radius:13px;box-shadow:0 18px 55px rgba(15,23,42,.18);z-index:150}
.dark .profile-menu{background:#1a1e26;border-color:#303642;box-shadow:0 18px 55px rgba(0,0,0,.45)}
.profile-head{display:flex;gap:10px;padding:8px}
.profile-avatar{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:50%;background:#111827;color:#fff;font-size:14px;font-weight:900}.dark .profile-avatar{background:#e5e7eb;color:#111827}
.profile-head>div:last-child{min-width:0;display:flex;flex-direction:column;gap:2px;text-align:left;justify-content:center}
.profile-head strong{font-size:14px;font-weight:900;overflow:hidden;text-overflow:ellipsis;display:block;white-space:nowrap}
.profile-head span{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;display:block;white-space:nowrap}
.profile-head .profile-orgname{color:#475569;font-weight:700}.dark .profile-head .profile-orgname{color:#cbd5e1}
.profile-menu button{width:100%;height:34px;border:0;border-radius:7px;background:transparent;display:flex;align-items:center;gap:9px;padding:0 9px;color:#475569;font-size:13px;font-weight:800;text-align:left}
.dark .profile-menu button{color:#cbd5e1}.profile-menu button:hover{background:#f1f5f9}.dark .profile-menu button:hover{background:#252a33}
.profile-menu button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:square;stroke-linejoin:miter}
.profile-separator{height:1px;background:#edf0f3;margin:7px 0}.dark .profile-separator{background:#303642}
.logout-item{color:#dc2626!important}.dark .logout-item{color:#f87171!important}

/* ---------- Sidebar ---------- */
.workspace{height:calc(100vh - 54px);display:flex}
.sidebar{width:218px;flex:0 0 218px;transition:width .18s ease,flex-basis .18s ease;overflow:hidden;border-right:1px solid var(--line);background:#fafbfc;padding:12px 9px;display:flex;flex-direction:column}.dark .sidebar{background:#15181e}
.new{min-height:37px;border:0;border-radius:8px;display:flex;align-items:center;justify-content:center;gap:8px;background:#111827;color:#fff;font-weight:900;margin-bottom:8px;font-size:13px;padding:0 10px;width:100%;white-space:nowrap}.dark .new{background:#f1f5f9;color:#111827}
.new svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:square;stroke-linejoin:miter}
.new.secondary{background:transparent;color:#334155;border:1px solid #dce2e9;margin-bottom:12px}.dark .new.secondary{color:#dbe3ef;border-color:#303642;background:transparent}
.new.secondary:hover{background:#eef2f7}.dark .new.secondary:hover{background:#20252d}
.nav{display:grid;gap:2px}
.nav button{height:34px;border:0;background:transparent;border-radius:7px;display:flex;align-items:center;gap:10px;padding:0 10px;color:#475569;text-align:left;font-size:13px;font-weight:800;width:100%;overflow:hidden}
.dark .nav button{color:#aeb7c5}.nav button:hover{background:#eef2f7}.dark .nav button:hover{background:#20252d}
.nav button.active{background:var(--brand-soft);color:#4f46e5;font-weight:900}.dark .nav button.active{color:#c4b5fd}
.nav button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:square;stroke-linejoin:miter}
.nav button .nav-label{white-space:nowrap;line-height:1}
.nav .nav-count{margin-left:auto;font-size:11px;font-weight:900;padding:2px 6px;border-radius:999px;background:#e5e7eb;color:#475569}.dark .nav .nav-count{background:#2a303a;color:#cbd5e1}
.sidebar-footer{margin-top:auto;padding-top:10px;border-top:1px solid var(--line)}
.storage{padding:5px 6px 10px}.storage-head{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#475569;font-weight:800}.dark .storage-head{color:#cbd5e1}
.storage-track{height:5px;margin-top:6px;border-radius:10px;background:#e5e7eb;overflow:hidden}.dark .storage-track{background:#2a303a}
.storage-track span{display:block;height:100%;border-radius:10px;background:#6366f1}.storage-track span.warn{background:#d97706}.storage-track span.full{background:#dc2626}
.storage-meta{margin-top:5px;color:#94a3b8;font-size:11px}
.sidebar.collapsed{width:64px;flex-basis:64px}
.sidebar.collapsed .new{padding:0;width:46px}
.sidebar.collapsed .new .nav-label,.sidebar.collapsed .nav .nav-label,.sidebar.collapsed .nav .nav-count,.sidebar.collapsed .storage-meta,.sidebar.collapsed .storage-head span:first-child{display:none}
.sidebar.collapsed .nav button{justify-content:center;padding:0;width:46px}
.sidebar.collapsed .storage-head{justify-content:center}

/* ---------- Zone principale ---------- */
.content{flex:1;min-width:0;overflow:hidden;background:#fff;display:flex;flex-direction:column;position:relative}.dark .content{background:#11141a}
.toolbar{min-height:60px;padding:10px 18px;border-bottom:1px solid #dce2ea;display:flex;align-items:center;justify-content:space-between;gap:10px}.dark .toolbar{border-color:var(--line)}
.breadcrumb{display:flex;align-items:center;gap:3px;font-size:14.5px;font-weight:800;color:#475569;flex-wrap:wrap;min-width:0}.dark .breadcrumb{color:#cbd5e1}
.breadcrumb button{border:0;background:transparent;color:inherit;font:inherit;font-weight:800;padding:3px 6px;border-radius:6px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.breadcrumb button:hover{background:#eef2f7;color:#111827}.dark .breadcrumb button:hover{background:#252a33;color:#f3f4f6}
.breadcrumb .sep{color:#cbd5e1}.breadcrumb .current{color:#111827;font-weight:900;padding:3px 6px}.dark .breadcrumb .current{color:#f3f4f6}
.toolbar-right{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.btn{height:32px;padding:0 12px;border:1px solid #dce2e9;background:#fff;border-radius:7px;color:#334155;font-size:13px;font-weight:800;display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.dark .btn{background:#1a1e26;border-color:#303642;color:#dbe3ef}.btn:hover{background:#f6f8fb}.dark .btn:hover{background:#20252d}
.btn.primary{background:#111827;border-color:#111827;color:#fff}.dark .btn.primary{background:#f1f5f9;border-color:#f1f5f9;color:#111827}.btn.primary:hover{background:#1f2937}.dark .btn.primary:hover{background:#fff}
.btn.danger{color:#dc2626}.dark .btn.danger{color:#f87171}
.btn.danger.solid{background:#dc2626;border-color:#dc2626;color:#fff}.btn.danger.solid:hover{background:#b91c1c}
.btn svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter}
.sort{height:32px;border:1px solid #dce2e9;border-radius:7px;background:#fff;color:#334155;font-size:13px;font-weight:800;padding:0 8px;outline:none}.dark .sort{background:#1a1e26;border-color:#303642;color:#dbe3ef}
.view-toggle{display:flex;gap:2px;background:#f1f4f8;border-radius:8px;padding:2px}.dark .view-toggle{background:#20242c}
.view-toggle button{border:0;background:transparent;width:28px;height:28px;border-radius:6px;display:grid;place-items:center;color:#64748b}
.view-toggle button.active{background:#fff;color:#111827;box-shadow:0 1px 3px rgba(15,23,42,.12)}.dark .view-toggle button.active{background:#2b313b;color:#f3f4f6}
.view-toggle svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter}
.notice-bar{display:flex;align-items:center;gap:10px;padding:9px 18px;font-size:14px;font-weight:700;background:#f5f4ff;color:#3d3799;border-bottom:1px solid #e3e0fb}.dark .notice-bar{background:#211e3d;color:#c4b5fd;border-color:#2f2a5c}
.notice-bar .grow{flex:1}.notice-bar button{border:0;background:transparent;color:inherit;font-weight:900;font-size:14px;text-decoration:underline}

.drop-zone{flex:1;overflow:auto;padding:18px;position:relative}
.drop-zone.dragging::after{content:"Déposer pour envoyer dans ce dossier";position:absolute;inset:10px;border:2px dashed #6366f1;border-radius:14px;background:rgba(99,102,241,.06);display:grid;place-items:center;font-size:14.5px;font-weight:900;color:#4f46e5;pointer-events:none}
.section-label{font-size:13px;font-weight:900;color:#98A2B3;margin:2px 2px 9px}
.section-label+.file-grid,.section-label+.file-list{margin-bottom:20px}

.file-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
.file-card{border:1px solid var(--line);border-radius:12px;padding:14px 10px 12px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;background:#fff;position:relative;cursor:pointer;min-width:0;transition:border-color .12s,box-shadow .12s}
.dark .file-card{background:#171a21;border-color:#282d37}
.file-card:hover,.file-card.menu-open{border-color:#c7d2fe;box-shadow:0 6px 18px rgba(79,70,229,.08)}.dark .file-card:hover{border-color:#4338ca}
.file-icon{width:46px;height:46px;display:grid;place-items:center;border-radius:11px;background:#f1f5f9;color:#4f46e5;overflow:hidden}.dark .file-icon{background:#252a33;color:#a5b4fc}
.file-icon svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter}
.file-icon.folder{background:#ede9fe;color:#6d28d9}.dark .file-icon.folder{background:#29234a;color:#c4b5fd}
.file-glyph{display:grid;place-items:center;width:100%;height:100%;font-size:10px;line-height:1;font-weight:900;letter-spacing:-.3px;font-family:Arial,sans-serif}
.file-glyph.pdf{color:#b91c1c}.file-glyph.word{color:#2563eb}.file-glyph.excel{color:#15803d}.file-glyph.power{color:#c2410c}.file-glyph.markdown,.file-glyph.text{color:#64748b;font-size:8px}
.dark .file-glyph.pdf{color:#fca5a5}.dark .file-glyph.word{color:#93c5fd}.dark .file-glyph.excel{color:#86efac}.dark .file-glyph.power{color:#fdba74}.dark .file-glyph.markdown,.dark .file-glyph.text{color:#cbd5e1}
.file-name{font-size:13.5px;font-weight:800;color:#111827;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.dark .file-name{color:#f3f4f6}
.file-meta{font-size:12px;color:#94a3b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.file-menu-btn{position:absolute;top:6px;right:6px;width:26px;height:26px;border:0;border-radius:6px;background:transparent;color:#94a3b8;display:grid;place-items:center;opacity:0;transition:opacity .1s}
.file-card:hover .file-menu-btn,.file-card.menu-open .file-menu-btn,.file-menu-btn:focus-visible{opacity:1}
.file-menu-btn:hover{background:#eef2f7;color:#334155}.dark .file-menu-btn:hover{background:#252a33;color:#e2e8f0}
.file-menu-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:square}
.labels{display:flex;gap:4px;flex-wrap:wrap;justify-content:center;min-height:0}
.label-chip{display:inline-flex;align-items:center;font-size:11px;line-height:16px;padding:0 7px;border:1px solid;border-radius:999px;background:transparent;font-weight:800;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.file-list{display:flex;flex-direction:column;border:1px solid #dce2ea;border-radius:10px;overflow:hidden}.dark .file-list{border-color:var(--line)}
.file-row{display:flex;align-items:center;gap:12px;padding:8px 12px;border-bottom:1px solid #dce2ea;background:#fff;cursor:pointer;min-height:50px}
.dark .file-row{background:#11141a;border-color:#252a33}.file-row:last-child{border-bottom:0}
.file-row:hover,.file-row.menu-open{background:#fafbff}.dark .file-row:hover,.dark .file-row.menu-open{background:#181c23}
.file-row .file-icon{width:32px;height:32px;border-radius:8px;flex:0 0 32px}.file-row .file-icon svg{width:19px;height:19px}.file-row .file-glyph{font-size:8px}
.file-row .main{flex:1;min-width:0;display:flex;align-items:center;gap:10px}
.file-row .file-name{width:auto;text-align:left;flex:0 1 auto;max-width:100%}
.file-row .labels{justify-content:flex-start;flex-wrap:nowrap;overflow:hidden}
.file-row .col{flex:0 0 auto;font-size:13px;color:#94a3b8;text-align:right;white-space:nowrap}
.file-row .col.size{width:76px}.file-row .col.date{width:84px}.file-row .col.owner{width:150px;overflow:hidden;text-overflow:ellipsis}
.file-row .file-menu-btn{position:static;opacity:1;flex:0 0 28px;width:28px;height:28px}
.row-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}

.empty{height:100%;min-height:260px;display:grid;place-content:center;justify-items:center;color:#94a3b8;text-align:center;padding:25px}
.empty h3{color:#334155;margin:11px 0 4px;font-size:16px;font-weight:900}.dark .empty h3{color:#e2e8f0}
.empty p{margin:0;font-size:14px;max-width:380px;line-height:1.5}
.empty-icon{width:60px;height:60px;display:grid;place-items:center;border-radius:16px;background:#f1f5f9;color:#64748b}.dark .empty-icon{background:#20252d}
.empty-icon svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:square;stroke-linejoin:miter}
.empty .btn{margin-top:14px}
.loading-pane{display:grid;place-items:center;min-height:240px;color:#94a3b8;font-size:14px;font-weight:700}

/* Menu d'un élément (positionné à l'écran, jamais coupé par la liste) */
.item-menu{position:fixed;width:214px;padding:6px;background:#fff;border:1px solid var(--line-2);border-radius:11px;box-shadow:0 15px 45px rgba(15,23,42,.18);z-index:120;max-height:calc(100vh - 20px);overflow:auto}
.dark .item-menu{background:#1a1e26;border-color:#303642;box-shadow:0 15px 45px rgba(0,0,0,.45)}
.item-menu button{width:100%;height:32px;border:0;background:transparent;border-radius:6px;display:flex;align-items:center;gap:9px;color:#475569;font-size:13px;font-weight:800;text-align:left;padding:0 9px}
.dark .item-menu button{color:#cbd5e1}.item-menu button:hover{background:#f1f5f9}.dark .item-menu button:hover{background:#252a33}
.item-menu button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:square;stroke-linejoin:miter}
.item-menu button.danger{color:#dc2626}.dark .item-menu button.danger{color:#f87171}
.item-menu .sep{height:1px;background:#edf0f3;margin:5px 2px}.dark .item-menu .sep{background:#303642}
.item-menu .menu-label{font-size:12px;font-weight:900;color:#98A2B3;padding:5px 9px 3px}
.item-menu .label-opt .dot{width:9px;height:9px;border-radius:50%;flex:0 0 9px}
.item-menu .label-opt .tick{margin-left:auto;font-size:14px;color:var(--brand)}

/* ---------- Popups (même gabarit que Calendar) ---------- */
.modal-back{position:fixed;inset:0;background:rgba(15,23,42,.36);display:grid;place-items:center;z-index:100;padding:14px}
.modal{width:min(480px,100%);max-height:calc(100vh - 28px);overflow:auto;background:#fff;color:#18212f;border:1px solid var(--pop-border);border-radius:13px;padding:18px;box-shadow:0 25px 70px rgba(0,0,0,.25)}
.dark .modal{background:#1a1e26;color:#e5e7eb}
.modal h2{font-size:16px;margin:0 0 14px}
.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.modal-head h2{margin:0;font-size:16px;overflow:hidden;text-overflow:ellipsis}
.help-subtitle{display:block;margin-top:3px;font-size:13px;color:var(--muted);font-weight:600}
.close-btn{border:0;background:transparent;width:30px;height:30px;border-radius:7px;font-size:23px;line-height:1;color:#64748b;flex:0 0 30px}.close-btn:hover{background:#eef2f7;color:#111827}.dark .close-btn:hover{background:#252a33;color:#f3f4f6}
.form{display:grid;gap:10px}
.form label,.field-label{display:block;font-size:12px;font-weight:900;color:#64748b;margin-bottom:5px}.dark .form label{color:#94a3b8}
.form input,.form select{width:100%;height:38px;border:1px solid #dce2e9;border-radius:7px;padding:0 10px;font-size:14px;background:#fff;color:#18212f;outline:none}
.dark .form input,.dark .form select{background:#11141a;border-color:#303642;color:#e5e7eb}
.form input:focus,.form select:focus{border-color:#8b5cf6;box-shadow:0 0 0 2px rgba(139,92,246,.12)}
.modal-text{margin:0;color:#475569;font-size:14.5px;line-height:1.6}.dark .modal-text{color:#cbd5e1}
.modal-hint{margin:8px 0 0;color:#94a3b8;font-size:12.5px}
.modal-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:16px}
.confirm-modal{width:min(430px,100%);display:grid;grid-template-columns:auto 1fr;gap:4px 14px}
.confirm-icon{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#ede9fe;color:#6d28d9;font-weight:900;font-size:17px;grid-row:1}
.confirm-icon.danger{background:#fee2e2;color:#dc2626}.dark .confirm-icon{background:#29234a;color:#c4b5fd}.dark .confirm-icon.danger{background:#3b1d22;color:#f87171}
.confirm-content h2{margin:2px 0 6px}.confirm-content p{margin:0;font-size:14.5px;line-height:1.55;color:#475569}.dark .confirm-content p{color:#cbd5e1}
.confirm-modal .modal-actions{grid-column:1/-1}
.confirm-layer{z-index:140}
.file-chips{display:flex;flex-direction:column;gap:6px;max-height:190px;overflow:auto;margin-top:10px}
.file-chip{display:flex;align-items:center;gap:8px;font-size:13.5px;padding:7px 10px;border:1px solid var(--line);border-radius:8px}.file-chip span:last-child{margin-left:auto;color:#94a3b8;font-size:12.5px}
.file-chip .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}

/* Sélecteur de dossier (déplacer / archiver / partager) */
.folder-pick{max-height:260px;overflow:auto;border:1px solid #dce2e9;border-radius:9px;padding:4px}.dark .folder-pick{border-color:#303642}
.folder-pick button{width:100%;display:flex;align-items:center;gap:8px;border:0;background:transparent;border-radius:6px;padding:7px 8px;font-size:14px;font-weight:700;color:#334155;text-align:left}.dark .folder-pick button{color:#dbe3ef}
.folder-pick button:hover{background:#f1f5f9}.dark .folder-pick button:hover{background:#252a33}
.folder-pick button.on{background:var(--brand-soft);color:#4f46e5;font-weight:900}.dark .folder-pick button.on{color:#c4b5fd}
.folder-pick button svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:square;stroke-linejoin:miter;color:#6d28d9}
.swatches{display:flex;gap:8px;flex-wrap:wrap;margin-top:2px}
.swatch{width:24px;height:24px;border-radius:50%;border:2px solid transparent;padding:0}.swatch.on{border-color:#111827;box-shadow:0 0 0 2px #fff inset}.dark .swatch.on{border-color:#f3f4f6;box-shadow:0 0 0 2px #1a1e26 inset}

/* Aperçu */
.preview-modal{width:min(1000px,96vw);height:min(780px,90vh);max-height:none;padding:0;display:flex;flex-direction:column;overflow:hidden}
.preview-header{height:50px;flex:0 0 50px;padding:0 10px 0 16px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-bottom:1px solid #dce2ea;font-size:14px}.dark .preview-header{border-color:var(--line)}
.preview-header strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.preview-header .grow{flex:1}
.preview-body{flex:1;min-height:0;display:grid;place-items:center;background:#f4f6f9}.dark .preview-body{background:#0f1115}
.preview-image{max-width:96%;max-height:96%;object-fit:contain}
.preview-frame{width:100%;height:100%;border:0;background:#fff}
.preview-empty{display:grid;place-items:center;justify-items:center;text-align:center;padding:30px;max-width:460px}.preview-empty h3{margin:12px 0 5px;font-size:16px}.preview-empty p{margin:0 0 15px;font-size:14px;color:var(--muted)}

/* Envois et messages */
.upload-progress{position:fixed;right:18px;bottom:18px;z-index:95;width:300px;background:#fff;border:1px solid var(--line-2);border-radius:12px;box-shadow:0 18px 55px rgba(15,23,42,.18);padding:10px 12px}.dark .upload-progress{background:#1a1e26;border-color:#303642}
.upload-progress h4{margin:0 0 6px;font-size:13px;font-weight:900;color:#334155;display:flex;justify-content:space-between}.dark .upload-progress h4{color:#e2e8f0}
.upload-row{display:flex;align-items:center;gap:8px;font-size:12.5px;color:#64748b;padding:3px 0}.dark .upload-row{color:#94a3b8}
.upload-row>span:first-child{flex:0 1 110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upload-row .bar{flex:1;height:4px;border-radius:4px;background:#e5e7eb;overflow:hidden}.dark .upload-row .bar{background:#2a303a}
.upload-row .bar span{display:block;height:100%;background:#6366f1;transition:width .15s}
.upload-row .bar span.err{background:#dc2626}
.toast{position:fixed;right:18px;bottom:18px;z-index:200;background:#111827;color:#fff;border-radius:9px;padding:10px 13px;font-size:13px;font-weight:800;box-shadow:0 12px 35px rgba(15,23,42,.22);max-width:min(420px,calc(100vw - 36px));cursor:pointer}
.dark .toast{background:#f1f5f9;color:#111827}
.toast.error{background:#be123c;color:#fff}
.toast-enter-active,.toast-leave-active{transition:opacity .2s,transform .2s}.toast-enter-from,.toast-leave-to{opacity:0;transform:translateY(8px)}

/* ---------- Bienvenue (identique à Zeshel Mail / Calendar) ---------- */
.zw-back{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:14px;background:rgba(15,18,32,.55);backdrop-filter:blur(3px)}
.zw-modal{display:flex;flex-direction:column;width:min(500px,calc(100vw - 28px));height:min(620px,calc(100vh - 28px));background:#fff;color:#18212f;border:1px solid #e1e6ed;box-shadow:0 30px 80px rgba(20,16,70,.3);overflow:hidden;border-radius:0;font-family:inherit}
.dark .zw-modal{background:#171a21;color:#f3f4f6;border-color:#303642}
.zw-hero{position:relative;flex:0 0 230px;height:230px;overflow:hidden;display:grid;place-items:center;background:linear-gradient(135deg,#6259DE,#473FC5)}
.zw-wave{font-size:96px;line-height:1;display:inline-block;transform-origin:70% 70%;animation:zwWave 2.2s ease-in-out infinite}
.zw-f{position:absolute;bottom:-30px;font-size:30px;opacity:0;animation:zwFloat 5.5s linear infinite}
.zw-f1{left:8%}.zw-f2{left:24%;animation-delay:1.1s;font-size:24px}.zw-f3{left:42%;animation-delay:2.2s}.zw-f4{left:60%;animation-delay:.6s}.zw-f5{left:76%;animation-delay:1.8s;font-size:28px}.zw-f6{left:90%;animation-delay:2.9s;font-size:22px}
.zw-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;text-align:center;padding:18px 26px 20px;overflow:hidden}
.zw-body h3{margin:0 0 8px;font-size:21px;font-weight:800;text-align:center}
.zw-body p{margin:0 0 12px;font-size:15px;line-height:1.6;color:#667085}.dark .zw-body p{color:#9ca3af}
.zw-body p.zw-lead{flex:0 0 auto;font-size:16px;line-height:1.65;margin:0 8px auto}
.zw-body.is-lead h3{margin-top:auto}
.zw-points{list-style:none;margin:6px auto 10px;padding:0;display:flex;flex-direction:column;gap:0;flex:0 0 auto;width:100%;max-width:400px;border-top:1px solid #e1e6ed;border-bottom:1px solid #e1e6ed}.dark .zw-points{border-color:#303642}
.zw-points li{display:block;text-align:center;padding:13px 6px;background:transparent;border:0;border-top:1px solid #e1e6ed;font-size:15px}.dark .zw-points li{border-color:#303642}.zw-points li:first-child{border-top:0}
.zw-dots{display:flex;gap:6px;justify-content:center;margin-top:auto;padding-top:10px}.zw-body.is-lead .zw-dots{margin-top:18px}
.zw-dots i{width:8px;height:8px;border-radius:50%;background:#d0d5dd;cursor:pointer;transition:all .2s}.dark .zw-dots i{background:#3a404c}
.zw-dots i.done{background:#8b7fe8}.zw-dots i.on{width:22px;border-radius:6px;background:#473FC5}
.zw-actions{display:flex;align-items:center;gap:6px;flex:0 0 auto;margin-top:10px}.zw-actions .grow{flex:1}
.zw-actions button{font:inherit;cursor:pointer;border:0}
.zw-actions .ghost{background:transparent;color:#667085;font-weight:700;height:30px;padding:0 14px;font-size:14px;border-radius:0}.zw-actions .ghost:hover{color:#473FC5}
.zw-actions .primary{background:linear-gradient(135deg,#6259DE,#473FC5);color:#fff;height:30px;padding:0 14px;font-size:14px;font-weight:800;border-radius:0}
@keyframes zwWave{0%,60%,100%{transform:rotate(0)}10%{transform:rotate(16deg)}20%{transform:rotate(-10deg)}30%{transform:rotate(16deg)}40%{transform:rotate(-6deg)}50%{transform:rotate(12deg)}}
@keyframes zwFloat{0%{transform:translateY(0) rotate(0);opacity:0}15%{opacity:.95}85%{opacity:.9}100%{transform:translateY(-250px) rotate(25deg);opacity:0}}
@media (prefers-reduced-motion:reduce){.zw-wave,.zw-f{animation:none}.zw-f{opacity:.5;bottom:12px}}

/* ---------- Petits écrans ---------- */
@media(max-width:900px){.search{max-width:none}.file-row .col.owner{display:none}}
@media(max-width:760px){
  .topbar{height:104px;display:grid;grid-template-columns:auto 1fr;grid-template-rows:48px 40px;gap:6px 8px;padding:0 10px}
  .top-left{min-width:0}.top-actions{min-width:0;justify-self:end;gap:3px}.top-brand{font-size:15px}
  .topbar .search{grid-column:1/-1;grid-row:2;height:40px;max-width:none}.search kbd{display:none}
  .workspace{height:calc(100vh - 104px)}
  .sidebar{position:absolute;z-index:70;left:0;top:104px;bottom:0;box-shadow:0 0 40px rgba(0,0,0,.2)}
  .sidebar.collapsed{width:0;flex-basis:0;padding:0;border:0;box-shadow:none}
  .content{margin-left:0}
  .toolbar{padding:8px 10px}.drop-zone{padding:10px}
  .file-row .col.date,.file-row .col.size{display:none}
  .profile-menu,.apps-menu{right:-4px}
  .search-dropdown{position:fixed;left:10px;right:10px;top:104px}
  .file-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
}

/* ---- Alignement sur Mail / Calendar ---- */
.search{height:40px;max-width:700px;padding:0 13px;gap:9px;border:1px solid #e1e6ee;border-radius:11px;background:#f7f9fc;color:#64748b;transition:background .15s,border-color .15s,box-shadow .15s}
.dark .search{background:#1c2028;border-color:#303642;color:#aeb7c5}
.search input{font-size:14.5px;line-height:1.2;min-width:0;color:#1f2937}.dark .search input{color:#f1f5f9}
.search input::placeholder{color:#8a94a3;opacity:1}.dark .search input::placeholder{color:#8f99a8}
.search kbd{font-size:9px;padding:3px 6px;border-radius:5px;background:#fff;color:#7b8492;border:1px solid #dce2ea}
.dark .search kbd{background:#252a33;color:#9ca3af;border-color:#3a404c}
.search:focus-within{background:#fff;border-color:#aeb8ca;box-shadow:0 0 0 3px rgba(79,70,229,.09)}
.dark .search:focus-within{background:#20252d;border-color:#566078;box-shadow:0 0 0 3px rgba(129,140,248,.12)}
:root .new,:root.dark .new{min-height:40px;border-radius:9px;background:linear-gradient(135deg,#6259DE,#473FC5);color:#fff;box-shadow:0 4px 12px rgba(71,63,197,.28)}
:root .new:hover,:root.dark .new:hover{background:linear-gradient(135deg,#5850d6,#3b34b0);color:#fff}
:root .new.secondary,:root.dark .new.secondary{box-shadow:none}
.btn.primary,:root.dark .btn.primary{background:linear-gradient(135deg,#6259DE,#473FC5);border-color:#473FC5;color:#fff;box-shadow:0 4px 12px rgba(71,63,197,.24)}
.btn.primary:hover{background:linear-gradient(135deg,#5850d6,#3b34b0);color:#fff}
.storage-track span{background:linear-gradient(90deg,#6259DE,#473FC5)}
.storage-inf{font-size:16px;line-height:1;font-weight:800}.storage-meta .storage-inf{font-size:14px;color:inherit}
.search kbd{white-space:nowrap;line-height:1.2}

/* ---- Cartes à angles droits + partage de dossier ---- */
.file-card,.file-row{border-radius:0}
.lock-badge{display:inline-flex;align-items:center;gap:4px;margin-top:4px;font-size:12px;font-weight:800;color:#473FC5;background:#ecebfd;padding:2px 7px}.dark .lock-badge{color:#c4b5fd;background:#29234a}
.lock-badge svg{width:11px;height:11px}.lock-badge.inline{margin:0 0 0 8px;vertical-align:middle}
.check-line{display:flex;align-items:center;gap:8px;margin-top:12px;font-size:14.5px;cursor:pointer}.check-line input{width:15px;height:15px;accent-color:#473FC5}
.share-modal{width:min(560px,94vw)}
.share-modes{display:grid;gap:8px;margin:4px 0 12px}
.share-modes label{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--line-2);cursor:pointer}
.share-modes label.on{border-color:#473FC5;background:var(--brand-soft)}
.share-modes input{margin-top:3px;accent-color:#473FC5}
.share-modes span{display:flex;flex-direction:column;gap:2px;font-size:14.5px}.share-modes small{font-size:13.5px;color:var(--muted)}
.share-search{width:100%;height:38px;padding:0 12px;border:1px solid var(--line-2);background:transparent;color:inherit;font:inherit;font-size:14.5px}
.share-choices{border:1px solid var(--line-2);margin-top:4px;max-height:190px;overflow:auto}
.share-choices button{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer}.share-choices button:hover{background:var(--brand-soft)}
.share-avatar{width:28px;height:28px;border-radius:50%;background:#111827;color:#fff;display:grid;place-items:center;font-size:12px;font-weight:800;flex:0 0 28px}.dark .share-avatar{background:#e5e7eb;color:#111827}
.share-who{display:flex;flex-direction:column;min-width:0;flex:1}.share-who strong{font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.share-who small{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.share-add{font-size:13px;font-weight:800;color:#473FC5}.dark .share-add{color:#c4b5fd}
.share-head,.share-row{display:grid;grid-template-columns:1fr 64px 76px 64px 26px;align-items:center;gap:6px}
.share-head{margin-top:12px;padding:0 0 6px;font-size:12px;font-weight:800;color:var(--muted);border-bottom:1px solid var(--line-2)}.share-head span:not(:first-child){text-align:center}
.share-row{padding:8px 0;border-bottom:1px solid var(--line)}
.share-cell{display:grid;place-items:center}.share-cell input{width:15px;height:15px;accent-color:#473FC5}
.share-x{border:0;background:transparent;color:var(--muted);font-size:18px;cursor:pointer}.share-x:hover{color:#dc2626}
@media(max-width:560px){.share-head,.share-row{grid-template-columns:1fr 44px 52px 52px 22px}}

.share-head,.share-row{grid-template-columns:1fr 62px 74px 62px 78px 24px}
.share-head.arch,.share-row.arch{grid-template-columns:1fr 62px 74px 78px 24px}
@media(max-width:560px){.share-head,.share-row{grid-template-columns:1fr 40px 46px 40px 52px 20px}.share-head.arch,.share-row.arch{grid-template-columns:1fr 40px 46px 52px 20px}.share-modal .share-head{font-size:8px}}
.share-modal{width:min(620px,94vw)}

/* ---- Angles droits : recherche, boutons de la barre, popups (comme Mail et Calendar) ---- */
.search,.search-dropdown,.search-result,.search-all,.search kbd,.search-clear,
.icon-btn,.top-actions button,.top-actions .icon-btn,.apps-btn,.avatar-btn,.topbar button,
.apps-menu,.profile-menu,.item-menu,.item-menu button,.modal,.confirm-modal,.zw-modal,.preview-modal,
.toast,.folder-pick,.folder-pick button,.btn,.close-btn,.apps-grid .app-tile,.app-tile,
.share-search,.share-choices,.share-modes label,.share-avatar,.swatch,.label-chip,.lock-badge,
.upload-panel,.drop-overlay,.view-toggle,.view-toggle button,.sort-select,select,input,textarea,.nav button,.new{border-radius:0!important}
.share-avatar{border-radius:50%!important}
.avatar-btn,.topbar .avatar-btn{border-radius:50%!important}
.share-modal{width:min(660px,94vw)}
.share-head,.share-row{grid-template-columns:1fr 70px 90px 80px 92px 24px}
.share-head.arch,.share-row.arch{grid-template-columns:1fr 70px 90px 92px 24px}
.share-head{font-size:11.5px;letter-spacing:.03em}

/* ---- Boutons et liens : angles arrondis d'origine ; avatar violet ---- */
.btn,.new,.nav button,.close-btn,.item-menu button,.folder-pick button,.app-tile,.apps-grid .app-tile,
.search-result,.search-all,.label-chip,.swatch,.view-toggle,.view-toggle button,.sort-select,
.share-choices button,.share-x,.zw-actions button{border-radius:8px!important}
.new{border-radius:9px!important}
.btn.primary,.btn.danger{border-radius:8px!important}
.label-chip{border-radius:999px!important}
.swatch{border-radius:50%!important}
.lock-badge{border-radius:999px!important}
.search-result{border-radius:8px!important}
.avatar-btn,.topbar .avatar-btn{border-radius:50%!important;background:linear-gradient(135deg,#6259DE,#473FC5)!important;color:#fff!important;border:0!important;box-shadow:0 2px 8px rgba(71,63,197,.28)}
.dark .avatar-btn,.dark .topbar .avatar-btn{background:linear-gradient(135deg,#6259DE,#473FC5)!important;color:#fff!important}
.profile-avatar,.dark .profile-avatar,.share-avatar,.dark .share-avatar{background:linear-gradient(135deg,#6259DE,#473FC5)!important;color:#fff!important}

/* ---- Écran de chargement : la barre se remplit (3,4 s) comme dans Mail ---- */
.boot-splash-bar span{width:0%;background:linear-gradient(90deg,#473FC5,#27B86B);animation:boot-fill 3.4s linear forwards}
.apps-loading .boot-splash-bar span{width:40%;animation:boot-slide 1.2s ease-in-out infinite}
@keyframes boot-fill{0%{width:0%}100%{width:100%}}
/* ---- Boutons de la barre : survol arrondi ---- */
.topbar .icon-btn,.topbar button,.top-actions button,.top-actions .icon-btn,.icon-btn,.icon-btn:hover,.icon-btn.on,.topbar .icon-btn:hover,.topbar .icon-btn.on,.topbar .icon-btn:focus-visible{border-radius:8px!important}
.topbar .avatar-btn{border-radius:50%!important}

/* ---- Lignes plus contrastées en mode clair ---- */
.file-row{border-bottom-color:#dce2ea}.file-list{border-color:#cfd6e0}.file-card{border-color:#d3dae3}.toolbar{border-bottom-color:#d6dce5}
.dark .file-row{border-color:#252a33}.dark .file-list{border-color:var(--line)}.dark .file-card{border-color:var(--line)}.dark .toolbar{border-bottom-color:var(--line)}
.help-modal{width:min(560px,94vw)}.help-list{display:grid;gap:0;border:1px solid var(--line-2);margin-top:6px}
.help-list details{border-bottom:1px solid var(--line-2)}.help-list details:last-child{border-bottom:0}
.help-list summary{padding:11px 13px;font-size:14.5px;font-weight:800;cursor:pointer;list-style:none;display:flex;justify-content:space-between}
.help-list summary::after{content:"+";color:var(--muted);font-weight:700}.help-list details[open] summary::after{content:"–"}
.help-list p{margin:0;padding:0 13px 13px;font-size:14.5px;line-height:1.55;color:var(--muted)}
.help-list kbd{font:inherit;font-size:10.5px;font-weight:700;padding:1px 6px;border:1px solid var(--line-2);background:var(--brand-soft);color:inherit}
.file-row .col.owner{color:#475569;font-size:13.5px;font-weight:600}.dark .file-row .col.owner{color:#aeb7c5}.file-row .col.size,.file-row .col.date{color:#64748b}

.file-list{border-radius:0!important}.file-row{border-radius:0!important}.file-card{border-radius:0!important}
.purge-note{display:block;font-size:11.5px;color:#b45309;font-weight:700}.dark .purge-note{color:#fbbf24}
.file-row .col.date{width:auto;min-width:84px}
.apps-title{padding:0 0 8px calc(((100% - 4px) / 3 - 34px) / 2)}
.preview-empty .boot-splash-bar{margin:0 auto 18px}.preview-empty .boot-splash-bar span{width:40%;animation:boot-slide 1.2s ease-in-out infinite}

/* Miniatures de la vue grille (images, PDF, documents) */
.thumb-box{width:100%;height:112px;overflow:hidden;background:#f1f5f9;display:grid;place-items:center;border:1px solid var(--line)}.dark .thumb-box{background:#252a33}
.thumb-box img{width:100%;height:100%;object-fit:cover;object-position:top center;display:block}
.file-card{padding:8px 8px 10px}.file-card .file-icon{margin-top:14px}
.file-card .file-name{width:100%}
.file-glyph.audio{color:#db2777;font-size:20px}.file-row .file-glyph.audio{font-size:16px}
.preview-body{position:relative}
.preview-nav{position:absolute;top:50%;transform:translateY(-50%);width:44px;height:44px;border-radius:50%;border:0;background:rgba(15,17,21,.55);color:#fff;font-size:30px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0 0 4px;z-index:2}
.preview-nav:hover{background:rgba(79,70,229,.9)}.preview-nav.prev{left:14px}.preview-nav.next{right:14px}
.preview-count{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);background:rgba(15,17,21,.6);color:#fff;font-size:14px;padding:4px 12px;border-radius:999px;z-index:2}
.preview-audio{display:flex;flex-direction:column;align-items:center;gap:18px;padding:24px;max-width:92%}
.preview-audio audio{width:min(480px,86vw)}
.audio-art{width:120px;height:120px;border-radius:24px;display:grid;place-items:center;background:#fdf2f8;box-shadow:0 8px 24px rgba(236,72,153,.18)}
.audio-art .file-glyph,.file-row .audio-art .file-glyph{width:72px;height:72px;font-size:44px}

.preview-csv{position:absolute;inset:0;display:flex;flex-direction:column;background:#fff}.dark .preview-csv{background:#171a21}
.csv-scroll{flex:1;overflow:auto}
.csv-table{border-collapse:collapse;font-size:14.5px;min-width:100%}
.csv-table th,.csv-table td{border:1px solid #d3dae3;padding:6px 12px;text-align:left;white-space:nowrap;max-width:320px;overflow:hidden;text-overflow:ellipsis}.dark .csv-table th,.dark .csv-table td{border-color:#282d37}
.csv-table th{position:sticky;top:0;background:#f1f5f9;font-weight:700;z-index:1}.dark .csv-table th{background:#252a33}
.csv-table .csv-n{background:#f8fafc;color:#94a3b8;text-align:right;width:1%;font-size:13px}.dark .csv-table .csv-n{background:#1d2129}
.csv-table tbody tr:hover td{background:#f5f3ff}.dark .csv-table tbody tr:hover td{background:#211f3a}
.csv-more{padding:8px 14px;font-size:14px;color:#64748b;border-top:1px solid #d3dae3;background:#f8fafc}
/* Vue liste : uniquement des lignes horizontales (pas de cadre autour de la liste) */
.file-list,.dark .file-list{border:0!important}
.file-row:last-child{border-bottom:1px solid #dce2ea}.dark .file-row:last-child{border-bottom-color:#252a33}

/* Favoris : étoile sur les cartes et les lignes */
.star-btn{position:absolute;top:8px;left:8px;width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:8px;background:rgba(255,255,255,.88);color:#64748b;cursor:pointer;opacity:0;padding:0;z-index:2;transition:opacity .12s}.dark .star-btn{background:rgba(23,26,33,.88);color:#94a3b8}
.star-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9}.star-btn svg[fill=currentColor]{fill:currentColor}
.star-btn.on{opacity:1;color:#f59e0b}
.file-card:hover .star-btn,.file-card.menu-open .star-btn,.star-btn:focus-visible{opacity:1}
.star-btn:hover{color:#f59e0b}
.star-btn.row{position:static;flex:0 0 28px;background:transparent;opacity:.0}.file-row:hover .star-btn.row,.star-btn.row.on,.star-btn.row:focus-visible{opacity:1}
/* Icônes de la barre latérale : traits plus gras, comme Zeshel Mail */
.nav button svg{stroke-width:2.4}
.nav button svg[fill=currentColor]{stroke-width:1.8}

/* Droits d'accès par niveau */
.share-label{display:block;margin:6px 0 6px;font-size:13px;font-weight:800;color:var(--muted)}
.share-select{width:100%;padding:9px 10px;border:1px solid var(--line-2);background:var(--surface,#fff);color:inherit;font:inherit;font-size:14.5px;margin-bottom:6px}
.share-select.sm{padding:6px 8px;margin:0;font-size:14px}
.share-head2,.share-row2{grid-template-columns:1fr 128px 86px 24px}
.share-row2 .share-cell:nth-child(2){justify-content:stretch}
@media(max-width:560px){.share-head2,.share-row2{grid-template-columns:1fr 108px 40px 22px}}

.share-checks{display:flex;flex-wrap:wrap;gap:6px 16px;margin:6px 0 4px;font-size:14.5px}
.share-checks label{display:flex;align-items:center;gap:6px;cursor:pointer}.share-checks input{accent-color:#473FC5}
.share-checks label.own{font-weight:700}
.share-member{padding:10px 0;border-bottom:1px solid var(--line)}
.share-member-top{display:flex;align-items:center;justify-content:space-between;gap:8px}

.share-member .share-checks{flex-wrap:nowrap;gap:6px 11px;font-size:14px;white-space:nowrap}
@media(max-width:620px){.share-member .share-checks{flex-wrap:wrap}}
/* Droits d'accès : mode sombre */
.dark .share-select{background:#11141a;color:#e5e7eb;border-color:var(--line-2);color-scheme:dark}
.dark .share-select option{background:#1a1e26;color:#e5e7eb}
.dark .share-search{color:#e5e7eb}.dark .share-search::placeholder{color:#7c8696}
.dark .share-label,.dark .share-who small,.dark .share-modal .modal-hint{color:#94a3b8}
.dark .share-checks label{color:#e5e7eb}
.dark .share-checks input:disabled{opacity:.55}
.dark .share-member,.dark .share-choices,.dark .share-choices button{border-color:var(--line-2)}
.dark .share-choices button:hover{background:#232834}
.dark .share-who strong{color:#f3f4f6}

/* Détails, recherche de dossier */
.pick-search{width:100%;margin:0 0 8px;padding:9px 10px;border:1px solid var(--line-2);background:transparent;color:inherit;font:inherit;font-size:14.5px}
.dark .pick-search{color:#e5e7eb;background:#11141a}.pick-search::placeholder{color:#98A2B3}
.pick-name{display:flex;flex-direction:column;min-width:0}.pick-name small{font-size:12px;font-weight:600;color:#98A2B3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.info-list{display:grid;grid-template-columns:110px 1fr;gap:10px 14px;margin:6px 0 14px;font-size:14.5px}
.info-list dt{font-weight:800;color:#98A2B3;font-size:13.5px;padding-top:2px}.info-list dd{margin:0;word-break:break-word}
.info-path{display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px}.info-path .sep{color:#98A2B3}
.info-crumb{border:0;background:transparent;padding:0;font:inherit;font-weight:700;color:#4f46e5;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.dark .info-crumb{color:#c4b5fd}

/* Détails au-dessus de l'aperçu ; aperçu d'image au survol */
.info-back{z-index:130}
.hover-preview{position:fixed;z-index:110;width:380px;max-height:300px;background:#fff;border:1px solid var(--line-2);box-shadow:0 18px 50px rgba(15,23,42,.28);padding:6px;pointer-events:none;display:flex;flex-direction:column;gap:5px;animation:hv-in .14s ease-out}
.dark .hover-preview{background:#1a1e26;border-color:#303642;color:#e5e7eb}
.hover-preview img{display:block;max-width:100%;max-height:256px;margin:0 auto;object-fit:contain}
.hover-preview span{font-size:12.5px;font-weight:800;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@keyframes hv-in{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:none}}

/* Icônes et badges : bouts et angles carrés (les boutons gardent leurs angles) */
.file-icon,.file-row .file-icon,.search-result .file-icon,.empty-icon,.confirm-icon,
.lock-badge,.lock-badge.inline,.label-chip,.nav .nav-count,.nav-count,.purge-note{border-radius:0!important}
.label-opt .dot{border-radius:0!important}

/* Dossier en zip, tar, lecteur d'archives */
.file-glyph.archive{color:#7c3aed;font-size:9px}.dark .file-glyph.archive{color:#c4b5fd}
.zip-choices{display:grid;gap:8px;margin:6px 0 14px}
.zip-choice{display:flex;gap:10px;align-items:flex-start;padding:11px 12px;border:1px solid var(--line-2,#e4e7ec);cursor:pointer}
.zip-choice.on{border-color:#6259DE;background:#f5f3ff}.dark .zip-choice.on{background:#2a2750;border-color:#8b83f0}
.zip-choice input{margin-top:3px;accent-color:#6259DE}.zip-choice span{display:grid;gap:2px}.zip-choice small{color:#667085;font-size:13px}.dark .zip-choice small{color:#98A2B3}
.reader-modal{width:min(720px,96vw)}
.reader-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:4px 0 8px}
.reader-crumbs{display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px;flex:1;min-width:140px}.reader-crumbs .sep{color:#98A2B3}
.reader-search{flex:0 1 220px;min-width:0;padding:7px 10px;border:1px solid var(--line-2,#e4e7ec);background:transparent;color:inherit;font:inherit;font-size:14px}
.reader-list{border:1px solid var(--line-2,#e4e7ec);max-height:52vh;overflow:auto}
.reader-row{display:flex;align-items:center;gap:10px;width:100%;padding:8px 12px;border:0;border-bottom:1px solid var(--line-2,#eef0f3);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}
.reader-row:last-child{border-bottom:0}.reader-row:hover:not(:disabled){background:#f5f3ff}.dark .reader-row:hover:not(:disabled){background:#2a2750}.reader-row:disabled{cursor:default;opacity:.7}
.reader-ic{width:22px;height:22px;flex:0 0 22px;color:#6259DE}.reader-ic svg{width:20px;height:20px}
.reader-name{flex:1;min-width:0;display:grid}.reader-name strong{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reader-name small{color:#98A2B3;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reader-meta{color:#667085;font-size:13px;white-space:nowrap;min-width:64px;text-align:right}.reader-date{min-width:84px}.dark .reader-meta{color:#98A2B3}
.reader-dl{width:18px;height:18px;color:#98A2B3}.reader-dl svg{width:16px;height:16px}
@media(max-width:560px){.reader-date{display:none}}

/* Icône PDF : page cornée et bandeau rouge, angles carrés */
.file-icon svg.pdf-ico,.search-result .file-icon svg.pdf-ico,.file-row .file-icon svg.pdf-ico{width:100%;height:100%;stroke:none;fill:none}
.pdf-ico .pdf-page{fill:#fff;stroke:#dc2626;stroke-width:1.4;stroke-linejoin:miter}
.pdf-ico .pdf-fold{fill:none;stroke:#dc2626;stroke-width:1.4;stroke-linejoin:miter}
.pdf-ico .pdf-band{fill:#dc2626;stroke:none}.pdf-ico text{fill:#fff;stroke:none}
.dark .pdf-ico .pdf-page{fill:#1f2430;stroke:#f87171}.dark .pdf-ico .pdf-fold{stroke:#f87171}.dark .pdf-ico .pdf-band{fill:#ef4444}

/* Icônes sans fond : page / dossier à contour et bandeau coloré */
.file-icon,.file-icon.folder,.dark .file-icon,.dark .file-icon.folder{background:transparent!important;overflow:visible}
.file-icon svg.doc-ico,.file-row .file-icon svg.doc-ico,.search-result .file-icon svg.doc-ico{width:100%;height:100%;fill:none;stroke:none}
.doc-ico{--cur:var(--c)}.dark .doc-ico{--cur:var(--cd)}
.doc-ico .d-page{fill:#fff;stroke:var(--cur);stroke-width:1.4;stroke-linejoin:miter}
.doc-ico .d-fold{fill:none;stroke:var(--cur);stroke-width:1.4;stroke-linejoin:miter}
.doc-ico .d-band{fill:var(--cur);stroke:none}.doc-ico text{fill:#fff;stroke:none}.dark .doc-ico text{fill:#12151c}
.doc-ico .d-line{fill:none;stroke:var(--cur);stroke-width:1.6;stroke-linecap:butt}.doc-ico .d-line-w{fill:none;stroke:#fff;stroke-width:1.6;stroke-linecap:butt}.dark .doc-ico .d-line-w{stroke:#12151c}
.dark .doc-ico .d-page{fill:#161a22}

.doc-ico .g-fill{fill:var(--cur);stroke:none}.doc-ico .g-line{fill:none;stroke:#fff;stroke-width:1.3;stroke-linecap:butt}.dark .doc-ico .g-line{stroke:#11141b}

/* Élément pas à jour (tar ou archive) : icône en bas à droite */
.file-card,.file-row{position:relative}
.stale-badge{position:absolute;right:6px;bottom:6px;width:20px;height:20px;display:grid;place-items:center;background:#f59e0b;color:#fff;border-radius:0!important;z-index:2}
.stale-badge svg{width:14px;height:14px}
.file-row .stale-badge{right:48px;bottom:50%;transform:translateY(50%)}
.dark .stale-badge{background:#fbbf24;color:#1f1300}

/* Aperçu texte : lisible en mode clair comme en sombre */
.preview-text-wrap{width:100%;height:100%;overflow:auto;background:#fff;color:#1d2433}
.preview-text{margin:0;padding:20px 24px;white-space:pre-wrap;word-break:break-word;font:14px/1.6 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:inherit}
.dark .preview-text-wrap{background:#171a21;color:#e6e9ef}

/* Repères « ajouté / modifié » et « pas à jour » : alignés, sans chevauchement */
.item-badges{display:inline-flex;gap:4px;align-items:center}
.file-card>.item-badges{position:absolute;right:6px;bottom:6px;z-index:2}
.item-badges.inline{margin-left:8px;vertical-align:middle}
.stale-badge,.file-row .stale-badge{position:static;transform:none;width:20px;height:20px;display:inline-grid;place-items:center;background:#f59e0b;color:#fff;border-radius:0!important}
.stale-badge svg,.chg-badge svg{width:13px;height:13px}
.chg-badge{width:20px;height:20px;display:inline-grid;place-items:center;color:#fff;border-radius:0!important}
.chg-badge.added{background:#16a34a}.chg-badge.modified{background:#2563eb}
.dark .stale-badge{background:#fbbf24;color:#1f1300}.dark .chg-badge.added{background:#4ade80;color:#052e16}.dark .chg-badge.modified{background:#60a5fa;color:#0b1b3a}
/* Page Activité */
.activity-page{max-width:820px;margin:0 auto;padding:6px 4px 40px}
.activity-bar{display:flex;gap:14px;align-items:center;flex-wrap:wrap;margin:4px 0 14px}.activity-mine{display:flex;gap:6px;align-items:center;font-size:14px;cursor:pointer}
.activity-day h3{margin:18px 0 6px;font-size:14px;color:#667085;font-weight:700}.dark .activity-day h3{color:#98A2B3}
.activity-day ul{list-style:none;margin:0;padding:0;border:1px solid var(--line-2,#e4e7ec)}
.activity-row{display:flex;gap:12px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--line-2,#eef0f3)}.activity-row:last-child{border-bottom:0}
.activity-av{width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center;background:#6259DE;color:#fff;font-weight:800;font-size:12px;border-radius:50%}
.activity-text{flex:1;min-width:0;line-height:1.45;overflow-wrap:anywhere}.activity-text small{color:#98A2B3;font-size:12px}
.activity-row time{color:#667085;font-size:13px;white-space:nowrap}.dark .activity-row time{color:#98A2B3}
.activity-more{text-align:center;margin-top:16px}

.chg-badge.removed{background:#dc2626}.dark .chg-badge.removed{background:#f87171;color:#2a0a0a}
/* Carte : les repères sont centrés sous la date, qui reste centrée */
.file-card:has(.item-badges){padding-bottom:36px}
.file-card>.item-badges{left:auto;right:6px;bottom:6px;justify-content:flex-end}
