
/* =========================================================================
   iCanSend Plus — Design system (2026)
   Mobile-first, dark-mode aware, WCAG-minded. Aucune bibliothèque externe.
   Icônes : SVG inline encodés en variables CSS (réutilisables, teintés via
   currentColor grâce aux masques).
   ========================================================================= */
:root {
	--bg: #f5f6fa;
	--surface: #ffffff;
	--surface-2: #f7f9fc;
	--surface-3: #eef2f7;
	--text: #0f172a;
	--text-muted: #475569;
	--text-light: #64748b;
	--primary: #4f46e5;
	--primary-strong: #4338ca;
	--primary-soft: #eef2ff;
	--primary-ring: rgba(79, 70, 229, 0.28);
	--accent: #8b5cf6;
	--success: #047857;
	--success-soft: #d1fae5;
	--danger: #dc2626;
	--danger-soft: #fee2e2;
	--warn: #b45309;
	--warn-soft: #fef3c7;
	--border: #e2e8f0;
	--border-strong: #c3cedd;
	--header-bg: rgba(255, 255, 255, 0.82);
	--radius: 16px;
	--radius-sm: 10px;
	--radius-lg: 20px;
	--shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.06);
	--shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.09), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
	--shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, 0.18), 0 6px 12px -8px rgba(15, 23, 42, 0.08);
	--tr: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
	--mono: "SF Mono", "Fira Code", "Cascadia Mono", Consolas, monospace;
	--perm-blue: #3b82f6; --perm-green: #10b981; --perm-orange: #f59e0b;
	--perm-yellow: #eab308; --perm-gray: #94a3b8;
	--bg-decor:
		radial-gradient(1100px 480px at 85% -10%, rgba(79, 70, 229, 0.10), transparent 60%),
		radial-gradient(800px 420px at -5% 0%, rgba(139, 92, 246, 0.08), transparent 55%);
	/* --- Icônes SVG (data-URI, utilisées comme masques) --- */
	--i-folder: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M22%2019a2%202%200%200%201-2%202H4a2%202%200%200%201-2-2V5a2%202%200%200%201%202-2h5l2%203h9a2%202%200%200%201%202%202z%22%2F%3E%3C%2Fsvg%3E");
	--i-file: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M14%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V8z%22%2F%3E%3Cpath%20d=%22M14%202v6h6%22%2F%3E%3C%2Fsvg%3E");
	--i-folder-plus: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M22%2019a2%202%200%200%201-2%202H4a2%202%200%200%201-2-2V5a2%202%200%200%201%202-2h5l2%203h9a2%202%200%200%201%202%202z%22%2F%3E%3Cpath%20d=%22M12%2011v6%22%2F%3E%3Cpath%20d=%22M9%2014h6%22%2F%3E%3C%2Fsvg%3E");
	--i-download: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M21%2015v4a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2v-4%22%2F%3E%3Cpath%20d=%22M7%2010l5%205%205-5%22%2F%3E%3Cpath%20d=%22M12%2015V3%22%2F%3E%3C%2Fsvg%3E");
	--i-upload: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M21%2015v4a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2v-4%22%2F%3E%3Cpath%20d=%22M17%208l-5-5-5%205%22%2F%3E%3Cpath%20d=%22M12%203v12%22%2F%3E%3C%2Fsvg%3E");
	--i-trash: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M3%206h18%22%2F%3E%3Cpath%20d=%22M19%206v14a2%202%200%200%201-2%202H7a2%202%200%200%201-2-2V6%22%2F%3E%3Cpath%20d=%22M8%206V4a2%202%200%200%201%202-2h4a2%202%200%200%201%202%202v2%22%2F%3E%3Cpath%20d=%22M10%2011v6%22%2F%3E%3Cpath%20d=%22M14%2011v6%22%2F%3E%3C%2Fsvg%3E");
	--i-copy: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x=%229%22%20y=%229%22%20width=%2213%22%20height=%2213%22%20rx=%222%22%2F%3E%3Cpath%20d=%22M5%2015H4a2%202%200%200%201-2-2V4a2%202%200%200%201%202-2h9a2%202%200%200%201%202%202v1%22%2F%3E%3C%2Fsvg%3E");
	--i-lock: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Crect%20x=%223%22%20y=%2211%22%20width=%2218%22%20height=%2211%22%20rx=%222%22%2F%3E%3Cpath%20d=%22M7%2011V7a5%205%200%200%201%2010%200v4%22%2F%3E%3C%2Fsvg%3E");
	--i-shield: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M12%2022s8-4%208-10V5l-8-3-8%203v7c0%206%208%2010%208%2010z%22%2F%3E%3C%2Fsvg%3E");
	--i-users: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M17%2021v-2a4%204%200%200%200-4-4H5a4%204%200%200%200-4%204v2%22%2F%3E%3Ccircle%20cx=%229%22%20cy=%227%22%20r=%224%22%2F%3E%3Cpath%20d=%22M23%2021v-2a4%204%200%200%200-3-3.87%22%2F%3E%3Cpath%20d=%22M16%203.13a4%204%200%200%201%200%207.75%22%2F%3E%3C%2Fsvg%3E");
	--i-user: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M20%2021v-2a4%204%200%200%200-4-4H8a4%204%200%200%200-4%204v2%22%2F%3E%3Ccircle%20cx=%2212%22%20cy=%227%22%20r=%224%22%2F%3E%3C%2Fsvg%3E");
	--i-zap: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M13%202L3%2014h9l-1%208%2010-12h-9l1-8z%22%2F%3E%3C%2Fsvg%3E");
	--i-cloud-off: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M22.61%2016.95A5%205%200%200%200%2018%2010h-1.26a8%208%200%200%200-7.05-6M5%205a8%208%200%200%200%204%2015h9a5%205%200%200%200%201.7-.3%22%2F%3E%3Cpath%20d=%22M1%201l22%2022%22%2F%3E%3C%2Fsvg%3E");
	--i-send: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M22%202L11%2013%22%2F%3E%3Cpath%20d=%22M22%202l-7%2020-4-9-9-4%2020-7z%22%2F%3E%3C%2Fsvg%3E");
	--i-sync: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M23%204v6h-6%22%2F%3E%3Cpath%20d=%22M1%2020v-6h6%22%2F%3E%3Cpath%20d=%22M3.51%209a9%209%200%200%201%2014.85-3.36L23%2010%22%2F%3E%3Cpath%20d=%22M1%2014l4.64%204.36A9%209%200%200%200%2020.49%2015%22%2F%3E%3C%2Fsvg%3E");
	--i-chat: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M21%2015a2%202%200%200%201-2%202H7l-4%204V5a2%202%200%200%201%202-2h14a2%202%200%200%201%202%202z%22%2F%3E%3C%2Fsvg%3E");
	--i-back: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M19%2012H5%22%2F%3E%3Cpath%20d=%22M12%2019l-7-7%207-7%22%2F%3E%3C%2Fsvg%3E");
	--i-close: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M18%206L6%2018%22%2F%3E%3Cpath%20d=%22M6%206l12%2012%22%2F%3E%3C%2Fsvg%3E");
	--i-check: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M20%206L9%2017l-5-5%22%2F%3E%3C%2Fsvg%3E");
	--i-warn: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M10.29%203.86L1.82%2018a2%202%200%200%200%201.71%203h16.94a2%202%200%200%200%201.71-3L13.71%203.86a2%202%200%200%200-3.42%200z%22%2F%3E%3Cpath%20d=%22M12%209v4%22%2F%3E%3Cpath%20d=%22M12%2017h.01%22%2F%3E%3C%2Fsvg%3E");
	--i-err: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx=%2212%22%20cy=%2212%22%20r=%2210%22%2F%3E%3Cpath%20d=%22M12%208v4%22%2F%3E%3Cpath%20d=%22M12%2016h.01%22%2F%3E%3C%2Fsvg%3E");
	--i-settings: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M4%2021v-7%22%2F%3E%3Cpath%20d=%22M4%2010V3%22%2F%3E%3Cpath%20d=%22M12%2021v-9%22%2F%3E%3Cpath%20d=%22M12%208V3%22%2F%3E%3Cpath%20d=%22M20%2021v-5%22%2F%3E%3Cpath%20d=%22M20%2012V3%22%2F%3E%3Cpath%20d=%22M1%2014h6%22%2F%3E%3Cpath%20d=%22M9%208h6%22%2F%3E%3Cpath%20d=%22M17%2016h6%22%2F%3E%3C%2Fsvg%3E");
	--i-audit: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M14%202H6a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h12a2%202%200%200%200%202-2V8z%22%2F%3E%3Cpath%20d=%22M14%202v6h6%22%2F%3E%3Cpath%20d=%22M16%2013H8%22%2F%3E%3Cpath%20d=%22M16%2017H8%22%2F%3E%3Cpath%20d=%22M10%209H8%22%2F%3E%3C%2Fsvg%3E");
	--i-transfer: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M8%203L4%207l4%204%22%2F%3E%3Cpath%20d=%22M4%207h16%22%2F%3E%3Cpath%20d=%22M16%2021l4-4-4-4%22%2F%3E%3Cpath%20d=%22M20%2017H4%22%2F%3E%3C%2Fsvg%3E");
	--i-link: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M10%2013a5%205%200%200%200%207.54.54l3-3a5%205%200%200%200-7.07-7.07l-1.72%201.71%22%2F%3E%3Cpath%20d=%22M14%2011a5%205%200%200%200-7.54-.54l-3%203a5%205%200%200%200%207.07%207.07l1.71-1.71%22%2F%3E%3C%2Fsvg%3E");
	--i-logout: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M9%2021H5a2%202%200%200%201-2-2V5a2%202%200%200%201%202-2h4%22%2F%3E%3Cpath%20d=%22M16%2017l5-5-5-5%22%2F%3E%3Cpath%20d=%22M21%2012H9%22%2F%3E%3C%2Fsvg%3E");
	--i-plus: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M12%205v14%22%2F%3E%3Cpath%20d=%22M5%2012h14%22%2F%3E%3C%2Fsvg%3E");
	--i-server: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M22%2012H2%22%2F%3E%3Cpath%20d=%22M5.45%205.11L2%2012v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2v-6l-3.45-6.89A2%202%200%200%200%2016.76%204H7.24a2%202%200%200%200-1.79%201.11z%22%2F%3E%3Cpath%20d=%22M6%2016h.01%22%2F%3E%3Cpath%20d=%22M10%2016h.01%22%2F%3E%3C%2Fsvg%3E");
	--i-key: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx=%227.5%22%20cy=%2215.5%22%20r=%225.5%22%2F%3E%3Cpath%20d=%22M11.5%2011.5L21%202%22%2F%3E%3Cpath%20d=%22M16%207l3%203%22%2F%3E%3C%2Fsvg%3E");
	--i-filter: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M22%203H2l8%209.46V19l4%202v-8.54L22%203z%22%2F%3E%3C%2Fsvg%3E");
	--i-clock: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Ccircle%20cx=%2212%22%20cy=%2212%22%20r=%2210%22%2F%3E%3Cpath%20d=%22M12%206v6l4%202%22%2F%3E%3C%2Fsvg%3E");
	--i-inbox: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d=%22M22%2012h-6l-2%203h-4l-2-3H2%22%2F%3E%3Cpath%20d=%22M5.45%205.11L2%2012v6a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2v-6l-3.45-6.89A2%202%200%200%200%2016.76%204H7.24a2%202%200%200%200-1.79%201.11z%22%2F%3E%3C%2Fsvg%3E");
	--i-eye: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M2%2012s3-7%2010-7%2010%207%2010%207-3%207-10%207-10-7-10-7z'%2F%3E%3Ccircle%20cx='12'%20cy='12'%20r='3'%2F%3E%3C%2Fsvg%3E");
	--i-expand: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M15%203h6v6'%2F%3E%3Cpath%20d='M9%2021H3v-6'%2F%3E%3Cpath%20d='M21%203l-7%207'%2F%3E%3Cpath%20d='M3%2021l7-7'%2F%3E%3C%2Fsvg%3E");
	--i-shrink: url("data:image/svg+xml,%3Csvg%20xmlns='http:%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M14%204v6h6'%2F%3E%3Cpath%20d='M10%2020v-6H4'%2F%3E%3Cpath%20d='M20%2010l-7%207'%2F%3E%3Cpath%20d='M4%2014l7-7'%2F%3E%3C%2Fsvg%3E");
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0a101f;
		--surface: #131c33;
		--surface-2: #18233d;
		--surface-3: #20304f;
		--text: #e5ebf6;
		--text-muted: #9aa8c0;
		--text-light: #7484a0;
		--primary: #6d64f0;
		--primary-strong: #8b85f5;
		--primary-soft: #272450;
		--primary-ring: rgba(139, 133, 245, 0.4);
		--accent: #a78bfa;
		--success: #34d399;
		--success-soft: #063d2c;
		--danger: #f87171;
		--danger-soft: #4c1518;
		--warn: #fbbf24;
		--warn-soft: #45300b;
		--border: #263556;
		--border-strong: #35496f;
		--header-bg: rgba(10, 16, 31, 0.78);
		--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
		--shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.5);
		--shadow-lg: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
		--bg-decor:
			radial-gradient(1100px 480px at 85% -10%, rgba(109, 100, 240, 0.14), transparent 60%),
			radial-gradient(800px 420px at -5% 0%, rgba(167, 139, 250, 0.10), transparent 55%);
	}
	/* L'illustration du héros s'adapte au thème sombre */
	.hero-illustration svg > rect { fill: var(--surface-3); opacity: 0.35; }
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
	background: var(--bg); background-image: var(--bg-decor); background-attachment: fixed;
	color: var(--text); line-height: 1.6; min-height: 100vh;
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a, a:visited { color: var(--primary); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--primary-strong); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--text); letter-spacing: -0.02em; line-height: 1.25; }
h1 { font-size: 1.05rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 700; }
h4 { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
::selection { background: var(--primary); color: #fff; }

/* --- Utilitaires --- */
.hidden { display: none !important; }
.muted { color: var(--text-muted); font-size: 0.85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link {
	position: fixed; top: -60px; left: 1rem; z-index: 2000;
	background: var(--primary); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-sm);
	font-weight: 600; font-size: 0.9rem; transition: top var(--tr); box-shadow: var(--shadow-md);
}
.skip-link:focus { top: 0.75rem; color: #fff; text-decoration: none; }

/* Icônes (masques SVG — héritent de currentColor) */
.ico {
	display: inline-block; width: 1.15em; height: 1.15em; flex: none;
	vertical-align: -0.22em; background-color: currentColor;
	-webkit-mask: var(--icon) no-repeat center / contain; mask: var(--icon) no-repeat center / contain;
}
.ico-folder { --icon: var(--i-folder); } .ico-file { --icon: var(--i-file); }
.ico-folder-plus { --icon: var(--i-folder-plus); }
.ico-download { --icon: var(--i-download); } .ico-upload { --icon: var(--i-upload); }
.ico-trash { --icon: var(--i-trash); } .ico-copy { --icon: var(--i-copy); }
.ico-lock { --icon: var(--i-lock); } .ico-shield { --icon: var(--i-shield); }
.ico-users { --icon: var(--i-users); } .ico-user { --icon: var(--i-user); }
.ico-zap { --icon: var(--i-zap); } .ico-cloud-off { --icon: var(--i-cloud-off); }
.ico-send { --icon: var(--i-send); } .ico-sync { --icon: var(--i-sync); }
.ico-chat { --icon: var(--i-chat); } .ico-back { --icon: var(--i-back); }
.ico-close { --icon: var(--i-close); } .ico-check { --icon: var(--i-check); }
.ico-warn { --icon: var(--i-warn); } .ico-err { --icon: var(--i-err); }
.ico-settings { --icon: var(--i-settings); } .ico-audit { --icon: var(--i-audit); }
.ico-transfer { --icon: var(--i-transfer); } .ico-link { --icon: var(--i-link); }
.ico-logout { --icon: var(--i-logout); } .ico-plus { --icon: var(--i-plus); }
.ico-server { --icon: var(--i-server); } .ico-key { --icon: var(--i-key); }
.ico-filter { --icon: var(--i-filter); } .ico-clock { --icon: var(--i-clock); }
.ico-eye { --icon: var(--i-eye); } .ico-expand { --icon: var(--i-expand); } .ico-shrink { --icon: var(--i-shrink); }
.ico-inbox { --icon: var(--i-inbox); }

/* Focus visible global (clavier) */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* --- Structure --- */
.app-shell { max-width: 1120px; margin: 0 auto; padding: 0 1rem 2rem; min-height: 100vh; display: flex; flex-direction: column; }
.app-main { flex: 1 0 auto; display: flex; flex-direction: column; gap: 1rem; }

/* --- En-tête --- */
.app-header {
	position: sticky; top: 0; z-index: 100;
	display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
	padding: 0.7rem 1rem; margin: 0 -1rem 0.5rem;
	background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) { .app-header { margin: 0 -1.5rem 0.5rem; padding: 0.7rem 1.5rem; } }
.brand { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.brand-mark {
	display: grid; place-content: center; width: 38px; height: 38px; flex: none;
	border-radius: 11px; background: linear-gradient(135deg, var(--primary), var(--accent));
	box-shadow: var(--shadow-md); color: #fff;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-side { display: flex; align-items: center; gap: 0.5rem; flex: none; }
.status-pill {
	display: inline-flex; align-items: center; gap: 0.4rem; max-width: 40vw;
	font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
	background: var(--surface-3); border: 1px solid var(--border);
	padding: 0.3rem 0.7rem; border-radius: 999px;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--text-light); flex: none; }
.status-pill:empty { display: none; }
/* Indicateur qualité réseau WebRTC (vert/orange/rouge) — réutilise le rond du status-pill côté client. */
.status-pill[data-net="good"]::before { background: var(--success); }
.status-pill[data-net="medium"]::before { background: var(--warn); }
.status-pill[data-net="poor"]::before { background: var(--danger); animation: net-blink 1.4s ease-in-out infinite; }
.net-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--text-light); vertical-align: middle; margin-right: 0.45rem; flex: none; box-shadow: 0 0 0 2px var(--surface); transition: background var(--tr); }
.net-dot[data-net="good"] { background: var(--success); }
.net-dot[data-net="medium"] { background: var(--warn); }
.net-dot[data-net="poor"] { background: var(--danger); animation: net-blink 1.4s ease-in-out infinite; }
.net-dot:not([data-net]), .net-dot[data-net=""], .net-dot[data-net="unknown"] { background: var(--text-light); opacity: 0.45; animation: none; }
@keyframes net-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* --- Bannières --- */
.banner {
	display: flex; align-items: flex-start; gap: 0.6rem;
	padding: 0.8rem 1rem; border-radius: var(--radius); margin-bottom: 0.25rem;
	font-size: 0.9rem; font-weight: 500; border: 1px solid;
}
.banner::before { content: ""; width: 20px; height: 20px; flex: none; margin-top: 1px; background-color: currentColor; -webkit-mask: var(--icon) no-repeat center / contain; mask: var(--icon) no-repeat center / contain; }
.banner-warn { --icon: var(--i-warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }
.banner-err { --icon: var(--i-err); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }

/* --- Cartes & panneaux --- */
.card {
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius-lg); padding: 1.1rem; box-shadow: var(--shadow-sm);
}
.panel { max-width: 520px; margin: 0 auto; width: 100%; }
.panel-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.1rem; }
.panel-head h2 { flex: 1; }
.card-title { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.card-title .ico { width: 1.05rem; height: 1.05rem; color: var(--primary); }

/* --- Boutons --- */
button {
	font-family: inherit; font-size: 0.92rem; font-weight: 600; line-height: 1.2;
	display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
	padding: 0.62rem 1.15rem; min-height: 42px; cursor: pointer;
	border: 1px solid transparent; border-radius: var(--radius-sm);
	background: var(--primary); color: #fff;
	transition: background var(--tr), transform var(--tr), box-shadow var(--tr), border-color var(--tr), color var(--tr);
}
button:not(:disabled):hover { background: var(--primary-strong); box-shadow: var(--shadow-md); }
button:not(:disabled):active { transform: translateY(1px); }
button:disabled { background: var(--text-light); cursor: not-allowed; opacity: 0.55; }
button.secondary { background: var(--surface-3); color: var(--text); border-color: var(--border); }
button.secondary:not(:disabled):hover { background: var(--border); color: var(--text); }
button.danger { background: var(--danger); color: #fff; }
button.danger:not(:disabled):hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
button.small { padding: 0.45rem 0.85rem; min-height: 36px; font-size: 0.83rem; }
button.block { width: 100%; }
.back-btn {
	background: transparent; color: var(--text-muted); border-color: transparent;
	padding: 0.45rem 0.7rem; min-height: 36px; font-size: 0.85rem;
}
.back-btn:not(:disabled):hover { background: var(--surface-3); color: var(--text); box-shadow: none; }
@media (pointer: coarse) { button { min-height: 44px; } button.small { min-height: 40px; } }

/* Boutons d'action dans les lignes de tableaux (générés par JS) */
.rowbtn {
	padding: 0.32rem 0.6rem; min-height: 32px; font-size: 0.78rem; font-weight: 600;
	background: var(--surface-3); color: var(--text-muted); border-color: var(--border);
}
.rowbtn:not(:disabled):hover { background: var(--primary-soft); color: var(--primary); box-shadow: none; border-color: var(--primary); }
.rowbtn .ico { width: 1em; height: 1em; }
.rowbtn-danger:not(:disabled):hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.row-actions { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; }

/* --- Formulaires --- */
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.85rem; }
.field > label, label.field-label { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }
input[type="text"], input[type="password"], input[type="number"], textarea, select {
	width: 100%; padding: 0.6rem 0.8rem; min-height: 42px;
	font-size: 0.92rem; font-family: inherit; color: var(--text);
	background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
	transition: border-color var(--tr), box-shadow var(--tr);
}
input::placeholder, textarea::placeholder { color: var(--text-light); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
select { cursor: pointer; }
select.small { width: auto; min-height: 36px; padding: 0.4rem 0.6rem; font-size: 0.83rem; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 0.9rem; }
@media (min-width: 560px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 0.55rem; cursor: pointer; font-size: 0.88rem; color: var(--text); width: fit-content; }
.check input[type="checkbox"] {
	appearance: none; -webkit-appearance: none; flex: none;
	width: 20px; height: 20px; margin: 0; border: 2px solid var(--border-strong); border-radius: 6px;
	background: var(--surface); cursor: pointer; transition: background var(--tr), border-color var(--tr);
	display: grid; place-content: center;
}
.check input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
.check input[type="checkbox"]:checked::before {
	content: ""; width: 11px; height: 11px; background: #fff;
	-webkit-mask: var(--i-check) no-repeat center / contain; mask: var(--i-check) no-repeat center / contain;
}
.check input[type="checkbox"]:disabled { opacity: 0.45; cursor: not-allowed; }
.check input[type="checkbox"]:disabled + span { opacity: 0.6; }
.check-row { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin: 0.4rem 0 0.9rem; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
legend { font-weight: 700; color: var(--text); padding: 0 0.5rem; font-size: 0.9rem; }
.row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.row > * { flex: 1 1 auto; }
.row > button, .row > select { flex: 0 0 auto; width: auto; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }

/* --- Landing : héros --- */
.landing { display: flex; flex-direction: column; gap: 1rem; }
.hero-section { text-align: center; padding: 2rem 0.5rem 0.5rem; }
.hero-section h2 {
	font-size: clamp(1.55rem, 4.5vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em;
	margin-bottom: 0.75rem; line-height: 1.15;
	background: linear-gradient(120deg, var(--primary), var(--accent));
	-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.hero-section .tagline { font-size: 1.02rem; color: var(--text-muted); max-width: 640px; margin: 0 auto; }
.hero-highlights { list-style: none; display: grid; grid-template-columns: 1fr; gap: 0.6rem; max-width: 780px; margin: 1.5rem auto 0; }
@media (min-width: 560px) { .hero-highlights { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .hero-highlights { grid-template-columns: repeat(4, 1fr); } }
.hero-highlights .hl {
	display: flex; align-items: center; justify-content: center; gap: 0.5rem;
	padding: 0.7rem 0.9rem; background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius); box-shadow: var(--shadow-sm);
	font-size: 0.82rem; font-weight: 600; color: var(--text-muted); text-align: center;
}
.hero-highlights .hl .ico { width: 1.3rem; height: 1.3rem; color: var(--primary); }
.hero-illustration { text-align: center; margin: 0.25rem 0; }
.hero-illustration svg { max-width: 100%; height: auto; border-radius: var(--radius-lg); }

/* Landing : visibilité multilingue */
#landing .lang-fr { display: none; }
html[lang="fr"] #landing .lang-fr { display: block; }
html[lang="fr"] #landing .lang-en { display: none; }
#landing .lang-en { display: block; }

/* --- Landing : cartes de rôle --- */
.role-cards { display: grid; grid-template-columns: 1fr; gap: 0.9rem; max-width: 860px; margin: 0 auto; width: 100%; }
@media (min-width: 680px) { .role-cards { grid-template-columns: 1fr 1fr; gap: 1.1rem; } }
.role-card {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5rem;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
	padding: 1.6rem 1.4rem; box-shadow: var(--shadow-sm);
	transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}
.role-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.role-tile {
	display: grid; place-content: center; width: 52px; height: 52px; margin-bottom: 0.25rem;
	border-radius: 14px; background: var(--primary-soft); color: var(--primary);
}
.role-tile .ico { width: 26px; height: 26px; }
.role-card .role-desc { font-size: 0.86rem; color: var(--text-muted); flex: 1; }
.role-card button { width: 100%; margin-top: 0.5rem; }
.license-card {
	display: flex; align-items: center; gap: 0.8rem; max-width: 860px; margin: 0 auto; width: 100%;
	background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: var(--radius);
	padding: 0.85rem 1.1rem;
}
.license-card .ico { width: 1.4rem; height: 1.4rem; color: var(--primary); flex: none; }
.license-card h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.license-card p { margin: 0; }

/* --- Panneau serveur (pré-ouverture) --- */
.empty-cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.9rem; padding: 1.5rem 0.5rem; }
.big-tile { display: grid; place-content: center; width: 64px; height: 64px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); }
.big-tile .ico { width: 32px; height: 32px; }
.empty-cta .muted { max-width: 380px; }

/* --- Dashboard serveur : en-tête --- */
#serverDash { display: flex; flex-direction: column; gap: 1rem; }
.dash-head { display: flex; flex-direction: column; gap: 1rem; }
.dash-id { min-width: 0; }
.dash-id h3 { font-size: 1.3rem; }
.meta-line { display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; }
.meta-line .sep { color: var(--text-light); }
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.55rem; }
.chip-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }
.pin-wrap { display: inline-flex; align-items: center; gap: 0.5rem; }
.chip, .clickable-code {
	display: inline-flex; align-items: center; gap: 0.4rem;
	font-family: var(--mono); font-size: 0.92rem; font-weight: 700; letter-spacing: 0.04em;
	background: var(--primary-soft); color: var(--primary);
	border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
	padding: 0.3rem 0.65rem; border-radius: 8px; cursor: pointer;
	transition: background var(--tr), transform var(--tr);
}
.clickable-code::after { content: ""; width: 13px; height: 13px; background-color: currentColor; opacity: 0.7; -webkit-mask: var(--i-copy) no-repeat center / contain; mask: var(--i-copy) no-repeat center / contain; }
.clickable-code:hover { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); text-decoration: none; }
.clickable-code:active { transform: scale(0.97); }
.code-chips { display: inline-flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.clickable-code .code-ttl { font-size: 0.72rem; font-weight: 600; opacity: 0.7; }
.code-empty { color: var(--text-light); font-family: var(--mono); }
.dash-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
@media (min-width: 768px) {
	.dash-head { flex-direction: row; align-items: flex-start; justify-content: space-between; }
	.dash-actions { justify-content: flex-end; max-width: 420px; }
}

/* --- Indicateurs --- */
.indicators { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
@media (min-width: 640px) { .indicators { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .indicators { grid-template-columns: repeat(6, 1fr); } }
.indicator {
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
	padding: 0.75rem 0.9rem; box-shadow: var(--shadow-sm);
}
.indicator .ind-label { display: block; font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.indicator b { display: block; font-size: 1.35rem; color: var(--primary); font-weight: 800; margin-top: 0.15rem; font-variant-numeric: tabular-nums; }

/* --- Onglets --- */
.tabs-card { padding: 0; overflow: hidden; }
.tabs {
	display: flex; gap: 0.15rem; padding: 0.4rem 0.4rem 0;
	border-bottom: 1px solid var(--border);
	overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
	background: transparent; color: var(--text-muted); border: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
	padding: 0.65rem 0.9rem; min-height: 44px; font-size: 0.86rem; font-weight: 600;
	white-space: nowrap; position: relative; box-shadow: none;
}
.tab-btn .ico { width: 1.05em; height: 1.05em; }
.tab-count { display: inline-block; min-width: 1.1em; margin-left: 0.35rem; padding: 0.05rem 0.4rem; border-radius: 999px; background: var(--surface-3); color: var(--text-muted); font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.tab-btn.active .tab-count { background: var(--primary-soft); color: var(--primary); }
.tab-count:empty { display: none; }
.tab-btn:not(:disabled):hover { background: var(--surface-3); color: var(--text); box-shadow: none; }
.tab-btn.active { color: var(--primary); background: var(--primary-soft); }
.tab-btn.active::after { content: ""; position: absolute; left: 0.6rem; right: 0.6rem; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.tab-panel { display: none; padding: 1.1rem; }
.tab-panel.active { display: block; animation: fadeIn 0.22s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.tab-panel h4 { margin: 0.4rem 0 0.6rem; }
.tab-panel h4:not(:first-child) { margin-top: 1.2rem; }

/* --- Tableaux --- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }
/* Conteneur du tableau fichiers : hauteur bornée + scroll vertical pour le virtual scrolling. */
.files-table-wrap { max-height: 60vh; overflow-y: auto; }
.files-table-wrap .vs-spacer td { border: none !important; padding: 0 !important; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.6rem 0.65rem; text-align: left; vertical-align: middle; font-size: 0.86rem; }
th { color: var(--text-light); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; border-bottom: 2px solid var(--border); white-space: nowrap; }
td { border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--tr); }
tbody tr:hover { background: var(--surface-2); }
td.empty-cell { text-align: center; color: var(--text-light); font-style: italic; padding: 1.4rem 0.5rem; }
.fname { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
.fname .ico { color: var(--primary); width: 1.2rem; height: 1.2rem; }
tr.folder .fname .ico { color: var(--warn); }
.fname-txt { overflow: hidden; text-overflow: ellipsis; }
#fileTableBody tr.folder[data-path] { cursor: pointer; }
#fileTableBody tr.folder[data-path]:hover { background: var(--primary-soft); }
.perm-tag { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 0.18rem 0.55rem; border-radius: 999px; background: var(--surface-3); color: var(--text-muted); }
.perm-tag-green { background: var(--success-soft); color: var(--success); }
.perm-tag-blue { background: var(--primary-soft); color: var(--primary); }
.perm-tag-orange { background: var(--warn-soft); color: var(--warn); }
.perm-tag-yellow { background: var(--warn-soft); color: var(--warn); }
tr.perm-blue td:first-child { border-left: 3px solid var(--perm-blue); }
tr.perm-green td:first-child { border-left: 3px solid var(--perm-green); }
tr.perm-orange td:first-child { border-left: 3px solid var(--perm-orange); }
tr.perm-yellow td:first-child { border-left: 3px solid var(--perm-yellow); }
tr.perm-gray td:first-child { border-left: 3px solid var(--perm-gray); }
.crc-badge { font-family: var(--mono); font-size: 0.72rem; background: var(--surface-3); padding: 0.18rem 0.45rem; border-radius: 6px; color: var(--text-muted); }

/* Tableaux → cartes sur mobile */
@media (max-width: 640px) {
	.rtable thead { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
	.rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
	.rtable tr { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 0.65rem; padding: 0.4rem 0.75rem; background: var(--surface-2); }
	.rtable td { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; border-bottom: 1px dashed var(--border); padding: 0.45rem 0; text-align: right; }
	.rtable td:last-child { border-bottom: none; }
	.rtable td::before { content: attr(data-label); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); text-align: left; flex: none; }
	.rtable td.empty-cell { display: block; text-align: center; }
	.rtable td.empty-cell::before { content: none; }
	.rtable td:first-child { border-left: none !important; }
	.rtable tr.perm-blue, .rtable tr.perm-green, .rtable tr.perm-orange, .rtable tr.perm-yellow, .rtable tr.perm-gray { border-left: 3px solid var(--border); }
	.rtable tr.perm-blue { border-left-color: var(--perm-blue); } .rtable tr.perm-green { border-left-color: var(--perm-green); }
	.rtable tr.perm-orange { border-left-color: var(--perm-orange); } .rtable tr.perm-yellow { border-left-color: var(--perm-yellow); }
	.rtable tr.perm-gray { border-left-color: var(--perm-gray); }
	.rowbtn .bt { display: none; }
	.rowbtn { padding: 0.32rem 0.5rem; }
}

/* --- Arborescence (Fichiers & Permissions) --- */
.tree { font-size: 0.9rem; }
.tree-node { padding: 0.28rem 0.3rem; cursor: pointer; border-radius: var(--radius-sm); transition: background var(--tr); }
.tree-node:hover { background: var(--primary-soft); }
.tree-label { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.15rem 0.45rem; }
.tree-label .ico { width: 1.05rem; height: 1.05rem; color: var(--warn); }
.tree-label .ico.ico-file { color: var(--primary); }
.tree-label .tree-lock { color: var(--primary); width: 0.85rem; height: 0.85rem; }
.tree-children { margin-left: 1.05rem; border-left: 2px solid var(--border); padding-left: 0.55rem; }
.tree pre { font-family: var(--mono); font-size: 0.78rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.75rem; overflow-x: auto; }

/* --- Audit --- */
.audit-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.audit-toolbar input { flex: 1 1 180px; }
.audit-toolbar select, .audit-toolbar button { flex: 0 0 auto; width: auto; }
#auditLog {
	max-height: 420px; overflow-y: auto;
	background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
	padding: 0.4rem; font-family: var(--mono);
}
.audit-line { font-size: 0.74rem; padding: 0.28rem 0.4rem; border-bottom: 1px solid var(--border); display: flex; gap: 0.55rem; align-items: baseline; border-radius: 4px; }
.audit-line:last-child { border-bottom: none; }
.audit-line:hover { background: var(--surface-3); }
.audit-line .ts { color: var(--text-light); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.audit-line .typ { color: var(--primary); font-weight: 700; flex-shrink: 0; min-width: 90px; }
.audit-line .payload { word-break: break-all; }

/* --- Fil d'Ariane --- */
.crumbs { padding: 0.15rem 0; }
#breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem; font-size: 0.88rem; }
.file-count-badge { margin-left: auto; font-size: 0.74rem; font-weight: 700; color: var(--text-light); background: var(--surface-3); padding: 0.12rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.crumb {
	background: var(--surface-3); border: 1px solid transparent; color: var(--primary);
	padding: 0.32rem 0.7rem; min-height: 34px; border-radius: 999px; font-size: 0.84rem; font-weight: 600;
}
.crumb:not(:disabled):hover { background: var(--primary-soft); border-color: var(--primary); box-shadow: none; }
.crumb[aria-current="page"] { background: var(--primary); color: #fff; }
.crumb-sep { color: var(--text-light); font-size: 0.8rem; }

.mkdir-row { margin-bottom: 0.85rem; }
.mkdir-row input { width: auto; flex: 1 1 220px; }
@media (max-width: 480px) { .mkdir-row button { flex: 1 1 auto; } }

/* --- Barre de synchro & barre client --- */
.client-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; padding: 0.75rem 1rem; }
.client-bar input { flex: 1 1 160px; max-width: 260px; }
.client-bar button { margin-left: auto; }
.sync-bar { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; padding: 0.75rem 1rem; }
.sync-bar #syncStatus { flex: 1 1 140px; font-size: 0.82rem; }

/* --- Zone de dépôt --- */
.dropzone {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem;
	border: 2px dashed var(--border-strong); border-radius: var(--radius);
	padding: 1.8rem 1rem; margin-top: 0.75rem; text-align: center;
	color: var(--text-muted); font-size: 0.9rem; font-weight: 500;
	cursor: pointer; background: var(--surface-2);
	transition: border-color var(--tr), background var(--tr), transform var(--tr);
}
.dropzone .dz-ico { width: 34px; height: 34px; color: var(--primary); opacity: 0.85; }
.dropzone:hover { border-color: var(--primary); background: var(--primary-soft); }
.dropzone.dragover { border-color: var(--primary); background: var(--primary-soft); transform: scale(1.01); border-style: solid; }

/* --- Progression --- */
.progressContainer { background: var(--surface-3); border-radius: 999px; overflow: hidden; height: 20px; min-width: 90px; position: relative; flex: 1; }
.progressBar { height: 20px; background: linear-gradient(90deg, var(--primary), var(--accent)); color: #fff; text-align: center; line-height: 20px; font-size: 0.68rem; font-weight: 700; width: 0; transition: width 0.3s ease; border-radius: 999px; font-variant-numeric: tabular-nums; }

/* --- Chat --- */
.chat-card { display: flex; flex-direction: column; }
.chat-box { display: flex; flex-direction: column; overflow: hidden; }
.chat-box .msgs {
	height: 170px; overflow-y: auto; padding: 0.7rem;
	display: flex; flex-direction: column; gap: 0.4rem;
	background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0;
	font-size: 0.87rem;
}
.chat-box .msgs > div { padding: 0.4rem 0.7rem; border-radius: 12px; max-width: 85%; word-break: break-word; box-shadow: var(--shadow-sm); }
.chat-box .msgs .chat-msg-in { background: var(--surface); align-self: flex-start; border-left: 3px solid var(--primary); border-bottom-left-radius: 4px; }
.chat-box .msgs .chat-msg-out { background: var(--primary); color: #fff; align-self: flex-end; text-align: right; border-bottom-right-radius: 4px; }
.chat-box .msgs .chat-sender { font-size: 0.72rem; font-weight: 700; color: var(--primary); margin-bottom: 0.1rem; }
.chat-box .form { display: flex; gap: 0.5rem; padding: 0.55rem; background: var(--surface); border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); }
.chat-box .form input { flex: 1 1 auto; min-height: 40px; }
.chat-box .form select { flex: 0 1 130px; min-width: 0; min-height: 40px; }
.chat-box .form button { flex: 0 0 auto; width: auto; min-height: 40px; }
@media (max-width: 560px) { .chat-box .form { flex-wrap: wrap; } .chat-box .form input { flex: 1 1 100%; } .chat-box .form select { flex: 1 1 auto; } }

/* --- Listes simples --- */
ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 0.5rem 0; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; border-bottom: 1px solid var(--border); font-size: 0.85rem; }
ul.plain li:last-child { border-bottom: none; }

/* --- Toast --- */
#custom-alert {
	position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%) translateY(120px);
	background: var(--text); color: var(--bg); padding: 0.75rem 1.4rem;
	z-index: 1000; opacity: 0; pointer-events: none;
	transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: var(--shadow-lg); font-size: 0.9rem; font-weight: 600; max-width: 92vw; text-align: center;
}
#custom-alert.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
#custom-alert:empty { display: none; }

/* --- Dialogue ACL --- */
dialog.acl-dialog {
	border: none; border-radius: var(--radius-lg); padding: 0; margin: auto;
	max-width: 560px; width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem);
	box-shadow: var(--shadow-lg); background: var(--surface); color: var(--text);
}
dialog.acl-dialog::backdrop { background: rgba(8, 12, 26, 0.55); backdrop-filter: blur(3px); }
dialog.acl-dialog .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--border); }
dialog.acl-dialog .modal-header h3 { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.acl-dialog .modal-close { background: var(--surface-3); border: none; color: var(--text-muted); padding: 0.4rem; width: 34px; height: 34px; min-height: 34px; border-radius: 8px; flex: none; }
dialog.acl-dialog .modal-close:hover { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
dialog.acl-dialog .modal-body { padding: 1.1rem 1.2rem; overflow-y: auto; }
dialog.acl-dialog .modal-body .check-row { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin: 0 0 0.9rem; }
@media (min-width: 480px) { dialog.acl-dialog .modal-body .check-row { grid-template-columns: 1fr 1fr; } }
dialog.acl-dialog .modal-footer { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 0.5rem; padding: 0.85rem 1.2rem; border-top: 1px solid var(--border); }
dialog.acl-dialog .modal-footer button { width: auto; }
dialog.acl-dialog .acl-inherited { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); background: var(--surface-3); padding: 0.1rem 0.45rem; border-radius: 999px; margin-left: 0.4rem; vertical-align: middle; }

/* Modale d'affichage du secret admin (généré une fois, copiable) */
dialog.secret-dialog { border: 1px solid var(--border); border-radius: 14px; padding: 0; margin: auto; width: min(440px, 92vw); max-width: calc(100vw - 2rem); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.secret-dialog::backdrop { background: rgba(8, 12, 26, 0.55); backdrop-filter: blur(3px); }
dialog.secret-dialog .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--border); }
dialog.secret-dialog .modal-header h3 { font-size: 1rem; }
dialog.secret-dialog .modal-close { background: var(--surface-3); border: none; color: var(--text-muted); padding: 0.4rem; width: 34px; height: 34px; min-height: 34px; border-radius: 8px; flex: none; }
dialog.secret-dialog .modal-close:hover { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
dialog.secret-dialog .modal-body { padding: 1.1rem 1.2rem; }
dialog.secret-dialog .secret-uuid { margin: 0 0 0.8rem; font-size: 0.85rem; word-break: break-all; }
dialog.secret-dialog .secret-field { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; }
dialog.secret-dialog .secret-field input { flex: 1; font-family: var(--mono); font-size: 0.9rem; background: var(--surface-2); cursor: text; }
dialog.secret-dialog .secret-field button { width: auto; }
dialog.secret-dialog .secret-field button.copied { background: var(--success-soft); color: var(--success); }
dialog.secret-dialog .secret-warn { display: flex; gap: 0.45rem; align-items: flex-start; background: var(--warn-soft); color: var(--warn); padding: 0.6rem 0.75rem; border-radius: 8px; font-size: 0.82rem; margin: 0; }
dialog.secret-dialog .modal-footer { display: flex; justify-content: flex-end; padding: 0.85rem 1.2rem; border-top: 1px solid var(--border); }
dialog.secret-dialog .modal-footer button { width: auto; }

/* Pastilles de restriction (aperçu seul / caché) dans la liste fichier */
.row-flags { display: inline-flex; gap: 0.25rem; margin-left: 0.45rem; flex-wrap: wrap; }
.flag-flag { font-size: 0.66rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; }
.flag-preview-only { background: var(--warn-soft); color: var(--warn); }
.flag-hidden { background: var(--surface-3); color: var(--text-muted); }
tr.is-hidden .fname-txt { opacity: 0.55; text-decoration: line-through; }

/* Boutons d'action client (Déconnecter / Définir admin / Révoquer admin) + note config */
.hint-block { display: flex; gap: 0.5rem; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 0.6rem 0.75rem; font-size: 0.82rem; color: var(--text-muted); margin: 0.8rem 0 0; }
.hint-block .ico { color: var(--warn); flex: none; }
.row-hint { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.admin-set-btn { background: var(--primary-soft); color: var(--primary); }
.admin-revoke-btn { background: var(--warn-soft); color: var(--warn); }

/* --- Visionneuse de prévisualisation (plein écran) --- */
dialog.preview-overlay {
	border: none; border-radius: 0; padding: 0; margin: 0;
	width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh;
	background: var(--surface); color: var(--text); box-shadow: none; overflow: hidden;
}
dialog.preview-overlay::backdrop { background: rgba(8, 12, 26, 0.85); }
.preview-overlay .pv-form { display: flex; flex-direction: column; height: 100%; width: 100%; margin: 0; }
.preview-overlay .pv-header {
	display: flex; align-items: center; gap: 0.6rem;
	padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--border);
	background: var(--surface-2); flex: none;
}
.preview-overlay .pv-title { flex: 1; min-width: 0; font-weight: 700; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-overlay .pv-title .pv-kind { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-light); margin-left: 0.5rem; }
/* Plein écran : masque la barre supérieure (et la navigation diaporama), le body remonte.
   La sortie du plein écran (bouton, Esc natif du navigateur, fermeture preview) restore la barre. */
dialog.preview-overlay.pv-fullscreen .pv-header { display: none; }
dialog.preview-overlay.pv-fullscreen .pv-slide-nav { display: none !important; }
.preview-overlay .pv-body {
	flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden;
	background: var(--surface-3); padding: 0.5rem;
	/* Cellule unique remplissant le conteneur : permet à l'img d'utiliser max-height:100%
	   (sinon la rangée implicite auto fait que max-height ne se résout pas → débordement vertical). */
	grid-template: minmax(0, 1fr) / minmax(0, 1fr);
}
.preview-overlay .pv-body.pv-scroll { display: block; overflow: auto; place-items: start; }
.preview-overlay .pv-body iframe { width: 100%; height: 100%; border: none; background: #fff; }
.preview-overlay .pv-body img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--radius-sm); box-shadow: var(--shadow-md); background: #fff; }
/* Mode taille réelle : l'image occupe sa taille native (débordante), scrollable verticalement et horizontalement. */
.preview-overlay .pv-body.pv-img-full { display: block; overflow: auto; }
.preview-overlay .pv-body.pv-img-full img { max-width: none; max-height: none; }
.preview-overlay .pv-body audio, .preview-overlay .pv-body video { width: 100%; max-width: 960px; }
.preview-overlay .pv-body video { max-height: 100%; }
.preview-overlay .pv-body pre {
	margin: 0; padding: 1rem 1.2rem; font-family: var(--mono); font-size: 0.82rem; line-height: 1.5;
	background: var(--surface); color: var(--text); border-radius: var(--radius-sm);
	white-space: pre-wrap; word-break: break-word; width: 100%; box-sizing: border-box;
}
/* Texte/code (.pv-code posé par openPreview) : conteneur flex, le bloc occupe toute la
   hauteur restante jusqu'au bas de l'écran et défile en interne. */
.preview-overlay .pv-body.pv-code { display: flex; align-items: stretch; }
.preview-overlay .pv-body.pv-code > pre {
	flex: 1 1 auto; min-height: 0; height: auto; overflow: auto; overscroll-behavior: contain;
}
.preview-overlay .pv-body .pv-md { width: 100%; box-sizing: border-box; background: var(--surface); color: var(--text); line-height: 1.7; font-size: 16px; }
.preview-overlay .pv-body .pv-md .pv-md-inner { max-width: 880px; margin: 0 auto; padding: 2rem 2.5rem; box-sizing: border-box; }
.preview-overlay .pv-body .pv-md h1, .preview-overlay .pv-body .pv-md h2, .preview-overlay .pv-body .pv-md h3, .preview-overlay .pv-body .pv-md h4, .preview-overlay .pv-body .pv-md h5, .preview-overlay .pv-body .pv-md h6 { font-weight: 700; line-height: 1.3; margin: 1.4em 0 0.5em; color: var(--text); }
.preview-overlay .pv-body .pv-md h1 { font-size: 1.9em; border-bottom: 2px solid var(--border-strong); padding-bottom: 0.3em; }
.preview-overlay .pv-body .pv-md h2 { font-size: 1.45em; border-bottom: 1px solid var(--border-strong); padding-bottom: 0.2em; }
.preview-overlay .pv-body .pv-md h3 { font-size: 1.2em; }
.preview-overlay .pv-body .pv-md h4 { font-size: 1.05em; }
.preview-overlay .pv-body .pv-md p { margin: 0.7em 0; }
.preview-overlay .pv-body .pv-md a { color: var(--primary); text-decoration: none; }
.preview-overlay .pv-body .pv-md a:hover { text-decoration: underline; }
.preview-overlay .pv-body .pv-md a.internal-link { border-bottom: 1px dashed var(--primary); cursor: pointer; }
.preview-overlay .pv-body .pv-md a.internal-link:hover { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.preview-overlay .pv-body .pv-md strong { font-weight: 700; }
.preview-overlay .pv-body .pv-md em { font-style: italic; color: var(--text-muted); }
.preview-overlay .pv-body .pv-md del { text-decoration: line-through; color: var(--text-light); }
.preview-overlay .pv-body .pv-md mark { background: rgba(251, 191, 36, 0.28); border-radius: 2px; padding: 0 2px; }
.preview-overlay .pv-body .pv-md code { font-family: var(--mono); font-size: 0.85em; background: var(--surface-3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; color: var(--primary); }
/* Code couleur (#hex, rgb(), nom) : pastille de la couleur au survol. */
.preview-overlay .pv-body .pv-md code.md-color { position: relative; cursor: help; }
.preview-overlay .pv-body .pv-md code.md-color::after {
	content: ''; position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%) scale(0.85);
	width: 64px; height: 30px; border-radius: 6px; background: var(--md-swatch);
	border: 1px solid var(--border-strong); box-shadow: var(--shadow-md);
	opacity: 0; pointer-events: none; transition: opacity 0.12s ease, transform 0.12s ease; z-index: 10;
}
.preview-overlay .pv-body .pv-md code.md-color:hover::after,
.preview-overlay .pv-body .pv-md code.md-color:focus-visible::after { opacity: 1; transform: translateX(-50%) scale(1); }
/* Damier de transparence sous une couleur dotée d'un canal alpha (rgba()/#RRGGBBAA). */
.preview-overlay .pv-body .pv-md code.md-color[data-alpha]::after {
	background-image:
		linear-gradient(45deg, var(--border) 25%, transparent 25%, transparent 75%, var(--border) 75%),
		linear-gradient(45deg, var(--border) 25%, transparent 25%, transparent 75%, var(--border) 75%);
	background-size: 12px 12px; background-position: 0 0, 6px 6px; background-color: #fff;
}
.preview-overlay .pv-body .pv-md pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; overflow-x: auto; margin: 0.9em 0; }
.preview-overlay .pv-body .pv-md pre code { background: none; border: none; padding: 0; font-size: 13px; color: var(--text); }
.preview-overlay .pv-body .pv-md blockquote { border-left: 3px solid var(--primary); margin: 0.9em 0; padding: 8px 14px; background: color-mix(in srgb, var(--primary) 8%, var(--surface)); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted); }
.preview-overlay .pv-body .pv-md ul, .preview-overlay .pv-body .pv-md ol { padding-left: 1.5em; margin: 0.7em 0; }
.preview-overlay .pv-body .pv-md li { margin: 0.2em 0; }
.preview-overlay .pv-body .pv-md li input[type=checkbox] { margin-right: 6px; accent-color: var(--primary); width: 13px; height: 13px; }
.preview-overlay .pv-body .pv-md table { width: 100%; border-collapse: collapse; margin: 0.9em 0; font-size: 0.92em; }
.preview-overlay .pv-body .pv-md caption { caption-side: bottom; font-size: 0.85em; color: var(--text-light); font-style: italic; padding: 0.5em 0; text-align: left; }
.preview-overlay .pv-body .pv-md th { background: var(--surface-3); border: 1px solid var(--border-strong); padding: 7px 11px; text-align: left; font-weight: 600; }
.preview-overlay .pv-body .pv-md td { border: 1px solid var(--border); padding: 6px 11px; color: var(--text-muted); }
.preview-overlay .pv-body .pv-md tr:nth-child(even) td { background: var(--surface-2); }
.preview-overlay .pv-body .pv-md hr { border: none; border-top: 2px solid var(--border-strong); margin: 1.8em 0; }
.preview-overlay .pv-body .pv-md img { max-width: 100%; border-radius: var(--radius-sm); }
.preview-overlay .pv-body .pv-md .md-frontmatter { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 11px 14px; margin: 0 0 1.3em; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; }
.preview-overlay .pv-body .pv-md .md-frontmatter .fm-row { display: flex; gap: 2px; align-items: baseline; }
.preview-overlay .pv-body .pv-md .md-frontmatter .fm-key { color: var(--text-light); font-weight: 600; min-width: 72px; }
.preview-overlay .pv-body .pv-md .md-frontmatter .fm-sep { color: var(--text-light); }
.preview-overlay .pv-body .pv-md .md-frontmatter .fm-val { color: var(--text-muted); flex: 1; word-break: break-word; }
.preview-overlay .pv-body .pv-md .md-toc { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 12px 16px; margin: 1em 0 1.6em; }
.preview-overlay .pv-body .pv-md .md-toc .md-toc-title { font-weight: 700; font-size: 0.9em; margin-bottom: 0.5em; color: var(--text); }
.preview-overlay .pv-body .pv-md .md-toc ul { padding-left: 1.2em; margin: 0; }
.preview-overlay .pv-body .pv-md .md-toc li { margin: 0.15em 0; }
.preview-overlay .pv-body .pv-md .md-footnotes { margin-top: 2.2em; padding-top: 0.9em; border-top: 1px solid var(--border-strong); font-size: 0.88em; color: var(--text-muted); }
.preview-overlay .pv-body .pv-md .md-footnotes .md-footnotes-title { font-weight: 700; font-size: 0.9em; color: var(--text); margin-bottom: 0.5em; }
.preview-overlay .pv-body .pv-md .md-footnotes ol { padding-left: 1.4em; }
.preview-overlay .pv-body .pv-md .md-footnotes li { margin: 0.3em 0; line-height: 1.6; }
.preview-overlay .pv-body .pv-md .md-footnotes .fn-back { text-decoration: none; }
.preview-overlay .pv-body .pv-md sup.fn-ref { font-size: 0.75em; vertical-align: super; }
/* Coloration syntaxique (tokens générés par le moteur markdown) */
.preview-overlay .pv-md .tok-kw { color: #c792ea; }
.preview-overlay .pv-md .tok-str { color: #a5d6a7; }
.preview-overlay .pv-md .tok-num { color: #f78c6c; }
.preview-overlay .pv-md .tok-com { color: #6b7280; font-style: italic; }
.preview-overlay .pv-md .tok-fn { color: #82aaff; }
.preview-overlay .pv-md .tok-bool { color: #f78c6c; }
.preview-overlay .pv-md .tok-tag { color: #f07178; }
.preview-overlay .pv-md .tok-attr { color: #ffcb6b; }
.preview-overlay .pv-msg { color: var(--text-muted); font-size: 0.92rem; text-align: center; padding: 2rem; }

/* --- Mode diaporama markdown (plein écran, navigation) --- */
.preview-overlay.pv-slideshow .pv-body { background: var(--surface-2); place-items: stretch; }
.preview-overlay.pv-slideshow .pv-body .pv-md { min-height: 100%; box-shadow: var(--shadow-md); scroll-behavior: smooth; }
.preview-overlay.pv-slideshow .pv-body .pv-md .pv-md-inner { max-width: 920px; padding: 3rem 3.5rem; }
.pv-slide-nav { display: flex; align-items: center; gap: 0.5rem; flex: none; padding: 0.5rem 0.9rem; background: var(--surface-3); border-top: 1px solid var(--border); }
.pv-slide-nav .pv-slide-info { flex: 1; min-width: 0; font-size: 0.8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-slide-nav .pv-slide-counter { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text); font-size: 0.82rem; }
.pv-slide-nav button { width: auto; padding: 0.35rem 0.7rem; }
.pv-slide-nav button:disabled { opacity: 0.35; cursor: default; }

/* --- Pied de page --- */

/* --- Desktop --- */
@media (min-width: 768px) {
	.app-shell { padding: 0 1.5rem 2.5rem; }
	.card { padding: 1.4rem; }
	.card.tabs-card, .card.sync-bar, .card.client-bar { padding: 0.75rem 1rem; }
	.card.tabs-card { padding: 0; }
}

/* --- Mouvement réduit --- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
	.hero-illustration rect:has(animateTransform) { display: none; }
}

/* ===== Alignement charte : aplats sans dégradé + bleu d'action = navy ===== */
.brand-mark{background:var(--navy)}
.hero-section h2{background:none;color:var(--navy);-webkit-background-clip:border-box;background-clip:border-box;-webkit-text-fill-color:var(--navy)}
.progressBar{background:var(--accent)}
:root{--primary:var(--navy);--primary-strong:var(--navy-deep);--accent:#4f46e5}
/* Toast : géométrie fermée (ni étiré par top+bottom concurrents, ni ovale),
   palette charte — écrase aussi le top:50%/radius venant de style.css */
#custom-alert{top:auto;bottom:1.4rem;left:50%;right:auto;transform:translateX(-50%) translateY(16px);background:var(--navy);color:#fff;padding:.8rem 1.3rem;border-radius:12px;width:auto;max-width:92vw;line-height:1.4;font-size:.95rem;text-align:center}
#custom-alert.visible{opacity:1;transform:translateX(-50%) translateY(0)}
#custom-alert-message{margin:0;color:#fff}