
:root{--bg:#f4f6f8;--panel:#fff;--text:#111827;--muted:#667085;--line:#e4e7ec;--brand:#2563eb;--nav:#101828}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}.top{height:70px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 22px;position:sticky;top:0;z-index:20}.brand,.top-actions{display:flex;align-items:center;gap:12px}.brand img{height:38px;max-width:180px;object-fit:contain}.top select{padding:9px;border:1px solid var(--line);border-radius:10px;background:white}.role{padding:8px 10px;background:#eef2ff;border-radius:99px;font-size:12px;font-weight:800}
.shell{display:grid;grid-template-columns:240px 1fr;min-height:calc(100vh - 70px)}aside{background:var(--nav);padding:18px 12px}nav{display:grid;gap:6px}nav a{color:#d0d5dd;padding:12px;border-radius:11px}nav a:hover{background:rgba(255,255,255,.1);color:#fff}
main{padding:26px;min-width:0}.page-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:18px}.page-head h1{margin:3px 0 0}.page-head small,.muted{color:var(--muted)}
.grid{display:grid;gap:16px}.g4{grid-template-columns:repeat(4,1fr)}.g3{grid-template-columns:repeat(3,1fr)}.g2{grid-template-columns:repeat(2,1fr)}
.card{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:0 8px 30px rgba(16,24,40,.04)}.kpi b{font-size:28px;display:block;margin-top:7px}
.btn{display:inline-flex;justify-content:center;align-items:center;border:0;border-radius:11px;padding:10px 14px;font-weight:800;cursor:pointer;background:var(--brand);color:white}.btn.ghost{background:white;color:var(--text);border:1px solid var(--line)}.btn.danger{background:#d92d20}
input,select,textarea{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--text)}label{font-size:13px;font-weight:750;display:block;margin-bottom:5px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.actions{display:flex;gap:9px;flex-wrap:wrap;margin:16px 0}
.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;min-width:760px}.table th,.table td{padding:12px;border-bottom:1px solid var(--line);text-align:left;font-size:14px}.table th{color:var(--muted)}
.products{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.product{background:white;border:1px solid var(--line);border-radius:18px;overflow:hidden}.photo{height:210px;background:#eef2f7;display:grid;place-items:center}.photo img{width:100%;height:100%;object-fit:cover}.photo span{font-size:72px}.product-body{padding:15px}.sizes{display:flex;flex-wrap:wrap;gap:7px}.size{border:1px solid var(--line);border-radius:9px;padding:7px 9px;background:white}.size.zero{opacity:.4}.badge{display:inline-flex;padding:6px 8px;border-radius:99px;font-size:11px;font-weight:800;background:#eef2ff}.ok{background:#dcfae6;color:#067647}.warn{background:#fef0c7;color:#b54708}
.login{min-height:100vh;background:#07101e;display:grid;place-items:center;padding:18px}.login-card{width:min(430px,100%);background:#fff;border-radius:24px;padding:28px}.login-card img{height:62px;max-width:230px;object-fit:contain}.login-card h1{margin:18px 0 8px}.error{background:#fee4e2;color:#b42318;padding:10px;border-radius:10px;margin:10px 0}.success{background:#dcfae6;color:#067647;padding:10px;border-radius:10px;margin:10px 0}
@media(max-width:1050px){.products{grid-template-columns:repeat(2,1fr)}.g4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:780px){.shell{grid-template-columns:1fr}aside{position:static}nav{grid-template-columns:repeat(2,1fr)}main{padding:16px}.top{padding:0 12px}.brand b{display:none}.role{display:none}.g4,.g3,.g2,.form-grid,.products{grid-template-columns:1fr}.photo{height:250px}}

/* V3 */
.login-logo-wrap{min-height:68px;display:flex;align-items:center}.fallback-logo{font-size:20px;font-weight:900}
.brand img{height:42px;width:auto;max-width:210px;object-fit:contain;object-position:left center}
.catalog-toolbar{margin-bottom:16px}.catalog-toolbar input{max-width:430px}
.photo{aspect-ratio:1/1;height:auto;overflow:hidden;background:#fff}.photo img{width:100%;height:100%;object-fit:contain;background:#fff}
.product{min-width:0}.product-body h3{min-height:44px}
@media(max-width:900px){.shell{grid-template-columns:1fr}aside{padding:10px;overflow-x:auto}nav{display:flex;gap:7px;min-width:max-content}nav a{white-space:nowrap}.top{height:auto;min-height:66px;gap:10px;flex-wrap:wrap;padding:10px 12px}.top-actions{flex-wrap:wrap;justify-content:flex-end}main{padding:14px}.products{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.products{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.top-actions select{max-width:150px}.brand img{max-width:140px;height:34px}.page-head h1{font-size:25px}.table{min-width:680px}}

/* V4 SOCIETES & EMAILS */
.company-admin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.company-admin-card{transition:.18s ease}.company-admin-card.company-disabled{opacity:.62;background:#f9fafb}
.company-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.company-card-head h3{margin:8px 0 4px}
.company-color{width:36px;height:36px;border-radius:50%;border:4px solid #fff;box-shadow:0 0 0 1px var(--line)}
.status-pill{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:900}.status-pill.active{background:#dcfae6;color:#067647}.status-pill.inactive{background:#fee4e2;color:#b42318}
.company-stats{display:flex;gap:18px;padding:14px 0}.company-stats span{font-size:12px;color:var(--muted)}.company-stats b{font-size:18px;color:var(--text)}
.test-mail-form{display:flex;gap:8px}.test-mail-form input{max-width:420px}
@media(max-width:1050px){.company-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.company-admin-grid{grid-template-columns:1fr}.test-mail-form{display:grid}.test-mail-form input{max-width:none}}

/* V5 */
.lang-form{display:flex;align-items:center}.lang-select{min-width:135px;width:auto;padding-right:32px;background-color:#fff;color:#111827}
.company-switch{min-width:190px;width:auto}
.product-photo-preview-wrap{margin-top:12px;display:grid;gap:10px;max-width:320px}
.product-photo-preview-wrap.hidden{display:none}
.product-photo-preview{width:100%;aspect-ratio:1/1;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:14px}
@media(max-width:620px){
 .lang-select{min-width:120px}
 .company-switch{min-width:150px;max-width:190px}
 .top-actions{width:100%;justify-content:flex-start}
}

/* V6 */
.lang-select{min-width:72px!important;width:72px!important;max-width:72px!important;padding:8px 26px 8px 10px!important}
.company-switch{min-width:210px!important;width:auto!important}
.product-photo-preview-wrap{max-width:220px!important}
.product-photo-preview{width:220px!important;height:220px!important;aspect-ratio:1/1;object-fit:contain}
.locked-company{padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:#f2f4f7;font-weight:800}
.stock-filters{display:flex;gap:10px;margin-bottom:16px}.stock-filters input{flex:1}.stock-filters select{max-width:220px}
@media(max-width:620px){
 .lang-select{min-width:68px!important;width:68px!important;max-width:68px!important}
 .company-switch{min-width:160px!important;max-width:210px!important}
 .product-photo-preview{width:160px!important;height:160px!important}
 .product-photo-preview-wrap{max-width:160px!important}
 .stock-filters{display:grid}.stock-filters select{max-width:none}
}

/* V7 */
.company-hero{display:flex;align-items:center;gap:24px;margin-bottom:16px;min-height:150px}
.company-hero-logo{width:260px;height:90px;display:flex;align-items:center}.company-hero-logo img{max-width:100%;max-height:90px;object-fit:contain}
.company-home-kpis{margin-bottom:16px}.company-home-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.home-action{display:grid;gap:6px}.home-action span{color:var(--muted);font-size:13px}
.variant-entry{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:10px;margin-bottom:10px}
.product-photo-preview-wrap{max-width:180px!important}.product-photo-preview{width:180px!important;height:180px!important}
.current-product-photo{width:230px;height:230px;border:1px solid var(--line);border-radius:15px;background:#fff;display:grid;place-items:center;overflow:hidden;margin-bottom:10px}.current-product-photo img{width:100%;height:100%;object-fit:contain}
.edit-product-layout{display:grid;grid-template-columns:260px 1fr;gap:18px}.admin-product-thumb{width:64px;height:64px;background:#fff;border:1px solid var(--line);border-radius:9px}.admin-product-thumb img{width:100%;height:100%;object-fit:contain}
.catalog-headbar{display:flex;gap:12px;justify-content:space-between;align-items:center;margin-bottom:16px}.catalog-headbar input{max-width:430px}.credit-chip{background:#eef2ff;padding:10px 13px;border-radius:99px}
.product .photo{background:#fff!important}.product .photo img{object-fit:contain!important;display:block}.image-fallback{width:100%;height:100%;place-items:center;color:var(--muted);background:#f2f4f7}
.catalog-meta{display:flex;justify-content:space-between;gap:8px;margin:8px 0}.ordered-note{font-size:12px;background:#f2f4f7;padding:7px 9px;border-radius:8px;margin:8px 0}.size-guide{margin:10px 0;font-size:13px}.size-guide summary{cursor:pointer;font-weight:800}.variant-order{display:flex;gap:5px;align-items:center}.qty-mini{width:55px!important;padding:7px!important}
@media(max-width:800px){.company-home-actions{grid-template-columns:1fr}.company-hero{display:grid}.company-hero-logo{width:190px;height:70px}.edit-product-layout{grid-template-columns:1fr}.variant-entry{grid-template-columns:1fr 1fr}.catalog-headbar{align-items:stretch;flex-direction:column}.catalog-headbar input{max-width:none}}
@media(max-width:520px){.variant-entry{grid-template-columns:1fr}.product-photo-preview{width:150px!important;height:150px!important}.current-product-photo{width:180px;height:180px}}
\n/* V7.2 */\n.forgot-link{display:block;text-align:center;margin-top:16px;color:var(--brand);font-weight:700}.role-checks{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px;border:1px solid var(--line);border-radius:10px}.role-checks label{display:flex;align-items:center;gap:7px;margin:0}.role-checks input{width:auto}.membership-card{border-left:5px solid var(--brand)}.allowance-admin-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.allowance-admin{border:1px solid var(--line);border-radius:12px;padding:10px;display:grid;gap:7px}.allowance-admin span{font-weight:800}.allowance-admin small{color:var(--muted)}.allowance-strip{display:flex;gap:8px;overflow-x:auto;margin-bottom:14px;padding-bottom:4px}.allowance-chip{min-width:130px;background:#fff;border:1px solid var(--line);border-radius:12px;padding:9px 11px;display:grid;gap:4px}.allowance-chip span{font-size:12px;color:var(--muted)}.allowance-chip b{font-size:15px}select[multiple]{min-height:130px}@media(max-width:760px){.allowance-admin-grid{grid-template-columns:1fr}.role-checks{grid-template-columns:1fr}}\n\n/* V7.3 */\n.compact-nav{display:grid;gap:7px}.nav-main{font-weight:900!important;background:rgba(255,255,255,.08)}.nav-group{border-radius:10px;overflow:hidden}.nav-group summary{cursor:pointer;padding:10px 12px;color:#fff;font-weight:800;list-style:none}.nav-group summary::-webkit-details-marker{display:none}.nav-group summary:after{content:"▾";float:right;opacity:.75}.nav-group[open] summary:after{content:"▴"}.nav-group>div{display:grid;padding:0 5px 7px}.nav-group>div a{padding:8px 10px!important;font-size:14px!important}.replace-photo-preview{margin-top:10px;width:180px;height:180px;border:1px solid var(--line);border-radius:14px;background:#fff;overflow:hidden}.replace-photo-preview.hidden{display:none}.replace-photo-preview img{width:100%;height:100%;object-fit:contain}.email-tabs{display:grid;grid-template-columns:auto auto 1fr;gap:0 8px}.email-tabs>input{display:none}.email-tabs>label{padding:10px 15px;border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;background:#eef2f6;cursor:pointer;font-weight:800}.email-tab-content{grid-column:1/-1;display:none}.email-tabs #emailConfigTab:checked~.email-config-content{display:block}.email-tabs #emailHistoryTab:checked~.email-history-content{display:block}.email-tabs #emailConfigTab:checked+label,.email-tabs #emailHistoryTab:checked+label{background:#fff}.soft-line{border:0;border-top:1px solid var(--line);margin:22px 0}@media(max-width:900px){aside{overflow:visible}.compact-nav{display:grid;min-width:0}.nav-group>div{display:grid}.nav-main{white-space:normal!important}}@media(max-width:560px){.email-tabs{grid-template-columns:1fr 1fr}.replace-photo-preview{width:150px;height:150px}}\n
/* V7.4 branding + footer */
body.brand-chauffage-assistance{--brand:#EE2D34;--brand-dark:#111111}
body.brand-flowair{--brand:#00A59B;--brand-dark:#54585A}
body.brand-piazzolla{--brand:#F16B2E;--brand-dark:#00355F}
body.brand-chauffage-assistance .page-head h1,
body.brand-chauffage-assistance .nav-main{font-family:Arial,Helvetica,sans-serif;font-weight:900}
body.brand-flowair .page-head h1,
body.brand-flowair .nav-main{font-family:Arial,Helvetica,sans-serif;font-weight:800}
body.brand-piazzolla .page-head h1,
body.brand-piazzolla .nav-main{font-family:Arial,Helvetica,sans-serif;font-weight:900}
body.brand-chauffage-assistance .top{border-bottom:3px solid #EE2D34}
body.brand-flowair .top{border-bottom:3px solid #00A59B}
body.brand-piazzolla .top{border-bottom:3px solid #00355F}
body.brand-piazzolla .btn:not(.ghost):not(.danger){background:#00355F}
body.brand-piazzolla .nav-main{border-left:4px solid #F16B2E}
.brand img{max-width:230px;max-height:46px;object-fit:contain;object-position:left center}
.site-footer{margin-left:240px;border-top:1px solid var(--line);background:#fff;padding:18px 28px;display:flex;justify-content:space-between;gap:18px;align-items:center;color:var(--muted);font-size:12px}
.footer-company{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.footer-company b{color:var(--text)}.footer-company a{color:inherit;text-decoration:none}.footer-version{white-space:nowrap;font-weight:700}
.login-site-footer{max-width:760px;margin:18px auto 0;padding:10px 16px;text-align:center;font-size:12px;color:#98a2b3}
@media(max-width:900px){.site-footer{margin-left:0;padding:15px 14px}}
@media(max-width:620px){.site-footer{display:grid;gap:8px}.footer-company{display:grid;gap:4px}.footer-version{white-space:normal}}

/* V7.5 */
.company-themed .top{border-bottom:4px solid var(--brand)!important}
.lang-form{display:flex;align-items:center;min-width:130px}
.lang-select{
 min-width:130px!important;
 width:130px!important;
 max-width:130px!important;
 height:40px!important;
 padding:8px 34px 8px 12px!important;
 border:1px solid #d0d5dd!important;
 border-radius:10px!important;
 background:#fff!important;
 color:#101828!important;
 font-weight:700!important;
 line-height:1.2!important;
}
.top-actions{align-items:center}
@media(max-width:650px){
 .lang-form{min-width:105px}
 .lang-select{min-width:105px!important;width:105px!important;max-width:105px!important;font-size:13px!important}
}

.global-footer{margin-top:32px;padding:18px 4px 6px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:20px;color:var(--muted);font-size:12px}.global-footer>div:first-child{display:flex;gap:12px;flex-wrap:wrap}.footer-version{white-space:nowrap}
@media(max-width:620px){.global-footer{display:grid}.footer-version{white-space:normal}}

/* V7.6 */
.theme-form{display:flex;align-items:center}.theme-select{min-width:105px;width:105px;height:40px;padding:8px 30px 8px 10px;border:1px solid #d0d5dd;border-radius:10px;background:#fff;color:#101828;font-weight:700}
.theme-dark{--bg:#0b1220;--surface:#111827;--surface2:#182230;--text:#f8fafc;--muted:#a7b0bf;--line:#344054;background:#0b1220;color:#f8fafc}
.theme-dark main{background:#0f1724!important}.theme-dark .card,.theme-dark .product,.theme-dark .login-card{background:#111827!important;color:#f8fafc!important;border-color:#344054!important}.theme-dark input,.theme-dark select,.theme-dark textarea{background:#182230!important;color:#f8fafc!important;border-color:#475467!important}.theme-dark .photo,.theme-dark .current-product-photo,.theme-dark .admin-product-thumb{background:#fff!important}.theme-dark .muted,.theme-dark small{color:#a7b0bf!important}.theme-dark .top{background:#101828!important}.theme-dark .top .brand b{color:#f8fafc!important}
.theme-dark .lang-select,.theme-dark .theme-select,.theme-dark .company-switch{background:#182230!important;color:#f8fafc!important;border-color:#475467!important}
.theme-dark .global-footer{background:#0b1220;color:#cbd5e1;border-color:#344054}
.nav-group[open] summary{background:rgba(255,255,255,.06)}.nav-group>div{padding-top:4px}
.global-footer{margin:32px -24px -24px;padding:18px 24px;background:#fff;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:72px}.footer-main{display:flex;align-items:center;gap:14px;min-width:0}.footer-logo{width:auto;height:34px;max-width:150px;object-fit:contain}.footer-company{display:grid;gap:3px;min-width:0}.footer-company b{color:var(--text)}.footer-company span{color:var(--muted);font-size:12px;white-space:normal}.footer-version{font-size:12px;color:var(--muted);white-space:nowrap}
.company-logo-preview{display:block;max-width:180px;max-height:70px;object-fit:contain;margin-top:8px;padding:6px;background:#fff;border:1px solid var(--line);border-radius:8px}.dark-preview{background:#111827}
@media(max-width:700px){.global-footer{margin:24px -14px -14px;padding:16px 14px;display:grid}.footer-main{align-items:flex-start}.footer-version{white-space:normal}.theme-select{min-width:92px;width:92px}.company-logo-preview{max-width:140px}}

/* V7.7 */
html,body{min-height:100%}
body{padding-bottom:88px}
.app-footer{position:fixed;left:0;right:0;bottom:0;z-index:80;background:#fff;border-top:1px solid var(--line);box-shadow:0 -4px 18px rgba(16,24,40,.05)}
.app-footer-inner{min-height:72px;padding:12px 22px 12px 260px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.footer-company-block{display:flex;align-items:center;gap:12px;min-width:0}.footer-company-block>div{display:grid;gap:3px}.footer-company-block span{font-size:12px;color:var(--muted);white-space:normal}.footer-logo{height:34px;max-width:140px;object-fit:contain}.footer-version{font-size:12px;color:var(--muted);white-space:nowrap}
.people-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.row-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.row-actions form{display:inline-flex}
.theme-dark{--bg:#0b1220!important;--surface:#111827!important;--surface2:#182230!important;--text:#f8fafc!important;--muted:#a7b0bf!important;--line:#344054!important;background:#0b1220!important;color:#f8fafc!important}
.theme-dark main{background:#0f1724!important}.theme-dark .card,.theme-dark .product,.theme-dark .email-tab-content .card{background:#111827!important;color:#f8fafc!important;border-color:#344054!important}.theme-dark .top{background:#101828!important}.theme-dark aside{background:#0b1220!important}.theme-dark input,.theme-dark select,.theme-dark textarea{background:#182230!important;color:#f8fafc!important;border-color:#475467!important}.theme-dark .lang-select,.theme-dark .theme-select,.theme-dark .company-switch{background:#182230!important;color:#f8fafc!important;border-color:#475467!important}.theme-dark .app-footer{background:#101828!important;border-color:#344054!important}.theme-dark .footer-company-block b,.theme-dark .footer-version{color:#f8fafc!important}.theme-dark .footer-company-block span{color:#a7b0bf!important}.theme-dark .photo,.theme-dark .current-product-photo,.theme-dark .admin-product-thumb,.theme-dark .product-photo-preview{background:#fff!important}
.nav-group[open] summary{background:rgba(255,255,255,.08)}
@media(max-width:900px){body{padding-bottom:104px}.app-footer-inner{padding-left:16px;padding-right:16px}.footer-company-block{align-items:flex-start}.footer-version{white-space:normal}}
@media(max-width:620px){body{padding-bottom:125px}.app-footer-inner{display:grid;min-height:105px}.footer-logo{height:28px}.row-actions{align-items:stretch}.row-actions .btn{width:100%}}

/* BETA 1.0 theme engine */
html[data-theme="dark"],body.theme-dark{color-scheme:dark}
body.theme-dark,body.theme-dark .page,body.theme-dark main{background:#0b1220!important;color:#f8fafc!important}
body.theme-dark .top,body.theme-dark .card,body.theme-dark .product,body.theme-dark .panel,body.theme-dark table,body.theme-dark .app-footer{background:#111827!important;color:#f8fafc!important;border-color:#344054!important}
body.theme-dark th,body.theme-dark td,body.theme-dark label,body.theme-dark h1,body.theme-dark h2,body.theme-dark h3,body.theme-dark p{color:#f8fafc!important}
body.theme-dark input,body.theme-dark select,body.theme-dark textarea{background:#182230!important;color:#fff!important;border-color:#475467!important}
body.theme-dark a{color:inherit}
.cart-fab{position:fixed;right:20px;bottom:105px;z-index:90;border:0;border-radius:999px;padding:13px 18px;background:var(--brand,#111827);color:#fff;font-weight:800;box-shadow:0 8px 28px #0003}
.global-search{max-width:680px;width:100%}.low-stock{border-left:4px solid #d92d20!important}
.equipment-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.metric{padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
@media(max-width:700px){.cart-fab{right:12px;bottom:130px}.global-search{max-width:none}}


/* BETA 1.2 - product media adapts to theme while preserving transparent PNGs */
body.theme-dark .product .photo, body.theme-dark .current-product-photo, body.theme-dark .admin-product-thumb, body.theme-dark .product-photo-preview, body.theme-dark .replace-photo-preview{background:#182230!important}
body:not(.theme-dark) .product .photo, body:not(.theme-dark) .current-product-photo, body:not(.theme-dark) .admin-product-thumb, body:not(.theme-dark) .product-photo-preview, body:not(.theme-dark) .replace-photo-preview{background:#fff!important}
@media(max-width:620px){.products,.product-grid{grid-template-columns:1fr!important}.product .photo{min-height:220px}.product{width:100%;min-width:0}.variant-order{flex-wrap:wrap}.variant-order .size{flex:1;min-width:150px}}
