:root{--navy:#062045;--navy2:#10325f;--red:#db2435;--bg:#f4f6fa;--text:#172a45;--muted:#6b7788;--border:#dfe5ec;--green:#1b7966;--white:#fff;--shadow:0 8px 30px rgba(6,32,69,.045);font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--text)}*{box-sizing:border-box}body{background:var(--bg);margin:0;font-size:14px;line-height:1.5}a{color:#114479;text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}button{cursor:pointer}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(26px,3vw,35px);line-height:1.15;letter-spacing:-1.2px;margin-bottom:10px}h2{font-size:19px;letter-spacing:-.3px}h3{font-size:15px}small{font-size:12px;color:var(--muted)}small{display:block}.muted{color:var(--muted)}.red{color:var(--red)!important}.hidden,[hidden]{display:none!important}.app-header{background:var(--navy);display:flex;align-items:center;justify-content:space-between;color:white;min-height:73px;padding:12px max(calc((100vw - 1450px)/2),28px);gap:22px;box-shadow:0 3px 12px #0b214026}.brand{display:flex;align-items:center;gap:13px;font-size:14px;font-weight:650;white-space:nowrap}.brand-mark{color:white;background:var(--red);border-radius:5px;padding:10px 12px;line-height:1;font-size:17px;font-weight:900;letter-spacing:-.5px}.app-header nav{display:flex;gap:22px;flex-wrap:wrap}.app-header nav a{color:#cfdcf0;font-size:13px;font-weight:650;padding:8px 0}.app-header nav a:hover{color:white;text-decoration:none}.account{display:flex;align-items:center;gap:12px;font-size:12px;color:#e8eef8}.account form{display:flex}.logout{border:1px solid #577090;background:transparent;color:#fff;border-radius:6px;font-size:11px;padding:7px 10px}.logout:hover{background:#ffffff17}.shell{max-width:1450px;margin:auto;padding:34px 28px 85px}.page-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:27px}.page-head p{color:var(--muted);margin-bottom:0;font-size:14px}.page-head h1{margin:7px 0}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:800;color:var(--red)}.page-head .eyebrow{color:#8f9cb2}.page-head .btn{white-space:nowrap}.wave{color:var(--red);font-size:25px}.btn{border:0;border-radius:8px;background:var(--red);padding:13px 20px;color:white!important;font-weight:750;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:43px;box-shadow:0 5px 12px #dc233021;white-space:normal;text-align:center}.btn:hover{background:#c51e31;text-decoration:none}.btn-secondary{background:#edf2f7!important;color:var(--navy)!important;box-shadow:none}.btn-secondary:hover{background:#d9e4ef!important}.btn-small{min-height:31px;padding:6px 10px;font-size:11px}.panel{background:white;border:1px solid #e5eaf1;border-radius:13px;padding:27px;box-shadow:var(--shadow);min-width:0}.panel-title{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}.panel-title h2{margin-bottom:0}.panel-title a{font-size:12px;font-weight:700}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:17px;margin:28px 0}.metric{background:white;border:1px solid #e5eaf1;border-radius:12px;padding:22px 24px;display:flex;flex-direction:column;gap:7px;box-shadow:var(--shadow)}.metric span{font-size:12px;color:#67788e;font-weight:650}.metric strong{font-size:34px;font-weight:800;line-height:1.15;letter-spacing:-.8px;color:var(--navy)}.metric.alert strong{color:var(--red)}.metric small{font-size:11px}.two-col{display:grid;grid-template-columns:1.3fr 1fr;gap:22px;align-items:start}.two-col>.panel{height:100%}.task{display:flex;gap:13px;align-items:center;padding:15px 0;border-bottom:1px solid #edf0f4}.task:last-child,.visit-row:last-child,.seller-line:last-child{border-bottom:0}.task-icon{width:34px;height:34px;border-radius:9px;background:#eef3f9;color:var(--navy2);display:grid;place-items:center;font-size:18px;font-weight:800;flex-shrink:0}.task-body{flex:1;min-width:0}.task-title{font-weight:750;color:var(--navy);font-size:14px}.task-detail{color:var(--muted);font-size:12px;margin:3px 0}.task-body small{margin-top:4px}.btn-icon{background:#e5f5f0;border:0;color:var(--green);font-weight:800;width:32px;height:32px;border-radius:8px;font-size:17px}.btn-icon:hover{background:#bde9dc}.tiny-danger{font-size:10px;color:#be2739;background:#feeaee;padding:3px 7px;border-radius:4px;font-weight:800;margin-left:5px}.visit-row{display:flex;gap:14px;border-bottom:1px solid #edf0f4;padding:14px 0;align-items:center}.visit-date{background:#f2f5fa;border:1px solid #e3e8f0;color:var(--navy);border-radius:8px;font-weight:800;padding:8px 9px;min-width:55px;text-align:center;font-size:12px}.visit-row strong{font-size:13px}.visit-row small{margin-top:3px}.empty{text-align:center;padding:28px 15px;color:#8792a2;background:#f7f9fc;border-radius:8px}.notice{border:1px solid #badbd0;background:#e8f7f2;color:#11624c;border-radius:8px;padding:13px 17px;margin-bottom:18px;font-weight:600}.notice.error{border-color:#fec3ca;background:#fff0f0;color:#9b2432}.filterbar{background:white;display:flex;flex-wrap:wrap;align-items:end;gap:13px;padding:17px;border-radius:11px;border:1px solid var(--border);margin-bottom:22px;box-shadow:var(--shadow)}.filterbar label{display:flex;flex-direction:column;gap:6px;min-width:135px}.filterbar .grow{flex:2;min-width:195px}.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field>span,.filterbar label>span{color:#394c65;font-size:12px;font-weight:750}.field input,.field textarea,.field select,.filterbar input,.filterbar select{min-height:43px;width:100%;min-width:0;border:1px solid #ccd6e2;border-radius:7px;background:white;padding:10px 12px;color:var(--text);outline:none}.field textarea{resize:vertical;min-height:78px}.field input:focus,.field textarea:focus,.field select:focus,.filterbar input:focus,.filterbar select:focus{border-color:#326fa6;box-shadow:0 0 0 3px #3c85ca1f}.field input[type=file]{padding:9px;min-height:50px}.field small{line-height:1.4}.field input[type=datetime-local],.field input[type=date]{max-width:100%}.table-panel{padding:0}.table-panel .panel-title{padding:25px 27px 0}.table-wrap{width:100%;overflow-x:auto}table{border-collapse:collapse;width:100%}td,th{padding:14px 17px;border-bottom:1px solid #e9edf2;text-align:left;vertical-align:middle}th{font-size:11px;background:#f6f8fb;text-transform:uppercase;letter-spacing:.5px;color:#617085;white-space:nowrap}tr:last-child td{border-bottom:0}td{font-size:12px}.table-link{font-weight:750;color:var(--navy)}td small{margin-top:3px}.status{display:inline-flex;align-items:center;white-space:nowrap;font-size:10px;font-weight:800;letter-spacing:.2px;border-radius:999px;padding:4px 9px;text-transform:uppercase}.status.success{color:#12765d;background:#e3f5ed}.status.warning{color:#9e5a14;background:#fff3e2}.status.info{color:#2b5885;background:#e8f1fa}.status.muted{color:#677481;background:#edf0f3}.form-card{padding:30px 34px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:19px}.section-heading{padding:14px 0 12px;border-bottom:1px solid #e6ebf2;margin:18px 0 21px;font-size:11px;letter-spacing:1.4px;font-weight:900;color:#78879d;text-transform:uppercase}.section-heading:first-child{margin-top:0}.checkbox-large{display:flex;align-items:center;gap:9px;font-weight:750;color:var(--navy);padding:15px 0;margin-bottom:15px}.checkbox-large input,.choice input{width:19px;height:19px;accent-color:var(--red)}.actions-footer{display:flex;gap:12px;flex-wrap:wrap;margin-top:30px}.details-grid{display:grid;grid-template-columns:1fr 1fr;gap:23px 17px}.details-grid>div>span{font-size:11px;color:#7c8997;font-weight:650;display:block;margin-bottom:4px}.details-grid>div>strong{font-size:13px;font-weight:650;overflow-wrap:anywhere}.details-grid .detail-full{grid-column:1/-1}.info-note{border-left:3px solid var(--navy);background:#f1f5fa;padding:13px 16px;margin-top:19px;font-size:12px}.info-note p{margin:5px 0 0}.back{display:block;margin-bottom:10px;font-size:12px;font-weight:650}.head-actions{display:flex;gap:10px;flex-wrap:wrap}.mini-action{border-bottom:1px solid #edf0f4;padding:12px 0;font-size:12px}.mini-action:last-of-type{border:0}.mini-action strong{display:block;margin-top:6px}.mini-action p{margin:5px 0;color:#64748b}.mini-action small{margin:4px 0}.divider{height:1px;background:#e5eaf1;margin:20px 0}.stack{display:flex;flex-direction:column;gap:14px}.inline-form{display:inline-block}.text-button{background:none;border:0;color:#117454;padding:7px 0;font-weight:750}.history-entry{display:grid;grid-template-columns:165px 1fr;gap:30px;padding:19px 4px;border-bottom:1px solid #e8ecf1}.history-entry:last-child{border-bottom:0}.history-date{font-weight:750;color:var(--navy)}.history-date small{margin:4px 0}.history-entry p{margin:8px 0}.history-entry>div>small{margin:4px 0}.attachments{display:flex;gap:9px;flex-wrap:wrap;margin-top:9px}.attachments a{background:#e9f1fa;color:var(--navy);padding:5px 9px;border-radius:5px;font-size:11px;font-weight:700}.choices{display:grid;grid-template-columns:repeat(4,1fr);gap:11px;margin:15px 0 25px}.choice{border:1px solid var(--border);border-radius:9px;padding:14px;display:flex;align-items:center;gap:9px;font-weight:650;font-size:12px}.choice:has(input:checked){background:#fff2f3;border-color:#ec9aa2}.action-line{border-bottom:1px solid #e8edf2;padding:24px 4px;display:flex;gap:20px;justify-content:space-between;align-items:start}.action-line:last-child{border-bottom:0}.action-line p{margin:5px 0}.action-line small{margin-top:7px}.action-meta{display:flex;align-items:center;gap:7px;margin-bottom:7px}.complete-form{min-width:230px;display:flex;flex-direction:column;gap:7px}.complete-form .btn{font-size:12px;padding:7px 10px;min-height:34px}.seller-line{display:flex;justify-content:space-between;align-items:center;gap:15px;border-bottom:1px solid #edf0f4;padding:15px 0}.seller-line small{margin-top:5px}.login-page{display:grid;grid-template-columns:1.05fr .85fr;max-width:1000px;margin:45px auto;min-height:540px;box-shadow:0 13px 52px #071d3a19;border-radius:17px;overflow:hidden}.login-visual{background:linear-gradient(145deg,#0a2b58,#041a38);color:white;padding:62px 56px;display:flex;flex-direction:column;justify-content:center;position:relative;overflow:hidden}.login-visual:before{content:"";position:absolute;border:80px solid #ffffff08;border-radius:50%;width:400px;height:400px;right:-250px;top:-120px}.login-visual h1{font-size:46px;line-height:1.1;max-width:370px;margin:25px 0}.login-visual p{color:#cfddf0;max-width:330px;line-height:1.8}.login-decor{margin-top:40px;letter-spacing:7px;opacity:.3;font-weight:800}.login-form{border-radius:0;display:flex;flex-direction:column;justify-content:center;padding:65px 53px}.login-form h2{font-size:30px;margin-top:8px}.login-form p{color:var(--muted);margin-bottom:28px}.login-form .btn{width:100%;justify-content:space-between}.big-count{background:white;border:1px solid var(--border);border-radius:10px;padding:10px 25px;font-size:30px;font-weight:800;color:var(--navy)}.big-count small{font-size:12px;font-weight:400}.autocomplete-wrap{position:relative}.suggestions{position:absolute;z-index:50;top:100%;left:0;right:0;background:white;border:1px solid #bfcddd;box-shadow:0 15px 32px #12233d25;border-radius:8px;max-height:280px;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y}.suggestion{display:block;width:100%;text-align:left;background:white;border:0;border-bottom:1px solid #edf1f5;padding:12px 14px;color:var(--navy)}.suggestion:hover,.suggestion:focus{background:#edf4fa}.suggestion strong{display:block;font-size:13px}.suggestion small{display:block;color:var(--muted)}.panel.narrow{max-width:520px;margin:auto}
@media(max-width:1120px){.app-header{padding:12px 20px;flex-wrap:wrap}.app-header nav{order:3;width:100%;gap:16px}.metrics{grid-template-columns:repeat(2,1fr)}.shell{padding:25px 20px 70px}.two-col{grid-template-columns:1fr 1fr}.choices{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.app-header{align-items:start;gap:13px}.brand{font-size:13px}.brand-mark{font-size:15px}.app-header nav{width:100%;gap:6px;flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px;scrollbar-width:thin}.app-header nav a{white-space:nowrap;background:#ffffff0c;border-radius:7px;padding:9px 12px}.account{margin-left:auto}.shell{padding:21px 13px 70px}.page-head{align-items:start;flex-direction:column;gap:12px}.page-head h1{font-size:28px}.metrics{gap:9px;margin:20px 0}.metric{padding:15px}.metric strong{font-size:28px}.two-col{grid-template-columns:1fr}.panel{padding:19px 15px}.panel-title{align-items:start}.form-card{padding:19px 15px}.form-grid{grid-template-columns:1fr;gap:15px}.choices{grid-template-columns:repeat(2,1fr);gap:7px}.choice{padding:10px 9px}.details-grid{gap:17px 11px}.filterbar{align-items:stretch}.filterbar label{flex:1;min-width:140px}.filterbar .btn{width:100%}.action-line{flex-direction:column}.complete-form{width:100%}.history-entry{grid-template-columns:1fr;gap:8px}.login-page{grid-template-columns:1fr;margin:0;min-height:auto}.login-visual{padding:32px 27px;min-height:180px}.login-visual h1{font-size:29px;margin:14px 0}.login-visual p{font-size:12px}.login-decor{display:none}.login-form{padding:30px 24px}.table-panel .panel-title{padding:20px 15px 0}.back{margin-top:4px}}
@media(max-width:420px){.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.metric{padding:13px}.metric strong{font-size:24px}.metrics .metric span{font-size:11px}.account{font-size:11px}.brand{gap:7px}.brand span:last-child{font-size:11px}.choices{grid-template-columns:1fr 1fr}.details-grid{grid-template-columns:1fr}.page-head .head-actions{width:100%}.page-head .head-actions>.btn{flex:1}}
.upcoming{margin-top:24px}.upcoming-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.upcoming-card{border:1px solid #e2e8f1;padding:14px;border-radius:8px;display:flex;flex-direction:column;gap:7px;background:#f9fbfd}.upcoming-card>span{color:#b23e4c;font-size:11px;font-weight:800}.upcoming-card strong{color:#092a53}.upcoming-card:hover{background:#f0f5fc;text-decoration:none}@media(max-width:800px){.upcoming-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:420px){.upcoming-grid{grid-template-columns:1fr}}

/* IMM HM CRM V1.2 : filtres portefeuille et autorisations */
.portfolio-picker{min-width:220px}.portfolio-hint{font-size:12px;margin:-9px 0 18px 2px}.client-access-form{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0}.client-access-form label{display:flex;align-items:center;gap:7px;font-size:12px;line-height:1.5}.client-access-form input[type=checkbox]{width:17px;height:17px;accent-color:#b52031}.client-access-form .btn{min-height:32px;padding:7px 10px;font-size:11px}@media(max-width:760px){.portfolio-picker{flex:1;min-width:100%}.client-access-form{width:100%}}

/* IMM HM CRM V1.3 Direction + Devis */
.direction-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}
.direction-filters label{min-width:155px;flex:1}
.direction-filters .btn{min-height:42px}
.direction-period{font-size:14px;color:var(--muted);font-weight:700;margin:8px 0 18px}
.dir-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-bottom:22px}
.dir-kpi{display:flex;flex-direction:column;gap:9px;background:#fff;padding:20px;border:1px solid var(--border);border-radius:12px;box-shadow:var(--shadow)}
.dir-kpi>span{font-weight:700;color:var(--navy);font-size:14px}.dir-kpi>strong{font-size:34px;color:var(--navy);line-height:1.05}.dir-kpi>small{font-size:12px;color:var(--muted)}
.dir-sellers,.dir-two{margin-bottom:22px}.dir-sellers table{min-width:900px}.dir-sellers td,.dir-sellers th{white-space:normal}
.dir-footnote{font-size:12px;color:var(--muted);margin:14px 0 0;line-height:1.5}
.dir-trend{display:flex;flex-direction:column;gap:12px}.dir-bar-row{display:grid;grid-template-columns:minmax(72px,105px) 1fr 32px;align-items:center;gap:8px;font-size:13px}.dir-bar-track{height:12px;background:#e8eef5;border-radius:10px;overflow:hidden}.dir-bar-fill{background:var(--navy);height:100%;border-radius:10px}.dir-bar-progress{appearance:none;-webkit-appearance:none;width:100%;height:12px;border:0;border-radius:10px;overflow:hidden;background:#e8eef5}.dir-bar-progress::-webkit-progress-bar{background:#e8eef5}.dir-bar-progress::-webkit-progress-value{background:var(--navy)}.dir-bar-progress::-moz-progress-bar{background:var(--navy)}.dir-list-row{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border);padding:11px 0;align-items:center}.dir-list-row:last-child{border:0}.dir-list-row>div{min-width:0}.dir-list-row small{display:block;color:var(--muted);font-size:12px;margin-top:4px;line-height:1.5}.dir-list-row>span{white-space:nowrap;font-size:12px;color:var(--muted)}.dir-overdue{color:var(--red)!important;font-weight:700}.quote-inline{display:flex;gap:7px;align-items:center;flex-wrap:nowrap}.quote-inline select{width:115px;min-width:90px}.quote-form{max-width:1100px}
@media(max-width:900px){.dir-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.direction-filters label{min-width:165px}}
@media(max-width:580px){.dir-kpis{grid-template-columns:1fr 1fr;gap:9px}.dir-kpi{padding:13px}.dir-kpi>strong{font-size:28px}.dir-kpi>span{font-size:12px}.dir-two{display:block}.dir-list-row{align-items:start;flex-direction:column}.dir-list-row>span{white-space:normal}.direction-filters label{width:100%;min-width:100%}.direction-filters .btn{width:100%}}

/* CRM V1.4 : édition sécurisée des commerciaux */
.seller-card{display:flex;flex-direction:column;align-items:stretch;gap:10px}
.seller-overview{min-width:0}.seller-overview small{overflow-wrap:anywhere}
.seller-controls{display:flex;align-items:center;justify-content:flex-start;gap:10px}
.profile-editor{width:100%;border:1px solid #e1e8f1;border-radius:9px;background:#f9fbfe;margin:4px 0 2px;overflow:hidden}
.profile-editor summary{list-style:none;cursor:pointer;padding:12px 14px;font-size:13px;color:var(--navy);font-weight:800;display:flex;align-items:center;gap:8px}
.profile-editor summary::after{content:"▾";margin-left:auto;color:var(--red)}
.profile-editor[open] summary::after{content:"▴"}
.profile-editor summary::-webkit-details-marker{display:none}
.profile-editor[open] summary{border-bottom:1px solid #e1e8f1;background:#f0f5fa}
.seller-edit-form{padding:15px}
.seller-edit-form .checkbox-large{font-size:12px;margin:0;padding:5px 0}
.seller-edit-form .info-note{margin:0;line-height:1.5}
.seller-edit-form .btn{width:max-content;max-width:100%}
@media(max-width:760px){.seller-controls form,.seller-controls button{width:100%}.seller-edit-form .btn{width:100%}}


/* CRM V1.5 : liste paginée et recherche instantanée */
.crm-client-search-status{min-height:19px;font-size:12px;color:var(--muted);margin:0 0 6px 2px}
.crm-clients-panel{padding:0;overflow:hidden}
.crm-result-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px 14px;flex-wrap:wrap}
.crm-result-title h2{margin:0 0 2px}
.crm-result-title .muted{font-size:12px}
.crm-clients-panel .table-wrap{max-width:100%;overflow-x:auto}
.crm-no-results{padding:25px 24px 30px}
.crm-no-results p{font-weight:600;margin:0 0 5px}
.crm-pagination{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;padding:17px 14px 21px;border-top:1px solid var(--border)}
.crm-pagination .crm-page-link,.crm-pagination .crm-page-current,.crm-pagination .crm-page-disabled{display:inline-flex;justify-content:center;align-items:center;min-width:38px;min-height:38px;padding:7px 12px;border:1px solid var(--border);border-radius:8px;background:#fff;font-size:13px;font-weight:700;white-space:nowrap}
.crm-pagination .crm-page-link:hover,.crm-pagination .crm-page-link:focus-visible{border-color:var(--navy);background:#edf4fb;text-decoration:none}
.crm-pagination .crm-page-current{background:var(--navy);color:white;border-color:var(--navy)}
.crm-pagination .crm-page-disabled{opacity:.4;cursor:default}
.crm-pagination .crm-page-ellipsis{padding:0 3px;color:var(--muted)}
.crm-clients-panel[aria-busy="true"],#crm-client-results[aria-busy="true"]{opacity:.7;transition:opacity .1s}
.crm-page-size{min-width:95px;max-width:110px}
@media(max-width:760px){.crm-result-title{padding:16px 14px 12px}.crm-pagination{gap:4px;padding:13px 7px 17px}.crm-pagination .crm-page-link,.crm-pagination .crm-page-current,.crm-pagination .crm-page-disabled{min-height:38px;min-width:33px;padding:7px 9px;font-size:12px}.crm-page-size{min-width:100%;max-width:none}}
