/* Ergonomie globale 1.4 : lisibilité, priorités visuelles, interaction clavier/tactile. */
:root { --muted:#586980; --line:#dce3ed; --radius:12px; --shadow:0 4px 18px #172b4d06; }
:root[data-theme="dark"] { --muted:#afbdd1; --line:#354359; --shadow:0 4px 18px #00000012; }
body { line-height:1.55; }
main { min-width:0; max-width:none; padding:32px clamp(20px,2.5vw,48px); }
h1 { font-size:clamp(25px,2.2vw,34px); line-height:1.2; letter-spacing:-.7px; }
h2 { font-size:19px; line-height:1.35; }
h3 { font-size:16px; }
.page-heading { align-items:center; margin-bottom:28px; padding-bottom:22px; border-bottom:1px solid var(--line); }
.eyebrow { font-size:11px; letter-spacing:1.3px; margin-bottom:8px; }
.scope-label { font-size:12px; padding:8px 12px; }
.page-description,.muted,.welcome p { font-size:14px; }
.panel { padding:24px; margin:22px 0; }
.section-heading p,.section-heading > a { font-size:13px; }
.section-heading > a { min-height:40px; }
.stat { padding:22px; gap:12px; }
.stat-label { font-size:13px; }
.stat > small { font-size:12px; line-height:1.5; }
.stat > strong { font-size:32px; }
.activity strong,.stock-alert strong,.quick-actions > a { font-size:14px; }
.activity small,.stock-alert small,.mini-report > div,.mini-report p { font-size:12px; }
.activity { padding:17px 0; }
.activity:hover,.quick-actions > a:hover { background:var(--surface-soft); }
button,.button { min-height:44px; padding:10px 16px; font-size:13px; font-weight:650; border-radius:9px; line-height:1.4; }
button:not(:disabled),a,input,select,textarea { -webkit-tap-highlight-color:transparent; }
button:disabled { cursor:not-allowed; }
button.is-loading { cursor:wait; }
.icon-button { min-width:44px; min-height:44px; padding:11px; }
.small,.pagination .button { min-height:40px; }
a { text-underline-offset:3px; }
.sidebar nav a { min-height:44px; font-size:13px; }
.sidebar a[aria-current="page"] { box-shadow:inset 3px 0 0 #97b4ff; }
.breadcrumb { font-size:12px; }
.toolbar,.modal-create-toolbar { gap:12px; margin:0 0 18px; align-items:center; justify-content:space-between; }
.toolbar .actions { gap:8px; }
.toolbar .modal-launch { margin:0; }
.search { flex:1 1 340px; width:100%; max-width:620px; flex-wrap:wrap; gap:8px; }
.search input { flex:1 1 180px; width:auto; margin:0; }
.search button { flex:none; }
.search-reset { font-size:13px; padding:10px 5px; }
.filter-tabs { gap:8px; margin:18px 0; padding:0; }
.filter-tabs a { min-height:40px; display:inline-flex; align-items:center; padding:9px 14px; font-size:13px; border-radius:9px; }
.filter-tabs .active { border-color:var(--primary); background:var(--primary-soft); }
.table-wrap { padding:0; scrollbar-width:thin; scrollbar-color:var(--muted) var(--surface-soft); }
.panel.table-wrap { max-height:68vh; scroll-padding:60px; overscroll-behavior:contain; }
table { font-size:14px; }
th { font-size:11px; letter-spacing:.45px; padding:15px 18px; color:var(--ink); }
thead th { position:sticky; top:0; z-index:1; box-shadow:0 1px 0 var(--line); }
td { padding:17px 18px; line-height:1.5; }
td > strong { font-size:14px; }
td small { font-size:12px; }
tbody tr:nth-child(even) { background:var(--surface-soft); }
tbody tr:hover,tbody tr:focus-within { background:var(--primary-soft); }
td .quantity { font-size:16px; }
.cell-number { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.cell-actions { min-width:190px; }
.cell-actions > a { display:inline-flex; align-items:center; min-height:40px; margin-right:10px; font-weight:600; }
.cell-actions .inline-action { margin:4px 6px 4px 0; }
.badge { font-size:11px; padding:5px 9px; border-radius:6px; }
.table-help { color:var(--muted); font-size:12px; margin:8px 0 12px; display:flex; align-items:center; gap:6px; }
.table-help[hidden] { display:none; }
.pagination { padding:14px 0; margin:10px 0 24px; font-size:13px; flex-wrap:wrap; }
label { font-size:14px; line-height:1.5; }
input,select,textarea { min-height:46px; font-size:15px; padding:11px 13px; border-color:var(--line); margin-top:8px; }
input:hover:not(:disabled),select:hover:not(:disabled),textarea:hover:not(:disabled) { border-color:var(--muted); }
input:focus,select:focus,textarea:focus { outline:3px solid var(--primary-soft); border-color:var(--primary); }
input[type="checkbox"] { min-height:18px; width:18px; height:18px; }
.check { min-height:40px; padding:8px 0; }
.field-hint,legend { font-size:13px; }
fieldset { background:var(--surface-soft); padding:20px; }
textarea { min-height:120px; resize:vertical; }
input[type="file"]::file-selector-button { border:0; border-radius:6px; padding:8px 12px; margin-right:12px; background:var(--primary-soft); color:var(--primary); cursor:pointer; }
.notice { font-size:14px; line-height:1.6; border:1px solid currentColor; }
.notice small { font-size:12px; }
.empty { padding:48px 24px; }
.empty h3 { font-size:17px; }
.empty p { font-size:14px; max-width:440px; }
.details dt { font-size:13px; }
.details dd { font-size:15px; }
.footer { font-size:12px; margin-top:32px; }
.editor-head { padding:18px 24px; }
.editor-head h2 { font-size:20px; }
.editor-body { padding:24px; }
.editor-body .form-grid { gap:22px 24px; }
.editor-body .stack { grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.editor-body .stack > button { grid-column:1/-1; justify-self:end; }
.editor-footer { padding-top:16px; border-top:1px solid var(--line); }
.embedded-form .page-heading { padding-bottom:16px; }
.embedded-form .page-heading h1 { font-size:22px; }
.embedded-form .form-actions { padding-bottom:12px; }
:focus-visible { outline:3px solid var(--primary); outline-offset:3px; }
@media(max-width:1100px) { .scope-label { display:none; } .dashboard-grid { grid-template-columns:1fr; } }
@media(max-width:700px) {
 main { padding:22px 16px; }
 .page-heading { margin-bottom:20px; padding-bottom:18px; }
 .panel { padding:18px; }
 .table-wrap { padding:0; }
 .toolbar,.modal-create-toolbar { align-items:stretch; }
 .toolbar > .actions { display:flex; flex-wrap:wrap; }
 .toolbar > .actions > * { flex:1 1 140px; }
 .modal-create-toolbar > .modal-launch { width:100%; margin:0; }
 .search { max-width:none; flex-basis:100%; }
 .search input { flex-basis:140px; }
 .filter-tabs { flex-wrap:nowrap; overflow-x:auto; padding:3px 3px 8px; }
 .filter-tabs a { white-space:nowrap; flex:none; }
 .stats { gap:10px; }
 .stat { padding:16px; }
 .stat-label { font-size:12px; }
 .stat > strong { font-size:27px; }
 .stat > small { font-size:11px; }
 .stat-icon { display:none; }
 td,th { padding:14px; }
 td { min-width:110px; }
 .panel.table-wrap { max-height:70vh; }
 .cell-actions { min-width:185px; }
 .editor-body,.editor-head { padding:16px; }
 .editor-body .stack { grid-template-columns:1fr; }
 .editor-body .stack > button { justify-self:stretch; }
 input,select,textarea { font-size:16px; }
 .form-actions { flex-wrap:wrap; }
 .form-actions > button,.form-actions > a { flex:1; }
 .welcome { padding:20px; }
 .notification-heading { gap:8px; }
 .pagination { gap:12px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; animation:none !important; } }
@media print {
 .sidebar,.topbar,.toolbar,.modal-create-toolbar,.footer,.filter-tabs,.pagination,.cell-actions { display:none !important; }
 main { margin:0; padding:0; }
 .panel.table-wrap { max-height:none; overflow:visible; }
 table { font-size:10pt; }
 thead { display:table-header-group; }
 thead th { position:static; }
 tr { break-inside:avoid; }
}
.cell-actions button { padding:8px 10px; font-size:12px; }
.cell-actions .modal-launch { margin-left:0; margin-right:4px; }
