:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1c2c25;background:#f5f7f5;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:320px}.app-shell{min-height:100vh;display:grid;grid-template-columns:250px minmax(0,1fr)}.sidebar{background:#12372a;color:#dce9e1;padding:26px 17px;display:flex;flex-direction:column;min-height:100vh;position:sticky;top:0;height:100vh}.brand{display:flex;gap:12px;align-items:center;color:white;text-decoration:none;font-size:18px;font-weight:500;letter-spacing:-.4px;padding:3px 8px 36px}.brand b{font-weight:800}.brand small{display:block;font-size:11px;color:#a8c7b6;letter-spacing:1.3px;margin-top:3px}.brand-mark{display:grid;place-items:center;background:#d8f36a;color:#17372b;font-size:22px;font-weight:900;border-radius:12px;width:42px;height:42px}.side-label,.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.5px;color:#789489}.side-label{padding:0 10px 13px}.nav-item{width:100%;border:0;border-radius:10px;padding:12px 13px;display:flex;align-items:center;gap:12px;background:transparent;color:#c5d7cd;font-size:13px;text-align:left;margin-bottom:5px;cursor:pointer}.nav-item span{font-size:18px}.nav-item.active,.nav-item:hover{background:#244b3a;color:#fff}.sidebar-note{margin-top:24px;padding:13px 10px;font-size:11px;color:#a5c1b1}.dot{display:inline-block;width:7px;height:7px;background:#b8e86a;border-radius:50%;margin-right:7px}.sidebar-bottom{margin-top:auto;border-top:1px solid #2c5140;padding:20px 4px 0;display:flex;align-items:center;gap:10px}.avatar{width:34px;height:34px;display:grid;place-items:center;background:#d8f36a;color:#16392a;font-weight:800;border-radius:50%;font-size:11px}.sidebar-bottom strong,.sidebar-bottom small{display:block}.sidebar-bottom strong{font-size:12px;color:#fff}.sidebar-bottom small{font-size:10px;color:#a6c0b1;margin-top:4px;max-width:150px;overflow:hidden;text-overflow:ellipsis}.main-content{min-width:0;padding:34px clamp(20px,4vw,58px) 20px}.topbar{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:28px}.topbar h1{font-size:29px;letter-spacing:-1.1px;margin:8px 0 7px;font-weight:750}.topbar p,.section-head p{font-size:13px;color:#78877f;margin:0}.top-actions{display:flex;gap:16px;align-items:center}.secure-label{font-size:11px;color:#6d8175;white-space:nowrap}.primary-button,.secondary-button{border:0;border-radius:9px;padding:11px 16px;font-weight:700;font-size:12px;cursor:pointer;transition:transform .15s,background .15s}.primary-button{background:#173d2d;color:#fff}.primary-button:hover{background:#24583f;transform:translateY(-1px)}.secondary-button{background:#edf1ed;color:#40554a}.full-width{width:100%;padding:13px}.auth-card{display:grid;grid-template-columns:1fr minmax(300px,420px);gap:32px;align-items:stretch;background:white;border:1px solid #e7ece7;border-radius:18px;overflow:hidden;box-shadow:0 8px 30px #163a2910}.auth-copy{padding:46px;background:radial-gradient(ellipse at 0 0,#e5f4d0 0,transparent 60%),#f7faf5}.auth-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#d8f36a;color:#17372b;font-size:23px}.auth-copy h2{font-size:26px;letter-spacing:-.8px;margin:23px 0 12px;max-width:380px}.auth-copy p{font-size:13px;line-height:1.7;color:#6e7d72;max-width:390px}.auth-points{display:flex;flex-wrap:wrap;gap:8px;margin-top:27px}.auth-points span{font-size:10px;border:1px solid #dbe6d7;border-radius:20px;padding:8px 10px;color:#4e6d56}.auth-form{padding:42px 35px}.form-heading h3{font-size:21px;margin:0 0 7px}.form-heading p{font-size:12px;color:#819087;margin:0 0 25px}.auth-form label,.field label{display:block;font-size:11px;font-weight:700;color:#47584e;margin:15px 0 7px}.auth-form input,.field input,.field select,.field textarea,.toolbar select{width:100%;border:1px solid #dce4dd;border-radius:8px;background:white;color:#26392e;font:inherit;font-size:12px;padding:12px;outline:none}.auth-form input:focus,.field input:focus,.field select:focus,.field textarea:focus,.toolbar select:focus{border-color:#699b7a;box-shadow:0 0 0 3px #2f78431a}.auth-form .primary-button{margin-top:20px}.auth-switch{text-align:center;font-size:11px;color:#7c8981;margin-top:20px}.auth-switch button{border:0;background:none;color:#236440;font-weight:800;cursor:pointer}.message{font-size:12px;line-height:1.5;color:#a13c31;min-height:16px}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:23px}.stat-card,.content-card{background:white;border:1px solid #e8ece8;border-radius:14px;box-shadow:0 4px 16px #1d3b2705}.stat-card{padding:20px}.stat-top{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#748177}.stat-icon{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;font-size:14px}.green{background:#e7f4dc;color:#397442}.amber{background:#fff1d7;color:#a56b0a}.blue{background:#e2efff;color:#346bb5}.purple{background:#eee6ff;color:#7450ad}.stat-card>strong{display:block;font-size:29px;letter-spacing:-1px;margin:15px 0 5px}.stat-card>small{font-size:10px;color:#8a968e}.content-card{padding:24px 0 0}.section-head{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:0 24px 22px}.section-head h2{font-size:17px;margin:0 0 7px;letter-spacing:-.4px}.section-head p{font-size:11px}.toolbar{display:flex;justify-content:space-between;gap:12px;padding:15px 24px;border-top:1px solid #edf0ed;border-bottom:1px solid #edf0ed;background:#fbfcfb}.searchbox{display:flex;align-items:center;gap:8px;max-width:340px;width:100%;border:1px solid #e0e7e0;background:white;border-radius:8px;padding:0 11px;color:#829188}.searchbox input{width:100%;border:0;outline:0;padding:10px 0;font:inherit;font-size:11px;background:transparent}.toolbar select{width:auto;min-width:150px;padding:9px 10px;font-size:11px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;white-space:nowrap}th{text-align:left;font-size:9px;letter-spacing:1px;color:#87938b;font-weight:800;padding:15px 18px;background:#fcfdfc}td{padding:15px 18px;border-top:1px solid #eff2ef;font-size:11px;color:#526158}td:first-child,th:first-child{padding-left:24px}.contact-name{font-weight:750;color:#24372c;font-size:12px}.contact-company{font-size:10px;color:#8a968e;margin-top:4px}.status-pill{display:inline-flex;border-radius:30px;padding:6px 9px;font-size:10px;font-weight:700;background:#edf1ed;color:#617066}.status-new{background:#fff1d9;color:#986a17}.status-contacted{background:#e8f1ff;color:#3e6fa8}.status-qualified,.status-won{background:#e7f5e6;color:#34703c}.status-proposal_sent,.status-negotiation{background:#f0eaff;color:#7352a5}.status-lost{background:#ffebea;color:#aa5047}.status-paused{background:#edf0f1;color:#697980}.follow-date{font-size:10px;color:#607367}.empty-state{text-align:center;padding:38px 20px!important;color:#8a978e!important}.table-footer{display:flex;justify-content:space-between;gap:10px;padding:14px 24px;color:#8b978e;font-size:10px;border-top:1px solid #edf0ed}.footer{text-align:center;color:#9ba69e;font-size:10px;padding:28px 0 8px}.footer span{padding:0 5px}.lead-dialog{border:0;padding:0;border-radius:16px;width:min(650px,calc(100% - 24px));max-height:90vh;overflow:auto;box-shadow:0 25px 100px #10281c45}.lead-dialog::backdrop{background:#112a1fc0;backdrop-filter:blur(3px)}.lead-dialog form{padding:27px}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}.dialog-head h2{font-size:21px;margin:7px 0}.icon-button{border:0;background:transparent;color:inherit;cursor:pointer;font-size:17px;padding:5px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.field.full{grid-column:1/-1}.field label{margin-top:12px}.field textarea{resize:vertical}.dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:10px}.toast{position:fixed;bottom:22px;right:22px;max-width:calc(100% - 44px);background:#173d2d;color:white;padding:13px 17px;border-radius:10px;font-size:12px;box-shadow:0 8px 28px #0002;opacity:0;transform:translateY(10px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translateY(0)}[hidden]{display:none!important}@media(max-width:1050px){.app-shell{grid-template-columns:205px minmax(0,1fr)}.sidebar{padding:22px 12px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.auth-card{grid-template-columns:1fr}.auth-copy{padding:30px}.auth-form{padding:30px;max-width:none}}@media(max-width:700px){.app-shell{display:block}.sidebar{position:relative;height:auto;min-height:0;padding:14px 16px;flex-direction:row;align-items:center;justify-content:space-between}.brand{padding:0;font-size:15px}.brand-mark{width:36px;height:36px}.brand small,.side-label,.nav-item,.sidebar-note{display:none}.sidebar-bottom{margin:0;border:0;padding:0}.sidebar-bottom>div:nth-child(2){display:none}.main-content{padding:25px 14px 16px}.topbar{align-items:flex-start}.topbar h1{font-size:25px}.topbar p{line-height:1.5;max-width:300px}.top-actions{display:block}.secure-label{display:none}.top-actions .primary-button{margin-top:10px}.auth-copy{padding:25px}.auth-copy h2{font-size:23px}.auth-form{padding:25px}.stats-grid{gap:10px}.stat-card{padding:15px}.stat-card>strong{font-size:25px}.content-card{padding-top:19px}.section-head{align-items:flex-start;padding:0 15px 17px}.section-head p{line-height:1.5}.section-head .primary-button{white-space:nowrap;padding:10px;font-size:10px}.toolbar{padding:12px 14px;flex-direction:column}.searchbox{max-width:none}.toolbar select{width:100%}.table-footer{padding:13px 15px;font-size:9px}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.lead-dialog form{padding:20px}.sidebar-bottom .icon-button{display:none}}

/* Sanar Connect — refresh visuel premium, sans modifier la logique métier */
:root{
  color-scheme:light;
  --sc-ink:#182b22;
  --sc-muted:#738178;
  --sc-line:#e4ebe5;
  --sc-surface:#ffffff;
  --sc-canvas:#f3f6f3;
  --sc-green:#163d2d;
  --sc-lime:#d9f36a;
}
html{scroll-behavior:smooth}
body{
  color:var(--sc-ink);
  background:
    radial-gradient(ellipse at 82% 0%,rgba(217,243,106,.10),transparent 34%),
    var(--sc-canvas);
  letter-spacing:-.01em;
}
.app-shell{grid-template-columns:264px minmax(0,1fr)}
.sidebar{
  padding:28px 18px 20px;
  background:linear-gradient(165deg,#102f24 0%,#153e2d 58%,#102b21 100%);
  border-right:1px solid rgba(255,255,255,.06);
  box-shadow:8px 0 32px rgba(17,46,32,.04);
}
.brand{padding:3px 9px 42px;gap:13px}
.brand-mark{box-shadow:0 5px 15px rgba(217,243,106,.15);border-radius:13px}
.side-label{font-size:9px;letter-spacing:1.65px;color:#8aa697;padding-bottom:15px}
.nav-item{
  min-height:44px;
  padding:12px 13px;
  border:1px solid transparent;
  border-radius:11px;
  font-size:12px;
  transition:background .18s,border-color .18s,transform .18s;
}
.nav-item span{width:20px;text-align:center;color:#a6c2b2}
.nav-item.active{
  background:linear-gradient(100deg,rgba(217,243,106,.16),rgba(217,243,106,.07));
  border-color:rgba(217,243,106,.13);
  box-shadow:inset 3px 0 0 var(--sc-lime);
}
.nav-item.active span{color:var(--sc-lime)}
.nav-item:hover{background:rgba(255,255,255,.075);transform:translateX(2px)}
.sidebar-note{
  margin-top:28px;
  padding:14px 11px;
  border:1px solid rgba(255,255,255,.07);
  background:rgba(255,255,255,.035);
  border-radius:10px;
}
.sidebar-bottom{border-top-color:rgba(255,255,255,.12);padding-top:18px}
.main-content{padding:38px clamp(22px,4vw,64px) 28px;max-width:1800px;width:100%;margin:0 auto}
.topbar{align-items:flex-end;margin-bottom:32px}
.eyebrow{color:#6b8977;letter-spacing:1.8px;font-size:9px}
.topbar h1{font-size:clamp(28px,2.4vw,36px);letter-spacing:-1.4px;line-height:1.12;margin:10px 0}
.topbar p,.section-head p{color:#7a8980;line-height:1.65}
.secure-label{
  padding:9px 12px;
  border:1px solid #e0e9df;
  background:rgba(255,255,255,.72);
  border-radius:999px;
  font-size:10px;
}
.primary-button,.secondary-button{
  min-height:39px;
  border-radius:10px;
  padding:11px 16px;
  font-size:12px;
  box-shadow:none;
}
.primary-button{background:linear-gradient(135deg,#194832,#123626);box-shadow:0 5px 12px rgba(22,61,45,.12)}
.primary-button:hover{background:#24583f;box-shadow:0 7px 16px rgba(22,61,45,.17)}
.secondary-button{border:1px solid #e2e9e2;background:#f6f8f6}
.auth-card,.stat-card,.content-card{
  border:1px solid rgba(220,230,221,.95);
  box-shadow:0 12px 36px rgba(25,53,35,.045),0 2px 6px rgba(25,53,35,.025);
}
.auth-card{border-radius:22px;grid-template-columns:1fr minmax(320px,430px);gap:0}
.auth-copy{
  padding:clamp(32px,4vw,58px);
  background:
    radial-gradient(ellipse at 8% 0%,rgba(217,243,106,.35),transparent 47%),
    linear-gradient(145deg,#f7faf4,#eef5ed);
  border-right:1px solid #e6eee4;
}
.auth-icon{width:48px;height:48px;border-radius:15px;box-shadow:0 6px 18px rgba(35,76,43,.08)}
.auth-copy h2{font-size:clamp(25px,2.5vw,33px);line-height:1.17;letter-spacing:-1.1px}
.auth-copy p{font-size:13px;line-height:1.8;color:#6c7c70}
.auth-points span{background:rgba(255,255,255,.65);border-color:#dce7d7}
.auth-form{padding:clamp(28px,3.3vw,44px)}
.form-heading h3{letter-spacing:-.5px}
.auth-form label,.field label{font-size:11px;color:#405449}
.auth-form input,.field input,.field select,.field textarea,.toolbar select{
  min-height:42px;
  border-color:#dfe7df;
  border-radius:10px;
  background:#fcfdfc;
  transition:border-color .15s,box-shadow .15s,background .15s;
}
.auth-form input:focus,.field input:focus,.field select:focus,.field textarea:focus,.toolbar select:focus{
  background:#fff;border-color:#7da487;box-shadow:0 0 0 4px rgba(65,126,81,.10)
}
.stats-grid{gap:17px;margin-bottom:25px}
.stat-card{
  position:relative;
  overflow:hidden;
  min-height:145px;
  padding:21px 22px;
  border-radius:16px;
  transition:transform .18s,box-shadow .18s;
}
.stat-card:after{
  content:"";
  position:absolute;
  right:-25px;top:-35px;
  width:90px;height:90px;
  border-radius:50%;
  background:rgba(217,243,106,.10);
  pointer-events:none;
}
.stat-card:hover{transform:translateY(-2px);box-shadow:0 16px 34px rgba(25,53,35,.08)}
.stat-top{font-size:11px;font-weight:650;color:#6d7c72}
.stat-icon{width:34px;height:34px;border-radius:11px}
.stat-card>strong{font-size:32px;letter-spacing:-1.3px;margin:17px 0 6px;color:#1a3526}
.stat-card>small{font-size:10px;color:#859188}
.content-card{border-radius:17px;overflow:hidden;padding-top:25px}
.section-head{padding:0 25px 23px}
.section-head h2{font-size:18px;letter-spacing:-.55px}
.toolbar{padding:16px 25px;background:#f9fbf9;border-color:#edf1ed}
.searchbox{border-radius:10px;border-color:#e1e8e1;max-width:390px}
.searchbox:focus-within{border-color:#7da487;box-shadow:0 0 0 4px rgba(65,126,81,.08)}
.searchbox input{min-height:39px}
.toolbar select{background-color:#fff}
table{border-collapse:separate;border-spacing:0}
th{background:#f9fbf9;padding-top:16px;padding-bottom:16px;color:#839087;font-size:9px}
td{padding-top:17px;padding-bottom:17px;border-top:1px solid #f0f3f0;font-size:11px}
tbody tr{transition:background .15s}
tbody tr:hover{background:#fbfdfb}
.contact-name{font-size:12px;color:#20372a}
.status-pill{padding:6px 10px;border:1px solid rgba(0,0,0,.025)}
.empty-state{padding:48px 20px!important}
.table-footer{background:#fcfdfc}
.lead-dialog{border-radius:20px;box-shadow:0 28px 100px rgba(12,37,24,.30)}
.lead-dialog form{padding:30px}
.dialog-head h2{letter-spacing:-.6px}
.toast{border:1px solid rgba(255,255,255,.12);box-shadow:0 14px 36px rgba(0,0,0,.18)}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:3px solid rgba(128,170,91,.45);outline-offset:2px
}
@media(max-width:1050px){
  .app-shell{grid-template-columns:220px minmax(0,1fr)}
  .main-content{padding:30px 24px 22px}
  .auth-card{grid-template-columns:1fr}
  .auth-copy{border-right:0;border-bottom:1px solid #e6eee4}
}
@media(max-width:700px){
  .sidebar{padding:13px 15px;background:linear-gradient(100deg,#102f24,#17432f)}
  .brand{gap:10px}
  .brand-mark{width:35px;height:35px;border-radius:11px}
  .main-content{padding:24px 14px 18px}
  .topbar{gap:12px;margin-bottom:22px}
  .topbar h1{font-size:26px}
  .top-actions .primary-button{font-size:10px;padding:10px}
  .stats-grid{gap:10px}
  .stat-card{min-height:126px;padding:15px;border-radius:13px}
  .stat-card>strong{font-size:27px;margin-top:13px}
  .stat-top{gap:8px;font-size:10px}
  .stat-icon{width:29px;height:29px}
  .content-card{border-radius:14px;padding-top:19px}
  .section-head{padding:0 14px 17px}
  .toolbar{padding:12px 14px}
  th{padding:13px 14px}
  td{padding:14px}
  td:first-child,th:first-child{padding-left:14px}
  .auth-card{border-radius:17px}
  .auth-copy{padding:25px 22px}
  .auth-form{padding:25px 22px}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}


/* Dashboard overview: live follow-ups and pipeline based on existing CRM records */
.overview-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:18px;margin:0 0 25px}
.overview-card{min-width:0;padding:23px 24px;background:#fff;border:1px solid #e4ebe5;border-radius:17px;box-shadow:0 12px 36px rgba(25,53,35,.04)}
.overview-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:20px}
.overview-card-head h2{font-size:17px;letter-spacing:-.5px;margin:8px 0 6px}
.overview-card-head p{font-size:11px;line-height:1.55;color:#7a8980;margin:0}
.overview-icon{display:grid;place-items:center;flex:0 0 36px;height:36px;border-radius:11px;background:#edf5e7;color:#2e6841;font-size:18px}
.overview-list,.pipeline-list{display:flex;flex-direction:column;gap:0}
.overview-followup{display:flex;align-items:center;gap:11px;padding:13px 0;border-top:1px solid #eff3ef;min-width:0}
.followup-marker{width:8px;height:8px;border-radius:50%;flex:0 0 8px;background:#8ca997}
.followup-urgent{color:#b6473c!important}
.followup-marker.followup-urgent{background:#d85e51}
.followup-marker.followup-today{background:#d39a2f}
.followup-main{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.followup-main strong{font-size:11px;color:#26392e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.followup-main span{font-size:10px;color:#8a968e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.followup-date{font-size:10px;font-weight:750;white-space:nowrap;color:#718077}
.followup-date.followup-today{color:#9c6b13}
.followup-upcoming{color:#718077}
.pipeline-row{padding:9px 0}
.pipeline-row-top{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px;font-size:11px;color:#66766c}
.pipeline-row-top strong{color:#24392c;font-size:11px}
.pipeline-track{height:6px;border-radius:20px;background:#eef2ee;overflow:hidden}
.pipeline-track span{display:block;height:100%;border-radius:20px;min-width:0;transition:width .25s}
.pipeline-green{background:#42845a}.pipeline-blue{background:#6696d3}.pipeline-lime{background:#b3d84b}.pipeline-violet{background:#9a7acb}.pipeline-amber{background:#d8a33e}.pipeline-muted{background:#aab5ae}
.overview-empty{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:15px 0;color:#7f8d83}
.overview-empty strong{font-size:12px;color:#42564a}
.overview-empty span:not(.empty-symbol){font-size:11px;line-height:1.6;max-width:300px}
.empty-symbol{display:grid;place-items:center;width:30px;height:30px;border-radius:10px;background:#edf5e7;color:#367449;font-size:16px}
@media(max-width:900px){.overview-grid{grid-template-columns:1fr}.overview-card{padding:21px}}
@media(max-width:700px){.overview-grid{gap:12px;margin-bottom:18px}.overview-card{padding:18px;border-radius:14px}.overview-card-head h2{font-size:16px}}

/* Fiches contacts accessibles depuis le tableau des prospects */
.contact-open{display:inline;padding:0;border:0;background:transparent;color:#20372a;font:inherit;font-size:12px;font-weight:800;text-align:left;cursor:pointer}
.contact-open:hover{text-decoration:underline;text-decoration-color:#7da487;text-underline-offset:3px}
.contact-open:focus-visible{outline:2px solid #7da487;outline-offset:3px;border-radius:3px}
.profile-content{padding:30px}
.profile-company{margin:4px 0 0;color:#7a8980;font-size:12px}
.profile-details{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:24px}
.profile-detail{min-width:0;padding:13px 14px;border:1px solid #e7eee7;background:#fafcfa;border-radius:10px}
.profile-detail span{display:block;margin-bottom:7px;font-size:10px;color:#7d8b81;font-weight:700;text-transform:uppercase;letter-spacing:.5px}
.profile-detail strong{display:block;overflow-wrap:anywhere;white-space:pre-wrap;font-size:12px;line-height:1.55;color:#26392e;font-weight:650}
.profile-detail:nth-child(7),.profile-detail:nth-child(8){grid-column:1/-1}
@media(max-width:520px){.profile-content{padding:20px}.profile-details{grid-template-columns:1fr}.profile-detail:nth-child(7),.profile-detail:nth-child(8){grid-column:auto}}


/* Fiche prospect — présentation premium et plus lisible */
.profile-dialog{
  width:min(760px,calc(100% - 28px));
  max-height:min(88vh,850px);
  overflow:auto;
  border:1px solid rgba(222,232,223,.9);
  border-radius:22px;
  background:#f7faf7;
  box-shadow:0 32px 110px rgba(9,35,22,.32);
}
.profile-content{padding:0}
.profile-dialog .dialog-head{
  position:relative;
  overflow:hidden;
  align-items:flex-start;
  margin:0;
  padding:30px 32px 29px;
  color:#fff;
  background:linear-gradient(125deg,#102f23 0%,#1a4a33 62%,#2b6340 100%);
}
.profile-dialog .dialog-head::after{
  content:"";
  position:absolute;
  width:230px;height:230px;
  right:-65px;top:-125px;
  border:1px solid rgba(217,243,106,.18);
  border-radius:50%;
  box-shadow:0 0 0 24px rgba(217,243,106,.035),0 0 0 52px rgba(217,243,106,.025);
  pointer-events:none;
}
.profile-dialog .dialog-head>div{position:relative;z-index:1;min-width:0}
.profile-dialog .eyebrow{color:#c4dda7;font-size:9px;letter-spacing:1.8px}
.profile-dialog .dialog-head h2{
  margin:11px 0 7px;
  color:#fff;
  font-size:clamp(23px,3vw,30px);
  line-height:1.15;
  letter-spacing:-.9px;
  overflow-wrap:anywhere;
}
.profile-dialog .profile-company{color:#d2e2d6;font-size:12px}
.profile-dialog #closeProfile{
  position:relative;z-index:2;
  display:grid;place-items:center;
  flex:0 0 36px;width:36px;height:36px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:11px;
  background:rgba(255,255,255,.09);
  color:white;
  transition:background .15s,transform .15s;
}
.profile-dialog #closeProfile:hover{background:rgba(255,255,255,.18);transform:rotate(4deg)}
.profile-dialog .profile-details{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin:0;
  padding:24px 28px 18px;
}
.profile-dialog .profile-detail{
  position:relative;
  min-height:78px;
  padding:15px 16px;
  border:1px solid #e4ebe4;
  border-radius:13px;
  background:#fff;
  box-shadow:0 3px 10px rgba(26,60,38,.025);
  transition:border-color .15s,transform .15s,box-shadow .15s;
}
.profile-dialog .profile-detail:hover{
  border-color:#cbdcc9;
  transform:translateY(-1px);
  box-shadow:0 7px 18px rgba(26,60,38,.055);
}
.profile-dialog .profile-detail span{
  display:flex;align-items:center;gap:7px;
  margin-bottom:9px;
  color:#7a8b7f;
  font-size:9px;
  letter-spacing:1px;
}
.profile-dialog .profile-detail strong{
  color:#21382a;
  font-size:12px;
  line-height:1.65;
  font-weight:650;
}
.profile-dialog .profile-detail:nth-child(7),
.profile-dialog .profile-detail:nth-child(8){grid-column:1/-1;min-height:70px}
.profile-dialog .dialog-actions{
  margin:0;
  padding:0 28px 25px;
}
.profile-dialog .dialog-actions .secondary-button{
  min-width:105px;
  border:1px solid #dce7dc;
  background:#fff;
}
.profile-dialog .dialog-actions .secondary-button:hover{background:#eef5ed}
@media(max-width:560px){
  .profile-dialog{border-radius:17px}
  .profile-dialog .dialog-head{padding:24px 21px 23px}
  .profile-dialog .profile-details{grid-template-columns:1fr;padding:17px 16px 15px;gap:9px}
  .profile-dialog .profile-detail{min-height:0;padding:13px 14px}
  .profile-dialog .profile-detail:nth-child(7),
  .profile-dialog .profile-detail:nth-child(8){grid-column:auto}
  .profile-dialog .dialog-actions{padding:0 16px 18px}
}


/* Tableau de bord enrichi : indicateurs supplémentaires et panneaux interactifs */
.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.stat-icon.red{background:#ffebe8;color:#b84b3e}
.stat-icon.teal{background:#e1f4ef;color:#247763}
#pipelineValue{font-size:clamp(22px,2vw,30px);letter-spacing:-.8px}
.overview-lead-open{padding:0;border:0;background:transparent;color:#26392e;font:inherit;font-size:11px;font-weight:750;text-align:left;cursor:pointer}
.overview-lead-open:hover{color:#286a43;text-decoration:underline;text-underline-offset:3px}
.pipeline-row{display:block;width:100%;border:0;border-radius:8px;padding:9px 7px;background:transparent;text-align:left;cursor:pointer;color:inherit;transition:background .15s}
.pipeline-row:hover,.pipeline-row:focus-visible{background:#f4f8f2;outline:none}
.pipeline-row-top{display:flex;justify-content:space-between;gap:12px;margin-bottom:8px;font-size:11px;color:#66766c}
.pipeline-track{display:block;width:100%;height:6px;border-radius:20px;background:#eef2ee;overflow:hidden}
.pipeline-track>span{display:block;height:100%;border-radius:20px;transition:width .25s}
#refreshDashboard:disabled{opacity:.65;cursor:wait}
@media(max-width:1050px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#pipelineValue{font-size:23px}.top-actions{display:flex;flex-direction:column;align-items:flex-end;gap:6px}.top-actions .primary-button,.top-actions .secondary-button{margin-top:0;font-size:10px;padding:9px 10px}}


/* Edition de la fiche prospect */
.profile-edit-form{padding:0 28px 24px}
.profile-edit-form[hidden]{display:none!important}
.profile-edit-form .form-grid{gap:0 14px}
.profile-edit-form .field label{margin-top:10px}
.profile-edit-form .field input,.profile-edit-form .field select,.profile-edit-form .field textarea{background:#fff}
.profile-view-actions{justify-content:space-between!important;align-items:center}
.profile-view-actions .primary-button{margin-right:auto}
@media(max-width:560px){.profile-edit-form{padding:0 16px 18px}.profile-view-actions{padding:0 16px 18px!important;flex-wrap:wrap}}


/* Historique des échanges dans la fiche prospect */
.profile-activity{padding:8px 28px 26px;border-top:1px solid #e5ece5;background:#f9fbf9}
.activity-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:21px 0 10px}
.activity-heading h3{font-size:17px;letter-spacing:-.4px;margin:7px 0 5px;color:#20372a}
.activity-heading p{margin:0;font-size:11px;line-height:1.55;color:#7a8980}
.activity-count{white-space:nowrap;padding:7px 10px;border:1px solid #e0e9df;border-radius:999px;background:#fff;color:#66776b;font-size:10px;font-weight:700}
.interaction-form{padding:14px 16px 15px;border:1px solid #e2eae1;border-radius:13px;background:#fff}
.interaction-form .field label{margin-top:5px}
.interaction-form .field textarea,.interaction-form .field input,.interaction-form .field select{background:#fcfdfc}
.interaction-form .dialog-actions{padding:0;margin-top:9px}
.interaction-form .primary-button{min-height:37px}
.interaction-timeline{display:flex;flex-direction:column;gap:10px;padding-top:14px}
.interaction-item{position:relative;padding:15px 16px 14px 19px;border:1px solid #e5ece5;border-radius:12px;background:#fff}
.interaction-item:before{content:"";position:absolute;left:0;top:14px;bottom:14px;width:3px;border-radius:0 4px 4px 0;background:#b9d96b}
.interaction-item-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.interaction-item-top strong{font-size:12px;color:#263d2d}
.interaction-item-top time{font-size:10px;color:#87938a;text-align:right}
.interaction-direction{display:inline-block;margin-top:6px;color:#698071;font-size:10px;font-weight:700}
.interaction-item p{margin:9px 0 0;color:#405448;font-size:12px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.interaction-outcome{margin-top:11px;padding:10px 12px;border-radius:8px;background:#f3f7ef;color:#3f5946;font-size:11px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.interaction-outcome span{display:block;margin-bottom:4px;color:#819080;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.7px}
@media(max-width:560px){
  .profile-activity{padding:6px 16px 18px}
  .activity-heading{padding-top:17px}
  .activity-heading h3{font-size:16px}
  .interaction-form{padding:12px}
  .interaction-item{padding:13px 12px 12px 16px}
  .interaction-item-top{flex-direction:column;gap:5px}
  .interaction-item-top time{text-align:left}
}


/* Action rapide de clôture d'une relance */
.followup-actions{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:7px;min-width:92px}
.followup-complete{border:1px solid #dce8d7;border-radius:7px;padding:5px 8px;background:#f4f8f1;color:#3f6843;font-size:10px;font-weight:750;white-space:nowrap;cursor:pointer;transition:background .15s,border-color .15s}
.followup-complete:hover{background:#e8f2df;border-color:#c7dcb8}
.followup-complete:disabled{opacity:.65;cursor:wait}
@media(max-width:560px){.followup-actions{min-width:78px}.followup-complete{font-size:9px;padding:5px 6px}}


/* Actions de la barre de recherche et export CSV */
.toolbar-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}
.toolbar-actions select{min-width:155px}
@media(max-width:700px){
  .toolbar-actions{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto}
  .toolbar-actions select{min-width:0}
}


/* Modules CRM : opportunités, campagnes et assistant commercial */
.module-card{margin-top:22px;scroll-margin-top:24px;overflow:hidden}
.module-total{display:inline-flex;align-items:center;border:1px solid #dfe9dc;background:#f5f9f2;color:#46694a;border-radius:20px;padding:7px 10px;font-size:10px;font-weight:750;white-space:nowrap}
.module-form{padding:0 24px 18px;border-bottom:1px solid #edf0ed}
.module-form .form-grid{gap:4px 16px}
.field-action{display:flex;align-items:end;gap:8px;flex-wrap:wrap}
.module-list{padding:0 24px 18px}
.module-row{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:16px 0;border-bottom:1px solid #edf0ed}
.module-row:last-child{border-bottom:0}
.module-row-main{display:flex;flex-direction:column;gap:5px;min-width:0}
.module-row-main>strong{font-size:13px;color:#26392e}
.module-row-main>span,.module-row-main>small,.module-row-side>small{font-size:11px;color:#7b897f;line-height:1.5}
.module-row-side{display:flex;flex-direction:column;align-items:flex-end;gap:7px;flex-shrink:0}
.module-row-side>strong{font-size:12px;color:#244a31}
.module-summary{font-size:12px;color:#66766a;background:#f7faf6;border-radius:8px;padding:12px;margin:14px 0 2px}
.module-summary strong{color:#244a31}
.small-button{font-size:10px!important;padding:7px 9px!important;white-space:nowrap}
.danger-button{border:1px solid #f0d8d4;background:#fff8f7;color:#a13c31;border-radius:8px;padding:9px 12px;font:inherit;font-size:11px;font-weight:700;cursor:pointer}
.danger-button:hover{background:#ffefed}
.module-subheading{padding:18px 24px 8px}
.module-subheading h3{font-size:13px;margin:0 0 5px}
.module-subheading p{font-size:11px;color:#7b897f;margin:0;line-height:1.5}
.ai-module-row{background:#fff}
.ai-content{white-space:pre-wrap;overflow-wrap:anywhere;background:#f8faf7;border:1px solid #edf0ed;border-radius:8px;padding:12px;margin:5px 0 2px;font-size:12px;line-height:1.65;color:#36493b}
.ai-status{align-self:flex-start;border-radius:20px;padding:5px 8px;background:#f4f2e8;color:#80651f;font-size:10px;font-weight:700}
.ai-status-approved{background:#e6f4e4;color:#367244}
.ai-status-rejected,.ai-status-failed,.ai-status-cancelled{background:#fff0ed;color:#a13c31}
.ai-status-sent{background:#e5efff;color:#346bb5}
@media(max-width:700px){
 .module-form{padding:0 16px 16px}
 .module-list{padding:0 16px 14px}
 .module-subheading{padding-left:16px;padding-right:16px}
 .module-row{gap:10px}
 .module-row-side{max-width:44%}
 .module-row-side .small-button{white-space:normal}
 .module-total{font-size:9px}
}


.module-inline-label{display:flex;flex-direction:column;gap:5px;align-items:flex-end;font-size:10px;color:#7b897f}
.module-status-select{max-width:175px;border:1px solid #dce4dd;border-radius:7px;background:#fff;color:#26392e;font:inherit;font-size:10px;padding:7px;cursor:pointer}
.module-status-select:focus{outline:2px solid #d5e8ca;outline-offset:1px}
@media(max-width:560px){.module-status-select{max-width:150px}}

/* Actions d’export des modules */
.module-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}
@media(max-width:620px){
  .module-head-actions{width:100%;justify-content:space-between}
  .module-card .section-head{align-items:flex-start;flex-wrap:wrap}
}
