/* DyneNAS — bureau en verre dépoli. Tout passe par des variables : thème clair et sombre partagent les règles. */
:root {
  --bg: rgba(246, 248, 252, .84); --bg-solid: #f4f6fb; --panel: rgba(255, 255, 255, .82); --field: rgba(255, 255, 255, .9);
  --line: rgba(15, 23, 42, .1); --line-strong: rgba(15, 23, 42, .18); --text: #131a29; --muted: #5f6b80;
  --accent: #3b6cf6; --accent-2: #8b5cf6; --accent-text: #ffffff; --ok: #12824a; --warn: #b45309; --bad: #c62828;
  --track: rgba(15, 23, 42, .08); --hover: rgba(15, 23, 42, .06);
  --glass: rgba(255, 255, 255, .62); --glass-line: rgba(255, 255, 255, .7); --top: rgba(255, 255, 255, .5); --top-text: #131a29;
  --wall-a: #5b8cff; --wall-b: #a57bff; --wall-c: #35c9b5; --wall-base: #b4c4f4; --win-head: rgba(255, 255, 255, .55);
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 14px rgba(16, 24, 40, .05);
  --win-shadow: 0 30px 70px rgba(20, 30, 60, .28), 0 4px 14px rgba(20, 30, 60, .12);
  --glow: 0 6px 20px color-mix(in srgb, var(--accent) 38%, transparent);
  --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.3, 1.45, .45, 1);
  color-scheme: light;
}
/* Thème sombre : celui du système, sauf si « clair » est choisi dans le menu du compte… */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: rgba(17, 22, 34, .8); --bg-solid: #121826; --panel: rgba(255, 255, 255, .055); --field: rgba(255, 255, 255, .06);
    --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .18); --text: #e8ecf5; --muted: #98a3b8;
    --accent: #6b95ff; --accent-2: #a78bfa; --accent-text: #0a0f1c; --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
    --track: rgba(255, 255, 255, .09); --hover: rgba(255, 255, 255, .07);
    --glass: rgba(24, 30, 46, .58); --glass-line: rgba(255, 255, 255, .1); --top: rgba(12, 16, 28, .45); --top-text: #e8ecf5;
    --wall-a: #2747b8; --wall-b: #6d28d9; --wall-c: #0f766e; --wall-base: #070b16; --win-head: rgba(255, 255, 255, .04);
    --shadow: 0 1px 2px rgba(0, 0, 0, .2); --win-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 4px 16px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
/* …ou sur choix explicite, quel que soit le système. */
:root[data-theme="dark"] {
  --bg: rgba(17, 22, 34, .8); --bg-solid: #121826; --panel: rgba(255, 255, 255, .055); --field: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .18); --text: #e8ecf5; --muted: #98a3b8;
  --accent: #6b95ff; --accent-2: #a78bfa; --accent-text: #0a0f1c; --ok: #4ade80; --warn: #fbbf24; --bad: #f87171;
  --track: rgba(255, 255, 255, .09); --hover: rgba(255, 255, 255, .07);
  --glass: rgba(24, 30, 46, .58); --glass-line: rgba(255, 255, 255, .1); --top: rgba(12, 16, 28, .45); --top-text: #e8ecf5;
  --wall-a: #2747b8; --wall-b: #6d28d9; --wall-c: #0f766e; --wall-base: #070b16; --win-head: rgba(255, 255, 255, .04);
  --shadow: 0 1px 2px rgba(0, 0, 0, .2); --win-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 4px 16px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }
/* Fondu au changement de thème */
html.theme-switch, html.theme-switch * { transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease !important; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--wall-base); color: var(--text); font: 14.5px/1.5 "Segoe UI Variable Text", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; -webkit-font-smoothing: antialiased; }
h1 { font-size: 21px; margin: 0; font-weight: 680; letter-spacing: -.015em; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 640; letter-spacing: -.005em; }
h3 { font-size: 14px; margin: 18px 0 8px; font-weight: 620; }
p { margin: 0 0 10px; }
a { color: var(--accent); text-underline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--muted); }

/* Fond d'écran : trois halos qui dérivent lentement */
.wall { position: absolute; inset: 0; overflow: hidden; background: var(--wall-base); z-index: 0; }
.wall i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .85; will-change: transform; }
.wall i:nth-child(1) { width: 62vmax; height: 62vmax; left: -18vmax; top: -22vmax; background: var(--wall-a); animation: drift-a 38s ease-in-out infinite alternate; }
.wall i:nth-child(2) { width: 54vmax; height: 54vmax; right: -16vmax; top: -8vmax; background: var(--wall-b); animation: drift-b 46s ease-in-out infinite alternate; }
.wall i:nth-child(3) { width: 58vmax; height: 58vmax; left: 22vmax; bottom: -32vmax; background: var(--wall-c); animation: drift-c 52s ease-in-out infinite alternate; }
.wall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(0, 0, 0, .18)); }
@keyframes drift-a { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vmax, 14vmax) scale(.9); } }
@keyframes drift-c { to { transform: translate(-10vmax, -12vmax) scale(1.12); } }

/* Bureau */
.desktop { height: 100vh; height: 100dvh; display: flex; flex-direction: column; position: relative; }
.topbar { height: 40px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--top); color: var(--top-text); backdrop-filter: blur(26px) saturate(1.6); -webkit-backdrop-filter: blur(26px) saturate(1.6); border-bottom: 1px solid var(--glass-line); position: relative; z-index: 100000; }
.top-slot { position: relative; }
.top-brand { display: flex; align-items: center; gap: 8px; font-weight: 660; font-size: 14px; letter-spacing: -.01em; }
.top-title { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.top-title::before { content: "›"; margin-right: 8px; opacity: .6; }
.top-title:empty { display: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.top-clock { font-size: 13px; font-weight: 560; font-variant-numeric: tabular-nums; padding: 0 8px; white-space: nowrap; }
.top-btn { background: none; border: 0; color: inherit; width: 34px; height: 30px; border-radius: 9px; display: grid; place-items: center; padding: 0; position: relative; transition: background .18s, transform .18s var(--spring); }
.top-btn:hover { background: var(--hover); border: 0; box-shadow: none; transform: none; }
.top-btn:active { transform: scale(.9); }
.top-btn .icon { width: 18px; height: 18px; }
.bell .count { position: absolute; top: 0; right: -1px; min-width: 16px; height: 16px; border-radius: 8px; background: #f59e0b; color: #111; font-size: 11px; font-weight: 700; line-height: 16px; padding: 0 4px; animation: pop .35s var(--spring); }
.bell.alarm .count { background: #ef4444; color: #fff; box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); animation: pulse 1.8s infinite; }
.bell.alarm .icon { animation: ring 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
@keyframes ring { 0%, 86%, 100% { transform: rotate(0); } 89% { transform: rotate(14deg); } 93% { transform: rotate(-12deg); } 97% { transform: rotate(6deg); } }
@keyframes pop { from { transform: scale(0); } }
.desk { flex: 1; position: relative; overflow: hidden; z-index: 1; }

/* Accueil du bureau : heure et salutation, derrière les fenêtres */
.desk-hello { position: absolute; left: 34px; top: 30px; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); pointer-events: none; animation: rise .7s var(--ease) both; }
.desk-hello .time { font-size: clamp(44px, 7vw, 84px); font-weight: 640; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.desk-hello .date { font-size: 17px; font-weight: 520; margin-top: 8px; opacity: .92; text-transform: capitalize; }
.desk-hello .hi { font-size: 14px; margin-top: 4px; opacity: .78; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Dock */
.dock-wrap { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; pointer-events: none; z-index: 99990; padding: 0 10px; }
.dock { pointer-events: auto; display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(30px) saturate(1.7); -webkit-backdrop-filter: blur(30px) saturate(1.7); box-shadow: 0 18px 50px rgba(10, 16, 34, .3), inset 0 1px 0 rgba(255, 255, 255, .25); max-width: 100%; animation: dock-in .6s var(--spring) both; }
@keyframes dock-in { from { opacity: 0; transform: translateY(40px) scale(.9); } }
.dock-item { position: relative; background: none; border: 0; padding: 0 0 7px; display: grid; place-items: center; flex: none; border-radius: 14px; transition: transform .22s var(--spring), margin .22s var(--spring); transform-origin: 50% 100%; }
.dock-item:hover { border: 0; box-shadow: none; }
.dock-item .app-icon { width: 46px; height: 46px; border-radius: 13px; transition: box-shadow .2s; }
.dock-item .app-icon .icon { width: 25px; height: 25px; }
@media (hover: hover) {
  .dock-item:hover { transform: translateY(-9px) scale(1.24); margin: 0 7px; z-index: 2; }
  .dock-item:hover + .dock-item, .dock-item:has(+ .dock-item:hover) { transform: translateY(-4px) scale(1.1); margin: 0 3px; }
  .dock-item:hover .app-icon { box-shadow: 0 12px 26px rgba(0, 0, 0, .35); }
  .dock-item:hover::before { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
.dock-item:active { transform: translateY(-2px) scale(.94); }
.dock-item::before { content: attr(data-label); position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translate(-50%, 6px) scale(.9); background: rgba(14, 18, 30, .86); color: #fff; font-size: 12px; font-weight: 560; padding: 4px 9px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .18s var(--spring); }
.dock-item::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 5px; height: 5px; border-radius: 3px; background: var(--text); opacity: 0; transform: translateX(-50%) scale(0); transition: opacity .2s, transform .25s var(--spring), width .25s var(--spring); }
.dock-item.open::after { opacity: .55; transform: translateX(-50%) scale(1); }
.dock-item.on::after { opacity: 1; width: 16px; background: var(--accent); }
.dock-item.bounce .app-icon { animation: bounce .55s var(--ease); }
@keyframes bounce { 30% { transform: translateY(-16px); } 55% { transform: translateY(0); } 75% { transform: translateY(-6px); } }
.dock-sep { width: 1px; align-self: stretch; margin: 4px 3px 10px; background: var(--line-strong); flex: none; }

/* Pastilles d'application */
.app-icon { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: 0 4px 12px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -8px 14px rgba(0, 0, 0, .12); position: relative; }
.app-icon .icon { width: 28px; height: 28px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.app-icon.small { width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.app-icon.small .icon { width: 14px; height: 14px; stroke-width: 2; filter: none; }
.tint-blue { background: linear-gradient(150deg, #5aa2ff, #2457e6); }
.tint-green { background: linear-gradient(150deg, #4ade80, #12924a); }
.tint-orange { background: linear-gradient(150deg, #fdba4c, #e2570e); }
.tint-purple { background: linear-gradient(150deg, #c084fc, #6d28d9); }
.tint-gray { background: linear-gradient(150deg, #8493a8, #3a475c); }
.tint-teal { background: linear-gradient(150deg, #2dd4bf, #0c7c74); }
.tint-red { background: linear-gradient(150deg, #fb7185, #c81e4a); }
.tint-yellow { background: linear-gradient(150deg, #fde047, #d19406); }

/* Lanceur plein écran */
.launchpad { position: absolute; inset: 0; z-index: 99995; display: flex; flex-direction: column; align-items: center; padding: 7vh 20px 110px; background: color-mix(in srgb, var(--wall-base) 38%, transparent); backdrop-filter: blur(34px) saturate(1.5); -webkit-backdrop-filter: blur(34px) saturate(1.5); animation: fade .22s ease both; overflow-y: auto; }
.launchpad.closing { animation: fade .16s ease reverse both; }
.launchpad input { width: 100%; padding: 11px 16px 11px 42px; border-radius: 14px; font-size: 16px; background: var(--glass); border: 1px solid var(--glass-line); color: var(--text); box-shadow: 0 10px 30px rgba(10, 16, 34, .18); }
.launch-search { position: relative; width: min(420px, 100%); flex: none; animation: rise .35s var(--ease) both; }
.launch-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; z-index: 1; }
.launch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px 8px; margin-top: 5vh; width: min(880px, 100%); }
.launch { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 14px 4px; border-radius: 16px; font-size: 13.5px; font-weight: 520; text-align: center; color: var(--text); line-height: 1.25; animation: launch-in .42s var(--spring) both; animation-delay: calc(var(--i, 0) * 22ms); transition: background .18s, transform .2s var(--spring); }
.launch .app-icon { width: 64px; height: 64px; border-radius: 18px; transition: transform .22s var(--spring), box-shadow .2s; }
.launch .app-icon .icon { width: 34px; height: 34px; }
.launch:hover, .launch:focus-visible { background: var(--hover); border: 0; box-shadow: none; }
.launch:hover .app-icon { transform: translateY(-4px) scale(1.08); box-shadow: 0 14px 28px rgba(0, 0, 0, .32); }
.launch:active { transform: scale(.94); }
.launch-grid p { grid-column: 1 / -1; text-align: center; color: var(--text); }
@keyframes launch-in { from { opacity: 0; transform: translateY(18px) scale(.86); } }
@keyframes fade { from { opacity: 0; } }

/* Menus */
.menu-pop { position: absolute; top: 40px; background: var(--glass); color: var(--text); border: 1px solid var(--glass-line); border-radius: var(--radius); box-shadow: var(--win-shadow); z-index: 100001; backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6); animation: menu-in .2s var(--spring) both; transform-origin: 90% 0; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px) scale(.95); } }
.user-pop { right: 0; min-width: 220px; padding: 6px; display: flex; flex-direction: column; }
.user-pop button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 9px; color: inherit; }
.user-pop button:hover { background: var(--hover); border: 0; box-shadow: none; transform: none; }
.theme-pick { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.theme-pick > span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 660; margin-bottom: 6px; }
.theme-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; background: var(--track); border-radius: 11px; }
.user-pop .theme-seg button { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 6px; border-radius: 8px; font-size: 12.5px; font-weight: 560; color: var(--muted); text-align: center; transition: background .2s, color .2s, box-shadow .2s; }
.user-pop .theme-seg button .icon { width: 14px; height: 14px; }
.user-pop .theme-seg button:hover { background: none; color: var(--text); }
.user-pop .theme-seg button.on { background: var(--field); color: var(--text); font-weight: 640; box-shadow: 0 1px 3px rgba(10, 16, 34, .16); }
.menu-head { padding: 8px 10px 10px; font-weight: 620; border-bottom: 1px solid var(--line); margin-bottom: 4px; }

/* Fenêtres */
.win { position: absolute; display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--glass-line); border-radius: 15px; box-shadow: 0 12px 34px rgba(10, 16, 34, .2); overflow: hidden; resize: both; min-width: 340px; min-height: 220px; max-width: 100%; max-height: 100%; backdrop-filter: blur(36px) saturate(1.7); -webkit-backdrop-filter: blur(36px) saturate(1.7); transition: box-shadow .25s, filter .25s; transform-origin: 50% 100%; }
.win.opening { animation: win-in .34s var(--spring) both; }
.win.closing { animation: win-out .18s ease-in both; pointer-events: none; }
.win.minimizing { animation: win-min .26s ease-in both; pointer-events: none; }
.win.restoring { animation: win-min .3s var(--ease) reverse both; }
.win.sizing { transition: left .3s var(--ease), top .3s var(--ease), width .3s var(--ease), height .3s var(--ease), border-radius .3s; }
@keyframes win-in { from { opacity: 0; transform: translateY(26px) scale(.92); } }
@keyframes win-out { to { opacity: 0; transform: scale(.94); } }
@keyframes win-min { to { opacity: 0; transform: translateY(46vh) scale(.3); } }
.win.active { box-shadow: var(--win-shadow); }
.win:not(.active) { filter: saturate(.85); }
.win.minimized { display: none; }
.win.maximized { left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100% - 78px) !important; border-radius: 0; resize: none; border-width: 0; }
.win-head { height: 44px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 8px 0 12px; background: var(--win-head); border-bottom: 1px solid var(--line); cursor: default; user-select: none; touch-action: none; }
.win-title { font-weight: 640; font-size: 14px; letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win:not(.active) .win-title { color: var(--muted); }
.win-buttons { margin-left: auto; display: flex; gap: 4px; }
.win-buttons button { width: 30px; height: 28px; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; padding: 0; color: var(--muted); transition: background .15s, color .15s, transform .15s var(--spring); }
.win-buttons button:hover { background: var(--hover); color: var(--text); border: 0; box-shadow: none; transform: none; }
.win-buttons button:active { transform: scale(.88); }
.win-buttons button.close:hover { background: #e5484d; color: #fff; }
.win-buttons .icon { width: 15px; height: 15px; }
.win-body { flex: 1; overflow: auto; padding: 20px 22px 26px; min-height: 0; animation: body-in .4s var(--ease) both; }
.win-body.flush { padding: 0; display: flex; flex-direction: column; }
@keyframes body-in { from { opacity: 0; transform: translateY(8px); } }

/* Onglets : pastilles */
.tabs { position: relative; display: flex; margin: -4px 0 18px; padding: 4px; background: var(--track); border-radius: 12px; width: fit-content; max-width: 100%; overflow: hidden; }
.tabs-scroll { position: relative; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tab { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 6px 14px; border-radius: 9px; color: var(--muted); white-space: nowrap; font-weight: 540; transition: color .2s, background .2s; }
.tab .icon { width: 16px; height: 16px; }
.tab:hover { color: var(--text); border: 0; box-shadow: none; transform: none; background: var(--hover); }
.tab.on { color: var(--text); font-weight: 640; background: var(--field); box-shadow: 0 1px 3px rgba(10, 16, 34, .16), inset 0 1px 0 rgba(255, 255, 255, .12); }
/* Pastille glissante : dès qu'elle est mesurée, elle porte le fond de l'onglet actif. */
.tab-ink { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 9px; background: var(--field); box-shadow: 0 1px 3px rgba(10, 16, 34, .16), inset 0 1px 0 rgba(255, 255, 255, .12); transition: transform .38s var(--spring), width .3s var(--ease); pointer-events: none; opacity: 0; }
.tabs.has-ink .tab-ink { opacity: 1; }
.tabs.has-ink .tab.on, .tabs.has-ink .tab.on:hover { background: none; box-shadow: none; }
/* Barre plus large que sa fenêtre : un fondu et une flèche du côté où il reste des onglets. */
.tabs-nav { position: absolute; top: 0; bottom: 0; z-index: 3; width: 44px; padding: 0; border: 0; border-radius: 0; display: flex; align-items: center; color: var(--text); opacity: 0; pointer-events: none; transition: opacity .2s; }
.tabs-nav:hover { border: 0; box-shadow: none; transform: none; }
.tabs-nav .icon { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--bg-solid); box-shadow: 0 2px 8px rgba(10, 16, 34, .22), 0 0 0 1px var(--line); transition: transform .2s var(--spring); }
.tabs-nav:hover .icon { transform: scale(1.12); }
.tabs-nav.prev { left: 0; justify-content: flex-start; padding-left: 4px; background: linear-gradient(90deg, var(--bg-solid) 35%, transparent); }
.tabs-nav.next { right: 0; justify-content: flex-end; padding-right: 4px; background: linear-gradient(270deg, var(--bg-solid) 35%, transparent); }
.tabs.more-left .tabs-nav.prev, .tabs.more-right .tabs-nav.next { opacity: 1; pointer-events: auto; }
/* Contenu d'un onglet : il entre du côté vers lequel on est allé. */
.tab-pane.entering { animation: pane-in .34s var(--ease) both; }
@keyframes pane-in { from { opacity: 0; transform: translateX(calc(var(--dir, 0) * 22px)) translateY(6px); } }

/* Cartes */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.head .actions, .toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { margin-bottom: 14px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 17px 19px; box-shadow: var(--shadow); min-width: 0; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.grid > .card:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(10, 16, 34, .12); border-color: var(--line-strong); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.big { font-size: 28px; font-weight: 680; line-height: 1.15; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.big small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.bar { height: 8px; border-radius: 6px; background: var(--track); overflow: hidden; margin: 10px 0 8px; }
.bar > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .7s var(--ease); position: relative; overflow: hidden; min-width: 0; }
.bar[role=progressbar] > span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: shimmer 2.2s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.bar.warn > span { background: linear-gradient(90deg, #f59e0b, #f97316); }
.bar.bad > span { background: linear-gradient(90deg, #ef4444, #e11d48); }
.row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.row + .row { border-top: 1px solid var(--line); }
.row span:last-child { text-align: right; overflow-wrap: anywhere; }
.banner { border-radius: var(--radius); padding: 12px 15px 12px 17px; margin-bottom: 14px; border: 1px solid var(--line); background: var(--panel); position: relative; overflow: hidden; color: var(--text); line-height: 1.55; }
.banner::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone, var(--accent)); }
.banner.warn { --tone: var(--warn); background: color-mix(in srgb, var(--warn) 11%, var(--panel)); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.banner.bad { --tone: var(--bad); background: color-mix(in srgb, var(--bad) 11%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 38%, transparent); }
.banner.ok { --tone: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.banner.info { --tone: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
.banner button { margin: 4px 0 0 4px; }
@keyframes banner-in { from { opacity: 0; transform: translateY(-6px); } }
.stack { display: grid; gap: 14px; }

/* Badges, boutons, formulaires */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 640; background: var(--track); color: var(--muted); white-space: nowrap; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge:empty { display: none; }
.badge.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.badge.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 15%, transparent); }
.badge.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.badge.info { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.badge.info::before { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; transform: scale(.7); } }
button { font: inherit; font-weight: 540; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--field); color: var(--text); padding: 6px 14px; cursor: pointer; transition: transform .16s var(--spring), box-shadow .2s, background .2s, border-color .2s, filter .2s; }
button:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 3px 10px rgba(10, 16, 34, .1); transform: translateY(-1px); }
button:active { transform: translateY(0) scale(.97); box-shadow: none; }
button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; font-weight: 640; box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, .25); }
button.primary:hover { box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, .25); border-color: transparent; filter: brightness(1.07); }
button.danger { color: var(--bad); }
button.danger:hover { border-color: var(--bad); box-shadow: 0 3px 12px color-mix(in srgb, var(--bad) 22%, transparent); }
button.danger-fill, button.primary.danger-fill { background: linear-gradient(135deg, #ef4444, #be123c); border-color: transparent; color: #fff; box-shadow: 0 2px 8px rgba(225, 29, 72, .3); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; box-shadow: none; }
button.link:hover { transform: none; box-shadow: none; text-decoration: underline; }
button.sm { padding: 3px 10px; font-size: 13px; border-radius: 8px; }
button:disabled { opacity: .5; cursor: default; transform: none !important; box-shadow: none !important; filter: none !important; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: block; font-size: 13px; font-weight: 620; margin: 12px 0 4px; }
input, select, textarea { font: inherit; width: 100%; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--field); color: var(--text); transition: border-color .2s, box-shadow .2s, background .2s; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
input[type=checkbox], input[type=radio] { width: auto; margin: 0; accent-color: var(--accent); box-shadow: none; }
input[type=file] { padding: 6px; }
select option { background: var(--bg-solid); color: var(--text); }
.field .hint, .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.form { max-width: 400px; }
dialog .form, .wizard { max-width: none; }
.form button { margin-top: 16px; }
.msg { margin-top: 12px; font-size: 14px; }
.msg:empty { display: none; }
.msg.bad { color: var(--bad); animation: shake .35s; }
.msg.ok { color: var(--ok); }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 12px; margin-top: 8px; font-weight: 400; font-size: 14px; cursor: pointer; background: var(--field); transition: border-color .2s, background .2s, box-shadow .2s; }
.choice:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--field)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.choice:has(input:disabled) { opacity: .55; cursor: default; }
.choice input { margin-top: 4px; }
.choice b { display: block; font-weight: 620; }

/* Tableaux */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.card .table-wrap { border: 0; background: none; border-radius: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 640; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; transition: background .15s; }
tbody tr:hover td { background: var(--hover); }
tr:last-child td { border-bottom: 0; }
td.actions { text-align: right; white-space: nowrap; }
td.actions button { margin-left: 6px; }
td .toolbar { margin: 0; flex-wrap: nowrap; }
tr.click { cursor: pointer; }
tr.click:hover td { background: color-mix(in srgb, var(--accent) 9%, transparent); }
pre.log { background: color-mix(in srgb, var(--bg-solid) 80%, #000); border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; margin: 10px 0 0; max-height: 320px; overflow: auto; white-space: pre-wrap; font: 12.5px/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; }
details > summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 560; padding: 6px 0; user-select: none; }
details > summary:hover { color: var(--text); }

.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 12px; }
label.inline { margin: 0; }
.toolbar select { width: auto; }
textarea.mono { font-size: 12px; }

a.btn { display: inline-block; text-decoration: none; font: inherit; font-weight: 540; border-radius: 10px; border: 1px solid var(--line-strong); padding: 6px 14px; color: var(--text); background: var(--field); transition: transform .16s var(--spring), box-shadow .2s, filter .2s; }
a.btn:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(10, 16, 34, .1); }
a.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; font-weight: 640; }
a.btn.primary:hover { box-shadow: var(--glow); filter: brightness(1.07); }
.app-card { display: flex; flex-direction: column; }
.app-card .card-actions { margin-top: auto; padding-top: 10px; align-items: center; justify-content: space-between; }
pre.log.tall { max-height: 60vh; }

.chart { width: 100%; height: 140px; display: block; }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.chart-area { fill: color-mix(in srgb, var(--accent) 16%, transparent); stroke: none; }
.chart-legend { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

.qr { display: block; width: 220px; height: 220px; margin: 10px auto; background: #fff; padding: 8px; border-radius: 12px; }

/* Assistants, vérifications, attente */
.spinner { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--track); border-top-color: var(--accent); animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.wizard-step { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 12px 0; animation: rise .4s var(--ease) both; }
.wizard-step:nth-child(2) { animation-delay: .06s; }
.wizard-step:nth-child(3) { animation-delay: .12s; }
.wizard-step + .wizard-step { border-top: 1px solid var(--line); }
.wizard-step p { margin: 4px 0 0; }
.wizard-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: var(--glow); }
.wizard-row { display: flex; gap: 8px; margin-top: 8px; }
.wizard-row button { flex: none; }
.check { margin-top: 10px; padding: 10px 13px; border-radius: 11px; background: var(--track); font-size: 14px; line-height: 1.5; }
.check.ok { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.check.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.check.wait { color: var(--muted); }
.check-result:empty { display: none; }
.steps { display: grid; gap: 12px; margin: 14px 0; }
.step { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.step-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--track); color: var(--muted); }
.step.done .step-dot { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.step.now .step-dot { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; animation: halo 1.8s infinite; }
.step.later { opacity: .6; }
.step-title { font-weight: 600; padding-top: 2px; }
@keyframes halo { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Fichiers */
.fs { display: grid; grid-template-columns: 210px 1fr; flex: 1; min-height: 0; }
.fs-side { border-right: 1px solid var(--line); background: var(--win-head); padding: 10px 8px; overflow-y: auto; }
.fs-side-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 640; padding: 8px 8px 4px; }
.fs-share { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; text-align: left; padding: 7px 9px; border-radius: 9px; color: inherit; }
.fs-share span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-share:hover { background: var(--hover); border: 0; box-shadow: none; transform: none; }
.fs-share.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 640; }
.fs-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 12px 16px 0; }
.fs-main.drop { outline: 2px dashed var(--accent); outline-offset: -6px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.fs-main .toolbar { margin-bottom: 10px; }
.fs-search { width: 180px; margin-left: auto; }
.crumbs { margin-bottom: 10px; font-size: 15px; font-weight: 620; overflow-wrap: anywhere; }
.crumbs .link { font-weight: 620; }
.fs-list { flex: 1; overflow: auto; min-height: 0; }
.fs-list .table-wrap { border: 0; background: none; border-radius: 0; overflow: visible; }
.fs-table th { position: sticky; top: 0; background: var(--bg-solid); z-index: 1; }
.fs-table tr.picked td { background: color-mix(in srgb, var(--accent) 12%, transparent); }
td.tight, th.tight { width: 30px; padding-right: 0; }
.fs-name { border: 0; background: none; padding: 0; display: flex; align-items: center; gap: 8px; color: inherit; text-align: left; overflow-wrap: anywhere; font-weight: 500; }
.fs-name:hover { border: 0; box-shadow: none; transform: none; }
.fs-name:hover span { text-decoration: underline; }
.fs-name .icon { color: var(--muted); }
.fs-name .icon.dir { color: #d9a514; fill: color-mix(in srgb, #f5c542 35%, transparent); }
.fs-empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.uploads { flex: none; max-height: 150px; overflow-y: auto; border-top: 1px solid var(--line); }
.uploads:empty { display: none; }
.upload { padding: 8px 0 4px; font-size: 13px; }
.upload .bar { margin: 4px 0; }
.folder-list { border: 1px solid var(--line); border-radius: 11px; max-height: 260px; overflow-y: auto; margin-top: 8px; background: var(--field); }
.folder { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; border-radius: 0; background: none; text-align: left; padding: 7px 10px; }
.folder:hover { background: var(--hover); border: 0; box-shadow: none; transform: none; }
.folder-list p { padding: 8px 10px; margin: 0; }
.preview { max-width: 100%; max-height: 62vh; display: block; margin: 0 auto; border-radius: 10px; }
.editor { min-height: 46vh; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; resize: vertical; }
.shared-name { overflow-wrap: anywhere; margin: 4px 0; }

/* Disques */
.disk { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.disk-icon { width: 46px; height: 46px; border-radius: 13px; background: linear-gradient(150deg, #8493a8, #3a475c); display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .03em; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 8px rgba(0, 0, 0, .18); }
.disk-title { font-weight: 620; overflow-wrap: anywhere; }
.parts { margin-top: 12px; }

/* Connexion */
.login { height: 100vh; height: 100dvh; display: grid; place-items: center; padding: 20px; position: relative; overflow: auto; }
.login .card { width: 100%; max-width: 380px; padding: 30px 30px 28px; box-shadow: var(--win-shadow); background: var(--glass); border: 1px solid var(--glass-line); border-radius: 22px; backdrop-filter: blur(36px) saturate(1.7); -webkit-backdrop-filter: blur(36px) saturate(1.7); position: relative; z-index: 1; animation: win-in .55s var(--spring) both; }
.login button { width: 100%; margin-top: 20px; padding: 10px; font-size: 15px; }
.login input { padding: 10px 12px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 19px; letter-spacing: -.02em; padding: 0 0 8px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(145deg, #5aa2ff, #6d4df2); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(59, 108, 246, .4), inset 0 1px 0 rgba(255, 255, 255, .4); flex: none; }
.brand-mark.sm { width: 22px; height: 22px; border-radius: 7px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.brand-mark i { display: block; width: 17px; height: 5px; border-radius: 2.5px; background: #fff; margin: 2px 0; }
.brand-mark.sm i { width: 11px; height: 3px; margin: 1.5px 0; }

/* Dialogues et messages */
dialog { border: 1px solid var(--glass-line); border-radius: 18px; background: var(--bg); color: var(--text); padding: 24px; max-width: 450px; width: calc(100% - 32px); box-shadow: var(--win-shadow); backdrop-filter: blur(36px) saturate(1.7); -webkit-backdrop-filter: blur(36px) saturate(1.7); }
dialog[open] { animation: dialog-in .3s var(--spring) both; }
dialog.wide { max-width: 640px; }
dialog::backdrop { background: rgba(6, 10, 20, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s ease both; }
dialog h2 { font-size: 17px; margin-bottom: 14px; }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(18px) scale(.94); } }
#toasts { position: fixed; right: 16px; top: 54px; display: grid; gap: 8px; z-index: 200000; max-width: min(400px, calc(100vw - 32px)); }
.toast { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 13px; padding: 11px 15px 11px 40px; box-shadow: 0 14px 40px rgba(10, 16, 34, .25); backdrop-filter: blur(30px) saturate(1.7); -webkit-backdrop-filter: blur(30px) saturate(1.7); position: relative; animation: toast-in .4s var(--spring) both; }
.toast::before { content: ""; position: absolute; left: 14px; top: 15px; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }
.toast.bad::before { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 22%, transparent); }
.toast.info::before { background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.toast.leaving { animation: toast-out .25s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px) scale(.94); } }

@media (max-width: 760px) {
  .win, .win.maximized { left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100% - 74px) !important; border-radius: 0; border: 0; resize: none; min-width: 0; }
  .win:not(.active) { display: none; }
  .only-desktop { display: none !important; }
  .win-body { padding: 14px 12px 20px; }
  .disk { grid-template-columns: auto 1fr; }
  .fs { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .fs-side { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 4px; overflow-x: auto; padding: 6px; }
  .fs-side-title { display: none; }
  .fs-share { width: auto; flex: none; }
  .fs-search { width: 100%; margin-left: 0; }
  .dock-wrap { bottom: 6px; justify-content: flex-start; }
  .dock { border-radius: 18px; padding: 6px 8px; overflow-x: auto; scrollbar-width: none; }
  .dock-item .app-icon { width: 40px; height: 40px; }
  .dock-item::before { display: none; }
  .desk-hello { left: 20px; top: 18px; }
  .top-title { display: none; }
  .tabs { width: auto; }
}

/* Étoile des favoris dans Fichiers */
.fs-star { background: none; border: 0; padding: 2px 4px; font-size: 16px; line-height: 1; cursor: pointer; color: var(--muted); border-radius: 4px; }
.fs-star:hover, .fs-star:focus-visible { color: var(--text); border: 0; box-shadow: none; transform: scale(1.2); }
.fs-star.on { color: #f5b301; }

a.fs-share { text-decoration: none; box-sizing: border-box; }

/* Page autonome (autorisation d'une application de synchronisation) */
body.solo-page { display: grid; place-items: center; min-height: 100vh; margin: 0; padding: 16px; box-sizing: border-box; background: var(--bg-solid); color: var(--text); overflow: auto; }
.solo-card { width: min(440px, 100%); box-sizing: border-box; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--win-shadow); }
.solo-card h1 { font-size: 20px; margin: 0 0 12px; }
.solo-card .field { display: grid; gap: 4px; margin-bottom: 12px; }
.solo-card input { width: 100%; box-sizing: border-box; }

/* Moins de mouvement pour qui le demande au système */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .wall i { animation: none; }
}

/* Machines virtuelles — écran d'une machine */
.win-body.flush > .vm-view { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; }
.vm-console { display: flex; flex-direction: column; flex: 1; min-height: 0; animation: fade .3s ease both; }
.vm-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--win-head); flex: none; flex-wrap: wrap; }
.vm-bar-right { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.vm-stage { flex: 1; min-height: 0; background: radial-gradient(120% 120% at 50% 0%, #131a2c, #05070c); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.vm-screen { max-width: 100%; max-height: 100%; object-fit: contain; outline: none; cursor: crosshair; image-rendering: auto; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 60px rgba(0, 0, 0, .5); transition: box-shadow .25s; }
.vm-screen:focus { box-shadow: 0 0 0 2px var(--accent), 0 20px 60px rgba(0, 0, 0, .5); }
.vm-note { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(14, 18, 30, .86); color: #fff; padding: 12px 18px; border-radius: 12px; text-align: center; max-width: 80%; backdrop-filter: blur(10px); }
.folder.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 620; }

/* Machines virtuelles — tableau de bord */
.vmx button, .vmx-dialog button, .vmx-form button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.vmx button > .icon, .vmx-dialog button > .icon, .vmx-form button > .icon { width: 16px; height: 16px; }
.vmx-main { display: flex; flex-direction: column; gap: 18px; }
.vmx-head { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding: 16px 18px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, var(--panel)), color-mix(in srgb, var(--accent-2) 13%, var(--panel))); box-shadow: var(--shadow); animation: rise .5s var(--ease) both; }
.vmx-stats { display: flex; gap: 12px 24px; flex-wrap: wrap; flex: 1 1 420px; min-width: 0; }
.vmx-stat { display: flex; align-items: center; gap: 11px; min-width: 0; }
.vmx-stat > div { display: grid; line-height: 1.25; }
.vmx-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 660; }
.vmx-stat b { font-size: 19px; font-weight: 680; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.vmx-stat small { font-size: 12.5px; color: var(--muted); }
.vmx-ring { width: 46px; height: 46px; flex: none; transform: rotate(-90deg); }
.vmx-ring circle { fill: none; stroke-width: 5; }
.vmx-ring-track { stroke: var(--track); }
.vmx-ring-arc { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease), stroke .3s; }
.vmx-ring-arc.warn { stroke: #f59e0b; }
.vmx-ring-arc.bad { stroke: #ef4444; }
.vmx-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.vmx-led { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .6; transition: background .3s, box-shadow .3s, opacity .3s; }
.vmx-led.on { background: var(--ok); opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.vmx-alerts:empty { display: none; }
.vmx-alerts .banner { margin: 0; }

/* Cartes des machines */
.vmx-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.vmx-grid:empty { display: none; }
.vmx-card { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s, opacity .25s; animation: vmx-rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.vmx-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(10, 16, 34, .16); border-color: var(--line-strong); }
.vmx-card:has(.vmx-menu) { z-index: 5; }
.vmx-card.is-on { border-color: color-mix(in srgb, var(--ok) 38%, var(--line)); }
.vmx-card.leaving { opacity: 0; transform: scale(.94); pointer-events: none; }
@keyframes vmx-rise { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.vmx-shot { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 17px 17px 0 0; overflow: hidden; background: linear-gradient(160deg, #1c2540, #0a0e1a); color: #fff; flex: none; }
button.vmx-shot { cursor: pointer; }
button.vmx-shot:hover, button.vmx-shot:active { transform: none; box-shadow: none; border: 0; }
.vmx-live { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; opacity: 0; transition: opacity .6s; }
.vmx-live.has-frame { opacity: 1; }
.vmx-shot-idle { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 9px; transition: opacity .4s; }
.vmx-shot-idle small { opacity: .6; font-size: 12px; }
.vmx-live.has-frame + .vmx-shot-idle { opacity: 0; }
.is-off .vmx-shot { background: linear-gradient(160deg, color-mix(in srgb, var(--muted) 34%, var(--bg-solid)), color-mix(in srgb, var(--muted) 14%, var(--bg-solid))); }
.is-off .vmx-shot .app-icon { filter: grayscale(.75); opacity: .75; transition: filter .3s, opacity .3s, transform .3s var(--spring); }
.is-off.vmx-card:hover .vmx-shot .app-icon { filter: none; opacity: 1; transform: scale(1.06); }
.vmx-pill { position: absolute; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 640; color: #fff; background: rgba(10, 14, 26, .62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.vmx-pill.inline { position: static; }
.vmx-pill i { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; flex: none; }
.vmx-pill.running i { background: #4ade80; animation: vmx-pulse 2s infinite; }
.vmx-pill.paused i { background: #fbbf24; }
.vmx-pill.starting i, .vmx-pill.stopping i { background: #60a5fa; animation: blink 1s ease-in-out infinite; }
@keyframes vmx-pulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); } 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.vmx-shot-cta { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 640; background: rgba(8, 12, 24, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s; }
.vmx-shot:hover .vmx-shot-cta, .vmx-shot:focus-visible .vmx-shot-cta { opacity: 1; }
.vmx-shot-cta .icon { transition: transform .3s var(--spring); }
.vmx-shot:hover .vmx-shot-cta .icon { transform: scale(1.2); }
.vmx-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; flex: 1; }
.vmx-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; position: relative; }
.vmx-title h3 { margin: 0; font-size: 16px; font-weight: 660; letter-spacing: -.01em; overflow-wrap: anywhere; }
.vmx-title small { font-size: 12.5px; }
.vmx-specs { display: flex; gap: 6px; flex-wrap: wrap; }
.vmx-spec { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 9px; background: var(--track); font-size: 12.5px; font-weight: 560; font-variant-numeric: tabular-nums; }
.vmx-spec .icon { width: 14px; height: 14px; color: var(--muted); }
.vmx-spec.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.vmx-desk { display: grid; gap: 1px; padding: 9px 6px 6px 12px; border-radius: 13px; background: color-mix(in srgb, var(--accent) 7%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); animation: rise .4s var(--ease) both; }
.vmx-desk.wait { display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-size: 13px; color: var(--muted); }
.vmx-desk-head { display: flex; align-items: center; gap: 7px; margin-bottom: 2px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 720; color: var(--accent); }
.vmx-desk-head .icon { width: 14px; height: 14px; }
.vmx-desk-line { display: flex; align-items: center; gap: 2px; min-height: 30px; }
.vmx-desk-line small { flex: none; width: 92px; color: var(--muted); font-size: 12.5px; }
.vmx-desk-value { flex: 1; min-width: 0; font-size: 15px; font-weight: 660; letter-spacing: .05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: all; }
button.vmx-icon-btn.done { color: var(--ok); }
button.vmx-icon-btn { width: 30px; height: 30px; padding: 0; border: 0; background: none; border-radius: 9px; color: var(--muted); flex: none; }
button.vmx-icon-btn:hover { background: var(--hover); color: var(--text); border: 0; box-shadow: none; transform: none; }
button.vmx-icon-btn:active { transform: scale(.9); }
.vmx-more .icon { stroke-width: 3.2; }
.vmx-hint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 11px; border-radius: 12px; font-size: 13px; background: color-mix(in srgb, var(--warn) 12%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 32%, transparent); animation: rise .4s var(--ease) both; }
.vmx-hint span { flex: 1; min-width: 160px; }
.vmx-actions { display: flex; gap: 8px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.vmx-actions .primary { flex: 1; }
.vmx-menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 230px; padding: 6px; display: grid; background: var(--bg-solid); border: 1px solid var(--line-strong); border-radius: 13px; box-shadow: var(--win-shadow); z-index: 10; animation: menu-in .2s var(--spring) both; transform-origin: 100% 0; }
.vmx-menu button { border: 0; background: none; justify-content: flex-start; padding: 8px 10px; border-radius: 9px; text-align: left; }
.vmx-menu button:hover { background: var(--hover); transform: none; box-shadow: none; border: 0; }

/* Téléchargements, accueil, attente */
.vmx-downloads { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 12px 16px 6px; animation: rise .4s var(--ease) both; }
.vmx-downloads h4, .vmx-recap h4 { margin: 0 0 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 660; }
.vmx-dl { display: flex; gap: 12px; padding: 9px 0; align-items: flex-start; }
.vmx-dl + .vmx-dl { border-top: 1px solid var(--line); }
.vmx-dl-main { flex: 1; min-width: 0; }
.vmx-dl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vmx-dl-head button { margin-left: auto; }
.vmx-dl .bar { margin: 7px 0 4px; }
.vmx-dl .msg { margin: 0; }
.vmx-empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 30px 20px 16px; animation: rise .6s var(--ease) both; }
.vmx-empty h2 { font-size: 22px; letter-spacing: -.02em; margin: 14px 0 2px; }
.vmx-empty > p { max-width: 520px; }
.vmx-art { position: relative; width: 124px; height: 124px; display: grid; place-items: center; }
.vmx-art .app-icon { width: 76px; height: 76px; border-radius: 22px; z-index: 1; animation: vmx-float 5s ease-in-out infinite; }
.vmx-art .app-icon .icon { width: 40px; height: 40px; }
.vmx-art i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--accent-2) 50%, transparent); opacity: 0; animation: vmx-wave 3.6s ease-out infinite; }
.vmx-art i:nth-of-type(2) { animation-delay: 1.2s; }
.vmx-art i:nth-of-type(3) { animation-delay: 2.4s; }
@keyframes vmx-wave { 0% { transform: scale(.55); opacity: .85; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes vmx-float { 50% { transform: translateY(-6px); } }
.vmx-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; width: min(780px, 100%); margin-top: 18px; }
button.vmx-choice { display: grid; gap: 4px; justify-items: start; justify-content: stretch; text-align: left; padding: 15px 16px; border-radius: 16px; animation: vmx-rise .5s var(--ease) both; }
.vmx-choice:nth-child(2) { animation-delay: .08s; }
.vmx-choice:nth-child(3) { animation-delay: .16s; }
button.vmx-choice > .icon { width: 22px; height: 22px; color: var(--accent); margin-bottom: 4px; transition: transform .3s var(--spring); }
.vmx-choice:hover > .icon { transform: scale(1.18) rotate(-6deg); }
.vmx-choice b { font-weight: 640; }
.vmx-choice small { color: var(--muted); font-size: 12.5px; line-height: 1.4; font-weight: 400; }
button.vmx-big { padding: 10px 20px; font-size: 15px; margin: 12px 0 4px; }
button.busy::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite; }
.vmx-skel { border-radius: 18px; background: linear-gradient(100deg, var(--track) 40%, color-mix(in srgb, var(--track) 35%, transparent) 50%, var(--track) 60%) 0 0 / 200% 100%; animation: vmx-skel 1.4s linear infinite; }
.vmx-skel.head { height: 80px; }
.vmx-skel.card { height: 300px; }
@keyframes vmx-skel { to { background-position: -200% 0; } }
.vmx-blank { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 26px 18px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 14px; }
.vmx-blank .icon { width: 26px; height: 26px; opacity: .7; }

/* Assistant */
dialog.vmx-dialog { max-width: 920px; width: calc(100% - 32px); padding: 0; overflow: hidden; }
.vmx-wiz { display: flex; flex-direction: column; height: min(88vh, 720px); }
.vmx-wiz-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 4px 24px; }
dialog .vmx-wiz-head h2 { margin: 0; font-size: 17px; }
.vmx-wiz-rail { list-style: none; display: flex; justify-content: space-between; margin: 10px 24px 0; padding: 0; position: relative; }
.vmx-wiz-rail::before, .vmx-wiz-rail::after { content: ""; position: absolute; left: 14px; right: 14px; top: 13px; height: 3px; border-radius: 3px; background: var(--track); }
.vmx-wiz-rail::after { background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); transition: transform .5s var(--ease); }
button.vmx-wiz-dot { position: relative; z-index: 1; display: grid; justify-items: center; gap: 5px; border: 0; background: none; padding: 0; color: var(--muted); font-size: 12.5px; font-weight: 600; border-radius: 8px; }
button.vmx-wiz-dot:hover { transform: none; box-shadow: none; border: 0; }
button.vmx-wiz-dot:disabled { opacity: 1; }
.vmx-wiz-rail li:first-child .vmx-wiz-dot { justify-items: start; }
.vmx-wiz-rail li:last-child .vmx-wiz-dot { justify-items: end; }
.vmx-wiz-dot i { font-style: normal; width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-solid); border: 2px solid var(--line-strong); font-weight: 700; font-size: 13px; transition: background .3s, border-color .3s, color .3s, transform .3s var(--spring); }
.vmx-wiz-rail li.done .vmx-wiz-dot { cursor: pointer; }
.vmx-wiz-rail li.done .vmx-wiz-dot i { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.vmx-wiz-rail li.now .vmx-wiz-dot { color: var(--text); }
.vmx-wiz-rail li.now .vmx-wiz-dot i { border-color: var(--accent); color: var(--accent); transform: scale(1.1); animation: halo 1.8s infinite; }
.vmx-wiz-body { padding: 14px 24px 16px; overflow-y: auto; flex: 1; min-height: 0; }
dialog h3.vmx-wiz-title { font-size: 20px; margin: 8px 0 2px; letter-spacing: -.02em; font-weight: 680; }
.vmx-wiz-lead { margin-bottom: 14px; }
.vmx-wiz-pane.from-right { animation: vmx-from-right .38s var(--ease) both; }
.vmx-wiz-pane.from-left { animation: vmx-from-left .38s var(--ease) both; }
@keyframes vmx-from-right { from { opacity: 0; transform: translateX(28px); } }
@keyframes vmx-from-left { from { opacity: 0; transform: translateX(-28px); } }
.vmx-wiz-foot { display: flex; align-items: center; gap: 12px; padding: 13px 24px 16px; border-top: 1px solid var(--line); background: var(--win-head); }
.vmx-wiz-foot .msg { margin: 0; flex: 1; }
.vmx-wiz-actions { margin-left: auto; display: flex; gap: 8px; flex: none; }
.vmx-fade { animation: rise .32s var(--ease) both; }
.vmx-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 14px; }
button.vmx-source { display: grid; justify-items: start; justify-content: stretch; gap: 1px; text-align: left; padding: 10px 12px; border-radius: 13px; }
button.vmx-source > .icon { width: 20px; height: 20px; color: var(--muted); margin-bottom: 4px; transition: color .2s, transform .3s var(--spring); }
.vmx-source b { font-weight: 640; font-size: 13.5px; }
.vmx-source small { font-size: 11.5px; color: var(--muted); line-height: 1.3; font-weight: 400; }
.vmx-source.on, .vmx-distro.on, .vmx-preset.on, button.vmx-iso.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--field)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
button.vmx-source.on > .icon { color: var(--accent); transform: scale(1.15); }
.vmx-search { position: relative; }
.vmx-search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 17px; height: 17px; pointer-events: none; }
.vmx-search input { padding-left: 36px; }
.vmx-chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 8px; scrollbar-width: none; }
button.vmx-chip { flex: none; padding: 3px 12px; border-radius: 999px; font-size: 12.5px; }
button.vmx-chip.on { background: var(--text); color: var(--bg-solid); border-color: transparent; }
.vmx-distros { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; max-height: 244px; overflow-y: auto; padding: 4px; margin: 0 -4px; }
button.vmx-distro { justify-content: flex-start; gap: 10px; text-align: left; padding: 8px 10px; min-width: 0; border-radius: 13px; animation: vmx-rise .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms); }
.vmx-distro > span:last-child { min-width: 0; display: grid; }
.vmx-distro b { font-size: 13.5px; font-weight: 640; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmx-distro small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; }
.vmx-avatar { width: 34px; height: 34px; border-radius: 11px; color: #fff; font-weight: 720; font-size: 16px; display: grid; place-items: center; flex: none; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 2px 6px rgba(0, 0, 0, .15); }
.vmx-avatar.big { width: 52px; height: 52px; border-radius: 15px; font-size: 24px; }
.vmx-distro-detail { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 14px; border-radius: 15px; background: var(--panel); border: 1px solid var(--line); animation: rise .35s var(--ease) both; }
.vmx-distro-detail:empty { display: none; }
.vmx-distro-name { font-size: 16px; font-weight: 660; display: block; margin-bottom: 3px; }
.vmx-distro-detail p { margin: 0; }
.vmx-found { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.vmx-found:empty { display: none; }
.vmx-found.ok { color: var(--ok); font-weight: 560; }
.vmx-found.bad { color: var(--bad); }
.vmx-found .icon { width: 16px; height: 16px; }
.vmx-isos { display: grid; gap: 6px; max-height: 250px; overflow-y: auto; padding: 4px; margin: 0 -4px; }
.vmx-iso { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 12px; text-align: left; min-width: 0; border: 1px solid var(--line); background: var(--field); }
button.vmx-iso { justify-content: flex-start; width: 100%; border-color: var(--line-strong); }
.vmx-iso-name { display: grid; min-width: 0; flex: 1; }
.vmx-iso-name b { font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmx-iso-name small { color: var(--muted); font-size: 12px; font-weight: 400; }
.vmx-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.vmx-row .vmx-found { margin: 0; }
label.vmx-drop { display: grid; justify-items: center; gap: 6px; margin: 0; padding: 30px 16px; border: 2px dashed var(--line-strong); border-radius: 16px; text-align: center; cursor: pointer; font-weight: 400; font-size: 14px; transition: border-color .2s, background .2s, transform .25s var(--spring); position: relative; }
.vmx-drop:hover, .vmx-drop.over, .vmx-drop:focus-within { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.vmx-drop.over { transform: scale(1.015); }
.vmx-drop.has { border-style: solid; border-color: var(--accent); }
.vmx-drop > .icon { width: 30px; height: 30px; color: var(--accent); }
.vmx-drop span { display: grid; gap: 2px; }
.vmx-drop b { font-weight: 640; overflow-wrap: anywhere; }
.vmx-drop small { color: var(--muted); }
.vmx-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; padding: 0; }
.vmx-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 18px; }
button.vmx-preset { display: grid; gap: 1px; justify-items: start; justify-content: stretch; text-align: left; padding: 12px 14px; border-radius: 14px; }
.vmx-preset b { font-weight: 660; font-size: 14.5px; }
.vmx-preset small { color: var(--muted); font-size: 12px; font-weight: 400; }
.vmx-preset em { font-style: normal; font-size: 12px; color: var(--accent); font-weight: 640; font-variant-numeric: tabular-nums; margin-top: 5px; }
.vmx-sliders { display: grid; gap: 16px; }
.vmx-slider-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.vmx-slider-head label { margin: 0; }
.vmx-slider output { font-weight: 680; font-size: 15px; font-variant-numeric: tabular-nums; }
input.vmx-range { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; padding: 0; margin: 2px 0 0; border: 0; background: none; box-shadow: none; cursor: pointer; }
input.vmx-range:focus { box-shadow: none; }
input.vmx-range:disabled { opacity: .5; cursor: default; }
.vmx-range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)) 0 0 / var(--fill, 0%) 100% no-repeat, var(--track); }
.vmx-range::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)) 0 0 / var(--fill, 0%) 100% no-repeat, var(--track); }
.vmx-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 0; margin-top: -7px; box-shadow: 0 1px 4px rgba(10, 16, 34, .35), 0 0 0 1px rgba(10, 16, 34, .08); transition: transform .15s var(--spring), box-shadow .2s; }
.vmx-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(10, 16, 34, .35), 0 0 0 1px rgba(10, 16, 34, .08); }
.vmx-range:hover::-webkit-slider-thumb { box-shadow: 0 1px 4px rgba(10, 16, 34, .35), 0 0 0 6px color-mix(in srgb, var(--accent) 18%, transparent); }
.vmx-range:active::-webkit-slider-thumb { transform: scale(1.15); }
.vmx-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--accent); }
.vmx-budget { margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); transition: border-color .3s, background .3s; }
.vmx-budget b { font-size: 13px; font-weight: 640; }
.vmx-budget-bar { display: flex; height: 10px; border-radius: 6px; background: var(--track); overflow: hidden; margin: 8px 0 7px; }
.vmx-budget-bar span { height: 100%; transition: width .4s var(--ease), background .3s; }
.vmx-budget-bar span:first-child { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.vmx-budget-bar span:last-child { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.vmx-budget.over { border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: color-mix(in srgb, var(--bad) 8%, var(--panel)); }
.vmx-budget.over .vmx-budget-bar span:last-child { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.vmx-budget.over .small { color: var(--bad); }
.vmx-final { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.vmx-final label:first-child, .vmx-final .field:first-child label { margin-top: 0; }
label.vmx-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; margin: 8px 0 0; border: 1px solid var(--line); border-radius: 12px; font-weight: 400; font-size: 14px; cursor: pointer; background: var(--field); transition: border-color .2s, background .2s; }
.vmx-toggle:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.vmx-toggle:has(input:disabled) { opacity: .6; cursor: default; }
.vmx-toggle b { display: block; font-weight: 620; }
.vmx-toggle small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
input.vmx-switch { -webkit-appearance: none; appearance: none; width: 40px; height: 24px; flex: none; border-radius: 999px; background: var(--line-strong); border: 0; padding: 0; position: relative; cursor: pointer; transition: background .25s; }
input.vmx-switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .28s var(--spring); }
input.vmx-switch:checked { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
input.vmx-switch:checked::after { transform: translateX(16px); }
input.vmx-switch:focus { box-shadow: none; }
input.vmx-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vmx-recap { border-radius: 16px; padding: 15px 16px 12px; border: 1px solid var(--line); background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 12%, var(--panel)), color-mix(in srgb, var(--accent-2) 12%, var(--panel))); animation: rise .45s var(--ease) both; }
.vmx-recap-note { margin: 10px 0 0; }
.vmx-upload { margin-top: 12px; }

/* Réglages d'une machine */
.vmx-form .tabs { margin: 0 0 16px; }
.vmx-form .tab-pane { min-height: 230px; }
.vmx-ports { display: grid; gap: 6px; margin-bottom: 10px; }
.vmx-port { display: grid; grid-template-columns: 1fr 18px 1fr 92px 30px; gap: 8px; align-items: center; animation: rise .25s var(--ease) both; }
.vmx-port > .icon { width: 16px; height: 16px; color: var(--muted); }
.vmx-port-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 660; margin-bottom: 4px; animation: none; }
.vmx-ports:empty::before { content: "Aucune redirection : la machine n’est joignable que par son écran."; color: var(--muted); font-size: 13px; }

@media (max-width: 760px) {
  .vmx-final { grid-template-columns: 1fr; }
  .vmx-wiz-dot span { display: none; }
  .vmx-wiz-body, .vmx-wiz-foot { padding-left: 16px; padding-right: 16px; }
  .vmx-head-actions { width: 100%; }
  .vmx-head-actions .primary { flex: 1; }
}

/* Fichiers : disques externes */
.fs-ext { display: flex; align-items: center; gap: 2px; }
.fs-ext .fs-share { min-width: 0; flex: 1; }
.fs-eject { flex: none; border: 0; background: none; padding: 4px 7px; border-radius: 8px; color: var(--muted); font-size: 15px; line-height: 1; }
.fs-eject:hover { background: var(--hover); color: var(--text); border: 0; box-shadow: none; transform: none; }

/* Médiathèque */
.mdx { display: flex; flex-direction: column; gap: 16px; }
.mdx-hero { display: flex; align-items: center; gap: 16px 22px; flex-wrap: wrap; padding: 18px 20px; border-radius: 20px; color: #fff; background: linear-gradient(120deg, #4c1d95, #6d28d9 45%, #2563eb); box-shadow: 0 14px 34px rgba(76, 29, 149, .3); position: relative; overflow: hidden; animation: rise .5s var(--ease) both; }
.mdx-hero::before { content: ""; position: absolute; right: -8%; top: -70%; width: 55%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .24), transparent); animation: mdx-glow 9s ease-in-out infinite alternate; pointer-events: none; }
@keyframes mdx-glow { to { transform: translate(-35%, 30%) scale(1.25); } }
.mdx-hero > * { position: relative; }
.mdx-hero-icon { width: 54px; height: 54px; border-radius: 16px; background: rgba(255, 255, 255, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.mdx-hero-id { display: grid; gap: 2px; min-width: 0; }
.mdx-hero-id h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; font-weight: 700; }
.mdx-hero-sub { display: flex; align-items: center; gap: 8px; font-size: 12.5px; opacity: .92; }
.mdx-hero .vmx-led { background: rgba(255, 255, 255, .5); }
.mdx-hero .vmx-led.on { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .3); }
.mdx-stats { display: flex; gap: 10px 28px; flex-wrap: wrap; flex: 1 1 380px; justify-content: center; }
.mdx-stat { display: grid; line-height: 1.2; }
.mdx-stat .vmx-stat-label { color: rgba(255, 255, 255, .72); }
.mdx-stat b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.mdx-stat small { font-size: 12px; opacity: .82; }
.mdx-hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mdx-hero button.primary { background: #fff; color: #4c1d95; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.mdx-hero button.primary:hover { filter: none; box-shadow: 0 10px 26px rgba(0, 0, 0, .3); }
.mdx-now-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 12.5px; font-weight: 620; animation: pop .35s var(--spring); }
.mdx-eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.mdx-eq i { width: 3px; height: 35%; border-radius: 2px; background: currentColor; animation: mdx-eq .9s ease-in-out infinite alternate; }
.mdx-eq i:nth-child(2) { animation-delay: -.3s; }
.mdx-eq i:nth-child(3) { animation-delay: -.6s; }
.mdx-eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes mdx-eq { to { height: 100%; } }
.mdx-stream .mdx-eq { color: var(--accent); }
.mdx-tabs .tabs { margin: 0 0 16px; }
.mdx-pane { display: flex; flex-direction: column; gap: 16px; }
.mdx-pane > * { animation: rise .4s var(--ease) both; }
.mdx-pane > *:nth-child(2) { animation-delay: .05s; }
.mdx-pane > *:nth-child(3) { animation-delay: .1s; }
.mdx-pane > *:nth-child(4) { animation-delay: .15s; }
.mdx-pane > .banner { margin: 0; }
.mdx-section { display: grid; gap: 8px; }
.mdx-section h4 { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 660; }
.mdx-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.mdx-bar p { margin: 0; flex: 1; min-width: 240px; }
.mdx-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.mdx-grid.users { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.mdx-card { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; min-width: 0; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .3s var(--ease), box-shadow .3s, border-color .3s, opacity .25s; animation: vmx-rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.mdx-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(10, 16, 34, .16); border-color: var(--line-strong); }
.mdx-card:has(.vmx-menu) { z-index: 5; }
.mdx-card.leaving { opacity: 0; transform: scale(.94); pointer-events: none; }
.mdx-card.scanning { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.mdx-card.scanning .vmx-actions .icon { animation: spin 1.2s linear infinite; }
.mdx-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mdx-card-head > div { flex: 1; min-width: 0; display: grid; }
.mdx-card-head h3 { margin: 0; font-size: 16px; font-weight: 660; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdx-card-head small { font-size: 12.5px; }
.mdx-card-head .app-icon { width: 44px; height: 44px; border-radius: 13px; transition: transform .3s var(--spring); }
.mdx-card-head .app-icon .icon { width: 24px; height: 24px; }
.mdx-card:hover .mdx-card-head .app-icon { transform: scale(1.08) rotate(-4deg); }
.mdx-more-slot { position: relative; flex: none; }
.mdx-card .bar { margin: 0; }
.mdx-card .vmx-actions { margin-top: auto; }
.mdx-paths { display: grid; gap: 5px; }
.mdx-path { display: flex; align-items: center; gap: 8px; padding: 5px 9px; border-radius: 9px; background: var(--track); font: 12.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; min-width: 0; }
.mdx-path > .icon { width: 14px; height: 14px; color: var(--muted); }
.mdx-path span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdx-path b { font-family: "Segoe UI Variable Text", "Inter", system-ui, sans-serif; font-weight: 620; flex: none; }
.mdx-path.big { margin: 10px 0 2px; padding: 8px 11px; font-size: 13px; }
.mdx-path button.vmx-icon-btn { width: 22px; height: 22px; }
.mdx-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 22px; }
.mdx-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
button.mdx-add { display: grid; place-content: center; justify-items: center; gap: 4px; min-height: 150px; padding: 16px; border: 2px dashed var(--line-strong); background: none; border-radius: 18px; color: var(--muted); }
button.mdx-add:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); transform: none; box-shadow: none; }
button.mdx-add > .icon { width: 26px; height: 26px; transition: transform .35s var(--spring); }
.mdx-add:hover > .icon { transform: rotate(90deg) scale(1.15); }
.mdx-add b { color: var(--text); font-weight: 640; }
.mdx-add small { font-size: 12px; font-weight: 400; }
.mdx-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; flex: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 8px rgba(0, 0, 0, .15); text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.mdx-avatar.sm { width: 32px; height: 32px; font-size: 14px; }
.mdx-list { display: grid; gap: 8px; }
.mdx-stream { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.mdx-stream-main { flex: 1; min-width: 0; display: grid; }
.mdx-stream-main b { font-weight: 640; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdx-todo { display: grid; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.mdx-todo-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mdx-todo .step-dot .icon { width: 14px; height: 14px; stroke-width: 2.6; }
.mdx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
button.mdx-tile { justify-content: flex-start; gap: 12px; padding: 10px 12px; border-radius: 14px; text-align: left; min-width: 0; animation: vmx-rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.mdx-tile .app-icon { width: 38px; height: 38px; border-radius: 12px; transition: transform .3s var(--spring); }
.mdx-tile .app-icon .icon { width: 21px; height: 21px; }
.mdx-tile:hover .app-icon { transform: scale(1.1) rotate(-5deg); }
.mdx-tile > span:last-child { display: grid; min-width: 0; }
.mdx-tile b { font-weight: 640; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdx-tile small { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.mdx-errors { border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; background: var(--panel); }
.mdx-errors summary { display: flex; align-items: center; gap: 8px; }
.mdx-errors summary .icon { width: 16px; height: 16px; color: var(--warn); }
.mdx-error { font: 12.5px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 7px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; color: var(--muted); }
.mdx-panels { display: grid; gap: 14px; }
.mdx-panel { padding: 16px 18px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mdx-panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.mdx-panel-head h3 { margin: 0; font-size: 15px; font-weight: 660; }
.mdx-panel-head > div { display: grid; }
.mdx-panel-head .app-icon.small { width: 32px; height: 32px; border-radius: 10px; }
.mdx-panel-head .app-icon.small .icon { width: 18px; height: 18px; }
.mdx-panel .check { margin-top: 8px; }
.mdx-panel .vmx-actions { margin-top: 12px; }
.mdx-panel .vmx-actions .primary { flex: none; }
.mdx-kinds { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.vmx-form button.folder, .vmx button.folder { justify-content: flex-start; }
.vmx-form .vmx-blank { padding: 16px 14px; }
.mdx-facts { margin-top: 12px; align-items: center; }
.mdx-save { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 14px; background: var(--bg-solid); border: 1px solid var(--line-strong); box-shadow: 0 12px 30px rgba(10, 16, 34, .25); animation: mdx-up .35s var(--spring) both; }
.mdx-save span { flex: 1; font-weight: 600; }
@keyframes mdx-up { from { opacity: 0; transform: translateY(20px); } }
.mdx-consoles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.mdx-console { display: grid; gap: 6px; padding: 12px 14px; min-width: 0; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; animation: vmx-rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms); }
.mdx-console:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(10, 16, 34, .12); border-color: var(--line-strong); }
.mdx-console.off { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.mdx-console-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mdx-console-head b { font-weight: 640; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mdx-console > small.mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.mdx-problem { color: var(--bad); font-size: 12.5px; }
.mdx-console-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mdx-console-foot small { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.mdx-console-foot small .icon { width: 13px; height: 13px; }
.mdx-picks { margin: 8px 0 0 14px; padding-left: 12px; border-left: 2px solid var(--line); }
@media (max-width: 760px) {
  .mdx-stats { justify-content: flex-start; }
  .mdx-hero-actions { width: 100%; }
  .mdx-hero-actions .primary { flex: 1; }
}

/* ============================================================================================
   Socle commun de la refonte (3 décembre 2026) : écrans vides, attente, entrées en cascade,
   interrupteurs, mise en page selon la largeur de la FENÊTRE (et non de l'écran).
   ============================================================================================ */

/* Chaque fenêtre mesure sa propre largeur : une fenêtre étroite sur un grand écran se range comme sur un téléphone. */
.win-body { container: win / inline-size; }

/* Écran vide ou d'accueil */
.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 34px 20px 26px; margin: auto; max-width: 560px; animation: rise .55s var(--ease) both; }
.empty h2 { font-size: 20px; letter-spacing: -.02em; margin: 14px 0 0; font-weight: 680; }
.empty > p { margin: 0; line-height: 1.55; }
.empty-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.empty-art { position: relative; width: 104px; height: 104px; display: grid; place-items: center; }
.empty-art .app-icon { width: 64px; height: 64px; border-radius: 19px; z-index: 1; animation: vmx-float 5s ease-in-out infinite; }
.empty-art .app-icon .icon { width: 33px; height: 33px; }
.empty-art i { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent); opacity: 0; animation: vmx-wave 3.6s ease-out infinite; }
.empty-art i:nth-of-type(2) { animation-delay: 1.8s; }
.empty.compact { padding: 18px 12px 14px; }
.empty.compact .empty-art { width: 64px; height: 64px; }
.empty.compact .empty-art .app-icon { width: 44px; height: 44px; border-radius: 13px; animation: none; }
.empty.compact .empty-art .app-icon .icon { width: 23px; height: 23px; }
.empty.compact .empty-art i { display: none; }
.empty.compact h2 { font-size: 15.5px; margin-top: 6px; }
.card > .empty { padding-top: 10px; }
/* Dans une fenêtre sans marge, l'écran vide se centre de lui-même */
.win-body > .empty:only-child { min-height: 100%; align-content: center; }

/* Trame d'attente */
.skel-wrap { display: grid; gap: 14px; animation: fade .3s ease .12s both; }
.skel { border-radius: 14px; background: linear-gradient(100deg, var(--track) 40%, color-mix(in srgb, var(--track) 35%, transparent) 50%, var(--track) 60%) 0 0 / 200% 100%; animation: vmx-skel 1.4s linear infinite; }
.skel.line { height: 16px; border-radius: 8px; }
.skel.w30 { width: 30%; }
.skel.w40 { width: 40%; }
.skel.row { height: 46px; }
.skel.card { height: 112px; }
.skel-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.win-body > .skel-wrap { padding-top: 4px; }
.win-body.flush > .skel-wrap { padding: 20px 22px; }

/* Entrée en cascade : seulement à l'apparition d'un écran, jamais lors d'un rafraîchissement. */
.entering .card, .entering .table-wrap, .entering .toolbar, .entering > .banner, .entering .stack > .banner, .entering .head, .entering > p { animation: rise .42s var(--ease) both; }
.entering .stack > :nth-child(2), .entering .grid > :nth-child(2) { animation-delay: .05s; }
.entering .stack > :nth-child(3), .entering .grid > :nth-child(3) { animation-delay: .1s; }
.entering .stack > :nth-child(4), .entering .grid > :nth-child(4) { animation-delay: .15s; }
.entering .stack > :nth-child(5), .entering .grid > :nth-child(5) { animation-delay: .2s; }
.entering .stack > :nth-child(n+6), .entering .grid > :nth-child(n+6) { animation-delay: .25s; }
.entering tbody tr { animation: row-in .36s var(--ease) both; }
.entering tbody tr:nth-child(2) { animation-delay: .03s; }
.entering tbody tr:nth-child(3) { animation-delay: .06s; }
.entering tbody tr:nth-child(4) { animation-delay: .09s; }
.entering tbody tr:nth-child(5) { animation-delay: .12s; }
.entering tbody tr:nth-child(6) { animation-delay: .15s; }
.entering tbody tr:nth-child(n+7) { animation-delay: .18s; }
@keyframes row-in { from { opacity: 0; transform: translateX(-8px); } }
/* Une jauge se remplit en arrivant */
.entering .bar > span { animation: bar-in .9s var(--ease) both; transform-origin: 0 50%; }
@keyframes bar-in { from { transform: scaleX(0); } }

/* Interrupteurs : une case à cocher « marche / arrêt » se présente comme telle, à droite de son libellé. */
label.choice:has(> input[type=checkbox]) { flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 14px; line-height: 1.4; }
label.choice:has(> input[type=checkbox]) > span { flex: 1; min-width: 0; color: var(--muted); font-size: 13px; }
label.choice:has(> input[type=checkbox]) > span b { color: var(--text); font-size: 14px; }
.choice > input[type=checkbox] { -webkit-appearance: none; appearance: none; width: 40px; height: 24px; flex: none; margin: 0; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .25s; }
.choice > input[type=checkbox]::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .28s var(--spring), width .2s; }
.choice > input[type=checkbox]:checked { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.choice > input[type=checkbox]:checked::after { transform: translateX(16px); }
.choice > input[type=checkbox]:active::after { width: 22px; }
.choice > input[type=checkbox]:checked:active::after { transform: translateX(12px); }
.choice > input[type=checkbox]:focus { box-shadow: none; }
.choice > input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label.choice:has(> input[type=checkbox]:checked) { box-shadow: none; background: color-mix(in srgb, var(--accent) 6%, var(--field)); border-color: color-mix(in srgb, var(--accent) 40%, var(--line-strong)); }
/* Interrupteur seul, dans une ligne de tableau */
input.switch { -webkit-appearance: none; appearance: none; width: 36px; height: 22px; flex: none; margin: 0; padding: 0; border: 0; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .25s; vertical-align: middle; }
input.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .28s var(--spring); }
input.switch:checked { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
input.switch:checked::after { transform: translateX(14px); }
input.switch:focus { box-shadow: none; }

/* Boutons avec pictogramme */
button.with-icon, a.btn.with-icon { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
button.with-icon > .icon, a.btn.with-icon > .icon { width: 16px; height: 16px; }
/* Titre de section, au-dessus d'une liste ou d'un groupe de cartes */
.section-title { display: flex; align-items: center; gap: 8px; margin: 4px 0 -4px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 660; }
.section-title .icon { width: 14px; height: 14px; }

/* Fenêtre étroite : les mises en page se replient, quel que soit l'écran */
@container win (max-width: 620px) {
  .grid3 { grid-template-columns: 1fr; }
  .disk { grid-template-columns: auto 1fr; }
  .head { align-items: flex-start; }
  .fs { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .fs-side { border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 4px; overflow-x: auto; padding: 6px; }
  .fs-side-title { display: none; }
  .fs-share { width: auto; flex: none; }
  .fs-search { width: 100%; margin-left: 0; }
  .form { max-width: none; }
}
/* Tableaux : sous 560 px de fenêtre, chaque ligne devient une fiche, libellés à gauche */
@container win (max-width: 560px) {
  table.dt thead { display: none; }
  table.dt, table.dt tbody { display: block; }
  table.dt tr { display: grid; gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.dt tr:last-child { border-bottom: 0; }
  table.dt td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 3px 0; border: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
  table.dt td::before { content: attr(data-label); flex: none; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 640; text-align: left; }
  table.dt td:first-child { text-align: left; font-size: 15px; }
  table.dt td:first-child::before, table.dt td.actions::before, table.dt td:empty { display: none; }
  table.dt td.actions { justify-content: flex-start; flex-wrap: wrap; gap: 6px; white-space: normal; padding-top: 8px; }
  table.dt td.actions button { margin: 0; }
  table.dt tbody tr:hover td { background: none; }
}

/* ============================================================================================
   Panneau de configuration : rubriques en colonne, contenu à droite
   ============================================================================================ */
.cp { flex: 1; min-height: 0; display: grid; grid-template-columns: 264px minmax(0, 1fr); }
.cp-side { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 14px 10px 18px; background: var(--win-head); border-right: 1px solid var(--line); }
.cp-search { position: relative; flex: none; margin: 0 4px 8px; }
.cp-search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.cp-search input { padding: 7px 10px 7px 34px; border-radius: 10px; background: var(--field); }
.cp-group { display: grid; gap: 2px; }
.cp-group h4 { margin: 14px 10px 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 660; }
.cp-item { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; padding: 7px 10px; border: 0; border-radius: 10px; background: none; color: var(--text); text-align: left; transition: background .18s, transform .16s var(--spring); }
.cp-item:hover { background: var(--hover); border: 0; box-shadow: none; transform: none; }
.cp-item:active { transform: scale(.98); }
.cp-item .app-icon.small { width: 28px; height: 28px; border-radius: 9px; box-shadow: 0 2px 5px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .3); transition: transform .25s var(--spring); }
.cp-item .app-icon.small .icon { width: 16px; height: 16px; }
.cp-item:hover .app-icon.small { transform: scale(1.08) rotate(-4deg); }
.cp-item-text { display: grid; min-width: 0; flex: 1; }
.cp-item-text b { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-item-text small { display: none; color: var(--muted); font-size: 12.5px; line-height: 1.35; font-weight: 400; }
.cp-chevron { display: none; width: 16px; height: 16px; color: var(--muted); }
.cp-item.on { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.cp-item.on .cp-item-text b { font-weight: 660; color: var(--accent); }
.cp-item.on::before { content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: linear-gradient(180deg, var(--accent), var(--accent-2)); animation: cp-mark .3s var(--spring) both; }
@keyframes cp-mark { from { transform: scaleY(0); } }
.cp-none { padding: 14px 12px; }
.cp-main { min-width: 0; min-height: 0; overflow-y: auto; padding: 20px 24px 28px; }
.cp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.cp-head .app-icon { width: 44px; height: 44px; border-radius: 13px; }
.cp-head .app-icon .icon { width: 24px; height: 24px; }
.cp-head h1 { font-size: 20px; }
.cp-head p { margin: 2px 0 0; }
.cp-main.entering .cp-head { animation: rise .35s var(--ease) both; }
.cp-main.entering .cp-head .app-icon { animation: pop .4s var(--spring) both; }
.cp-back { display: none; align-items: center; gap: 4px; margin: -4px 0 12px -8px; padding: 5px 12px 5px 6px; border: 0; background: none; color: var(--accent); font-weight: 600; border-radius: 9px; }
.cp-back:hover { background: var(--hover); border: 0; box-shadow: none; transform: none; }
.cp-back .icon { width: 18px; height: 18px; }
.cp-pane > .cp-content > .toolbar:first-child, .cp-pane .toolbar { margin-bottom: 14px; }
.cp-pane.entering { animation: body-in .32s var(--ease) both; }

/* Fenêtre étroite : la liste des rubriques d'abord, avec leur explication ; la rubrique choisie la remplace. */
@container win (max-width: 700px) {
  .cp { grid-template-columns: minmax(0, 1fr); }
  .cp-side { border-right: 0; background: none; padding: 14px 12px 22px; }
  .cp.detail .cp-side, .cp:not(.detail) .cp-main { display: none; }
  .cp-search input { padding-top: 9px; padding-bottom: 9px; }
  .cp-group { gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; box-shadow: var(--shadow); margin-top: 8px; }
  .cp-group h4 { margin: 10px 10px 4px; }
  .cp-item { padding: 10px; }
  .cp-item + .cp-item { border-top: 1px solid var(--line); border-radius: 0; }
  .cp-item:last-child { border-radius: 0 0 10px 10px; }
  .cp-item .app-icon.small { width: 34px; height: 34px; border-radius: 10px; }
  .cp-item .app-icon.small .icon { width: 19px; height: 19px; }
  .cp-item-text b { font-weight: 620; }
  .cp-item-text small, .cp-chevron { display: block; }
  .cp-item.on { background: none; }
  .cp-item.on .cp-item-text b { color: var(--text); font-weight: 620; }
  .cp-item.on::before { display: none; }
  .cp-side.entering .cp-item { animation: row-in .32s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms); }
  .cp-main { padding: 14px 14px 22px; }
  .cp-main.entering { animation: cp-slide .32s var(--ease) both; }
  .cp-back { display: inline-flex; }
}
@keyframes cp-slide { from { opacity: 0; transform: translateX(26px); } }
.table-empty { margin: 0; padding: 22px 18px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.card .table-empty { border: 0; padding: 12px 0 4px; text-align: left; }

/* Fichiers : barre de sélection, pictogrammes par type */
.fs-main .toolbar button { white-space: nowrap; }
.fs-selbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 8px; margin-bottom: 10px; border-radius: 13px; background: color-mix(in srgb, var(--accent) 11%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent); }
.fs-selbar.entering { animation: rise .28s var(--ease) both; }
.fs-selbar b { font-weight: 640; font-size: 13.5px; white-space: nowrap; }
.fs-sel-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.fs-sel-actions button { padding: 4px 11px; font-size: 13px; border-radius: 9px; }
button.fs-sel-close { width: 28px; height: 28px; padding: 0; border: 0; background: none; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
button.fs-sel-close:hover { background: var(--hover); color: var(--text); border: 0; box-shadow: none; transform: none; }
.fs-sel-close .icon { width: 15px; height: 15px; }
.fs-name .icon.kind-image { color: #db2777; }
.fs-name .icon.kind-video { color: #7c3aed; }
.fs-name .icon.kind-audio { color: #0d9488; }
.fs-name .icon.kind-archive { color: #b45309; }
.fs-name .icon.kind-sheet { color: #15803d; }
.fs-name .icon.kind-code { color: #475569; }
.fs-name .icon.kind-doc { color: #2563eb; }
.fs-table td, .fs-table th { padding-top: 8px; padding-bottom: 8px; }
.fs-table tbody tr { transition: background .15s; }
.fs-list > .empty { margin-top: 4vh; }
.fs-share { transition: background .18s, color .18s; }
.fs-share .icon { width: 18px; height: 18px; flex: none; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }

/* Stockage : carte d'un volume */
.vol-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.vol-head .app-icon { width: 46px; height: 46px; border-radius: 13px; }
.vol-head .app-icon .icon { width: 25px; height: 25px; }
.vol-id { display: grid; min-width: 0; flex: 1; }
.vol-id h2 { margin: 0; font-size: 17px; letter-spacing: -.01em; }
.vol-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.vol-space { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.fact { display: grid; gap: 2px; padding: 9px 12px; border-radius: 11px; background: var(--track); min-width: 0; }
.fact small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 640; }
.fact b { font-weight: 620; overflow-wrap: anywhere; }
.card-actions .push { margin-left: auto; }
.fs-search { flex: 1 1 140px; max-width: 220px; }

/* Titres de carte avec pictogramme, pastilles, avatars */
.card > h2:has(> .icon) { display: flex; align-items: center; gap: 8px; }
.card > h2 > .icon { width: 18px; height: 18px; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); font-size: 12.5px; font-weight: 560; white-space: nowrap; }
.chip small { color: var(--muted); font-weight: 400; }
.chip.ro { background: var(--track); }
.chip.more { background: var(--track); color: var(--muted); }
.chip.all { background: color-mix(in srgb, var(--warn) 15%, transparent); }
.chip .icon { width: 13px; height: 13px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13.5px; background: linear-gradient(140deg, hsl(var(--hue, 220) 72% 58%), hsl(calc(var(--hue, 220) + 40) 70% 44%)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.app-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.app-card-head h2 { margin: 0; }
.app-card-head .app-icon { width: 40px; height: 40px; border-radius: 12px; font-weight: 700; font-size: 18px; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .3s var(--spring); }
.app-card:hover .app-card-head .app-icon { transform: scale(1.08) rotate(-5deg); }
h3.section-title { margin: 22px 0 10px; }
/* Le contenu d'une rubrique du panneau mesure sa propre largeur : ses tableaux se replient d'après elle. */
.cp-main { container: pane / inline-size; }

/* Même repli des tableaux dans une rubrique étroite du Panneau de configuration */
@container pane (max-width: 560px) {
  table.dt thead { display: none; }
  table.dt, table.dt tbody { display: block; }
  table.dt tr { display: grid; gap: 2px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.dt tr:last-child { border-bottom: 0; }
  table.dt td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 3px 0; border: 0; text-align: right; overflow-wrap: anywhere; min-width: 0; }
  table.dt td::before { content: attr(data-label); flex: none; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 640; text-align: left; }
  table.dt td:first-child { text-align: left; font-size: 15px; }
  table.dt td:first-child::before, table.dt td.actions::before, table.dt td:empty { display: none; }
  table.dt td.actions { justify-content: flex-start; flex-wrap: wrap; gap: 6px; white-space: normal; padding-top: 8px; }
  table.dt td.actions button { margin: 0; }
  table.dt tbody tr:hover td { background: none; }
}

@container pane (max-width: 520px) {
  .grid3 { grid-template-columns: 1fr; }
  .form { max-width: none; }
}

/* Mon compte, alimentation */
.me-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar.lg { width: 56px; height: 56px; font-size: 24px; box-shadow: 0 6px 16px rgba(10, 16, 34, .2), inset 0 1px 0 rgba(255, 255, 255, .3); }
.power-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
button.power-tile { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; text-align: left; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); animation: rise .42s var(--ease) both; }
button.power-tile:nth-child(2) { animation-delay: .06s; }
button.power-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(10, 16, 34, .14); }
.power-tile .app-icon { width: 46px; height: 46px; border-radius: 14px; transition: transform .3s var(--spring); }
.power-tile .app-icon .icon { width: 25px; height: 25px; }
.power-tile:hover .app-icon { transform: scale(1.08) rotate(-6deg); }
.power-tile > span:last-child { display: grid; gap: 2px; min-width: 0; }
.power-tile b { font-weight: 660; font-size: 15px; }
.power-tile small { color: var(--muted); font-size: 12.5px; font-weight: 400; line-height: 1.35; }
button.busy.dark::before { border-color: var(--line-strong); border-top-color: var(--accent); }

/* Clients embarqués (DynePlay, DyneDesk) : leur page occupe toute la fenêtre */
.embed { flex: 1; min-height: 0; position: relative; display: flex; background: #060a1c; }
.embed-frame { flex: 1; width: 100%; height: 100%; border: 0; display: block; }
.embed-veil { position: absolute; inset: 0; padding: 20px 22px; background: var(--bg-solid); animation: fade .2s ease both; }
body.dragging iframe { pointer-events: none; }
.vmx-desk-head .vmx-desk-open { margin-left: auto; margin-right: 6px; text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 600; color: var(--text); }

/* Fichiers : vignettes, vue en grille, aperçu PDF, contenu d'une archive */
.fs-thumb { width: 28px; height: 28px; flex: none; object-fit: cover; border-radius: 6px; background: var(--track); }
.fs-view { margin-left: auto; padding: 6px 9px; }
.fs-view + .fs-search { margin-left: 0; }
.fs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; padding: 4px 2px 16px; }
.fs-card { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); transition: box-shadow .2s, border-color .2s; }
.fs-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.fs-card.picked { background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.fs-card > input[type="checkbox"] { position: absolute; top: 8px; left: 8px; width: auto; z-index: 1; opacity: 0; transition: opacity .15s; }
.fs-card:hover > input, .fs-card.picked > input, .fs-card > input:focus-visible { opacity: 1; }
@media (hover: none) { .fs-card > input[type="checkbox"] { opacity: 1; } }
.fs-card-open { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 100%; border: 0; background: none; padding: 8px; box-shadow: none; text-align: center; font-weight: 400; color: inherit; }
.fs-card-open:hover { transform: none; box-shadow: none; border: 0; }
.fs-card-pic { display: grid; place-items: center; height: 96px; border-radius: 8px; overflow: hidden; background: var(--track); }
.fs-card-pic .fs-thumb.big { width: 100%; height: 100%; border-radius: 0; }
.fs-card-pic .icon.big { width: 44px; height: 44px; color: var(--muted); }
.fs-card-pic .icon.dir { color: #d9a514; fill: color-mix(in srgb, #f5c542 35%, transparent); }
.fs-card-name { margin-top: 5px; font-size: 13px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-card-meta { font-size: 12px; }
iframe.preview.pdf { width: 100%; height: 68vh; border: 1px solid var(--line); background: #fff; }
dialog.wide:has(iframe.preview.pdf) { max-width: 980px; }
.fs-zip { max-height: 46vh; overflow-y: auto; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
