:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#23302e;background:#f6f8f7;font-size:15px}*{box-sizing:border-box}body{margin:0;min-height:100vh}a{color:#157161;text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,p{margin-top:0}h1{font-size:2.2rem;letter-spacing:-.035em;margin-bottom:.4rem}h2{font-size:1.17rem;letter-spacing:-.01em}h3{font-size:1rem}button,input,select,textarea{font:inherit}button{cursor:pointer}.topbar{height:70px;background:#fff;border-bottom:1px solid #e2e9e5;display:flex;align-items:center;gap:3rem;padding:0 max(24px,calc((100vw - 1440px)/2));box-shadow:0 1px 3px #13291f0a}.brand{display:flex;align-items:center;gap:.65rem;color:#163c34;font-weight:800;font-size:1.15rem;white-space:nowrap}.brand:hover{text-decoration:none}.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#147762;color:#fff}.brand-sub{font-weight:500;color:#7a8b84;font-size:.82rem}.topbar nav{display:flex;gap:1.7rem}.topbar nav a{color:#40534d;font-weight:600}.logout{margin-left:auto}.logout button{background:none;border:0;color:#71817b}.container{max-width:1440px;margin:auto;padding:34px 24px 64px}.footer{text-align:center;color:#899a93;padding:25px;font-size:.8rem}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:28px}.eyebrow{font-size:.7rem;color:#1b8b70;letter-spacing:.15em;font-weight:800;margin-bottom:8px}.muted{color:#7a8b84}.back{display:inline-block;margin-bottom:12px;font-weight:600}.section{margin-top:32px}.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;gap:12px}.section-title h2,.section-title h3{margin:0}.card{background:#fff;border:1px solid #e2e9e5;border-radius:14px;box-shadow:0 2px 12px #163c3408}.button{display:inline-flex;justify-content:center;align-items:center;border-radius:9px;padding:11px 16px;font-weight:700;border:1px solid transparent;white-space:nowrap}.button:hover{text-decoration:none}.button.primary{background:#137b63;color:#fff}.button.primary:hover{background:#0b6954}.button.ghost{background:#fff;color:#176d5a;border-color:#b8d4c8}.button.subtle{background:#f5f7f6;color:#657770}.button.warning{background:#fff5e8;color:#9e5d0d;border-color:#f2d1a7}.button.small{padding:7px 10px;font-size:.85rem}.totals-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:14px}.total-card{padding:20px}.total-card h3{color:#52665c;margin-bottom:15px}.amount{font-size:1.85rem;font-weight:800;letter-spacing:-.04em;margin-bottom:6px}.amount small{font-size:.8rem;color:#86938c;font-weight:600}.total-card .muted{font-size:.85rem;margin:0}.filters{padding:18px;display:grid;grid-template-columns:2fr repeat(3,1fr);gap:12px;align-items:end}.filters .wide{grid-column:span 2}.filters label,.form-card label,.edit-panel label,.login-card label{display:flex;flex-direction:column;gap:6px;color:#52655c;font-size:.82rem;font-weight:700}.filters input,.filters select,.form-card input,.form-card textarea,.edit-panel input,.edit-panel select,.edit-panel textarea,.login-card input{width:100%;border:1px solid #ccd8d1;border-radius:8px;background:#fff;color:#203c32;padding:10px 11px;min-height:42px;outline-color:#168469}.filters button{align-self:end}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%}th{text-align:left;background:#f8faf9;color:#788c80;font-size:.75rem;text-transform:uppercase;letter-spacing:.06em}th,td{padding:14px 16px;border-bottom:1px solid #edf1ee;vertical-align:middle}tbody tr:last-child td{border-bottom:0}td{color:#3d5148;font-size:.9rem}.strong-link{font-weight:750}.badge{display:inline-block;border-radius:50px;padding:5px 10px;background:#fff5df;color:#986010;font-size:.75rem;font-weight:750;white-space:nowrap}.badge.valide{background:#e6f5ed;color:#24734e}.badge.doublon{background:#fbe9e9;color:#a64545}.badge.large{font-size:.85rem;padding:8px 14px}.list>a,.list>div{display:flex;justify-content:space-between;gap:18px;padding:15px 20px;border-bottom:1px solid #edf1ee}.list>*:last-child{border-bottom:0}.empty{padding:28px;color:#89988e;text-align:center}.form-card{max-width:620px;padding:25px}.form-card form,.login-card form{display:grid;gap:18px}.hint{color:#849389;font-size:.86rem;line-height:1.5}.login-card{max-width:420px;margin:70px auto;padding:30px}.message,.alert,.notice{padding:13px 16px;border-radius:9px;margin-bottom:18px;background:#e7f4ed;color:#1d684b}.message.error,.alert{background:#fff0eb;color:#9b422c}.message.info,.notice{background:#eaf3f8;color:#3d6680}.progress-card{padding:24px}.progress-heading{display:flex;justify-content:space-between;margin-bottom:12px}progress{width:100%;height:12px;accent-color:#157d63}.review-layout{display:grid;grid-template-columns:minmax(400px,1fr) minmax(530px,1.18fr);gap:18px;align-items:start}.pdf-panel,.edit-panel{overflow:hidden}.panel-heading{display:flex;justify-content:space-between;align-items:center;padding:18px 22px;border-bottom:1px solid #edf1ee}.panel-heading h2{margin:0}.pdf-panel{position:sticky;top:16px}.pdf-panel iframe{display:block;width:100%;height:72vh;border:0;background:#e5e9e7}.page-links{display:flex;gap:6px;padding:10px 20px;overflow:auto}.page-button{border:1px solid #d5e4dc;background:#fff;border-radius:7px;padding:6px 10px;color:#45705d}.page-button.active{background:#e1f1e8;border-color:#8cbfa6;font-weight:700}.edit-panel form{padding:20px 22px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.line-heading{margin:24px 0 10px}.lines{display:grid;gap:10px}.line-card{background:#f8faf8;border:1px solid #e3ebe5;border-radius:9px;padding:12px}.line-grid{display:grid;grid-template-columns:1fr 1.7fr 1fr .75fr 1fr auto;gap:8px;align-items:end}.line-grid .delete-line{white-space:nowrap}.delete-line input{width:auto!important;min-height:auto!important}.full{margin-top:20px}.valuation{display:flex;justify-content:space-between;align-items:center;gap:18px;background:#f0f6f2;border-radius:8px;padding:15px;margin:20px 0;color:#265d45}.valuation span{color:#75877b;line-height:1.5}.valuation strong{color:#265d45}.valuation .montant-field{flex:0 0 200px}.actions{display:flex;gap:8px;flex-wrap:wrap}.two-col{display:grid;grid-template-columns:minmax(280px,500px) 1fr;gap:20px}.two-col .card:not(.form-card){padding:24px}.two-col .list{margin:0 -24px -24px}.messages{margin-bottom:20px}ul.errorlist{color:#af4738;margin:4px 0;padding-left:20px;font-size:.82rem}@media(max-width:1000px){.review-layout{grid-template-columns:1fr}.pdf-panel{position:static}.pdf-panel iframe{height:55vh}.filters{grid-template-columns:1fr 1fr}.line-grid{grid-template-columns:repeat(3,1fr)}.line-grid .designation{grid-column:span 2}}@media(max-width:640px){.topbar{height:auto;flex-wrap:wrap;padding:12px 18px;gap:12px}.brand-sub{display:none}.topbar nav{order:3;width:100%;gap:18px}.container{padding:22px 14px}.page-heading{align-items:flex-start;flex-direction:column}h1{font-size:1.8rem}.filters,.form-grid,.two-col{grid-template-columns:1fr}.filters .wide{grid-column:auto}.line-grid{grid-template-columns:1fr 1fr}.line-grid .designation{grid-column:span 2}.valuation{display:block}.valuation .montant-field{margin-bottom:10px}.pdf-panel iframe{height:50vh}}
.type-tag{display:inline-block;border-radius:6px;padding:4px 8px;font-size:.76rem;font-weight:750;white-space:nowrap;background:#e8f1ed;color:#275d49}.type-tag.facture{background:#e7eefb;color:#2e5b94}.type-tag.devis{background:#f3ebfb;color:#6e4e90}
.sort-link{display:inline-flex;align-items:center;gap:6px;color:inherit;white-space:nowrap}.sort-link:hover{color:#157161}
.button.danger{background:#fff0ee;color:#a53632;border-color:#e8b3ad}.button.danger:hover{background:#ffe2de;text-decoration:none}.confirm-card{max-width:680px;padding:25px}.confirm-card .actions{margin-top:24px}
.pagination{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:16px;flex-wrap:wrap}.pagination-links{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.pagination-links a,.pagination-links .active,.pagination-ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:36px;min-height:36px;padding:6px 10px;border:1px solid #d5e4dc;border-radius:7px;background:#fff}.pagination-links .active{background:#e1f1e8;border-color:#8cbfa6;color:#245b45;font-weight:700}.pagination-ellipsis{border-color:transparent;background:transparent}.page-size-form{display:flex;align-items:end;gap:8px;margin-left:auto}.page-size-form label{display:flex;flex-direction:column;gap:4px;color:#52655c;font-size:.8rem;font-weight:700}.page-size-form select{min-height:34px;padding:4px 8px;border:1px solid #ccd8d1;border-radius:7px;background:#fff}.section-title:has(.page-size-form){flex-wrap:wrap}@media(max-width:640px){.page-size-form{width:100%;margin-left:0}.pagination{align-items:flex-start;flex-direction:column}}
.summary-title{margin-top:24px;flex-wrap:wrap}.summary-title .muted{font-size:.82rem}.summary-title+.totals-grid{margin-bottom:18px}
.product-results-title{margin-top:24px}.product-name{min-width:240px;max-width:440px}
/* Logo fourni pour Scan : Elec-Service. */
.brand-logo{display:block;width:32px;height:32px;object-fit:contain;flex:none}
@media(max-width:640px){.brand{font-size:1.05rem}}
.topbar{gap:clamp(1rem,2vw,3rem)}.topbar nav{gap:clamp(.7rem,1.5vw,1.7rem)}
@media(max-width:1100px){.topbar{height:auto;min-height:70px;flex-wrap:wrap;padding:12px 24px}.topbar nav{order:3;width:100%;flex-wrap:wrap}}
.ocr-details{padding:18px 22px}.ocr-details summary{cursor:pointer;font-weight:700}.ocr-details pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:16px 0 0;font:inherit;color:#52655c}
.form-card .checkbox-label{display:flex;flex-direction:row;align-items:center;gap:10px}.form-card .checkbox-label input{width:auto;min-height:auto}
.consultation-fields{border:0;padding:0;margin:0;min-width:0}.consultation-fields :disabled{cursor:default}.logout{display:flex;align-items:center;gap:12px;white-space:nowrap}.logout span{font-size:.8rem;color:#71817b}.section>.chantier-groups{padding:24px}
.form-card select{width:100%;border:1px solid #ccd8d1;border-radius:8px;background:#fff;color:#203c32;padding:10px 11px;min-height:42px}
.logout button{background:#f0f7f3;border:1px solid #b8d4c8;border-radius:8px;color:#176d5a;font-weight:700;padding:8px 12px}.logout button:hover{background:#e1f1e8}
.reference-list{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}.reference-list form{display:inline-flex}.reference-list button.badge{border:0;cursor:pointer}
