/* EDO Gestion 0.5.0: shared screen components. Document print rules stay separate. */
:root{--edo-ink:#202124;--edo-muted:#62676b;--edo-line:#e0e3df;--edo-accent:#2b7139;--edo-blue:var(--edo-accent);--edo-radius:8px;--edo-gap:12px}
.edo-icon{width:19px;height:19px;flex:0 0 19px;vertical-align:middle;pointer-events:none}
.edo-icon{display:block}
.edo-icon-up{transform:rotate(180deg)}
[hidden]{display:none!important}
@media screen{
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#fff;color:var(--edo-ink)}
body.edo-ui-0437 :is(.topbar,.simple-nav,.edo-pagebar){background:#fff!important;color:var(--edo-ink)!important;border-color:var(--edo-line)!important;box-shadow:none!important}
body.edo-ui-0437 :is(.simple-nav,.edo-pagebar) :is(strong,span,a,time,.edo-nav-date){color:var(--edo-ink)!important}
body.edo-ui-0437 .button,body.edo-ui-0437 button[type=submit]{background:var(--edo-accent)!important;border-color:var(--edo-accent)!important;color:#fff!important}
body.edo-ui-0437 .button:is(.ghost,.secondary){background:#f4f5f3!important;border-color:var(--edo-line)!important;color:var(--edo-ink)!important}
body.edo-ui-0437 .button.danger,body.edo-ui-0437 button.danger{background:#fff7f7!important;border-color:#e9c4c4!important;color:#a52b2b!important}
body.edo-ui-0437 .notice.success{background:#e5f3dc;color:#245c2d;border-color:#cfe7c0}
body.edo-ui-0437 :is(.edo-pagebar-title,.module-heading) :is(h1,h2,strong){color:var(--edo-ink)!important}
*,*::before,*::after{box-sizing:border-box}
.page{min-width:0}
.topbar .global-controls select.global-control{font-size:16px!important}
button,a,input,select,textarea,summary{touch-action:manipulation}
.button,.icon-button,.row-actions a,.row-actions button,details>summary{min-height:40px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:normal;line-height:1.25}
.edo-icon-action,.row-actions .icon-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;min-width:40px;min-height:40px;padding:8px;margin:0;border:1px solid var(--edo-line);border-radius:var(--edo-radius);background:#fff;color:var(--edo-ink);line-height:1;text-decoration:none}
.icon-button.edit{color:var(--edo-accent);background:#f4f8f2;border-color:#cedfc8}
.icon-button.transfer{color:#177865;background:#f2fbf8;border-color:#b8e2d6}
.icon-button.danger{color:#b52e32;background:#fff7f7;border-color:#f0c9ca}
.icon-button.preview,.icon-button.receipt{color:var(--edo-ink);background:#f6f7f5}
.icon-button:focus-visible{outline:2px solid var(--edo-blue);outline-offset:2px}
.pagebar-logout::before,.pagebar-logout::after{content:none!important}
.row-actions{display:flex!important;flex-wrap:wrap!important;gap:6px!important;align-items:center!important;position:static!important;min-width:0!important}
.row-actions form{display:inline-flex;margin:0;min-width:0}
.edo-nav-links a,.other-menu-links a,.edo-quick-link,.edo-pagebar-back{display:flex;align-items:center;gap:9px;min-height:42px}
.other-menu-links a{white-space:normal!important;min-width:0;line-height:1.3!important;padding:10px 12px!important}
.other-menu-links a>span,.edo-quick-link>span{min-width:0;overflow-wrap:anywhere}
.other-menu>summary{display:flex;align-items:center;gap:8px}
.edo-pagebar-title{min-width:0}
.edo-pagebar-title strong{font-size:clamp(16px,2vw,20px)!important;line-height:1.3!important;white-space:normal!important;overflow-wrap:anywhere}
.edo-heading-redundant-0437{display:none!important}
.edo-context-heading-0437{margin-bottom:10px}
body.edo-unified-form-0437 .page{max-width:1120px;margin-inline:auto}
body.edo-unified-form-0437 :is(.panel,.gestion-bills-panel,.invoice43-sheet){border:1px solid var(--edo-line);border-radius:var(--edo-radius);box-shadow:none!important;padding:clamp(12px,2.5vw,22px)!important}
body.edo-unified-form-0437 :is(.form-grid,.gestion-bills-fields){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:var(--edo-gap)!important}
body.edo-unified-form-0437 :is(label,.form-grid>*,.gestion-bills-fields>*){min-width:0}
body.edo-unified-form-0437 :is(label,.invoice43-field>span){font-size:13px!important;font-weight:600;line-height:1.4}
body.edo-unified-form-0437 :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){font-size:16px!important;max-width:100%;min-width:0;min-height:42px;border:1px solid var(--edo-line);border-radius:6px;padding:9px 10px;background:#fff;line-height:1.35}
body.edo-unified-form-0437 :is(input,select,textarea):focus-visible{outline:2px solid var(--edo-blue);outline-offset:2px}
.form-wide,.edo-form-group-label-0437,.form-actions{grid-column:1/-1}
.edo-form-group-label-0437{font-size:12px;font-weight:750;color:var(--edo-muted);margin-top:7px;padding-top:9px;border-top:1px solid #edf0f4}
.form-actions,.gestion-bills-action-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:12px}
.data-table{max-width:100%;min-width:0;overflow-x:auto}
.data-table table{width:100%;border-collapse:collapse;table-layout:auto}
.data-table th{text-align:left;color:var(--edo-muted);font-size:12px;font-weight:650;background:#f6f8fb}
.data-table td,.data-table th{padding:10px 12px;border-bottom:1px solid var(--edo-line)}
.data-table td,.data-table th{overflow-wrap:anywhere;vertical-align:middle}
.data-table td>small{display:block;white-space:normal}
.data-table td:has(.row-actions){min-width:100px}
.edo-nav-context,.edo-nav-user{min-width:0}
.edo-nav-user>*,.edo-nav-context>*{overflow-wrap:anywhere}
.revenue-share progress{width:100%;height:8px;border:0;accent-color:var(--edo-blue)}
.revenue-share progress::-webkit-progress-bar{background:#e8edf3;border-radius:4px}
.revenue-share progress::-webkit-progress-value{background:var(--edo-blue);border-radius:4px}
.gestion-scan-choice{display:flex;align-items:center;gap:8px}
.gestion-scan-choices{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
.gestion-scan-choice{position:relative!important;display:flex!important;flex-wrap:wrap;align-items:center!important;justify-content:center!important;gap:8px!important;min-width:0!important;min-height:64px!important;padding:10px!important;border:1px solid var(--edo-line)!important;border-radius:8px;background:#fff;font-size:13px!important;text-align:center;overflow:hidden}
.gestion-scan-choice input[type=file]{position:absolute!important;inset:0!important;opacity:0;width:100%!important;height:100%!important;cursor:pointer;margin:0!important}
.gestion-scan-choice:focus-within{outline:2px solid var(--edo-blue);outline-offset:2px}
.gestion-scan-hint{font-size:12px!important;line-height:1.45}
.gestion-scan-box{padding:12px!important}
.gestion-scan-actions{flex-wrap:wrap;gap:10px}
.gestion-scan-language{min-width:0;flex:1 1 170px}
.gestion-scan-progress,#gestion-scan-progress{overflow-wrap:anywhere}
.invoice43-sheet{max-width:100%}
.edo-quick-link .edo-icon,.other-menu-links .edo-icon{color:var(--edo-blue)}
/* Admin module headers are flex rows: the icon never consumes a text grid column. */
.sa-module-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-block:16px}
.sa-module{min-width:0;border:1px solid var(--edo-line);border-radius:var(--edo-radius);background:#fff;overflow:hidden}
.sa-module>summary,.sa-module-link{display:flex;align-items:flex-start;gap:10px;padding:14px;min-width:0;cursor:pointer;list-style:none;color:var(--edo-ink);text-decoration:none}
.sa-module>summary::-webkit-details-marker{display:none}
.sa-module>summary::after{content:'⌄';margin-left:auto;flex:none}
.sa-module>summary>.edo-icon,.sa-module-link>.edo-icon{margin-top:3px;color:var(--edo-blue)}
.sa-module>summary>span,.sa-module-link>span{flex:1;min-width:0}
.sa-module strong,.sa-module small{display:block;white-space:normal;overflow-wrap:break-word;word-break:normal}
.sa-module strong{font-size:16px;line-height:1.35}
.sa-module small{margin-top:3px;font-size:12px;line-height:1.45;color:var(--edo-muted)}
.sa-module-content{min-width:0;padding:0 14px 14px}
.sa-company-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:10px;padding-block:12px}
.sa-company-card{display:flex;align-items:center;gap:12px;min-width:0;padding:12px;border:1px solid var(--edo-line);border-radius:var(--edo-radius);background:#fff}
.sa-company-card>div{min-width:0;flex:1}
.sa-company-card span{font-size:11px;color:var(--edo-muted)}
.sa-company-card h3{margin:3px 0;font-size:15px;line-height:1.35;overflow-wrap:break-word}
.sa-company-card p{margin:0;font-size:12px;color:var(--edo-muted);line-height:1.4}
.sa-company-card form{margin:0;flex:none}
.sa-open-company{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:8px;border:1px solid var(--edo-line);border-radius:6px;background:#f6f8fb;color:var(--edo-ink)}
}
@media screen and (max-width:640px){
.topbar,.global-controls,.edo-nav-links,.edo-nav-right,.edo-pagebar{flex-wrap:wrap!important;min-width:0}
.header-company-switch{min-width:0!important;flex:1 1 150px}
.header-company-switch select{width:100%;min-width:0!important;max-width:100%}
.simple-nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;padding:10px 12px!important}
.edo-nav-context{grid-area:1/1;position:static!important}
.edo-nav-context strong{white-space:normal!important;overflow:visible!important;font-size:12px!important}
.edo-nav-right{grid-area:1/2;position:static!important;display:flex!important;flex-direction:column!important;align-items:flex-end!important;gap:2px!important;width:100%!important}
.simple-nav .edo-nav-user{display:grid!important;position:static!important;max-width:100%!important;text-align:right;visibility:visible!important}
.edo-nav-user>span{font-size:10px!important}
.edo-nav-links{grid-area:2/1/3/3;position:static!important;justify-content:flex-start!important;gap:12px!important}
.edo-nav-date{flex-shrink:0}
.page{width:100%!important;padding:12px!important}
body.edo-unified-form-0437 :is(.form-grid,.gestion-bills-fields){grid-template-columns:minmax(0,1fr)!important}
.edo-pagebar{gap:8px!important;padding:10px 12px!important}
.edo-pagebar-title{flex:1 1 180px!important}
.edo-pagebar :is(.button,summary){min-height:42px}
/* One label above each value; no absolute-positioned labels or fixed row heights. */
.data-table:not(.output-table) table,.data-table:not(.output-table) tbody{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important}
.data-table:not(.output-table) thead{display:none!important}
.data-table:not(.output-table) tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px;border:0;border-bottom:1px solid var(--edo-line);padding:10px 0;margin:0;height:auto;min-height:0;background:#fff}
.data-table:not(.output-table) tbody td{display:block!important;position:static!important;width:auto!important;min-width:0!important;max-width:none!important;padding:0!important;margin:0!important;border:0!important;height:auto!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.45!important;font-size:14px!important}
.data-table:not(.output-table) tbody td::before{content:attr(data-label)!important;display:block!important;position:static!important;width:auto!important;font-size:11px!important;font-weight:600!important;color:var(--edo-muted)!important;margin:0 0 3px!important;padding:0!important;line-height:1.3!important;white-space:normal!important;text-transform:none!important}
.data-table:not(.output-table):not(.document-table):not(.edo-prestations-table) tbody td:first-child,.data-table:not(.output-table) tbody td:has(.row-actions),.data-table:not(.output-table) tbody td[colspan]{grid-column:1/-1!important}
.data-table:not(.output-table) tbody td:has(.row-actions)::before,.data-table:not(.output-table) tbody td[colspan]::before{content:none!important}
.data-table:not(.output-table) tfoot tr{display:flex!important;flex-wrap:wrap;gap:10px}
.data-table:not(.output-table) tfoot th{padding:6px;min-width:0;white-space:normal}
.row-actions{justify-content:flex-start!important}
.data-table td.edo-empty-cell{display:none!important}
.edo-clients-table tbody td:first-child::before,.edo-prestations-table tbody td:nth-child(2)::before{content:none!important}
.edo-prestations-table tbody td:nth-child(2){grid-column:1/-1;order:-1}
.edo-prestations-table tbody td:first-child{grid-column:auto!important}
/* Document identity and state share one row; the client gets the whole width. */
.data-table.document-table tbody tr{grid-template-columns:repeat(6,minmax(0,1fr))}
.data-table.document-table tbody td:first-child{grid-column:span 2;order:1}
.data-table.document-table tbody td:nth-child(3){grid-column:span 2;order:2}
.data-table.document-table tbody td:nth-child(4){grid-column:span 2;order:3}
.data-table.document-table tbody td:nth-child(2){grid-column:1/-1;order:4}
.data-table.document-table tbody td:nth-child(5){grid-column:span 3;order:5}
.data-table.document-table tbody td:nth-child(6){grid-column:span 3;order:6}
.data-table.document-table tbody td:has(.row-actions){grid-column:1/-1!important;order:7}
.data-table.document-quote tbody td:nth-child(5){grid-column:1/-1}
.sa-module>summary,.sa-module-link{padding:12px}
.sa-module-content{padding:0 12px 12px}
.other-menu-links{max-width:calc(100vw - 32px)!important}
.compact-finance-grid,.gestion-bills-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.invoice43-meta-row{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
.invoice43-identifiers{justify-content:stretch;grid-template-columns:minmax(0,1fr)}
.invoice43-sheet{padding:12px!important;border-radius:8px!important}
.invoice43-toolbar{flex-wrap:wrap;gap:8px}
.editable-table-wrap{max-width:100%;overflow-x:auto}
.form-actions .button,.gestion-bills-action-row .button{flex:1 1 140px}
}
@media print{.edo-icon{display:none!important}.document-output{overflow:visible!important}.output-table table thead{display:table-header-group}.output-table table tr{break-inside:avoid}.invoice-compact-head{break-inside:avoid}}
