/* Lucas GILL V0.87 — compact professional CRM & balanced personal dashboard.
   Design tokens shared between private CRM and public consultation: density and status hues.
   No fixed card heights on touch interfaces; every control remains keyboard-accessible. */
:root{
 --lg87-blue:#287cb3;--lg87-blue-soft:#e9f4fc;--lg87-ink:#173249;
 --lg87-line:#d5e4f0;--lg87-surface:#fff;--lg87-alt:#f5f9fd;
 --lg87-shadow:0 4px 17px rgba(22,53,88,.055)
}
html[data-theme="dark"]{
 --lg87-blue:#89d3ff;--lg87-blue-soft:#223f5a;--lg87-ink:#f4f9ff;
 --lg87-line:#476883;--lg87-surface:#132941;--lg87-alt:#1a3450;
 --lg87-shadow:0 9px 24px rgba(0,0,0,.16)
}
/* Dashboard: useful content appears earlier, without hiding any previous module. */
.portal-layout .welcome{padding-block:15px 9px;gap:9px}
.portal-layout .welcome h1{font-size:clamp(26px,2.35vw,34px);line-height:1.13;margin:3px 0}
.portal-layout .welcome .dash-intro{font-size:12px;line-height:1.45}
.portal-layout .hub-search-intro{padding:9px 12px;margin-block:5px}
.portal-layout .v74-search-trigger{min-height:39px;padding:7px 12px}
.portal-layout .v74-search-entry{margin:5px 0}
.portal-layout .hub-featured-drive{margin:9px 0 10px;padding:11px 13px}
.portal-layout .hub-overview-slim{border-left:3px solid #3a9ccd!important}
.portal-layout .v74-module-grid{gap:10px}
.portal-layout .v74-module-grid .hub-card-head{min-height:54px;padding:10px 12px}
.portal-layout .v74-module-grid .hub-card-body{padding:11px 12px 13px}
.portal-layout .hub-card-icon{border-radius:10px}
.portal-layout .hub-feature-route{padding:10px 12px}
.portal-layout .hub-pinned{padding:13px;margin-block:7px 10px}
.portal-layout .hub-catalog-tools{margin:21px 0 13px}
.portal-layout .services-title{margin-bottom:12px}
.portal-layout .dashboard-section{margin-bottom:22px}
.portal-layout .dashboard-section .sec-head{margin-bottom:9px}
.portal-layout .tile-grid{gap:8px}
.portal-layout .tile-entry,.portal-layout .tile-entry>.tile-main{min-height:109px}
.portal-layout .tile-entry>.tile-main{gap:9px;padding:12px}
.portal-layout .tile-entry .favorite-toggle{top:35px;right:7px}
.portal-layout .quick-link{border-radius:10px;border:1px solid var(--v74-line);box-shadow:var(--lg87-shadow)}
.portal-layout .quick-grid{gap:9px}
.portal-layout .recovery-highlight{padding:11px 13px;margin-bottom:17px}
.portal-layout .hub-news-entry{border-radius:9px}
.portal-layout .hub-news-entry:hover{background:var(--lg87-blue-soft)!important}
.portal-layout .v74-app-kpi:nth-child(4n+1){border-top:3px solid #408dc8}
.portal-layout .v74-app-kpi:nth-child(4n+2){border-top:3px solid #8b79d0}
.portal-layout .v74-app-kpi:nth-child(4n+3){border-top:3px solid #36a48b}
.portal-layout .v74-app-kpi:nth-child(4n){border-top:3px solid #d6a65c}
/* Dashboard category cues: chromatic but low-key. */
.portal-layout .dashboard-section:nth-child(4n+1) .sec-heading-icon{background:#e4f2ff;color:#287bb3}
.portal-layout .dashboard-section:nth-child(4n+2) .sec-heading-icon{background:#e9e8fa;color:#7664b9}
.portal-layout .dashboard-section:nth-child(4n+3) .sec-heading-icon{background:#e1f6ef;color:#27866a}
.portal-layout .dashboard-section:nth-child(4n) .sec-heading-icon{background:#fff1dc;color:#a76d27}
html[data-theme="dark"] .portal-layout .dashboard-section:nth-child(4n+1) .sec-heading-icon{background:#1c4360;color:#a5e0ff}
html[data-theme="dark"] .portal-layout .dashboard-section:nth-child(4n+2) .sec-heading-icon{background:#383159;color:#d3c5ff}
html[data-theme="dark"] .portal-layout .dashboard-section:nth-child(4n+3) .sec-heading-icon{background:#22473e;color:#aff1d5}
html[data-theme="dark"] .portal-layout .dashboard-section:nth-child(4n) .sec-heading-icon{background:#4a392b;color:#ffe1a6}
/* CRM layout matching the external consultation: dense rows, softer elevation, meaningful status highlights. */
.crm-main .crm-content{max-width:1640px;padding-top:13px}
.crm-main .crm-heading{margin-bottom:8px;align-items:center}
.crm-main .crm-heading h1{font-size:clamp(27px,2.5vw,35px);margin:1px 0 4px}
.crm-main .crm-heading p{font-size:12px}
.crm-main .crm-heading-actions{gap:6px}
.crm-main .crm-heading-actions .crm-btn{min-height:35px;padding:7px 10px}
.crm-main .crm-message{padding:6px 10px;margin:5px 0 8px;font-size:11px}
.crm-main .crm-stats{gap:7px;margin:7px 0 10px}
.crm-main .crm-stat{min-height:62px;padding:9px 11px;gap:4px;border-radius:10px;border-top:3px solid var(--lg87-blue);box-shadow:var(--lg87-shadow)}
.crm-main .crm-stat:nth-child(2){border-top-color:#8276ca}
.crm-main .crm-stat:nth-child(3){border-top-color:#289f84}
.crm-main .crm-stat:nth-child(4){border-top-color:#e0a259}
.crm-main .crm-stat:nth-child(5){border-top-color:#7ba4b8}
.crm-main .crm-stat:nth-child(6){border-top-color:#649bca}
.crm-main .crm-stat strong{font-size:21px}
.crm-main .crm-stat small{font-size:10px}
.crm-main .crm-toolbar{margin:6px 0 7px;gap:7px}
.crm-main .crm-toolbar-search{flex:2 1 255px;min-height:37px;height:37px}
.crm-main .crm-toolbar-select{flex:1 1 143px}
.crm-main .crm-toolbar-select select{height:37px;min-height:37px;font-size:11px}
.crm-main .crm-favorite-filter{min-height:37px;white-space:nowrap;background:var(--lg87-surface);color:var(--crm-text);border-color:var(--crm-border)}
.crm-main .crm-favorite-filter.is-active{background:#fff0cc;color:#83540e;border-color:#d7ad51}
html[data-theme="dark"] .crm-main .crm-favorite-filter.is-active{background:#43371b;color:#ffe3a0;border-color:#987b3c}
.crm-main .crm-tabs{margin:3px 0 7px;gap:2px}
.crm-main .crm-tab{min-height:35px;padding:7px 12px;font-size:11.5px}
.crm-main .crm-tab.active{color:var(--v74-strong);background:var(--lg87-blue-soft);border-bottom-color:var(--lg87-blue)}
.crm-main .crm-filter-count{font-size:10px}
.crm-main .crm-logo-help{margin:2px 0 8px;color:var(--crm-muted);font-size:10.5px;line-height:1.4}
.crm-main .crm-list-head{padding:5px 10px;font-size:9px;grid-template-columns:minmax(175px,1.8fr) minmax(220px,2fr) minmax(220px,1.3fr)}
.crm-main .crm-record{grid-template-columns:minmax(170px,1.8fr) minmax(205px,2fr) minmax(220px,1.3fr);min-height:44px;gap:9px;margin-bottom:3px;padding:5px 9px;border-radius:8px;box-shadow:none;transition:border-color .13s,background .13s}
.crm-main .crm-record:hover{border-color:#8eb4cf;background:var(--lg87-alt)}
.crm-main .crm-record.is-favorite{border-left:3px solid #d7a349}
.crm-main .crm-record-lead{gap:8px}
.crm-main .crm-avatar{width:30px;height:30px;flex:0 0 30px;border-radius:7px;font-size:13px;background:#f0f5fc;color:#285c88;overflow:hidden;position:relative;isolation:isolate}
.crm-main .crm-company-logo img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;padding:3px;background:#fff;opacity:0;transition:opacity .12s}
.crm-main .crm-company-logo.crm-has-logo img{opacity:1}
.crm-main .crm-company strong{font-size:11.7px;line-height:1.22}
.crm-main .crm-company small{font-size:10px;line-height:1.25}
.crm-main .crm-record-meta{gap:4px 7px;font-size:10px}
.crm-main .crm-record-date,.crm-main .crm-record-due,.crm-main .crm-record-contact{white-space:nowrap}
.crm-main .crm-record-actions{gap:4px;flex-wrap:nowrap;justify-content:flex-end}
.crm-main .crm-record-actions .crm-status-select{flex:0 1 135px;min-height:29px;height:29px;padding:4px 6px;font-size:10px}
.crm-main .crm-record-actions .crm-btn-small{min-height:29px;padding:5px 7px;font-size:10px}
.crm-main .crm-favorite{min-width:30px;width:30px;height:30px;padding:0;border:1px solid var(--crm-border);border-radius:7px;background:var(--lg87-alt);color:#7c8a9e;font-size:18px;line-height:1;cursor:pointer}
.crm-main .crm-favorite.is-active{color:#b57a18;background:#fff4d7;border-color:#e5c67e}
.crm-main .crm-favorite:hover{color:#aa740e;background:#fff1cd}
html[data-theme="dark"] .crm-main .crm-favorite{color:#bdd4e9;background:#1c3650}
html[data-theme="dark"] .crm-main .crm-favorite.is-active{color:#ffe59d;background:#44351d;border-color:#9c793b}
.crm-main .crm-status{padding:3px 6px;font-size:9.5px;font-weight:750}
.crm-main .crm-record[data-status="envoyee"]{border-left:3px solid #489bcc}
.crm-main .crm-record[data-status="preparation"]{border-left:3px solid #8e9eaf}
.crm-main .crm-record[data-status="relance"]{border-left:3px solid #d59d42}
.crm-main .crm-record[data-status="entretien"]{border-left:3px solid #9272cd}
.crm-main .crm-record[data-status="offre"]{border-left:3px solid #369c7c}
.crm-main .crm-record[data-status="refus"]{border-left:3px solid #ce6f7a}
.crm-main .crm-record[data-status="archivee"]{border-left:3px solid #7e93a8}
.crm-main .crm-record.is-favorite{box-shadow:inset 3px 0 0 #e7b44e}
.crm-main .crm-status-envoyee{background:#e8f4fd;color:#215d88;border-color:#c5deed}
.crm-main .crm-status-relance{background:#fff2db;color:#865413;border-color:#f1d5a0}
.crm-main .crm-status-entretien{background:#eee8fc;color:#6545a4;border-color:#dacaf7}
.crm-main .crm-status-offre{background:#e2f5eb;color:#12654e;border-color:#bde9d1}
.crm-main .crm-status-refus{background:#fff0f2;color:#a54056;border-color:#f1c7d1}
.crm-main .crm-board{grid-template-columns:repeat(7,minmax(180px,1fr));gap:8px}
.crm-main .crm-column{padding:6px;min-height:200px;border-radius:11px}
.crm-main .crm-column-head{padding:7px 6px 9px}
.crm-main .crm-column .crm-record{grid-template-columns:1fr;gap:6px;padding:8px}
.crm-main .crm-column .crm-record-actions{justify-content:flex-start;flex-wrap:wrap}
.crm-main .crm-column .crm-record-actions .crm-btn-small{flex:1 1 auto}
.crm-main .crm-more{display:block;margin:12px auto 0;min-height:39px;max-width:100%;text-align:center}
.crm-main .crm-analytics-card{border-top:3px solid var(--lg87-blue)}
.crm-main .crm-analytics-card:nth-child(3n+2){border-top-color:#8b7ac8}
.crm-main .crm-analytics-card:nth-child(3n){border-top-color:#40a085}
html[data-theme="dark"] .crm-main .crm-record[data-status] .crm-status{background:#263e56;color:#f1f8ff;border-color:#4c6a87}
html[data-theme="dark"] .crm-main .crm-company-logo{background:#213d57;color:#f5f9ff;border-color:#4a718d}
html[data-theme="dark"] .crm-main .crm-record:hover{background:#1b3450}
html[data-theme="dark"] .crm-main .crm-logo-help{color:#d1e1ee}
/* Alignment with read-only external CRM: same badge heights and chromatic statuses. */
.share-page .share-record{border-radius:8px;box-shadow:none}
.share-page .share-status{font-weight:750}
.share-page .share-offre{background:#e2f5eb;color:#12654e}
.share-page .share-entretien{background:#eee8fc;color:#6545a4}
.share-page .share-refus{background:#fff0f2;color:#a54056}
@media(max-width:1100px){
 .crm-main .crm-list-head{grid-template-columns:minmax(170px,1.35fr) minmax(175px,1.2fr) minmax(210px,1.25fr)}
 .crm-main .crm-record{grid-template-columns:minmax(165px,1.35fr) minmax(175px,1.2fr) minmax(210px,1.25fr)}
 .crm-main .crm-heading{align-items:flex-start}
 .crm-main .crm-record-actions{flex-wrap:wrap}
}
@media(max-width:860px){
 .portal-layout .tile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .portal-layout .tile-entry,.portal-layout .tile-entry>.tile-main{min-height:105px}
 .portal-layout .hub-card-head{min-height:55px;padding:11px 12px}
 .portal-layout .hub-cards-two{gap:10px}
 .crm-main .crm-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
 .crm-main .crm-heading-actions .crm-btn{flex:1 1 auto}
 .crm-main .crm-toolbar-search{flex-basis:100%}
 .crm-main .crm-record-full{grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;min-height:0;padding:8px 10px}
 .crm-main .crm-record-full .crm-record-lead{grid-column:1/-1}
 .crm-main .crm-record-full .crm-record-meta{grid-column:1/-1;padding-left:38px}
 .crm-main .crm-record-full .crm-record-actions{grid-column:1/-1;justify-content:flex-start;margin-left:38px}
 .crm-main .crm-record-full .crm-record-actions .crm-status-select{flex:1 1 110px;max-width:170px}
 .crm-main .crm-record-full .crm-record-actions .crm-btn-small{flex:0 1 auto}
 .crm-main .crm-record-full .crm-record-actions .crm-favorite{flex:0 0 30px}
}
@media(max-width:580px){
 .crm-main .crm-content{padding:12px 12px calc(90px + env(safe-area-inset-bottom))}
 .crm-main .crm-heading h1{font-size:29px}
 .crm-main .crm-stat{min-height:60px;padding:8px 9px}
 .crm-main .crm-stat strong{font-size:19px}
 .crm-main .crm-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
 .crm-main .crm-toolbar-search{grid-column:1/-1;min-width:0;min-height:40px}
 .crm-main .crm-toolbar-select{min-width:0;max-width:100%}
 .crm-main .crm-toolbar-select select{min-width:0;width:100%;font-size:11px}
 .crm-main .crm-favorite-filter{grid-column:1/-1;width:100%;min-height:38px}
 .crm-main .crm-record-meta{font-size:10px}
 .crm-main .crm-record-full .crm-record-actions{margin-left:0;justify-content:flex-start}
 .crm-main .crm-record-full .crm-record-meta{padding-left:38px}
 .crm-main .crm-record-full .crm-record-actions .crm-btn-small{flex:1 1 auto;white-space:normal}
 .crm-main .crm-record-full .crm-record-actions .crm-status-select{flex:1 1 115px;max-width:200px}
 .crm-main .crm-board{grid-template-columns:repeat(7,185px)}
 .crm-main .crm-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
 .portal-layout .welcome{padding-top:11px}
 .portal-layout .tile-grid{gap:7px}
 .portal-layout .tile-entry>.tile-main{padding:10px}
}
@media(max-width:365px){.crm-main .crm-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.crm-main .crm-toolbar{grid-template-columns:1fr}.crm-main .crm-toolbar-search,.crm-main .crm-favorite-filter{grid-column:1}.crm-main .crm-record-full .crm-record-actions{flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){.crm-main .crm-record,.crm-main .crm-company-logo img{transition:none}}

/* Information non essentielle, repliée par défaut pour afficher plus de lignes. */
.crm-main .crm-logo-disclosure{font:500 10px/1.4 system-ui;color:var(--crm-muted);margin:1px 0 7px}
.crm-main .crm-logo-disclosure>summary{cursor:pointer;display:inline-flex;align-items:center;gap:6px;color:var(--crm-muted);padding:3px 1px;min-height:24px}
.crm-main .crm-logo-disclosure p{margin:5px 0 8px;max-width:760px}
.crm-main .crm-logo-disclosure>summary:hover{color:var(--v74-strong)}
@media(max-width:580px){.crm-main .crm-favorite-filter{grid-column:auto;min-width:0;width:100%;font-size:11px}.crm-main .crm-logo-disclosure{margin-bottom:5px}}
