/* D066: compact Product file. Rules stay under .article-file and reuse KA tokens, shared tabs, buttons and focus. */
.detail-grid.article-file-container{display:block;margin:0}
.article-file{display:grid;gap:12px;min-width:0;width:100%;font-size:16px}
.article-file [hidden]{display:none!important}
.article-file h3{font-size:14px;font-weight:700;color:#536578;margin:0}

/* Summary: alerts, at most four essential values and the actions that act on them. */
.article-file-summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;min-width:0;padding:10px 14px;background:var(--surface,#fff);border:1px solid var(--border,#e0e7ee);border-radius:10px}
.article-file-flags{display:flex;flex-wrap:wrap;gap:6px;margin:0}
.article-file-flags:empty,.article-file-facts:empty{display:none}
.article-file-flag{display:inline-flex;align-items:center;min-height:28px;padding:2px 10px;border:1px solid #ead7a1;border-radius:14px;background:#fff4d8;color:#664e1c;font-size:14px;font-weight:600}
.article-file-flag.is-mode{border-color:#cfe3dc;background:#edf4f2;color:#175e4e}
.article-file-facts{display:flex;flex-wrap:wrap;gap:4px 24px;flex:1 1 320px;min-width:0;margin:0}
.article-file-facts>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px;min-width:0}
.article-file-facts dt{font-size:14px;color:#536578}
.article-file-facts dd{margin:0;font-weight:600;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.article-file .article-file-summary>.detail-actions{flex:0 1 auto;justify-content:flex-end;margin:0 0 0 auto}
.article-file-notice.notice{margin:0;padding:8px 12px;font-size:14px}
.article-file-status{margin:0;font-size:14px;line-height:1.5;color:#175e4e}
.article-file-preview{min-width:0;padding:8px 12px;border-left:3px solid var(--accent,#217a66);background:var(--surface,#fff);overflow-wrap:anywhere}
.article-file-preview>h3{margin-bottom:4px}
.article-file-preview>.article-file-fields{max-width:40rem}
.article-file-preview:empty,.article-file-status:empty{display:none}

/* Tabs keep the shared DetailWorkspace pattern; panels show label/value rows in balanced columns. */
.article-file .detail-tabs{margin:0;padding-bottom:2px;border-bottom:1px solid var(--border,#e0e7ee)}
.article-file .detail-tabs button{flex:0 1 auto}
.article-file-sections{min-width:0}
.article-file .article-file-panel{min-width:0;padding:12px 16px 4px;background:var(--surface,#fff);border:1px solid var(--border,#e0e7ee);border-radius:10px}
.article-file-columns{columns:2 20rem;column-gap:32px}
.article-file .article-file-section{break-inside:avoid;min-width:0;margin:0 0 14px;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.article-file-section>h3{padding:2px 0 4px;border-bottom:1px solid var(--border,#e0e7ee)}
.article-file-fields{margin:0}
.article-file-field{display:grid;grid-template-columns:minmax(0,11fr) minmax(0,10fr);align-items:baseline;gap:2px 12px;min-width:0;padding:6px 0;border-bottom:1px solid #edf1f5}
.article-file-field>dd{grid-column:2;min-width:0;margin:0}
.article-file-label{font-size:14px;line-height:1.4;color:#536578;overflow-wrap:anywhere}
.article-file .article-file-value.is-number,.article-file-input input[type="text"].is-number{text-align:right}
.article-file-check{display:inline-flex;align-items:center;gap:8px;min-height:44px}
.article-file-check input{width:20px;height:20px;margin:0}
.article-file-value{font-size:16px;line-height:1.4;color:#17283b;white-space:pre-wrap;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.article-file-hint{font-size:14px;line-height:1.4;color:#536578}
.article-file-field>.article-file-hint{grid-column:1/-1}
.article-file-field.is-editable{padding-left:8px;padding-right:8px;background:#f6faf9;border-radius:6px}
.article-file-field[data-changed]{box-shadow:inset 3px 0 var(--accent,#217a66)}
.article-file-input{display:grid;gap:4px;margin:6px 0 2px;font-size:14px;color:#536578}
.article-file input,.article-file select{box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:44px;font-size:16px}

/* Secondary technical information, folded by default. */
.article-file-technical{margin:0 0 4px;border-top:1px solid var(--border,#e0e7ee)}
.article-file-columns+.article-file-technical{margin-top:-2px}
.article-file-panel>.article-file-technical:first-child{border-top:0}
.article-file-technical>summary{display:list-item;min-height:44px;padding:10px 0;box-sizing:border-box;cursor:pointer;font-size:14px;font-weight:600;color:#536578}
.article-file-technical>p{margin:4px 0 8px}
.article-file-technical>.article-file-fields{columns:2 20rem;column-gap:32px}
.article-file-technical .article-file-field{break-inside:avoid}

/* Product file page only (DetailWorkspace kind article-file): host actions share the title row when there is room. */
@media(min-width:1200px){
 .detail-page[data-kind="article-file"]:not([hidden]){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;column-gap:16px}
 .detail-page[data-kind="article-file"]>.detail-page-body,.detail-page[data-kind="article-file"]>.detail-page-body>.client-file-page{display:contents}
 .detail-page[data-kind="article-file"]>.detail-page-heading{grid-column:1;grid-row:1}
 .detail-page[data-kind="article-file"] .client-file-page>.detail-actions{grid-column:2;grid-row:1;align-self:center;margin:0}
 .detail-page[data-kind="article-file"] .client-file-page>:not(.detail-actions){grid-column:1/-1}
}
@media(max-width:650px){
 .article-file-summary,.article-file .article-file-panel{padding-left:12px;padding-right:12px}
 .article-file .article-file-summary>.detail-actions{flex:1 1 100%;justify-content:stretch;margin:0}
 .article-file .article-file-summary>.detail-actions button{flex:1 1 140px}
 .article-file .detail-tabs{flex-wrap:nowrap;overflow-x:auto;scroll-snap-type:x proximity;scroll-padding:0 6px;scrollbar-width:thin;margin:0 -6px;padding:6px 6px 8px}
 .article-file .detail-tabs button{flex:0 0 auto;white-space:nowrap;scroll-snap-align:start}
 .detail-page[data-kind="article-file"] .client-file-page>.detail-actions{justify-content:stretch}
 .detail-page[data-kind="article-file"] .client-file-page>.detail-actions button{flex:1 1 140px}
}
@media(max-width:480px){
 .article-file-field{grid-template-columns:minmax(0,1fr)}
 .article-file-field>dd{grid-column:1}
}

/* D067: editing stays in the same field row; reference search is scoped to the Product file. */
.article-file-reference{display:grid;gap:8px;min-width:0}
.article-file-reference label{display:grid;gap:4px;min-width:0;margin:0;font-size:14px;color:#536578}
.article-file-reference-tools{display:flex;align-items:end;gap:8px;min-width:0}
.article-file-reference-tools>label{flex:1;min-width:0}
.article-file-reference-tools>button{flex:none;min-height:44px}
.article-file-reference>.article-file-hint{margin:0}
.article-file-vat-preview{margin-top:12px;padding-top:8px;border-top:1px solid var(--border,#e0e7ee)}
@media(max-width:480px){.article-file-reference-tools{flex-wrap:wrap}.article-file-reference-tools>label{flex-basis:100%}}
/* D069 : recherche du référentiel sur sa propre ligne dans les colonnes étroites. */
.article-file-reference-tools{flex-wrap:wrap}
.article-file-reference-tools>label{flex-basis:100%}
/* Calcul du prix de vente : simulation sous les marges, contrôles en grille souple, tableau Kwisatz / simulé. */
.article-file .article-pricing{margin:4px 0 14px;padding-top:8px;border-top:1px solid var(--border,#e0e7ee)}
.article-pricing>p{margin:4px 0}
.article-pricing-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr));gap:8px 16px;margin:8px 0 4px}
.article-pricing-controls>[hidden]{display:none}
.article-pricing-controls input.is-number{text-align:right}
.article-pricing-message:empty{display:none}
.article-pricing-result{max-width:40rem;overflow-x:auto}
.article-pricing-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.article-pricing-table th,.article-pricing-table td{padding:6px 8px;border-bottom:1px solid #edf1f5;text-align:right;white-space:nowrap}
.article-pricing-table th{background:transparent}
.article-pricing-table th:first-child{text-align:left;font-weight:400;color:#536578;white-space:normal}
.article-pricing-table thead th{font-size:14px;font-weight:600;color:#536578}
.article-pricing-table tr.is-changed td:last-child{font-weight:700;color:#175e4e;box-shadow:inset 3px 0 var(--accent,#217a66)}
@media(max-width:480px){.article-pricing-table th,.article-pricing-table td{padding:6px 4px;font-size:14px}}
