/* AB SERVICES — private CRM interface. All UI elements remain HTML controls, not parts of the reference artwork. */
:root{font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;font-synthesis:none;color:#10244a;background:#eef3fa;font-size:15px;--navy:#071b3e;--navy2:#0c2d60;--blue:#1457d4;--cyan:#00c9ff;--border:#dce6f3;--muted:#667998;--surface:#fff;--soft:#f5f8fe}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-height:100vh}a{color:#1252bd;text-decoration:none}a:hover{text-decoration:underline}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #5cccfb;outline-offset:3px}button,input,select,textarea{font:inherit}button{cursor:pointer}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(1.65rem,2.4vw,2.25rem);line-height:1.2;letter-spacing:-.035em;margin-bottom:.55rem;font-weight:800}h2{font-size:1.2rem;letter-spacing:-.015em}h3{font-size:1rem}p{line-height:1.6}small{font-size:.8rem}.muted{color:var(--muted)}.icon{display:inline-block;vertical-align:middle;width:19px;height:19px;flex:none}.visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
/* Shared controls */
button,.button{display:inline-flex;align-items:center;justify-content:center;gap:.55rem;color:#fff;font-weight:700;letter-spacing:.005em;background:linear-gradient(145deg,#1970f4,#1246b2);padding:.75rem 1.15rem;border:1px solid transparent;border-radius:10px;box-shadow:0 4px 10px #1651c021;transition:transform .12s,box-shadow .15s,background .15s;line-height:1.4;text-align:center;white-space:normal}
button:hover,.button:hover{background:linear-gradient(145deg,#2780ff,#103e9d);text-decoration:none;box-shadow:0 7px 17px #1651c032;transform:translateY(-1px)}button:disabled{opacity:.5;cursor:not-allowed}.button .icon,button .icon{width:17px;height:17px}.secondary,.ghost-button{background:#fff!important;color:#1a4d9c!important;border-color:#cddcf2!important;box-shadow:none!important}.secondary:hover,.ghost-button:hover{background:#eff5ff!important}.btn-small{padding:.56rem .8rem;font-size:.84rem;border-radius:9px}input,select,textarea{display:block;width:100%;padding:.79rem .9rem;border:1px solid #bfcee2;border-radius:10px;color:#153058;background:#fff;line-height:1.4;outline:none;box-shadow:0 1px 1px #122c5610;min-width:0}input:focus,select:focus,textarea:focus{border-color:#2474e8;box-shadow:0 0 0 3px #237ff025}textarea{min-height:80px;resize:vertical}label{display:block;margin:.95rem 0 .38rem;font-size:.9rem;font-weight:700;color:#20365a}label input[type=checkbox]{display:inline;width:auto;margin-right:.45rem;accent-color:#1457d4}input[type=checkbox]{width:auto;accent-color:#1457d4}select{cursor:pointer}summary{cursor:pointer;color:#193f7b;font-weight:700;padding:.7rem 0}details{margin:1rem 0}details[open]>summary{border-bottom:1px solid var(--border);margin-bottom:1rem}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}.row{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap}.row input:not([type=checkbox]){flex:1;min-width:150px}.notice{background:#ecf4ff;border-left:4px solid #2872d9;border-radius:10px;padding:1rem 1.2rem;color:#214675;line-height:1.6}.error{background:#fff0f1;border-color:#d33b54;color:#923044}.readonly{padding:1rem;background:var(--soft);border:1px solid var(--border);border-radius:10px}pre{white-space:pre-wrap;word-break:break-word;font:inherit;font-size:.88rem}.badge{display:inline-flex;align-items:center;border-radius:7px;padding:.28rem .53rem;font-size:.77rem;font-weight:750;background:#e9f0fa;color:#315384;white-space:nowrap}.badge.urgent{background:#ffe5eb;color:#bb153b;font-weight:800;letter-spacing:.03em}.amount{text-align:right;white-space:nowrap}.card{background:#fff;border:1px solid var(--border);border-radius:17px;box-shadow:0 8px 30px #0b25590a;padding:1.45rem 1.55rem;margin:1.3rem 0}.card h2{margin-bottom:.65rem}.card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.2rem}.card-heading h2{margin:.05rem 0 .2rem;font-size:1.16rem}.card-heading .muted{margin:0;font-size:.87rem}.card-heading>a{font-size:.88rem;font-weight:700}.tablewrap{overflow-x:auto;max-width:100%}table{border-collapse:collapse;width:100%}th,td{text-align:left;border-bottom:1px solid #e8edf5;padding:.95rem .7rem;vertical-align:middle;font-size:.88rem}th{font-size:.74rem;text-transform:uppercase;letter-spacing:.055em;font-weight:800;color:#68809f}tbody tr:hover{background:#f8fbff}tbody tr:last-child td{border-bottom:0}.list-table{min-width:690px}.list-table th:first-child,.list-table td:first-child{padding-left:.5rem}.list-table a:not(.button){font-weight:700}.table-muted{color:#6e809a}.ref-link{font-size:.87rem;color:#1b56bc;font-weight:800}.status-pill{display:inline-flex;align-items:center;gap:.32rem;padding:.35rem .6rem;border:1px solid currentColor;border-radius:999px;font-size:.77rem;font-weight:700;white-space:nowrap;background:#f8fafc}.status-nouveau{color:#64748b;background:#f1f5f9}.status-verification{color:#2563eb;background:#ecf3ff}.status-incomplet{color:#a56505;background:#fff4db}.status-a-lancer{color:#7c3aed;background:#f5edff}.status-en-cours{color:#0891b2;background:#e9fbff}.status-valide{color:#15803d;background:#e9f9ef}.status-siv-bloque{color:#c55c05;background:#fff1df}.status-rejete{color:#dc2626;background:#fff0f0}.status-annule{color:#374151;background:#eef0f3}.document-row{display:grid;grid-template-columns:minmax(200px,1fr) 160px auto;gap:.7rem;align-items:center;border-bottom:1px solid var(--border);padding:.7rem 0}.document-row label{margin:0}
/* Workspace sidebar and toolbar */
.authenticated{background:#eef3fa}.app-sidebar{position:fixed;inset:0 auto 0 0;width:260px;z-index:10;background:linear-gradient(172deg,#07162f 0%,#092450 58%,#0a3065 100%);color:#fff;display:flex;flex-direction:column;padding:1.6rem 1rem 1.25rem;box-shadow:7px 0 26px #071b3e0b}.app-sidebar:before{content:"";position:absolute;left:0;top:0;right:0;height:4px;background:linear-gradient(90deg,#0076ff,#0ceaff)}.sidebar-brand{display:flex;align-items:center;gap:.7rem;color:#fff;padding:.35rem .28rem 1.3rem;min-width:0;text-decoration:none}.sidebar-brand:hover{text-decoration:none}.brand-symbol{position:relative;flex:none;display:grid;place-items:center;width:47px;height:47px;border:1px solid #47ccff8a;border-radius:14px;background:linear-gradient(145deg,#0a73e5,#041e55);font-weight:900;font-size:1.12rem;box-shadow:0 0 20px #149dff33}.brand-check{position:absolute;right:-4px;bottom:-4px;background:#00baff;color:#fff;border:2px solid #09274c;width:17px;height:17px;border-radius:50%;font-size:.65rem;text-align:center;line-height:12px}.brand-copy{min-width:0;display:flex;flex-direction:column;gap:.1rem}.brand-copy strong{font-size:1.07rem;letter-spacing:.018em;white-space:nowrap}.brand-copy small{font-size:.68rem;font-weight:800;color:#42d7ff;letter-spacing:.035em}.brand-copy em{font-size:.63rem;font-style:normal;letter-spacing:.16em;color:#a2bddb;font-weight:700;margin-top:.24rem}.nav-section-label{font-size:.65rem;letter-spacing:.17em;color:#86a6cd;margin:1.5rem .8rem .8rem;font-weight:800}.main-nav{display:flex;flex-direction:column;gap:.35rem}.main-nav a{display:flex;align-items:center;gap:.88rem;padding:.8rem .9rem;border-radius:11px;color:#c9d9ee;font-size:.92rem;font-weight:650;border:1px solid transparent;transition:.18s}.main-nav a:hover{background:#ffffff10;text-decoration:none;color:white}.main-nav a.is-active{background:linear-gradient(100deg,#1671e9,#0b4caa);color:#fff;border-color:#369dff66;box-shadow:0 6px 16px #0002}.main-nav a .icon{width:19px;height:19px;color:#99bddf}.main-nav a.is-active .icon{color:#70e6ff}.sidebar-bottom{margin-top:auto;border-top:1px solid #b9d7ff28;padding-top:1.2rem}.admin-status{display:flex;gap:.65rem;align-items:center;padding:.3rem .8rem .7rem}.admin-status strong{font-size:.84rem;display:block}.admin-status small{color:#a0badb;display:block;margin-top:.15rem}.status-light{width:9px;height:9px;border-radius:50%;background:#22c9a0;box-shadow:0 0 0 4px #22c9a028}.sidebar-bottom form{margin:.3rem 0 0}.logout-button{width:100%;justify-content:space-between;color:#d5e5fb;background:#ffffff16;border:1px solid #ffffff1f;box-shadow:none;padding:.68rem .83rem}.logout-button:hover{background:#ffffff25;box-shadow:none}.app-main{margin-left:260px;max-width:none;min-height:calc(100vh - 45px);padding:0 clamp(1.15rem,3vw,3.4rem) 2rem}.workspace-toolbar{min-height:86px;display:flex;align-items:center;justify-content:space-between;gap:1rem;border-bottom:1px solid #dce6f3;margin-bottom:1.8rem}.workspace-trail{font-weight:800;font-size:.79rem;color:#788ba6;letter-spacing:.07em;text-transform:uppercase}.workspace-trail span{padding:0 .55rem;color:#b0bdd1}.workspace-actions{display:flex;align-items:center;gap:1rem}.private-tag{display:flex;align-items:center;gap:.45rem;color:#42638f;font-weight:650;font-size:.8rem}.private-tag .icon{width:15px;height:15px}.app-footer{margin-left:260px;text-align:center;color:#7389a6;font-size:.78rem;padding:.7rem 1rem 1.3rem}.page-title-row{display:flex;align-items:center;justify-content:space-between;gap:1.2rem;margin-bottom:1.65rem}.page-title-row .muted{margin:0;font-size:.92rem}.page-title-row .eyebrow{margin-bottom:.5rem}.page-actions{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center}.eyebrow{font-size:.7rem;letter-spacing:.13em;color:#2678df;font-weight:850;text-transform:uppercase}.back-link{display:inline-block;margin-bottom:1rem;font-size:.82rem;font-weight:700;color:#59799f}
/* Login: use user-supplied mascot/office background, keep actual inputs fully interactive */
.guest{background:#daebfc}.login-topbar{height:99px;display:flex;align-items:center;padding:0 clamp(1.4rem,4vw,4rem);background:linear-gradient(112deg,#05122e 0%,#08234a 70%,#0357bf 100%);color:#fff;border-bottom:2px solid #39c4ff;position:relative;overflow:hidden;gap:2rem}.login-topbar:after{content:"";position:absolute;right:-5%;top:-210px;width:48%;height:255px;border-bottom:5px solid #06c9fc;border-radius:50%;box-shadow:0 6px 18px #06c9fc80;transform:rotate(-8deg)}.login-brand{display:flex;flex-direction:column;position:relative;z-index:1}.login-brand strong{font-weight:900;font-size:clamp(1.4rem,2.5vw,2.35rem);line-height:1.1;letter-spacing:-.03em}.login-brand small{font-size:clamp(.84rem,1.4vw,1.2rem);font-weight:800;color:#13e2ff;margin-top:.25rem}.login-brand-divider{height:57px;width:1px;background:#34d7ff;opacity:.85;position:relative;z-index:1}.login-title{font-size:1.65rem;font-weight:850;display:flex;align-items:center;gap:.65rem;z-index:1}.login-title small{font-size:.66rem;letter-spacing:.11em;color:#9fefff}.login-title .icon{height:27px;width:27px}.login-main{position:relative;min-height:max(650px,calc(100vh - 165px));padding:3rem clamp(1rem,8vw,11rem) 6rem;background:linear-gradient(90deg,#e9f4ff3e 0%,#e9f4ff28 45%,transparent 75%),url('/login-office.webp') center center/cover no-repeat;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;isolation:isolate;overflow:hidden}.login-main:after{content:"";position:absolute;left:-8%;bottom:-125px;width:120%;height:155px;border-top:5px solid #45dfff;background:linear-gradient(110deg,#0040bd,#005fdf 45%,#041b73);border-radius:50% 50% 0 0/90% 90% 0 0;box-shadow:0 -8px 28px #008cff66;z-index:-1}.login-card{width:min(510px,100%);background:#ffffffed;border:1px solid #fff;border-radius:27px;box-shadow:0 24px 62px #043a7980,0 5px 8px #1b62a31a;overflow:hidden;position:relative;backdrop-filter:blur(10px);z-index:1}.login-accent{height:89px;background:linear-gradient(145deg,#004093,#071a41 64%,#006aff 100%);border-radius:0 0 45% 12% / 0 0 45% 18%;position:relative}.login-accent:after{content:"";position:absolute;right:-4%;bottom:1px;width:70%;height:53px;border-top:4px solid #09ccfa;border-radius:50%;transform:rotate(-8deg);filter:drop-shadow(0 0 6px #10dcff);opacity:.9}.login-card-content{padding:0 clamp(1.4rem,4vw,2.8rem) 2.3rem;position:relative;margin-top:-13px}.login-eyebrow{margin:0 auto .7rem;display:flex;align-items:center;justify-content:center;gap:.5rem;width:max-content;max-width:100%;background:#e6f0ff;border:1px solid #c6dcff;color:#1351c0;padding:.48rem .95rem;border-radius:999px;font-weight:850;box-shadow:0 5px 9px #1741a021;font-size:.87rem}.login-eyebrow .icon{width:17px;height:17px}.login-card h1{text-align:center;font-size:clamp(2.4rem,5vw,3.15rem);margin:.4rem 0 .2rem;color:#091b41}.login-intro{text-align:center;font-size:1.03rem;color:#3b587f;margin-bottom:1.75rem}.login-form label{margin:1rem 0 .43rem;font-size:.91rem;color:#112247}.input-with-icon{position:relative;display:flex;align-items:center}.input-with-icon>span{position:absolute;left:1rem;display:grid;place-items:center;min-width:23px;color:#1463df;font-size:1.4rem}.input-with-icon>span .icon{width:21px;height:21px}.input-with-icon>input{padding:1rem 3.15rem 1rem 3.2rem;background:#e5f0fe;border:1px solid #a6c8f7;border-radius:12px;font-size:1rem}.password-toggle{position:absolute;right:.45rem;padding:.4rem .55rem;font-size:.7rem;color:#1b54af;background:transparent;box-shadow:none;border-radius:7px}.password-toggle:hover{color:#083b91;background:#d7e6ff;box-shadow:none;transform:none}.login-submit{margin-top:1.7rem;width:100%;padding:1.05rem;border-radius:14px;font-size:1.2rem;box-shadow:0 9px 20px #035cdf70,0 0 0 2px #2fd5ff;font-weight:850;background:linear-gradient(180deg,#0877f3,#073cad);border:1px solid #16d3ff}.login-submit:hover{background:linear-gradient(180deg,#0b85ff,#07358d)}.login-privacy{display:flex;align-items:center;gap:.5rem;background:#f5faffdb;border-radius:99px;padding:.55rem 1rem;color:#26486f;position:relative;z-index:1;margin:1rem 0 0;font-size:.79rem;font-weight:700}.login-privacy .icon{width:15px;height:15px}.login-footer{padding:1rem 1rem 1.3rem;background:linear-gradient(90deg,#0935ab,#085bd9,#092f9f);color:#e2efff;text-align:center;font-size:.8rem;font-weight:700}
/* Dashboard */
.dashboard-metrics{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:1rem;margin:1.6rem 0 1.5rem}.metric-card{border-radius:17px;padding:1.2rem;background:var(--surface);border:1px solid var(--border);box-shadow:0 7px 22px #112e5f0b;display:flex;flex-direction:column;gap:.35rem;color:#60718d;transition:transform .12s,box-shadow .15s}.metric-card:hover{transform:translateY(-3px);text-decoration:none;box-shadow:0 12px 30px #112e5f1c}.metric-card strong{font-size:2.35rem;line-height:1.2;color:#10274f;font-weight:850}.metric-card>span:last-child{font-size:.77rem;font-weight:700}.metric-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:.6rem}.metric-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#eaf3ff;color:#165ad5}.metric-link{color:#95accf}.dashboard-columns{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,.8fr);gap:1.2rem}.dashboard-columns .card{margin:0;min-width:0}.activity-list{margin:0;padding:0;list-style:none}.activity-list li{display:flex;align-items:flex-start;gap:.85rem;padding:.75rem 0;border-bottom:1px solid #eaf0f8}.activity-list li:last-child{border-bottom:0}.activity-dot{background:#1974e7;width:9px;height:9px;border-radius:50%;margin-top:.45rem;box-shadow:0 0 0 4px #e9f2ff}.activity-list strong{font-weight:700;font-size:.84rem;display:block}.activity-list small{color:var(--muted);display:block;margin-top:.18rem}.quick-access{display:grid;grid-template-columns:repeat(3,minmax(200px,1fr));gap:1rem;margin-top:1.3rem}.quick-access a{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;background:#f7faff;border:1px solid #dbe5f5;border-radius:14px;padding:1rem;color:#204773}.quick-access a:hover{text-decoration:none;border-color:#7bb5f7}.quick-access a>span{display:grid;place-items:center;background:#e6f1ff;color:#1969df;border-radius:10px;width:36px;height:36px;flex:none}.quick-access a strong{font-size:.86rem}.quick-access a small{display:block;width:100%;padding-left:44px;color:#6e84a2;font-size:.78rem}.empty-state{text-align:center;padding:2.8rem 1rem;color:#657c9a}.empty-state strong{display:block;color:#1c3762;font-size:1.1rem}.empty-state p{font-size:.9rem}.empty-illustration{display:grid;place-items:center;margin:0 auto 1rem;width:63px;height:63px;background:#e8f1ff;border-radius:18px;color:#246ad5}.empty-illustration .icon{width:30px;height:30px}
/* Customers */
.client-stats{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:1rem;margin-bottom:1.4rem}.mini-stat{display:flex;align-items:center;gap:1rem;background:#fff;border:1px solid var(--border);border-radius:15px;padding:1rem 1.3rem;box-shadow:0 5px 20px #122e5909}.mini-stat .mini-icon{display:grid;place-items:center;flex:none;width:46px;height:46px;border-radius:13px;background:#e9f3ff;color:#1967d7}.mini-icon .icon{width:22px;height:22px}.mini-stat span:not(.mini-icon){display:block;color:#637996;font-size:.78rem;font-weight:750}.mini-stat strong{display:block;font-size:1.7rem;color:#122d59;margin-top:.08rem}.client-directory{margin-top:0}.results-count{background:#eff4fc;color:#59769f;padding:.4rem .7rem;border-radius:8px;font-size:.75rem;font-weight:800;white-space:nowrap}.client-search-tools{display:flex;gap:.65rem;align-items:center;margin-bottom:1.15rem}.client-search-tools .search-field{min-width:180px;flex:1;position:relative}.search-field>span{position:absolute;left:1rem;top:50%;transform:translateY(-50%);font-size:1.5rem;color:#567aa8}.search-field input{padding-left:2.7rem;background:#f9fbff}.client-search-tools select{width:185px;flex:none}.filter-tabs{display:flex;gap:.3rem;flex-wrap:wrap;border-bottom:1px solid #e0e8f4;margin-bottom:.4rem}.filter-tabs a{display:flex;gap:.45rem;align-items:center;padding:.75rem .95rem;color:#6c80a0;font-size:.86rem;font-weight:750;border-bottom:3px solid transparent;margin-bottom:-1px}.filter-tabs a.active{color:#135ec9;border-bottom-color:#1773e7}.filter-tabs a:hover{text-decoration:none;color:#135ec9}.filter-tabs span{background:#e6ecf6;border-radius:999px;padding:.12rem .42rem;font-size:.71rem}.client-table td{padding-top:1rem;padding-bottom:1rem}.client-identity{display:flex;gap:.8rem;align-items:center;min-width:180px}.customer-avatar{display:grid;place-items:center;flex:none;width:39px;height:39px;border-radius:13px;background:linear-gradient(140deg,#ddecff,#bad9ff);color:#245dbd;font-size:1.07rem;font-weight:850}.client-name{font-weight:850;color:#1a4ca2}.customer-kind{display:block;font-size:.75rem;color:#7184a1;margin-top:.18rem;font-weight:500}.contact-lines{color:#264668;font-weight:600;font-size:.83rem}.contact-lines small{display:block;color:#7b8eaa;font-weight:450;margin-top:.17rem}.case-count{display:block;font-weight:750}.active-case-count{font-size:.73rem;color:#138a71;display:block}.row-actions{white-space:nowrap}.action-link{font-size:.8rem;padding:.35rem .43rem;display:inline-block}.action-secondary{color:#5e789d!important}.list-footer{display:flex;justify-content:space-between;gap:1rem;border-top:1px solid #e7edf7;padding-top:1rem;font-size:.75rem;color:#7488a3}.list-footer a{font-weight:750}
/* Individual customer */
.customer-summary{display:flex;flex-wrap:wrap;gap:1.2rem;align-items:center;background:linear-gradient(100deg,#0d3169,#0861b4);color:#fff;border-radius:18px;padding:1.3rem 1.6rem;margin:1rem 0 1.4rem}.customer-summary-avatar{display:grid;place-items:center;width:60px;height:60px;border-radius:17px;background:#ffffff28;color:#fff;font-size:1.7rem;font-weight:850}.customer-summary-name{min-width:180px;flex:1}.customer-summary-name strong{display:block;font-size:1.3rem}.customer-summary-name span{display:block;color:#cae3ff;font-size:.78rem;margin-top:.3rem}.customer-summary-metric{text-align:center;min-width:90px;padding:0 .6rem;border-left:1px solid #ffffff38}.customer-summary-metric strong{display:block;font-size:1.4rem}.customer-summary-metric span{display:block;font-size:.68rem;color:#d3e6ff;margin-top:.18rem}.profile-navigation{display:flex;gap:.4rem;flex-wrap:wrap;margin:0 0 1rem}.profile-navigation a{padding:.6rem .8rem;background:#fff;border:1px solid #e0e9f5;color:#3e6292;border-radius:9px;font-size:.8rem;font-weight:750}.profile-navigation a:hover{background:#e9f2ff;text-decoration:none}.customer-form{max-width:1100px}.customer-form h3.form-subtitle{margin:1.55rem 0 .65rem;border-bottom:1px solid #e6edf7;padding-bottom:.6rem;color:#173766}.form-grid{gap:1rem 1.35rem}.form-grid label{margin-top:.3rem}.optional-hint{color:#8b9bb1;font-size:.75rem;font-weight:500}.required-asterisk{color:#e04f57}.advanced-fields{background:#f7faff;border:1px solid #e1e9f7;padding:.3rem 1.15rem 1rem;border-radius:12px}.form-action-bar{display:flex;align-items:center;justify-content:space-between;gap:1.2rem;margin-top:1.5rem;padding-top:1rem;border-top:1px solid var(--border)}.form-action-bar p{font-size:.78rem;color:#768ba8;max-width:70%;margin:0}.form-action-bar p strong{color:#53719a}.customer-subsections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.customer-subsections>.card{margin:0;min-width:0}.customer-subsections>.card:first-child{grid-column:1/-1}.customer-subsections>.card input:not([type=checkbox]),.customer-subsections>.card select{width:100%}.customer-subsections>.card form{margin:.65rem 0;border-bottom:1px solid #edf1f7;padding-bottom:.65rem}.customer-subsections>.card form:last-child{border:0}.customer-subsections>.card button{max-width:100%}#profil,#pieces-client,#representants,#facturation-client,#gestion-client,#dossiers-client{scroll-margin-top:25px}
/* Existing finance, dossiers, and document forms */
.card>form:not(.client-edit-form){margin:1rem 0}.card>form+form{border-top:1px solid #e9eff6;padding-top:1rem}.card>.grid>.card{margin:0}.form-action-bar button{min-width:190px}section.card h2+form{margin-top:1rem}.amount strong{color:#1f4275}.doc-pill{font-size:.79rem;color:#1c63c4}.profile-navigation+.card{margin-top:1rem}
/* Mobile; forms stay keyboard-accessible and scrollable */
@media(max-width:1350px){.dashboard-metrics{grid-template-columns:repeat(3,minmax(150px,1fr))}.dashboard-columns{grid-template-columns:1fr}.quick-access{grid-template-columns:repeat(3,minmax(160px,1fr))}}
@media(max-width:1020px){.app-sidebar{width:215px}.app-main,.app-footer{margin-left:215px}.brand-symbol{display:none}.sidebar-brand{padding-left:.5rem}.sidebar-brand strong{font-size:.97rem}.main-nav a{padding:.73rem .6rem;gap:.55rem}.customer-subsections{grid-template-columns:1fr}.customer-subsections>.card:first-child{grid-column:auto}.login-main{padding-left:4vw}}
@media(max-width:780px){.app-sidebar{position:static;width:auto;padding:.8rem 1rem}.sidebar-brand{padding:0 0 .45rem}.brand-symbol{display:grid;width:36px;height:36px;font-size:.9rem}.nav-section-label,.admin-status{display:none}.sidebar-bottom{display:block;border:0;margin:0;padding:.35rem 0 0}.sidebar-bottom form{margin:0}.logout-button{padding:.47rem .7rem;width:auto;font-size:.76rem}.main-nav{flex-direction:row;overflow-x:auto;gap:.25rem;padding-bottom:.35rem}.main-nav a{flex:none;font-size:.77rem;gap:.3rem;padding:.65rem .55rem}.main-nav a .icon{width:15px;height:15px}.app-main{margin-left:0;padding:0 1rem 1.5rem;min-height:auto}.app-footer{margin-left:0}.workspace-toolbar{min-height:66px;margin-bottom:1.1rem}.workspace-trail{font-size:.67rem}.workspace-actions .private-tag{display:none}.page-title-row{flex-wrap:wrap}.dashboard-metrics{grid-template-columns:repeat(2,minmax(125px,1fr))}.quick-access{grid-template-columns:1fr}.client-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.mini-stat{padding:.8rem;gap:.45rem}.mini-stat .mini-icon{width:32px;height:32px}.mini-stat strong{font-size:1.35rem}.client-search-tools{flex-wrap:wrap}.client-search-tools .search-field{flex-basis:100%}.client-search-tools select{flex:1}.client-search-tools button{flex:none}.customer-summary-metric{min-width:70px}.login-main{justify-content:center;align-items:center;padding:2rem 1rem 5rem;min-height:680px;background-position:75% center}.login-main:before{content:"";position:absolute;inset:0;background:#e4f2ffad;z-index:-1}.login-card{width:min(480px,100%)}}
@media(max-width:520px){.workspace-toolbar .button{display:none}.card{padding:1rem;border-radius:13px}.page-actions{width:100%}.page-actions .button{flex:1}.client-stats{grid-template-columns:1fr}.mini-stat{padding:.7rem 1rem}.mini-stat strong{display:inline;font-size:1.3rem}.mini-stat div{display:flex;align-items:center;gap:.8rem}.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}.metric-card{padding:.8rem}.metric-card strong{font-size:1.8rem}.dashboard-columns{gap:1rem}.card-heading{flex-wrap:wrap}.client-search-tools select,.client-search-tools button{width:100%;flex:1 1 100%}.filter-tabs a{font-size:.74rem;padding:.6rem .55rem}.customer-summary{gap:.6rem;padding:1rem}.customer-summary-avatar{width:44px;height:44px}.customer-summary-name{min-width:calc(100% - 55px)}.customer-summary-metric{flex:1}.form-action-bar{flex-wrap:wrap}.form-action-bar p{max-width:none}.form-action-bar button{width:100%}.grid{grid-template-columns:1fr}.document-row{grid-template-columns:1fr}.login-topbar{height:80px;gap:1rem;padding:0 1.25rem}.login-brand-divider{height:39px}.login-title{font-size:1.2rem}.login-title small{display:none}.login-title .icon{height:20px;width:20px}.login-card-content{padding:0 1.3rem 1.5rem}.login-accent{height:70px}.login-card h1{font-size:2.3rem}.login-intro{font-size:.88rem}.login-main{min-height:calc(100svh - 135px)}.login-footer{font-size:.7rem}table.payments,table.payments tbody{display:block}table.payments thead{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}table.payments tr{display:grid;grid-template-columns:minmax(0,1fr) auto;border-bottom:1px solid #d8e0ed;padding:.5rem 0}table.payments td{display:block;border:0;padding:.25rem;line-height:1.4}table.payments td:nth-child(1){grid-column:1/-1;font-weight:700}table.payments td:nth-child(2){grid-column:1/-1;color:#52647b;font-size:.875rem}table.payments td:nth-child(4){font-weight:800}}
[hidden]{display:none!important}
@media print{@page{size:A4;margin:15mm}.app-sidebar,.login-topbar,.workspace-toolbar,.page-actions,.profile-navigation,.login-footer,.app-footer,.quick-access,nav,form{display:none!important}.app-main{margin:0;padding:0}.card{box-shadow:none;border:0;padding:0}body,.authenticated,.guest{background:#fff}a{color:#111;text-decoration:none}}

.urgency-icon{font-size:1.4rem;font-weight:850!important;color:#d13c54!important;background:#fff0f3!important}.urgent-toggle{display:block;padding:1rem 1.2rem;border:1px solid #f5b6c2;border-radius:12px;color:#aa2947;background:#fff5f7}.urgent-toggle input{accent-color:#d12552}#suivi-dossier,#details-dossier,#pieces-dossier,#finances-dossier,#historique-dossier{scroll-margin-top:20px}

.available-badge{background:#e5f8ec;color:#168044}.inactive-badge{background:#f3f4f7;color:#6a7182}.subheading-row{display:flex;align-items:center;justify-content:space-between;gap:1rem;border-top:1px solid #e9eff8;margin-top:1.4rem;padding-top:1.2rem;margin-bottom:.8rem}.subheading-row h3{margin:0;font-size:.98rem}.metric-action-link{font-size:.91rem}.money-metric{font-size:1.15rem!important}.payment-method{background:#eef5ff;color:#2b5c9f}.refund-card details{margin:0}.refund-form{max-width:620px}.authenticated .card section.card{box-shadow:none}

/* Client type-aware form: clear sections at desktop and mobile sizes. */
.customer-form{width:100%;max-width:1120px}
.customer-form .client-edit-form{max-width:none}
.customer-form .advanced-fields .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem 1.25rem}
.customer-form .client-detail-hint{font-size:.85rem;margin-bottom:.3rem}
.customer-form .client-common-details{margin-top:1rem}
.customer-form .client-common-details textarea{max-width:100%}
.customer-form [data-kind-fields][hidden]{display:none!important}
@media(max-width:640px){.customer-form .advanced-fields .form-grid{grid-template-columns:1fr}}

/* AB SERVICES: official blue document-check logo instead of the generic AS badge. */
.sidebar-brand .brand-logo{display:block;flex:none;width:52px;height:52px;object-fit:contain;filter:drop-shadow(0 0 7px rgba(0,150,255,.28))}
@media(max-width:1020px){.sidebar-brand .brand-logo{width:43px;height:43px}.sidebar-brand{gap:.5rem}}
@media(max-width:780px){.sidebar-brand .brand-logo{width:40px;height:40px}}
/* Révision groupée — navigation claire et contrôle de la densité. */
[hidden]{display:none!important}.profile-navigation{position:sticky;top:0;z-index:3;background:var(--bg,#edf2f8);padding:.55rem 0;gap:.5rem}.profile-navigation a.active{background:#1454bb;color:white;border-color:#1454bb}.revision-form{max-width:1120px}.revision-fields{gap:.8rem 1.25rem}.revision-fields>div{min-width:0}.revision-form h3{margin:1.3rem 0 .7rem;padding-bottom:.5rem;border-bottom:1px solid #e0e9f4}.urgent-toggle{margin:0 0 1rem!important}.copy-options label{padding:.35rem 0}.customer-subsections{display:block}.customer-subsections>.card{margin-bottom:1rem}.document-category{border:1px solid #d8e5f5;border-radius:13px;margin:.9rem 0;overflow:hidden;background:#fff}.document-category>summary{padding:1rem;background:#eef5ff;cursor:pointer;color:#183e75;display:flex;align-items:center;justify-content:space-between;gap:1rem}.document-category-body{padding:.5rem 1rem}.document-row select{min-width:125px}.js-ready .fallback-save{display:none}.js-ready .document-row{grid-template-columns:1fr auto}.file-line{display:flex;gap:1rem;align-items:center;flex-wrap:wrap}.file-line .row{margin-left:auto}.revision-notice{position:sticky;top:0;z-index:6}.login-card{width:min(540px,100%)}@media(min-width:1100px){.login-main{padding-left:clamp(5vw,14vw,215px)}}@media(max-width:650px){.js-ready .document-row{grid-template-columns:1fr}.revision-fields{grid-template-columns:1fr}.profile-navigation{position:static}.file-line .row{margin-left:0}}
.category-links{display:flex;flex-wrap:wrap;gap:.6rem;margin:.75rem 0 1rem}.editor-row{display:grid;grid-template-columns:minmax(200px,2fr) minmax(135px,1fr) minmax(135px,1fr) auto;align-items:end;gap:.8rem;border-bottom:1px solid #e1e9f5;padding:.65rem 0;margin-bottom:.5rem}.editor-controls{display:flex;align-items:center;gap:.35rem;flex-wrap:wrap}.editor-controls button{padding:.45rem .65rem}.editor-controls label{margin:.25rem}.editor-row label{min-width:0}.editor-row input,.editor-row select{width:100%}.editor-controls input{width:auto}@media(max-width:900px){.editor-row{grid-template-columns:1fr 1fr}}@media(max-width:600px){.editor-row{grid-template-columns:1fr}}
.document-item{border-bottom:1px solid #e5edf7;padding:.65rem 0}.document-item .document-row{border:0;margin:0}.attachment-strip{display:flex;align-items:center;gap:1rem;padding:.65rem;background:#f6f9fe;border-radius:8px;margin:.4rem 0;flex-wrap:wrap}.attachment-strip>div{flex:1;min-width:0;overflow-wrap:anywhere}.attachment-strip small{display:block;color:#667d9f}.attachment-strip form{margin:0}.attachment-management{margin:.35rem 0;padding:.45rem .65rem}.attachment-management>summary{color:#1454bb;font-size:.9rem;cursor:pointer}.attachment-management form{margin:.75rem 0}.document-item .document-row label{font-size:.95rem}
.invoice-brand{display:flex;gap:1rem;align-items:center;border-bottom:3px solid #0e51b8;padding-bottom:1rem;margin-bottom:1.5rem}.invoice-brand strong{font-size:1.5rem;color:#0c2c63}.invoice-brand p{margin:0;color:#1669ba;font-weight:700}.issued-document{max-width:850px;margin:1rem auto}.issued-document h1{font-size:1.6rem}.issued-document h2{border-bottom:1px solid #d8e5f5;padding-bottom:.5rem}@media print{.page-actions,.app-main>section.card{display:none!important}.issued-document{max-width:100%;margin:0}.invoice-brand{break-after:avoid}}

/* Démarches — searchable, aligned toolbar and compact table. */
.demarche-filters{margin:1.1rem 0 1.3rem;display:grid;gap:.85rem}.demarche-search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem;align-items:center}.demarche-search-row .search-field{position:relative;min-width:0}.demarche-filter-row{display:grid;grid-template-columns:minmax(135px,1fr) minmax(190px,1.5fr) minmax(125px,.85fr) minmax(125px,.85fr) minmax(140px,1fr) auto;gap:.75rem;align-items:end;background:#f7faff;border:1px solid #e0eaf7;border-radius:12px;padding:.85rem}.demarche-filter-row label{margin:0;min-width:0;font-size:.8rem}.demarche-filter-row label input,.demarche-filter-row label select{margin-top:.35rem;width:100%;height:44px;padding:.55rem .65rem;font-size:.9rem}.reset-filters{white-space:nowrap;min-height:44px;display:inline-flex;align-items:center;justify-content:center;padding:.55rem .8rem}.demarche-table{min-width:810px}.demarche-table td,.demarche-table th{vertical-align:middle;padding:.85rem .7rem}.demarche-table thead th{background:#f6f9fe;white-space:nowrap}.demarche-table tbody tr:hover{background:#f6faff}.demarche-ref{display:flex;gap:.45rem;align-items:center;flex-wrap:wrap}.demarche-ref .ref-link{white-space:nowrap}.demarche-ref .badge{font-size:.66rem;padding:.22rem .4rem}.demarche-table .customer-kind{margin-top:.35rem}.demarche-table td:nth-child(5),.demarche-table td:nth-child(6){white-space:nowrap}.demarche-action{text-align:right}.demarche-open{display:inline-flex;align-items:center;white-space:nowrap;padding:.5rem .75rem;border:1px solid #d1e0f4;border-radius:8px;background:#f5f9ff}.demarche-open:hover{background:#e7f0ff;text-decoration:none}.demarche-tablewrap{overflow-x:auto}.demarche-table .status-pill{white-space:nowrap}@media(max-width:1450px){.demarche-filter-row{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){.demarche-filter-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.demarche-search-row{grid-template-columns:1fr}.demarche-search-row button{width:100%}.demarche-filter-row .reset-filters{grid-column:1/-1}}

/* Import tactile et raccourcis Drive privés */
.document-picker{margin:.65rem 0 1rem;min-width:0}.document-picker-actions{display:none;gap:.65rem;flex-wrap:wrap;margin:.7rem 0}.picker-ready .document-picker-actions{display:flex}.document-picker-actions button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:44px}.document-picker input[type=file]{max-width:100%;width:100%;min-height:44px}.document-picker-help{font-size:.85rem;margin:.4rem 0}.drive-folder-pending{font-size:.82rem;align-self:center}.drive-folder-link{white-space:normal;text-align:center}.page-actions{flex-wrap:wrap}@media(max-width:600px){.document-picker-actions button{flex:1 1 145px}.drive-folder-pending{width:100%}.drive-folder-link{min-height:44px}}
/* V2.3: readable document titles and independent payment status */
.document-title{font-size:1rem;font-weight:800;color:#122d48;display:inline-block;background:#eaf3fa;padding:.3rem .55rem;border-radius:6px}.payment-pill{display:inline-flex;align-items:center;padding:.26rem .55rem;border-radius:6px;font-size:.78rem;font-weight:750;white-space:nowrap;border:1px solid currentColor}.pay-paid{color:#147344;background:#e8f7ee}.pay-unpaid{color:#b42318;background:#fff0ee}.pay-partial{color:#975700;background:#fff4db}.pay-over{color:#1d4ed8;background:#eaf1ff}.pay-unknown{color:#526275;background:#edf1f6}.demarche-table{min-width:1040px}.customer-summary .payment-pill{margin-top:.3rem}
/* A4 invoice styled from the AB Services Excel template. */
.invoice-a4{box-sizing:border-box;width:100%;max-width:210mm;margin:1.5rem auto;padding:12mm;background:white;color:#20354a;border:1px solid #d9e3ef;box-shadow:0 8px 30px #15335010;font-family:Aptos,Arial,sans-serif;font-size:10pt;line-height:1.4;min-height:265mm;display:flex;flex-direction:column;gap:5mm}.invoice-a4 p{margin:.2em 0;overflow-wrap:anywhere}.invoice-test{text-align:center;background:#fff4dd;color:#975700;border:1px solid #d9ac5b;font-size:9pt;font-weight:700;padding:3px}.invoice-head{display:grid;grid-template-columns:1.2fr 1fr;gap:6mm;border-bottom:2px solid #122d48;padding-bottom:4mm}.invoice-company{font-weight:800;font-size:23pt;color:#122d48;line-height:1.1}.invoice-subtitle{font-size:10pt;font-weight:700;color:#23527a;margin-bottom:2mm}.invoice-head .invoice-meta h1{font-size:19pt;text-align:right;color:#23527a;margin:0 0 3mm;letter-spacing:.3pt;overflow-wrap:anywhere}.invoice-meta dl,.invoice-totals{display:grid;grid-template-columns:auto 1fr;margin:0;align-items:stretch}.invoice-meta dt,.invoice-meta dd,.invoice-totals dt,.invoice-totals dd{padding:2mm;margin:0;border-bottom:1px solid #d9e3ec}.invoice-meta dt,.invoice-totals dt{font-weight:700;white-space:nowrap}.invoice-meta dd,.invoice-totals dd{text-align:right;overflow-wrap:anywhere;background:#f4faff}.invoice-party{display:grid;grid-template-columns:1.2fr 1fr;gap:4mm}.invoice-a4 h2{font-size:10pt;color:#23527a;border:0;margin:0 0 2mm;padding:0;font-weight:800}.invoice-party>div>div{background:#f4faff;border:1px solid #dce6ef;padding:3mm;min-height:25mm;overflow-wrap:anywhere}.invoice-lines{width:100%;border-collapse:collapse;table-layout:fixed;font-size:9pt}.invoice-designation{width:36%}.invoice-lines col:not(.invoice-designation){width:12.8%}.invoice-lines th,.invoice-lines td{padding:2.5mm 1.4mm;border-bottom:1px solid #d8e4ef;vertical-align:top;text-align:right;overflow-wrap:anywhere}.invoice-lines th{color:#fff;background:#122d48;font-size:8pt}.invoice-lines td:first-child,.invoice-lines th:first-child{text-align:left}.invoice-lines tbody tr:nth-child(odd){background:#f4faff}.invoice-lines small{display:block;font-size:8pt;margin-top:1mm;color:#536d85}.invoice-total-row{display:grid;grid-template-columns:1fr 1fr;gap:4mm;align-items:start}.invoice-notes{font-size:9pt;color:#536d85}.invoice-totals dt,.invoice-totals dd{background:#eaf3fa;font-size:10pt}.invoice-totals .grand-total{background:#122d48;color:#fff;font-size:12pt;font-weight:800;padding:3mm 2mm}.invoice-terms{padding-top:3mm;border-top:1px solid #dae4ee;font-size:9pt}.invoice-footer{margin-top:auto;border-top:1px solid #23527a;padding-top:3mm;text-align:center;color:#122d48;font-size:8pt}.invoice-footer p{margin-top:1mm}.invoice-a4 .invoice-party,.invoice-a4 .invoice-total-row,.invoice-terms,.invoice-footer,.invoice-lines tr{break-inside:avoid}.invoice-lines thead{display:table-header-group}
@media(max-width:700px){.invoice-a4{min-height:0;padding:4mm;font-size:9pt;gap:3mm}.invoice-head,.invoice-party{grid-template-columns:1fr}.invoice-head .invoice-meta h1{text-align:left}.invoice-lines{font-size:7pt}.invoice-lines th{font-size:6.5pt}.invoice-lines td,.invoice-lines th{padding:1.5mm .75mm}.invoice-total-row{grid-template-columns:1fr}.invoice-company{font-size:20pt}}
@media print{@page{size:A4;margin:12mm}.invoice-a4{width:100%;max-width:none;min-height:265mm;margin:0;padding:0;border:0;box-shadow:none;print-color-adjust:exact;-webkit-print-color-adjust:exact;font-size:10pt;gap:4mm}.invoice-head,.invoice-party,.invoice-total-row{grid-template-columns:1.2fr 1fr}.invoice-head .invoice-meta h1{text-align:right}.invoice-lines{font-size:9pt}.invoice-lines th{font-size:8pt}.invoice-lines td,.invoice-lines th{padding:2.5mm 1.4mm}.invoice-a4 .invoice-footer{margin-top:auto}}

.invoice-brand-heading{display:flex;gap:3mm;align-items:center;margin-bottom:3mm}.invoice-brand-heading img{width:13mm;height:13mm;object-fit:contain}

.client-stats:has(> .mini-stat:nth-child(4)){grid-template-columns:repeat(4,minmax(0,1fr))}@media(max-width:900px){.client-stats:has(> .mini-stat:nth-child(4)){grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:520px){.client-stats:has(> .mini-stat:nth-child(4)){grid-template-columns:1fr}}
