/* Shared appearance and generated status control spacing. */
:root{color-scheme:light;--surface:#fff;--raised:#eef4f5;--action:#087f86}
.header-tools{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:flex-end}.theme-toggle{padding:8px 12px;font-size:12px}
.form-grid>label:has(>select[name="status"]){display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-width:0;margin-bottom:22px}
.form-grid>label> .status-picker.badge{display:flex;min-height:42px;max-width:100%;margin:0}
.form-grid>label>select[name="status"]{margin:0}
html[data-theme="dark"]{color-scheme:dark;--nav:#0d2028;--ink:#e1edf0;--muted:#a9bdc5;--teal:#6bd7cb;--pale:#203e42;--border:#36515b;--bg:#101c23;--surface:#192b34;--raised:#243b45;--action:#176f72}
html[data-theme="dark"] :is(.card,.status-menu[popover],.call-history-popover,.call-media-dialog,.call-media-dialog>header){background:var(--surface);color:var(--ink);border-color:var(--border)}
html[data-theme="dark"] :is(input,select,textarea,.status-filter-toggle,.region-button,.microsoft){background:var(--bg);color:var(--ink);border-color:var(--border)}
html[data-theme="dark"] :is(label,.filter-label,.city-source summary){color:var(--muted)}
html[data-theme="dark"] :is(th,.cities th,.with-sidebar table.leads th,.pbx-calls th,.bulk-toolbar,.scroll-hint,.call-form){background:var(--raised);color:var(--ink);border-color:var(--border)}
html[data-theme="dark"] td{border-color:var(--border)}
html[data-theme="dark"] :is(tbody tr:hover,.cities tr:hover,.pbx-calls tbody tr:nth-child(even)){background:#20353e}
html[data-theme="dark"] :is(button,.button){background:var(--action);color:#fff}
html[data-theme="dark"] :is(button.secondary,.secondary,.variant-count,.private-label,.directory-count){background:var(--raised);color:var(--ink)}

html[data-theme="dark"] :is(.badge,.status-picker.badge,.status-choice.badge,.status-chip.badge){background:#31444f;color:#e1edf0}
html[data-theme="dark"] .badge[data-status="NOUVEAU"]{background:#163c55;color:#a5ddff}
html[data-theme="dark"] .badge[data-status="PAS DE RÉPONSE"]{background:#493d1b;color:#ffe29b}
html[data-theme="dark"] :is(.badge[data-status="À RAPPELER"],.badge[data-status="CLIENT VA RAPPELER PRN"]){background:#503321;color:#ffd2a5}
html[data-theme="dark"] .badge[data-status="RV CÉDULÉ"]{background:#3b2d59;color:#dfcbff}
html[data-theme="dark"] .badge[data-status="ENVOYÉ DEVIS - TEL"]{background:#17443f;color:#a6f2df}
html[data-theme="dark"] :is(.badge[data-status="VENDU"],.badge.sold,.city-region.north){background:#204733;color:#a7edc2}
html[data-theme="dark"] :is(.badge[data-status="NON"],.notice.error){background:#4b292d;color:#ffc2b7;border-color:#885052}
html[data-theme="dark"] :is(.notice,.notice.success){background:#203e42;color:#c5e9e2;border-color:#3b6663}
html[data-theme="dark"] :is(.city-prospect-link,.city-region.south){background:#263e54;color:#bddfff;border-color:#476682}
html[data-theme="dark"] :is(.badge.warning,.city-region.warning){background:#493d1b;color:#ffe29b}
html[data-theme="dark"] :is(.pbx-document-link,.call-media-tools a){color:#a6d7ff}
html[data-theme="dark"] .region-button.active{background:var(--action);color:#fff}
html[data-theme="dark"] .quiet{background:none;color:#bad8df}
html[data-theme="dark"] .danger{background:#95443c;color:#fff}
html[data-theme="dark"] .disabled{background:#31444f;color:#a9bdc5}
html[data-theme="dark"] tr.saved td{background:#204733}
html[data-theme="dark"] .link-danger{background:none;color:#ffb7a9}
@media(max-width:750px){header{flex-wrap:wrap}.header-tools{gap:8px}.private-label{white-space:nowrap}}

/* One vertical page scrollbar, not a nested prospect-list scroller. */
.with-sidebar .table-scroll:has(table.leads){max-height:none;overflow-y:hidden;scrollbar-gutter:auto}

.page-numbers{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:18px 20px;margin:0}.page-numbers .button{min-width:40px}.page-numbers .current-page{outline:2px solid var(--teal);outline-offset:2px}.page-numbers>span{color:var(--muted);font-size:12px}

/* Blue / cyan identity, with coordinated navy dark mode. */
:root{--nav:#102b52;--ink:#173252;--muted:#58708c;--teal:#066f9a;--pale:#e3f5fd;--border:#cbddeb;--bg:#f1f7fc;--surface:#fff;--raised:#e8f3fc;--action:#086b97}
html[data-theme="dark"]{--nav:#08172e;--ink:#e4f2ff;--muted:#a1b9d3;--teal:#5ddcff;--pale:#133b58;--border:#29496b;--bg:#0b1930;--surface:#10243e;--raised:#173351;--action:#086e9f}
body{background:var(--bg);color:var(--ink)}aside{background:linear-gradient(165deg,var(--nav),#071b38)}.brand span{color:#67ddf5}button,.button{background:var(--action)}a{color:var(--teal)}.card{border-color:var(--border);box-shadow:0 6px 24px #08254508}.region-button.active{background:var(--action);border-color:var(--action)}
.call-media-dialog{background:var(--surface);color:var(--ink);border-color:var(--border);box-shadow:0 28px 100px #020c2699;height:92dvh;max-height:92dvh}.call-media-dialog>header{background:linear-gradient(115deg,#102e61,#086b97)!important;color:#fff!important;border-color:#38bdf855;padding:16px 22px}.call-media-dialog>header button{background:#ffffff18;color:#fff;border:1px solid #ffffff55;min-height:42px}.call-media-dialog::backdrop{background:#03122bb8;backdrop-filter:blur(5px)}.call-media-tools{background:var(--raised)}.call-media-tools a{color:var(--teal)}
html[data-theme="dark"] :is(tbody tr:hover,.cities tr:hover,.pbx-calls tbody tr:nth-child(even)){background:#15314e}
@media(max-width:600px){.call-media-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0}.call-media-dialog>header{padding:12px 16px}.call-media-dialog h2{font-size:1rem}.call-media-tools{padding:10px 16px;gap:8px}.call-media-tools button{min-height:40px}.call-media-dialog iframe{min-height:0}}

/* Reference palette: identical status identity in both themes. */
html .badge[data-status=""],html[data-theme="dark"] .badge[data-status=""]{background:#67E8F9;color:#164E63;border-color:#67E8F9}
html .badge[data-status="NOUVEAU"],html[data-theme="dark"] .badge[data-status="NOUVEAU"]{background:#FED7AA;color:#7C2D12;border-color:#FED7AA}
html .badge[data-status="PAS DE RÉPONSE"],html[data-theme="dark"] .badge[data-status="PAS DE RÉPONSE"]{background:#FFEB9C;color:#594400;border-color:#FFEB9C}
html .badge[data-status="À RAPPELER"],html[data-theme="dark"] .badge[data-status="À RAPPELER"]{background:#60A5FA;color:#102B52;border-color:#2563EB}
html .badge[data-status="CLIENT VA RAPPELER PRN"],html[data-theme="dark"] .badge[data-status="CLIENT VA RAPPELER PRN"]{background:#D9C3E8;color:#47265E;border-color:#D9C3E8}
html .badge[data-status="ENVOYÉ DEVIS - TEL"],html[data-theme="dark"] .badge[data-status="ENVOYÉ DEVIS - TEL"]{background:#F8CBE0;color:#702044;border-color:#F8CBE0}
html .badge[data-status="RV CÉDULÉ"],html[data-theme="dark"] .badge[data-status="RV CÉDULÉ"]{background:#1F4E79;color:#FFFFFF;border-color:#1F4E79}
html .badge[data-status="VENDU"],html[data-theme="dark"] .badge[data-status="VENDU"]{background:#00B050;color:#002A13;border-color:#00B050}
html .badge[data-status="NON"],html[data-theme="dark"] .badge[data-status="NON"]{background:#C00000;color:#FFFFFF;border-color:#C00000}

/* Both themes intentionally use the exact approved reference fills. */

/* Shared button roles in both themes; semantic status badges stay untouched. */
:root{--btn-primary:#2563eb;--btn-text:#fff;--btn-secondary:#dbeafe;--btn-secondary-text:#1e40af;--btn-border:#93c5fd;--btn-disabled:#e2e8f0;--btn-disabled-text:#475569;--btn-danger:#b91c1c}
html[data-theme="dark"]{--btn-primary:#2563eb;--btn-secondary:#173351;--btn-secondary-text:#e4f2ff;--btn-border:#426a94;--btn-disabled:#25364b;--btn-disabled-text:#acbfd5;--btn-danger:#b91c1c}
html:root :is(button,.button):not(.badge){background:var(--btn-primary);color:var(--btn-text);border:1px solid var(--btn-primary)}
html:root :is(button,.button):not(.badge):is(.secondary,.step),html:root :is(.region-button,.open-link,.microsoft){background:var(--btn-secondary);color:var(--btn-secondary-text);border:1px solid var(--btn-border)}
html:root .region-button.active{background:var(--btn-primary);color:var(--btn-text);border-color:var(--btn-primary)}
html:root :is(button,.button):not(.badge).danger{background:var(--btn-danger);color:#fff;border-color:var(--btn-danger)}
html:root :is(button,.button):not(.badge):is(.quiet,.link-danger){background:transparent;color:var(--teal);border-color:transparent}
html:root aside button.quiet{color:#bde4ff}
html:root :is(.prospect-dialog-bar,.call-media-dialog>header) button:not(.badge){background:#ffffff18;color:#fff;border-color:#ffffff55}
html:root :is(button,.button):is(:disabled,.disabled,[aria-disabled="true"]){background:var(--btn-disabled);color:var(--btn-disabled-text);border-color:var(--border);cursor:not-allowed;filter:none;opacity:1}
html:root :is(button,.button,.region-button,.open-link):focus-visible{outline:3px solid var(--teal);outline-offset:3px}
.bulk-toolbar{background:var(--raised);color:var(--ink);align-items:flex-end;gap:14px}
.bulk-toolbar .bulk-select-page{align-self:center;white-space:normal}
.bulk-toolbar [data-selection-count]{align-self:center;color:var(--muted);font-size:12px}
.bulk-toolbar>label:has(select){display:flex;flex-direction:column;gap:6px;flex:1 1 210px;max-width:320px}
.bulk-toolbar select{margin:0;width:100%;min-width:0}
.bulk-toolbar [data-bulk-submit]{min-height:42px;white-space:normal}
.bulk-toolbar small{margin:0;color:var(--muted)}
@media(max-width:750px){.bulk-toolbar>label:has(select){max-width:none;flex-basis:100%}.bulk-toolbar [data-bulk-submit]{width:100%}}

/* Mobile workspace: scoped navigation, comfortable controls, contained data. */
@media(max-width:750px){
body{overflow-wrap:break-word}
body>aside{padding:14px 16px 10px}
body>aside .brand{font-size:19px;letter-spacing:.5px}
body>aside .brand small{font-size:8px;letter-spacing:1.5px}
body>aside>nav{margin:14px 0 0;padding:0 0 8px;gap:8px;overscroll-behavior-x:contain;scrollbar-width:thin}
body>aside>nav a{min-height:44px;display:flex;align-items:center;padding:10px 12px;border-radius:10px}
body>aside .aside-bottom{padding-top:8px;gap:6px 10px}
body>aside .aside-bottom button{min-height:44px;padding:10px}
main.with-sidebar,main.public{padding:16px 12px;min-width:0}
main>header{gap:10px;margin-bottom:20px;padding-bottom:12px}
.header-tools{gap:8px}.theme-toggle{min-height:44px}
main>header .eyebrow{letter-spacing:1px}.private-label{font-size:10px}
h1{font-size:26px;line-height:1.2}.heading{gap:14px}
.heading p{font-size:12px;line-height:1.6}
.prospect-actions{display:grid;grid-template-columns:1fr;width:100%;gap:8px}
.prospect-actions .button{width:100%;min-height:46px;white-space:normal}
.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.stats .card{padding:12px;margin:0}.stats strong{font-size:27px}.stats small{line-height:1.45}
.notice{padding:12px 14px;font-size:12px;margin:16px 0}
.card{min-width:0;padding:16px}.table-card{padding:0}
nav.region-buttons{display:flex;flex-wrap:wrap;overflow:visible;margin:0;padding:14px 12px 0;gap:8px}
.region-button{flex:1 1 auto;min-height:44px;padding:10px 14px;text-align:center;white-space:normal}
.region-buttons .remember{flex-basis:100%;margin:0;font-size:11px}
.table-card .filters{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:16px 12px}
.filters label,.filters .search,.filters .status-filter{min-width:0;width:100%}
.status-filter-toggle{width:100%;max-width:none;min-height:46px}
input:not([type=checkbox]):not([type=hidden]),select,textarea{font-size:16px;min-height:44px}
.filters>button,.filters>.reset{min-height:44px;width:100%;text-align:center}
.table-summary{padding:14px 12px;gap:6px}.table-summary span{font-size:11px}
.bulk-toolbar{padding:14px 12px;gap:12px}.bulk-toolbar .bulk-select-page{min-height:44px}
.bulk-toolbar input[type=checkbox],input[name=lead_id]{width:22px;height:22px;flex-shrink:0}
.bulk-toolbar>label:has(select){flex-basis:100%;max-width:none}.bulk-toolbar [data-bulk-submit]{min-height:46px}
.bulk-toolbar small{font-size:12px;line-height:1.6}
.table-scroll{max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
table.leads{min-width:1100px}table.leads td,table.leads th{padding:12px}
table.leads .lead-name{display:inline-block;min-width:125px;font-size:14px}
table.leads .status-picker.badge{min-height:44px}
:is(.open-link,button.step,.call-actions button){display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
nav.page-numbers{display:flex;flex-wrap:wrap;overflow:visible;margin:0;padding:16px 12px;gap:8px;justify-content:flex-start}
.page-numbers .button{min-width:44px;min-height:44px;padding:11px}.page-numbers>span:last-child{flex-basis:100%;padding-top:4px}
.detail-layout{grid-template-columns:minmax(0,1fr);gap:12px}.form-grid{grid-template-columns:minmax(0,1fr)}
.login-layout{padding:8px 0;gap:18px}.welcome h1{font-size:32px}.welcome p{font-size:15px}.login-card{padding:20px}
.toast{bottom:calc(12px + env(safe-area-inset-bottom));overflow-wrap:anywhere}
footer{line-height:1.6;padding-bottom:env(safe-area-inset-bottom)}
}

/* Mobile essentials: discoverable menu and concise prospect cards. */
.mobile-menu-toggle,.mobile-list-hint{display:none}
@media(max-width:750px){
body>aside{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
body>aside .brand{min-width:0}.mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px}
body>aside>nav,body>aside .aside-bottom{display:none}
body>aside[data-menu-open]>nav{display:grid;grid-column:1/-1;overflow:visible;margin:8px 0 0;gap:6px;padding:0}
body>aside[data-menu-open] .aside-bottom{display:flex;grid-column:1/-1;border-top:1px solid #426a94;padding-top:10px}
body>aside>nav a{white-space:normal;width:100%;min-height:46px}
main.with-sidebar>header .eyebrow,main.with-sidebar>header .private-label,.heading>div>p,.heading>div>.eyebrow{display:none}
main.with-sidebar>header{justify-content:flex-end;margin-bottom:10px;padding-bottom:8px}
.heading{margin-bottom:14px}.stats small,.stats .card:nth-child(n+3),.prospect-actions a[href="/import"]{display:none}
.table-card>.bulk-toolbar{display:none}
.desktop-list-hint{display:none}.mobile-list-hint{display:inline}
.with-sidebar .table-scroll:has(table.leads){overflow:visible}
table.leads{display:block;min-width:0;width:100%;border-collapse:separate}
table.leads thead{display:none}table.leads tbody{display:grid;gap:10px;padding:12px}
table.leads tbody tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:14px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
table.leads tbody td{display:none;border:0;padding:0;min-width:0}
table.leads td.mobile-name,table.leads td.mobile-city{display:block;grid-column:1/-1}
table.leads td.mobile-status,table.leads td.mobile-open{display:flex;align-items:center}
table.leads td.mobile-name .lead-name{min-width:0;font-size:16px;overflow-wrap:anywhere}
table.leads .prospect-company{display:none}table.leads .mobile-city{font-size:12px;color:var(--muted)}table.leads .mobile-city .region{display:inline;margin-left:8px}
table.leads .mobile-status .badge{max-width:100%;white-space:normal;min-height:44px;display:inline-flex;align-items:center}
table.leads .mobile-open{justify-content:flex-end}.mobile-open .open-link{border-radius:8px}
table.leads td.empty{display:block;grid-column:1/-1;padding:20px}
}

/* Mobile reception date and authorized contact number. */
.mobile-field-label{display:none}
@media(max-width:750px){
table.leads td.mobile-date,table.leads td.mobile-phone{display:flex;grid-column:1/-1;align-items:baseline;gap:8px;flex-wrap:wrap;white-space:normal;font-size:13px}
table.leads .mobile-field-label{display:inline;color:var(--muted);font-size:12px;min-width:70px}
table.leads .mobile-phone .contact-email{display:none}
}

/* All authorized table fields, stacked inside each mobile card. */
@media(max-width:750px){
table.leads tbody tr{grid-template-columns:minmax(0,1fr);gap:14px}
table.leads tbody td[data-mobile-label]{display:block;grid-column:1/-1;white-space:normal;overflow-wrap:anywhere}
table.leads td[data-mobile-label]::before{content:attr(data-mobile-label);display:block;color:var(--muted);font-size:12px;font-weight:600;margin-bottom:5px}
table.leads .mobile-field-label{display:none}
table.leads .prospect-company,table.leads .mobile-phone .contact-email{display:block;overflow-wrap:anywhere}
table.leads .mobile-city .region{display:block;margin-left:0}
table.leads td.mobile-open{grid-column:1/-1;justify-content:flex-start}
table.leads td input,table.leads td select{max-width:100%;min-width:0;box-sizing:border-box}
table.leads .last-call-control,table.leads .call-actions{flex-wrap:wrap;max-width:100%}
}

.section-help{margin:12px 0 18px;padding:12px 14px;border:1px solid var(--border);border-radius:10px;background:var(--surface);font-size:14px;line-height:1.5;max-width:75ch}.section-help summary{cursor:pointer;font-weight:700;color:var(--text)}.section-help p{margin:8px 0 0}.section-help summary:focus-visible{outline:2px solid #1685c0;outline-offset:4px}

/* French contextual screenshot help */
.section-help{max-width:100%;min-width:0}.help-screenshot{margin:1rem 0 0;max-width:760px}.help-screenshot a{display:block}.help-screenshot img{display:block;width:100%;max-width:100%;height:auto;border:1px solid var(--border,#61768b);border-radius:10px}.help-screenshot figcaption{margin-top:.6rem;font-size:.875rem;line-height:1.5}.help-screenshot a:focus-visible{outline:3px solid #1689d6;outline-offset:4px}
