@font-face {
  font-family: "Material Symbols Rounded";
  src: url("assets/fonts/material-symbols-rounded.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
}

*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:#f4f4f5;color:#111}.container{max-width:1200px;margin:auto;padding:20px}header{background:#000;color:white;border-bottom:4px solid #e87511}.header-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}.brand{font-size:42px;letter-spacing:8px;font-weight:300}.brand span{color:#e87511}.subtitle{margin-top:6px;letter-spacing:5px;color:#ccc;font-size:13px}.tagline{margin-top:10px;color:#e87511;letter-spacing:3px;font-size:13px}.userbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.tab-btn{background:white;border:1px solid #ddd;border-radius:14px;padding:11px 14px;cursor:pointer;font-weight:bold}.tab-btn.active{background:#000;color:#fff}.tab{display:none}.tab.active{display:block}.card{background:white;border:1px solid #ddd;border-radius:24px;padding:20px;box-shadow:0 8px 24px rgba(0,0,0,.05)}button{background:#e87511;color:white;border:0;border-radius:12px;padding:10px 14px;font-weight:bold;cursor:pointer;margin:4px}button.secondary{background:#222}button.dark{background:#0f172a}.link-button{background:none!important;color:#e87511;text-decoration:underline;margin-top:12px}.form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}label{font-size:13px;font-weight:bold}input,select{width:100%;padding:10px;border:1px solid #d7d7d7;border-radius:12px;margin-top:5px}input{text-align:right}input[type=text],input[type=email],input[type=date],select{text-align:left}.table-box{border:1px solid #eee;border-radius:16px;overflow:auto;resize:both;min-height:420px;background:white}table{width:100%;border-collapse:collapse;font-size:14px}th{background:#000;color:white;padding:10px;position:sticky;top:0;z-index:1}td{border-bottom:1px solid #eee;padding:8px;text-align:center}td:first-child{text-align:left}.kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px}.kpi{background:#000;color:white;border-radius:20px;padding:18px}.kpi small{display:block;color:#aaa;margin-bottom:8px}.kpi strong{color:#e87511;font-size:28px;font-weight:300}.result{background:#000;color:white;border-radius:18px;padding:16px;margin-top:12px}.result span{color:#e87511;font-size:24px}.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.project-list{display:grid;gap:12px;margin-top:16px}.project-item{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #eee;border-radius:16px;padding:14px;background:#fafafa}.project-item small{color:#666}.search-box{background:#fafafa;border:1px solid #eee;border-radius:16px;padding:14px;margin-top:12px}.devis-total{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;background:#000;color:white;border-radius:22px;padding:20px;margin-top:18px}.devis-total small{color:#aaa}.devis-total strong{display:block;color:#e87511;font-size:28px;font-weight:300}.dashboard-lots{margin-top:16px}.badge{display:inline-block;background:#111;color:#fff;border-radius:999px;padding:6px 10px;margin:4px}.login-overlay{position:fixed;inset:0;background:#050505;display:flex;align-items:center;justify-content:center;z-index:99999}.login-box{background:white;border-radius:24px;padding:38px;max-width:430px;width:92%;box-shadow:0 20px 60px rgba(0,0,0,.45)}.login-box h1{margin:0;font-size:34px;letter-spacing:6px;font-weight:300}.login-box h1 span{color:#e87511}.error{color:#b91c1c;margin-top:12px}.message{margin-top:10px;font-size:14px}.modal{position:fixed;inset:0;background:rgba(0,0,0,.75);display:none;align-items:center;justify-content:center;z-index:99998}.modal-box{background:white;border-radius:22px;padding:28px;max-width:460px;width:92%}footer{text-align:center;color:#666;padding:30px;font-size:13px}@media print{header,.tabs,button,.login-overlay,.modal{display:none!important}.tab{display:block}.card{box-shadow:none;page-break-inside:avoid;margin-bottom:20px}}

/* Navigation métier par menus */
.app-layout{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:22px;
  align-items:start;
}

.side-menu{
  position:sticky;
  top:18px;
  background:#050505;
  color:white;
  border-radius:24px;
  padding:18px;
  box-shadow:0 10px 30px rgba(0,0,0,.12);
}

.menu-title{
  font-size:18px;
  font-weight:bold;
  letter-spacing:3px;
  color:#e87511;
  margin-bottom:16px;
  text-transform:uppercase;
}

.menu-group{
  border-top:1px solid rgba(255,255,255,.12);
  padding-top:14px;
  margin-top:14px;
}

.menu-group:first-of-type{
  border-top:0;
  padding-top:0;
  margin-top:0;
}

.menu-group-title{
  font-size:12px;
  color:#aaa;
  text-transform:uppercase;
  letter-spacing:2px;
  margin-bottom:8px;
}

.menu-btn{
  display:block;
  width:100%;
  text-align:left;
  background:transparent;
  color:#f4f4f5;
  border:1px solid transparent;
  border-radius:14px;
  padding:11px 12px;
  margin:4px 0;
  font-weight:bold;
  cursor:pointer;
}

.menu-btn:hover{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.14);
}

.menu-btn.active{
  background:#e87511;
  color:white;
  border-color:#e87511;
}

.tabs{
  display:none!important;
}

@media(max-width:900px){
  .app-layout{
    grid-template-columns:1fr;
  }

  .side-menu{
    position:relative;
    top:0;
  }

  .menu-group{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
    gap:6px;
  }

  .menu-group-title{
    grid-column:1/-1;
  }
}

.header-inner{
  align-items:flex-start;
}
.userbar{
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  padding:10px;
}

/* Sidebar gauche fixe */
.app-layout{
  display:grid !important;
  grid-template-columns: 300px 1fr !important;
  gap:24px;
  align-items:start;
}

.side-menu{
  position:sticky !important;
  top:16px;
  left:0;
  min-height:calc(100vh - 40px);
  align-self:start;
  background:#050505;
  border-radius:26px;
  padding:22px 18px;
  overflow:auto;
}

.menu-btn{
  transition:all .18s ease;
}

.menu-btn:hover{
  transform:translateX(4px);
}

.menu-btn.active{
  box-shadow:0 8px 20px rgba(232,117,17,.35);
}

@media(max-width:1100px){
  .app-layout{
    grid-template-columns:1fr !important;
  }

  .side-menu{
    min-height:auto;
    position:relative !important;
  }
}

/* === SIDEBAR GAUCHE DÉFINITIVE === */
.side-menu{
  position:sticky !important;
  top:20px !important;
  left:0 !important;
  height:calc(100vh - 40px) !important;
  overflow:auto !important;
  background:#050505 !important;
  color:#fff !important;
  border-radius:28px !important;
  padding:22px 18px !important;
  box-shadow:0 16px 40px rgba(0,0,0,.18) !important;
  z-index:10 !important;
}

.side-brand{
  padding:8px 8px 18px;
  border-bottom:1px solid rgba(255,255,255,.14);
  margin-bottom:18px;
}

.side-logo{
  font-size:22px;
  letter-spacing:4px;
  font-weight:300;
}

.side-logo span{
  color:#e87511;
}

.side-subtitle{
  margin-top:6px;
  color:#aaa;
  font-size:11px;
  letter-spacing:3px;
}

.menu-group{
  border-top:1px solid rgba(255,255,255,.12) !important;
  padding-top:14px !important;
  margin-top:14px !important;
  display:block !important;
}

.menu-group:first-of-type{
  border-top:0 !important;
  margin-top:0 !important;
  padding-top:0 !important;
}

.menu-group-title{
  color:#aaa !important;
  font-size:12px !important;
  text-transform:uppercase !important;
  letter-spacing:2px !important;
  margin:0 0 8px 8px !important;
}

.menu-btn{
  display:block !important;
  width:100% !important;
  text-align:left !important;
  background:transparent !important;
  color:#f4f4f5 !important;
  border:1px solid transparent !important;
  border-radius:14px !important;
  padding:12px 13px !important;
  margin:5px 0 !important;
  font-weight:bold !important;
  cursor:pointer !important;
  transition:all .18s ease !important;
}

.menu-btn:hover{
  background:rgba(255,255,255,.08) !important;
  border-color:rgba(255,255,255,.14) !important;
  transform:translateX(4px) !important;
}

.menu-btn.active{
  background:#e87511 !important;
  border-color:#e87511 !important;
  color:white !important;
  box-shadow:0 8px 20px rgba(232,117,17,.35) !important;
}

.tabs,
.tab-btn{
  display:none !important;
}

@media(max-width:1000px){
  .side-menu{
    position:relative !important;
    top:0 !important;
    height:auto !important;
  }

  .menu-group{
    display:grid !important;
    grid-template-columns:repeat(auto-fit,minmax(150px,1fr)) !important;
    gap:6px !important;
  }

  .menu-group-title{
    grid-column:1/-1 !important;
  }
}

/* === Retour au visuel logo original JPEG === */

header:not([data-ux-header]){
  height:auto!important;
  min-height:auto!important;
  overflow:visible!important;
}

.header-inner{
  height:auto!important;
  min-height:auto!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding-top:20px!important;
  padding-bottom:20px!important;
}

.header-brand-wrap{
  display:flex!important;
  align-items:center!important;
  gap:16px!important;
  height:auto!important;
  min-height:auto!important;
}

.header-brand-wrap > div{
  display:block!important;
  height:auto!important;
  min-height:auto!important;
}

.header-logo{
  width:62px!important;
  height:62px!important;
  min-width:62px!important;
  min-height:62px!important;
  max-width:62px!important;
  max-height:62px!important;
  object-fit:cover!important;
  border-radius:50%!important;
  border:2px solid rgba(255,255,255,.12)!important;
  box-shadow:0 6px 18px rgba(0,0,0,.22)!important;
  position:static!important;
  top:auto!important;
  left:auto!important;
  transform:none!important;
  margin:0!important;
}

.brand{
  line-height:1!important;
  margin:0!important;
}

.subtitle{
  margin-top:6px!important;
  margin-left:0!important;
  text-align:left!important;
}

.tagline{
  margin-top:10px!important;
  margin-left:0!important;
  text-align:left!important;
}

.login-box{
  text-align:center!important;
}

.login-logo{
  width:180px!important;
  height:180px!important;
  object-fit:cover!important;
  display:block!important;
  margin:0 auto 22px!important;
  border-radius:50%!important;
  box-shadow:0 14px 40px rgba(0,0,0,.28)!important;
}

.sidebar-logo{
  width:110px!important;
  height:110px!important;
  object-fit:cover!important;
  display:block!important;
  margin:0 auto 14px!important;
  border-radius:50%!important;
  border:3px solid rgba(255,255,255,.08)!important;
  box-shadow:0 10px 30px rgba(0,0,0,.22)!important;
}

.side-brand{
  text-align:center!important;
}

.header-logo-frame{
  display:none!important;
}

.header-text-block{
  display:block!important;
  height:auto!important;
  min-height:auto!important;
  padding:0!important;
  margin:0!important;
}

@media(max-width:700px){
  .login-logo{
    width:140px!important;
    height:140px!important;
  }

  .header-logo{
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
  }

  .sidebar-logo{
    width:80px!important;
    height:80px!important;
  }
}

/* === Même taille logo header et sidebar === */

.header-logo{
  width:110px!important;
  height:110px!important;
  min-width:110px!important;
  min-height:110px!important;
  max-width:110px!important;
  max-height:110px!important;
  object-fit:cover!important;
  border-radius:50%!important;
}

.sidebar-logo{
  width:110px!important;
  height:110px!important;
  min-width:110px!important;
  min-height:110px!important;
}

.header-brand-wrap{
  align-items:center!important;
}

@media(max-width:700px){
  .header-logo,
  .sidebar-logo{
    width:80px!important;
    height:80px!important;
    min-width:80px!important;
    min-height:80px!important;
  }
}

/* === Logo header 130px === */

.header-logo{
  width:130px!important;
  height:130px!important;
  min-width:130px!important;
  min-height:130px!important;
  max-width:130px!important;
  max-height:130px!important;
  object-fit:cover!important;
  border-radius:50%!important;
}

.header-brand-wrap{
  align-items:center!important;
  gap:20px!important;
}

header:not([data-ux-header]){
  min-height:150px!important;
}

.header-inner{
  min-height:150px!important;
  align-items:center!important;
}

@media(max-width:700px){
  .header-logo{
    width:90px!important;
    height:90px!important;
    min-width:90px!important;
    min-height:90px!important;
  }
}

/* === Optimisation rapidité menus === */
.tab{
  display:none;
  contain:layout paint;
}

.tab.active{
  display:block;
}

.menu-btn{
  will-change:auto;
}

.card,
.table-box{
  contain:layout paint;
}

.side-menu{
  contain:layout paint;
}

.biometric-login-btn{
  margin-top:8px!important;
  background:#111!important;
}
.isolation-summary .kpi>span{display:block;color:#aaa;margin-bottom:10px}.isolation-summary .kpi strong{display:block;color:#e87511;font-size:28px;font-weight:300}

/* === Isolation résumé : valeur centrée sous le libellé === */
.isolation-summary .isolation-kpi{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
  min-height:150px!important;
  gap:14px!important;
}

.isolation-summary .isolation-kpi-label{
  display:block!important;
  width:100%!important;
  color:#fff!important;
  font-size:20px!important;
  font-weight:700!important;
  line-height:1.2!important;
}

.isolation-summary .isolation-kpi-value{
  display:block!important;
  width:100%!important;
  color:#e87511!important;
  font-size:38px!important;
  font-weight:300!important;
  line-height:1.05!important;
  text-align:center!important;
  white-space:normal!important;
}

@media(max-width:700px){
  .isolation-summary .isolation-kpi-value{font-size:32px!important;}
  .isolation-summary .isolation-kpi-label{font-size:18px!important;}
}

.section-header{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
#tableToitures input,#tableToitures select{min-width:110px}

.header-resume-btn{background:#e87511!important;color:#fff!important;border:1px solid rgba(255,255,255,.18);box-shadow:0 4px 14px rgba(232,117,17,.25)}
.header-resume-btn:hover{filter:brightness(1.08)}

/* === Paramètres === */
.settings-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px;
}
.settings-panel{
  background:#fafafa;
  border:1px solid #eee;
  border-radius:18px;
  padding:18px;
}
.settings-panel h3{
  margin:0 0 8px;
}
.settings-panel p{
  color:#555;
  margin:0 0 12px;
  line-height:1.45;
}

/* === Harmonisation finale Upyx Structure / Upyx === */
:root{
  --ub-black:#050505;
  --ub-orange:#e87511;
  --ub-bg:#f4f4f5;
  --ub-border:#e5e7eb;
  --ub-muted:#6b7280;
  --ub-radius:22px;
  --ub-shadow:0 10px 28px rgba(0,0,0,.06);
}

body{background:var(--ub-bg);color:#111827;}
header{background:var(--ub-black);border-bottom:4px solid var(--ub-orange);}
.header-inner{align-items:center!important;}
.userbar{background:rgba(255,255,255,.07)!important;border:1px solid rgba(255,255,255,.14)!important;border-radius:18px!important;padding:8px!important;gap:8px!important;}
.user-status{font-size:13px;color:#f9fafb;padding:0 6px;white-space:nowrap;}
.header-icon-btn{width:42px;height:42px;padding:0!important;border-radius:14px!important;background:#111827!important;color:#fff!important;border:1px solid rgba(255,255,255,.16)!important;font-size:21px!important;line-height:1!important;display:inline-flex;align-items:center;justify-content:center;}
.header-icon-btn:hover{background:var(--ub-orange)!important;transform:translateY(-1px);}
.header-resume-btn{height:42px;border-radius:14px!important;}
.header-logout-btn{height:42px;border-radius:14px!important;}

.side-menu{background:var(--ub-black)!important;border-radius:26px!important;padding:22px 18px!important;box-shadow:var(--ub-shadow)!important;}
.menu-group-title{color:#9ca3af!important;font-weight:700;}
.menu-btn{border-radius:14px!important;padding:11px 12px!important;}
.menu-btn.active{background:var(--ub-orange)!important;box-shadow:0 8px 20px rgba(232,117,17,.32)!important;}
.menu-btn:hover{background:rgba(255,255,255,.08)!important;border-color:rgba(255,255,255,.14)!important;}

.card{border:1px solid var(--ub-border)!important;border-radius:var(--ub-radius)!important;box-shadow:var(--ub-shadow)!important;margin-bottom:20px;}
.card h2{margin-top:0;letter-spacing:.2px;}
.template-intro{color:var(--ub-muted);line-height:1.5;}
.kpi{border-radius:20px!important;box-shadow:0 8px 18px rgba(0,0,0,.08);}
.kpi strong{display:inline-block;color:var(--ub-orange)!important;}
button{transition:transform .15s ease,filter .15s ease,background .15s ease;}
button:hover{filter:brightness(1.06);}
button:active{transform:translateY(1px);}
input,select{border-color:#d1d5db!important;}
input:focus,select:focus{outline:2px solid rgba(232,117,17,.22);border-color:var(--ub-orange)!important;}
.table-box{border-radius:18px!important;}
table:not(.ux-table) th{background:var(--ub-black)!important;}
.settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;}
.settings-panel{background:#fafafa;border:1px solid var(--ub-border);border-radius:18px;padding:18px;}
.settings-panel h3{margin-top:0;}

@media(max-width:900px){
  .header-inner{align-items:flex-start!important;}
  .userbar{width:100%;justify-content:flex-start;}
  .side-menu{position:relative!important;top:0!important;min-height:auto!important;}
  .menu-group{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:6px;}
  .menu-group-title{grid-column:1/-1;}
}

/* =============================
   V2.1 — Projet / Résumé / Dashboard
============================= */
.eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:#e87511;font-weight:800;margin-bottom:6px}.summary-hero{background:linear-gradient(135deg,#111 0%,#1f1f1f 58%,#2b170b 100%);color:#fff;border:1px solid rgba(232,117,17,.35)}.summary-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:22px}.summary-title-row h2{margin:0 0 8px;font-size:28px;color:#fff}.summary-meta{display:flex;flex-wrap:wrap;gap:10px}.summary-meta span{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:999px;padding:6px 10px;font-size:12px;color:#f4f4f4}.summary-main-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:14px}.summary-card{border-radius:18px;padding:18px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);box-shadow:0 12px 30px rgba(0,0,0,.18)}.summary-card small{display:block;text-transform:uppercase;letter-spacing:.08em;font-size:11px;color:#ffb06f;margin-bottom:10px}.summary-card strong{display:block;font-size:30px;line-height:1;color:#fff;margin-bottom:6px}.summary-card span{font-size:13px;color:#f0f0f0}.summary-card.money{background:rgba(232,117,17,.22);border-color:rgba(232,117,17,.45)}.summary-section{background:#fff;border-radius:18px;border:1px solid #eee;margin:16px 0;box-shadow:0 8px 25px rgba(0,0,0,.04);overflow:hidden}.summary-section summary{cursor:pointer;font-weight:800;padding:18px 20px;color:#1c1c1c;list-style:none}.summary-section summary::-webkit-details-marker{display:none}.summary-section summary::after{content:"+";float:right;color:#e87511;font-size:20px}.summary-section[open] summary::after{content:"–"}.summary-section .kpi-grid{padding:0 20px 20px}.kpi-grid.compact{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}.sticky-actions{position:sticky;bottom:16px;background:rgba(255,255,255,.92);backdrop-filter:blur(10px);border:1px solid #eee;border-radius:16px;padding:12px;box-shadow:0 10px 35px rgba(0,0,0,.08);z-index:4}.status-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:7px 12px;font-size:12px;font-weight:800;white-space:nowrap;border:1px solid transparent}.status-etude{background:#eef2ff;color:#293b8f;border-color:#dbe3ff}.status-chiffrage{background:#fff7df;color:#8a5b00;border-color:#ffe5a3}.status-devis{background:#e9f9f0;color:#12733f;border-color:#c7efd9}.status-commande{background:#e8f8ff;color:#00658a;border-color:#c8ecfb}.status-fabrication{background:#f0ecff;color:#4b2db1;border-color:#ddd4ff}.status-chantier{background:#fff0e8;color:#a4490a;border-color:#ffd3bd}.status-termine{background:#e8f6ee;color:#19653a;border-color:#c9ebd7}.status-perdu{background:#ffecec;color:#9e1c1c;border-color:#ffc9c9}.document-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin:12px 0 20px}.document-tile{background:#fafafa;border:1px dashed #d8d8d8;border-radius:16px;padding:18px;font-weight:800}.document-tile small{display:block;color:#777;font-weight:500;margin-top:6px}.full-label{display:block;margin-top:10px}.full-label textarea{width:100%;box-sizing:border-box;margin-top:8px}.project-item-v2{align-items:center}.project-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}.dashboard-columns{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;margin-top:18px}.dashboard-global{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}@media(max-width:900px){.summary-main-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-title-row{flex-direction:column}.dashboard-columns{grid-template-columns:1fr}}@media(max-width:520px){.summary-main-grid{grid-template-columns:1fr}.summary-card strong{font-size:26px}.project-actions{justify-content:flex-start}}

.autosave-toast{
position:fixed;top:20px;right:20px;z-index:10000;
background:#fff;border:1px solid #e5e7eb;border-radius:14px;
padding:12px 14px;box-shadow:0 10px 30px rgba(0,0,0,.15);
display:flex;gap:10px;align-items:center
}

/* V3.0 Quantitatifs automatiques */
.quant-hero{border-left:4px solid #e87511;}
.quant-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;margin:16px 0;}
.quant-card{background:#111827;color:#fff;border-radius:16px;padding:16px;box-shadow:0 10px 25px rgba(0,0,0,.12);}
.quant-card small{display:block;opacity:.78;text-transform:uppercase;letter-spacing:.04em;font-size:11px;margin-bottom:8px;}
.quant-card strong{display:block;font-size:26px;line-height:1.1;}
.quant-card span{display:block;opacity:.78;margin-top:4px;}
#quantitatifs .table-box table td:nth-child(2),#quantitatifs .table-box table th:nth-child(2){text-align:right;}

/* V3.2 Foundation — sidebar métier hiérarchique */
.foundation-nav{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:0 10px 18px;
}
.nav-block{
  border-radius:16px;
}
.nav-block .menu-btn{
  width:100%;
  text-align:left;
}
.nav-sub{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin:5px 0 8px 14px;
  padding-left:10px;
  border-left:1px solid rgba(255,255,255,.14);
}
.nav-sub button{
  border:0;
  background:transparent;
  color:rgba(255,255,255,.76);
  text-align:left;
  padding:5px 8px;
  border-radius:10px;
  cursor:pointer;
  font-size:.87rem;
  line-height:1.25;
}
.nav-sub button:hover{
  background:rgba(255,255,255,.10);
  color:#fff;
}
.nav-sub-section{
  color:rgba(255,255,255,.92);
  font-weight:800;
  font-size:.82rem;
  letter-spacing:.01em;
  margin-top:7px;
  margin-bottom:2px;
}

/* V3.2 Foundation — sidebar accordéon */
.accordion-nav .nav-block .nav-sub{
  display:none;
}
.accordion-nav .nav-block.open .nav-sub{
  display:flex;
}
.accordion-nav .menu-btn::after{
  content:"";
  float:right;
  opacity:.65;
  transition:transform .18s ease;
}
.accordion-nav .nav-block.open > .menu-btn::after{
  transform:rotate(90deg);
}

.nav-block .menu-btn{cursor:pointer;}

/* V3.2 — lisibilité hiérarchique sidebar */
.accordion-nav .nav-block{
  position:relative;
}

.accordion-nav .nav-block.open{
  background:rgba(255,255,255,.035);
  border-radius:16px;
  padding-bottom:6px;
}

.accordion-nav .nav-block.open::before{
  content:"";
  position:absolute;
  left:18px;
  top:48px;
  bottom:10px;
  width:1px;
  background:rgba(255,255,255,.16);
}

.accordion-nav .nav-sub-section{
  display:none;
  margin:10px 0 4px 22px;
  padding-left:12px;
  border-left:0;
  color:rgba(255,255,255,.94);
  font-weight:800;
}

.accordion-nav .nav-block.open .nav-sub-section{
  display:flex;
}

.accordion-nav .nav-block.open .nav-sub:not(.nav-sub-section){
  display:flex;
  margin:2px 0 10px 40px;
  padding-left:12px;
  border-left:1px solid rgba(255,255,255,.10);
}

.accordion-nav .nav-sub:not(.nav-sub-section) button{
  position:relative;
  padding-left:16px;
}

.accordion-nav .nav-sub:not(.nav-sub-section) button::before{
  content:"";
  position:absolute;
  left:3px;
  top:50%;
  width:7px;
  height:1px;
  background:rgba(255,255,255,.35);
}

.accordion-nav .nav-sub:not(.nav-sub-section) button:hover::before{
  background:rgba(255,255,255,.85);
}

/* V3.3 — quantitatifs automatiques */
.quant-hero .section-header{
  align-items:flex-start;
}
.quant-hero .template-intro{
  margin:6px 0 0;
  max-width:820px;
}
.quant-grid{
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
}
.summary-section:not([open]){
  background:rgba(255,255,255,.55);
}
.summary-section summary{
  cursor:pointer;
  font-weight:800;
}

/* V3.3 — lisibilité cartes quantitatifs */
.quant-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  min-height:112px;
  gap:8px;
}

.quant-card small{
  display:block;
  width:100%;
  text-align:center;
  line-height:1.25;
}

.quant-value{
  display:inline-flex;
  align-items:baseline;
  justify-content:center;
  gap:6px;
  white-space:nowrap;
}

.quant-value strong{
  line-height:1;
}

.quant-value span{
  opacity:.82;
  font-weight:700;
  line-height:1;
}

.kpi,
.summary-kpi,
.dashboard-global .kpi{
  text-align:center;
}

.kpi strong,
.summary-kpi strong,
.dashboard-global .kpi strong{
  display:inline-block;
}

/* V3.3 — contraste cartes quantitatifs */
.quant-card small{
  color:#d98a2b;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.045em;
}

.quant-value strong{
  color:#ffffff;
  font-size:2rem;
  font-weight:900;
  text-shadow:0 1px 10px rgba(255,255,255,.08);
}

.quant-value span{
  color:rgba(255,255,255,.78);
  font-weight:800;
  font-size:.98rem;
}

.quant-card{
  background:linear-gradient(145deg,#111827,#020617);
  border:1px solid rgba(217,138,43,.22);
}

.quant-card:hover{
  border-color:rgba(217,138,43,.45);
}


/* ===== V3.4 DEV - Vue d'ensemble propre ===== */
.smart-box:not(.ux-section){
  border:1px solid rgba(245,158,11,.55);
  border-radius:14px;
  padding:18px;
  margin:16px 0 20px;
  background:rgba(245,158,11,.08);
}
.smart-box h3{margin:0 0 14px;}
.smart-box .template-intro{margin:0 0 16px;}
.smart-box .form-grid{align-items:end;}
.smart-check{
  display:flex;
  align-items:center;
  gap:10px;
  width:fit-content;
  max-width:100%;
  margin-top:14px;
  line-height:1.35;
  cursor:pointer;
}
.smart-check input[type=checkbox],
input[type=checkbox]{
  width:auto;
  min-width:18px;
  height:18px;
  margin:0;
  padding:0;
  text-align:left;
  flex:0 0 auto;
}
.smart-check span{display:inline-block;}
.smart-box .result{
  margin-top:16px;
  display:block;
  width:100%;
}
@media (max-width: 700px){
  .smart-box{padding:14px;}
  .smart-check{align-items:flex-start;}
}

/* ===== V3.4 DEV Alpha 12 - Vue d'ensemble unifiée ===== */
.smart-config-box{
  border:1px solid #d97706;
  background:rgba(217,119,6,.15);
  border-radius:14px;
  padding:14px 16px;
  margin:16px 0 18px;
}
.smart-config-row{
  display:grid;
  gap:18px;
  align-items:end;
}
.smart-config-row-main{
  grid-template-columns:minmax(240px, 1fr) auto;
}
.smart-config-row-secondary{
  margin-top:16px;
}
.smart-config-box .result{
  margin-top:18px;
  display:block;
  width:100%;
}
.smart-check-inline{
  margin:0 0 10px 0;
  white-space:nowrap;
}
.smart-check-inline span{
  font-weight:700;
}
@media (max-width: 900px){
  .smart-config-row-main{
    grid-template-columns:1fr;
    align-items:start;
  }
  .smart-check-inline{
    margin:0;
    white-space:normal;
  }
}

.smart-prep-card{border:1px solid rgba(255,255,255,.15);border-radius:12px;overflow:hidden;margin-bottom:16px}
.smart-prep-header{background:#f97316;color:#fff;font-weight:600;padding:12px}
.smart-prep-body{background:#111827;color:#fff;padding:12px;display:flex;flex-direction:column;gap:6px}

/* Alpha 14 - Toitures V2 : type en première ligne + ouvertures + zinguerie proposée */
.roof-type-line{
  display:grid;
  grid-template-columns:minmax(240px, 1fr);
  gap:14px;
  margin-bottom:16px;
}
.roof-type-line label{
  font-weight:700;
}
.roof-type-line select{
  min-height:44px;
  font-size:1rem;
}
.roof-geometry-grid{
  margin-top:6px;
}
.card-soft{
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  background:rgba(255,255,255,.72);
  padding:16px;
  margin:18px 0;
}
.roof-openings-box h3{
  margin-top:0;
}


/* Alpha 17 — Résumé Zinguerie compact */
.zinguerie-summary{
  background:#000;
  color:#fff;
  border-radius:20px;
  padding:22px 24px;
  margin-top:18px;
}

.zinguerie-summary-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding-bottom:16px;
  border-bottom:1px solid rgba(255,255,255,.16);
  margin-bottom:16px;
}

.zinguerie-summary-header strong{
  display:block;
  font-size:24px;
  line-height:1.15;
}

.zinguerie-summary-header small{
  display:block;
  color:rgba(255,255,255,.62);
  margin-top:6px;
  font-size:.9rem;
}

.zinguerie-summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:14px;
}

.summary-group{
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  padding:14px 16px;
}

.summary-group h4{
  margin:0 0 10px;
  color:#fff;
  font-size:1rem;
}

.summary-line{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  padding:7px 0;
  border-top:1px solid rgba(255,255,255,.08);
}

.summary-line:first-of-type{
  border-top:0;
}

.summary-line span:first-child{
  color:rgba(255,255,255,.72);
}

.summary-line strong{
  white-space:nowrap;
  font-weight:700;
}

.summary-line strong span{
  color:#e87511;
  font-size:22px;
}

.summary-line.total{
  margin-top:5px;
  padding-top:10px;
  border-top:1px solid rgba(232,117,17,.55);
}

.summary-line.total span:first-child,
.summary-line.total strong{
  color:#fff;
}

/* Alpha 17 — module actif dans le menu */
.nav-sub button.active-sub{
  background:rgba(232,117,17,.20);
  color:#fff;
  font-weight:800;
  border-left:3px solid #e87511;
  padding-left:13px;
}

.accordion-nav .nav-sub:not(.nav-sub-section) button.active-sub::before{
  background:#e87511;
}


/* Alpha 18 — Synthèse Chantier */
.chantier-synthesis-hero{
  margin-bottom:18px;
}

.chantier-synthesis-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:18px;
  margin-bottom:18px;
}

.synthesis-card{
  background:#000;
  color:#fff;
  border-radius:22px;
  padding:20px 22px;
  box-shadow:0 12px 30px rgba(0,0,0,.10);
}

.synthesis-card h3{
  margin:0 0 14px;
  font-size:1.16rem;
  color:#fff;
}

.synthesis-line{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:16px;
  padding:9px 0;
  border-top:1px solid rgba(255,255,255,.10);
}

.synthesis-line:first-of-type{
  border-top:0;
}

.synthesis-line span:first-child{
  color:rgba(255,255,255,.70);
}

.synthesis-line strong{
  color:#fff;
  white-space:nowrap;
}

.synthesis-line strong span{
  color:#e87511;
  font-size:21px;
}


/* Alpha 19 — Synthèse Chantier premium */
.chantier-premium{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.chantier-hero{
  background:linear-gradient(135deg,#000 0%,#111827 72%,#1f1308 100%);
  color:#fff;
  border-radius:26px;
  padding:28px 30px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:22px;
  box-shadow:0 18px 42px rgba(0,0,0,.16);
}

.chantier-hero .eyebrow{
  color:#e87511;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:.74rem;
}

.chantier-hero h2{
  margin:8px 0 8px;
  color:#fff;
  font-size:34px;
}

.chantier-hero .summary-meta span{
  color:rgba(255,255,255,.72);
}

.chantier-hero-status{
  min-width:190px;
  text-align:right;
}

.chantier-hero-status strong{
  display:block;
  color:#e87511;
  font-size:42px;
  line-height:1;
  margin-top:14px;
}

.chantier-hero-status small{
  display:block;
  color:rgba(255,255,255,.68);
  margin-top:6px;
}

.chantier-progress-card{
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:22px;
  padding:20px 22px;
  box-shadow:0 12px 28px rgba(0,0,0,.06);
}

.progress-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  margin-bottom:12px;
}

.progress-head span{
  color:#e87511;
  font-weight:900;
}

.progress-track{
  height:13px;
  background:#f1f5f9;
  border-radius:999px;
  overflow:hidden;
}

.progress-fill{
  height:100%;
  background:#e87511;
  border-radius:999px;
  transition:width .25s ease;
}

.next-action{
  margin-top:10px;
  color:#64748b;
  font-weight:700;
}

.module-status-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(185px,1fr));
  gap:12px;
}

.module-status{
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:18px;
  padding:14px 16px;
  box-shadow:0 8px 22px rgba(0,0,0,.05);
}

.module-status span{
  display:block;
  font-weight:900;
  margin-bottom:6px;
}

.module-status strong{
  font-size:.9rem;
  color:#64748b;
}

.module-status.complete{
  border-color:rgba(34,197,94,.35);
  background:linear-gradient(180deg,#fff,#f0fdf4);
}

.module-status.partial{
  border-color:rgba(232,117,17,.45);
  background:linear-gradient(180deg,#fff,#fff7ed);
}

.module-status.empty{
  background:#fff;
}

.key-metrics-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:14px;
}

.key-metric{
  background:#000;
  color:#fff;
  border-radius:22px;
  padding:20px;
  min-height:118px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  box-shadow:0 14px 34px rgba(0,0,0,.12);
}

.key-metric small{
  color:rgba(255,255,255,.65);
  font-weight:800;
}

.key-metric strong{
  color:#e87511;
  font-size:30px;
  line-height:1.05;
  margin-top:8px;
}

.key-metric span{
  color:rgba(255,255,255,.76);
  margin-top:4px;
}

.key-metric.money{
  background:linear-gradient(135deg,#000,#241102);
}

.premium-family-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(315px,1fr));
  gap:16px;
}

.premium-family{
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:22px;
  padding:0;
  overflow:hidden;
  box-shadow:0 10px 26px rgba(0,0,0,.06);
}

.premium-family summary{
  cursor:pointer;
  list-style:none;
  font-weight:950;
  font-size:1.08rem;
  padding:18px 20px;
  background:linear-gradient(180deg,#fff7ed,#fff);
  border-bottom:1px solid rgba(232,117,17,.18);
}

.premium-family summary::-webkit-details-marker{
  display:none;
}

.premium-lines{
  padding:10px 20px 18px;
}

.premium-lines > div{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:18px;
  padding:10px 0;
  border-top:1px solid #eef2f7;
}

.premium-lines > div:first-child{
  border-top:0;
}

.premium-lines span:first-child{
  color:#64748b;
  font-weight:750;
}

.premium-lines strong{
  white-space:nowrap;
}

.premium-lines strong span{
  color:#e87511;
  font-size:20px;
}

.chantier-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:20px;
  padding:16px;
}

@media(max-width:800px){
  .chantier-hero{
    flex-direction:column;
  }
  .chantier-hero-status{
    text-align:left;
  }
}


/* Alpha 22 — Tableau de bord premium aligné Synthèse Chantier */
.dashboard-premium{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.dashboard-hero{
  background:linear-gradient(135deg,#000 0%,#111827 72%,#1f1308 100%);
  color:#fff;
  border-radius:26px;
  padding:28px 30px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:22px;
  box-shadow:0 18px 42px rgba(0,0,0,.16);
}

.dashboard-hero .eyebrow{
  color:#e87511;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  font-size:.74rem;
}

.dashboard-hero h2{
  margin:8px 0 8px;
  color:#fff;
  font-size:34px;
}

.dashboard-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.dashboard-meta span{
  color:rgba(255,255,255,.72);
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  padding:6px 10px;
}

.dashboard-hero-status{
  min-width:190px;
  text-align:right;
}

.dashboard-hero-status strong{
  display:block;
  color:#e87511;
  font-size:42px;
  line-height:1;
  margin-top:14px;
}

.dashboard-hero-status small{
  display:block;
  color:rgba(255,255,255,.68);
  margin-top:6px;
}

.dashboard-progress-card{
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:22px;
  padding:20px 22px;
  box-shadow:0 12px 28px rgba(0,0,0,.06);
}

.dashboard-actions-premium{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:20px;
  padding:16px;
  box-shadow:0 10px 26px rgba(0,0,0,.05);
}

.dashboard-info-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:16px;
}

.dashboard-info-card{
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:22px;
  padding:20px;
  box-shadow:0 10px 26px rgba(0,0,0,.06);
}

.dashboard-info-card h3{
  margin:0 0 14px;
}

.dashboard-mini-kpi{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:16px;
  padding:10px 0;
  border-top:1px solid #eef2f7;
}

.dashboard-mini-kpi:first-of-type{
  border-top:0;
}

.dashboard-mini-kpi span{
  color:#64748b;
  font-weight:750;
}

.dashboard-mini-kpi strong,
.dashboard-mini-kpi strong span{
  color:#e87511;
  font-size:20px;
}

.compact-projects .project-item{
  padding:10px 12px;
}

@media(max-width:800px){
  .dashboard-hero{
    flex-direction:column;
  }
  .dashboard-hero-status{
    text-align:left;
  }
}


/* Alpha 23 corrigée - Harmonisation sans régression Dashboard */
:root{
 --upyx-radius:22px;
 --upyx-orange:#e87511;
}

.card,
.module-status,
.dashboard-info-card,
.premium-family,
.chantier-progress-card,
.dashboard-progress-card{
 border-radius:22px !important;
}

button{
 border-radius:14px !important;
}

.progress-fill{
 background:var(--upyx-orange) !important;
}


/* Alpha 24 UX — Synthèse Chantier blanche premium */
#resume .chantier-hero{
  background:#fff !important;
  color:#0f172a !important;
  border:1px solid rgba(232,117,17,.18) !important;
  box-shadow:0 12px 30px rgba(15,23,42,.08) !important;
}

#resume .chantier-hero .eyebrow{
  color:#e87511 !important;
}

#resume .chantier-hero h2{
  color:#0f172a !important;
}

#resume .chantier-hero .summary-meta span{
  color:#475569 !important;
  background:#f8fafc !important;
  border:1px solid #e2e8f0 !important;
}

#resume .chantier-hero-status strong{
  color:#e87511 !important;
}

#resume .chantier-hero-status small{
  color:#64748b !important;
}

#resume .chantier-hero-status .status-badge{
  box-shadow:0 6px 18px rgba(15,23,42,.08);
}


/* Alpha 25 — Harmonisation UX globale */
:root{
  --upyx-orange:#e87511;
  --upyx-black:#000;
  --upyx-text:#0f172a;
  --upyx-muted:#64748b;
  --upyx-border:rgba(17,24,39,.08);
  --upyx-soft:#f8fafc;
  --upyx-radius:22px;
  --upyx-radius-sm:14px;
  --upyx-shadow:0 10px 26px rgba(0,0,0,.06);
}

/* Cartes : même langage visuel partout */
.card,
.summary-section,
.premium-family,
.dashboard-info-card,
.dashboard-progress-card,
.chantier-progress-card,
.synthesis-card,
.module-status,
.search-box,
.project-item,
.document-tile,
.quant-card,
.template-card,
.kpi,
.smart-prep-card,
.smart-config-box,
.table-box,
.devis-total{
  border-radius:var(--upyx-radius) !important;
}

.card,
.summary-section,
.premium-family,
.dashboard-info-card,
.dashboard-progress-card,
.chantier-progress-card,
.module-status,
.search-box,
.project-item,
.document-tile,
.quant-card,
.template-card,
.table-box{
  border:1px solid var(--upyx-border);
  box-shadow:var(--upyx-shadow);
}

/* Rythme vertical homogène dans les modules */
.tab > .card,
.tab > .chantier-premium,
.tab > .dashboard-premium{
  margin-bottom:18px;
}

.card h2,
.card h3,
.premium-family summary,
.dashboard-info-card h3{
  color:var(--upyx-text);
}

/* Boutons */
button{
  border-radius:var(--upyx-radius-sm) !important;
  font-weight:800;
}

.toolbar button:first-child,
button.primary,
.dashboard-actions-premium button:first-child,
.chantier-actions button:first-child{
  background:var(--upyx-orange) !important;
  color:#fff !important;
  border-color:var(--upyx-orange) !important;
}

button.secondary,
.toolbar button.secondary,
.dashboard-actions-premium button.secondary,
.chantier-actions button.secondary{
  background:#fff !important;
  color:var(--upyx-text) !important;
  border:1px solid #e2e8f0 !important;
}

button.secondary:hover,
.toolbar button.secondary:hover,
.dashboard-actions-premium button.secondary:hover,
.chantier-actions button.secondary:hover{
  border-color:var(--upyx-orange) !important;
  color:var(--upyx-orange) !important;
}

/* Inputs et formulaires */
input,
select,
textarea{
  border-radius:14px !important;
  border-color:#e2e8f0 !important;
}

input:focus,
select:focus,
textarea:focus{
  outline:2px solid rgba(232,117,17,.18) !important;
  border-color:var(--upyx-orange) !important;
}

/* Vue d'ensemble officielle */
.smart-prep-card,
.smart-config-box,
.smart-primary-row,
.smart-secondary-row{
  border:1px solid rgba(232,117,17,.22) !important;
  background:#fff7ed !important;
  border-radius:var(--upyx-radius) !important;
  box-shadow:0 10px 24px rgba(232,117,17,.07);
}

.smart-prep-header{
  background:transparent !important;
  color:var(--upyx-orange) !important;
  font-weight:950;
  letter-spacing:.02em;
}

.smart-prep-body{
  background:transparent !important;
  color:var(--upyx-text) !important;
}

/* Contrôles de cohérence */
#murCoherence:not(.ux-alert),
#pignonCoherence,
#roofCoherence:not(.ux-alert),
.coherence-card{
  display:block;
  background:#fff !important;
  border:1px solid var(--upyx-border) !important;
  border-radius:var(--upyx-radius) !important;
  padding:14px 16px !important;
  box-shadow:var(--upyx-shadow);
  font-weight:900;
}

/* Tableaux */
.table-box{
  overflow:hidden;
}

table:not(.ux-table) th{
  background:#000 !important;
  color:#fff !important;
}

table:not(.ux-table) td,
table:not(.ux-table) th{
  padding:11px 12px;
}

/* Valeurs importantes */
.kpi strong,
.summary-card strong,
.key-metric strong,
.premium-lines strong span,
.synthesis-line strong span,
.dashboard-mini-kpi strong,
.result span,
.devis-total strong{
  color:var(--upyx-orange) !important;
}

/* Statuts modules */
.module-status{
  transition:transform .15s ease, box-shadow .15s ease;
}

.module-status:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(0,0,0,.08);
}

/* Harmonisation quantitatifs / chiffrage */
#quantitatifs .card,
#devis .card,
#prix .card,
#settings .card{
  border-radius:var(--upyx-radius) !important;
}

/* Nettoyage visuel des anciens blocs noirs isolés */
.result{
  border-radius:var(--upyx-radius) !important;
}


/* Alpha 25.1 — correctifs audit modules */
#zinguerie .zinguerie-summary{
  display:none !important;
}

/* Alpha 31 — écrans d'accueil de domaine */
.dashboard-lots .lot-card{display:block;width:100%;text-align:left;background:#fff;color:#111;border:1px solid #e5e7eb;border-left:4px solid #e87511;border-radius:18px;padding:16px;margin:8px 0;box-shadow:0 8px 20px rgba(0,0,0,.04)}
.dashboard-lots .lot-card strong{display:block;font-size:16px;margin-bottom:5px;color:#111}.dashboard-lots .lot-card small{display:block;color:#666;font-weight:400}.dashboard-lots .lot-card:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(0,0,0,.08)}

/* Alpha 31 - Cockpits métier V2 */
.cockpit-page{
  padding:28px;
  overflow:hidden;
}
.cockpit-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  margin-bottom:22px;
}
.cockpit-header h2{
  margin:4px 0 6px;
  font-size:30px;
  letter-spacing:-.4px;
}
.cockpit-eyebrow{
  display:inline-flex;
  align-items:center;
  width:max-content;
  padding:6px 10px;
  border-radius:999px;
  background:#fff3e8;
  color:#c45a05;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.cockpit-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin:18px 0 24px;
}
.cockpit-kpi-card{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:20px;
  padding:18px;
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}
.cockpit-kpi-card small{
  display:block;
  color:#64748b;
  font-weight:800;
  margin-bottom:8px;
}
.cockpit-kpi-card strong{
  display:block;
  color:#111827;
  font-size:24px;
  line-height:1.1;
  letter-spacing:-.4px;
}
.cockpit-kpi-card span{
  display:block;
  color:#64748b;
  font-size:12px;
  margin-top:8px;
  font-weight:600;
}
.cockpit-section-title{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin:12px 0 14px;
  border-top:1px solid #f1f5f9;
  padding-top:20px;
}
.cockpit-section-title h3{
  margin:0;
  font-size:20px;
}
.cockpit-section-title p{
  margin:0;
  color:#64748b;
  font-size:13px;
  font-weight:600;
}
.cockpit-module-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
.cockpit-module-grid.two-cols{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.cockpit-module-card{
  margin:0;
  width:100%;
  min-height:168px;
  padding:20px;
  text-align:left;
  background:#fff;
  color:#111827;
  border:1px solid #e5e7eb;
  border-radius:22px;
  box-shadow:0 12px 28px rgba(15,23,42,.06);
  display:flex;
  flex-direction:column;
  gap:9px;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cockpit-module-card:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 34px rgba(15,23,42,.10);
  border-color:#e87511;
}
.cockpit-module-card .module-icon{
  font-size:28px;
  line-height:1;
}
.cockpit-module-card strong{
  color:#111827;
  font-size:20px;
}
.cockpit-module-card small{
  color:#64748b;
  font-weight:600;
  line-height:1.35;
}
.cockpit-module-card em{
  margin-top:auto;
  font-style:normal;
  color:#e87511;
  font-weight:800;
  font-size:13px;
}
.cockpit-alert-box{
  margin-top:20px;
  padding:16px 18px;
  border-radius:18px;
  background:#fff7ed;
  border:1px solid #fed7aa;
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.cockpit-alert-box strong{
  color:#9a3412;
  white-space:nowrap;
}
.cockpit-alert-box span{
  color:#7c2d12;
  font-weight:600;
}
@media(max-width:1100px){
  .cockpit-kpi-grid,.cockpit-module-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:720px){
  .cockpit-header,.cockpit-section-title,.cockpit-alert-box{display:block;}
  .cockpit-kpi-grid,.cockpit-module-grid,.cockpit-module-grid.two-cols{grid-template-columns:1fr;}
  .cockpit-header .primary-btn{margin-top:12px;}
}

/* Alpha 31 — Design System Cockpit Premium V3 */
.upyx-cockpit-page{
  padding:34px 38px 28px;
  background:linear-gradient(180deg,#fff 0%,#fbfcff 100%);
  color:#0f172a;
  min-height:calc(100vh - 40px);
}
.upyx-cockpit-topbar{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:28px;
  margin-bottom:30px;
}
.upyx-eyebrow{
  display:block;
  color:#e87511;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-size:13px;
  margin-bottom:8px;
}
.upyx-cockpit-topbar h2{
  margin:0;
  font-size:36px;
  line-height:1.05;
  letter-spacing:-1px;
  color:#111827;
}
.upyx-cockpit-topbar p{
  max-width:650px;
  margin:14px 0 0;
  color:#64748b;
  font-size:16px;
  line-height:1.45;
  font-weight:600;
}
.upyx-cockpit-actions{
  display:flex;
  align-items:center;
  gap:16px;
  white-space:nowrap;
}
.upyx-ghost-btn,
.upyx-refresh-btn,
.upyx-outline-btn{
  margin:0 !important;
  border-radius:14px !important;
  font-weight:900 !important;
  box-shadow:none !important;
}
.upyx-ghost-btn{
  background:transparent !important;
  color:#334155 !important;
  border:0 !important;
  padding:8px 10px !important;
}
.upyx-refresh-btn{
  background:#fff !important;
  color:#0f172a !important;
  border:1px solid #cbd5e1 !important;
  padding:13px 20px !important;
}
.upyx-outline-btn{
  background:#fff7ed !important;
  color:#e87511 !important;
  border:1px solid #fb923c !important;
  padding:12px 18px !important;
}
.upyx-last-update{
  border-left:1px solid #e2e8f0;
  border-right:1px solid #e2e8f0;
  padding:0 18px;
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.upyx-last-update span{display:block;}
.upyx-last-update strong{display:block;color:#0f172a;font-size:13px;margin-top:3px;}
.upyx-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
  margin:0 0 32px;
}
.upyx-kpi-card{
  min-height:188px;
  background:#fff;
  border:1px solid #e6eaf0;
  border-radius:18px;
  padding:22px 24px;
  box-shadow:0 16px 36px rgba(15,23,42,.07);
}
.upyx-kpi-head{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:flex-start;
  margin-bottom:24px;
}
.upyx-kpi-head span{
  text-transform:uppercase;
  color:#334155;
  font-size:12px;
  line-height:1.35;
  font-weight:900;
  letter-spacing:.02em;
}
.upyx-kpi-head i{
  width:52px;height:52px;
  display:grid;place-items:center;
  border-radius:16px;
  background:#f1f5f9;
  color:#e87511;
  font-style:normal;
  font-size:24px;
  font-weight:900;
}
.upyx-kpi-head i.blue{background:#eef4ff;color:#2563eb;}
.upyx-kpi-head i.orange{background:#fff1e9;color:#e87511;}
.upyx-kpi-value{
  display:block;
  font-size:30px;
  line-height:1.05;
  letter-spacing:-.7px;
  color:#0f172a;
  margin-bottom:16px;
}
.upyx-kpi-value.warning{color:#e87511;}
.upyx-kpi-card p{
  margin:0;
  color:#475569;
  line-height:1.4;
  font-size:14px;
  font-weight:650;
}
.upyx-progress-ring{
  width:82px;height:82px;
  border-radius:50%;
  display:grid;place-items:center;
  background:conic-gradient(#e87511 0deg,#edf0f5 0deg 360deg);
  position:relative;
  margin:-8px 0 16px;
}
.upyx-progress-ring:after{
  content:"";
  position:absolute;inset:10px;
  background:#fff;
  border-radius:50%;
}
.upyx-progress-ring strong{
  position:relative;z-index:1;
  font-size:22px;
  color:#0f172a;
}
.upyx-section-heading{
  margin:4px 0 18px;
}
.upyx-section-heading h3{
  margin:0 0 8px;
  color:#334155;
  font-size:18px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.02em;
}
.upyx-section-heading p{
  margin:0;
  color:#64748b;
  font-size:14px;
  font-weight:650;
}
.upyx-module-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:20px;
}
.upyx-module-grid.two-cols{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.upyx-module-card{
  cursor:pointer;
  min-height:258px;
  background:#fff;
  border:1px solid #e6eaf0;
  border-top:3px solid #e87511;
  border-radius:12px;
  padding:30px 30px 22px;
  box-shadow:0 16px 36px rgba(15,23,42,.07);
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;
  display:flex;
  flex-direction:column;
  outline:none;
}
.upyx-module-card:hover,
.upyx-module-card:focus{
  transform:translateY(-3px);
  box-shadow:0 22px 46px rgba(15,23,42,.12);
}
.upyx-module-card.accent-red{border-top-color:#ef3d28;}
.upyx-module-card.accent-yellow{border-top-color:#f0b000;}
.upyx-module-card.accent-slate{border-top-color:#1e334f;}
.upyx-module-card.accent-green{border-top-color:#10b981;}
.upyx-module-icon{
  font-size:44px;
  line-height:1;
  color:#e87511;
  margin-bottom:22px;
  font-weight:300;
}
.upyx-module-card h4{
  margin:0 0 12px;
  color:#111827;
  font-size:28px;
  line-height:1;
  letter-spacing:-.6px;
}
.upyx-module-card em{
  align-self:flex-start;
  display:inline-flex;
  padding:8px 12px;
  border-radius:8px;
  background:#fff1e9;
  color:#e87511;
  font-style:normal;
  font-size:13px;
  font-weight:900;
  margin-bottom:14px;
}
.upyx-module-card.accent-red em{background:#fee2e2;color:#dc2626;}
.upyx-module-card.accent-yellow em{background:#fef3c7;color:#d97706;}
.upyx-module-card.accent-slate em{background:#f1f5f9;color:#334155;}
.upyx-module-card.accent-green em{background:#dcfce7;color:#059669;}
.upyx-module-card p{
  margin:0;
  color:#334155;
  font-size:14px;
  font-weight:700;
}
.upyx-module-footer{
  margin-top:auto;
  padding-top:18px;
  border-top:1px solid #e5e7eb;
  display:flex;
  align-items:center;
  gap:16px;
  color:#e87511;
}
.upyx-module-footer span{
  font-size:34px;
  line-height:1;
  font-weight:300;
}
.upyx-module-footer strong{
  color:#e87511;
  font-size:14px;
  font-weight:900;
}
.accent-red .upyx-module-footer,.accent-red .upyx-module-footer strong{color:#ef3d28;}
.accent-yellow .upyx-module-footer,.accent-yellow .upyx-module-footer strong{color:#d99a00;}
.accent-slate .upyx-module-footer,.accent-slate .upyx-module-footer strong{color:#1e334f;}
.accent-green .upyx-module-footer,.accent-green .upyx-module-footer strong{color:#059669;}
.upyx-alert-line{
  margin-top:24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  background:linear-gradient(90deg,#fff7ed,#fff);
  border:1px solid #fed7aa;
  border-left:3px solid #e87511;
  border-radius:12px;
  padding:18px 22px;
}
.upyx-alert-line > div{
  display:grid;
  grid-template-columns:40px auto;
  column-gap:14px;
  align-items:center;
}
.upyx-alert-line div span{
  grid-row:1 / span 2;
  width:40px;height:40px;
  border:2px solid #e87511;
  border-radius:50%;
  display:grid;place-items:center;
  color:#e87511;
  font-weight:900;
  font-style:normal;
}
.upyx-alert-line strong{color:#111827;font-size:16px;}
.upyx-alert-line p{margin:4px 0 0;color:#475569;font-size:13px;font-weight:650;}
@media(max-width:1250px){
  .upyx-cockpit-topbar{display:block;}
  .upyx-cockpit-actions{margin-top:18px;}
  .upyx-kpi-grid,.upyx-module-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:780px){
  .upyx-cockpit-page{padding:22px;}
  .upyx-cockpit-actions,.upyx-alert-line{display:block;}
  .upyx-last-update{border:0;padding:10px 0;}
  .upyx-kpi-grid,.upyx-module-grid,.upyx-module-grid.two-cols{grid-template-columns:1fr;}
  .upyx-outline-btn{margin-top:14px !important;}
}


/* Alpha 31 — Cockpit Métrés compact Structure / Enveloppe / Façades */
.upyx-kpi-grid-compact{
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  margin-bottom:22px;
}
.upyx-kpi-card.upyx-kpi-compact{
  min-height:118px;
  padding:16px 16px 14px;
  border-radius:16px;
}
.upyx-kpi-compact .upyx-kpi-head{
  margin-bottom:10px;
  gap:10px;
}
.upyx-kpi-compact .upyx-kpi-head span{
  font-size:11px;
}
.upyx-kpi-compact .upyx-kpi-head i{
  width:34px;
  height:34px;
  border-radius:11px;
  font-size:16px;
}
.upyx-kpi-compact .upyx-kpi-value{
  font-size:22px;
  margin-bottom:8px;
}
.upyx-kpi-compact p{
  font-size:12px;
  line-height:1.25;
}
.upyx-work-domain{
  background:#fff;
  border:1px solid #e6eaf0;
  border-radius:18px;
  padding:18px;
  margin-bottom:16px;
  box-shadow:0 14px 30px rgba(15,23,42,.055);
}
.upyx-work-domain.compact-domain{
  padding-top:16px;
}
.upyx-domain-title{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:14px;
}
.upyx-domain-title > span{
  width:34px;
  height:34px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:#fff1e9;
  color:#e87511;
  font-weight:950;
  font-size:13px;
}
.upyx-domain-title h3{
  margin:0;
  font-size:18px;
  color:#0f172a;
  line-height:1.1;
}
.upyx-domain-title p{
  margin:4px 0 0;
  color:#64748b;
  font-weight:650;
  font-size:13px;
}
.upyx-module-grid-compact{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.upyx-module-grid-compact.three-cols{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.upyx-module-grid-compact.one-col{
  grid-template-columns:minmax(220px,360px);
}
.upyx-module-card.upyx-module-card-compact{
  min-height:150px;
  padding:18px 18px 15px;
  border-radius:14px;
  box-shadow:none;
}
.upyx-module-card-compact .upyx-module-icon{
  font-size:28px;
  margin-bottom:12px;
}
.upyx-module-card-compact h4{
  font-size:20px;
  margin-bottom:9px;
}
.upyx-module-card-compact em{
  padding:6px 9px;
  border-radius:8px;
  font-size:11px;
  margin-bottom:10px;
}
.upyx-module-card-compact p{
  font-size:13px;
}
.upyx-module-card-compact .upyx-module-footer{
  display:none;
}
@media(max-width:1180px){
  .upyx-kpi-grid-compact{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:980px){
  .upyx-module-grid-compact,
  .upyx-module-grid-compact.three-cols{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:720px){
  .upyx-kpi-grid-compact,
  .upyx-module-grid-compact,
  .upyx-module-grid-compact.three-cols,
  .upyx-module-grid-compact.one-col{grid-template-columns:1fr;}
}


/* Alpha 31 — V5 cockpit compact sans scroll : domaines simples + cartes réduites */
#metres .upyx-cockpit-page{
  padding-top:24px;
  padding-bottom:18px;
}
#metres .upyx-cockpit-topbar{
  margin-bottom:18px;
}
#metres .upyx-cockpit-topbar h2{
  font-size:34px;
  margin-bottom:8px;
}
#metres .upyx-cockpit-topbar p{
  max-width:680px;
  font-size:15px;
  line-height:1.35;
}
#metres .upyx-cockpit-actions{
  gap:14px;
}
#metres .upyx-kpi-grid-compact{
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  margin-bottom:18px;
}
#metres .upyx-kpi-card.upyx-kpi-compact{
  min-height:86px;
  padding:12px 14px;
  border-radius:14px;
  box-shadow:0 10px 24px rgba(15,23,42,.045);
}
#metres .upyx-kpi-compact .upyx-kpi-head{
  margin-bottom:6px;
}
#metres .upyx-kpi-compact .upyx-kpi-head span{
  font-size:10px;
  line-height:1.15;
}
#metres .upyx-kpi-compact .upyx-kpi-head i{
  width:28px;
  height:28px;
  border-radius:9px;
  font-size:13px;
}
#metres .upyx-kpi-compact .upyx-kpi-value{
  font-size:19px;
  margin-bottom:4px;
}
#metres .upyx-kpi-compact p{
  font-size:11px;
  line-height:1.15;
}
#metres .upyx-work-domain,
#metres .upyx-work-domain.compact-domain{
  background:transparent;
  border:0;
  box-shadow:none;
  border-radius:0;
  padding:0;
  margin:0 0 14px;
}
#metres .upyx-domain-title{
  display:flex;
  align-items:center;
  margin:0 0 8px;
  padding:0;
  border:0;
}
#metres .upyx-domain-title h3{
  margin:0;
  font-size:18px;
  line-height:1;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.04em;
  padding-left:12px;
  border-left:4px solid #e87511;
}
#metres .domain-enveloppe h3{color:#10b981;border-left-color:#10b981;}
#metres .upyx-module-grid-compact,
#metres .upyx-module-grid-compact.three-cols{
  display:grid;
  gap:10px;
}
#metres .upyx-module-grid-compact{grid-template-columns:repeat(4,minmax(0,1fr));}
#metres .upyx-module-grid-compact.three-cols{grid-template-columns:repeat(3,minmax(0,1fr));}
#metres .upyx-module-grid-compact.one-col{grid-template-columns:minmax(220px, 1fr); max-width:330px;}
#metres .upyx-module-card.upyx-module-card-compact{
  min-height:108px;
  padding:13px 14px 12px;
  border-radius:13px;
  border-top-width:3px;
  box-shadow:0 10px 22px rgba(15,23,42,.045);
}
#metres .upyx-module-card-compact .upyx-module-icon{
  font-size:22px;
  margin-bottom:8px;
}
#metres .upyx-module-card-compact h4{
  font-size:19px;
  margin-bottom:6px;
  letter-spacing:-.3px;
}
#metres .upyx-module-card-compact em{
  padding:4px 8px;
  font-size:10px;
  margin-bottom:7px;
}
#metres .upyx-module-card-compact p{
  font-size:12px;
  line-height:1.2;
}
#metres .upyx-alert-line{
  margin-top:10px;
  padding:12px 16px;
  border-radius:12px;
}
#metres .upyx-alert-line > div{
  grid-template-columns:32px auto;
}
#metres .upyx-alert-line div span{
  width:32px;
  height:32px;
  font-size:13px;
}
#metres .upyx-alert-line strong{font-size:14px;}
#metres .upyx-alert-line p{font-size:12px;margin-top:2px;}
#metres .upyx-outline-btn{padding:9px 14px !important;font-size:12px !important;}
@media(max-width:1180px){
  #metres .upyx-kpi-grid-compact{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:980px){
  #metres .upyx-module-grid-compact,
  #metres .upyx-module-grid-compact.three-cols{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:720px){
  #metres .upyx-kpi-grid-compact,
  #metres .upyx-module-grid-compact,
  #metres .upyx-module-grid-compact.three-cols,
  #metres .upyx-module-grid-compact.one-col{grid-template-columns:1fr;max-width:none;}
}


/* RC1-001 — Navigation certification helpers */
.upyx-subview-indicator{
  display:inline-flex;align-items:center;gap:6px;margin:6px 0 4px;padding:4px 10px;border-radius:999px;
  font-size:12px;font-weight:700;letter-spacing:.01em;color:#9a4b00;background:#fff3e6;border:1px solid rgba(234,111,0,.18);
}
.upyx-module-card.accent-blue, .accent-blue{--accent:#2563eb;}
.upyx-module-card.accent-red, .accent-red{--accent:#dc2626;}
.upyx-module-card.accent-green, .accent-green{--accent:#16a34a;}
.upyx-module-card.accent-orange, .accent-orange{--accent:#ea6f00;}
.upyx-module-card.accent-sand, .accent-sand{--accent:#b7791f;}
.nav-sub button.active-sub{
  background:rgba(234,111,0,.20) !important;
  color:#fff !important;
  font-weight:800 !important;
}
/* RC1 Sprint 001 — Navigation certifiée */
.nav-project-item{width:100%;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.nav-project-empty{font-size:12px;opacity:.65;padding:6px 8px;display:block;}

.upyx-module-grid.one-col{
  grid-template-columns:minmax(0,1fr);
}


/* =========================================================
   Shell V4 — couche historique Sprint 001
   Objectif : nouvelle interface, moteur métier conservé.
========================================================= */
:root{
  --upyx-blue:#0b6bff;
  --upyx-blue-dark:#064bd8;
  --upyx-navy:#05111f;
  --upyx-navy-2:#071a2e;
  --upyx-border:#e5eaf2;
  --upyx-muted:#64748b;
  --upyx-bg:#f5f7fb;
  --upyx-card:#ffffff;
  --upyx-green:#0f9347;
  --upyx-shadow:0 16px 40px rgba(15,23,42,.08);
}
body{background:var(--upyx-bg)!important;color:#0f172a!important;font-family:Inter,Arial,Helvetica,sans-serif!important;}
body::before{content:"";position:fixed;inset:0;background:radial-gradient(circle at 80% 10%,rgba(11,107,255,.08),transparent 35%),linear-gradient(180deg,#f8fafc 0%,#f2f5f9 100%);pointer-events:none;z-index:-1;}
.upyx-v4-header:not([data-ux-header]){height:96px;background:linear-gradient(135deg,#03070d 0%,#07121f 70%,#091827 100%)!important;border-bottom:1px solid rgba(255,255,255,.08)!important;color:#fff;position:sticky;top:0;z-index:1000;}
.upyx-v4-header-inner:not([data-ux-header]){height:100%;display:flex;align-items:center;justify-content:space-between;padding:0 26px 0 320px;gap:20px;}
.upyx-v4-project-switcher:not([data-ux-header]){display:flex;align-items:center;gap:14px;min-width:300px;max-width:520px;padding:12px 16px;border:1px solid rgba(255,255,255,.13);border-radius:16px;background:rgba(255,255,255,.035);cursor:pointer;transition:.18s ease;}
.upyx-v4-project-switcher:not([data-ux-header]):hover{border-color:rgba(11,107,255,.65);background:rgba(11,107,255,.10)}
.upyx-v4-project-icon{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;color:#fff;border:1px solid rgba(255,255,255,.22);border-radius:10px;font-size:16px;}
.upyx-v4-project-switcher:not([data-ux-header]) strong{display:block;font-size:20px;line-height:1.15;color:#fff;}
.upyx-v4-project-switcher:not([data-ux-header]) small{display:block;margin-top:4px;color:rgba(255,255,255,.70);font-size:14px;}
.upyx-v4-project-chevron{margin-left:auto;color:rgba(255,255,255,.78);font-size:20px;}
.upyx-v4-header-actions:not([data-ux-header]){margin-left:auto;display:flex;align-items:center;gap:16px;}
.upyx-v4-env-badge{min-width:86px;border:1px solid var(--upyx-blue);border-radius:10px;padding:8px 12px;text-align:center;background:rgba(11,107,255,.08);}
.upyx-v4-env-badge strong{display:block;color:#1692ff;font-size:20px;line-height:1;}
.upyx-v4-env-badge span{display:block;color:#fff;font-size:13px;margin-top:4px;}
.upyx-v4-notification,.upyx-v4-menu-button{position:relative;width:44px;height:44px;border-radius:14px!important;background:transparent!important;color:#fff!important;border:0!important;font-size:23px!important;padding:0!important;display:flex!important;align-items:center;justify-content:center;}
.upyx-v4-notification:hover,.upyx-v4-menu-button:hover{background:rgba(255,255,255,.08)!important;filter:none!important;}
.upyx-v4-notification span{position:absolute;right:2px;top:0;min-width:18px;height:18px;border-radius:999px;background:#ef4444;color:#fff;font-size:11px;display:flex;align-items:center;justify-content:center;font-weight:800;}
.side-menu{position:sticky!important;top:96px!important;align-self:start!important;height:calc(100vh - 96px)!important;border-radius:0!important;padding:0!important;background:linear-gradient(180deg,#06101d 0%,#071b2d 100%)!important;box-shadow:none!important;border-right:1px solid rgba(255,255,255,.08)!important;overflow:auto;}
.upyx-v4-side-brand{height:106px!important;display:flex;align-items:center;padding:22px 24px!important;margin:0!important;border-bottom:1px solid rgba(255,255,255,.08)!important;}
.upyx-v4-side-logo{width:220px;max-width:100%;height:auto;display:block;}
.foundation-nav{padding:24px 16px!important;gap:12px!important;}
.nav-block{border-radius:12px!important;}
.nav-block.open{background:transparent!important;padding-bottom:0!important;}
.nav-block.open::before{display:none!important;}
.menu-btn{display:flex!important;align-items:center!important;width:100%!important;height:48px!important;margin:0!important;padding:0 14px!important;border-radius:10px!important;background:transparent!important;color:rgba(255,255,255,.88)!important;border:0!important;font-size:17px!important;font-weight:800!important;text-align:left!important;box-shadow:none!important;}
.menu-btn:hover{background:rgba(255,255,255,.07)!important;color:#fff!important;}
.menu-btn.active{background:linear-gradient(135deg,var(--upyx-blue),#0054e9)!important;color:#fff!important;box-shadow:0 10px 24px rgba(11,107,255,.25)!important;}
.accordion-nav .menu-btn::after{content:""!important;margin-left:auto;float:none!important;opacity:.7;font-size:16px;}
.nav-sub{border-left:1px solid rgba(255,255,255,.16)!important;margin:8px 0 10px 22px!important;padding-left:16px!important;gap:3px!important;}
.nav-sub button{font-size:15px!important;color:rgba(255,255,255,.80)!important;border-radius:8px!important;padding:7px 8px!important;margin:0!important;}
.nav-sub button:hover,.nav-sub button.active-sub{background:rgba(11,107,255,.14)!important;color:#fff!important;}
.nav-sub-section{display:none!important;}
.tab{display:none!important;}
.tab.active{display:block!important;}
.upyx-v4-dashboard{max-width:1480px;margin:0 auto;}
.upyx-v4-page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:26px;}
.upyx-v4-page-head h1{font-size:38px;line-height:1;margin:0 0 8px;color:#07111f;}
.upyx-v4-page-head p{margin:0;color:#526176;font-size:18px;}
.upyx-v4-primary{background:linear-gradient(135deg,var(--upyx-blue),#0755dc)!important;color:#fff!important;border-radius:12px!important;padding:13px 18px!important;box-shadow:0 12px 26px rgba(11,107,255,.22)!important;margin:0!important;}
.upyx-v4-kpis{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:20px;margin-bottom:24px;}
.upyx-v4-kpi,.upyx-v4-panel{background:var(--upyx-card);border:1px solid var(--upyx-border);border-radius:18px;box-shadow:var(--upyx-shadow);}
.upyx-v4-kpi{padding:24px;min-height:142px;}
.upyx-v4-kpi span{display:block;font-size:16px;color:#0f172a;margin-bottom:14px;}
.upyx-v4-kpi strong{display:block;font-size:32px;color:var(--upyx-blue);line-height:1;margin-bottom:16px;}
.upyx-v4-kpi small{color:#334155;font-size:14px;}
.upyx-v4-progress{height:10px;border-radius:999px;background:#e8edf4;overflow:hidden;margin-bottom:14px;}
.upyx-v4-progress i{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,var(--upyx-blue),#2f80ff);}
.upyx-v4-dashboard-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.78fr);gap:24px;margin-bottom:24px;}
.upyx-v4-panel{padding:26px;}
.upyx-v4-panel h2{font-size:20px;margin:0 0 22px;color:#0f172a;}
.upyx-v4-panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px;}
.upyx-v4-panel-head h2{margin:0;}
.upyx-v4-light-btn{background:#fff!important;color:#0f172a!important;border:1px solid var(--upyx-border)!important;border-radius:10px!important;padding:9px 12px!important;margin:0!important;box-shadow:none!important;}
.upyx-v4-domain-row{display:grid;grid-template-columns:150px minmax(0,1fr) 50px;align-items:center;gap:16px;margin:16px 0;font-size:15px;}
.upyx-v4-domain-row div{height:10px;background:#e8edf4;border-radius:999px;overflow:hidden;}
.upyx-v4-domain-row i{display:block;height:100%;background:linear-gradient(90deg,var(--upyx-blue),#2f80ff);border-radius:999px;}
.upyx-v4-domain-row strong{color:var(--upyx-blue);text-align:right;}
.upyx-v4-money-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 0;font-size:16px;}
.upyx-v4-money-row strong{font-size:18px;color:#0f172a;}
.upyx-v4-money-row .positive,.positive{color:var(--upyx-green)!important;}
.upyx-v4-modules-panel .module-status-grid{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;gap:16px!important;margin:0!important;}
.upyx-v4-module-card{display:flex!important;flex-direction:column;align-items:flex-start!important;justify-content:center;gap:10px;background:#fff!important;color:#0f172a!important;border:1px solid var(--upyx-border)!important;border-radius:16px!important;min-height:96px;padding:18px!important;text-align:left!important;margin:0!important;box-shadow:none!important;}
.upyx-v4-module-card:hover{border-color:rgba(11,107,255,.45)!important;box-shadow:0 12px 26px rgba(11,107,255,.08)!important;filter:none!important;}
.upyx-v4-module-card span{font-size:18px;font-weight:800;}
.upyx-v4-module-card strong{font-size:14px;color:#5b6b81;}
.upyx-v4-activity-list .project-item{border:0!important;border-top:1px solid var(--upyx-border)!important;border-radius:0!important;background:#fff!important;padding:14px 0!important;box-shadow:none!important;}
.upyx-v4-hidden-dashboard-compat{display:none!important;}
footer{display:none!important;}
.upyx-v4-popover-overlay{position:fixed;inset:0;background:transparent;display:none;z-index:1090;}
.upyx-v4-project-popover,.upyx-v4-notification-panel{position:fixed;top:78px;background:#fff;border:1px solid var(--upyx-border);border-radius:18px;box-shadow:0 24px 60px rgba(15,23,42,.20);z-index:1100;display:none;}
.upyx-v4-project-popover{left:330px;width:430px;padding:16px;}
.upyx-v4-notification-panel{right:88px;width:360px;padding:16px;}

.upyx-v4-popover-overlay.visible{
display:block;
}

.upyx-v4-project-popover.visible,
.upyx-v4-notification-panel.visible{
display:block;
}

.upyx-v4-popover-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;}
.upyx-v4-popover-head strong{font-size:18px;}
.upyx-v4-popover-head button{background:#f1f5f9!important;color:#0f172a!important;border:0!important;border-radius:10px!important;width:32px;height:32px;padding:0!important;margin:0!important;}
#headerProjectSearch{width:100%;text-align:left!important;margin:0 0 12px!important;border-radius:12px!important;}
.upyx-v4-project-list{max-height:290px;overflow:auto;display:grid;gap:8px;}
.upyx-v4-project-option{width:100%;background:#fff!important;color:#0f172a!important;border:1px solid var(--upyx-border)!important;border-radius:12px!important;padding:12px!important;margin:0!important;text-align:left!important;box-shadow:none!important;}
.upyx-v4-project-option:hover{border-color:var(--upyx-blue)!important;background:#f8fbff!important;filter:none!important;}
.upyx-v4-project-option strong{display:block;font-size:15px;}
.upyx-v4-project-option small{display:block;color:#64748b;margin-top:3px;}
.upyx-v4-project-empty{padding:20px;border:1px dashed var(--upyx-border);border-radius:12px;color:#64748b;text-align:center;}
.upyx-v4-popover-actions{display:flex;gap:8px;border-top:1px solid var(--upyx-border);padding-top:12px;margin-top:12px;}
.upyx-v4-popover-actions button{flex:1;margin:0!important;background:var(--upyx-blue)!important;border-radius:12px!important;}
.upyx-v4-popover-actions button.secondary{background:#eef2f7!important;color:#0f172a!important;}
.upyx-v4-notification-item{display:flex;gap:12px;align-items:flex-start;padding:12px;border:1px solid var(--upyx-border);border-radius:12px;}
.upyx-v4-notification-item strong{display:block;}
.upyx-v4-notification-item small{display:block;color:#64748b;margin-top:4px;line-height:1.35;}
/* Recolor progress/jauges vers bleu sans toucher aux statuts métier */
.progress-fill,.progress-track .progress-fill{background:linear-gradient(90deg,var(--upyx-blue),#2f80ff)!important;}
.kpi strong,.summary-card.money strong{color:var(--upyx-blue)!important;}
@media(max-width:980px){
  .upyx-v4-header:not([data-ux-header]){height:auto;position:relative;}
  .upyx-v4-header-inner:not([data-ux-header]){padding:16px;flex-direction:column;align-items:stretch;}
  .upyx-v4-project-switcher:not([data-ux-header]){min-width:0;max-width:none;width:100%;}
  .upyx-v4-header-actions:not([data-ux-header]){margin-left:0;justify-content:flex-end;}
  .side-menu{position:relative!important;top:0!important;height:auto!important;}
  .upyx-v4-side-brand{display:none!important;}
  .foundation-nav{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));padding:12px!important;}
  .nav-sub{display:none!important;}
  .upyx-v4-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
  .upyx-v4-dashboard-grid{grid-template-columns:1fr;}
  .upyx-v4-project-popover{left:12px;right:12px;width:auto;top:76px;}
  .upyx-v4-notification-panel{left:12px;right:12px;width:auto;top:140px;}
}
@media(max-width:560px){.upyx-v4-kpis{grid-template-columns:1fr}.upyx-v4-domain-row{grid-template-columns:1fr}.upyx-v4-domain-row strong{text-align:left}.upyx-v4-page-head{flex-direction:column}.upyx-v4-primary{width:100%;}}


/* === SPRINT 001.1 — Header branding + sidebar navigation pure === */
.upyx-v4-header-inner:not([data-ux-header]){
  padding:0 24px!important;
  justify-content:space-between!important;
}
.upyx-v4-brand:not([data-ux-header]){
  width:282px;
  min-width:282px;
  height:100%;
  display:flex;
  align-items:center;
}
.upyx-v4-brand-logo:not([data-ux-header]){
  width:232px;
  max-width:232px;
  height:auto;
  display:block;
}
.upyx-v4-project-switcher:not([data-ux-header]){
  margin-right:auto;
}
.upyx-v4-side-brand{
  display:none!important;
}
.side-menu{
  padding-top:28px!important;
}
.foundation-nav{
  margin-top:0!important;
}
@media(max-width:900px){
  .upyx-v4-header-inner:not([data-ux-header]){
    padding:16px!important;
    gap:14px!important;
  }
  .upyx-v4-brand:not([data-ux-header]){
    width:auto;
    min-width:0;
    height:auto;
  }
  .upyx-v4-brand-logo:not([data-ux-header]){
    width:190px;
    max-width:70vw;
  }
  .upyx-v4-project-switcher:not([data-ux-header]){
    margin-right:0;
  }
  .side-menu{
    padding-top:18px!important;
  }
}


/* =========================================================
   SPRINT 001.2 — Mockup validé : header logo pleine hauteur
   + surbrillance bleue des sous-menus sélectionnés
========================================================= */
.upyx-v4-header:not([data-ux-header]){
  height:106px!important;
}
.upyx-v4-header-inner:not([data-ux-header]){
  min-height:106px!important;
}
.upyx-v4-brand:not([data-ux-header]){
  width:360px!important;
  min-width:360px!important;
  height:100%!important;
  display:flex!important;
  align-items:center!important;
}
.upyx-v4-brand-logo:not([data-ux-header]){
  height:92px!important;
  width:auto!important;
  max-width:340px!important;
  display:block!important;
  object-fit:contain!important;
}
.side-menu{
  top:106px!important;
  height:calc(100vh - 106px)!important;
  padding-top:28px!important;
}
.upyx-v4-project-switcher:not([data-ux-header]){
  min-width:360px!important;
}
.nav-sub button{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  width:100%!important;
  min-height:38px!important;
  padding:9px 12px!important;
  border:1px solid transparent!important;
  transition:background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease!important;
}
.nav-sub button:hover{
  background:rgba(11,107,255,.12)!important;
  border-color:rgba(47,128,255,.22)!important;
}
.nav-sub button.active-sub,
.accordion-nav .nav-sub:not(.nav-sub-section) button.active-sub{
  background:linear-gradient(135deg, rgba(11,107,255,.34), rgba(11,107,255,.18))!important;
  color:#ffffff!important;
  font-weight:900!important;
  border:1px solid rgba(47,128,255,.42)!important;
  box-shadow:0 10px 22px rgba(11,107,255,.20), inset 4px 0 0 #2f80ff!important;
  padding-left:16px!important;
}
.accordion-nav .nav-sub:not(.nav-sub-section) button.active-sub::before{
  background:#2f80ff!important;
  box-shadow:0 0 0 4px rgba(47,128,255,.18)!important;
}
.nav-block.open > .menu-btn{
  box-shadow:0 12px 28px rgba(11,107,255,.26)!important;
}
@media(max-width:980px){
  .upyx-v4-header:not([data-ux-header]){height:auto!important;}
  .upyx-v4-header-inner:not([data-ux-header]){min-height:0!important;}
  .upyx-v4-brand:not([data-ux-header]){width:auto!important;min-width:0!important;height:auto!important;}
  .upyx-v4-brand-logo:not([data-ux-header]){height:66px!important;max-width:240px!important;}
  .upyx-v4-project-switcher:not([data-ux-header]){min-width:0!important;}
  .side-menu{top:0!important;height:auto!important;}
}

/* =========================================================
   Styles migrés depuis index.html
   Objectif V4 : aucun CSS inline dans le HTML.
========================================================= */
/* Migrated from index.html — alpha26-3d-menuiseries-style */
.smart-prep{border:1px solid rgba(230,126,34,.35);background:rgba(255,248,235,.92);border-radius:18px;padding:16px;margin:14px 0 18px;}
.smart-prep h3{margin-top:0;}
.menu-prep-groups{display:grid;grid-template-columns:1fr;gap:14px;}
.prep-group{background:rgba(255,255,255,.78);border:1px solid rgba(230,126,34,.18);border-radius:16px;padding:14px;}
.prep-group h4{margin:0 0 10px;font-size:.98rem;color:#111;}
.material-row{display:grid;grid-template-columns:1.2fr 1fr;gap:16px;align-items:end;}
.checkbox-line{display:flex!important;align-items:center;gap:10px;font-weight:700;}
.checkbox-line input{width:20px!important;height:20px!important;}
#menuPrepTotalAuto{font-weight:900;color:#ef7d00;background:#fff;}
.coherence-box{border-radius:14px;padding:12px 14px;margin:14px 0 0;font-weight:700;}
.coherence-box.warning{background:#fff4e5;color:#8a4b00;border:1px solid rgba(230,126,34,.35);}
.coherence-box.ok{background:#eaf7ef;color:#146c2e;border:1px solid rgba(20,108,46,.25);}
.table-wrap{margin-top:14px;overflow:auto;border-radius:18px;}
#menuiseriesTable{width:100%;border-collapse:collapse;}
#menuiseriesTable th{background:#000;color:#fff;padding:14px 12px;text-align:left;}
#menuiseriesTable td{padding:12px;border-bottom:1px solid rgba(0,0,0,.08);}
#menuiseriesTable input,#menuiseriesTable select{width:100%;}
#menuiseriesTable .surface-cell{font-weight:800;color:#ef7d00;text-align:right;}
.primary-btn{background:#ef7d00;color:#fff;border:0;border-radius:14px;padding:12px 18px;font-weight:800;cursor:pointer;}
.primary-btn:hover{filter:brightness(.95);}
body.menu-same-material .menu-material-col,
body.menu-same-material #menuiseriesTable td.menu-material-cell{display:none;}
@media(max-width:900px){.material-row{grid-template-columns:1fr}}

/* Migrated from index.html — alpha26-4-quantitatifs-style */
.quantitatifs-smart{border:1px solid rgba(230,126,34,.35);background:rgba(255,248,235,.92);border-radius:18px;padding:16px;margin:14px 0 18px;}
.quantitatifs-smart h3{margin-top:0;}
.quant-source-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.quant-source{background:rgba(255,255,255,.82);border:1px solid rgba(230,126,34,.18);border-radius:14px;padding:12px;font-weight:800;display:flex;flex-direction:column;gap:4px;}
.quant-source strong{font-size:.82rem;color:#ef7d00;}
.quant-source.ok strong{color:#14803a;}
.quant-source.warn strong{color:#a15c00;}
.coherence-box{border-radius:14px;padding:12px 14px;margin:14px 0 0;font-weight:700;}
.coherence-box.warning{background:#fff4e5;color:#8a4b00;border:1px solid rgba(230,126,34,.35);}
.coherence-box.ok{background:#eaf7ef;color:#146c2e;border:1px solid rgba(20,108,46,.25);}
.quant-details{margin-top:18px;}
.quant-details details{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:16px;margin:12px 0;padding:0;overflow:hidden;}
.quant-details summary{cursor:pointer;font-weight:900;padding:16px 18px;list-style:none;display:flex;align-items:center;justify-content:space-between;}
.quant-details summary::after{content:"+";color:#ef7d00;font-size:1.4rem;}
.quant-details details[open] summary::after{content:"−";}
.quant-accordion{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:16px;margin:12px 0;overflow:hidden;}
.quant-acc-btn{width:100%;background:#fff;border:0;padding:16px 18px;font-weight:900;font-size:1rem;text-align:left;display:flex;justify-content:space-between;cursor:pointer;}
.quant-acc-btn span{color:#ef7d00;font-size:1.4rem;}
.quant-acc-content{display:none;padding:0 18px 16px;}
.quant-accordion.open .quant-acc-content{display:block;}
.quant-actions{display:flex;gap:12px;margin-top:18px;}
.quant-actions button,.quant-actions .primary-btn{border-radius:14px;padding:12px 18px;font-weight:800;border:1px solid rgba(0,0,0,.12);background:#fff;cursor:pointer;}
.quant-actions .primary-btn{background:#ef7d00;color:#fff;border-color:#ef7d00;}
@media(max-width:1100px){.quant-source-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:700px){.quant-source-grid{grid-template-columns:1fr}.quant-actions{flex-direction:column}}

/* Migrated from index.html — alpha26-6-chiffrage-style */
.devis-smart{border:1px solid rgba(230,126,34,.35);background:rgba(255,248,235,.92);border-radius:18px;padding:16px;margin:14px 0 18px;}
.devis-smart h3{margin-top:0;}
.devis-status-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.devis-status{background:rgba(255,255,255,.82);border:1px solid rgba(230,126,34,.18);border-radius:14px;padding:12px;font-weight:800;display:flex;flex-direction:column;gap:4px;}
.devis-status strong{color:#ef7d00;font-size:.95rem;}
.coherence-box{border-radius:14px;padding:12px 14px;margin:14px 0 0;font-weight:700;}
.coherence-box.warning{background:#fff4e5;color:#8a4b00;border:1px solid rgba(230,126,34,.35);}
.coherence-box.ok{background:#eaf7ef;color:#146c2e;border:1px solid rgba(20,108,46,.25);}
.devis-detected,.devis-commerce{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:18px;padding:16px;margin:16px 0;}
.devis-detected h3,.devis-commerce h3{margin-top:0;}
.devis-detected-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.devis-detected-grid div{background:rgba(0,0,0,.035);border-radius:12px;padding:10px 12px;font-weight:700;display:flex;justify-content:space-between;gap:10px;}
.devis-detected-grid strong{color:#ef7d00;white-space:nowrap;}
.devis-result-premium{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:18px 0;}
.devis-result-premium div{background:#fff;color:#1f2937;border:1px solid rgba(0,0,0,.08);border-radius:18px;padding:18px;box-shadow:0 8px 20px rgba(0,0,0,.06);}
.devis-result-premium small{display:block;color:#6b7280;font-size:.9rem;margin-bottom:6px;}
.devis-result-premium strong{display:block;color:#ef7d00;font-size:1.9rem;font-weight:800;}
.devis-technical-details{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:18px;margin-top:18px;overflow:hidden;}
.devis-technical-details summary{cursor:pointer;font-weight:900;padding:16px 18px;list-style:none;display:flex;justify-content:space-between;}
.devis-technical-details summary::after{content:"+";color:#ef7d00;font-size:1.4rem;}
.devis-technical-details[open] summary::after{content:"−";}
.devis-technical-details .table-box,.devis-technical-details .toolbar{margin:0 16px 16px;}
@media(max-width:1100px){.devis-status-grid,.devis-detected-grid,.devis-result-premium{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:700px){.devis-status-grid,.devis-detected-grid,.devis-result-premium{grid-template-columns:1fr;}}

/* Migrated from index.html — alpha26-9-bibliotheque-corrigee-style */
.coherence-box{border-radius:14px;padding:12px 14px;margin:14px 0 0;font-weight:700;}
.coherence-box.warning{background:#fff4e5;color:#8a4b00;border:1px solid rgba(230,126,34,.35);}
.coherence-box.ok{background:#eaf7ef;color:#146c2e;border:1px solid rgba(20,108,46,.25);}
.bibliotheque-rubriques{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0;}
.rubrique-chip{border:1px solid rgba(0,0,0,.10);background:#fff;border-radius:999px;padding:9px 12px;font-weight:800;cursor:pointer;}
.rubrique-chip.active{background:#ef7d00;color:#fff;border-color:#ef7d00;}
.bibliotheque-tools{display:grid;grid-template-columns:2fr 1fr;gap:14px;background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:18px;padding:16px;margin:16px 0;}
.bibliotheque-table-wrap{margin-top:14px;overflow:auto;border-radius:18px;}
#tablePrix:not(.ux-table){width:100%;border-collapse:collapse;}
#tablePrix:not(.ux-table) th{background:#000;color:#fff;padding:14px 12px;text-align:left;}
#tablePrix:not(.ux-table) td{padding:12px;border-bottom:1px solid rgba(0,0,0,.08);}
#tablePrix:not(.ux-table) input,#tablePrix:not(.ux-table) select{width:100%;}
.pricePoste{font-weight:800;}
@media(max-width:1000px){.bibliotheque-tools{grid-template-columns:1fr;}}

/* Migrated from index.html — alpha26-9-1-chip-fix */
.rubrique-chip{min-width:auto!important;padding-left:14px!important;padding-right:14px!important;white-space:nowrap;}
.bibliotheque-rubriques{align-items:center;}

/* Migrated from index.html — alpha26-9-3-rubriques-lisibles */
.bibliotheque-rubriques{display:none!important;}
.bibliotheque-rubriques-panel{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:22px;padding:18px;margin:18px 0;box-shadow:0 10px 28px rgba(0,0,0,.04);}
.rubriques-panel-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;}
.rubriques-panel-head h3{margin:0;color:#111827;font-size:1.15rem;font-weight:900;}
.rubriques-panel-head p{margin:4px 0 0;color:#6b7280;font-weight:600;}
.rubrique-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.rubrique-card{min-height:58px;width:100%!important;border:1px solid rgba(0,0,0,.10)!important;background:#fff!important;color:#111827!important;border-radius:18px!important;padding:12px 14px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;font-weight:900!important;cursor:pointer;box-shadow:0 6px 16px rgba(0,0,0,.03);}
.rubrique-card .rubrique-ico{font-size:1.2rem;line-height:1;flex:0 0 auto;color:#ef7d00;}
.rubrique-card.active .rubrique-ico{color:#fff;}
.material-symbols-rounded.rubrique-ico,.material-symbols-rounded.upyx-module-icon,.devis-status-icon{font-family:"Material Symbols Rounded";font-weight:500;font-style:normal;font-size:22px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased;font-feature-settings:"liga";}
.rubrique-card .rubrique-label{display:inline!important;white-space:normal!important;text-align:left!important;line-height:1.15;}
.rubrique-card.active{background:#ef7d00!important;color:#fff!important;border-color:#ef7d00!important;box-shadow:0 10px 24px rgba(239,125,0,.22);}
@media(max-width:1100px){.rubrique-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.rubriques-panel-head{flex-direction:column;align-items:stretch;}}
@media(max-width:700px){.rubrique-grid{grid-template-columns:1fr;}.rubrique-card{min-height:52px;}}

/* Migrated from index.html — alpha26-9-4-sans-popup-sauvegarde */
.biblio-save-status{
  position:fixed;
  right:28px;
  bottom:28px;
  z-index:9999;
  background:#111;
  color:#fff;
  border-radius:16px;
  padding:12px 18px;
  font-weight:800;
  box-shadow:0 12px 32px rgba(0,0,0,.22);
  opacity:0;
  transform:translateY(12px);
  pointer-events:none;
  transition:opacity .2s ease, transform .2s ease;
}
.biblio-save-status.visible{
  opacity:1;
  transform:translateY(0);
}

/* Migrated from index.html — alpha26-9-5-bibliotheque-multifiltres */
.biblio-filtres-actifs:not(.ux-data-toolbar__filters){
  margin-top:10px;
  padding:10px 14px;
  border-radius:14px;
  background:#fff7ed;
  border:1px solid rgba(239,125,0,.25);
  color:#9a4a00;
  font-weight:900;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.rubrique-card.active{
  background:#ef7d00!important;
  color:#fff!important;
  border-color:#ef7d00!important;
  box-shadow:0 10px 24px rgba(239,125,0,.22)!important;
}
.rubrique-card:not(.active){
  background:#fff!important;
  color:#111827!important;
}

/* Migrated from index.html — alpha26-9-6-checkbox-cards */
.biblio-rubrique-check{
  position:absolute!important;
  opacity:0!important;
  pointer-events:none!important;
}
.rubrique-card{
  position:relative;
  user-select:none;
}
.rubrique-card.active,
.rubrique-card:has(.biblio-rubrique-check:checked){
  background:#ef7d00!important;
  color:#fff!important;
  border-color:#ef7d00!important;
  box-shadow:0 10px 24px rgba(239,125,0,.22)!important;
}
.rubrique-card:not(.active):not(:has(.biblio-rubrique-check:checked)){
  background:#fff!important;
  color:#111827!important;
}
.rubrique-card:has(.biblio-rubrique-check:checked)::after{
  content:"✓";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  width:22px;
  height:22px;
  border-radius:999px;
  background:rgba(255,255,255,.25);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
}
.biblio-filtres-actifs:not(.ux-data-toolbar__filters){
  min-height:42px;
  padding:10px 14px;
  border-radius:14px;
  background:#fff7ed;
  border:1px solid rgba(239,125,0,.25);
  color:#9a4a00;
  font-weight:900;
  display:flex;
  align-items:center;
}

/* Migrated from index.html — alpha30-menu-compact-propre */
.app-settings-removed{display:none!important;}
.app-menu-button,
.upyx-v4-menu-button{font-size:1.45rem!important;line-height:1!important;width:40px!important;height:40px!important;border-radius:14px!important;cursor:pointer!important;position:relative!important;z-index:9200!important;}
.compact-app-menu-overlay{display:none;position:fixed;inset:0;z-index:9100;background:transparent;}
.compact-app-menu-overlay.visible{display:block;}
.compact-app-menu{display:none;position:fixed;right:24px;top:76px;z-index:9201;width:250px;background:#fff;border:1px solid rgba(15,23,42,.12);border-radius:16px;box-shadow:0 18px 48px rgba(15,23,42,.20);padding:8px;}
.compact-app-menu.visible{display:block;}
.compact-app-menu button{width:100%;border:0;background:transparent;color:#111827;text-align:left;border-radius:11px;padding:11px 12px;font-weight:850;cursor:pointer;font-size:.95rem;}
.compact-app-menu button:hover{background:#f5f6f8;}
.compact-app-menu button.danger{color:#991b1b;}
.compact-menu-separator{height:1px;background:#edf0f3;margin:6px 4px;}
.compact-app-modal{position:fixed;inset:0;z-index:9300;background:rgba(15,23,42,.28);align-items:center;justify-content:center;padding:20px;}
.compact-app-modal-card{width:min(560px,96vw);max-height:82vh;overflow:auto;background:#fff;border-radius:20px;box-shadow:0 24px 80px rgba(15,23,42,.28);border:1px solid rgba(15,23,42,.10);}
.compact-app-modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #edf0f3;}
.compact-app-modal-head h2{margin:0;font-size:1.25rem;color:#111827;}
.compact-app-modal-close{border:0;background:#f3f4f6;color:#111827;border-radius:12px;width:36px;height:36px;font-size:1.35rem;cursor:pointer;}
.compact-app-modal-content{padding:16px 20px 20px;}
.compact-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:13px 0;border-bottom:1px solid #edf0f3;}
.compact-row strong{display:block;color:#111827;}
.compact-row small{display:block;color:#6b7280;font-weight:700;margin-top:3px;}
.compact-row span{font-weight:850;color:#111827;text-align:right;}
.compact-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px;}
.compact-actions button,.compact-backup-row button{border:0;border-radius:12px;background:#ef7d00;color:#fff;font-weight:900;padding:10px 15px;cursor:pointer;}
.compact-actions button.secondary{background:#fff;color:#111827;border:1px solid #dbe2ea;}
.compact-backup-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid #edf0f3;}
.compact-backup-row strong{display:block;color:#111827;}
.compact-backup-row small{display:block;color:#6b7280;font-weight:700;margin-top:3px;}
.compact-empty{padding:14px 0;color:#6b7280;font-weight:850;}
@media(max-width:700px){
  .compact-app-menu{right:12px;top:66px;width:calc(100vw - 24px);}
  .compact-row,.compact-backup-row{flex-direction:column;align-items:stretch;}
  .compact-row span{text-align:left;}
  .compact-actions button,.compact-backup-row button{width:100%;}
}

/* Migrated from index.html — alpha30-1-drawer */
.compact-app-modal{
 display:none;
 position:fixed;
 top:0; right:0; left:auto; bottom:0;
 background:transparent!important;
 padding:0!important;
 z-index:9300;
 align-items:stretch!important;
 justify-content:flex-end!important;
}
.compact-app-modal-card{
 width:min(520px,100vw)!important;
 height:100vh!important;
 max-height:100vh!important;
 border-radius:0!important;
 margin-left:auto!important;
 animation:slideInDrawer .22s ease-out;
 overflow:auto!important;
}
@keyframes slideInDrawer{
 from{transform:translateX(100%);}
 to{transform:translateX(0);}
}
.compact-app-modal-head{
 position:sticky;top:0;background:#fff;z-index:2;
}

/* =========================================================
   Shell V4 — Clean Shell Layer
   Rôle : header, sidebar, layout, navigation et responsive.
   Cette couche est volontairement placée en fin de fichier pour
   neutraliser les anciennes règles Alpha sans modifier le métier.
========================================================= */
:root{
  --upyx-black:#05070b;
  --upyx-panel:#0b1220;
  --upyx-panel-soft:#111827;
  --upyx-blue:#2563eb;
  --upyx-blue-soft:#dbeafe;
  --upyx-bg:#f3f5f8;
  --upyx-card:#ffffff;
  --upyx-text:#111827;
  --upyx-muted:#6b7280;
  --upyx-border:#e5e7eb;
  --upyx-radius:22px;
  --upyx-shadow:0 14px 36px rgba(15,23,42,.08);
}

body{
  margin:0;
  background:var(--upyx-bg);
  color:var(--upyx-text);
}

.upyx-v4-header:not([data-ux-header]){
  background:var(--upyx-black);
  border-bottom:0;
  color:#fff;
  min-height:104px;
}

.upyx-v4-header-inner:not([data-ux-header]){
  width:100%;
  min-height:104px;
  padding:12px 24px;
  display:grid;
  grid-template-columns:minmax(220px,340px) minmax(280px,1fr) auto;
  gap:22px;
  align-items:center;
}

.upyx-v4-brand:not([data-ux-header]){
  height:80px;
  display:flex;
  align-items:center;
  overflow:hidden;
}

.upyx-v4-brand-logo:not([data-ux-header]){
  height:100%;
  width:auto;
  max-width:320px;
  object-fit:contain;
  display:block;
}

.upyx-v4-project-switcher:not([data-ux-header]){
  min-height:64px;
  max-width:520px;
  padding:10px 14px;
  display:flex;
  align-items:center;
  gap:12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  cursor:pointer;
}

.upyx-v4-project-switcher:not([data-ux-header]):hover{
  background:rgba(255,255,255,.09);
}

.upyx-v4-project-icon{
  width:38px;
  height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:13px;
  background:rgba(37,99,235,.18);
  color:#93c5fd;
}

.upyx-v4-project-switcher:not([data-ux-header]) strong{
  display:block;
  font-size:1rem;
  line-height:1.15;
}

.upyx-v4-project-switcher:not([data-ux-header]) small{
  display:block;
  color:#cbd5e1;
  margin-top:3px;
  font-weight:700;
}

.upyx-v4-project-chevron{
  margin-left:auto;
  color:#cbd5e1;
}

.upyx-v4-header-actions:not([data-ux-header]){
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}

.upyx-v4-env-badge{
  height:44px;
  padding:6px 12px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border-radius:14px;
  background:rgba(37,99,235,.16);
  border:1px solid rgba(147,197,253,.22);
  color:#dbeafe;
  font-size:.78rem;
  line-height:1.1;
}

.upyx-v4-env-badge strong{
  color:#60a5fa;
  font-size:.8rem;
}

.upyx-v4-notification,
.upyx-v4-menu-button{
  width:44px;
  height:44px;
  margin:0;
  padding:0;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  color:#fff;
  position:relative;
}

.upyx-v4-notification span{
  position:absolute;
  top:-6px;
  right:-6px;
  min-width:19px;
  height:19px;
  padding:0 5px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background:var(--upyx-blue);
  color:#fff;
  font-size:.7rem;
  font-weight:900;
}


.side-menu{
  position:sticky;
  top:24px;
  height:calc(100vh - 48px);
  overflow:auto;
  background:var(--upyx-black);
  color:#fff;
  border-radius:26px;
  padding:16px;
  box-shadow:var(--upyx-shadow);
}

.side-brand,
.sidebar-logo,
.side-logo,
.side-subtitle{
  display:none;
}

.foundation-nav,
.accordion-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.nav-block{
  border-radius:18px;
}

.menu-btn{
  width:100%;
  min-height:46px;
  margin:0;
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:10px;
  text-align:left;
  border-radius:15px;
  background:transparent;
  border:1px solid transparent;
  color:#e5e7eb;
  font-weight:850;
}

.menu-btn:hover{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.12);
  transform:none;
}

.menu-btn.active{
  background:rgba(37,99,235,.22);
  border-color:rgba(96,165,250,.36);
  color:#fff;
  box-shadow:inset 4px 0 0 var(--upyx-blue);
}

.nav-sub{
  margin:6px 0 10px 12px;
  padding-left:12px;
  border-left:1px solid rgba(255,255,255,.10);
}

.nav-sub button{
  width:100%;
  min-height:38px;
  margin:3px 0;
  padding:9px 12px;
  display:flex;
  align-items:center;
  gap:8px;
  text-align:left;
  border-radius:12px;
  background:transparent;
  color:#cbd5e1;
  border:1px solid transparent;
  font-weight:800;
}

.nav-sub button:hover{
  background:rgba(255,255,255,.07);
  color:#fff;
}

.nav-sub button.active-sub{
  background:rgba(37,99,235,.28);
  color:#fff;
  border-color:rgba(96,165,250,.32);
  box-shadow:inset 3px 0 0 var(--upyx-blue);
}

.nav-sub-section{
  margin:12px 0 4px 12px;
  padding-left:0;
  border-left:0;
  color:#94a3b8;
  font-size:.76rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}


.card{
  background:var(--upyx-card);
  border:1px solid var(--upyx-border);
  border-radius:var(--upyx-radius);
  box-shadow:var(--upyx-shadow);
}

.progress-fill,
.biblio-progress-bar{
  background:var(--upyx-blue);
}

@media(max-width:900px){
  .upyx-v4-header-inner:not([data-ux-header]){
    min-height:auto;
    padding:12px 14px;
    grid-template-columns:1fr auto;
    gap:12px;
  }

  .upyx-v4-brand:not([data-ux-header]){
    height:58px;
  }

  .upyx-v4-project-switcher:not([data-ux-header]){
    grid-column:1/-1;
    max-width:none;
    min-height:56px;
    order:3;
  }

  .upyx-v4-env-badge{
    display:none;
  }


  .side-menu{
    position:relative;
    top:0;
    height:auto;
    border-radius:22px;
    padding:12px;
  }

  .foundation-nav{
    gap:6px;
  }

  .nav-block.open .nav-sub{
    display:block;
  }

  .nav-sub{
    margin-left:8px;
  }
}

@media(max-width:560px){
  .upyx-v4-header-inner:not([data-ux-header]){
    grid-template-columns:1fr auto;
  }

  .upyx-v4-brand:not([data-ux-header]){
    height:48px;
  }

  .upyx-v4-header-actions:not([data-ux-header]){
    gap:6px;
  }

  .upyx-v4-notification,
  .upyx-v4-menu-button{
    width:40px;
    height:40px;
    border-radius:12px;
  }
}


/* =========================================================
   SPRINT 002.001 — Header V4 propre + logo web optimisé
   Objectif : supprimer le bloc carré, rendre le logo visible,
   stabiliser le header sans toucher au métier.
========================================================= */
.upyx-v4-header:not([data-ux-header]){
  height:96px!important;
  min-height:96px!important;
  background:linear-gradient(135deg,#05070b 0%,#07111f 68%,#081827 100%)!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  box-shadow:0 10px 28px rgba(2,6,23,.18)!important;
  position:sticky!important;
  top:0!important;
  z-index:1000!important;
}

.upyx-v4-header-inner:not([data-ux-header]){
  height:96px!important;
  min-height:96px!important;
  padding:0 24px!important;
  display:grid!important;
  grid-template-columns:260px minmax(320px,1fr) 260px!important;
  align-items:center!important;
  gap:20px!important;
}

.upyx-v4-brand:not([data-ux-header]){
  width:260px!important;
  height:86px!important;
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  overflow:visible!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  margin:0!important;
}

.upyx-v4-brand-logo:not([data-ux-header]){
  width:auto!important;
  height:86px!important;
  max-width:240px!important;
  max-height:86px!important;
  object-fit:contain!important;
  display:block!important;
}

.upyx-v4-project-switcher:not([data-ux-header]){
  justify-self:center!important;
  width:min(520px,100%)!important;
  min-height:58px!important;
  padding:9px 14px!important;
}

.upyx-v4-header-actions:not([data-ux-header]){
  justify-self:end!important;
  align-self:center!important;
}


@media(max-width:900px){
  .upyx-v4-header:not([data-ux-header]){
    height:auto!important;
    min-height:0!important;
    position:relative!important;
  }
  .upyx-v4-header-inner:not([data-ux-header]){
    height:auto!important;
    min-height:0!important;
    padding:12px 14px!important;
    grid-template-columns:1fr auto!important;
  }
  .upyx-v4-brand:not([data-ux-header]){
    width:auto!important;
    height:64px!important;
  }
  .upyx-v4-brand-logo:not([data-ux-header]){
    height:64px!important;
    max-width:180px!important;
  }
  .upyx-v4-project-switcher:not([data-ux-header]){
    grid-column:1/-1!important;
    width:100%!important;
    justify-self:stretch!important;
  }
}

@media(max-width:560px){
  .upyx-v4-brand:not([data-ux-header]){height:52px!important;}
  .upyx-v4-brand-logo:not([data-ux-header]){height:52px!important;max-width:150px!important;}
}

/* =========================================================
   SPRINT 002.002 — Header lisible + projet centré + icônes menus
   Objectif : rendre l'identité Upyx visible, centrer le projet
   sur la page, restaurer les repères visuels des sous-menus.
========================================================= */
.upyx-v4-header:not([data-ux-header]){
  height:128px!important;
  min-height:128px!important;
  background:linear-gradient(135deg,#02060c 0%,#07111f 68%,#081827 100%)!important;
}

.upyx-v4-header-inner:not([data-ux-header]){
  height:128px!important;
  min-height:128px!important;
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding:0 28px!important;
  gap:20px!important;
}

.upyx-v4-brand:not([data-ux-header]){
  width:260px!important;
  height:118px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  overflow:visible!important;
  flex:0 0 260px!important;
}

.upyx-v4-brand-logo:not([data-ux-header]){
  height:112px!important;
  width:auto!important;
  max-width:250px!important;
  max-height:112px!important;
  object-fit:contain!important;
  object-position:left center!important;
  filter:drop-shadow(0 0 1px rgba(255,255,255,.70)) drop-shadow(0 0 12px rgba(37,99,235,.16))!important;
}

.upyx-v4-project-switcher:not([data-ux-header]){
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  width:min(560px,44vw)!important;
  max-width:560px!important;
  min-height:64px!important;
  z-index:2!important;
}

.upyx-v4-header-actions:not([data-ux-header]){
  margin-left:auto!important;
  flex:0 0 auto!important;
  z-index:3!important;
}

.nav-sub button{
  gap:10px!important;
  font-size:.96rem!important;
}

@media(max-width:1100px){
  .upyx-v4-project-switcher:not([data-ux-header]){
    width:min(500px,42vw)!important;
  }
  .upyx-v4-brand:not([data-ux-header]){
    width:220px!important;
    flex-basis:220px!important;
  }
  .upyx-v4-brand-logo:not([data-ux-header]){
    height:98px!important;
    max-width:210px!important;
  }
}

@media(max-width:900px){
  .upyx-v4-header:not([data-ux-header]){
    height:auto!important;
    min-height:0!important;
    position:relative!important;
  }
  .upyx-v4-header-inner:not([data-ux-header]){
    height:auto!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:1fr auto!important;
    padding:12px 14px!important;
  }
  .upyx-v4-brand:not([data-ux-header]){
    width:auto!important;
    height:74px!important;
    flex-basis:auto!important;
  }
  .upyx-v4-brand-logo:not([data-ux-header]){
    height:72px!important;
    max-width:170px!important;
  }
  .upyx-v4-project-switcher:not([data-ux-header]){
    position:static!important;
    transform:none!important;
    grid-column:1/-1!important;
    width:100%!important;
    max-width:none!important;
    justify-self:stretch!important;
  }
}

@media(max-width:560px){
  .upyx-v4-brand:not([data-ux-header]){height:64px!important;}
  .upyx-v4-brand-logo:not([data-ux-header]){height:62px!important;max-width:145px!important;}
}


/* =========================================================
   SPRINT 002.003 — Logo sur fond blanc + projet centré contenu + icônes V3
   Objectif : rendre l'identité Upyx lisible sans toucher au métier.
========================================================= */
:root{
  --upyx-sidebar-w:302px;
  --upyx-header-h:128px;
}

.upyx-v4-header:not([data-ux-header]){
  height:var(--upyx-header-h)!important;
  min-height:var(--upyx-header-h)!important;
  background:linear-gradient(135deg,#02060c 0%,#07111f 68%,#081827 100%)!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  box-shadow:0 10px 28px rgba(2,6,23,.18)!important;
}

.upyx-v4-header-inner:not([data-ux-header]){
  height:var(--upyx-header-h)!important;
  min-height:var(--upyx-header-h)!important;
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding:0 28px 0 0!important;
  gap:20px!important;
}

/* Logo : cartouche blanc pleine largeur de sidebar */
.upyx-v4-brand:not([data-ux-header]){
  width:var(--upyx-sidebar-w)!important;
  flex:0 0 var(--upyx-sidebar-w)!important;
  height:var(--upyx-header-h)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:14px 18px!important;
  margin:0!important;
  background:#ffffff!important;
  border-right:1px solid rgba(15,23,42,.08)!important;
  border-bottom:1px solid rgba(15,23,42,.08)!important;
  overflow:hidden!important;
  box-shadow:none!important;
}

.upyx-v4-brand-logo:not([data-ux-header]){
  width:100%!important;
  height:100%!important;
  max-width:266px!important;
  max-height:100px!important;
  object-fit:contain!important;
  object-position:center center!important;
  display:block!important;
  filter:none!important;
}

/* Projet : centré sur la zone contenu, pas sur la fenêtre complète */
.upyx-v4-project-switcher:not([data-ux-header]){
  position:absolute!important;
  left:calc(var(--upyx-sidebar-w) + ((100vw - var(--upyx-sidebar-w)) / 2))!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  width:min(560px,44vw)!important;
  max-width:560px!important;
  min-height:64px!important;
  z-index:2!important;
}

.upyx-v4-header-actions:not([data-ux-header]){
  margin-left:auto!important;
  flex:0 0 auto!important;
  z-index:3!important;
  padding-right:10px!important;
}

.side-menu{
  top:var(--upyx-header-h)!important;
  height:calc(100vh - var(--upyx-header-h))!important;
}

/* Icônes menus : rendu lisible et homogène */
.foundation-nav .menu-btn,
.foundation-nav .nav-sub button{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  line-height:1.2!important;
}
.foundation-nav .menu-btn{
  font-size:1.02rem!important;
}
.foundation-nav .nav-sub button{
  font-size:.94rem!important;
}
.foundation-nav .nav-sub-section{
  font-size:.78rem!important;
  font-weight:800!important;
  letter-spacing:.08em!important;
  opacity:.86!important;
}

@media(max-width:1100px){
  :root{--upyx-sidebar-w:286px;}
  .upyx-v4-brand:not([data-ux-header]){padding:14px 16px!important;}
  .upyx-v4-brand-logo:not([data-ux-header]){max-width:252px!important;max-height:96px!important;}
  .upyx-v4-project-switcher:not([data-ux-header]){width:min(500px,42vw)!important;}
}

@media(max-width:900px){
  :root{--upyx-header-h:auto;--upyx-sidebar-w:100%;}
  .upyx-v4-header:not([data-ux-header]){height:auto!important;min-height:0!important;position:relative!important;}
  .upyx-v4-header-inner:not([data-ux-header]){
    height:auto!important;min-height:0!important;
    display:grid!important;grid-template-columns:1fr auto!important;
    padding:12px 14px!important;gap:12px!important;
  }
  .upyx-v4-brand:not([data-ux-header]){
    width:220px!important;flex:0 0 auto!important;height:86px!important;
    border-radius:14px!important;border:1px solid rgba(15,23,42,.08)!important;
  }
  .upyx-v4-brand-logo:not([data-ux-header]){max-width:190px!important;max-height:70px!important;}
  .upyx-v4-project-switcher:not([data-ux-header]){
    position:static!important;transform:none!important;grid-column:1/-1!important;
    width:100%!important;max-width:none!important;justify-self:stretch!important;
  }
  .side-menu{position:relative!important;top:0!important;height:auto!important;}
}

@media(max-width:560px){
  .upyx-v4-brand:not([data-ux-header]){width:170px!important;height:70px!important;padding:10px!important;}
  .upyx-v4-brand-logo:not([data-ux-header]){max-width:150px!important;max-height:56px!important;}
}

/* =========================================================
   SPRINT 002.004 — Shell V4 validé
   Header bleu Upyx + identité visible + icônes menus V3.24
========================================================= */
:root{
  --upyx-sidebar-w:302px;
  --upyx-header-h:132px;
  --upyx-blue:#0b6bff;
  --upyx-blue-dark:#004ad6;
  --upyx-blue-light:#20b7ff;
}

.upyx-v4-header:not([data-ux-header]){
  height:var(--upyx-header-h)!important;
  min-height:var(--upyx-header-h)!important;
  background:
    radial-gradient(circle at 9% 22%, rgba(32,183,255,.38) 0, rgba(32,183,255,0) 28%),
    linear-gradient(135deg,#19b9ff 0%,#0b6bff 38%,#004ad6 100%)!important;
  border-bottom:1px solid rgba(255,255,255,.22)!important;
  box-shadow:0 14px 34px rgba(2,35,102,.24)!important;
  color:#fff!important;
}

.upyx-v4-header-inner:not([data-ux-header]){
  height:var(--upyx-header-h)!important;
  min-height:var(--upyx-header-h)!important;
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding:0 28px 0 0!important;
  gap:20px!important;
}

.upyx-v4-brand:not([data-ux-header]){
  width:420px!important;
  flex:0 0 420px!important;
  height:var(--upyx-header-h)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:22px!important;
  padding:12px 24px!important;
  margin:0!important;
  background:transparent!important;
  border:0!important;
  border-right:1px solid rgba(255,255,255,.35)!important;
  box-shadow:none!important;
  overflow:visible!important;
}

.upyx-v4-brand-icon-wrap{
  width:110px!important;
  height:110px!important;
  flex:0 0 110px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:0 12px 30px rgba(0,39,112,.22)!important;
  overflow:hidden!important;
}

.upyx-v4-brand-icon{
  width:104px!important;
  height:104px!important;
  object-fit:contain!important;
  display:block!important;
}

.upyx-v4-brand-logo:not([data-ux-header]){display:none!important;}

.upyx-v4-brand-wording{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  line-height:1!important;
  color:#fff!important;
  text-shadow:0 2px 8px rgba(0,33,92,.25)!important;
}

.upyx-v4-brand-name{
  font-size:42px!important;
  line-height:.9!important;
  letter-spacing:.13em!important;
  font-weight:900!important;
  color:#fff!important;
}

.upyx-v4-brand-tagline{
  margin-top:8px!important;
  font-size:17px!important;
  line-height:1.05!important;
  letter-spacing:.02em!important;
  font-weight:700!important;
  color:#fff!important;
  white-space:nowrap!important;
}

.upyx-v4-brand-rule{
  width:100%!important;
  height:1px!important;
  margin:10px 0 9px!important;
  background:rgba(255,255,255,.72)!important;
}

.upyx-v4-brand-product{
  width:100%!important;
  text-align:center!important;
  font-size:20px!important;
  line-height:1!important;
  letter-spacing:.55em!important;
  font-weight:800!important;
  color:#fff!important;
  padding-left:.55em!important;
}

.upyx-v4-project-switcher:not([data-ux-header]){
  position:absolute!important;
  left:calc(var(--upyx-sidebar-w) + ((100vw - var(--upyx-sidebar-w)) / 2))!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  width:min(620px,42vw)!important;
  max-width:620px!important;
  min-height:74px!important;
  padding:14px 18px!important;
  background:rgba(0,72,220,.20)!important;
  border:1px solid rgba(255,255,255,.72)!important;
  border-radius:16px!important;
  box-shadow:0 18px 38px rgba(0,54,170,.16)!important;
  color:#fff!important;
  z-index:2!important;
}

.upyx-v4-project-switcher:not([data-ux-header]):hover{
  background:rgba(255,255,255,.10)!important;
  border-color:#fff!important;
}

.upyx-v4-project-icon{
  width:48px!important;
  height:48px!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.10)!important;
  border:1px solid rgba(255,255,255,.35)!important;
  color:#fff!important;
  font-size:22px!important;
}

.upyx-v4-project-switcher:not([data-ux-header]) strong{
  font-size:20px!important;
  color:#fff!important;
}

.upyx-v4-project-switcher:not([data-ux-header]) small{
  font-size:14px!important;
  color:rgba(255,255,255,.92)!important;
}

.upyx-v4-project-chevron{color:#fff!important;font-size:24px!important;}

.upyx-v4-header-actions:not([data-ux-header]){
  margin-left:auto!important;
  flex:0 0 auto!important;
  z-index:3!important;
  display:flex!important;
  align-items:center!important;
  gap:18px!important;
  padding-right:10px!important;
}

.upyx-v4-env-badge,
.upyx-v4-notification,
.upyx-v4-menu-button{
  border-color:rgba(255,255,255,.55)!important;
  background:rgba(0,72,220,.18)!important;
  color:#fff!important;
  box-shadow:none!important;
}


.side-menu{
  top:var(--upyx-header-h)!important;
  height:calc(100vh - var(--upyx-header-h))!important;
  background:linear-gradient(180deg,#06101d 0%,#071b2d 100%)!important;
}

.foundation-nav .menu-btn,
.foundation-nav .nav-sub button{
  display:flex!important;
  align-items:center!important;
  gap:14px!important;
  line-height:1.2!important;
}

.upyx-menu-ico{
  width:22px!important;
  min-width:22px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:20px!important;
  line-height:1!important;
  filter:none!important;
}

.foundation-nav .nav-sub .upyx-menu-ico{
  width:18px!important;
  min-width:18px!important;
  font-size:16px!important;
}

.foundation-nav .menu-btn span:last-child,
.foundation-nav .nav-sub button span:last-child{
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.foundation-nav .menu-btn::after{
  margin-left:auto!important;
}

@media(max-width:1180px){
  .upyx-v4-brand:not([data-ux-header]){width:360px!important;flex-basis:360px!important;gap:16px!important;padding-left:18px!important;}
  .upyx-v4-brand-icon-wrap{width:96px!important;height:96px!important;flex-basis:96px!important;}
  .upyx-v4-brand-icon{width:91px!important;height:91px!important;}
  .upyx-v4-brand-name{font-size:34px!important;}
  .upyx-v4-brand-tagline{font-size:14px!important;}
  .upyx-v4-brand-product{font-size:16px!important;}
  .upyx-v4-project-switcher:not([data-ux-header]){width:min(540px,40vw)!important;}
}

@media(max-width:900px){
  :root{--upyx-header-h:auto;--upyx-sidebar-w:100%;}
  .upyx-v4-header:not([data-ux-header]){height:auto!important;min-height:0!important;position:relative!important;}
  .upyx-v4-header-inner:not([data-ux-header]){
    height:auto!important;min-height:0!important;
    display:grid!important;grid-template-columns:1fr auto!important;
    padding:12px 14px!important;gap:12px!important;
  }
  .upyx-v4-brand:not([data-ux-header]){
    width:auto!important;flex:0 0 auto!important;height:86px!important;
    border-right:0!important;padding:0!important;gap:12px!important;
  }
  .upyx-v4-brand-icon-wrap{width:78px!important;height:78px!important;flex-basis:78px!important;}
  .upyx-v4-brand-icon{width:74px!important;height:74px!important;}
  .upyx-v4-brand-name{font-size:28px!important;}
  .upyx-v4-brand-tagline{font-size:12px!important;}
  .upyx-v4-brand-rule{margin:7px 0!important;}
  .upyx-v4-brand-product{font-size:14px!important;}
  .upyx-v4-project-switcher:not([data-ux-header]){
    position:static!important;transform:none!important;grid-column:1/-1!important;
    width:100%!important;max-width:none!important;justify-self:stretch!important;
  }
  .side-menu{position:relative!important;top:0!important;height:auto!important;}
}

@media(max-width:560px){
  .upyx-v4-brand-wording{display:none!important;}
  .upyx-v4-brand:not([data-ux-header]){height:70px!important;}
  .upyx-v4-brand-icon-wrap{width:64px!important;height:64px!important;flex-basis:64px!important;}
  .upyx-v4-brand-icon{width:60px!important;height:60px!important;}
}


/* =========================================================
   SPRINT 002.007 — Upyx Style officiel validé
   Référence : bloc logo blanc exactement aligné sidebar/header,
   header bleu, icônes Upyx propres dans les menus.
========================================================= */
:root{
  --upyx-sidebar-w:302px;
  --upyx-header-h:132px;
  --upyx-blue:#0864f7;
  --upyx-blue-dark:#004bd9;
  --upyx-blue-light:#20b7ff;
}

.upyx-v4-header:not([data-ux-header]){
  height:var(--upyx-header-h)!important;
  min-height:var(--upyx-header-h)!important;
  background:
    radial-gradient(circle at 10% 20%, rgba(32,183,255,.42) 0, rgba(32,183,255,0) 30%),
    linear-gradient(135deg,#1cbcff 0%,#0864f7 36%,#004bd9 100%)!important;
  border-bottom:1px solid rgba(255,255,255,.22)!important;
  box-shadow:0 14px 34px rgba(2,35,102,.24)!important;
  color:#fff!important;
  position:sticky!important;
  top:0!important;
  z-index:1000!important;
}

.upyx-v4-header-inner:not([data-ux-header]){
  height:var(--upyx-header-h)!important;
  min-height:var(--upyx-header-h)!important;
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  padding:0 28px 0 0!important;
  gap:20px!important;
}

.upyx-v4-brand:not([data-ux-header]){
  width:var(--upyx-sidebar-w)!important;
  flex:0 0 var(--upyx-sidebar-w)!important;
  height:var(--upyx-header-h)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:14px 18px!important;
  margin:0!important;
  background:#fff!important;
  border:0!important;
  border-right:1px solid rgba(15,23,42,.10)!important;
  border-bottom:1px solid rgba(15,23,42,.10)!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:hidden!important;
}

.upyx-v4-brand-logo:not([data-ux-header]){
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:270px!important;
  max-height:104px!important;
  object-fit:contain!important;
  object-position:center center!important;
  filter:none!important;
}

.upyx-v4-brand-icon-wrap,
.upyx-v4-brand-icon,
.upyx-v4-brand-wording,
.upyx-v4-brand-name,
.upyx-v4-brand-tagline,
.upyx-v4-brand-rule,
.upyx-v4-brand-product{
  display:none!important;
}

.upyx-v4-project-switcher:not([data-ux-header]){
  position:absolute!important;
  left:calc(var(--upyx-sidebar-w) + ((100vw - var(--upyx-sidebar-w)) / 2))!important;
  top:50%!important;
  transform:translate(-50%,-50%)!important;
  width:min(620px,42vw)!important;
  max-width:620px!important;
  min-height:74px!important;
  padding:14px 18px!important;
  background:rgba(0,72,220,.20)!important;
  border:1px solid rgba(255,255,255,.72)!important;
  border-radius:16px!important;
  box-shadow:0 18px 38px rgba(0,54,170,.16)!important;
  color:#fff!important;
  z-index:2!important;
}

.upyx-v4-project-switcher:not([data-ux-header]):hover{background:rgba(255,255,255,.10)!important;border-color:#fff!important;}
.upyx-v4-project-switcher:not([data-ux-header]) strong{font-size:20px!important;color:#fff!important;}
.upyx-v4-project-switcher:not([data-ux-header]) small{font-size:14px!important;color:rgba(255,255,255,.92)!important;}
.upyx-v4-project-chevron{color:#fff!important;font-size:24px!important;}
.upyx-v4-project-icon{width:48px!important;height:48px!important;border-radius:14px!important;background:rgba(255,255,255,.10)!important;border:1px solid rgba(255,255,255,.35)!important;color:#fff!important;font-size:22px!important;}

.upyx-v4-header-actions:not([data-ux-header]){margin-left:auto!important;flex:0 0 auto!important;z-index:3!important;display:flex!important;align-items:center!important;gap:18px!important;padding-right:10px!important;}
.upyx-v4-env-badge,.upyx-v4-notification,.upyx-v4-menu-button{border-color:rgba(255,255,255,.55)!important;background:rgba(0,72,220,.18)!important;color:#fff!important;box-shadow:none!important;}

.side-menu{top:var(--upyx-header-h)!important;height:calc(100vh - var(--upyx-header-h))!important;background:linear-gradient(180deg,#06101d 0%,#071b2d 100%)!important;}

.foundation-nav .menu-btn,.foundation-nav .nav-sub button{display:flex!important;align-items:center!important;gap:14px!important;line-height:1.2!important;}
.upyx-menu-ico{display:none!important;}
.upyx-nav-icon{width:24px!important;height:24px!important;min-width:24px!important;stroke:currentColor!important;fill:none!important;filter:none!important;}
.foundation-nav .nav-sub .upyx-nav-icon{width:20px!important;height:20px!important;min-width:20px!important;}
.upyx-nav-icon-main{color:#fff!important;}
.upyx-nav-icon-orange{color:#f97316!important;}
.upyx-nav-icon-green{color:#22c55e!important;}
.upyx-nav-icon-blue{color:#2563eb!important;}
.upyx-nav-icon-purple{color:#7c3aed!important;}
.upyx-nav-icon-brown{color:#b45309!important;}
.foundation-nav .menu-btn.active .upyx-nav-icon{color:#fff!important;}
.foundation-nav .menu-btn span:last-child,.foundation-nav .nav-sub button span:last-child{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;}
.foundation-nav .menu-btn::after{margin-left:auto!important;}
.foundation-nav .nav-sub-section{position:relative!important;margin:14px 0 7px 48px!important;padding:0!important;font-size:.72rem!important;font-weight:900!important;letter-spacing:.11em!important;text-transform:uppercase!important;color:rgba(255,255,255,.62)!important;}
.foundation-nav .nav-sub-section::before{content:"";position:absolute;left:-24px;top:50%;width:14px;height:3px;border-radius:99px;background:currentColor;transform:translateY(-50%);opacity:.95;}
.foundation-nav .nav-section-orange{color:#f97316!important;}
.foundation-nav .nav-section-green{color:#22c55e!important;}
.foundation-nav .nav-section-blue{color:#2563eb!important;}
.foundation-nav .nav-section-purple{color:#7c3aed!important;}
.foundation-nav .nav-section-brown{color:#b45309!important;}

@media(max-width:1180px){
  :root{--upyx-sidebar-w:286px;}
  .upyx-v4-brand-logo:not([data-ux-header]){max-width:252px!important;max-height:96px!important;}
  .upyx-v4-project-switcher:not([data-ux-header]){width:min(540px,40vw)!important;}
}
@media(max-width:900px){
  :root{--upyx-header-h:auto;--upyx-sidebar-w:100%;}
  .upyx-v4-header:not([data-ux-header]){height:auto!important;min-height:0!important;position:relative!important;}
  .upyx-v4-header-inner:not([data-ux-header]){height:auto!important;min-height:0!important;display:grid!important;grid-template-columns:1fr auto!important;padding:12px 14px!important;gap:12px!important;}
  .upyx-v4-brand:not([data-ux-header]){width:220px!important;flex:0 0 auto!important;height:86px!important;border-radius:14px!important;border:1px solid rgba(15,23,42,.08)!important;padding:10px!important;}
  .upyx-v4-brand-logo:not([data-ux-header]){max-width:190px!important;max-height:70px!important;}
  .upyx-v4-project-switcher:not([data-ux-header]){position:static!important;transform:none!important;grid-column:1/-1!important;width:100%!important;max-width:none!important;justify-self:stretch!important;}
  .side-menu{position:relative!important;top:0!important;height:auto!important;}
}
@media(max-width:560px){
  .upyx-v4-brand:not([data-ux-header]){width:170px!important;height:70px!important;padding:10px!important;}
  .upyx-v4-brand-logo:not([data-ux-header]){max-width:150px!important;max-height:56px!important;}
}

/* =========================================================
   SPRINT 002.008 — Correction géométrie Shell Upyx validé
   Objectif : bloc logo aligné exactement avec la sidebar et
   la ligne basse du header bleu.
========================================================= */
:root{
  --upyx-sidebar-w:302px;
  --upyx-header-h:132px;
}

@media(max-width:1180px){
  :root{--upyx-sidebar-w:286px;}
  .upyx-v4-project-switcher:not([data-ux-header]){min-width:360px!important;width:min(540px,52vw)!important;}
}

@media(max-width:900px){
  :root{--upyx-sidebar-w:100%;--upyx-header-h:auto;}
}

/* =========================================================
   SPRINT 002.009 — Alignement final réel Shell Upyx
   Référence validée : le carré blanc du logo est exactement
   aligné avec la largeur de la sidebar, sans marge parasite.
========================================================= */
:root{
  --upyx-sidebar-w:330px;
  --upyx-header-h:132px;
}

html body .upyx-v4-header:not([data-ux-header]){
  height:var(--upyx-header-h)!important;
  min-height:var(--upyx-header-h)!important;
}

html body .upyx-v4-header-inner:not([data-ux-header]){
  height:var(--upyx-header-h)!important;
  min-height:var(--upyx-header-h)!important;
  display:grid!important;
  grid-template-columns:var(--upyx-sidebar-w) minmax(0,1fr) auto!important;
  gap:24px!important;
  padding:0 28px 0 0!important;
  align-items:center!important;
}

html body .upyx-v4-brand:not([data-ux-header]){
  width:var(--upyx-sidebar-w)!important;
  min-width:var(--upyx-sidebar-w)!important;
  max-width:var(--upyx-sidebar-w)!important;
  height:var(--upyx-header-h)!important;
  min-height:var(--upyx-header-h)!important;
  max-height:var(--upyx-header-h)!important;
  margin:0!important;
  padding:0!important;
  background:#fff!important;
  border:0!important;
  border-right:1px solid rgba(15,23,42,.12)!important;
  border-bottom:1px solid rgba(15,23,42,.12)!important;
  border-radius:0!important;
  box-shadow:none!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:center!important;
  overflow:hidden!important;
}

html body .upyx-v4-brand-logo:not([data-ux-header]){
  display:block!important;
  width:calc(var(--upyx-sidebar-w) - 28px)!important;
  max-width:calc(var(--upyx-sidebar-w) - 28px)!important;
  height:auto!important;
  max-height:calc(var(--upyx-header-h) - 12px)!important;
  object-fit:contain!important;
  object-position:center bottom!important;
  margin:0 0 0 0!important;
  padding:0!important;
  filter:none!important;
}

html body main.app-shell,
html body .app-shell{
  display:grid!important;
  grid-template-columns:var(--upyx-sidebar-w) minmax(0,1fr)!important;
  gap:0!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  align-items:stretch!important;
  min-height:calc(100vh - var(--upyx-header-h))!important;
}

html body .side-menu{
  width:var(--upyx-sidebar-w)!important;
  min-width:var(--upyx-sidebar-w)!important;
  max-width:var(--upyx-sidebar-w)!important;
  margin:0!important;
  border-radius:0!important;
  position:sticky!important;
  top:var(--upyx-header-h)!important;
  height:calc(100vh - var(--upyx-header-h))!important;
  padding:28px 16px 16px!important;
  border-right:1px solid rgba(255,255,255,.08)!important;
}

html body .content-area{
  min-width:0!important;
  margin:0!important;
  padding:0!important;
}

html body .upyx-v4-project-switcher:not([data-ux-header]){
  grid-column:2!important;
  position:static!important;
  left:auto!important;
  top:auto!important;
  transform:none!important;
  justify-self:stretch!important;
  width:100%!important;
  max-width:620px!important;
  min-width:0!important;
}

html body .upyx-v4-header-actions:not([data-ux-header]){
  grid-column:3!important;
  justify-self:end!important;
  margin-left:0!important;
}

@media(max-width:900px){
  :root{--upyx-sidebar-w:100%;--upyx-header-h:auto;}
}

/* =========================================================
   SPRINT 002.010 — Fusion ciblée V4 + responsive mobile V3.24/V3.5
   Règle : conserver le Shell Upyx V4 validé sur desktop.
   Portage limité : comportement mobile lisible + sous-menus accordéon.
========================================================= */
@media(max-width:900px){
  :root{
    --upyx-sidebar-w:100%;
    --upyx-header-h:auto;
  }

  html body .upyx-v4-header:not([data-ux-header]){
    position:relative!important;
    height:auto!important;
    min-height:0!important;
    overflow:visible!important;
  }

  html body .upyx-v4-header-inner:not([data-ux-header]){
    height:auto!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:12px!important;
    padding:12px 14px!important;
    align-items:center!important;
  }

  html body .upyx-v4-brand:not([data-ux-header]){
    grid-column:1!important;
    width:188px!important;
    min-width:188px!important;
    max-width:188px!important;
    height:74px!important;
    min-height:74px!important;
    max-height:74px!important;
    padding:8px!important;
    border-radius:14px!important;
    align-items:center!important;
    justify-content:center!important;
    background:#fff!important;
  }

  html body .upyx-v4-brand-logo:not([data-ux-header]){
    width:166px!important;
    max-width:166px!important;
    max-height:58px!important;
    object-position:center center!important;
  }

  html body .upyx-v4-header-actions:not([data-ux-header]){
    grid-column:2!important;
    justify-self:end!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding-right:0!important;
    margin:0!important;
  }

  html body .upyx-v4-env-badge{
    min-height:42px!important;
    padding:8px 10px!important;
  }

  html body .upyx-v4-notification,
  html body .upyx-v4-menu-button{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    padding:0!important;
  }

  html body .upyx-v4-project-switcher:not([data-ux-header]){
    grid-column:1 / -1!important;
    position:static!important;
    left:auto!important;
    top:auto!important;
    transform:none!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    min-height:58px!important;
    justify-self:stretch!important;
    padding:10px 12px!important;
    border-radius:14px!important;
  }

  html body .upyx-v4-project-icon{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
  }

  html body .upyx-v4-project-switcher:not([data-ux-header]) strong{
    font-size:16px!important;
  }

  html body .upyx-v4-project-switcher:not([data-ux-header]) small{
    font-size:12px!important;
  }

  html body .side-menu{
    position:relative!important;
    top:0!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:0!important;
    padding:12px!important;
    border-radius:0!important;
    overflow:visible!important;
  }

  html body .foundation-nav,
  html body .accordion-nav{
    display:grid!important;
    grid-template-columns:repeat(auto-fit,minmax(150px,1fr))!important;
    gap:8px!important;
    padding:0!important;
  }

  html body .nav-block{
    min-width:0!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.045)!important;
    overflow:hidden!important;
  }

  html body .nav-block.open{
    grid-column:1 / -1!important;
    background:rgba(255,255,255,.07)!important;
  }

  html body .nav-block.open::before{
    display:none!important;
  }

  html body .foundation-nav .menu-btn{
    width:100%!important;
    min-height:48px!important;
    padding:12px!important;
    margin:0!important;
    border-radius:12px!important;
    font-size:14px!important;
    justify-content:flex-start!important;
  }

  html body .accordion-nav .menu-btn::after{
    content:""!important;
    margin-left:auto!important;
    opacity:.75!important;
  }

  html body .accordion-nav .nav-block.open > .menu-btn::after{
    transform:rotate(180deg)!important;
  }

  html body .nav-sub{
    display:none!important;
    margin:0 12px 12px!important;
    padding:8px 0 0 14px!important;
    border-left:1px solid rgba(255,255,255,.18)!important;
    gap:4px!important;
  }

  html body .nav-block.open .nav-sub{
    display:flex!important;
    flex-direction:column!important;
  }

  html body .nav-sub-section,
  html body .nav-block.open .nav-sub-section{
    display:flex!important;
    margin:8px 12px 4px!important;
    padding:6px 0 2px!important;
    border-left:0!important;
    font-size:11px!important;
    font-weight:900!important;
    letter-spacing:.09em!important;
    text-transform:uppercase!important;
    opacity:.9!important;
  }

  html body .nav-sub button{
    width:100%!important;
    min-height:40px!important;
    padding:9px 10px!important;
    margin:0!important;
    border-radius:9px!important;
    font-size:14px!important;
    color:rgba(255,255,255,.84)!important;
    background:transparent!important;
    justify-content:flex-start!important;
  }

  html body .nav-sub button:hover,
  html body .nav-sub button.active-sub{
    background:rgba(11,107,255,.18)!important;
    color:#fff!important;
  }

}

@media(max-width:560px){
  html body .upyx-v4-header-inner:not([data-ux-header]){
    grid-template-columns:1fr!important;
  }

  html body .upyx-v4-brand:not([data-ux-header]){
    width:166px!important;
    min-width:166px!important;
    max-width:166px!important;
    height:66px!important;
    min-height:66px!important;
    max-height:66px!important;
  }

  html body .upyx-v4-brand-logo:not([data-ux-header]){
    width:146px!important;
    max-width:146px!important;
    max-height:52px!important;
  }

  html body .upyx-v4-header-actions:not([data-ux-header]){
    grid-column:1!important;
    justify-self:start!important;
    width:100%!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
  }

  html body .foundation-nav,
  html body .accordion-nav{
    grid-template-columns:1fr 1fr!important;
  }

  html body .foundation-nav .menu-btn{
    font-size:13px!important;
    min-height:46px!important;
  }

  html body .nav-block.open{
    grid-column:1 / -1!important;
  }
}

/* =========================================================
   SPRINT 002.011 — Fusion ciblée mobile V3.24
   Base conservée : Shell Upyx V4 validé.
   Correction : sur mobile, la navigation redevient verticale,
   avec les menus les uns sous les autres et les sous-menus
   sous leur rubrique, comme sur la V3.24/V3.5.
========================================================= */
@media(max-width:980px){
  .side-menu{
    position:relative!important;
    top:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    padding:12px 12px 14px!important;
  }

  .foundation-nav,
  .accordion-nav.foundation-nav{
    display:flex!important;
    flex-direction:column!important;
    grid-template-columns:none!important;
    gap:8px!important;
    padding:0!important;
    margin:0!important;
    width:100%!important;
  }

  .nav-block{
    width:100%!important;
    display:block!important;
    margin:0!important;
    border-radius:12px!important;
  }

  .nav-block .menu-btn,
  .accordion-nav .nav-block .menu-btn{
    width:100%!important;
    min-height:48px!important;
    justify-content:flex-start!important;
    text-align:left!important;
    padding:0 14px!important;
  }

  .accordion-nav .nav-block.open .nav-sub{
    display:flex!important;
    flex-direction:column!important;
  }

  .nav-sub{
    width:auto!important;
    grid-column:auto!important;
    margin:8px 0 10px 22px!important;
    padding-left:14px!important;
    border-left:1px solid rgba(255,255,255,.18)!important;
  }

  .nav-sub button{
    width:100%!important;
    justify-content:flex-start!important;
    text-align:left!important;
    min-height:40px!important;
  }
}


/* =========================================================
   SPRINT 002.012 — Header mobile compact
   Base conservée : Shell Upyx V4 validé.
   Objectif : logo Upyx à gauche, actions système à droite
   sur la même ligne mobile pour gagner de la hauteur.
========================================================= */
@media(max-width:900px){
  .upyx-v4-header:not([data-ux-header]){
    height:auto!important;
    min-height:0!important;
    position:relative!important;
  }

  .upyx-v4-header-inner:not([data-ux-header]){
    min-height:0!important;
    height:auto!important;
    padding:8px 12px 10px!important;
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:wrap!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
  }

  .upyx-v4-brand:not([data-ux-header]){
    order:1!important;
    width:auto!important;
    min-width:0!important;
    height:52px!important;
    flex:0 1 auto!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    padding:0!important;
  }

  .upyx-v4-brand-logo:not([data-ux-header]){
    height:50px!important;
    width:auto!important;
    max-width:152px!important;
    object-fit:contain!important;
  }

  .upyx-v4-header-actions:not([data-ux-header]){
    order:2!important;
    margin-left:auto!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:6px!important;
    flex:0 0 auto!important;
  }

  .upyx-v4-notification,
  .upyx-v4-menu-button{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    border-radius:12px!important;
    font-size:21px!important;
    margin:0!important;
  }

  .upyx-v4-notification span{
    right:0!important;
    top:-1px!important;
    min-width:16px!important;
    height:16px!important;
    font-size:10px!important;
  }

  .upyx-v4-env-badge{
    display:none!important;
  }

  .header-logout-btn{
    display:none!important;
  }

  .upyx-v4-project-switcher:not([data-ux-header]){
    order:3!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:8px 10px!important;
    border-radius:12px!important;
  }

  .upyx-v4-project-icon{
    width:26px!important;
    height:26px!important;
    border-radius:8px!important;
    font-size:13px!important;
  }

  .upyx-v4-project-switcher:not([data-ux-header]) strong{
    font-size:15px!important;
  }

  .upyx-v4-project-switcher:not([data-ux-header]) small{
    font-size:12px!important;
    margin-top:2px!important;
  }

  .upyx-v4-project-chevron{
    font-size:16px!important;
  }

  .upyx-v4-project-popover{
    top:112px!important;
  }

  .upyx-v4-notification-panel{
    top:62px!important;
  }
}

@media(max-width:420px){
  .upyx-v4-brand-logo:not([data-ux-header]){
    max-width:136px!important;
  }

  .upyx-v4-header-actions:not([data-ux-header]){
    gap:4px!important;
  }

  .upyx-v4-notification,
  .upyx-v4-menu-button{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
  }
}


/* =========================================================
   SPRINT 002_013 — Correction réelle header mobile compact
   - Logo Upyx à gauche
   - Actions système à droite sur la même ligne
   - Icônes SVG propriétaires, aucun emoji dans le header
   - Projet actif compact sous la ligne principale
========================================================= */
.upyx-action-icon{
  width:21px;
  height:21px;
  display:block;
  color:currentColor;
  flex:0 0 auto;
}

.upyx-v4-notification,
.upyx-v4-menu-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  line-height:1!important;
}

@media(max-width:900px){
  html body .upyx-v4-header:not([data-ux-header]){
    height:auto!important;
    min-height:0!important;
    position:relative!important;
  }

  html body .upyx-v4-header-inner:not([data-ux-header]){
    height:auto!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "brand actions"
      "project project"!important;
    align-items:center!important;
    column-gap:10px!important;
    row-gap:6px!important;
    padding:8px 12px 9px!important;
  }

  html body .upyx-v4-brand:not([data-ux-header]){
    grid-area:brand!important;
    width:auto!important;
    height:46px!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    padding:0!important;
    margin:0!important;
  }

  html body .upyx-v4-brand-logo:not([data-ux-header]){
    height:44px!important;
    width:auto!important;
    max-width:150px!important;
    object-fit:contain!important;
    display:block!important;
  }

  html body .upyx-v4-header-actions:not([data-ux-header]){
    grid-area:actions!important;
    margin:0!important;
    padding:0!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:6px!important;
    width:auto!important;
    min-width:max-content!important;
  }

  html body .upyx-v4-env-badge,
  html body .header-logout-btn{
    display:none!important;
  }

  html body .upyx-v4-notification,
  html body .upyx-v4-menu-button{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    padding:0!important;
    margin:0!important;
    border-radius:12px!important;
    font-size:0!important;
  }

  html body .upyx-v4-notification .upyx-action-icon,
  html body .upyx-v4-menu-button .upyx-action-icon{
    width:20px!important;
    height:20px!important;
  }

  html body .upyx-v4-notification span#notificationCount{
    position:absolute!important;
    right:-2px!important;
    top:-3px!important;
    min-width:15px!important;
    height:15px!important;
    padding:0 4px!important;
    border-radius:999px!important;
    font-size:9px!important;
    line-height:15px!important;
  }

  html body .upyx-v4-project-switcher:not([data-ux-header]){
    grid-area:project!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:7px 10px!important;
    border-radius:12px!important;
  }

  html body .upyx-v4-project-switcher:not([data-ux-header]) strong{font-size:14px!important;}
  html body .upyx-v4-project-switcher:not([data-ux-header]) small{font-size:11px!important;margin-top:1px!important;}
  html body .upyx-v4-project-icon{width:24px!important;height:24px!important;border-radius:8px!important;font-size:12px!important;}
  html body .upyx-v4-project-chevron{font-size:15px!important;}

  html body .upyx-v4-project-popover{top:102px!important;}
  html body .upyx-v4-notification-panel{top:54px!important;}
}

@media(max-width:420px){
  html body .upyx-v4-brand-logo:not([data-ux-header]){max-width:132px!important;height:42px!important;}
  html body .upyx-v4-brand:not([data-ux-header]){height:44px!important;}
  html body .upyx-v4-header-actions:not([data-ux-header]){gap:4px!important;}
  html body .upyx-v4-notification,
  html body .upyx-v4-menu-button{width:34px!important;height:34px!important;min-width:34px!important;max-width:34px!important;}
}


/* Sprint 003 — corrections locales V4 validée */
.menu-type-wrap{display:flex;gap:6px;align-items:center;min-width:180px}
.menu-type-wrap select,.menu-type-wrap input{width:100%}
.priceDescription{width:100%;min-width:220px;resize:vertical;font-family:inherit;font-size:13px;padding:8px;border:1px solid #d8dde6;border-radius:8px;background:#fff}
#menuiseries .secondary{margin-left:8px}
@media (max-width: 720px){.menu-type-wrap{min-width:150px;flex-direction:column;align-items:stretch}.priceDescription{min-width:160px}}

/* Sprint 003 — Harmonisation V4 */
.prep-context{
  grid-column:1/-1;
  font-weight:900;
  color:#0b6bff;
  margin:4px 0 -2px;
}
#planchers .smart-box h3,
#murs .smart-box h3,
#pignons .smart-box h3{
  color:#0b6bff;
}
#planchers .table-box th,
#murs .table-box th,
#pignons .table-box th,
#tablePlanchersIntermediaires th{
  background:#0b6bff!important;
  color:#fff!important;
}
#planchers .result,
#planchers .v4-info-line{
  background:#eef5ff!important;
  color:#0f172a!important;
  border:1px solid rgba(11,107,255,.18)!important;
  border-radius:16px!important;
}
#planchers .result span{color:#0b6bff!important;}
.v4-stat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr));
  gap:14px;
  margin-top:16px;
}
.v4-stat-card{
  background:#fff;
  color:#0f172a;
  border:1px solid rgba(11,107,255,.16);
  border-top:4px solid #0b6bff;
  border-radius:18px;
  padding:16px;
  box-shadow:0 8px 22px rgba(15,23,42,.05);
}
.v4-stat-card small{
  display:block;
  color:#5b6b81;
  font-weight:800;
  margin-bottom:8px;
}
.v4-stat-card strong{
  display:block;
  color:#0b6bff;
  font-size:26px;
  font-weight:900;
}

/* Sprint 003.003 — harmonisation visuelle bleue */
table:not(.ux-table) th{
  background:var(--upyx-blue) !important;
  color:#fff !important;
}
.smart-box:not(.ux-section){
  border:1px solid rgba(37,99,235,.18) !important;
  background:#fff !important;
  border-radius:var(--upyx-radius) !important;
  box-shadow:0 12px 28px rgba(15,23,42,.06) !important;
  padding:18px !important;
  margin:18px 0 !important;
}
.smart-box h3{
  color:var(--upyx-text) !important;
  margin:0 0 12px !important;
  display:flex;
  align-items:center;
  gap:10px;
}
.smart-box h3::before{
  content:"";
  width:10px;
  height:28px;
  border-radius:999px;
  background:var(--upyx-blue);
  display:inline-block;
}
.smart-config-box,
.smart-primary-row,
.smart-secondary-row{
  border:1px solid var(--upyx-border) !important;
  background:#fff !important;
  box-shadow:none !important;
}
.prep-context{
  color:var(--upyx-blue) !important;
  font-weight:900 !important;
  margin:0 0 10px !important;
}
.template-intro{
  max-width:980px;
  line-height:1.45;
}
#roofCoherence,
#floorCoherence,
#murCoherence,
#pignonCoherence,
.coherence-card,
.v4-info-line{
  border-color:rgba(37,99,235,.30) !important;
  color:var(--upyx-blue) !important;
  background:#f8fbff !important;
  box-shadow:none !important;
}
.result{
  background:#fff !important;
  color:var(--upyx-text) !important;
  border:1px solid var(--upyx-border) !important;
}
#toiture > .card > .result{
  display:inline-flex;
  margin:6px 8px 6px 0;
  padding:12px 14px !important;
  min-width:210px;
}
#zinguerie .smart-box:not(.ux-section) + .smart-box:not(.ux-section){
  margin-top:14px !important;
}

/* Sprint 003.004 — menuiseries sélection automatique + derniers écrans harmonisés */
#menuiseries .smart-box h3,
#isolation .smart-box h3,
#bardage .smart-box h3,
#zinguerie .smart-box h3,
#toiture .smart-box h3{color:var(--upyx-text)!important;}

#menuiseries .table-box th,
#menuiseriesTable th,
#isolation .table-box th,
#bardage .table-box th,
#zinguerie .table-box th{background:var(--upyx-blue)!important;color:#fff!important;}

.menu-type-picker{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:10px;
  margin-bottom:14px;
}
.menu-type-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:1px solid var(--upyx-border);
  border-radius:14px;
  background:#fff;
  font-weight:900;
  cursor:pointer;
  transition:.15s ease;
}
.menu-type-card input{width:18px;height:18px;accent-color:var(--upyx-blue);}
.menu-type-card.is-selected{
  border-color:rgba(37,99,235,.55);
  background:#f8fbff;
  color:var(--upyx-blue);
  box-shadow:0 8px 18px rgba(37,99,235,.08);
}
.menu-qty-grid .menu-qty-field{display:none;}
.menu-qty-grid .menu-qty-field.is-active{display:block;}
.material-row{
  display:grid;
  grid-template-columns:minmax(240px,1fr) minmax(240px,2fr);
  gap:16px;
  align-items:end;
  margin-top:14px;
}
.checkbox-line{
  display:flex!important;
  align-items:center;
  gap:10px;
  min-height:44px;
  font-weight:900;
}
.checkbox-line input{width:20px;height:20px;accent-color:var(--upyx-blue);}
.section-header-small .actions-row{display:flex;gap:10px;align-items:center;}
#menuiseries .primary-btn{width:auto;margin:0;}
#menuiseries .secondary{width:auto;margin:0;}
#menuiseries .alert,
#isolation .alert,
#bardage .alert{border-color:rgba(37,99,235,.18);background:#f8fbff;color:var(--upyx-text);}

@media(max-width:760px){
  .material-row{grid-template-columns:1fr;}
  .section-header-small{align-items:flex-start;gap:10px;}
  .section-header-small .actions-row{width:100%;}
}

/* Sprint 003.005 — menuiseries : sélection par familles */
.menu-type-group{
  margin:0 0 16px 0;
}
.menu-type-group h5{
  margin:0 0 8px 0;
  color:var(--upyx-blue);
  font-size:1rem;
  font-weight:900;
}
.menu-type-group .menu-type-picker{
  margin-bottom:0;
}

/* Sprint 003.009 — menuiseries : lisibilité sélection + matériau compact */
#menuiseries .menu-total-first label{
  color:var(--upyx-blue)!important;
  font-weight:900!important;
}
#menuiseries .menu-total-first input{
  border-color:rgba(37,99,235,.28)!important;
  background:#f8fbff!important;
}
#menuiseries .material-row-compact{
  grid-template-columns:minmax(260px,2fr) auto;
  align-items:end;
}
#menuiseries .material-row-compact .checkbox-line{
  justify-content:flex-start;
  white-space:nowrap;
  min-height:44px;
  padding-bottom:2px;
}
@media(max-width:760px){
  #menuiseries .material-row-compact{grid-template-columns:1fr;}
}

/* Sprint 003.010 — menuiseries : hiérarchie des familles */
#menuiseries .menu-total-first .menu-total-label,
#menuiseries .menu-select-title{
  color:var(--upyx-blue)!important;
  font-weight:900!important;
}
#menuiseries .required-star{color:#ef4444;font-weight:900;margin-left:4px;}
#menuiseries .menu-type-group{
  border:1px solid rgba(37,99,235,.16);
  border-radius:16px;
  padding:14px 16px;
  margin:0 0 14px 0;
  background:#fff;
}
#menuiseries .menu-family-title{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0 0 12px 0!important;
  font-size:1.18rem!important;
  line-height:1.2;
  font-weight:950!important;
}
#menuiseries .menu-family-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:8px;
  font-size:1rem;
  border:2px solid currentColor;
}
#menuiseries .menu-family-windows{color:var(--upyx-blue)!important;}
#menuiseries .menu-family-doors{color:#16a34a!important;}
#menuiseries .menu-family-shutters{color:#7c3aed!important;}
#menuiseries .menu-type-group:has(.menu-family-windows){background:linear-gradient(180deg,rgba(37,99,235,.035),#fff);}
#menuiseries .menu-type-group:has(.menu-family-doors){background:linear-gradient(180deg,rgba(22,163,74,.035),#fff);}
#menuiseries .menu-type-group:has(.menu-family-shutters){background:linear-gradient(180deg,rgba(124,58,237,.035),#fff);}
#menuiseries .menu-type-card span{font-weight:850;}
@media(max-width:760px){
  #menuiseries .menu-family-title{font-size:1.08rem!important;}
  #menuiseries .menu-type-group{padding:12px;}
}

/* Sprint 003.011 — menuiseries : configuration générale compacte */
#menuiseries .menu-general-config{
  display:grid;
  grid-template-columns:minmax(280px,1fr) minmax(360px,1.15fr);
  gap:28px;
  align-items:end;
  padding:0 0 18px 0;
  margin:0 0 18px 0;
  border-bottom:1px solid rgba(37,99,235,.12);
}
#menuiseries .menu-general-config .menu-total-label,
#menuiseries .menu-general-config #menuGlobalMaterialLabel{
  color:var(--upyx-blue)!important;
  font-weight:900!important;
}
#menuiseries .menu-general-config input,
#menuiseries .menu-general-config select{
  margin-top:8px;
  min-height:46px;
}
#menuiseries .menu-material-config{
  display:grid;
  grid-template-columns:minmax(220px,1fr) auto;
  gap:18px;
  align-items:end;
}
#menuiseries .menu-material-config .checkbox-line{
  min-height:46px;
  white-space:nowrap;
  justify-content:flex-start;
  padding-bottom:1px;
}
@media(max-width:900px){
  #menuiseries .menu-general-config,
  #menuiseries .menu-material-config{grid-template-columns:1fr;gap:12px;}
}

/* Sprint 003.012 — menuiseries : bloc configuration générale conforme maquette */
#menuiseries .menu-general-config{
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) minmax(360px,1fr)!important;
  gap:0!important;
  align-items:stretch!important;
  padding:18px 20px!important;
  margin:0 0 20px 0!important;
  border:1px solid rgba(37,99,235,.18)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(37,99,235,.035),#fff)!important;
  box-shadow:0 10px 24px rgba(15,23,42,.04)!important;
}
#menuiseries .menu-general-config .menu-total-label,
#menuiseries .menu-general-config #menuGlobalMaterialLabel{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  margin:0!important;
  color:var(--upyx-blue)!important;
  font-size:1rem!important;
  font-weight:950!important;
  letter-spacing:.01em!important;
}
#menuiseries .menu-general-config .menu-total-label{
  padding-right:20px!important;
}
#menuiseries .menu-material-config{
  display:grid!important;
  grid-template-columns:minmax(180px,1fr) auto!important;
  gap:16px!important;
  align-items:end!important;
  padding-left:20px!important;
  border-left:1px solid rgba(37,99,235,.16)!important;
}
#menuiseries .menu-general-config input,
#menuiseries .menu-general-config select{
  margin-top:0!important;
  min-height:46px!important;
  border:1px solid rgba(37,99,235,.26)!important;
  background:#fff!important;
}
#menuiseries .menu-material-config .checkbox-line{
  min-height:46px!important;
  padding:0 2px 0 0!important;
  margin:0!important;
  display:flex!important;
  align-items:center!important;
  white-space:nowrap!important;
  color:var(--upyx-text)!important;
  font-weight:800!important;
}
@media(max-width:900px){
  #menuiseries .menu-general-config{grid-template-columns:1fr!important;padding:16px!important;}
  #menuiseries .menu-general-config .menu-total-label{padding-right:0!important;padding-bottom:14px!important;}
  #menuiseries .menu-material-config{grid-template-columns:1fr!important;border-left:0!important;border-top:1px solid rgba(37,99,235,.16)!important;padding-left:0!important;padding-top:14px!important;}
}


/* Sprint 003.013 — isolation harmonisée Upyx Style */
#isolation .smart-box h3,
#isolation .prep-context{
  color:var(--upyx-blue)!important;
}
#isolation .isolation-general-config{
  display:grid;
  grid-template-columns:1.35fr .75fr .75fr;
  gap:18px;
  align-items:end;
  padding:18px;
  border:1px solid rgba(37,99,235,.16);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(37,99,235,.035),#fff);
}
#isolation .isolation-general-config label,
#isolation .isolation-price-config label{
  color:var(--upyx-blue)!important;
  font-weight:850;
}
#isolation .isolation-general-config input,
#isolation .isolation-general-config select,
#isolation .isolation-price-config input{
  margin-top:8px;
}
#isolation .isolation-select-title{
  margin:18px 0 12px!important;
  font-size:1.08rem!important;
}
#isolation .isolation-price-config{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
  padding:16px;
  border:1px solid rgba(37,99,235,.12);
  border-radius:16px;
  background:#fff;
}
#isolation .isolation-stat-grid{
  margin-top:16px;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
}
#isolation .v4-stat-card{
  border-top:3px solid var(--upyx-blue);
}
#isolation .v4-stat-card strong{
  color:var(--upyx-blue)!important;
}
@media(max-width:760px){
  #isolation .isolation-general-config,
  #isolation .isolation-price-config{grid-template-columns:1fr;}
}

/* Sprint 003.014 — Isolation V4 harmonisée */
#isolation .isolation-v4{
  padding:24px;
}
#isolation .isolation-config-box{
  display:flex;
  flex-direction:column;
  gap:22px;
  padding:22px;
  border:1px solid rgba(37,99,235,.12);
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
#isolation .isolation-general-config{
  display:grid;
  grid-template-columns:1.4fr repeat(4,1fr);
  gap:16px;
  align-items:end;
}
#isolation .isolation-general-config label,
#isolation .isolation-select-title{
  color:#0f4fa8;
  font-weight:800;
  letter-spacing:.01em;
}
#isolation .isolation-general-config input,
#isolation .isolation-general-config select{
  margin-top:8px;
  height:44px;
  border-radius:12px;
}
#isolation .isolation-select-title{
  margin:0;
  padding-top:2px;
  background:transparent;
  border:0;
}
#isolation .isolation-zone-picker{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
#isolation .isolation-zone-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  border:1px solid rgba(37,99,235,.16);
  border-radius:16px;
  background:#fff;
  color:#0f4fa8;
  font-weight:800;
  box-shadow:0 10px 24px rgba(15,79,168,.06);
  cursor:pointer;
}
#isolation .isolation-zone-card input{
  width:18px;
  height:18px;
  accent-color:#0f4fa8;
}
#isolation .isolation-section-title{
  margin-top:22px;
  margin-bottom:12px;
}
#isolation .isolation-section-title h3{
  color:#0f4fa8;
}
#isolation .isolation-stat-grid{
  gap:14px;
}
#isolation .v4-stat-card{
  min-height:86px;
  border-top:4px solid #0f4fa8;
}
#isolation .v4-stat-card small{
  color:#64748b;
}
#isolation .v4-stat-card strong{
  color:#0f172a;
}
@media (max-width: 1100px){
  #isolation .isolation-general-config{grid-template-columns:1fr 1fr;}
  #isolation .isolation-zone-picker{grid-template-columns:1fr;}
}
@media (max-width: 720px){
  #isolation .isolation-general-config{grid-template-columns:1fr;}
}


/* Sprint 003.015 — bandeau d'indicateurs Upyx universel */
.upyx-indicator-band{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  margin-top:18px;
  background:#fff;
  border:1px solid rgba(15,79,168,.14);
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 10px 26px rgba(15,23,42,.05);
}
.upyx-indicator-cell{
  min-height:74px;
  padding:14px 18px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  border-left:1px solid rgba(15,79,168,.10);
}
.upyx-indicator-cell:first-child{border-left:0;}
.upyx-indicator-cell span{
  color:#64748b;
  font-size:13px;
  font-weight:800;
  letter-spacing:.01em;
}
.upyx-indicator-cell strong{
  color:#0f4fa8;
  font-size:24px;
  line-height:1.15;
  margin-top:6px;
  font-weight:900;
}
.isolation-cost-line{
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  margin-top:10px;
  color:#64748b;
  font-size:13px;
  justify-content:flex-end;
}
.isolation-cost-line strong{color:#0f172a;}
.upyx-hidden-isolation-details{display:none!important;}
@media (max-width: 760px){
  .upyx-indicator-band{grid-template-columns:1fr 1fr;}
  .upyx-indicator-cell:nth-child(3){border-left:0;border-top:1px solid rgba(15,79,168,.10);}
  .upyx-indicator-cell:nth-child(4){border-top:1px solid rgba(15,79,168,.10);}
}

/* Sprint 003.016 — Isolation par zone */
#isolation .isolation-zone-params{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
#isolation .isolation-param-card{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  padding:18px;
  border:1px solid rgba(37,99,235,.14);
  border-radius:18px;
  background:#fff;
  box-shadow:0 10px 24px rgba(15,79,168,.055);
}
#isolation .isolation-param-card > strong{
  color:#0f4fa8;
  font-size:16px;
  font-weight:900;
}
#isolation .isolation-param-card label{
  color:#0f4fa8;
  font-weight:800;
  letter-spacing:.01em;
}
#isolation .isolation-param-card input,
#isolation .isolation-param-card select{
  margin-top:7px;
  height:42px;
  border-radius:12px;
}
@media (max-width:1100px){
  #isolation .isolation-zone-params{grid-template-columns:1fr;}
}

/* Sprint 003.018 — Bardage / Crépi harmonisé Upyx Style */
#bardage .smart-box h3,
#bardage .prep-context,
#bardage .bardage-select-title{
  color:var(--upyx-blue)!important;
}
#bardage .bardage-general-config{
  display:grid;
  grid-template-columns:1fr 1fr .55fr;
  gap:18px;
  align-items:end;
  padding:18px 20px;
  margin:0 0 20px 0;
  border:1px solid rgba(37,99,235,.18);
  border-radius:18px;
  background:linear-gradient(180deg,rgba(37,99,235,.035),#fff);
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}
#bardage .bardage-readonly-label{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  color:var(--upyx-blue)!important;
  font-weight:950!important;
}
#bardage .bardage-readonly-label input{
  min-height:46px!important;
  border:1px solid rgba(37,99,235,.26)!important;
  background:#fff!important;
}
#bardage .bardage-readonly-label input[readonly]{
  background:rgba(37,99,235,.035)!important;
  color:var(--upyx-text)!important;
  font-weight:900!important;
}
#bardage .bardage-type-group{
  border:1px solid rgba(37,99,235,.14);
  border-radius:16px;
  padding:14px 16px;
  margin:14px 0;
  background:#fff;
}
#bardage .bardage-family-title{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 12px 0;
  font-size:1.22rem;
  font-weight:950;
}
#bardage .bardage-family-icon{
  display:inline-grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:8px;
  font-size:1rem;
  border:2px solid currentColor;
}
#bardage .bardage-family-bardage .bardage-family-title{color:#16a34a!important;}
#bardage .bardage-family-crepi .bardage-family-title{color:#d97706!important;}
#bardage .bardage-family-bardage{background:linear-gradient(180deg,rgba(22,163,74,.035),#fff);}
#bardage .bardage-family-crepi{background:linear-gradient(180deg,rgba(217,119,6,.035),#fff);}
#bardage .bardage-type-picker{
  display:grid;
  grid-template-columns:repeat(3,minmax(180px,1fr));
  gap:12px;
}
#bardage .bardage-type-card{
  display:flex!important;
  align-items:center;
  gap:12px;
  min-height:54px;
  padding:10px 14px;
  border:1px solid rgba(15,23,42,.12);
  border-radius:14px;
  background:#fff;
  font-weight:850;
}
#bardage .bardage-type-card input{width:22px;height:22px;}
#bardage .bardage-type-card:has(input:checked){
  border-color:rgba(37,99,235,.45);
  box-shadow:0 0 0 3px rgba(37,99,235,.08);
}
#bardage .bardage-option-config{
  margin:14px 0 0 0;
  padding:16px;
  border:1px solid rgba(37,99,235,.14);
  border-radius:16px;
  background:rgba(248,250,252,.8);
}
#bardage .bardage-option-config h5{
  margin:0 0 12px 0;
  color:var(--upyx-blue);
  font-size:1.05rem;
  font-weight:950;
}
@media(max-width:900px){
  #bardage .bardage-general-config{grid-template-columns:1fr;}
  #bardage .bardage-type-picker{grid-template-columns:1fr;}
}

/* Sprint 003.019 — Isolation : accents couleur par famille */
#isolation .isolation-zone-card,
#isolation .isolation-param-card{
  position:relative;
  overflow:hidden;
}
#isolation .isolation-zone-card::before,
#isolation .isolation-param-card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:4px;
  background:var(--isolation-accent,#0f4fa8);
}
#isolation .isolation-zone-card:nth-child(1),
#isolation .isolation-param-card[data-zone-panel="isolationZoneMurs"]{
  --isolation-accent:#16a34a;
  border-color:rgba(22,163,74,.22);
  box-shadow:0 10px 24px rgba(22,163,74,.07);
}
#isolation .isolation-zone-card:nth-child(2),
#isolation .isolation-param-card[data-zone-panel="isolationZonePignons"]{
  --isolation-accent:#0f4fa8;
  border-color:rgba(15,79,168,.20);
  box-shadow:0 10px 24px rgba(15,79,168,.06);
}
#isolation .isolation-zone-card:nth-child(3),
#isolation .isolation-param-card[data-zone-panel="isolationZoneToiture"]{
  --isolation-accent:#f97316;
  border-color:rgba(249,115,22,.24);
  box-shadow:0 10px 24px rgba(249,115,22,.075);
}
#isolation .isolation-zone-card span,
#isolation .isolation-param-card > strong{
  color:var(--isolation-accent,#0f4fa8)!important;
}
#isolation .isolation-param-card label{
  color:#334155!important;
}
#isolation .isolation-param-card input:focus,
#isolation .isolation-param-card select:focus{
  border-color:var(--isolation-accent,#0f4fa8);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--isolation-accent,#0f4fa8) 14%,transparent);
}

/* Sprint 003.020 — Murs aligné sur le standard Menuiseries */
#murs .murs-smart h3,
#murs .murs-total-label,
#murs .murs-group-title{
  color:var(--upyx-blue)!important;
}
#murs .murs-general-config{
  display:grid!important;
  grid-template-columns:minmax(260px,.85fr) minmax(520px,1.65fr)!important;
  gap:0!important;
  align-items:stretch!important;
  padding:18px 20px!important;
  margin:0 0 20px 0!important;
  border:1px solid rgba(37,99,235,.18)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(37,99,235,.035),#fff)!important;
  box-shadow:0 10px 24px rgba(15,23,42,.04)!important;
}
#murs .murs-total-label{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  margin:0!important;
  padding-right:20px!important;
  font-size:1rem!important;
  font-weight:950!important;
  letter-spacing:.01em!important;
}
#murs .murs-group-config{
  padding-left:20px!important;
  border-left:1px solid rgba(37,99,235,.16)!important;
}
#murs .murs-group-title{
  margin:0 0 10px 0!important;
  font-size:1rem!important;
  font-weight:950!important;
  letter-spacing:.01em!important;
}
#murs .murs-group-fields{
  display:grid!important;
  grid-template-columns:110px 1fr 1fr!important;
  gap:14px!important;
  align-items:end!important;
}
#murs .murs-general-config label{
  font-weight:850!important;
}
#murs .murs-general-config input{
  margin-top:8px!important;
  min-height:46px!important;
  border:1px solid rgba(37,99,235,.26)!important;
  background:#fff!important;
}
#murs .murs-height-check{
  margin:14px 0 0 0!important;
  min-height:34px!important;
  display:flex!important;
  align-items:center!important;
  color:var(--upyx-text)!important;
  font-weight:800!important;
}
#murs #murCoherence:not(.ux-alert){
  margin-top:0!important;
}
#murs .section-header-small{
  margin-top:24px!important;
}
@media(max-width:980px){
  #murs .murs-general-config{grid-template-columns:1fr!important;padding:16px!important;}
  #murs .murs-total-label{padding-right:0!important;padding-bottom:14px!important;}
  #murs .murs-group-config{border-left:0!important;border-top:1px solid rgba(37,99,235,.16)!important;padding-left:0!important;padding-top:14px!important;}
  #murs .murs-group-fields{grid-template-columns:1fr!important;}
}

/* Sprint 003.021 — Pignons aligné sur le standard Menuiseries / Murs */
#pignons .pignons-smart h3,
#pignons .pignons-total-label,
#pignons .pignons-group-title{
  color:var(--upyx-blue)!important;
}
#pignons .pignons-general-config{
  display:grid!important;
  grid-template-columns:minmax(260px,.85fr) minmax(520px,1.65fr)!important;
  gap:0!important;
  align-items:stretch!important;
  padding:18px 20px!important;
  margin:0 0 20px 0!important;
  border:1px solid rgba(37,99,235,.18)!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(37,99,235,.035),#fff)!important;
  box-shadow:0 10px 24px rgba(15,23,42,.04)!important;
}
#pignons .pignons-total-label{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  margin:0!important;
  padding-right:20px!important;
  font-size:1rem!important;
  font-weight:950!important;
  letter-spacing:.01em!important;
}
#pignons .pignons-group-config{
  padding-left:20px!important;
  border-left:1px solid rgba(37,99,235,.16)!important;
}
#pignons .pignons-group-title{
  margin:0 0 10px 0!important;
  font-size:1rem!important;
  font-weight:950!important;
  letter-spacing:.01em!important;
}
#pignons .pignons-group-fields{
  display:grid!important;
  grid-template-columns:110px 1fr 1fr!important;
  gap:14px!important;
  align-items:end!important;
}
#pignons .pignons-general-config label{
  font-weight:850!important;
}
#pignons .pignons-general-config input{
  margin-top:8px!important;
  min-height:46px!important;
  border:1px solid rgba(37,99,235,.26)!important;
  background:#fff!important;
}
#pignons .pignons-height-check{
  margin:14px 0 0 0!important;
  min-height:34px!important;
  display:flex!important;
  align-items:center!important;
  color:var(--upyx-text)!important;
  font-weight:800!important;
}
#pignons #pignonCoherence{
  margin-top:0!important;
}
#pignons .section-header-small{
  margin-top:24px!important;
}
@media(max-width:980px){
  #pignons .pignons-general-config{grid-template-columns:1fr!important;padding:16px!important;}
  #pignons .pignons-total-label{padding-right:0!important;padding-bottom:14px!important;}
  #pignons .pignons-group-config{border-left:0!important;border-top:1px solid rgba(37,99,235,.16)!important;padding-left:0!important;padding-top:14px!important;}
  #pignons .pignons-group-fields{grid-template-columns:1fr!important;}
}

/* Sprint 003.022 — Charpente au standard Upyx V4 */
#toiture .smart-box h3,
#toiture .prep-context{
  color:var(--upyx-blue)!important;
}
#toiture .charpente-config-box:not(.ux-subsection-group){
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:22px!important;
  border:1px solid rgba(37,99,235,.14)!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;
}
#toiture .charpente-general-config{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0;
  align-items:stretch;
  border:1px solid rgba(37,99,235,.18);
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(180deg,rgba(37,99,235,.035),#fff);
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}
#toiture .charpente-main-label{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  padding:18px 20px!important;
  margin:0!important;
  color:var(--upyx-blue)!important;
  font-size:1rem!important;
  font-weight:950!important;
  letter-spacing:.01em!important;
}
#toiture .charpente-main-label + .charpente-main-label{
  border-left:1px solid rgba(37,99,235,.16);
}
#toiture .charpente-main-label input,
#toiture .charpente-main-label select{
  margin-top:0!important;
  min-height:46px!important;
  border:1px solid rgba(37,99,235,.26)!important;
  background:#fff!important;
}
#toiture .charpente-geometry-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
#toiture .charpente-geometry-grid label,
#toiture .roof-openings-box label{
  color:#0f4fa8!important;
  font-weight:800!important;
}
#toiture .charpente-geometry-grid input,
#toiture .roof-openings-box input{
  margin-top:8px!important;
  height:44px!important;
  border-radius:12px!important;
}
#toiture .charpente-check{
  margin-top:0!important;
}
#toiture .table-box th,
#tableToitures th{
  background:var(--upyx-blue)!important;
  color:#fff!important;
}
#toiture .charpente-accent-card{
  margin-top:22px;
  border:1px solid rgba(37,99,235,.14)!important;
  border-top:4px solid var(--upyx-blue)!important;
  background:#fff!important;
  border-radius:18px!important;
  box-shadow:0 10px 24px rgba(15,79,168,.055)!important;
}
#toiture .charpente-accent-card h3{
  color:var(--upyx-blue)!important;
}
#toiture .charpente-mini-results{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px 18px;
  margin-top:14px;
  color:#64748b;
  font-size:13px;
}
#toiture .charpente-mini-results strong{
  color:#0f4fa8;
  font-weight:900;
}
.upyx-hidden-charpente-details{display:none!important;}
@media(max-width:1000px){
  #toiture .charpente-geometry-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:720px){
  #toiture .charpente-general-config,
  #toiture .charpente-geometry-grid{grid-template-columns:1fr;}
  #toiture .charpente-main-label + .charpente-main-label{border-left:0;border-top:1px solid rgba(37,99,235,.16);}
}

/* Sprint 003.023 — Charpente : regroupement métier + accents couleur */
#toiture .charpente-field-groups{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
#toiture .charpente-field-group{
  position:relative;
  padding:18px;
  border-radius:18px;
  border:1px solid rgba(37,99,235,.12);
  background:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.035);
  overflow:hidden;
}
#toiture .charpente-field-group::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:var(--upyx-blue);
}
#toiture .charpente-field-group h4{
  margin:0 0 14px 0;
  font-size:14px;
  font-weight:950;
  letter-spacing:.02em;
  color:var(--upyx-blue);
}
#toiture .charpente-grid-2{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}
#toiture .charpente-field-group-geometry::before{background:#2563eb;}
#toiture .charpente-field-group-geometry h4{color:#2563eb!important;}
#toiture .charpente-field-group-pente::before{background:#f59e0b;}
#toiture .charpente-field-group-pente h4{color:#b45309!important;}
#toiture .charpente-field-group-debords::before{background:#10b981;}
#toiture .charpente-field-group-debords h4{color:#047857!important;}
#toiture .charpente-field-group-raccords::before{background:#8b5cf6;}
#toiture .charpente-field-group-raccords h4{color:#6d28d9!important;}
@media(max-width:1000px){
  #toiture .charpente-field-groups{grid-template-columns:1fr;}
}
@media(max-width:720px){
  #toiture .charpente-grid-2{grid-template-columns:1fr!important;}
}

/* Sprint 003.025 — Planchers au standard Upyx V4 */
#planchers .smart-box h3,
#planchers .prep-context{
  color:var(--upyx-blue)!important;
}
#planchers .planchers-config-box{
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:22px!important;
  border:1px solid rgba(37,99,235,.14)!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;
}
#planchers .planchers-general-config{
  display:grid;
  grid-template-columns:minmax(230px,.8fr) 1.6fr;
  gap:0;
  align-items:stretch;
  border:1px solid rgba(37,99,235,.18);
  border-radius:18px;
  overflow:hidden;
  background:linear-gradient(180deg,rgba(37,99,235,.035),#fff);
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}
#planchers .planchers-total-label,
#planchers .planchers-group-config{
  padding:18px 20px!important;
  margin:0!important;
}
#planchers .planchers-total-label{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  color:var(--upyx-blue)!important;
  font-size:1rem!important;
  font-weight:950!important;
  letter-spacing:.01em!important;
}
#planchers .planchers-group-config{
  border-left:1px solid rgba(37,99,235,.16);
}
#planchers .planchers-group-fields{
  display:grid!important;
  grid-template-columns:110px 1fr 1fr!important;
  gap:14px!important;
  align-items:end!important;
  margin-top:10px!important;
}
#planchers .planchers-total-label input,
#planchers .planchers-group-fields input{
  margin-top:8px!important;
  min-height:46px!important;
  border:1px solid rgba(37,99,235,.26)!important;
  background:#fff!important;
}
#planchers .planchers-field-groups{
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:16px;
}
#planchers .planchers-field-group{
  position:relative;
  padding:18px;
  border-radius:18px;
  border:1px solid rgba(37,99,235,.12);
  background:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.035);
  overflow:hidden;
}
#planchers .planchers-field-group::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:var(--upyx-blue);
}
#planchers .planchers-field-group h4{
  margin:0 0 14px 0;
  font-size:14px;
  font-weight:950;
  letter-spacing:.02em;
}
#planchers .planchers-field-group-structure::before{background:#f59e0b;}
#planchers .planchers-field-group-structure h4{color:#b45309!important;}
#planchers .planchers-field-group-control::before{background:#2563eb;}
#planchers .planchers-field-group-control h4{color:#2563eb!important;}
#planchers .planchers-grid-2{
  grid-template-columns:1fr 1fr!important;
  gap:14px!important;
  align-items:end!important;
}
#planchers .planchers-check{
  margin:0!important;
  min-height:46px!important;
  display:flex!important;
  align-items:center!important;
  color:var(--upyx-text)!important;
  font-weight:800!important;
}
#planchers .table-box th,
#tablePlanchersIntermediaires th{
  background:var(--upyx-blue)!important;
  color:#fff!important;
}
.upyx-hidden-planchers-details{display:none!important;}
@media(max-width:980px){
  #planchers .planchers-general-config,
  #planchers .planchers-field-groups{grid-template-columns:1fr!important;}
  #planchers .planchers-group-config{border-left:0!important;border-top:1px solid rgba(37,99,235,.16);}
  #planchers .planchers-group-fields{grid-template-columns:1fr!important;}
}
@media(max-width:720px){
  #planchers .planchers-grid-2{grid-template-columns:1fr!important;}
}

/* Sprint 003.027 — Zinguerie alignée sur le standard Menuiseries */
#zinguerie .zinguerie-v4-card{
  display:flex;
  flex-direction:column;
  gap:20px;
}
#zinguerie .template-intro{
  margin:0 0 4px 0;
  color:#64748b;
  font-size:1rem;
  font-weight:650;
}
#zinguerie .zinguerie-smart-box:not(.ux-section){
  margin:0!important;
  padding:20px 22px!important;
  border:1px solid rgba(37,99,235,.16)!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 10px 24px rgba(15,23,42,.04)!important;
}
#zinguerie .zinguerie-smart-box h3{
  color:var(--upyx-blue)!important;
  font-size:1.2rem!important;
  font-weight:950!important;
  margin:0 0 16px 0!important;
}
#zinguerie .zinguerie-auto-grid,
#zinguerie .zinguerie-param-grid,
#zinguerie .zinguerie-complement-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  align-items:end;
}
#zinguerie .zinguerie-param-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
#zinguerie label{
  color:#334155!important;
  font-weight:850!important;
}
#zinguerie input,
#zinguerie select{
  margin-top:8px;
  min-height:44px;
  border-radius:12px!important;
}
#zinguerie .zinguerie-readonly-label{
  color:var(--upyx-blue)!important;
}
#zinguerie .zinguerie-readonly-label input[readonly],
#zinguerie input[readonly]{
  background:rgba(37,99,235,.035)!important;
  border-color:rgba(37,99,235,.22)!important;
  color:#0f172a!important;
  font-weight:900!important;
}
#zinguerie .zinguerie-family{
  position:relative;
  overflow:hidden;
}
#zinguerie .zinguerie-family::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:4px;
  background:var(--zinguerie-accent,var(--upyx-blue));
}
#zinguerie .zinguerie-family-complements{
  --zinguerie-accent:#16a34a;
  border-color:rgba(22,163,74,.22)!important;
  background:linear-gradient(180deg,rgba(22,163,74,.035),#fff)!important;
}
#zinguerie .zinguerie-family-points{
  --zinguerie-accent:#f97316;
  border-color:rgba(249,115,22,.24)!important;
  background:linear-gradient(180deg,rgba(249,115,22,.035),#fff)!important;
}
#zinguerie .zinguerie-family h3{
  color:var(--zinguerie-accent)!important;
}
#zinguerie .alert{
  margin-top:0!important;
  border-color:rgba(37,99,235,.18)!important;
  background:#f8fbff!important;
  color:var(--upyx-text)!important;
}
@media(max-width:1050px){
  #zinguerie .zinguerie-auto-grid,
  #zinguerie .zinguerie-complement-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:760px){
  #zinguerie .zinguerie-auto-grid,
  #zinguerie .zinguerie-param-grid,
  #zinguerie .zinguerie-complement-grid{grid-template-columns:1fr;}
}

/* Sprint 003.028 — Menuiseries : quantité directement dans la sélection */
#menuiseries .menu-type-card{
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
#menuiseries .menu-card-main{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
  flex:1;
  cursor:pointer;
}
#menuiseries .menu-card-qty{
  width:76px;
  min-width:76px;
  text-align:center;
  font-weight:900;
  color:var(--upyx-blue);
  border:1px solid rgba(37,99,235,.22);
  border-radius:12px;
  padding:8px 10px;
  background:#fff;
}
#menuiseries .menu-type-card:not(.is-selected) .menu-card-qty{
  opacity:.55;
}
#menuiseries .menu-type-card.is-selected .menu-card-qty{
  border-color:rgba(37,99,235,.55);
  box-shadow:0 0 0 3px rgba(37,99,235,.08);
}


/* =========================================================
   SPRINT 004.001 — Responsive Premium Mobile
   Objectif : même logique métier que Desktop, présentation mobile adaptée.
   Règle : un composant Upyx n'est terminé que validé Desktop + Mobile.
========================================================= */
@media (max-width: 900px){
  html{font-size:15px;}
  body{overflow-x:hidden!important;}

  .upyx-v4-header:not([data-ux-header]){
    position:sticky!important;
    top:0!important;
    z-index:1200!important;
    border-radius:0!important;
  }

  .upyx-v4-header-inner:not([data-ux-header]){
    padding:10px 12px!important;
    gap:10px!important;
  }

  .upyx-v4-brand:not([data-ux-header]){
    width:auto!important;
    max-width:178px!important;
    height:64px!important;
    padding:8px!important;
  }

  .upyx-v4-brand-icon-wrap{
    width:48px!important;
    height:48px!important;
    flex:0 0 48px!important;
    border-radius:10px!important;
  }

  .upyx-v4-brand-icon{
    width:44px!important;
    height:44px!important;
  }

  .upyx-v4-brand-wording{display:none!important;}

  .upyx-v4-project-switcher:not([data-ux-header]){
    min-height:54px!important;
    padding:10px 12px!important;
    border-radius:15px!important;
  }

  .upyx-v4-project-icon{
    width:38px!important;
    height:38px!important;
    border-radius:12px!important;
  }

  .upyx-v4-project-switcher:not([data-ux-header]) strong{font-size:1rem!important;}
  .upyx-v4-project-switcher:not([data-ux-header]) small{font-size:.78rem!important;}

  .side-menu{
    position:relative!important;
    top:auto!important;
    height:auto!important;
    max-height:none!important;
    margin:0 0 12px 0!important;
    border-radius:20px!important;
    padding:10px!important;
    overflow:visible!important;
  }

  .foundation-nav,
  .accordion-nav{gap:6px!important;}

  .menu-btn{
    min-height:44px!important;
    padding:10px 12px!important;
    border-radius:13px!important;
    font-size:.95rem!important;
  }

  .nav-sub{
    margin:6px 0 10px 8px!important;
    padding-left:10px!important;
  }

  .nav-sub button{
    min-height:40px!important;
    padding:9px 10px!important;
    font-size:.9rem!important;
  }

  .tab,
  .tab.active{width:100%!important;min-width:0!important;}

  .card,
  .smart-box:not(.ux-section),
  .smart-config-box,
  .menu-type-group,
  .isolation-config-box,
  .isolation-zone-card,
  .bardage-type-card,
  .zinguerie-smart-box:not(.ux-section),
  .charpente-field-group,
  .planchers-field-group{
    border-radius:18px!important;
  }

  .card,
  .smart-box:not(.ux-section){
    padding:16px!important;
    margin-bottom:14px!important;
  }

  .card h2{font-size:1.35rem!important;line-height:1.15!important;}
  .card h3{font-size:1.1rem!important;line-height:1.2!important;}
  .template-intro{font-size:.94rem!important;line-height:1.4!important;}

  .form-grid,
  .material-row,
  .smart-primary-row,
  .smart-secondary-row,
  .module-status-grid,
  .dashboard-columns,
  .document-grid,
  .devis-detected-grid,
  .devis-status-grid,
  .bibliotheque-status-grid,
  .quant-source-grid,
  .premium-family-grid,
  .rubrique-grid{
    grid-template-columns:1fr!important;
  }

  label{font-size:.92rem!important;}
  input,
  select,
  textarea{
    min-height:46px!important;
    font-size:16px!important;
    width:100%!important;
  }

  .toolbar,
  .section-header-small,
  .project-actions,
  .compact-actions{
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
  }

  button,
  .toolbar button,
  .section-header-small button{
    min-height:44px!important;
    width:100%;
    margin:0!important;
  }

  .table-box{
    overflow-x:auto!important;
    overflow-y:auto!important;
    resize:none!important;
    min-height:auto!important;
    max-width:100%!important;
    -webkit-overflow-scrolling:touch;
  }

  table{min-width:720px!important;font-size:.9rem!important;}
  table:not(.ux-table) th,table:not(.ux-table) td{padding:10px!important;}

  .upyx-cockpit-page{
    padding:18px 14px!important;
    min-height:auto!important;
  }

  .upyx-cockpit-topbar,
  .upyx-cockpit-actions,
  .upyx-alert-line{
    display:block!important;
  }

  .upyx-cockpit-topbar h2{font-size:1.8rem!important;}
  .upyx-cockpit-topbar p{font-size:.94rem!important;}
  .upyx-kpi-grid,
  .upyx-kpi-grid-compact,
  .upyx-module-grid,
  .upyx-module-grid.two-cols,
  .upyx-module-grid-compact,
  .upyx-module-grid-compact.three-cols,
  .upyx-module-grid-compact.one-col{
    grid-template-columns:1fr!important;
    max-width:none!important;
  }

  .upyx-kpi-card{min-height:auto!important;padding:16px!important;}
  .upyx-module-card{min-height:auto!important;padding:18px!important;}
}

@media (max-width: 720px){
  /* Standard Menuiseries décliné Mobile */
  #menuiseries .menu-general-config,
  #murs .murs-general-config,
  #pignons .pignons-general-config,
  #planchers .planchers-general-config,
  #toiture .charpente-general-config{
    grid-template-columns:1fr!important;
    padding:16px!important;
    gap:14px!important;
  }

  #menuiseries .menu-material-config,
  #murs .murs-group-config,
  #pignons .pignons-group-config,
  #planchers .planchers-group-config{
    border-left:0!important;
    border-top:1px solid rgba(37,99,235,.16)!important;
    padding-left:0!important;
    padding-top:14px!important;
  }

  #menuiseries .menu-total-label,
  #murs .murs-total-label,
  #pignons .pignons-total-label,
  #planchers .planchers-total-label{
    padding-right:0!important;
    padding-bottom:0!important;
  }

  #menuiseries .menu-material-config,
  #menuiseries .menu-type-picker,
  #murs .murs-group-fields,
  #pignons .pignons-group-fields,
  #planchers .planchers-group-fields,
  #toiture .charpente-field-groups,
  #toiture .charpente-grid-2,
  #planchers .planchers-field-groups,
  #planchers .planchers-grid-2,
  #isolation .isolation-zone-picker,
  #isolation .isolation-zone-params,
  #bardage .bardage-smart,
  #bardage .bardage-type-card,
  #zinguerie .zinguerie-auto-grid,
  #zinguerie .zinguerie-param-grid,
  #zinguerie .zinguerie-complement-grid{
    grid-template-columns:1fr!important;
  }

  #menuiseries .menu-type-group{
    padding:12px!important;
    margin-bottom:12px!important;
  }

  #menuiseries .menu-type-card{
    min-height:52px!important;
    padding:12px!important;
  }

  #menuiseries .menu-card-qty{
    width:72px!important;
    min-width:72px!important;
  }

  #isolation .isolation-zone-card,
  #bardage .bardage-type-card,
  #zinguerie .zinguerie-smart-box:not(.ux-section),
  #toiture .charpente-field-group,
  #planchers .planchers-field-group{
    padding:16px!important;
  }
}

@media (max-width: 560px){
  .upyx-v4-header-inner:not([data-ux-header]){
    grid-template-columns:1fr auto!important;
    padding:8px 10px!important;
  }

  .upyx-v4-brand:not([data-ux-header]){
    max-width:132px!important;
    height:54px!important;
  }

  .upyx-v4-brand-icon-wrap{
    width:42px!important;
    height:42px!important;
    flex-basis:42px!important;
  }

  .upyx-v4-brand-icon{
    width:38px!important;
    height:38px!important;
  }

  .upyx-v4-project-switcher:not([data-ux-header]){
    grid-column:1/-1!important;
    width:100%!important;
  }

  .upyx-v4-header-actions:not([data-ux-header]){gap:6px!important;}
  .upyx-v4-notification,
  .upyx-v4-menu-button{width:40px!important;height:40px!important;}

  .side-menu{border-radius:18px!important;padding:9px!important;}
  .card,.smart-box:not(.ux-section){padding:14px!important;border-radius:16px!important;}

  #menuiseries .menu-type-card{
    flex-wrap:nowrap!important;
  }

  #menuiseries .menu-card-main{
    min-width:0!important;
  }

  #menuiseries .menu-card-main span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}

/* =========================================================
   SPRINT 004.005 — Chiffrage Upyx Style V4
   Tous les sous-menus Chiffrage partagent la même structure :
   hero projet, paramètres globaux, cartes métier, contrôles,
   actions et responsive mobile.
========================================================= */
.chiffrage-v4-page:not(.ux-page){
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:0;
}
.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header){
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  background:linear-gradient(135deg,#0f172a 0%,#152136 58%,#ef7d00 160%);
  color:#fff;
  border-radius:26px;
  padding:24px;
  box-shadow:0 18px 42px rgba(15,23,42,.16);
  border:1px solid rgba(255,255,255,.08);
}
.chiffrage-hero:not(.ux-page-header) h2{margin:4px 0 8px;color:#fff;font-size:2rem;line-height:1.1;}
.chiffrage-hero:not(.ux-page-header) p{margin:0;color:rgba(255,255,255,.82);max-width:760px;line-height:1.45;}
.chiffrage-hero .upyx-eyebrow{color:#ffb36b;}
.chiffrage-hero-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;min-width:260px;}
.upyx-v4-primary,.upyx-v4-secondary{
  border-radius:14px;
  min-height:44px;
  padding:11px 16px;
  font-weight:900;
  cursor:pointer;
  border:1px solid transparent;
  white-space:nowrap;
}
.upyx-v4-primary{background:#ef7d00;color:#fff;border-color:#ef7d00;box-shadow:0 10px 22px rgba(239,125,0,.25);}
.upyx-v4-secondary{background:rgba(255,255,255,.10);color:#fff;border-color:rgba(255,255,255,.18);}
.upyx-v4-global-panel:not(.ux-section),.upyx-v4-work-card:not(.ux-section){
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:24px;
  padding:20px;
  box-shadow:0 14px 34px rgba(15,23,42,.06);
}
.upyx-v4-panel-title,.upyx-v4-section-head>div{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:16px;
}
.upyx-v4-panel-title>span,.upyx-v4-section-head span{
  width:32px;
  height:32px;
  border-radius:12px;
  background:#fff3e6;
  color:#ef7d00;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:950;
  flex:0 0 auto;
}
.upyx-v4-panel-title h3,.upyx-v4-section-head h3{margin:0 0 3px;color:#111827;font-size:1.2rem;}
.upyx-v4-panel-title p,.upyx-v4-section-head p{margin:0;color:#667085;font-weight:600;line-height:1.4;}
.chiffrage-param-grid,.chiffrage-control-grid,.chiffrage-result-grid{margin-top:6px;}
.chiffrage-param-card,.devis-status{
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.07);
  border-radius:18px;
  padding:15px;
  min-height:82px;
}
.chiffrage-param-card small{display:block;color:#667085;font-weight:800;margin-bottom:8px;}
.chiffrage-param-card strong{display:block;color:#ef7d00;font-size:1.5rem;font-weight:950;}
.chiffrage-form-grid label{
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.07);
  border-radius:18px;
  padding:14px;
  font-weight:850;
}
.chiffrage-form-grid input,.chiffrage-form-grid select{margin-top:8px;}
.chiffrage-detected-grid div{
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.07);
  border-radius:16px;
  padding:13px 14px;
}
.chiffrage-inner-panel,.chiffrage-tools{box-shadow:none!important;margin:0!important;}
.chiffrage-tools{background:#f8fafc!important;border-radius:18px!important;}
.chiffrage-v4-page .table-box{border-radius:18px;border:1px solid rgba(15,23,42,.08);}
.chiffrage-v4-page table:not(.ux-table) th{background:#111827!important;color:#fff!important;}
.chiffrage-v4-page .upyx-alert-line{margin-top:0;}
.devis-technical-details.upyx-v4-work-card:not(.ux-section){padding:0;overflow:hidden;}
.devis-technical-details.upyx-v4-work-card:not(.ux-section) summary{padding:18px 20px;}
.devis-technical-details.upyx-v4-work-card:not(.ux-section) .table-box,.devis-technical-details.upyx-v4-work-card:not(.ux-section) .toolbar{margin:0 20px 20px;}
@media(max-width:1000px){
  .upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header){flex-direction:column;}
  .chiffrage-hero-actions{width:100%;justify-content:flex-start;min-width:0;}
  .chiffrage-hero-actions button{flex:1 1 180px;}
}
@media(max-width:700px){
  .upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header),.upyx-v4-global-panel:not(.ux-section),.upyx-v4-work-card:not(.ux-section){border-radius:18px;padding:16px;}
  .chiffrage-hero:not(.ux-page-header) h2{font-size:1.55rem;}
  .chiffrage-hero-actions{display:grid;grid-template-columns:1fr;width:100%;}
  .upyx-v4-primary,.upyx-v4-secondary{width:100%;}
  .upyx-v4-panel-title,.upyx-v4-section-head>div{gap:10px;}
}


/* =========================================================
   SPRINT 004.006 — Chiffrage Upyx Style renforcé
   Objectif : rendu plus premium, plus cockpit, moins écran technique.
========================================================= */
.chiffrage-v4-page:not(.ux-page){
  position:relative;
}
.chiffrage-v4-page::before{
  content:"";
  position:absolute;
  inset:0 auto 0 -18px;
  width:4px;
  border-radius:999px;
  background:linear-gradient(180deg,#ef7d00,#fed7aa 45%,transparent 100%);
  opacity:.95;
}
.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header){
  position:relative;
  overflow:hidden;
  min-height:168px;
  padding:28px;
}
.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header)::before{
  content:"";
  position:absolute;
  right:-80px;
  top:-95px;
  width:260px;
  height:260px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(239,125,0,.42),rgba(239,125,0,0) 68%);
}
.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header)::after{
  content:"Upyx Chiffrage";
  position:absolute;
  right:24px;
  bottom:18px;
  color:rgba(255,255,255,.08);
  font-size:42px;
  font-weight:950;
  letter-spacing:-1.5px;
  pointer-events:none;
}
.chiffrage-hero > *{position:relative;z-index:1;}
.chiffrage-hero:not(.ux-page-header) h2{
  font-size:2.22rem;
  letter-spacing:-.04em;
}
.chiffrage-hero:not(.ux-page-header) p{
  font-size:1rem;
  font-weight:650;
}
.chiffrage-hero-actions .upyx-v4-primary,
.chiffrage-hero-actions .upyx-v4-secondary{
  backdrop-filter:blur(12px);
}
.upyx-chiffrage-flow{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  padding:10px;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:22px;
  box-shadow:0 12px 30px rgba(15,23,42,.055);
}
.upyx-chiffrage-flow button{
  appearance:none;
  border:1px solid rgba(15,23,42,.07);
  background:linear-gradient(180deg,#fff,#f8fafc);
  border-radius:16px;
  min-height:74px;
  padding:12px 12px 11px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  text-align:left;
  cursor:pointer;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.upyx-chiffrage-flow button:hover{
  transform:translateY(-2px);
  border-color:rgba(239,125,0,.45);
  box-shadow:0 12px 24px rgba(239,125,0,.10);
}
.upyx-chiffrage-flow span{
  color:#ef7d00;
  font-size:11px;
  font-weight:950;
  letter-spacing:.08em;
}
.upyx-chiffrage-flow strong{
  color:#0f172a;
  font-size:14px;
  font-weight:950;
}
.upyx-chiffrage-flow small{
  color:#667085;
  font-size:11px;
  font-weight:750;
}
.upyx-v4-global-panel:not(.ux-section),
.upyx-v4-work-card:not(.ux-section){
  position:relative;
  overflow:hidden;
}
.upyx-v4-global-panel:not(.ux-section)::after,
.upyx-v4-work-card:not(.ux-section)::after{
  content:"";
  position:absolute;
  left:0;right:0;top:0;height:4px;
  background:linear-gradient(90deg,#ef7d00,rgba(239,125,0,.18),transparent);
}
.upyx-v4-panel-title>span,
.upyx-v4-section-head span{
  box-shadow:inset 0 0 0 1px rgba(239,125,0,.16);
}
.chiffrage-param-card,.devis-status,.chiffrage-detected-grid div{
  background:linear-gradient(180deg,#fff 0%,#f8fafc 100%);
  box-shadow:0 8px 20px rgba(15,23,42,.035);
}
.devis-status{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  font-weight:850;
}
.devis-status strong{
  color:#0f172a;
  background:#fff7ed;
  border:1px solid #fed7aa;
  border-radius:999px;
  padding:5px 9px;
  white-space:nowrap;
}
.upyx-premium-result{
  gap:14px;
}
.upyx-premium-result > div{
  position:relative;
  min-height:138px;
  padding:20px;
  border-radius:22px;
  background:linear-gradient(145deg,#111827 0%,#172033 72%,#ef7d00 210%);
  color:#fff;
  overflow:hidden;
}
.upyx-premium-result > div::after{
  content:"";
  position:absolute;
  right:-36px;
  bottom:-46px;
  width:120px;
  height:120px;
  border-radius:50%;
  background:rgba(239,125,0,.25);
}
.upyx-premium-result small{
  color:rgba(255,255,255,.72)!important;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.upyx-premium-result strong{
  color:#fff!important;
  font-size:1.72rem!important;
  position:relative;
  z-index:1;
}
.upyx-premium-result em{
  display:block;
  margin-top:10px;
  color:#fed7aa;
  font-style:normal;
  font-weight:800;
  position:relative;
  z-index:1;
}
.upyx-chiffrage-principle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:16px 18px;
  border-radius:20px;
  background:#fff7ed;
  border:1px solid #fed7aa;
  color:#9a3412;
}
.upyx-chiffrage-principle span{
  background:#ef7d00;
  color:#fff;
  border-radius:999px;
  padding:7px 11px;
  font-size:12px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.04em;
  white-space:nowrap;
}
.upyx-chiffrage-principle strong{
  font-size:14px;
  line-height:1.35;
}
.chiffrage-v4-page .table-box{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 10px 24px rgba(15,23,42,.04);
}
.chiffrage-v4-page table:not(.ux-table) tbody tr:hover{
  background:#fff7ed!important;
}
.bibliotheque-rubriques-panel .rubrique-card,
.upyx-module-card.accent-orange{
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.bibliotheque-rubriques-panel .rubrique-card:hover,
.upyx-module-card.accent-orange:hover{
  transform:translateY(-2px);
  border-color:rgba(239,125,0,.45)!important;
  box-shadow:0 14px 28px rgba(239,125,0,.10)!important;
}
@media(max-width:1100px){
  .upyx-chiffrage-flow{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:700px){
  .chiffrage-v4-page::before{display:none;}
  .upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header){min-height:auto;padding:18px;}
  .upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header)::after{display:none;}
  .upyx-chiffrage-flow{grid-template-columns:1fr 1fr;border-radius:18px;}
  .upyx-chiffrage-flow button{min-height:66px;padding:10px;}
  .upyx-chiffrage-principle{display:block;}
  .upyx-chiffrage-principle strong{display:block;margin-top:10px;}
}

/* =========================================================
   SPRINT 004.007 — Présentation Upyx Style colorée
   Objectif : abandon des bandeaux noirs dans Chiffrage,
   pages plus colorées, plus lisibles et plus identitaires.
========================================================= */
:root{
  --upyx-chiffrage:#ef7d00;
  --upyx-chiffrage-soft:#fff7ed;
  --upyx-chiffrage-border:#fed7aa;
  --upyx-chiffrage-text:#9a3412;
  --upyx-control:#dc2626;
  --upyx-control-soft:#fef2f2;
  --upyx-project-soft:#eff6ff;
  --upyx-project-border:#bfdbfe;
  --upyx-success-soft:#ecfdf5;
  --upyx-success-border:#bbf7d0;
  --upyx-purple-soft:#f5f3ff;
  --upyx-purple-border:#ddd6fe;
}

/* Fond de page Chiffrage : plus clair, plus produit */
.chiffrage-v4-page:not(.ux-page){
  background:
    radial-gradient(circle at top left, rgba(239,125,0,.10), transparent 36%),
    radial-gradient(circle at 92% 12%, rgba(59,130,246,.10), transparent 30%),
    linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  border-radius:30px;
  padding:2px;
}
.chiffrage-v4-page::before{
  background:linear-gradient(180deg,#ef7d00,#3b82f6 46%,#22c55e 76%,transparent 100%);
}

/* Hero : remplacement du bandeau noir par une signature bleue/orange douce */
.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header){
  background:
    radial-gradient(circle at 84% 14%, rgba(239,125,0,.22), transparent 34%),
    linear-gradient(135deg,#ffffff 0%,#eff6ff 48%,#fff7ed 100%)!important;
  color:#0f172a!important;
  border:1px solid rgba(59,130,246,.20)!important;
  box-shadow:0 18px 42px rgba(15,23,42,.08)!important;
}
.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header)::before{
  background:radial-gradient(circle,rgba(239,125,0,.20),rgba(239,125,0,0) 68%)!important;
}
.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header)::after{
  color:rgba(239,125,0,.10)!important;
}
.chiffrage-hero:not(.ux-page-header) h2{color:#0f172a!important;}
.chiffrage-hero:not(.ux-page-header) p{color:#475467!important;}
.chiffrage-hero .upyx-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#ef7d00!important;
  background:#fff7ed;
  border:1px solid #fed7aa;
  border-radius:999px;
  padding:7px 11px;
  font-weight:950;
}
.chiffrage-hero-actions .upyx-v4-primary{
  background:linear-gradient(135deg,#ef7d00,#fb923c)!important;
  color:#fff!important;
  border-color:#fdba74!important;
}
.chiffrage-hero-actions .upyx-v4-secondary{
  background:#ffffff!important;
  color:#0f172a!important;
  border-color:#dbe4f0!important;
  box-shadow:0 8px 18px rgba(15,23,42,.05)!important;
}

/* Sections : la couleur remplace le bandeau sombre */
.upyx-v4-global-panel:not(.ux-section),
.upyx-v4-work-card:not(.ux-section){
  border:1px solid rgba(15,23,42,.07)!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 14px 34px rgba(15,23,42,.055)!important;
}
.upyx-v4-global-panel:not(.ux-section)::after,
.upyx-v4-work-card:not(.ux-section)::after{
  height:6px!important;
  background:linear-gradient(90deg,#3b82f6 0%,#22c55e 34%,#ef7d00 68%,#a855f7 100%)!important;
}
.upyx-v4-panel-title>span,
.upyx-v4-section-head span{
  background:linear-gradient(135deg,#fff7ed,#eff6ff)!important;
  color:#ef7d00!important;
  border:1px solid rgba(239,125,0,.18)!important;
}
.upyx-v4-panel-title h3,
.upyx-v4-section-head h3{
  color:#0f172a!important;
}

/* Parcours : cartes de navigation plus colorées */
.upyx-chiffrage-flow{
  background:linear-gradient(135deg,#ffffff,#f8fafc)!important;
}
.upyx-chiffrage-flow button:nth-child(1){background:linear-gradient(180deg,#eff6ff,#fff)!important;border-color:#bfdbfe!important;}
.upyx-chiffrage-flow button:nth-child(2){background:linear-gradient(180deg,#fff7ed,#fff)!important;border-color:#fed7aa!important;}
.upyx-chiffrage-flow button:nth-child(3){background:linear-gradient(180deg,#ecfdf5,#fff)!important;border-color:#bbf7d0!important;}
.upyx-chiffrage-flow button:nth-child(4){background:linear-gradient(180deg,#f5f3ff,#fff)!important;border-color:#ddd6fe!important;}
.upyx-chiffrage-flow button:nth-child(5){background:linear-gradient(180deg,#fef2f2,#fff)!important;border-color:#fecaca!important;}
.upyx-chiffrage-flow button:nth-child(6){background:linear-gradient(180deg,#f0f9ff,#fff)!important;border-color:#bae6fd!important;}
.upyx-chiffrage-flow button:nth-child(1) span{color:#2563eb!important;}
.upyx-chiffrage-flow button:nth-child(2) span{color:#ef7d00!important;}
.upyx-chiffrage-flow button:nth-child(3) span{color:#16a34a!important;}
.upyx-chiffrage-flow button:nth-child(4) span{color:#7c3aed!important;}
.upyx-chiffrage-flow button:nth-child(5) span{color:#dc2626!important;}
.upyx-chiffrage-flow button:nth-child(6) span{color:#0284c7!important;}

/* KPI et statuts : plus de blocs noirs, cartes colorées douces */
.chiffrage-param-card,
.devis-status,
.chiffrage-detected-grid div{
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%)!important;
  border-color:rgba(15,23,42,.08)!important;
}
.chiffrage-param-grid .chiffrage-param-card:nth-child(1),
.devis-status-grid .devis-status:nth-child(1){background:linear-gradient(180deg,#eff6ff,#fff)!important;border-color:#bfdbfe!important;}
.chiffrage-param-grid .chiffrage-param-card:nth-child(2),
.devis-status-grid .devis-status:nth-child(2){background:linear-gradient(180deg,#ecfdf5,#fff)!important;border-color:#bbf7d0!important;}
.chiffrage-param-grid .chiffrage-param-card:nth-child(3),
.devis-status-grid .devis-status:nth-child(3){background:linear-gradient(180deg,#fff7ed,#fff)!important;border-color:#fed7aa!important;}
.chiffrage-param-grid .chiffrage-param-card:nth-child(4),
.devis-status-grid .devis-status:nth-child(4){background:linear-gradient(180deg,#f5f3ff,#fff)!important;border-color:#ddd6fe!important;}
.chiffrage-param-card strong{color:#0f172a!important;}
.chiffrage-param-card small{color:#475467!important;}

/* Résultats commerciaux : remplacement des cartes sombres par des widgets lumineux */
.upyx-premium-result > div{
  background:linear-gradient(145deg,#ffffff 0%,#fff7ed 58%,#eff6ff 100%)!important;
  color:#0f172a!important;
  border:1px solid rgba(239,125,0,.22)!important;
  box-shadow:0 14px 30px rgba(15,23,42,.06)!important;
}
.upyx-premium-result > div:nth-child(2){background:linear-gradient(145deg,#ffffff 0%,#ecfdf5 58%,#eff6ff 100%)!important;border-color:#bbf7d0!important;}
.upyx-premium-result > div:nth-child(3){background:linear-gradient(145deg,#ffffff 0%,#f5f3ff 58%,#fff7ed 100%)!important;border-color:#ddd6fe!important;}
.upyx-premium-result > div::after{background:rgba(239,125,0,.12)!important;}
.upyx-premium-result small{color:#667085!important;}
.upyx-premium-result strong{color:#0f172a!important;}
.upyx-premium-result em{color:#ef7d00!important;}

/* Tableaux : plus de header noir, intégration carte métier */
.chiffrage-v4-page .table-box{
  border:1px solid rgba(15,23,42,.08)!important;
  background:#fff!important;
  border-radius:22px!important;
  box-shadow:0 12px 28px rgba(15,23,42,.045)!important;
}
.chiffrage-v4-page table:not(.ux-table) th{
  background:linear-gradient(135deg,#fff7ed,#eff6ff)!important;
  color:#0f172a!important;
  border-bottom:1px solid rgba(239,125,0,.20)!important;
}
.chiffrage-v4-page table:not(.ux-table) td{
  border-bottom:1px solid rgba(15,23,42,.06)!important;
}
.chiffrage-v4-page table:not(.ux-table) tbody tr:nth-child(even){background:#fbfdff!important;}
.chiffrage-v4-page table:not(.ux-table) tbody tr:hover{background:#fff7ed!important;}

/* Détails techniques : suppression visuelle de l'effet bandeau */
.devis-technical-details.upyx-v4-work-card:not(.ux-section) summary{
  background:linear-gradient(135deg,#eff6ff,#fff7ed)!important;
  color:#0f172a!important;
  border-bottom:1px solid rgba(15,23,42,.07)!important;
}

/* Anciennes classes sombres dans Chiffrage neutralisées */
.chiffrage-v4-page .devis-total,
.chiffrage-v4-page .result,
.chiffrage-v4-page .kpi{
  background:linear-gradient(145deg,#ffffff,#fff7ed)!important;
  color:#0f172a!important;
  border:1px solid #fed7aa!important;
}
.chiffrage-v4-page .devis-total small,
.chiffrage-v4-page .result small,
.chiffrage-v4-page .kpi small{color:#667085!important;}
.chiffrage-v4-page .devis-total strong,
.chiffrage-v4-page .result span,
.chiffrage-v4-page .kpi strong{color:#ef7d00!important;}

@media(max-width:700px){
  .chiffrage-v4-page:not(.ux-page){border-radius:20px;padding:0;}
  .upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header){border-radius:20px!important;}
  .upyx-chiffrage-flow button{border-radius:15px!important;}
}

/* =========================================================
   SPRINT 004.008 — Hero Chiffrage épuré
   Objectif : suppression du filigrane redondant "Upyx Chiffrage"
   pour un rendu plus premium et plus calme.
========================================================= */
.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header)::after{
  content:none!important;
  display:none!important;
}
.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header){
  min-height:150px;
  padding:30px 32px;
}
.chiffrage-hero:not(.ux-page-header) h2{
  margin-top:10px;
  margin-bottom:10px;
}
.chiffrage-hero:not(.ux-page-header) p{
  max-width:820px;
}
@media(max-width:700px){
  .upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header){
    min-height:auto;
    padding:20px;
  }
}

.devis-status-icon{margin-right:6px;color:#ef7d00;vertical-align:-4px;}

/* Sprint004-010 — Synthèse Chantier V4 Premium : fusion Dashboard + Synthèse */
.upyx-synthese-v4{
  display:flex;
  flex-direction:column;
  gap:22px;
}
.upyx-synthese-hero{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1fr) 280px;
  gap:22px;
  align-items:stretch;
  padding:28px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:28px;
  background:
    radial-gradient(circle at 90% 0%, rgba(239,125,0,.14), transparent 30%),
    linear-gradient(135deg, #f8fbff 0%, #ffffff 50%, #fff7ef 100%);
  box-shadow:0 22px 55px rgba(15,23,42,.08);
}
.upyx-synthese-hero::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:7px;
  background:linear-gradient(180deg,#1d4ed8,#ef7d00);
}
.upyx-synthese-hero-main{position:relative;z-index:1;}
.upyx-synthese-hero .eyebrow{
  color:#ef7d00;
  font-weight:800;
  letter-spacing:.09em;
  text-transform:uppercase;
  font-size:.78rem;
}
.upyx-synthese-hero h1{
  margin:8px 0 10px;
  font-size:clamp(2rem,4vw,3.1rem);
  line-height:1.02;
  color:#0f172a;
}
.upyx-synthese-hero p{
  margin:0;
  max-width:760px;
  color:#526175;
  font-size:1.02rem;
  line-height:1.55;
}
.upyx-synthese-meta{
  margin-top:18px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.upyx-synthese-meta span{
  padding:8px 12px;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 8px 20px rgba(15,23,42,.05);
  color:#334155;
  font-size:.9rem;
}
.upyx-synthese-status-card{
  position:relative;
  z-index:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
  padding:22px;
  border-radius:24px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 16px 38px rgba(15,23,42,.08);
}
.upyx-synthese-status-card strong{
  font-size:2.55rem;
  line-height:1;
  color:#0f172a;
}
.upyx-synthese-status-card small{color:#64748b;font-weight:700;}
.upyx-synthese-status-card em{
  font-style:normal;
  display:inline-flex;
  width:max-content;
  margin-top:4px;
  padding:7px 10px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-weight:800;
  font-size:.82rem;
}
.upyx-synthese-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}
.upyx-synthese-kpi{
  position:relative;
  overflow:hidden;
  min-height:132px;
  padding:20px;
  border-radius:24px;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  box-shadow:0 16px 36px rgba(15,23,42,.07);
}
.upyx-synthese-kpi::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:#1d4ed8;
}
.upyx-synthese-kpi span{display:block;color:#64748b;font-weight:800;font-size:.85rem;text-transform:uppercase;letter-spacing:.06em;}
.upyx-synthese-kpi strong{display:block;margin-top:12px;color:#0f172a;font-size:1.75rem;line-height:1.05;}
.upyx-synthese-kpi small{display:block;margin-top:10px;color:#64748b;font-weight:700;}
.upyx-synthese-kpi.kpi-green::before{background:#16a34a;}
.upyx-synthese-kpi.kpi-orange::before{background:#ef7d00;}
.upyx-synthese-kpi.kpi-purple::before{background:#7c3aed;}
.upyx-synthese-grid{
  display:grid;
  grid-template-columns:1.35fr 1fr;
  gap:18px;
}
.upyx-synthese-panel{
  padding:22px;
  border-radius:26px;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  box-shadow:0 16px 42px rgba(15,23,42,.07);
}
.upyx-synthese-panel .upyx-v4-panel-head{margin-bottom:16px;}
.upyx-synthese-panel h2{
  margin:0;
  font-size:1.16rem;
  color:#0f172a;
}
.upyx-synthese-panel.panel-blue{background:linear-gradient(180deg,#f8fbff,#fff);}
.upyx-synthese-panel.panel-orange{background:linear-gradient(180deg,#fff7ed,#fff);}
.upyx-synthese-panel.panel-green{background:linear-gradient(180deg,#f0fdf4,#fff);}
.upyx-synthese-panel.panel-purple{background:linear-gradient(180deg,#f5f3ff,#fff);}
.upyx-synthese-panel.panel-neutral{background:linear-gradient(180deg,#f8fafc,#fff);}
.upyx-synthese-modules .upyx-v4-module-card{
  text-align:left;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}
.upyx-synthese-modules .upyx-v4-module-card strong{
  color:#475569;
  font-size:.84rem;
}
.upyx-synthese-check{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:13px 0;
  border-bottom:1px solid rgba(15,23,42,.08);
}
.upyx-synthese-check:last-child{border-bottom:0;}
.upyx-synthese-check span{color:#64748b;font-weight:700;}
.upyx-synthese-check strong{color:#0f172a;text-align:right;}
.upyx-synthese-actions{
  margin-top:0;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}
.upyx-synthese-actions button{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
@media (max-width: 980px){
  .upyx-synthese-hero,
  .upyx-synthese-grid{grid-template-columns:1fr;}
  .upyx-synthese-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 640px){
  .upyx-synthese-hero{padding:22px 18px;border-radius:22px;}
  .upyx-synthese-kpi-grid{grid-template-columns:1fr;}
  .upyx-synthese-panel{padding:18px;border-radius:22px;}
  .upyx-synthese-status-card strong{font-size:2.1rem;}
}

/* Sprint 004.013 — Fiche Projet Upyx Style + icônes CSS fiables */
.upyx-project-form-grid label,.upyx-project-notes{background:#f8fafc;border:1px solid #e2e8f0;border-radius:18px;padding:12px;color:#334155;}
.upyx-project-form-grid input,.upyx-project-form-grid select,.upyx-project-notes textarea{background:#fff;border-color:#dbe3ee;border-radius:14px;}
.upyx-css-icon{width:26px;height:26px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-right:8px;position:relative;flex:0 0 auto;background:#eff6ff;color:#2563eb;}
.upyx-css-icon i,.upyx-css-icon i:before,.upyx-css-icon i:after{content:"";display:block;position:absolute;box-sizing:border-box;border-color:currentColor;}
.upyx-css-icon-blue{background:#eff6ff;color:#2563eb}.upyx-css-icon-green{background:#ecfdf5;color:#16a34a}.upyx-css-icon-orange{background:#fff7ed;color:#ea580c}.upyx-css-icon-purple{background:#f5f3ff;color:#7c3aed}.upyx-css-icon-brown{background:#f5f0e8;color:#92400e}
.upyx-css-icon .wall{width:16px;height:12px;border:2px solid currentColor;border-radius:2px;}.upyx-css-icon .wall:before{width:2px;height:12px;background:currentColor;left:6px;top:-2px;}.upyx-css-icon .wall:after{width:16px;height:2px;background:currentColor;left:-2px;top:4px;}
.upyx-css-icon .roof{width:0;height:0;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:14px solid currentColor;background:transparent;}
.upyx-css-icon .home{width:14px;height:10px;border:2px solid currentColor;border-top:0;bottom:6px;}.upyx-css-icon .home:before{width:13px;height:13px;border-left:2px solid currentColor;border-top:2px solid currentColor;transform:rotate(45deg);left:-1px;top:-7px;}
.upyx-css-icon .shield{width:14px;height:16px;border:2px solid currentColor;border-radius:8px 8px 10px 10px;}.upyx-css-icon .texture{width:16px;height:16px;border:2px solid currentColor;border-radius:3px;}.upyx-css-icon .texture:before{width:2px;height:16px;background:currentColor;left:5px;top:-2px;}.upyx-css-icon .texture:after{width:16px;height:2px;background:currentColor;left:-2px;top:5px;}
.upyx-css-icon .drop{width:12px;height:16px;border:2px solid currentColor;border-radius:10px 10px 10px 2px;transform:rotate(45deg);}.upyx-css-icon .chart{width:16px;height:12px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;}.upyx-css-icon .chart:before{width:3px;height:7px;background:currentColor;left:3px;bottom:0;}.upyx-css-icon .chart:after{width:3px;height:11px;background:currentColor;left:9px;bottom:0;}
.upyx-css-icon .settings{width:14px;height:14px;border:2px solid currentColor;border-radius:50%;}.upyx-css-icon .settings:before{width:4px;height:4px;border-radius:50%;background:currentColor;left:3px;top:3px;}
.upyx-css-icon .layers{width:16px;height:10px;border:2px solid currentColor;border-radius:3px;}.upyx-css-icon .layers:before{width:16px;height:10px;border:2px solid currentColor;border-radius:3px;left:-4px;top:4px;opacity:.55;}.upyx-css-icon .file{width:13px;height:16px;border:2px solid currentColor;border-radius:2px;}.upyx-css-icon .grid{width:16px;height:16px;border:2px solid currentColor;border-radius:3px;}.upyx-css-icon .grid:before{width:2px;height:16px;background:currentColor;left:5px;top:-2px;}.upyx-css-icon .grid:after{width:16px;height:2px;background:currentColor;left:-2px;top:5px;}.upyx-css-icon .cube{width:14px;height:14px;border:2px solid currentColor;transform:rotate(45deg);}.upyx-css-icon .image{width:16px;height:13px;border:2px solid currentColor;border-radius:3px;}.upyx-css-icon .image:before{width:4px;height:4px;border-radius:50%;background:currentColor;left:2px;top:2px;}
.quant-source{display:flex;align-items:center;gap:6px;}.summary-section summary{display:flex;align-items:center;gap:6px;}

/* =========================================================
   Sprint 004.014 — Synthèse Chantier épurée
   Objectif : une seule lecture, KPI essentiels, checklist,
   points d'attention uniquement.
========================================================= */
.upyx-synthese-epuree{
  max-width:1180px;
  margin:0 auto;
}
.upyx-synthese-hero-clean{
  background:linear-gradient(135deg,#f8fbff 0%,#ffffff 48%,#fff7ed 100%);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 18px 46px rgba(15,23,42,.08);
  overflow:hidden;
}
.upyx-synthese-hero-clean::before{display:none;}
.upyx-synthese-hero-clean h1{
  font-size:clamp(2rem,4vw,3.2rem);
  letter-spacing:-.055em;
  margin-bottom:12px;
}
.upyx-synthese-hero-clean p{
  max-width:760px;
  font-size:1.03rem;
  line-height:1.55;
}
.upyx-synthese-status-clean{
  min-width:240px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(239,125,0,.18);
}
.upyx-synthese-status-clean strong{
  font-size:3.15rem;
  letter-spacing:-.06em;
}
.upyx-synthese-essential-kpis{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin:18px 0;
}
.upyx-synthese-essential-kpis .upyx-synthese-kpi{
  min-height:142px;
}
.upyx-synthese-clean-grid{
  display:grid;
  grid-template-columns:1.35fr .85fr;
  gap:18px;
  margin-bottom:18px;
}
.upyx-synthese-panel .upyx-v4-panel-head p{
  margin:4px 0 0;
  color:#64748b;
  font-weight:700;
  font-size:.92rem;
}
.upyx-synthese-progress-panel,
.upyx-synthese-attention-panel,
.upyx-synthese-checklist-panel{
  box-shadow:0 16px 38px rgba(15,23,42,.06);
}
.upyx-attention-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.upyx-attention-empty,
.upyx-attention-item{
  border-radius:16px;
  padding:14px 16px;
  font-weight:800;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  color:#0f172a;
}
.upyx-attention-empty{
  background:linear-gradient(135deg,#f0fdf4,#fff);
  color:#166534;
  border-color:rgba(22,163,74,.18);
}
.upyx-attention-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.upyx-attention-item small{
  display:block;
  color:#64748b;
  font-weight:700;
  margin-top:3px;
}
.upyx-attention-item.warning{border-color:rgba(245,158,11,.22);background:linear-gradient(135deg,#fffbeb,#fff);}
.upyx-attention-item.danger{border-color:rgba(220,38,38,.18);background:linear-gradient(135deg,#fef2f2,#fff);}
.upyx-attention-item .tag{
  flex:0 0 auto;
  border-radius:999px;
  padding:6px 10px;
  background:#fff7ed;
  color:#9a3412;
  font-size:.78rem;
  font-weight:900;
}
.upyx-synthese-checklist{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
.upyx-checkline{
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  border-radius:16px;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
  transition:.18s ease;
  text-align:left;
}
.upyx-checkline:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 26px rgba(15,23,42,.08);
  border-color:rgba(239,125,0,.28);
}
.upyx-checkline span{
  display:flex;
  align-items:center;
  gap:10px;
  color:#0f172a;
  font-weight:900;
}
.upyx-checkline strong{
  font-size:.85rem;
  color:#64748b;
  white-space:nowrap;
}
.upyx-dot{
  width:10px;
  height:10px;
  display:inline-block;
  border-radius:999px;
  background:#cbd5e1;
  box-shadow:0 0 0 4px rgba(203,213,225,.2);
}
.upyx-checkline.complete .upyx-dot{background:#16a34a;box-shadow:0 0 0 4px rgba(22,163,74,.13);}
.upyx-checkline.partial .upyx-dot{background:#f59e0b;box-shadow:0 0 0 4px rgba(245,158,11,.14);}
.upyx-checkline.empty .upyx-dot{background:#cbd5e1;box-shadow:0 0 0 4px rgba(203,213,225,.20);}
.upyx-checkline.complete strong{color:#166534;}
.upyx-checkline.partial strong{color:#9a3412;}
.upyx-checkline.empty strong{color:#64748b;}
.upyx-hidden-legacy{display:none!important;}
.upyx-synthese-actions-clean{
  justify-content:flex-start;
  margin-top:8px;
}
@media(max-width:980px){
  .upyx-synthese-clean-grid,
  .upyx-synthese-essential-kpis{grid-template-columns:1fr 1fr;}
}
@media(max-width:640px){
  .upyx-synthese-clean-grid,
  .upyx-synthese-essential-kpis,
  .upyx-synthese-checklist{grid-template-columns:1fr;}
  .upyx-checkline{align-items:flex-start;flex-direction:column;}
  .upyx-synthese-status-clean{min-width:0;width:100%;}
}

/* =========================================================
   Sprint 004.015 — Chantier Cockpit
   Objectif : répondre à "que dois-je faire maintenant ?"
========================================================= */
.upyx-chantier-cockpit{
  max-width:1120px;
  margin:0 auto;
}
.upyx-chantier-hero{
  background:linear-gradient(135deg,#f8fbff 0%,#ffffff 52%,#fff7ed 100%);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 18px 46px rgba(15,23,42,.07);
  overflow:hidden;
}
.upyx-chantier-hero::before{display:none;}
.upyx-chantier-hero h1{
  font-size:clamp(2.1rem,4vw,3.35rem);
  letter-spacing:-.06em;
  margin-bottom:10px;
}
.upyx-chantier-hero p{
  max-width:760px;
  font-size:1.06rem;
  line-height:1.55;
  color:#334155;
}
.upyx-chantier-score-card{
  position:relative;
  z-index:1;
  min-width:238px;
  padding:20px;
  border-radius:24px;
  background:rgba(255,255,255,.93);
  border:1px solid rgba(239,125,0,.18);
  box-shadow:0 18px 36px rgba(15,23,42,.08);
}
.upyx-chantier-score-card strong{
  display:block;
  margin-top:14px;
  color:#0f172a;
  font-size:3.2rem;
  line-height:1;
  letter-spacing:-.065em;
}
.upyx-chantier-score-card small{
  display:block;
  margin-top:6px;
  color:#64748b;
  font-weight:800;
}
.upyx-chantier-score-card em{
  display:inline-flex;
  margin-top:12px;
  padding:7px 10px;
  border-radius:999px;
  background:#fff7ed;
  color:#9a3412;
  font-style:normal;
  font-weight:900;
  font-size:.78rem;
}
.upyx-chantier-brief{
  margin:18px 0;
  padding:24px;
  border-radius:28px;
  border:1px solid rgba(15,23,42,.08);
  background:linear-gradient(135deg,#eff6ff,#fff 58%,#f8fafc);
  box-shadow:0 16px 38px rgba(15,23,42,.055);
  display:grid;
  grid-template-columns:auto 1fr;
  gap:18px;
  align-items:flex-start;
}
.upyx-brief-icon{
  width:46px;
  height:46px;
  border-radius:18px;
  background:#0f4c81;
  color:#fff;
  display:grid;
  place-items:center;
  box-shadow:0 14px 24px rgba(15,76,129,.18);
}
.upyx-brief-icon .material-symbols-rounded{font-size:26px;line-height:1;}
.upyx-brief-label{
  display:block;
  color:#0f4c81;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.76rem;
  font-weight:950;
  margin-bottom:7px;
}
.upyx-chantier-brief h2{
  margin:0;
  color:#0f172a;
  font-size:clamp(1.35rem,2.4vw,2rem);
  letter-spacing:-.035em;
}
.upyx-chantier-brief p{
  margin:8px 0 0;
  max-width:820px;
  color:#475569;
  font-weight:750;
  line-height:1.55;
}
.upyx-chantier-kpis{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
  margin:18px 0;
}
.upyx-chantier-kpis .upyx-synthese-kpi{
  min-height:132px;
  box-shadow:0 14px 30px rgba(15,23,42,.055);
}
.upyx-synthese-kpi.kpi-neutral::before{background:#64748b;}
.upyx-chantier-main-grid{
  display:grid;
  grid-template-columns:1.12fr .88fr;
  gap:18px;
  margin-bottom:18px;
}
.upyx-work-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.upyx-work-item{
  width:100%;
  border:1px solid rgba(15,23,42,.08);
  border-radius:18px;
  background:#fff;
  padding:15px 16px;
  display:flex;
  align-items:flex-start;
  gap:13px;
  cursor:pointer;
  text-align:left;
  transition:.18s ease;
}
.upyx-work-item:hover{
  transform:translateY(-1px);
  border-color:rgba(239,125,0,.28);
  box-shadow:0 12px 26px rgba(15,23,42,.08);
}
.upyx-work-item > .material-symbols-rounded{
  color:#f59e0b;
  font-size:22px;
  margin-top:1px;
}
.upyx-work-item.done > .material-symbols-rounded{color:#16a34a;}
.upyx-work-item strong{
  display:block;
  color:#0f172a;
  font-weight:950;
}
.upyx-work-item small{
  display:block;
  margin-top:3px;
  color:#64748b;
  font-weight:750;
}
.upyx-chantier-domain-list{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.upyx-chantier-actions{
  gap:10px;
  margin-top:18px;
  justify-content:flex-start;
  flex-wrap:wrap;
}
.upyx-chantier-actions button{
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.upyx-chantier-actions .material-symbols-rounded{font-size:20px;line-height:1;}
@media(max-width:1040px){
  .upyx-chantier-kpis{grid-template-columns:repeat(3,minmax(0,1fr));}
  .upyx-chantier-main-grid{grid-template-columns:1fr;}
  .upyx-chantier-domain-list{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:720px){
  .upyx-chantier-brief{grid-template-columns:1fr;padding:20px;border-radius:24px;}
  .upyx-chantier-kpis,
  .upyx-chantier-domain-list{grid-template-columns:1fr;}
  .upyx-chantier-score-card{min-width:0;width:100%;}
}

/* =========================================================
   Sprint 004.017 — Entrée projet neutre + vues Projet premium
========================================================= */
.upyx-start-screen{max-width:1180px;margin:0 auto;padding:26px 6px 40px;display:grid;gap:22px}
.upyx-start-hero{background:linear-gradient(135deg,#f7fbff 0%,#fff8f1 100%);border:1px solid rgba(30,64,175,.10);border-radius:28px;padding:36px;box-shadow:0 22px 70px rgba(15,23,42,.08);position:relative;overflow:hidden}
.upyx-start-hero:before{content:"";position:absolute;right:-80px;top:-80px;width:260px;height:260px;border-radius:50%;background:rgba(251,146,60,.12)}
.upyx-start-eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:.14em;font-weight:800;color:#2563eb;margin-bottom:10px}
.upyx-start-hero h1{margin:0;color:#0f172a;font-size:clamp(2rem,4vw,3.6rem);letter-spacing:-.05em}
.upyx-start-hero p{max-width:720px;margin:14px 0 0;color:#64748b;font-size:1.05rem;line-height:1.7}
.upyx-start-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:24px}.upyx-start-actions button{display:inline-flex;align-items:center;gap:8px}
.upyx-start-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.upyx-start-card{background:#fff;border:1px solid rgba(15,23,42,.08);border-radius:22px;padding:22px;box-shadow:0 16px 44px rgba(15,23,42,.06);border-top:5px solid #3b82f6}.upyx-start-card.card-green{border-top-color:#10b981}.upyx-start-card.card-orange{border-top-color:#f97316}.upyx-start-card .material-symbols-rounded{font-size:28px;color:#2563eb}.upyx-start-card.card-green .material-symbols-rounded{color:#059669}.upyx-start-card.card-orange .material-symbols-rounded{color:#ea580c}.upyx-start-card h3{margin:12px 0 6px;color:#0f172a}.upyx-start-card p{margin:0;color:#64748b;line-height:1.55}
#dashboard .upyx-synthese-hero,#resume .chantier-hero{box-shadow:0 20px 60px rgba(15,23,42,.07)}
#dashboard .upyx-synthese-kpi-grid{margin-top:18px}
#resume .premium-family,#dashboard .upyx-synthese-panel{border-radius:24px;border:1px solid rgba(15,23,42,.08);box-shadow:0 16px 44px rgba(15,23,42,.055)}
@media(max-width:820px){.upyx-start-hero{padding:26px 20px}.upyx-start-grid{grid-template-columns:1fr}.upyx-start-actions{flex-direction:column}.upyx-start-actions button{width:100%;justify-content:center}}

/* Sprint 004.018 — Projet / vues Upyx Style */
.material-symbols-rounded{
  font-family:'Material Symbols Rounded';
  font-weight:normal;
  font-style:normal;
  font-size:22px;
  line-height:1;
  letter-spacing:normal;
  text-transform:none;
  display:inline-flex;
  white-space:nowrap;
  word-wrap:normal;
  direction:ltr;
  -webkit-font-feature-settings:'liga';
  -webkit-font-smoothing:antialiased;
  font-feature-settings:'liga';
  align-items:center;
  justify-content:center;
}
.upyx-inline-symbol{font-size:21px;color:#2563eb;margin-right:8px;vertical-align:middle;}
.chantier-actions button,
.upyx-synthese-actions button,
.upyx-project-actions button,
.upyx-start-actions button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}

/* Projet > Vue d'ensemble */
.upyx-chantier-cockpit{
  --upyx-view-blue:#2563eb;
  --upyx-view-green:#16a34a;
  --upyx-view-orange:#ea580c;
  --upyx-view-purple:#7c3aed;
}
.upyx-chantier-hero{
  background:linear-gradient(135deg,#f8fbff 0%,#fff7ed 100%)!important;
  border:1px solid rgba(37,99,235,.12)!important;
  box-shadow:0 18px 48px rgba(15,23,42,.07)!important;
}
.upyx-chantier-brief,
.upyx-chantier-main-grid .upyx-synthese-panel,
.upyx-chantier-domains-panel{
  border:1px solid rgba(15,23,42,.08)!important;
  box-shadow:0 14px 36px rgba(15,23,42,.055)!important;
}
.upyx-chantier-brief{align-items:flex-start!important;}
.upyx-brief-icon{
  width:54px!important;
  height:54px!important;
  min-width:54px!important;
  border-radius:18px!important;
  background:#eff6ff!important;
  color:#2563eb!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}
.upyx-brief-label{color:#2563eb!important;letter-spacing:.12em!important;}
.upyx-work-item,
.upyx-checkline{
  border:1px solid #e2e8f0!important;
  background:#fff!important;
  border-radius:18px!important;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.upyx-work-item:hover,
.upyx-checkline:hover{
  transform:translateY(-1px);
  border-color:#bfdbfe!important;
  box-shadow:0 12px 24px rgba(15,23,42,.07)!important;
}

/* Projet > Informations */
.upyx-project-form-grid label,
.upyx-project-notes{
  background:#fff!important;
  border:1px solid #e2e8f0!important;
  box-shadow:0 8px 18px rgba(15,23,42,.035);
}
.upyx-project-form-grid input,
.upyx-project-form-grid select,
.upyx-project-notes textarea{
  margin-top:8px;
  min-height:42px;
}

/* Projet > Synthèse */
.chantier-premium{
  gap:24px!important;
}
.chantier-hero{
  background:linear-gradient(135deg,#f8fbff 0%,#fff 52%,#fff7ed 100%)!important;
  border:1px solid rgba(37,99,235,.12)!important;
  box-shadow:0 18px 48px rgba(15,23,42,.07)!important;
}
.chantier-hero h2{letter-spacing:-.03em;}
.chantier-hero-status,
.chantier-progress-card,
.module-status,
.premium-family{
  border:1px solid rgba(15,23,42,.08)!important;
  box-shadow:0 12px 30px rgba(15,23,42,.05)!important;
}
.chantier-progress-card{background:#fff!important;border-radius:24px!important;}
.module-status-grid{
  gap:14px!important;
}
.module-status{
  background:#fff!important;
  border-radius:18px!important;
  padding:16px!important;
}
.module-status > span,
.premium-family summary{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
}
.module-status svg{width:21px;height:21px;margin-right:8px;}
.module-status strong{
  color:#475569!important;
  font-size:.88rem!important;
}
.premium-family{
  background:#fff!important;
  border-radius:22px!important;
  overflow:hidden;
}
.premium-family summary{
  padding:18px 20px!important;
  font-weight:850!important;
  color:#0f172a!important;
  background:linear-gradient(180deg,#f8fafc,#fff)!important;
}
.premium-family .premium-lines{
  padding:6px 20px 18px!important;
}
.premium-lines div{
  border-bottom:1px solid #eef2f7!important;
  padding:12px 0!important;
}
.premium-lines div:last-child{border-bottom:0!important;}
.premium-lines span{color:#64748b!important;font-weight:700!important;}
.premium-lines strong{color:#0f172a!important;}
.chantier-actions{gap:10px!important;flex-wrap:wrap!important;}

@media(max-width:780px){
  .upyx-chantier-kpis,
  .module-status-grid,
  .premium-family-grid{grid-template-columns:1fr!important;}
  .chantier-hero,
  .upyx-chantier-hero{padding:22px!important;border-radius:24px!important;}
}

/* =========================================================
   Sprint 005.002 — Projet > Vue d'ensemble : sélection compacte des modules
   Les cartes affichent l'information. Les boutons sélectionnent les modules.
========================================================= */
.upyx-chantier-modules-panel,
.upyx-active-modules-panel{
  border:1px solid rgba(15,23,42,.08)!important;
  box-shadow:0 14px 36px rgba(15,23,42,.055)!important;
}
.upyx-modules-head{
  align-items:flex-start!important;
}
.upyx-select-all-modules{
  display:inline-flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
  min-height:42px;
  padding:9px 13px;
  border:1px solid #bfdbfe;
  border-radius:14px;
  background:#eff6ff;
  color:#1d4ed8;
  font-weight:900;
  cursor:pointer;
  user-select:none;
}
.upyx-select-all-modules input{
  width:18px;
  height:18px;
  accent-color:#f97316;
}
.upyx-module-selector{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  margin-top:18px;
}
.upyx-module-chip{
  min-height:72px;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#fff;
  color:#0f172a;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:16px;
  padding:0 20px;
  cursor:pointer;
  font-weight:950;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.upyx-module-chip .material-symbols-rounded{
  font-size:28px;
  color:#64748b;
  transition:color .16s ease;
}
.upyx-module-chip:hover{
  transform:translateY(-1px);
  border-color:#fed7aa;
  box-shadow:0 14px 28px rgba(15,23,42,.07);
}
.upyx-module-chip.is-active{
  border-color:#fb923c;
  background:linear-gradient(135deg,#fff7ed,#fff);
  color:#ea580c;
  box-shadow:inset 0 0 0 1px rgba(249,115,22,.08), 0 12px 26px rgba(249,115,22,.08);
}
.upyx-module-chip.is-active .material-symbols-rounded{color:#f97316;}
.upyx-active-module-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  min-height:38px;
}
.upyx-active-module-pill{
  border:1px solid #fed7aa;
  border-radius:999px;
  background:#fff7ed;
  color:#ea580c;
  font-weight:950;
  padding:9px 13px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
}
.upyx-active-module-pill .material-symbols-rounded{
  font-size:18px;
}
.upyx-active-module-pill small{
  color:#64748b;
  font-weight:900;
}
.upyx-active-module-empty{
  width:100%;
  border:1px dashed #cbd5e1;
  border-radius:18px;
  background:#f8fafc;
  color:#64748b;
  padding:16px;
  font-weight:850;
}
@media(max-width:1100px){
  .upyx-module-selector{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:640px){
  .upyx-modules-head{gap:14px;}
  .upyx-select-all-modules{width:100%;justify-content:center;}
  .upyx-module-selector{grid-template-columns:1fr;}
  .upyx-module-chip{min-height:60px;padding:0 16px;}
}

/* Sprint 005.004 — Projet > Informations : modules du chantier */
.upyx-module-selector-help{
  margin:14px 0 0;
  color:#64748b;
  font-size:.92rem;
}
#clients .upyx-chantier-modules-panel{
  grid-column:1 / -1;
}
#dashboard .upyx-chantier-modules-panel,
#dashboard .upyx-active-modules-panel{
  display:none !important;
}

/* Sprint 005.005 — Filtre de Synthèse */
.upyx-hidden-status-source{
  display:none !important;
}
.premium-family[hidden],
#resume .upyx-chantier-modules-panel{
  margin: 18px 0 20px;
}

/* =========================================================
   Sprint 005.007 — Sauvegardes hors navigation métier
   Point d'entrée : menu application ⋮ / Espace : pleine page
========================================================= */
.compact-app-menu button{
  display:flex;
  align-items:center;
  gap:10px;
}
.compact-app-menu button .material-symbols-rounded{
  font-size:21px;
  line-height:1;
  color:#f97316;
}
.compact-app-menu button.danger .material-symbols-rounded{color:#991b1b;}

.upyx-backups-page{
  display:flex;
  flex-direction:column;
  gap:22px;
}
.upyx-backups-hero{
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:stretch;
  padding:28px;
  border-radius:28px;
  background:linear-gradient(135deg,#fff7ed 0%,#ffffff 52%,#eff6ff 100%);
  border:1px solid rgba(249,115,22,.16);
  box-shadow:0 18px 48px rgba(15,23,42,.08);
}
.upyx-backups-hero h1{
  margin:6px 0 10px;
  font-size:clamp(2rem,4vw,3.35rem);
  line-height:1;
  letter-spacing:-.05em;
  color:#0f172a;
}
.upyx-backups-hero p{
  max-width:720px;
  margin:0;
  color:#64748b;
  font-weight:650;
  line-height:1.55;
}
.upyx-backups-hero-card{
  min-width:230px;
  padding:22px;
  border-radius:24px;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 14px 34px rgba(15,23,42,.08);
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
}
.upyx-backups-hero-card .material-symbols-rounded{
  width:42px;
  height:42px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:#fff7ed;
  color:#f97316;
  font-size:26px;
}
.upyx-backups-hero-card strong{font-size:1.05rem;color:#0f172a;}
.upyx-backups-hero-card small{color:#64748b;font-weight:700;}
.upyx-backups-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.upyx-backups-kpis > div{
  padding:18px 20px;
  border-radius:22px;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 10px 24px rgba(15,23,42,.05);
}
.upyx-backups-kpis span{display:block;color:#64748b;font-size:.82rem;font-weight:900;text-transform:uppercase;letter-spacing:.06em;}
.upyx-backups-kpis strong{display:block;margin-top:6px;color:#0f172a;font-size:1.35rem;letter-spacing:-.03em;}
.upyx-backups-panel{
  padding:24px;
  border-radius:28px;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 16px 42px rgba(15,23,42,.07);
}
.upyx-backups-panel-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.upyx-backups-panel-head h2{margin:0 0 6px;color:#0f172a;letter-spacing:-.03em;}
.upyx-backups-panel-head p{margin:0;color:#64748b;font-weight:650;}
.upyx-backups-list{display:grid;gap:16px;}
.upyx-backup-project-card{
  padding:18px;
  border-radius:24px;
  border:1px solid rgba(15,23,42,.08);
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
}
.upyx-backup-project-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
  padding-bottom:14px;
  border-bottom:1px solid rgba(15,23,42,.08);
}
.upyx-backup-project-head h3{margin:0;color:#0f172a;letter-spacing:-.03em;}
.upyx-backup-project-head p{margin:4px 0 0;color:#64748b;font-weight:700;}
.upyx-backup-project-head > span{
  white-space:nowrap;
  padding:7px 11px;
  border-radius:999px;
  background:#fff7ed;
  color:#c2410c;
  font-weight:900;
  font-size:.82rem;
}
.upyx-backup-project-meta{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin:14px 0;
}
.upyx-backup-project-meta div{
  padding:12px;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(15,23,42,.06);
}
.upyx-backup-project-meta span{display:block;color:#64748b;font-size:.78rem;font-weight:900;text-transform:uppercase;letter-spacing:.05em;}
.upyx-backup-project-meta strong{display:block;margin-top:4px;color:#0f172a;}
.upyx-backup-snapshots{display:grid;gap:10px;}
.upyx-backup-snapshot{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:12px 14px;
  border-radius:18px;
  background:#fff;
  border:1px solid rgba(15,23,42,.07);
}
.upyx-backup-snapshot strong{display:block;color:#0f172a;}
.upyx-backup-snapshot small{display:block;color:#64748b;font-weight:700;margin-top:2px;}
.upyx-backup-snapshot button{
  display:inline-flex;
  align-items:center;
  gap:7px;
  border:0;
  border-radius:14px;
  padding:9px 12px;
  background:#0f172a;
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.upyx-backup-snapshot button .material-symbols-rounded{font-size:18px;}
.upyx-backups-empty{
  min-height:180px;
  display:grid;
  place-items:center;
  text-align:center;
  gap:8px;
  padding:24px;
  border-radius:24px;
  background:#f8fafc;
  color:#64748b;
  border:1px dashed rgba(15,23,42,.18);
}
.upyx-backups-empty .material-symbols-rounded{font-size:36px;color:#f97316;}
.upyx-backups-empty strong{color:#0f172a;font-size:1.1rem;}
.upyx-backups-empty small{font-weight:700;}

@media (max-width: 760px){
  .upyx-backups-hero{flex-direction:column;padding:22px;border-radius:24px;}
  .upyx-backups-hero-card{min-width:0;}
  .upyx-backups-kpis{grid-template-columns:1fr;}
  .upyx-backups-panel{padding:18px;border-radius:24px;}
  .upyx-backups-panel-head{flex-direction:column;}
  .upyx-backup-project-head,.upyx-backup-snapshot{flex-direction:column;align-items:flex-start;}
  .upyx-backup-project-meta{grid-template-columns:1fr;}
  .upyx-backup-snapshot button{width:100%;justify-content:center;}
}

/* =========================================================
   Sprint F4 / V5.0-Sprint005-009 — Harmonisation mobile finale
   Objectif : version chantier, même expérience métier que desktop.
   Architecture inchangée : Projet / Métrés / Chiffrage.
========================================================= */
@media (max-width: 980px){
  html,
  body{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    -webkit-text-size-adjust:100%;
  }
  body{
    background:#f5f7fb!important;
  }

}

@media (max-width: 900px){
  /* Shell mobile compact */
  html body .upyx-v4-header:not([data-ux-header]){
    position:sticky!important;
    top:0!important;
    z-index:1200!important;
    height:auto!important;
    min-height:0!important;
    box-shadow:0 10px 28px rgba(2,6,23,.18)!important;
  }
  html body .upyx-v4-header-inner:not([data-ux-header]){
    height:auto!important;
    min-height:0!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:10px!important;
    padding:10px 12px!important;
    align-items:center!important;
  }
  html body .upyx-v4-brand:not([data-ux-header]){
    width:160px!important;
    min-width:0!important;
    max-width:160px!important;
    height:58px!important;
    min-height:58px!important;
    max-height:58px!important;
    border-radius:14px!important;
    border:1px solid rgba(15,23,42,.10)!important;
    padding:7px!important;
    align-items:center!important;
    justify-content:center!important;
  }
  html body .upyx-v4-brand-logo:not([data-ux-header]){
    width:142px!important;
    max-width:142px!important;
    max-height:44px!important;
    object-fit:contain!important;
  }
  html body .upyx-v4-header-actions:not([data-ux-header]){
    grid-column:2!important;
    gap:6px!important;
    justify-self:end!important;
    margin:0!important;
  }
  html body .upyx-v4-env-badge{
    display:none!important;
  }
  html body .upyx-v4-notification,
  html body .upyx-v4-menu-button{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
    border-radius:14px!important;
  }
  html body .upyx-v4-project-switcher:not([data-ux-header]){
    grid-column:1 / -1!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    justify-self:stretch!important;
    min-height:52px!important;
    padding:9px 12px!important;
    border-radius:16px!important;
  }
  html body .upyx-v4-project-switcher:not([data-ux-header]) strong{
    font-size:1rem!important;
  }
  html body .upyx-v4-project-switcher:not([data-ux-header]) small{
    font-size:.78rem!important;
  }

}

@media (max-width: 980px){

  /* Navigation mobile : accordéon lisible, pas de sous-menu masqué définitivement */
  html body main.app-shell,
  html body .app-shell{
    display:block!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    max-width:100%!important;
    min-height:auto!important;
    padding:0!important;
    margin:0!important;
  }
  html body .side-menu{
    position:relative!important;
    top:0!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    max-height:none!important;
    padding:10px 10px 8px!important;
    border-radius:0!important;
    overflow:visible!important;
  }
  html body .foundation-nav,
  html body .accordion-nav{
    display:block!important;
    padding:0!important;
    margin:0!important;
  }
  html body .nav-block{
    margin:0 0 8px 0!important;
    border-radius:16px!important;
    overflow:hidden!important;
  }
  html body .menu-btn{
    width:100%!important;
    min-height:48px!important;
    height:auto!important;
    padding:12px 14px!important;
    border-radius:14px!important;
    font-size:1rem!important;
    justify-content:flex-start!important;
  }
  html body .nav-block:not(.open) .nav-sub{
    display:none!important;
  }
  html body .nav-block.open .nav-sub{
    display:flex!important;
    flex-direction:column!important;
    gap:4px!important;
    margin:7px 0 10px 18px!important;
    padding-left:12px!important;
    border-left:1px solid rgba(255,255,255,.18)!important;
  }
  html body .nav-block.open .nav-sub-section{
    display:block!important;
    margin:13px 0 5px 18px!important;
    font-size:.68rem!important;
  }
  html body .nav-sub button,
  html body .nav-project-item{
    width:100%!important;
    min-height:44px!important;
    padding:10px 11px!important;
    border-radius:12px!important;
    font-size:.94rem!important;
    text-align:left!important;
  }

  /* Contenu : même hiérarchie, une colonne, pas de débordement */
  html body .content-area{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding:18px 12px 32px!important;
    margin:0!important;
  }
  html body .tab,
  html body .tab.active,
  html body section.tab{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  html body .upyx-v4-dashboard,
  html body .upyx-v4-business-page:not(.ux-page--data),
  html body .upyx-project-page,
  html body .upyx-backups-page,
  html body .chiffrage-v4-page:not(.ux-page),
  html body .upyx-cockpit-page{
    max-width:none!important;
    width:100%!important;
  }
  html body .card,
  html body .smart-box:not(.ux-section),
  html body .upyx-v4-panel,
  html body .upyx-v4-global-panel:not(.ux-section),
  html body .upyx-v4-work-card:not(.ux-section),
  html body .upyx-backups-card,
  html body .summary-section,
  html body .upyx-v4-business-hero:not(.ux-page-header),
  html body .upyx-backups-hero{
    width:100%!important;
    max-width:100%!important;
    border-radius:20px!important;
    padding:16px!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  html body .upyx-v4-page-head,
  html body .upyx-v4-panel-head,
  html body .upyx-v4-section-head,
  html body .upyx-backups-hero,
  html body .upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header){
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:12px!important;
  }
  html body h1{font-size:1.9rem!important;line-height:1.08!important;}
  html body h2{font-size:1.45rem!important;line-height:1.15!important;}
  html body h3{font-size:1.12rem!important;line-height:1.2!important;}
  html body p{line-height:1.45!important;}

  /* Grilles */
  html body .form-grid,
  html body .kpi-grid,
  html body .upyx-v4-kpis,
  html body .upyx-v4-dashboard-grid,
  html body .summary-main-grid,
  html body .dashboard-columns,
  html body .document-grid,
  html body .premium-family-grid,
  html body .module-status-grid,
  html body .upyx-module-grid,
  html body .upyx-module-grid.two-cols,
  html body .upyx-module-grid-compact,
  html body .quant-source-grid,
  html body .chiffrage-param-grid,
  html body .chiffrage-form-grid,
  html body .chiffrage-control-grid,
  html body .chiffrage-result-grid,
  html body .devis-total,
  html body .devis-detected-grid,
  html body .devis-status-grid,
  html body .bibliotheque-status-grid,
  html body .rubrique-grid,
  html body .upyx-backups-grid,
  html body .upyx-backup-project-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
  }

  /* Formulaires : zones tactiles chantier */
  html body label{
    font-size:.92rem!important;
    line-height:1.3!important;
  }
  html body input,
  html body select,
  html body textarea{
    width:100%!important;
    max-width:100%!important;
    min-height:48px!important;
    font-size:16px!important;
    border-radius:14px!important;
  }
  html body textarea{
    min-height:108px!important;
  }
  html body button,
  html body .upyx-v4-primary,
  html body .upyx-v4-secondary,
  html body .upyx-v4-light-btn,
  html body .primary-btn,
  html body .secondary,
  html body .dark{
    min-height:46px!important;
    border-radius:14px!important;
    font-size:.95rem!important;
    touch-action:manipulation;
  }
  html body .toolbar,
  html body .compact-actions,
  html body .project-actions,
  html body .chiffrage-hero-actions,
  html body .upyx-v4-popover-actions,
  html body .upyx-backups-actions{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
    width:100%!important;
  }
  html body .toolbar button,
  html body .compact-actions button,
  html body .project-actions button,
  html body .chiffrage-hero-actions button,
  html body .upyx-v4-popover-actions button,
  html body .upyx-backups-actions button{
    width:100%!important;
    margin:0!important;
  }

  /* Tableaux : scroll horizontal assumé dans la carte, jamais sur la page */
  html body .table-box{
    width:100%!important;
    max-width:100%!important;
    min-height:auto!important;
    resize:none!important;
    overflow-x:auto!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
  }
  html body table{
    min-width:760px!important;
    font-size:.88rem!important;
  }
  html body th,
  html body td{
    padding:9px 10px!important;
  }

  /* Popovers et menu application plein mobile */
  html body .compact-app-menu,
  html body .upyx-v4-project-popover,
  html body .upyx-v4-notification-panel{
    left:12px!important;
    right:12px!important;
    top:76px!important;
    width:auto!important;
    max-width:none!important;
    border-radius:18px!important;
  }
  html body .compact-app-menu button{
    min-height:48px!important;
    width:100%!important;
  }
}

@media (max-width: 560px){
  html body .content-area{padding:14px 10px 28px!important;}
  html body .upyx-v4-brand:not([data-ux-header]){width:138px!important;max-width:138px!important;height:52px!important;}
  html body .upyx-v4-brand-logo:not([data-ux-header]){width:122px!important;max-width:122px!important;max-height:38px!important;}
  html body .side-menu{padding:8px!important;}
  html body .menu-btn{min-height:46px!important;font-size:.96rem!important;}
  html body .nav-sub button{min-height:42px!important;}
  html body .card,
  html body .smart-box:not(.ux-section),
  html body .upyx-v4-panel,
  html body .upyx-v4-global-panel:not(.ux-section),
  html body .upyx-v4-work-card:not(.ux-section),
  html body .upyx-backups-card,
  html body .upyx-v4-business-hero:not(.ux-page-header),
  html body .upyx-backups-hero{padding:14px!important;border-radius:18px!important;}
  html body h1{font-size:1.65rem!important;}
  html body h2{font-size:1.3rem!important;}
  html body .upyx-v4-kpi,
  html body .summary-card,
  html body .chiffrage-param-card,
  html body .devis-status{min-height:auto!important;padding:14px!important;}
}


/* =========================================================
   Auth gate production — couche historique RC3
   Le Shell n'est jamais visible tant que la session n'est pas validée.
========================================================= */
body.auth-pending,
body.auth-login{
  min-height:100vh;
  background:#050505!important;
}
body.auth-pending .upyx-v4-header:not([data-ux-header]),
body.auth-pending main.app-shell,
body.auth-pending footer,
body.auth-pending #projectSelectorOverlay,
body.auth-pending #projectSelector,
body.auth-pending #notificationOverlay,
body.auth-pending #notificationPanel,
body.auth-pending #compactAppMenuOverlay,
body.auth-pending #compactAppMenu,
body.auth-login .upyx-v4-header:not([data-ux-header]),
body.auth-login main.app-shell,
body.auth-login footer,
body.auth-login #projectSelectorOverlay,
body.auth-login #projectSelector,
body.auth-login #notificationOverlay,
body.auth-login #notificationPanel,
body.auth-login #compactAppMenuOverlay,
body.auth-login #compactAppMenu{
  display:none!important;
}
body.auth-pending #loginOverlay{
  display:flex!important;
}

body.auth-pending .login-box{
  background:transparent!important;
  box-shadow:none!important;
  padding:0!important;
}

body.auth-pending .login-title,
body.auth-pending .login-box input,
body.auth-pending .login-box button,
body.auth-pending .login-box .error,
body.auth-pending .login-box .message{
  display:none!important;
}
body.auth-login #loginOverlay{
  display:flex!important;
}
body.auth-authenticated #loginOverlay{
  display:none!important;
}
.login-overlay{
  position:fixed!important;
  inset:0!important;
  display:none;
  align-items:center!important;
  justify-content:center!important;
  min-height:100vh;
  padding:24px;
  background:
    radial-gradient(circle at 50% 12%, rgba(18,119,255,.20), transparent 30%),
    linear-gradient(160deg,#020617 0%,#050505 45%,#08111f 100%)!important;
  z-index:99999!important;
}
.login-box{
  width:min(92vw,460px)!important;
  max-width:460px!important;
  padding:34px 32px 30px!important;
  border-radius:28px!important;
  background:rgba(255,255,255,.96)!important;
  border:1px solid rgba(255,255,255,.76)!important;
  box-shadow:0 30px 90px rgba(0,0,0,.48)!important;
  text-align:center;
}
.login-logo{
  display:block!important;
  width:min(340px,78vw)!important;
  max-width:100%!important;
  height:auto!important;
  margin:0 auto 22px!important;
  object-fit:contain!important;
}
.login-title{
  margin:0 0 20px!important;
  color:#475569!important;
  font-size:15px!important;
  font-weight:700!important;
  letter-spacing:.02em!important;
}
.login-box input{
  text-align:left!important;
  height:46px!important;
  border-radius:14px!important;
  margin-top:10px!important;
  background:#f8fafc!important;
}
.login-box button{
  width:100%!important;
  height:46px!important;
  margin:18px 0 0!important;
  border-radius:14px!important;
  background:linear-gradient(135deg,#0b6bff,#034ad8)!important;
}
.login-box button:disabled{
  opacity:.72;
  cursor:wait;
}
@media(max-width:560px){
  .login-overlay{padding:18px!important;align-items:flex-start!important;padding-top:clamp(42px,10vh,90px)!important;}
  .login-box{padding:26px 22px 24px!important;border-radius:24px!important;}
  .login-logo{width:min(280px,76vw)!important;margin-bottom:18px!important;}
}


/* RC4 — Référentiel prix et devis client */
.pricePoste strong{display:block;font-weight:800;color:#33251b}
.pricePoste small,.devis-line-description,.devis-ref-price{display:block;margin-top:4px;font-size:12px;line-height:1.35;color:#7d6b5c}
.priceDescriptionShort,.priceDescriptionFull,.customDescription{width:100%;min-width:220px;border:1px solid #eadfd5;border-radius:10px;padding:8px;font:inherit;resize:vertical;background:#fffaf6}
.priceArticle{min-width:180px}
.priceUnite{width:72px;min-width:72px}
.priceSupplierFields{display:grid;gap:6px;min-width:150px}
.priceSupplierFields input{width:100%}
.pricePuRef{background:#fff7ed;border-color:#f1c79e}
.library-import-dialog{width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 32px);padding:0;border:1px solid #dbe3ec;border-radius:14px;background:#fff;color:#172033;box-shadow:0 20px 60px rgba(15,23,42,.18)}
.library-import-dialog::backdrop{background:rgba(15,23,42,.48)}
.library-import-dialog__header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:16px 18px;border-bottom:1px solid #e4eaf1}
.library-import-dialog__header span{font-size:12px;font-weight:800;color:#64748b;text-transform:uppercase;letter-spacing:.04em}
.library-import-dialog__header h3{margin:3px 0 0;font-size:20px}
.library-import-state{display:grid;gap:16px;padding:18px}
.library-import-state>strong{font-size:18px}.library-import-state>p{margin:0;color:#64748b}
.library-import-state--error{border-left:4px solid #dc2626}.library-import-state--success{border-left:4px solid #15803d}
.library-import-options,.library-import-questions,.library-import-conflicts{display:grid;gap:10px}
.library-import-options label,.library-import-questions label,.library-import-conflicts label{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px;border:1px solid #dbe3ec;border-radius:10px;background:#f8fafc}
.library-import-options label span,.library-import-conflicts label span{display:grid;gap:3px}.library-import-options small,.library-import-conflicts small{color:#64748b}
.library-import-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.library-import-summary div{display:grid;gap:2px;padding:12px;border:1px solid #dbe3ec;border-radius:10px;background:#f8fafc}.library-import-summary strong{font-size:22px}.library-import-summary span{font-size:12px;color:#64748b}
.library-import-warning{padding:10px 12px;border-radius:8px;background:#fff7ed;color:#9a4b08!important}
.library-import-preview{display:grid;gap:8px}.library-import-preview h4,.library-import-conflicts h4{margin:0}.library-import-preview>div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #edf1f5}.library-import-preview span{color:#64748b;text-align:right}
.library-import-actions{display:flex;justify-content:flex-end;gap:8px;padding-top:4px}
@media (max-width:640px){.library-import-dialog{width:calc(100vw - 16px);max-height:calc(100vh - 16px)}.library-import-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.library-import-options label,.library-import-questions label,.library-import-conflicts label{align-items:stretch;flex-direction:column}.library-import-options label{flex-direction:row}.library-import-questions select,.library-import-conflicts select{width:100%}.library-import-actions{flex-wrap:wrap}.library-import-actions .ux-button{flex:1 1 140px}}
#tableDevis td:first-child{min-width:280px}
#tableDevis td:first-child strong{display:block;color:#2f241c}

/* RC5 — Valorisation & Référentiel Métier */
.valorisation-page .valorisation-summary-grid strong{font-size:1rem;line-height:1.25;}
.valorisation-form-grid select{min-height:44px;}
.valorisation-summary-panel .coherence-box{margin-top:16px;}
.upyx-chiffrage-flow button strong{white-space:nowrap;}
.devis-ref-price{display:block;margin-top:4px;font-size:.72rem;color:#7b6f64;}
.devis-line-description{display:block;margin-top:6px;font-size:.78rem;color:#5f6673;line-height:1.35;}
@media (max-width: 760px){
  .upyx-chiffrage-flow{display:grid;grid-template-columns:1fr;gap:8px;}
  .valorisation-form-grid{grid-template-columns:1fr;}
}


/* RC6 — Valorisation avec recherche référentiel */
.valorisation-search-grid input[type="search"]{
  width:100%;
  min-height:44px;
  border:1px solid rgba(20,35,55,.16);
  border-radius:12px;
  padding:10px 12px;
  font:inherit;
  background:#fff;
}
.valorisation-product-preview{
  margin-top:18px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:14px;
}
.valorisation-product-card{
  border:1px solid rgba(20,35,55,.10);
  border-radius:16px;
  background:#fff;
  padding:14px 15px;
  box-shadow:0 12px 28px rgba(15,23,42,.06);
}
.valorisation-product-card small{
  display:block;
  color:#64748b;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-bottom:5px;
}
.valorisation-product-card strong{display:block;color:#102033;margin-bottom:7px;}
.valorisation-product-card p{margin:0 0 8px;color:#475569;font-size:.92rem;line-height:1.38;}
.valorisation-product-card em{display:block;color:#0f766e;font-style:normal;font-weight:700;font-size:.86rem;}
.valorisation-product-card.warning em{color:#b45309;}


/* =========================================================
   Sprint final stabilisation — couche historique
   Auth propre, logo rectangulaire, Devis épuré.
========================================================= */
html body .login-logo{
  width:min(360px,78vw)!important;
  height:auto!important;
  max-height:150px!important;
  object-fit:contain!important;
  border-radius:0!important;
  border:0!important;
  box-shadow:none!important;
  background:transparent!important;
  padding:0!important;
}
html body .header-logout-btn{display:none!important;}
html body #devis .upyx-chiffrage-flow,
html body #devis .devis-detected-card,
html body #devis .devis-control-card,
html body #devis .upyx-chiffrage-principle{display:none!important;}
html body #devis .devis-technical-details{display:block!important;}
html body #devis .devis-technical-details > summary{display:none!important;}
html body #devis .devis-technical-details .table-box{min-height:280px;resize:vertical;}
html body #devis .chiffrage-hero-actions button{white-space:nowrap;}
html body #devis .upyx-v4-global-panel:not(.ux-section) .upyx-v4-panel-title h3::after{content:" commercial";}
html body #devis table th:nth-child(6), html body #devis table td:nth-child(6),
html body #devis table th:nth-child(9), html body #devis table td:nth-child(9){display:none!important;}
html body #devis table th, html body #devis table td{padding:10px 8px;}
html body #devis table th:nth-child(1){min-width:360px;}
html body .accordion-nav .nav-block:not(.open) .nav-sub{display:none!important;}

/* RC12 emergency: header logout removed */
.header-logout-btn{display:none!important;}
.login-logo{max-width:360px!important;width:min(360px,82vw)!important;height:auto!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;}


/* RC13 — Devis comme point d'entrée, assistant intégré, Valorisation masquée */
#valorisation{display:none!important;}
.upyx-devis-assistant{margin:18px 0 22px;padding:18px;border:1px solid rgba(249,115,22,.24);border-radius:22px;background:#fffaf4;box-shadow:0 18px 42px rgba(15,23,42,.06)}
.devis-assistant-questions{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin-top:14px}
.devis-assistant-question{display:flex;flex-direction:column;gap:7px;padding:14px;border:1px solid rgba(15,23,42,.10);border-radius:16px;background:#fff}
.devis-assistant-question label{font-weight:800;color:#132033}.devis-assistant-question small{color:#64748b;line-height:1.35}.devis-assistant-question input{min-height:42px;border:1px solid rgba(15,23,42,.16);border-radius:12px;padding:9px 11px;font:inherit}.devis-assistant-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
html body .login-logo{width:min(360px,82vw)!important;height:auto!important;max-height:180px!important;object-fit:contain!important;border-radius:0!important;box-shadow:none!important;background:transparent!important;border:0!important;}


/* RC17 — écran de connexion raisonnable et stable */
html body.auth-login{background:#06111f!important;min-height:100vh!important;overflow:auto!important;}
html body.auth-login #loginOverlay{display:flex!important;align-items:center!important;justify-content:center!important;padding:28px 18px!important;background:#06111f!important;}
html body.auth-login .login-box{width:min(92vw,560px)!important;max-width:560px!important;border-radius:32px!important;padding:38px 46px 44px!important;background:#f8fafc!important;box-shadow:0 26px 72px rgba(0,0,0,.42)!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:16px!important;}
html body.auth-login .login-logo{width:min(340px,72vw)!important;max-width:340px!important;max-height:165px!important;height:auto!important;object-fit:contain!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;margin:0 0 12px!important;}
html body.auth-login .login-title{font-size:clamp(23px,2.4vw,30px)!important;font-weight:800!important;color:#475569!important;text-align:center!important;margin:0 0 10px!important;}
html body.auth-login .login-box input{width:100%!important;height:62px!important;border-radius:20px!important;border:2px solid #e2e8f0!important;background:white!important;padding:0 20px!important;font-size:19px!important;text-align:left!important;margin:0!important;color:#0f172a!important;}
html body.auth-login .login-box button{width:100%!important;height:64px!important;border-radius:20px!important;margin:8px 0 0!important;background:linear-gradient(135deg,#1677ff,#0047d8)!important;color:#fff!important;font-size:20px!important;font-weight:800!important;}
html body.auth-login #resetModal, html body.auth-login #tokenPasswordModal, html body.auth-login #passwordModal{display:none!important;}
@media(max-width:640px){html body.auth-login .login-box{width:94vw!important;padding:28px 20px 32px!important;border-radius:26px!important;}html body.auth-login .login-logo{width:min(290px,74vw)!important;max-height:140px!important;}html body.auth-login .login-box input{height:58px!important;font-size:17px!important;}html body.auth-login .login-box button{height:60px!important;font-size:18px!important;}}


/* RC18 — logo connexion : taille lisible, sans démesure */
html body.auth-login .login-logo,
html body .login-logo{
  width:min(560px,82vw)!important;
  max-width:560px!important;
  max-height:260px!important;
  height:auto!important;
  object-fit:contain!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  margin:0 0 18px!important;
}
@media(max-width:640px){
  html body.auth-login .login-logo,
  html body .login-logo{width:min(380px,86vw)!important;max-height:180px!important;margin-bottom:14px!important;}
}


/* RC19 — logo connexion ×2 mais cadré */
html body.auth-login .login-logo,
html body .login-logo{
  width:min(680px,88vw)!important;
  max-width:680px!important;
  max-height:310px!important;
  height:auto!important;
  object-fit:contain!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  border:0!important;
  margin:0 0 18px!important;
}
@media(max-width:640px){
  html body.auth-login .login-logo,
  html body .login-logo{
    width:min(430px,88vw)!important;
    max-height:210px!important;
    margin-bottom:14px!important;
  }
}


/* RC20 - Export PDF propre */
@media print {
  body.upyx-print-pdf .sidebar,
  body.upyx-print-pdf .topbar,
  body.upyx-print-pdf .mobile-header,
  body.upyx-print-pdf .toolbar,
  body.upyx-print-pdf .chiffrage-hero-actions,
  body.upyx-print-pdf .upyx-chiffrage-flow,
  body.upyx-print-pdf .devis-assistant,
  body.upyx-print-pdf .app-menu,
  body.upyx-print-pdf .bottom-nav { display:none !important; }
  body.upyx-print-pdf { background:#fff !important; }
  body.upyx-print-pdf .app-shell,
  body.upyx-print-pdf .main-content,
  body.upyx-print-pdf .content-area { margin:0 !important; padding:0 !important; width:100% !important; max-width:none !important; }
  body.upyx-print-pdf section.tab { display:none !important; }
  body.upyx-print-pdf section#devis { display:block !important; }
  body.upyx-print-pdf #devis .upyx-v4-business-page:not(.ux-page--data) { box-shadow:none !important; padding:20mm 14mm !important; }
  body.upyx-print-pdf .devis-technical-details { display:block !important; border:none !important; box-shadow:none !important; }
  body.upyx-print-pdf .devis-technical-details summary { display:none !important; }
  body.upyx-print-pdf table { width:100% !important; border-collapse:collapse !important; font-size:10px !important; }
  body.upyx-print-pdf th, body.upyx-print-pdf td { border:1px solid #ddd !important; padding:5px !important; }
}


/* RC21 — Bibliothèque : bouton toutes rubriques compact et désactivé par défaut */
#biblioAllRubriquesBtn.upyx-compact-all-rubriques{
  width:auto !important;
  min-width:0 !important;
  max-width:260px !important;
  padding:12px 18px !important;
  border-radius:18px !important;
  font-size:14px !important;
  opacity:.72;
}
#biblioAllRubriquesBtn.upyx-compact-all-rubriques:not(.active){
  background:#fff !important;
  color:#f57c00 !important;
  border:1px solid rgba(245,124,0,.35) !important;
  box-shadow:none !important;
}
#biblioAllRubriquesBtn.upyx-compact-all-rubriques .rubrique-label{font-size:14px !important;}

/* RC22 — Configuration entreprise + Assistant Devis */
.upyx-devis-assistant-v1{margin:18px 0 22px}.upyx-assistant-card{background:#fff;border:1px solid rgba(15,23,42,.10);border-radius:22px;padding:22px;box-shadow:0 18px 50px rgba(15,23,42,.08)}.upyx-assistant-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:18px}.upyx-assistant-head h3{margin:2px 0 6px;font-size:1.35rem}.upyx-assistant-head p{margin:0;color:#64748b}.upyx-assistant-company{display:flex;gap:12px;align-items:center;flex-wrap:wrap;background:#f8fafc;border:1px solid rgba(148,163,184,.25);border-radius:16px;padding:12px 14px;margin-bottom:16px}.upyx-assistant-company span{font-weight:700;color:#0f172a}.upyx-assistant-company small{color:#64748b}.upyx-assistant-step{display:grid;grid-template-columns:38px 1fr;gap:12px;margin:16px 0}.upyx-assistant-step>span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#0f4c81;color:#fff;font-weight:800}.upyx-assistant-step h4{margin:4px 0 10px}.upyx-preset-grid,.upyx-lot-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}.upyx-preset-card,.upyx-lot-chip{display:flex;align-items:center;gap:8px;padding:11px 12px;border:1px solid rgba(148,163,184,.32);border-radius:14px;background:#fff;cursor:pointer}.upyx-preset-card:has(input:checked),.upyx-lot-chip:has(input:checked){border-color:#0f4c81;background:#eff6ff}.upyx-assistant-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}.upyx-assistant-empty{padding:14px;border-radius:14px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.upyx-company-config{display:grid;gap:14px}.upyx-pref-row{display:grid;gap:8px}.upyx-pref-row label{display:grid;gap:6px}.upyx-pref-row input,.upyx-pref-row select{width:100%;padding:10px 12px;border:1px solid rgba(148,163,184,.45);border-radius:12px}.upyx-pref-row:has(> label + label){grid-template-columns:1fr 120px}.upyx-pref-lots{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px}.upyx-pref-lots label{display:flex;align-items:center;gap:7px;padding:8px 10px;border-radius:12px;background:#f8fafc}@media(max-width:760px){.upyx-assistant-head{display:block}.upyx-assistant-actions{justify-content:stretch;flex-direction:column}.upyx-pref-row:has(> label + label){grid-template-columns:1fr}.upyx-assistant-step{grid-template-columns:1fr}.upyx-assistant-step>span{display:none}}

/* RC23 — Configuration entreprise simplifiée */
.upyx-company-config{max-width:100%;overflow:hidden;}
.upyx-company-config .upyx-pref-row{min-width:0;}
.upyx-company-config .upyx-pref-help{margin:0;color:#64748b;font-weight:700;line-height:1.35;}
.upyx-company-config .upyx-pref-lots{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;align-items:stretch;}
.upyx-company-config .upyx-pref-lot-card{display:flex!important;align-items:center;gap:12px;min-height:54px;padding:13px 15px;border-radius:16px;background:#f8fafc;border:1px solid rgba(148,163,184,.22);font-weight:800;color:#0f172a;line-height:1.2;white-space:normal;overflow:visible;}
.upyx-company-config .upyx-pref-lot-card span{white-space:normal;overflow:visible;text-overflow:clip;word-break:normal;}
.upyx-company-config .upyx-pref-lot-card input{width:22px;min-width:22px;height:22px;margin:0;}
.upyx-company-config .upyx-pref-lot-card:has(input:checked){background:#eff6ff;border-color:rgba(37,99,235,.35);}
.upyx-company-config .upyx-pref-lot-card.is-disabled{opacity:.82;cursor:default;}
.upyx-company-config .upyx-pref-lot-card.is-disabled input{cursor:not-allowed;}
#compactAppModalContent{overflow-x:hidden;}
@media(max-width:760px){.upyx-company-config .upyx-pref-lots{grid-template-columns:1fr;}.upyx-company-config .upyx-pref-lot-card{min-height:50px;}}


/* RC24 — Mon entreprise */
.upyx-company-config-v24 .upyx-pref-section{margin:18px 0 8px;}
.upyx-company-config-v24 .upyx-pref-section h3{margin:0 0 4px;font-size:15px;color:#1d3347;}
.upyx-company-config-v24 textarea{width:100%;box-sizing:border-box;border:1px solid rgba(29,51,71,.16);border-radius:12px;padding:10px 12px;font:inherit;background:#fff;}
.upyx-company-config-v24 input,.upyx-company-config-v24 select{min-height:42px;}
.upyx-company-config-v24 .upyx-pref-lots{grid-template-columns:repeat(auto-fit,minmax(160px,1fr));}

/* RC25 — Menu application pleine page + assistant devis allégé */
.upyx-app-page{padding:28px;display:flex;flex-direction:column;gap:22px;max-width:1380px;margin:0 auto}.upyx-app-page-hero{border-radius:28px;background:linear-gradient(135deg,#fff,#f6f9ff);box-shadow:0 18px 50px rgba(15,23,42,.08);border:1px solid rgba(148,163,184,.22);padding:34px}.upyx-app-page-hero h1{font-size:42px;line-height:1.05;margin:6px 0 10px;color:#111827}.upyx-app-page-hero p{font-size:18px;color:#64748b;max-width:920px}.upyx-app-page-panel{background:#fff;border:1px solid rgba(148,163,184,.22);border-radius:24px;box-shadow:0 16px 40px rgba(15,23,42,.06);padding:28px}.upyx-app-page-panel h2{font-size:26px;margin:0 0 18px;color:#111827}.upyx-app-page-panel h3{font-size:20px;margin:24px 0 12px;color:#111827}.upyx-app-page-grid{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:18px}.upyx-app-page-grid.compact{grid-template-columns:repeat(2,minmax(260px,420px))}.upyx-app-page-grid label{display:flex;flex-direction:column;gap:8px;font-weight:800;color:#111827}.upyx-app-page-grid input,.upyx-app-page-grid select,.upyx-app-page-grid textarea{border:1px solid #dbe3ef;border-radius:16px;padding:14px 16px;font:inherit;background:#fff}.upyx-app-lots-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:14px}.upyx-app-lot{display:flex;align-items:center;gap:12px;border:1px solid #dbe3ef;border-radius:18px;background:#f8fafc;padding:15px 16px;font-weight:800;color:#111827}.upyx-app-lot input{width:22px;height:22px}.upyx-app-lot.is-disabled{opacity:.58}.upyx-app-page-actions{margin-top:22px}.upyx-devis-assistant-v1 .upyx-assistant-card{padding:26px;border-radius:28px}.upyx-devis-assistant-v1 .upyx-assistant-head{align-items:flex-start;border-bottom:1px solid #edf2f7;padding-bottom:18px;margin-bottom:20px}.upyx-assistant-flow{display:flex;flex-direction:column;gap:22px}.upyx-assistant-line{display:grid;grid-template-columns:220px 1fr;gap:18px;align-items:start}.upyx-assistant-line h4{margin:4px 0;font-size:18px;color:#111827}.upyx-assistant-line p{margin:4px 0 0;color:#64748b}.upyx-assistant-select{max-width:560px}.upyx-assistant-select select,.upyx-material-list input{width:100%;border:1px solid #dbe3ef;border-radius:16px;padding:14px 16px;font:inherit;background:#fff}.upyx-assistant-custom-lots{display:none;margin-top:14px;grid-template-columns:repeat(3,minmax(180px,1fr));gap:10px}.upyx-assistant-custom-lots.is-visible{display:grid}.upyx-assistant-custom-lots label{display:flex;align-items:center;gap:10px;border:1px solid #dbe3ef;border-radius:14px;padding:12px 14px;background:#f8fafc;font-weight:800}.upyx-material-list{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:16px}.upyx-material-list label{display:flex;flex-direction:column;gap:7px;font-weight:900;color:#111827}.upyx-assistant-summary{background:#f8fafc;border:1px solid #e2e8f0;border-radius:18px;padding:16px 18px;color:#334155;font-weight:800}.upyx-assistant-actions{display:flex;justify-content:flex-end;gap:12px;border-top:1px solid #edf2f7;padding-top:20px;margin-top:6px}@media(max-width:900px){.upyx-app-page{padding:16px}.upyx-app-page-grid,.upyx-app-page-grid.compact,.upyx-app-lots-grid,.upyx-material-list{grid-template-columns:1fr}.upyx-assistant-line{grid-template-columns:1fr}.upyx-app-page-hero h1{font-size:32px}}

/* RC26 — Assistant Devis : recherche référentiel matériaux */
.upyx-assistant-card-refsearch .upyx-assistant-material-line{align-items:flex-start}
.upyx-material-list-refsearch{display:grid;grid-template-columns:repeat(2,minmax(280px,1fr));gap:16px;width:100%}
.upyx-material-picker{border:1px solid #dbe5f3;border-radius:18px;background:#fff;padding:16px;box-shadow:0 10px 24px rgba(15,23,42,.04)}
.upyx-material-picker-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}
.upyx-material-picker h5{margin:0;font-size:16px;font-weight:900;color:#0f172a}
.upyx-material-picker p{margin:4px 0 0;color:#64748b;font-weight:700;font-size:13px;line-height:1.35}
.upyx-ref-price{white-space:nowrap;background:#f8fafc;border:1px solid #e2e8f0;border-radius:999px;padding:6px 10px;font-weight:900;color:#0f172a;font-size:12px}
.upyx-material-selected{background:#f8fbff;border:1px solid #dbeafe;border-radius:14px;padding:12px;margin:10px 0;display:flex;flex-direction:column;gap:4px}
.upyx-material-selected span{font-weight:900;color:#0f172a;font-size:14px}
.upyx-material-selected small{color:#64748b;font-weight:600;line-height:1.35}
.upyx-material-search-row{display:flex;gap:8px;align-items:center;margin-top:10px}
.upyx-material-search-row input{flex:1;border:1px solid #dbe5f3;border-radius:14px;padding:11px 12px;font-weight:700;min-width:0;background:#fff}
.upyx-material-search-row input:focus{outline:none;border-color:#f97316;box-shadow:0 0 0 3px rgba(249,115,22,.14)}
.upyx-material-search-row .upyx-v4-secondary{padding:10px 14px;border-radius:14px;white-space:nowrap}
.upyx-ref-results{display:flex;flex-direction:column;gap:8px;margin-top:10px;max-height:250px;overflow:auto;padding-right:2px}
.upyx-ref-result{appearance:none;border:1px solid #e2e8f0;border-radius:14px;background:#fff;text-align:left;padding:11px 12px;display:flex;flex-direction:column;gap:3px;cursor:pointer;transition:.15s ease}
.upyx-ref-result:hover{border-color:#f97316;background:#fff7ed;transform:translateY(-1px)}
.upyx-ref-result-title{font-weight:900;color:#0f172a;font-size:13px}
.upyx-ref-result-meta{font-weight:800;color:#f97316;font-size:12px}
.upyx-ref-result-desc{color:#64748b;font-size:12px;line-height:1.3}
.upyx-ref-no-result{border:1px dashed #cbd5e1;border-radius:14px;padding:14px;color:#64748b;font-weight:700;background:#f8fafc}
@media (max-width:900px){.upyx-material-list-refsearch{grid-template-columns:1fr}.upyx-material-search-row{flex-direction:column;align-items:stretch}}


/* RC27 — Assistant Référentiel multi-rubriques */
.upyx-assistant-card-refmulti .upyx-assistant-head{border-bottom:1px solid #eef2f7;padding-bottom:18px}
.upyx-material-list-refmulti{display:flex;flex-direction:column;gap:16px;width:100%}
.upyx-ref-rubrique-card{border:1px solid #dbe5f3;border-radius:22px;background:#fff;padding:18px;box-shadow:0 12px 28px rgba(15,23,42,.05)}
.upyx-ref-rubrique-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:12px}
.upyx-ref-rubrique-head h5{margin:0;font-size:18px;font-weight:950;color:#0f172a}
.upyx-ref-rubrique-head p{margin:4px 0 0;color:#64748b;font-weight:700;font-size:13px}
.upyx-ref-rubrique-head>span{white-space:nowrap;background:#eff6ff;border:1px solid #bfdbfe;color:#0f4c81;border-radius:999px;padding:7px 11px;font-weight:950;font-size:12px}
.upyx-ref-selected-zone{display:flex;flex-wrap:wrap;gap:8px;min-height:44px;border:1px dashed #cbd5e1;border-radius:16px;background:#f8fafc;padding:10px;margin:10px 0 12px}
.upyx-ref-empty-selection{color:#64748b;font-weight:800;font-size:13px;padding:4px 2px}
.upyx-selected-ref{display:inline-flex;align-items:center;gap:8px;border:1px solid #bfdbfe;border-radius:999px;background:#fff;color:#0f172a;padding:8px 10px;cursor:pointer;text-align:left}
.upyx-selected-ref strong{font-size:12px;font-weight:950}.upyx-selected-ref small{color:#64748b;font-weight:800}.upyx-selected-ref span{font-weight:950;color:#ef4444}
.upyx-ref-multi-results{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:8px;max-height:360px}
.upyx-ref-multi-result{appearance:none;border:1px solid #e2e8f0;border-radius:15px;background:#fff;text-align:left;padding:11px 12px;display:grid;grid-template-columns:28px 1fr;gap:10px;cursor:pointer;transition:.15s ease;width:100%}
.upyx-ref-multi-result:hover{border-color:#f97316;background:#fff7ed;transform:translateY(-1px)}
.upyx-ref-multi-result.is-selected{border-color:#0f4c81;background:#eff6ff}
.upyx-ref-check{width:26px;height:26px;border-radius:999px;display:grid;place-items:center;background:#f1f5f9;color:#0f4c81;font-weight:950}
.upyx-ref-multi-result.is-selected .upyx-ref-check{background:#0f4c81;color:#fff}
.upyx-ref-multi-result strong{display:block;color:#0f172a;font-size:13px;font-weight:950}.upyx-ref-multi-result small{display:block;color:#f97316;font-size:12px;font-weight:900;margin-top:3px}.upyx-ref-multi-result em{display:block;color:#64748b;font-size:12px;font-style:normal;line-height:1.3;margin-top:3px}
@media(max-width:900px){.upyx-ref-multi-results{grid-template-columns:1fr;max-height:none}.upyx-ref-rubrique-head{flex-direction:column}.upyx-ref-rubrique-head>span{white-space:normal}.upyx-selected-ref{width:100%;justify-content:space-between;border-radius:14px}}


/* RC28 — Assistant référentiel allégé + logo entreprise */
.upyx-assistant-card-refmulti .upyx-assistant-flow{gap:14px}
.upyx-assistant-card-refmulti .upyx-assistant-line{padding:14px 16px}
.upyx-assistant-card-refmulti .upyx-assistant-line>div:first-child p{font-size:13px;line-height:1.25}
.upyx-material-list-refmulti{gap:10px}
.upyx-ref-rubrique-card{padding:12px 14px;border-radius:16px;box-shadow:none}
.upyx-ref-rubrique-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.upyx-ref-rubrique-head h5{margin:0;font-size:17px}
.upyx-ref-rubrique-head p{display:none}
.upyx-ref-rubrique-head>span{font-size:12px;font-weight:900;color:#0f4c81;background:#eff6ff;border:1px solid #bfdbfe;border-radius:999px;padding:6px 10px;white-space:nowrap}
.upyx-ref-selected-zone:empty{display:none}
.upyx-ref-selected-zone{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.upyx-material-search-row{margin:0}
.upyx-material-search-row input{height:42px;border-radius:14px}
.upyx-ref-multi-results:empty{display:none}
.upyx-ref-multi-results{margin-top:8px;max-height:240px;overflow:auto}
.upyx-company-logo-box{grid-column:span 1;border:1px dashed #cbd5e1;border-radius:18px;padding:14px;display:flex;flex-direction:column;gap:10px;align-items:flex-start;background:#f8fafc}
.upyx-company-logo-box strong{display:block;color:#0f172a;font-size:14px}.upyx-company-logo-box span{display:block;color:#64748b;font-size:12px;font-weight:800}
.upyx-company-logo-box img{width:150px;height:92px;object-fit:contain;background:white;border:1px solid #e2e8f0;border-radius:14px;display:none}.upyx-company-logo-box img.has-logo{display:block}
.upyx-company-logo-box input[type=file]{display:none}
.upyx-company-logo-actions{display:flex;gap:8px;flex-wrap:wrap}
.upyx-v4-ghost{border:0;background:transparent;color:#64748b;font-weight:900;cursor:pointer;padding:9px 10px}
@media(max-width:900px){.upyx-company-logo-box{grid-column:1/-1}.upyx-ref-rubrique-card{padding:12px}.upyx-ref-rubrique-head h5{font-size:16px}}

/* === RC29 — Page Entreprise : identité séquentielle, logo haut droite, CGV === */
.upyx-company-identity-panel{position:relative;}
.upyx-company-identity-head{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start;margin-bottom:22px;}
.upyx-company-identity-head h2{margin-bottom:4px;}
.upyx-company-help{margin:0;color:#64748b;font-weight:700;line-height:1.35;}
.upyx-company-form-sequence{display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:18px;}
.upyx-company-form-sequence label,.upyx-company-legal-row label{display:flex;flex-direction:column;gap:8px;font-weight:800;color:#111827;}
.upyx-company-form-sequence input,.upyx-company-form-sequence textarea,.upyx-company-legal-row input,.upyx-company-cgv-panel textarea{border:1px solid #dbe3ef;border-radius:16px;padding:14px 16px;font:inherit;background:#fff;box-sizing:border-box;width:100%;}
.upyx-company-form-sequence .span-2{grid-column:1/-1;}
.upyx-company-legal-row{margin-top:20px;padding-top:20px;border-top:1px solid #edf2f7;display:grid;grid-template-columns:repeat(2,minmax(260px,1fr));gap:18px;}
.upyx-company-logo-top{align-self:start;justify-self:end;width:100%;max-width:280px;}
.upyx-company-logo-top img{width:100%;max-width:220px;height:112px;}
.upyx-company-cgv-panel textarea{min-height:190px;resize:vertical;line-height:1.45;}
@media(max-width:900px){.upyx-company-identity-head,.upyx-company-form-sequence,.upyx-company-legal-row{grid-template-columns:1fr}.upyx-company-logo-top{justify-self:stretch;max-width:none}.upyx-company-logo-top img{max-width:220px}}

/* RC30 — Import fichiers Entreprise */
.upyx-file-row,.upyx-cgv-import{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}
.upyx-file-row span,.upyx-cgv-import span{font-size:13px;font-weight:800;color:#64748b;min-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upyx-cgv-import{padding:12px;border:1px dashed #cbd5e1;border-radius:16px;background:#f8fafc;margin-bottom:14px}
.upyx-native-file-input{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.upyx-file-button{display:inline-flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none;min-height:38px}
@media(max-width:700px){.upyx-file-row span,.upyx-cgv-import span{min-width:0;width:100%;white-space:normal}.upyx-cgv-import{align-items:flex-start}}

/* RC33 — Fiche entreprise : boutons Parcourir réellement visibles */
.upyx-company-logo-box .upyx-file-button,
.upyx-cgv-import .upyx-file-button,
.upyx-company-logo-box label.upyx-v4-secondary,
.upyx-cgv-import label.upyx-v4-secondary{
  background:#ffffff !important;
  color:#0f172a !important;
  border:1px solid #cbd5e1 !important;
  box-shadow:0 8px 18px rgba(15,23,42,.08) !important;
  padding:10px 16px !important;
  border-radius:14px !important;
  font-weight:900 !important;
  opacity:1 !important;
  pointer-events:auto !important;
}
.upyx-company-logo-box .upyx-file-button:hover,
.upyx-cgv-import .upyx-file-button:hover{
  border-color:#1e90ff !important;
  color:#005bea !important;
  background:#f8fbff !important;
}
.upyx-company-logo-box .upyx-v4-ghost,
.upyx-cgv-import .upyx-v4-ghost{
  opacity:1 !important;
  pointer-events:auto !important;
  color:#64748b !important;
}


/* RC34 — Fiche entreprise : actions fichier simplifiées */
.upyx-company-logo-card .upyx-file-row,
.upyx-company-cgv-card .upyx-file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.upyx-company-logo-card .upyx-file-name,
.upyx-company-cgv-card .upyx-file-name,
#appCompanyLogoName,
#appCompanyCgvFileName {
  display: block;
  margin-top: 14px;
  font-weight: 800;
  color: #64748b;
}
.upyx-company-logo-card .upyx-file-delete,
.upyx-company-cgv-card .upyx-file-delete {
  min-height: 42px;
  padding: 0 18px;
}
.upyx-company-logo-actions {
  display: none !important;
}

/* RC35 — Assistant devis : hiérarchie visuelle Choisir → Composer → Vérifier */
.upyx-assistant-card-rc35{padding:24px!important}
.upyx-assistant-card-rc35 .upyx-assistant-head{margin-bottom:18px!important}
.upyx-assistant-layout-rc35{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start}
.upyx-assistant-main-rc35{display:flex;flex-direction:column;gap:14px;min-width:0}
.upyx-assistant-zone-rc35,.upyx-assistant-summary-panel-rc35{border:1px solid #e2e8f0;border-radius:22px;background:#fff;padding:16px;box-shadow:0 10px 24px rgba(15,23,42,.04)}
.upyx-assistant-summary-panel-rc35{position:sticky;top:18px;background:linear-gradient(180deg,#fff,#f8fbff)}
.upyx-assistant-zone-title{display:flex;align-items:flex-start;gap:12px;margin-bottom:12px}
.upyx-assistant-zone-title>span{width:30px;height:30px;border-radius:999px;display:grid;place-items:center;background:#eff6ff;border:1px solid #bfdbfe;color:#0f4c81;font-weight:950;flex:0 0 auto}
.upyx-assistant-zone-title h4{margin:0;color:#0f172a;font-size:18px;font-weight:950}
.upyx-assistant-zone-title p{margin:3px 0 0;color:#64748b;font-size:13px;font-weight:750;line-height:1.28}
.upyx-assistant-card-rc35 .upyx-assistant-select{max-width:none}
.upyx-assistant-card-rc35 .upyx-assistant-select select{height:46px;border-radius:16px;font-weight:900;background:#f8fafc}
.upyx-assistant-card-rc35 .upyx-material-list-refmulti{gap:8px}
.upyx-ref-rubrique-card-rc35{border-radius:16px!important;padding:10px 12px!important;background:#fbfdff!important;transition:.16s ease}
.upyx-ref-rubrique-card-rc35.is-complete{background:#f8fbff!important;border-color:#bfdbfe!important}
.upyx-ref-rubrique-card-rc35 .upyx-ref-rubrique-head{margin-bottom:7px!important}
.upyx-ref-rubrique-card-rc35 .upyx-ref-rubrique-head h5{font-size:15px!important}
.upyx-ref-rubrique-card-rc35 .upyx-ref-rubrique-head>span{padding:5px 9px!important;font-size:11px!important}
.upyx-ref-rubrique-card-rc35 .upyx-ref-selected-zone{border:0!important;background:transparent!important;padding:0!important;min-height:0!important;margin:0 0 7px!important}
.upyx-ref-rubrique-card-rc35 .upyx-selected-ref{padding:6px 9px!important}
.upyx-ref-rubrique-card-rc35 .upyx-material-search-row input{height:38px!important;font-size:13px!important;background:#fff!important}
.upyx-ref-rubrique-card-rc35 .upyx-ref-multi-results{max-height:220px!important}
.upyx-assistant-card-rc35 .upyx-assistant-summary{display:flex;flex-direction:column;gap:10px;background:transparent;border:0;padding:0;color:#334155}
.upyx-summary-metric{border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:12px;display:flex;align-items:baseline;gap:10px}
.upyx-summary-metric strong{font-size:28px;line-height:1;color:#0f172a}
.upyx-summary-metric span{font-size:12px;color:#64748b;font-weight:900}
.upyx-summary-list{border:1px solid #e2e8f0;border-radius:16px;background:#fff;padding:10px;display:flex;flex-direction:column;gap:7px}
.upyx-summary-list div{display:flex;justify-content:space-between;gap:10px;font-size:12px;font-weight:850;color:#64748b}
.upyx-summary-list b{color:#0f172a}
.upyx-assistant-card-rc35 .upyx-assistant-summary p{margin:0;color:#64748b;font-size:12px;line-height:1.35;font-weight:800}
.upyx-assistant-summary-panel-rc35 .upyx-assistant-actions{border-top:1px solid #e2e8f0;margin-top:14px;padding-top:14px;display:flex;flex-direction:column-reverse;gap:10px}
.upyx-assistant-summary-panel-rc35 .upyx-assistant-actions button{width:100%;justify-content:center}
@media(max-width:1100px){.upyx-assistant-layout-rc35{grid-template-columns:1fr}.upyx-assistant-summary-panel-rc35{position:static}.upyx-assistant-summary-panel-rc35 .upyx-assistant-actions{flex-direction:row;justify-content:flex-end}.upyx-assistant-summary-panel-rc35 .upyx-assistant-actions button{width:auto}}
@media(max-width:760px){.upyx-assistant-card-rc35{padding:14px!important}.upyx-assistant-zone-rc35,.upyx-assistant-summary-panel-rc35{padding:12px;border-radius:18px}.upyx-assistant-summary-panel-rc35 .upyx-assistant-actions{flex-direction:column-reverse}.upyx-assistant-summary-panel-rc35 .upyx-assistant-actions button{width:100%}}

/* RC36 — Polish UX Projet : informations regroupées dans un seul cadre */
.upyx-project-form-section h3 .material-symbols-rounded{
  font-size:24px;
}
.upyx-project-form-section.section-green{border-top-color:#16a34a;}
.upyx-project-form-section.section-orange{border-top-color:#ea580c;}
.upyx-project-form-section.section-blue h3 .material-symbols-rounded{color:#2563eb;}
.upyx-project-form-section.section-green h3 .material-symbols-rounded{color:#16a34a;}
.upyx-project-form-section.section-orange h3 .material-symbols-rounded{color:#ea580c;}
.upyx-project-form-grid.upyx-project-form-row-location{grid-template-columns:1.8fr .65fr 1fr;}
.upyx-project-form-grid label,
.upyx-project-notes{
  background:transparent;
  border:0;
  border-radius:0;
  padding:0;
  color:#334155;
  box-shadow:none;
}

/* RC36 — Fiche entreprise : aperçu logo propre, actions sous le cadre */
.upyx-company-identity-head{
  align-items:flex-start;
}
.upyx-company-logo-box.upyx-company-logo-top{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  width:min(360px,100%);
}
.upyx-company-logo-box.upyx-company-logo-top img{
  display:block;
  width:100%;
  max-height:92px;
  object-fit:contain;
  background:#fff;
  border:1px solid #dbe3ee;
  border-radius:14px;
  padding:10px;
}
.upyx-company-logo-box.upyx-company-logo-top .upyx-file-row{
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:4px;
}
.upyx-company-logo-box.upyx-company-logo-top .upyx-file-name{
  display:block;
  color:#64748b;
  font-weight:800;
}
@media(max-width:1100px){
  .upyx-project-form-grid.upyx-project-form-row-location{grid-template-columns:repeat(2,minmax(0,1fr));max-width:none;}
  .upyx-project-address-field{grid-column:1 / -1;}
}
@media(max-width:640px){
  .upyx-project-form-grid.upyx-project-form-row-location{grid-template-columns:1fr;}
}


/* RC36 Consolidée — Projet regroupé + État du projet */

/* RC37 — Projet : état + dossier sur une seule page */
.upyx-project-actions{justify-content:flex-end;}

/* RC37-GOLDEN — Vue d'ensemble Projet harmonisée avant Foundation */
.upyx-current-user-hidden{display:none!important}
.upyx-project-v5{display:grid;gap:18px;padding:22px;max-width:1560px;margin:0 auto}
.upyx-project-v5-card{background:#fff;border:1px solid #e4ebf5;border-radius:20px;box-shadow:0 14px 38px rgba(15,35,70,.06);overflow:hidden}
.upyx-v5-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid #e7edf6}
.upyx-v5-card-head h2{margin:0;display:flex;align-items:center;gap:10px;font-size:20px;color:#101a33}
.upyx-v5-card-head h2 .material-symbols-rounded{color:#0b63f6}
.upyx-v5-card-head p{margin:6px 0 0;color:#52627a;font-size:14px}
.upyx-v5-edit-btn{display:inline-flex!important;align-items:center;gap:8px;background:#fff!important;color:#0b63f6!important;border:1px solid #b8cdf8!important;border-radius:12px!important;white-space:nowrap}
.upyx-v5-info-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:20px;padding:20px 24px 24px}
.upyx-v5-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid #eef2f8;border-radius:18px;overflow:hidden;background:#fbfdff}
.upyx-v5-info-item{display:flex;gap:14px;align-items:center;padding:18px 20px;min-height:84px;border-right:1px solid #edf2f8;border-bottom:1px solid #edf2f8}
.upyx-v5-info-item:nth-child(3n){border-right:0}.upyx-v5-info-item:nth-last-child(-n+3){border-bottom:0}
.upyx-v5-info-item .material-symbols-rounded{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#eef5ff;color:#0b63f6;font-size:23px;flex:0 0 42px}
.upyx-v5-info-item small{display:block;color:#596b86;font-weight:800;margin-bottom:5px}.upyx-v5-info-item strong{display:block;color:#1d2a44;font-size:15px;font-weight:800}
.upyx-v5-progress-card{border:1px solid #e4ebf5;border-radius:18px;padding:18px;display:flex;align-items:center;gap:18px;background:#fff;min-height:132px}
.upyx-v5-ring{width:92px;height:92px;border-radius:50%;border:9px solid #e8edf5;border-top-color:#0b63f6;display:grid;place-items:center;flex:0 0 92px}.upyx-v5-ring strong{font-size:22px;color:#101a33}
.upyx-v5-progress-card>div:last-child{flex:1}.upyx-v5-progress-card strong{display:block;color:#243453;margin-bottom:12px}.upyx-v5-progress-card small{display:block;color:#52627a;margin-top:10px;font-weight:700}
.upyx-v5-editor{padding:22px 24px;border-top:1px solid #e7edf6;background:#fbfdff}.upyx-v5-editor[hidden]{display:none!important}.upyx-v5-editor .form-grid{margin-bottom:16px}.upyx-v5-editor textarea{width:100%;border:1px solid #d7dfea;border-radius:14px;padding:12px;margin-top:6px}
.upyx-v5-timeline{display:flex;align-items:flex-start;gap:0;padding:26px 24px 28px;overflow:auto}.upyx-v5-time-step{position:relative;min-width:110px;text-align:center;color:#5d6d84}.upyx-v5-time-step:before{content:"";position:absolute;top:18px;left:-50%;right:50%;height:2px;background:#dbe4f0}.upyx-v5-time-step:first-child:before{display:none}.upyx-v5-time-dot{width:38px;height:38px;margin:0 auto 10px;border-radius:50%;display:grid;place-items:center;border:1px solid #cbd6e5;background:#fff;color:#60718a;font-weight:900}.upyx-v5-time-step.done:before,.upyx-v5-time-step.current:before{background:#0b63f6}.upyx-v5-time-step.done .upyx-v5-time-dot{background:#0b63f6;color:#fff;border-color:#0b63f6}.upyx-v5-time-step.current .upyx-v5-time-dot{background:#fff;color:#0b63f6;border:2px solid #0b63f6}.upyx-v5-time-step strong{display:block;font-size:12px;color:#1d2a44}.upyx-v5-time-step small{display:block;font-size:11px;color:#0b63f6;font-weight:800;margin-top:2px}
.upyx-v5-step-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;padding:22px 24px 24px}.upyx-v5-step-card{position:relative;min-height:150px;text-align:left;background:#fff;border:1px solid #e1e8f2;border-radius:16px;padding:18px 16px 16px;box-shadow:0 10px 28px rgba(15,35,70,.04);color:#14213d;display:flex;flex-direction:column;gap:8px;margin:0!important}.upyx-v5-step-card:hover{border-color:#0b63f6;transform:translateY(-1px)}.upyx-v5-step-card.active{border:2px solid #0b63f6}.upyx-v5-step-card.done{background:#fbfffd}.upyx-v5-step-card .material-symbols-rounded{font-size:30px;color:#0b63f6}.upyx-v5-step-card strong{font-size:15px}.upyx-v5-step-card small{color:#52627a;line-height:1.25}.upyx-v5-step-status{margin-top:auto;align-self:flex-start;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:900;background:#eef2f7;color:#2f3d52}.upyx-v5-step-card.done .upyx-v5-step-status{background:#dff8e9;color:#08733c}.upyx-v5-step-card.current .upyx-v5-step-status{background:#e9f1ff;color:#0b63f6}.upyx-v5-step-arrow{position:absolute;right:14px;bottom:14px;color:#0f1f3d}
@media (max-width:1200px){.upyx-v5-info-layout{grid-template-columns:1fr}.upyx-v5-step-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.upyx-v5-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.upyx-v5-info-item:nth-child(3n){border-right:1px solid #edf2f8}.upyx-v5-info-item:nth-child(2n){border-right:0}.upyx-v5-info-item:nth-last-child(-n+3){border-bottom:1px solid #edf2f8}.upyx-v5-info-item:nth-last-child(-n+2){border-bottom:0}}
@media (max-width:760px){.upyx-project-v5{padding:12px}.upyx-v5-card-head{padding:16px;flex-direction:column}.upyx-v5-info-layout{padding:16px}.upyx-v5-info-grid,.upyx-v5-step-grid{grid-template-columns:1fr}.upyx-v5-info-item{border-right:0!important;border-bottom:1px solid #edf2f8!important}.upyx-v5-info-item:last-child{border-bottom:0!important}.upyx-v5-progress-card{align-items:flex-start}.upyx-v5-timeline{padding:20px 16px}.upyx-v5-step-grid{padding:16px}}

/* RC37 — Projet/Header harmonisés */
.upyx-mobile-progress-hint{display:none;margin:.35rem 0 0;color:#64748b;font-size:.82rem}
#project-start{display:none!important}
.upyx-v4-project-popover .upyx-v4-popover-actions{grid-template-columns:1fr 1fr;gap:10px}
.upyx-v4-project-popover .upyx-v4-popover-actions button{justify-content:center}
@media(max-width:760px){
  .upyx-project-v5-progress .upyx-v5-card-head{gap:10px}
  .upyx-mobile-progress-hint{display:block}
  .upyx-v5-timeline{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;overflow:visible!important;padding:14px 16px!important}
  .upyx-v5-time-step{min-width:0!important;display:flex!important;align-items:center!important;gap:12px!important;text-align:left!important;padding:10px 12px!important;border:1px solid #e5edf7!important;border-radius:14px!important;background:#fff!important}
  .upyx-v5-time-step:before{display:none!important}
  .upyx-v5-time-dot{margin:0!important;width:30px!important;height:30px!important;flex:0 0 30px!important;font-size:.78rem!important}
  .upyx-v5-time-step strong{font-size:.9rem!important}
  .upyx-v5-time-step small{margin-top:0!important;margin-left:auto!important}
  .upyx-v5-progress-card{width:100%;display:grid!important;grid-template-columns:auto 1fr!important;align-items:center!important}
  .upyx-v5-ring{width:74px!important;height:74px!important}
}

/* RC37 harmonisation fiche projet */
.upyx-project-form-grid.upyx-project-form-row-project{grid-template-columns:1.25fr 1fr 1fr .85fr .85fr;}
.upyx-project-form-grid.upyx-project-form-row-client{grid-template-columns:1.15fr 1.25fr 1fr .85fr;}
.upyx-project-form-section{margin:18px 0 20px;padding:18px;border:1px solid #e2e8f0;border-radius:22px;background:#fff;border-top:4px solid #2563eb;}
.upyx-project-form-section h3{display:flex;align-items:center;gap:10px;margin:0 0 16px;font-size:18px;font-weight:800;color:#0f172a;}
.upyx-project-form-section.section-green{border-top-color:#16a34a;}
.upyx-project-form-section.section-orange{border-top-color:#ea580c;}
.upyx-project-form-grid label{background:#f8fafc;border:1px solid #e2e8f0;border-radius:18px;padding:12px;font-weight:750;color:#334155;}
.upyx-project-form-grid input,.upyx-project-form-grid select{height:52px;width:100%;box-sizing:border-box;margin-top:8px;background:#fff;border:1px solid #dbe3ee;border-radius:16px;padding:0 14px;font:inherit;color:#0f172a;}
.upyx-project-notes textarea{min-height:44px;border:1px solid #dbe3ee;background:#fff;border-radius:12px;}
.upyx-project-form-grid select{appearance:auto;-webkit-appearance:menulist;}
.upyx-generated-field{background:#f1f5f9!important;color:#64748b!important;cursor:not-allowed;}
@media(max-width:1200px){.upyx-project-form-grid.upyx-project-form-row-project,.upyx-project-form-grid.upyx-project-form-row-client{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:720px){.upyx-project-form-grid.upyx-project-form-row-project,.upyx-project-form-grid.upyx-project-form-row-client{grid-template-columns:1fr;}.upyx-project-form-section{padding:14px;border-radius:18px;}}

/* RC37 — Fiche Projet simplifiée + rubriques en lignes */
.upyx-v5-info-layout-simple{display:block!important;grid-template-columns:1fr!important;}
.upyx-v5-info-layout-simple .upyx-v5-info-grid{width:100%;grid-template-columns:repeat(4,minmax(0,1fr));}
.upyx-v5-info-layout-simple .upyx-v5-info-item:nth-child(3n){border-right:1px solid #edf2f8;}
.upyx-v5-info-layout-simple .upyx-v5-info-item:nth-child(4n){border-right:0;}
.upyx-v5-line-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.upyx-v5-line-actions button{display:inline-flex!important;align-items:center;gap:7px;margin:0!important;white-space:nowrap;}
.upyx-v5-step-lines{display:grid;gap:10px;padding:18px 24px 24px;}
.upyx-v5-step-line{border:1px solid #e1e8f2;border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 8px 22px rgba(15,35,70,.035);}
.upyx-v5-step-line.disabled{opacity:.55;background:#f8fafc;}
.upyx-v5-line-main{width:100%;display:grid!important;grid-template-columns:36px 44px minmax(0,1fr) auto 28px;align-items:center;gap:12px;padding:14px 16px!important;margin:0!important;background:transparent!important;color:#14213d!important;border:0!important;text-align:left!important;box-shadow:none!important;}
.upyx-v5-line-main:hover{background:#f8fbff!important;}
.upyx-v5-line-index{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#eef5ff;color:#0b63f6;font-weight:900;font-size:13px;}
.upyx-v5-line-icon{width:38px;height:38px;border-radius:12px;display:grid!important;place-items:center;background:#f1f6ff;color:#0b63f6;font-size:24px!important;}
.upyx-v5-line-title strong{display:block;font-size:15px;color:#101a33;}
.upyx-v5-line-title small{display:block;margin-top:3px;color:#52627a;font-size:13px;}
.upyx-v5-step-line.done .upyx-v5-step-status{background:#dff8e9;color:#08733c;}
.upyx-v5-step-line.current .upyx-v5-step-status{background:#e9f1ff;color:#0b63f6;}
.upyx-v5-step-line.open .upyx-v5-step-arrow{transform:rotate(180deg);}
.upyx-v5-line-detail{display:none;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px 14px 108px;border-top:1px solid #edf2f8;background:#fbfdff;}
.upyx-v5-step-line.open .upyx-v5-line-detail{display:flex;}
.upyx-v5-line-detail button{display:inline-flex!important;align-items:center;gap:8px;margin:0!important;white-space:nowrap;}
.upyx-v5-rubric-switch{display:flex!important;align-items:center;gap:10px;margin:0!important;color:#243453;font-weight:800;}
.upyx-v5-rubric-switch input{width:18px;height:18px;margin:0;}
@media(max-width:1200px){.upyx-v5-info-layout-simple .upyx-v5-info-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.upyx-v5-info-layout-simple .upyx-v5-info-item:nth-child(2n){border-right:0!important;}.upyx-v5-info-layout-simple .upyx-v5-info-item:nth-child(4n){border-right:0!important;}}
@media(max-width:760px){.upyx-v5-info-layout-simple .upyx-v5-info-grid{grid-template-columns:1fr;}.upyx-v5-line-actions{width:100%;}.upyx-v5-line-actions button{flex:1;justify-content:center;}.upyx-v5-line-main{grid-template-columns:30px 36px minmax(0,1fr) 26px!important;gap:9px;padding:13px 12px!important;}.upyx-v5-line-main .upyx-v5-step-status{grid-column:3/4;justify-self:start;margin-top:4px;}.upyx-v5-line-icon{width:34px;height:34px;font-size:21px!important;}.upyx-v5-line-detail{padding:12px;flex-direction:column;align-items:stretch;}.upyx-v5-line-detail button{justify-content:center;}.upyx-v5-step-lines{padding:14px;}}

/* RC37 — Regroupement Projet / Client / Chantier / Notes */
.upyx-project-form-unified{
  border-top-color:#2563eb;
  padding:0;
  overflow:hidden;
}
.upyx-project-form-unified .upyx-project-form-group{
  padding:20px;
  border-bottom:1px solid #e8eef6;
}
.upyx-project-form-unified .upyx-project-form-group:last-child{border-bottom:0;}
.upyx-project-form-unified .upyx-project-form-group h3{
  margin:0 0 14px;
}
.upyx-project-form-unified .upyx-project-form-group:nth-child(2) h3 .material-symbols-rounded{color:#16a34a;}
.upyx-project-form-unified .upyx-project-form-group:nth-child(3) h3 .material-symbols-rounded{color:#ea580c;}
.upyx-project-form-unified .upyx-project-form-group:nth-child(4) h3 .material-symbols-rounded{color:#7c3aed;}
.upyx-project-form-unified .upyx-project-location-inline{margin-top:0;}
.upyx-project-form-unified .upyx-project-notes{display:block;margin:0;}
@media(max-width:720px){
  .upyx-project-form-unified .upyx-project-form-group{padding:14px;}
}

/* RC37 — En-tête compact des rubriques et avancement responsive */
.upyx-v5-rubrics-head{align-items:center;}
.upyx-v5-rubrics-heading{min-width:0;flex:1 1 auto;}
.upyx-v5-header-tools{display:flex;align-items:center;justify-content:flex-end;gap:14px;flex:0 0 auto;}
.upyx-v5-inline-progress{width:min(300px,28vw);min-width:230px;display:grid;gap:8px;}
.upyx-v5-inline-progress-copy{display:flex;align-items:baseline;justify-content:space-between;gap:12px;}
.upyx-v5-inline-progress-copy strong{font-size:18px;line-height:1;color:#0b63f6;white-space:nowrap;}
.upyx-v5-inline-progress-copy span{font-size:13px;font-weight:700;color:#52627a;text-align:right;white-space:nowrap;}
.upyx-v5-inline-progress-track{height:7px;border-radius:999px;background:#e7edf6;overflow:hidden;}
.upyx-v5-inline-progress-track span{display:block;width:0;height:100%;border-radius:inherit;background:#0b63f6;transition:width .25s ease;}
.upyx-v5-compact-toggle{min-height:42px!important;padding:0 14px!important;border-radius:12px!important;display:inline-flex!important;align-items:center;gap:7px;margin:0!important;white-space:nowrap;}
.upyx-v5-compact-toggle .material-symbols-rounded{font-size:20px;}
@media(max-width:900px){
  .upyx-v5-rubrics-head{align-items:stretch;}
  .upyx-v5-header-tools{width:100%;justify-content:space-between;}
  .upyx-v5-inline-progress{width:auto;min-width:0;flex:1 1 auto;}
}
@media(max-width:560px){
  .upyx-v5-header-tools{align-items:stretch;gap:10px;}
  .upyx-v5-inline-progress-copy{align-items:flex-start;flex-direction:column;gap:3px;}
  .upyx-v5-inline-progress-copy span{text-align:left;white-space:normal;}
  .upyx-v5-compact-toggle{align-self:flex-end;min-width:132px;justify-content:center;}
}

/* RC37 — Avancement des rubriques renforcé */
.upyx-v5-header-tools{
  gap:16px;
}
.upyx-v5-inline-progress{
  width:min(430px,36vw);
  min-width:330px;
  padding:14px 16px;
  border:1px solid #cfe0ff;
  border-radius:16px;
  background:linear-gradient(135deg,#f7faff 0%,#eef5ff 100%);
  box-shadow:0 8px 22px rgba(11,99,246,.10);
}
.upyx-v5-inline-progress-copy{
  justify-content:flex-start;
  gap:14px;
}
.upyx-v5-inline-progress-copy strong{
  font-size:34px;
  line-height:.95;
  letter-spacing:-1.4px;
  color:#075be8;
}
.upyx-v5-inline-progress-copy span{
  font-size:14px;
  font-weight:850;
  color:#263754;
  text-align:left;
}
.upyx-v5-inline-progress-track{
  height:11px;
  background:#dce7f8;
  box-shadow:inset 0 1px 2px rgba(15,35,70,.08);
}
.upyx-v5-inline-progress-track span{
  background:linear-gradient(90deg,#0b63f6,#3987ff);
}
.upyx-v5-compact-toggle{
  min-height:48px;
  border-radius:14px!important;
}
@media(max-width:980px){
  .upyx-v5-header-tools{width:100%;align-items:center;}
  .upyx-v5-inline-progress{width:auto;min-width:0;flex:1 1 auto;}
}
@media(max-width:620px){
  .upyx-v5-header-tools{display:grid;grid-template-columns:1fr;}
  .upyx-v5-inline-progress{width:100%;padding:13px 14px;}
  .upyx-v5-inline-progress-copy{flex-direction:row;align-items:baseline;gap:12px;}
  .upyx-v5-inline-progress-copy strong{font-size:30px;}
  .upyx-v5-inline-progress-copy span{font-size:13px;white-space:normal;}
  .upyx-v5-compact-toggle{width:100%;justify-content:center;}
}

/* RC37 — Titres de sections renforcés + sélecteur projet premium */
.upyx-project-v5 .upyx-v5-card-head h2,
.upyx-project-v5 .upyx-v5-rubrics-head h2{
  color:#0b63f6!important;
}
.upyx-project-v5 .upyx-v5-card-head h2 .material-symbols-rounded,
.upyx-project-v5 .upyx-v5-rubrics-head h2 .material-symbols-rounded{
  color:#0b63f6!important;
}
.upyx-v4-project-popover{
  width:min(520px,calc(100vw - 32px))!important;
  padding:20px!important;
  border:1px solid #dbe7f7!important;
  border-radius:24px!important;
  box-shadow:0 28px 80px rgba(15,35,70,.24)!important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%)!important;
}
.upyx-project-selector-head{align-items:flex-start!important;margin-bottom:16px!important;}
.upyx-project-selector-head>div{display:grid;gap:3px;min-width:0;}
.upyx-project-selector-kicker{font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:#0b63f6;}
.upyx-project-selector-head strong{font-size:22px!important;line-height:1.1;color:#101a33;}
.upyx-project-selector-head small{font-size:13px;color:#64748b;font-weight:600;line-height:1.4;}
.upyx-project-selector-head button{width:40px!important;height:40px!important;border-radius:12px!important;font-size:22px!important;}
.upyx-project-search-field{position:relative;display:block;margin:0 0 14px!important;}
.upyx-project-search-field>.material-symbols-rounded{position:absolute;left:14px;top:50%;transform:translateY(-50%);z-index:2;color:#0b63f6;font-size:21px;pointer-events:none;}
.upyx-project-search-field input{margin:0!important;padding:13px 14px 13px 44px!important;min-height:48px;border:1px solid #cddcf0!important;border-radius:14px!important;background:#fff!important;box-shadow:0 3px 12px rgba(15,35,70,.05);font-weight:650;}
.upyx-project-search-field input:focus{outline:none;border-color:#0b63f6!important;box-shadow:0 0 0 4px rgba(11,99,246,.12)!important;}
.upyx-v4-project-list{gap:10px!important;max-height:330px!important;padding-right:3px;}
.upyx-v4-project-option{position:relative;padding:14px 48px 14px 15px!important;border-radius:16px!important;border-color:#dce6f3!important;background:#fff!important;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease!important;}
.upyx-v4-project-option:after{content:'chevron_right';font-family:'Material Symbols Rounded';position:absolute;right:15px;top:50%;transform:translateY(-50%);font-size:22px;color:#8aa0bd;}
.upyx-v4-project-option:hover{transform:translateY(-1px);border-color:#8bb8ff!important;box-shadow:0 8px 22px rgba(11,99,246,.10)!important;}
.upyx-v4-project-option.is-last-project{border-color:#7db0ff!important;background:linear-gradient(135deg,#f4f8ff 0%,#edf5ff 100%)!important;box-shadow:0 8px 20px rgba(11,99,246,.10)!important;}
.upyx-v4-project-option.is-last-project:before{content:'Dernier projet';display:inline-flex;margin-bottom:6px;padding:4px 8px;border-radius:999px;background:#0b63f6;color:#fff;font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;}
.upyx-v4-project-option strong{font-size:15px!important;color:#101a33;}
.upyx-v4-project-option small{line-height:1.35;}
.upyx-v4-project-empty{display:grid;place-items:center;text-align:center;min-height:150px;padding:26px 18px!important;border:1px dashed #cbd8ea;border-radius:18px;background:#f8fbff;color:#61718a;font-weight:750;line-height:1.45;}
.upyx-v4-project-empty .material-symbols-rounded{font-size:34px;color:#0b63f6;margin-bottom:8px;}
.upyx-v4-popover-actions{gap:10px!important;padding-top:14px!important;margin-top:14px!important;}
.upyx-v4-popover-actions button{min-height:48px!important;border-radius:14px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;}
@media(max-width:620px){
  .upyx-v4-project-popover{left:12px!important;right:12px!important;width:auto!important;padding:16px!important;}
  .upyx-project-selector-head strong{font-size:20px!important;}
  .upyx-v4-popover-actions{grid-template-columns:1fr!important;display:grid!important;}
}


/* RC37 — Harmonisation des sélecteurs Métrés */
#menuiseries .menu-general-config input,
#menuiseries .menu-general-config select,
#toiture .charpente-main-label input,
#toiture .charpente-main-label select {
  width: 100% !important;
  height: var(--ux-business-control-height, 40px) !important;
  min-height: var(--ux-business-control-height, 40px) !important;
  padding: 0 16px !important;
  margin: 0 !important;
  border-radius: 14px !important;
  font-size: 1rem !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

#menuiseries .menu-general-config,
#toiture .charpente-general-config {
  align-items: stretch !important;
}

#menuiseries .menu-material-config {
  align-items: end !important;
}

#menuiseries .menu-material-config .checkbox-line {
  height: 52px !important;
  min-height: 52px !important;
  align-items: center !important;
  padding: 0 !important;
}

#toiture .charpente-main-label {
  justify-content: flex-end !important;
}

@media (max-width: 900px) {
  #menuiseries .menu-general-config,
  #menuiseries .menu-material-config,
  #toiture .charpente-general-config {
    grid-template-columns: 1fr !important;
  }
  #toiture .charpente-main-label + .charpente-main-label {
    border-left: 0 !important;
    border-top: 1px solid rgba(37,99,235,.16) !important;
  }
}

/* RC37 — Parcours unifié Toiture */
.roof-geometry-section,.roof-structure-section{margin-bottom:24px}
.roof-structure-section{border-top:1px solid #e5edff;padding-top:24px}
@media(max-width:760px){.roof-structure-section{padding-top:18px}}


/* Toiture V1 — charpente traditionnelle compacte */
#toiture .charpente-structure-config{padding:14px!important}
#toiture .charpente-structure-primary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start;width:100%}
#toiture .charpente-structure-primary .charpente-main-label{justify-content:start!important;padding:0!important;gap:6px!important}
#toiture .charpente-structure-primary .charpente-main-label + .charpente-main-label{border:0!important}
#toiture .charpente-structure-primary .ux-field__label{min-height:22px;display:block!important;line-height:22px;white-space:nowrap}
#toiture .charpente-structure-primary .ux-input,#toiture .charpente-structure-primary .ux-select,#toiture .charpente-structure-primary #charpenteTotal,#toiture .charpente-structure-primary #charpenteType{box-sizing:border-box!important;height:42px!important;min-height:42px!important;padding:0 10px!important}
#toiture .charpente-structure-primary .template-intro{margin:0!important;font-size:12px!important;line-height:1.3!important;color:var(--upyx-muted)!important;font-weight:600!important}
#toiture .charpente-specific-fields{margin-top:16px;padding-top:16px;border-top:1px solid #e5edff}
#toiture .charpente-specific-fields[hidden]{display:none!important}
#toiture .charpente-specific-heading{margin-bottom:12px;color:var(--upyx-blue);font-size:16px;font-weight:850;line-height:1.25}
#toiture .charpente-structure-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 14px;align-items:stretch}
#toiture .charpente-detail-group,#toiture .charpente-brace-positions{min-width:0;border:1px solid rgb(20 100 232 / .22);border-radius:10px;background:#f8fbff;padding:10px}
#toiture .charpente-detail-group--composition{grid-column:1/-1}
#toiture .charpente-detail-group--parameters{grid-column:1 / span 2;grid-row:2;min-height:146px}
#toiture .charpente-detail-group__title,#toiture .charpente-brace-positions__title{margin-bottom:8px;color:var(--upyx-navy);font-size:13px;font-weight:800;line-height:1.25}
#toiture .charpente-adopt-classic-model{margin:-2px 0 10px;padding:0;border:0;background:transparent;color:var(--upyx-blue);font:inherit;font-size:12px;font-weight:750;text-decoration:underline;text-underline-offset:2px;cursor:pointer}
#toiture .charpente-adopt-classic-model:focus-visible{outline:2px solid var(--upyx-blue);outline-offset:3px;border-radius:2px}
#toiture .charpente-detail-group__fields{display:grid;gap:10px;min-width:0}
#toiture .charpente-detail-group__fields--composition{grid-template-columns:repeat(2,minmax(0,1fr))}
#toiture .charpente-detail-group__fields--stacked{grid-template-columns:1fr;gap:8px}
#toiture .charpente-detail-group .ux-field{min-width:0;gap:5px!important;font-weight:700;color:var(--upyx-text)}
#toiture .charpente-detail-group .ux-field__label,#toiture .charpente-brace-positions .ux-field__label{color:var(--upyx-text);font-size:13px;font-weight:750}
#toiture .charpente-detail-group .ux-input,#toiture .charpente-detail-group .ux-select{width:100%;min-height:40px!important;height:40px!important;padding:0 10px!important}
#toiture .charpente-brace-positions{grid-column:3 / -1;grid-row:2;min-height:146px;max-width:none}
#toiture .charpente-brace-positions:has(#charpenteBraceKingPostPositionLabel[hidden]){display:none}
#toiture .charpente-brace-positions__fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#toiture .charpente-brace-positions .ux-field{min-width:0;gap:4px!important;font-weight:700}
#toiture .charpente-brace-positions .ux-input{min-height:40px!important;height:40px!important;padding:0 10px!important}
#toiture #charpenteTimberSections{grid-column:1/-1;width:100%;max-width:none!important;margin-top:2px;padding:10px!important;border:1px solid rgb(20 100 232 / .22)!important;border-radius:10px;background:#f8fbff!important}
#toiture #charpenteTimberSections .ux-subsection__title{margin:0 0 8px;font-size:14px;font-weight:800;color:var(--upyx-blue)}
#toiture #charpenteTimberSections .timber-section-unit{margin-left:4px;color:var(--upyx-muted);font-size:12px;font-weight:700}
/* Chaque élément bois porte ses deux dimensions : la grille ne doit pas retomber sur la grille technique générique. */
#toiture #charpenteTimberSections .timber-section-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important}
#toiture #charpenteTimberSections .timber-section{min-width:0;padding:10px;border:1px solid #dbe6f7;border-radius:10px;background:#fff}
#toiture #charpenteTimberSections .timber-section__name{margin-bottom:8px;color:var(--upyx-navy);font-size:13px;font-weight:800;line-height:1.2}
#toiture #charpenteTimberSections .timber-section__dimensions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#toiture #charpenteTimberSections .ux-field{min-width:0;gap:4px!important}
#toiture #charpenteTimberSections .ux-field__label{font-size:12px;font-weight:700}
#toiture #charpenteTimberSections .ux-input{min-height:40px!important;height:40px!important;padding:0 10px!important}
@media(min-width:821px) and (max-width:1100px){#toiture .charpente-structure-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#toiture .charpente-detail-group--parameters{grid-column:1 / span 2}#toiture .charpente-brace-positions{grid-column:3;grid-row:2}#toiture #charpenteTimberSections .timber-section-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media(max-width:820px){#toiture .charpente-structure-primary{grid-template-columns:repeat(2,minmax(0,1fr))}#toiture .charpente-structure-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#toiture .charpente-detail-group--parameters{grid-column:1;grid-row:2}#toiture .charpente-brace-positions{grid-column:2;grid-row:2}#toiture #charpenteTimberSections .timber-section-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){#toiture .charpente-structure-primary,#toiture .charpente-structure-grid{grid-template-columns:1fr}#toiture .charpente-structure-primary .ux-field__label{white-space:normal}#toiture .charpente-detail-group--composition,#toiture .charpente-detail-group--parameters,#toiture .charpente-brace-positions{grid-column:auto;grid-row:auto;min-height:0}#toiture .charpente-detail-group__fields--composition,#toiture .charpente-brace-positions__fields{grid-template-columns:1fr}#toiture #charpenteTimberSections .timber-section-grid{grid-template-columns:1fr!important}}

/* RC37 — Liste des toitures à hauteur dynamique */
#toiture .table-box:has(#tableToitures),
#toiture #tableToitures{
  min-height:0!important;
}
#toiture .table-box:has(#tableToitures){
  height:auto!important;
  resize:none!important;
  overflow-x:auto!important;
  overflow-y:visible!important;
}
#toiture #tableToitures tbody:empty{
  display:table-row-group;
}
#toiture #tableToitures tbody tr{
  height:auto!important;
}

/* Toiture V1 — métrés denses, table lisible et modes de pente explicites */
#toiture [data-roof-slope-sharing-option][hidden]{
  display:none!important;
}
#toiture .charpente-field-groups{
  align-items:start;
}
#toiture .charpente-field-group{
  align-self:start;
  padding:14px 16px;
}
#toiture .charpente-field-group h4{
  margin-bottom:8px;
}
#toiture .charpente-geometry-grid{
  justify-content:start;
  align-items:end;
}
#toiture .charpente-field-group-geometry .charpente-grid-2{
  grid-template-columns:repeat(2,minmax(0,190px))!important;
}
#toiture .charpente-field-group-pente .charpente-grid-2{
  grid-template-columns:max-content minmax(120px,160px) minmax(150px,190px)!important;
}
#toiture .charpente-field-group-debords .charpente-grid-2{
  grid-template-columns:repeat(2,minmax(120px,160px))!important;
}
#toiture .charpente-field-group-raccords .charpente-grid-2{
  grid-template-columns:repeat(2,minmax(150px,220px))!important;
}
#toiture #tableToitures{
  min-width:1040px;
  table-layout:fixed;
}
#toiture #tableToitures th:nth-child(1){width:120px;}
#toiture #tableToitures th:nth-child(2){width:180px;}
#toiture #tableToitures th:nth-child(3),
#toiture #tableToitures th:nth-child(4){width:100px;}
#toiture #tableToitures th:nth-child(5){width:90px;}
#toiture #tableToitures th:nth-child(6){width:160px;}
#toiture #tableToitures th:nth-child(7),
#toiture #tableToitures th:nth-child(8){width:145px;}
#toiture #tableToitures .roofType{
  width:100%;
  min-width:0;
}
#toiture .roof-slope-share-check{
  align-self:end;
  margin:0!important;
  min-height:44px;
  padding:0!important;
}
#toiture .roof-slope-share-check input{
  flex:0 0 auto;
  margin:0!important;
}
@media(min-width:821px) and (max-width:1100px){
  #toiture .charpente-field-groups{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #toiture .charpente-field-group-pente .charpente-grid-2{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:720px){
  #toiture #tableToitures{min-width:1040px;}
}

/* RC37 — Revêtements extérieurs : champs harmonisés */
.bardage-option-config .revetement-form-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
  align-items:end;
}
.bardage-option-config .revetement-form-grid label{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
  font-weight:700;
}
.bardage-option-config .revetement-form-grid input,
.bardage-option-config .revetement-form-grid select{
  width:100%;
  min-height:48px;
  height:48px;
  padding:0 14px;
  border:1px solid #d7dfeb;
  border-radius:10px;
  background:#fff;
  color:#172033;
  font:inherit;
  box-sizing:border-box;
}
.bardage-option-config .revetement-form-grid input:focus,
.bardage-option-config .revetement-form-grid select:focus{
  outline:none;
  border-color:#2f68d8;
  box-shadow:0 0 0 3px rgba(47,104,216,.12);
}
@media (max-width:900px){
  .bardage-option-config .revetement-form-grid{grid-template-columns:1fr;gap:14px;}
}

/* RC37 — présélections courantes avec saisie libre */
.revetement-form-grid label .preset-other-input:not([hidden]) {
  margin-top: 8px;
}


/* RC37 — Passe finale de validation du domaine Métrés
   Grammaire commune : champs homogènes, aides neutres, responsive sans rupture. */
#murs, #pignons, #planchers, #toiture, #menuiseries, #zinguerie, #isolation, #bardage {
  --metres-control-height: 48px;
  --metres-control-radius: 12px;
  --metres-control-border: #cbd5e1;
}
#murs label, #pignons label, #planchers label, #toiture label,
#menuiseries label, #zinguerie label, #isolation label, #bardage label {
  line-height: 1.35;
}
#murs input:not([type="checkbox"]):not([type="radio"]),
#murs select,
#pignons input:not([type="checkbox"]):not([type="radio"]),
#pignons select,
#planchers input:not([type="checkbox"]):not([type="radio"]),
#planchers select,
#toiture input:not([type="checkbox"]):not([type="radio"]),
#toiture select,
#menuiseries input:not([type="checkbox"]):not([type="radio"]),
#menuiseries select,
#zinguerie input:not([type="checkbox"]):not([type="radio"]),
#zinguerie select,
#isolation input:not([type="checkbox"]):not([type="radio"]),
#isolation select,
#bardage input:not([type="checkbox"]):not([type="radio"]),
#bardage select {
  min-height: var(--metres-control-height) !important;
  height: var(--metres-control-height);
  border-radius: var(--metres-control-radius) !important;
  border-color: var(--metres-control-border);
  box-sizing: border-box;
}
#murs textarea, #pignons textarea, #planchers textarea, #toiture textarea,
#menuiseries textarea, #zinguerie textarea, #isolation textarea, #bardage textarea {
  border-radius: var(--metres-control-radius) !important;
  border-color: var(--metres-control-border);
  box-sizing: border-box;
}
/* Une rubrique incomplète est un état de travail, pas une erreur. */
#murs .coherence-box.warning, #pignons .coherence-box.warning,
#planchers .coherence-box.warning, #toiture .coherence-box.warning,
#menuiseries .coherence-box.warning, #zinguerie .coherence-box.warning,
#isolation .coherence-box.warning, #bardage .coherence-box.warning {
  background: #eff6ff;
  color: #1e4f8f;
  border-color: rgba(15,79,168,.22);
  font-weight: 650;
}
/* Les contenus générés restent compacts et grandissent avec les données. */
#toiture .table-box, #murs .table-box, #pignons .table-box,
#planchers .table-box, #menuiseries .table-box {
  height: auto !important;
  min-height: 0 !important;
}
@media (max-width: 760px) {
  #murs .form-grid, #pignons .form-grid, #planchers .form-grid,
  #toiture .form-grid, #menuiseries .form-grid, #zinguerie .form-grid,
  #isolation .form-grid, #bardage .form-grid {
    grid-template-columns: 1fr !important;
  }
  #murs input:not([type="checkbox"]):not([type="radio"]), #murs select,
  #pignons input:not([type="checkbox"]):not([type="radio"]), #pignons select,
  #planchers input:not([type="checkbox"]):not([type="radio"]), #planchers select,
  #toiture input:not([type="checkbox"]):not([type="radio"]), #toiture select,
  #menuiseries input:not([type="checkbox"]):not([type="radio"]), #menuiseries select,
  #zinguerie input:not([type="checkbox"]):not([type="radio"]), #zinguerie select,
  #isolation input:not([type="checkbox"]):not([type="radio"]), #isolation select,
  #bardage input:not([type="checkbox"]):not([type="radio"]), #bardage select {
    width: 100% !important;
    max-width: none !important;
  }
}

/* ======================================================================
   RC37 — Harmonisation Chiffrage sur la grammaire UX Métrés
   Sobriété, lisibilité, hiérarchie commune — aucune logique métier modifiée
   ====================================================================== */
.chiffrage-v4-page:not(.ux-page){
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
}
.chiffrage-v4-page::before{display:none!important;}

.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header){
  min-height:0!important;
  background:#fff!important;
  border:1px solid #dbe7f5!important;
  border-left:5px solid #2f80ed!important;
  border-radius:16px!important;
  box-shadow:0 8px 24px rgba(15,23,42,.06)!important;
  padding:20px 22px!important;
  color:#0f172a!important;
}
.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header)::before,
.upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header)::after{display:none!important;}
.chiffrage-hero:not(.ux-page-header) h2{color:#0f172a!important;font-size:1.7rem!important;margin:2px 0 6px!important;}
.chiffrage-hero:not(.ux-page-header) p{color:#667085!important;max-width:820px!important;}
.chiffrage-hero .upyx-eyebrow{color:#2f80ed!important;font-weight:800!important;}

.chiffrage-hero-actions .upyx-v4-primary,
.chiffrage-hero-actions .upyx-v4-secondary{
  min-height:44px!important;
  border-radius:10px!important;
  box-shadow:none!important;
  font-weight:800!important;
}
.chiffrage-hero-actions .upyx-v4-primary{background:#2f80ed!important;border-color:#2f80ed!important;color:#fff!important;}
.chiffrage-hero-actions .upyx-v4-secondary{background:#fff!important;border:1px solid #cbd5e1!important;color:#334155!important;}

/* Le parcours reste fonctionnel mais devient un repère compact, non décoratif. */
.upyx-chiffrage-flow{
  background:#fff!important;
  border:1px solid #dbe7f5!important;
  border-radius:14px!important;
  box-shadow:none!important;
  padding:8px!important;
  gap:6px!important;
}
.upyx-chiffrage-flow button,
.upyx-chiffrage-flow button:nth-child(n){
  min-height:54px!important;
  padding:8px 10px!important;
  background:#f8fafc!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  box-shadow:none!important;
}
.upyx-chiffrage-flow button:hover{background:#eff6ff!important;border-color:#bfdbfe!important;transform:none!important;}
.upyx-chiffrage-flow span{color:#2f80ed!important;font-size:.75rem!important;}
.upyx-chiffrage-flow strong{color:#1e293b!important;font-size:.88rem!important;}
.upyx-chiffrage-flow small{color:#64748b!important;font-size:.72rem!important;}

.upyx-v4-global-panel:not(.ux-section),
.upyx-v4-work-card:not(.ux-section){
  background:#fff!important;
  border:1px solid #dbe7f5!important;
  border-radius:16px!important;
  box-shadow:0 6px 20px rgba(15,23,42,.05)!important;
  padding:20px!important;
}
.upyx-v4-global-panel:not(.ux-section)::after,
.upyx-v4-work-card:not(.ux-section)::after{display:none!important;}

.upyx-v4-panel-title>span,
.upyx-v4-section-head span{
  width:30px!important;height:30px!important;min-width:30px!important;
  background:#eaf3ff!important;color:#2f80ed!important;
  border:1px solid #bfdbfe!important;box-shadow:none!important;
}
.upyx-v4-panel-title h3,
.upyx-v4-section-head h3{color:#1769c2!important;font-size:1.15rem!important;}
.upyx-v4-panel-title p,
.upyx-v4-section-head p{color:#667085!important;font-weight:500!important;}

.chiffrage-param-card,
.devis-status,
.chiffrage-detected-grid div,
.chiffrage-param-grid .chiffrage-param-card:nth-child(n),
.chiffrage-detected-grid div:nth-child(n){
  background:#f8fafc!important;
  border:1px solid #e2e8f0!important;
  border-radius:12px!important;
  box-shadow:none!important;
}
.chiffrage-param-card strong{color:#1769c2!important;}

.chiffrage-form-grid input,
.chiffrage-form-grid select,
.chiffrage-v4-page input,
.chiffrage-v4-page select,
.chiffrage-v4-page textarea{
  min-height:44px!important;
  border:1px solid #cbd5e1!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:none!important;
}
.chiffrage-v4-page input:focus,
.chiffrage-v4-page select:focus,
.chiffrage-v4-page textarea:focus{
  border-color:#2f80ed!important;
  box-shadow:0 0 0 3px rgba(47,128,237,.12)!important;
  outline:none!important;
}

/* Résultat commercial : lisible et homogène, sans dégradés ni effets marketing. */
.upyx-premium-result{gap:12px!important;}
.upyx-premium-result > div,
.upyx-premium-result > div:nth-child(n){
  background:#f8fafc!important;
  border:1px solid #dbe7f5!important;
  border-top:4px solid #2f80ed!important;
  border-radius:12px!important;
  box-shadow:none!important;
  padding:16px!important;
}
.upyx-premium-result > div::after{display:none!important;}
.upyx-premium-result small{color:#64748b!important;}
.upyx-premium-result strong{color:#0f172a!important;font-size:1.65rem!important;}
.upyx-premium-result em{color:#1769c2!important;font-style:normal!important;font-weight:700!important;}

.upyx-chiffrage-principle{
  background:#eff6ff!important;
  border:1px solid #bfdbfe!important;
  border-radius:12px!important;
  color:#1e3a5f!important;
  box-shadow:none!important;
}
.upyx-chiffrage-principle span{background:#2f80ed!important;color:#fff!important;}

.chiffrage-v4-page .table-box{
  border:1px solid #dbe7f5!important;
  border-radius:12px!important;
  box-shadow:none!important;
}
.chiffrage-v4-page table:not(.ux-table) th{
  background:#eef5fd!important;
  color:#1769c2!important;
  border-bottom:1px solid #dbe7f5!important;
}
.chiffrage-v4-page table:not(.ux-table) td{border-color:#edf2f7!important;}
.chiffrage-v4-page table:not(.ux-table) tbody tr:nth-child(even){background:#fbfdff!important;}
.chiffrage-v4-page table:not(.ux-table) tbody tr:hover{background:#f3f8fe!important;}

.devis-technical-details.upyx-v4-work-card:not(.ux-section) summary{
  background:#f8fafc!important;
  color:#1769c2!important;
  border-radius:12px!important;
}

@media(max-width:700px){
  .upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header),
  .upyx-v4-global-panel:not(.ux-section),
  .upyx-v4-work-card:not(.ux-section){padding:15px!important;border-radius:14px!important;}
  .chiffrage-hero:not(.ux-page-header) h2{font-size:1.45rem!important;}
  .upyx-chiffrage-flow{grid-template-columns:1fr 1fr!important;}
  .upyx-premium-result{grid-template-columns:1fr 1fr!important;}
}
@media(max-width:480px){
  .upyx-chiffrage-flow,
  .upyx-premium-result{grid-template-columns:1fr!important;}
}


/* RC37 — Devis : barre d’actions compacte et badge de notification réel */
.devis-action-bar{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  flex-wrap:nowrap!important;
}
.devis-action-bar .devis-action-primary,
.devis-action-bar .devis-action-secondary{
  width:auto!important;
  min-width:0!important;
  min-height:42px!important;
  padding:0 16px!important;
  border-radius:10px!important;
  white-space:nowrap!important;
  line-height:1!important;
}
.devis-action-bar .devis-action-primary{
  padding-inline:19px!important;
}
.devis-action-bar .devis-action-secondary{
  background:#fff!important;
  border:1px solid #cbd5e1!important;
  color:#334155!important;
}
.devis-action-bar .devis-action-secondary:hover{
  background:#f8fafc!important;
  border-color:#94a3b8!important;
  transform:none!important;
}
#notificationCount[hidden],
#notificationCount:empty{
  display:none!important;
}

@media(max-width:760px){
  .upyx-v4-business-hero.chiffrage-hero:not(.ux-page-header){
    align-items:stretch!important;
  }
  .devis-action-bar{
    width:100%!important;
    justify-content:flex-start!important;
    flex-wrap:wrap!important;
  }
}
@media(max-width:520px){
  .devis-action-bar{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
  }
  .devis-action-bar .devis-action-primary{
    grid-column:1 / -1!important;
  }
  .devis-action-bar .devis-action-primary,
  .devis-action-bar .devis-action-secondary{
    width:100%!important;
    padding-inline:12px!important;
  }
}


/* RC37 — Devis simplifié : parcours unique, conditions puis synthèse horizontale */
#devis .chiffrage-hero{align-items:flex-start}
#devis .upyx-assistant-layout-horizontal{display:block}
#devis .upyx-assistant-layout-horizontal .upyx-assistant-main-rc35{display:flex;flex-direction:column;gap:18px;width:100%}
#devis .upyx-assistant-summary-horizontal-rc37{position:static;width:100%;max-width:none;display:grid;grid-template-columns:minmax(220px,.65fr) minmax(280px,1.35fr) auto;gap:18px;align-items:center}
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-zone-title{margin:0}
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-summary{margin:0;min-width:0}
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-actions{border-top:0;padding-top:0;margin-top:0;white-space:nowrap}
#devis .upyx-assistant-conditions-rc37 .chiffrage-form-grid{max-width:720px}
#notificationCount[hidden]{display:none!important}
@media(max-width:900px){
  #devis .upyx-assistant-summary-horizontal-rc37{grid-template-columns:1fr;align-items:stretch}
  #devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-actions{display:grid;grid-template-columns:1fr;width:100%}
  #devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-actions button{width:100%}
  #devis .upyx-assistant-conditions-rc37 .chiffrage-form-grid{grid-template-columns:1fr}
}


/* RC37 — Synthèse devis : action intégrée et lots légèrement renforcés */
#devis .upyx-assistant-summary-horizontal-rc37{
  grid-template-columns:minmax(220px,.65fr) minmax(280px,1.35fr);
  grid-template-areas:
    "title summary"
    "actions actions";
  align-items:start;
}
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-zone-title{grid-area:title}
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-summary{grid-area:summary}
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-actions{
  grid-area:actions;
  border-top:1px solid #e2e8f0;
  padding-top:14px;
  margin-top:0;
  display:flex;
  flex-direction:row;
  justify-content:flex-end;
  align-items:center;
}
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-summary-list{
  background:#f1f5f9;
  border-color:#d7e0eb;
}
@media(max-width:900px){
  #devis .upyx-assistant-summary-horizontal-rc37{
    grid-template-columns:1fr;
    grid-template-areas:"title" "summary" "actions";
  }
  #devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-actions{
    display:grid;
    grid-template-columns:1fr;
    width:100%;
  }
}

/* RC37 — Synthèse alignée sur l'organisation visuelle de Conditions commerciales */
#devis .upyx-assistant-summary-horizontal-rc37{
  display:block;
}
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-zone-title{
  margin-bottom:16px;
}
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-summary{
  width:100%;
  margin:0;
}
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-actions{
  width:100%;
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid #dbe4ef;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
}
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-summary-list{
  background:#e8eef6;
  border-color:#cbd7e5;
}
@media(max-width:900px){
  #devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-actions{
    display:grid;
    grid-template-columns:1fr;
  }
  #devis .upyx-assistant-summary-horizontal-rc37 .upyx-assistant-actions button{
    width:100%;
  }
}

/* RC37 — contraste visible des blocs métier Devis */
#devis .upyx-material-list label,
#devis .upyx-assistant-summary-horizontal-rc37 .upyx-summary-list{
  background:#dbe5f0;
  border-color:#bccbdd;
}


/* RC37 — Activité + hiérarchie de contraste réellement visible */
#devis .upyx-assistant-zone-rc35:first-of-type .upyx-assistant-select select{
  background:#e7edf5;
  border-color:#b9c8da;
}
#devis .upyx-ref-rubrique-card{
  background:#dbe5f0;
  border-color:#b7c8da;
}
#devis .upyx-ref-rubrique-card:has(.upyx-selected-ref){
  background:#d2e1f1;
  border-color:#9fc2eb;
}

/* RC37 — Contraste métier assumé : fond visible, champs blancs */
#devis .upyx-ref-rubrique-card-rc35,
#devis .upyx-ref-rubrique-card.upyx-ref-rubrique-card-rc35{
  background:#e1e9f3 !important;
  border-color:#aebfd2 !important;
}
#devis .upyx-ref-rubrique-card-rc35.is-complete,
#devis .upyx-ref-rubrique-card-rc35:has(.upyx-selected-ref),
#devis .upyx-ref-rubrique-card.upyx-ref-rubrique-card-rc35:has(.upyx-selected-ref){
  background:#d4e2f1 !important;
  border-color:#8fb5df !important;
}
#devis .upyx-ref-rubrique-card-rc35 .upyx-material-search-row input{
  background:#ffffff !important;
}

/* RC37 — ajustement final Devis + harmonisation Quantitatifs */
#devis .upyx-ref-rubrique-card-rc35,
#devis .upyx-ref-rubrique-card.upyx-ref-rubrique-card-rc35{
  background:#e8eef5 !important;
  border-color:#b9c7d7 !important;
}
#devis .upyx-ref-rubrique-card-rc35.is-complete,
#devis .upyx-ref-rubrique-card-rc35:has(.upyx-selected-ref),
#devis .upyx-ref-rubrique-card.upyx-ref-rubrique-card-rc35:has(.upyx-selected-ref){
  background:#dde8f3 !important;
  border-color:#9ebbdc !important;
}
#quantitatifs .upyx-quant-step:not(.ux-section){
  margin:0 0 18px;
  padding:22px;
  border:1px solid #d7e1ec;
  border-radius:22px;
  background:#fff;
  box-shadow:0 12px 28px rgba(15,23,42,.045);
}
#quantitatifs .quantitatifs-smart{
  background:#fff;
}
#quantitatifs .quant-source-grid{
  margin-top:16px;
  gap:12px;
}
#quantitatifs .quant-source{
  border-color:#d6e0eb;
  background:#f7f9fc;
}
#quantitatifs .coherence-box{
  margin-top:14px;
}
#quantitatifs .quant-details:not(.ux-section){
  display:flex;
  flex-direction:column;
  gap:12px;
}
#quantitatifs .quant-details:not(.ux-section) > .upyx-v4-section-head{
  margin-bottom:4px;
}
#quantitatifs .summary-section{
  margin:0;
  border:1px solid #d8e1eb;
  border-radius:16px;
  background:#f8fafc;
  overflow:hidden;
  box-shadow:none;
}
#quantitatifs .summary-section summary{
  min-height:66px;
  padding:0 18px;
  background:#f8fafc;
}
#quantitatifs .summary-section[open] summary{
  background:#eef3f8;
  border-bottom:1px solid #d8e1eb;
}
@media(max-width:760px){
  #quantitatifs .upyx-quant-step:not(.ux-section){padding:16px;border-radius:18px}
}


/* RC37 — Quantitatifs : sources compactes, informatives et non cliquables */
.quant-source-grid{
  display:grid !important;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr)) !important;
  gap:10px !important;
}
.quant-source{
  min-height:64px !important;
  padding:10px 12px !important;
  border-radius:14px !important;
  display:grid !important;
  grid-template-columns:28px minmax(0,1fr) !important;
  grid-template-rows:auto auto !important;
  column-gap:9px !important;
  row-gap:1px !important;
  align-items:center !important;
  text-align:left !important;
  cursor:default !important;
  box-shadow:none !important;
}
.quant-source > .upyx-css-icon,
.quant-source > .upyx-nav-icon{
  grid-row:1 / span 2 !important;
  grid-column:1 !important;
  width:24px !important;
  height:24px !important;
  margin:0 !important;
  justify-self:center !important;
}
.quant-source > span:not(.upyx-css-icon){
  grid-column:2 !important;
  grid-row:1 !important;
  min-width:0 !important;
  font-weight:750 !important;
  line-height:1.15 !important;
}
.quant-source > strong{
  grid-column:2 !important;
  grid-row:2 !important;
  margin:0 !important;
  font-size:.78rem !important;
  line-height:1.15 !important;
}
.quant-source.warn > strong{color:#9a5a00 !important}
.quant-source.ok > strong{color:#16803a !important}
.quant-source:hover{transform:none !important;box-shadow:none !important}

@media (max-width:720px){
  .quant-source-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
  .quant-source{min-height:58px !important;padding:9px 10px !important}
}

/* RC37 — Quantitatifs : synthèse compacte des sources */
.quant-sources-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:14px 0 10px;
  padding:14px 16px;
  border:1px solid #c9d6e6;
  border-radius:16px;
  background:#e7edf5;
}
.quant-sources-summary span{
  font-weight:750;
  color:#203047;
}
.quant-sources-summary strong{
  min-width:72px;
  text-align:center;
  padding:6px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid #bdd0e8;
  color:#0f5ea8;
}

/* RC37 — Quantitatifs : alignement des étapes et indicateur unique */
#quantitatifs .upyx-quant-step:not(.ux-section){
  width:100%;
  max-width:none;
  margin-left:0;
  margin-right:0;
  box-sizing:border-box;
}
#quantitatifs .quant-sources-summary{
  width:100%;
  box-sizing:border-box;
  margin-bottom:0;
}
#quantitatifs .quant-sources-summary.is-empty{
  border-color:#d8c7aa;
}
#quantitatifs .quant-sources-summary.is-partial{
  border-color:#d9b36b;
}
#quantitatifs .quant-sources-summary.is-complete{
  border-color:#9bc8aa;
}
#quantitatifs .quant-sources-summary.is-complete strong{
  color:#16803a;
  border-color:#9bc8aa;
}

/* RC37 — Devis : Activité harmonisée avec les blocs internes */
#devis .upyx-assistant-zone-rc35:first-of-type{
  background:#e7edf5 !important;
  border-color:#c9d6e6 !important;
}
#devis .upyx-assistant-zone-rc35:first-of-type .upyx-assistant-select,
#devis .upyx-assistant-zone-rc35:first-of-type select{
  background:#fff !important;
}

/* RC37 — Bibliothèque : grande carte blanche > blocs internes gris bleuté > champs blancs */
#prix .rubrique-card.active{
  background:#d5e1f0 !important;
  border-color:#8fb4df !important;
}

#prix .bibliotheque-tools:not(.ux-data-toolbar) label,
#prix .bibliotheque-tools:not(.ux-data-toolbar) input,
#prix .bibliotheque-tools:not(.ux-data-toolbar) select,
#prix .bibliotheque-tools:not(.ux-data-toolbar) textarea{
  background:#fff !important;
}

#prix .biblio-filtres-actifs:not(.ux-data-toolbar__filters){
  background:#fff !important;
  border:1px solid #d8b77b !important;
}

#prix .bibliotheque-table-wrap:not(.ux-table-wrap){
  margin-top:14px !important;
  background:#fff !important;
  border-color:#c9d6e6 !important;
}

/* Alignement vertical continu de la section Prix / Articles */
#prix .upyx-v4-work-card:not(.ux-section){
  width:100% !important;
  box-sizing:border-box !important;
}


/* =========================================================
   RC37 AUDIT P0 — Composants harmonisés
   ========================================================= */

/* Mon compte */
#app-account .upyx-app-page-panel{
  background:#fff;
  border:1px solid #dbe7f5;
  border-radius:16px;
  box-shadow:0 6px 20px rgba(15,23,42,.05);
}
#app-account .upyx-app-page-grid{
  margin-top:16px;
}
#app-account .upyx-account-message{
  min-height:22px;
  margin-top:10px;
  font-weight:650;
}
#app-account .upyx-account-message.is-success{color:#16803a}
#app-account .upyx-account-message.is-error{color:#b42318}

/* Bibliothèque : cartes de sélection officielles */
#prix .bibliotheque-rubriques-panel{
  background:#f3f6fa !important;
  border:1px solid #dbe3ec !important;
  border-radius:16px !important;
}
#prix .rubrique-card{
  background:#fff !important;
  border:1px solid #d6dee8 !important;
  color:#24364d !important;
  box-shadow:none !important;
  cursor:pointer;
}
#prix .rubrique-card:hover{
  background:#f2f7fd !important;
  border-color:#9fc1e6 !important;
}
#prix .rubrique-card:has(input:checked){
  background:#e5f0fc !important;
  border-color:#78a9dc !important;
  box-shadow:0 0 0 2px rgba(47,128,237,.10) !important;
}
#prix .rubriques-panel-head{
  align-items:flex-start !important;
}
#prix .upyx-filter-summary{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  color:#667085;
  font-size:.86rem;
  font-weight:650;
}
#prix .upyx-filter-badge{
  min-height:30px !important;
  padding:5px 10px !important;
  border-radius:999px !important;
  border:1px solid #b9cce3 !important;
  background:#fff !important;
  color:#1769c2 !important;
  font-size:.82rem !important;
  font-weight:750 !important;
  box-shadow:none !important;
}
#prix .upyx-filter-badge:hover{
  background:#eef5fd !important;
}
#prix .bibliotheque-tools:not(.ux-data-toolbar){
  background:#f3f6fa !important;
  border:1px solid #dbe3ec !important;
  border-radius:16px !important;
}
#prix .upyx-library-actions:not(.ux-data-toolbar__actions){
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin:14px 0;
  flex-wrap:wrap;
}

/* Export : même grammaire que Quantitatifs */
#export-chiffrage .upyx-export-intro-card{
  width:100%;
  box-sizing:border-box;
  padding:20px;
  background:#fff;
  border:1px solid #dbe7f5;
  border-radius:16px;
  box-shadow:0 6px 20px rgba(15,23,42,.05);
}
#export-chiffrage .upyx-export-intro-card strong{
  display:block;
  margin-bottom:6px;
  color:#1769c2;
  font-size:1.15rem;
}
#export-chiffrage .upyx-export-intro-card p{
  margin:0;
  color:#667085;
}
#export-chiffrage .upyx-export-info-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
#export-chiffrage .upyx-export-info-grid > div{
  padding:14px;
  border:1px solid #c9d6e6;
  border-radius:14px;
  background:#e7edf5;
}
#export-chiffrage .upyx-export-info-grid small{
  display:block;
  color:#667085;
  margin-bottom:5px;
}
#export-chiffrage .upyx-export-info-grid strong{
  color:#203047;
}
#export-chiffrage .upyx-export-action-card{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  padding:18px;
  border:1px solid #c9d6e6;
  border-radius:16px;
  background:#e7edf5;
}
#export-chiffrage .upyx-export-action-card > div:first-child{
  display:flex;
  align-items:center;
  gap:14px;
}
#export-chiffrage .upyx-export-action-card .material-symbols-rounded{
  color:#ef7d00;
  font-size:30px;
}
#export-chiffrage .upyx-export-action-card strong{
  display:block;
  color:#203047;
  margin-bottom:4px;
}
#export-chiffrage .upyx-export-action-card p{
  margin:0;
  color:#667085;
}
#export-chiffrage .upyx-export-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

/* Devis : l’assistant reste la mission principale */
#devis .devis-technical-details{
  margin-top:0;
}
#devis .devis-technical-details .toolbar{
  display:flex;
  justify-content:flex-end;
}

@media (max-width:780px){
  #prix .upyx-library-actions:not(.ux-data-toolbar__actions),
  #export-chiffrage .upyx-export-actions{
    width:100%;
  }
  #prix .upyx-library-actions:not(.ux-data-toolbar__actions) > button,
  #export-chiffrage .upyx-export-actions > button{
    width:100%;
  }
  #export-chiffrage .upyx-export-info-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #export-chiffrage .upyx-export-action-card{
    align-items:stretch;
    flex-direction:column;
  }
}
@media (max-width:480px){
  #export-chiffrage .upyx-export-info-grid{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   RC37 — Harmonisation globale des Métrés sur Chiffrage
   Même identité visuelle, logique métier inchangée
   ========================================================= */
.upyx-metres-page .upyx-metres-business-page{
  display:flex;
  flex-direction:column;
  gap:18px;
  width:100%;
}
.upyx-metres-page .metres-hero{
  width:100%;
  box-sizing:border-box;
}
.upyx-metres-page .upyx-metres-intro-card{
  width:100%;
  box-sizing:border-box;
  padding:20px;
  background:#fff;
  border:1px solid #dbe7f5;
  border-radius:16px;
  box-shadow:0 6px 20px rgba(15,23,42,.05);
}
.upyx-metres-page .upyx-metres-intro-card strong{
  display:block;
  margin:0 0 6px;
  color:#1769c2;
  font-size:1.15rem;
  line-height:1.25;
}
.upyx-metres-page .upyx-metres-intro-card p{
  margin:0;
  color:#667085;
  line-height:1.45;
}

/* Le conteneur historique devient neutre : les blocs métier portent la hiérarchie. */
.upyx-metres-page .v4-page-card{
  counter-reset:upyx-metres-step;
  display:flex;
  flex-direction:column;
  gap:18px;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  overflow:visible !important;
}
.upyx-metres-page .v4-page-card > h2,
.upyx-metres-page .v4-page-card > .section-header:first-child > h2{
  display:none !important;
}

/* Chaque bloc métier reprend le composant Étape de Chiffrage. */
.upyx-metres-page .v4-page-card > .smart-box:not(.ux-section),
.upyx-metres-page .v4-page-card > .section-header.section-header-small{
  counter-increment:upyx-metres-step;
  position:relative;
  width:100%;
  box-sizing:border-box;
  margin:0 !important;
  padding:20px !important;
  background:#fff !important;
  border:1px solid #dbe7f5 !important;
  border-radius:16px !important;
  box-shadow:0 6px 20px rgba(15,23,42,.05) !important;
}
.upyx-metres-page .v4-page-card > .smart-box > h3,
.upyx-metres-page .v4-page-card > .section-header.section-header-small > h3{
  display:flex;
  align-items:center;
  gap:12px;
  margin:0 0 6px !important;
  color:#1769c2 !important;
  font-size:1.15rem !important;
}
.upyx-metres-page .v4-page-card > .smart-box > h3::before,
.upyx-metres-page .v4-page-card > .section-header.section-header-small > h3::before{
  content:counter(upyx-metres-step);
  width:30px;
  height:30px;
  min-width:30px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:#eaf3ff;
  border:1px solid #bfdbfe;
  color:#2f80ed;
  font-weight:900;
  font-size:.9rem;
}
.upyx-metres-page .v4-page-card > .smart-box > .template-intro{
  margin:0 0 16px 42px !important;
  color:#667085 !important;
}

/* Blocs internes : gris bleuté stable ; champs : blancs. */
.upyx-metres-page .smart-config-box:not(.ux-subsection-group),
.upyx-metres-page .murs-group-config,
.upyx-metres-page .pignons-group-config,
.upyx-metres-page .planchers-group-config,
.upyx-metres-page .planchers-field-group,
.upyx-metres-page .menu-type-group,
.upyx-metres-page .isolation-param-card:not(.ux-subsection),
.upyx-metres-page .bardage-type-group,
.upyx-metres-page .bardage-config-panel,
.upyx-metres-page .zinguerie-auto-grid,
.upyx-metres-page .zinguerie-param-grid,
.upyx-metres-page .zinguerie-complement-grid,
.upyx-metres-page .charpente-field-group:not(.ux-subsection),
.upyx-metres-page .toiture-field-group{
  background:#e7edf5 !important;
  border:1px solid #c9d6e6 !important;
  border-radius:14px !important;
  box-shadow:none !important;
}
.upyx-metres-page input,
.upyx-metres-page select,
.upyx-metres-page textarea{
  background:#fff !important;
  min-height:44px;
  border:1px solid #cbd5e1 !important;
  border-radius:10px !important;
  box-shadow:none !important;
}
.upyx-metres-page input:focus,
.upyx-metres-page select:focus,
.upyx-metres-page textarea:focus{
  border-color:#2f80ed !important;
  box-shadow:0 0 0 3px rgba(47,128,237,.12) !important;
  outline:none !important;
}

/* Cartes de sélection identiques quelle que soit la famille métier. */
.upyx-metres-page .menu-type-card,
.upyx-metres-page .isolation-zone-card,
.upyx-metres-page .bardage-type-card{
  background:#fff !important;
  border:1px solid #d6dee8 !important;
  border-radius:12px !important;
  box-shadow:none !important;
}
.upyx-metres-page .menu-type-card:hover,
.upyx-metres-page .isolation-zone-card:hover,
.upyx-metres-page .bardage-type-card:hover{
  background:#f2f7fd !important;
  border-color:#9fc1e6 !important;
}
.upyx-metres-page .menu-type-card:has(input:checked),
.upyx-metres-page .isolation-zone-card:has(input:checked),
.upyx-metres-page .bardage-type-card:has(input:checked){
  background:#e5f0fc !important;
  border-color:#78a9dc !important;
}

/* Tableaux alignés avec le référentiel Chiffrage. */
.upyx-metres-page .table-box{
  width:100%;
  box-sizing:border-box;
  margin:0 !important;
  background:#fff !important;
  border:1px solid #dbe7f5 !important;
  border-radius:12px !important;
  box-shadow:none !important;
}
.upyx-metres-page table:not(.ux-table) th{
  background:#eef5fd !important;
  color:#1769c2 !important;
  border-bottom:1px solid #dbe7f5 !important;
}
.upyx-metres-page table:not(.ux-table) td{
  border-color:#edf2f7 !important;
}
.upyx-metres-page table tbody tr:nth-child(even){
  background:#fbfdff !important;
}
.upyx-metres-page table tbody tr:hover{
  background:#f3f8fe !important;
}

/* Actions : langage unique. */
.upyx-metres-page button:not(.menu-btn):not(.upyx-v4-menu-button){
  min-height:42px;
  border-radius:10px;
}
.upyx-metres-page .section-header-small{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
}
.upyx-metres-page .section-header-small + .table-box{
  margin-top:-8px !important;
}

@media (max-width:720px){
  .upyx-metres-page .upyx-metres-intro-card,
  .upyx-metres-page .v4-page-card > .smart-box:not(.ux-section),
  .upyx-metres-page .v4-page-card > .section-header.section-header-small{
    padding:15px !important;
    border-radius:14px !important;
  }
  .upyx-metres-page .v4-page-card{
    gap:14px;
  }
  .upyx-metres-page .v4-page-card > .smart-box > .template-intro{
    margin-left:0 !important;
  }
  .upyx-metres-page .section-header-small{
    align-items:flex-start !important;
    flex-direction:column !important;
  }
}

/* ======================================================================
   RC37 — Allègement final des en-têtes métier
   Les rubriques de navigation redondantes sont supprimées.
   Les actions de héros restent accessibles sans concurrencer le contenu.
   ====================================================================== */
.upyx-hero-compact-actions{
  min-width:0!important;
  align-items:center!important;
  gap:6px!important;
}
.upyx-hero-compact-actions .upyx-hero-action{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  min-height:38px!important;
  margin:0!important;
  padding:7px 10px!important;
  border:1px solid transparent!important;
  border-radius:8px!important;
  background:transparent!important;
  color:#475467!important;
  box-shadow:none!important;
  font:inherit!important;
  font-size:.9rem!important;
  font-weight:700!important;
  cursor:pointer!important;
}
.upyx-hero-compact-actions .upyx-hero-action .material-symbols-rounded{
  font-size:19px!important;
  color:#2f80ed!important;
}
.upyx-hero-compact-actions .upyx-hero-action:hover,
.upyx-hero-compact-actions .upyx-hero-action:focus-visible{
  background:#f5f9ff!important;
  border-color:#dbe7f5!important;
  color:#1d4f91!important;
  outline:none!important;
}
@media(max-width:760px){
  .upyx-hero-compact-actions{
    display:flex!important;
    width:auto!important;
    justify-content:flex-start!important;
  }
  .upyx-hero-compact-actions .upyx-hero-action{
    width:auto!important;
    flex:0 0 auto!important;
  }
}

/* RC37 — en-tête métier unique, modèle visuel Devis */
.upyx-v4-business-hero.upyx-page-title-hero:not(.ux-page-header){
  min-height:auto!important;
  padding:28px 34px!important;
  margin-bottom:24px!important;
}
.upyx-v4-business-hero.upyx-page-title-hero:not(.ux-page-header) h2{
  margin:0!important;
}
.upyx-page-action-toolbar{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  margin:-12px 0 20px;
}
@media(max-width:700px){
  .upyx-v4-business-hero.upyx-page-title-hero:not(.ux-page-header){padding:20px!important;margin-bottom:16px!important}
  .upyx-page-action-toolbar{justify-content:flex-start;margin:-4px 0 16px}
}

/* ======================================================================
   RC37 — UDS-001 / Grille visuelle homogène
   Référence validée : même alignement et même séparation grise entre
   tous les blocs de toutes les pages de l'application.
   ====================================================================== */
:root{
  --upyx-page-inline:20px;
  --upyx-section-gap:20px;
  --upyx-section-gap-mobile:16px;
  --upyx-card-radius:18px;
}

/* Une seule grille verticale pour les pages métier. */
html body .upyx-v4-business-page:not(.ux-page--data),
html body .upyx-metres-business-page,
html body .chiffrage-v4-page:not(.ux-page){
  display:flex!important;
  flex-direction:column!important;
  gap:var(--upyx-section-gap)!important;
  width:100%!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:var(--upyx-section-gap) var(--upyx-page-inline)!important;
}

/* Le gap du conteneur pilote seul la séparation : aucune marge parasite. */
html body .upyx-v4-business-page:not(.ux-page--data) > *,
html body .upyx-metres-business-page > *,
html body .chiffrage-v4-page:not(.ux-page) > *{
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
  margin-top:0!important;
  margin-bottom:0!important;
}

/* Cartouche de titre aligné sur les blocs de contenu. */
html body .upyx-v4-business-hero.upyx-page-title-hero:not(.ux-page-header){
  padding:24px 34px!important;
  margin:0!important;
  border-radius:var(--upyx-card-radius)!important;
}

/* Les cartes principales partagent les mêmes axes et rayons. */
html body .upyx-v4-business-page:not(.ux-page--data) > .card,
html body .upyx-v4-business-page:not(.ux-page--data) > .smart-box,
html body .upyx-v4-business-page:not(.ux-page--data) > .table-box,
html body .upyx-v4-business-page:not(.ux-page--data) > .upyx-page-action-toolbar,
html body .upyx-metres-business-page > .card,
html body .chiffrage-v4-page:not(.ux-page) > .card{
  margin:0!important;
  border-radius:var(--upyx-card-radius)!important;
}

/* Les pages Métrés conservent exactement la même séparation entre
   le cartouche de titre et chaque bloc métier. */
html body .upyx-metres-page .v4-page-card{
  gap:var(--upyx-section-gap)!important;
}
html body .upyx-metres-page .v4-page-card > *{
  margin-top:0!important;
  margin-bottom:0!important;
}

/* Barre d'actions : un bloc de la grille, sans marge négative. */
html body .upyx-page-action-toolbar{
  margin:0!important;
  min-height:0!important;
}

@media(max-width:700px){
  :root{--upyx-page-inline:12px;}
  html body .upyx-v4-business-page:not(.ux-page--data),
  html body .upyx-metres-business-page,
  html body .chiffrage-v4-page:not(.ux-page){
    gap:var(--upyx-section-gap-mobile)!important;
    padding:var(--upyx-section-gap-mobile) var(--upyx-page-inline)!important;
  }
  html body .upyx-metres-page .v4-page-card{
    gap:var(--upyx-section-gap-mobile)!important;
  }
  html body .upyx-v4-business-hero.upyx-page-title-hero:not(.ux-page-header){
    padding:18px 20px!important;
  }
}

/* ======================================================================
   RC37 — Alignements et séparations définitifs
   Référence visuelle : Quantitatifs.
   - un seul gap extérieur entre les blocs de page ;
   - mêmes axes internes ;
   - libellés et champs alignés sur une ligne de base commune ;
   - aucune marge locale ne peut agrandir la bande grise de séparation.
   ====================================================================== */
:root{
  --upyx-section-gap:20px;
  --upyx-field-gap:16px;
  --upyx-card-padding:28px;
  --upyx-control-height:64px;
}

/* La grille de page est l'unique source des séparations grises. */
html body .upyx-v4-business-page:not(.ux-page--data),
html body .upyx-metres-business-page,
html body .chiffrage-v4-page:not(.ux-page){
  row-gap:var(--upyx-section-gap)!important;
}
html body .upyx-v4-business-page:not(.ux-page--data) > *,
html body .upyx-metres-business-page > *,
html body .chiffrage-v4-page:not(.ux-page) > *{
  margin-block:0!important;
}
html body .upyx-v4-business-page:not(.ux-page--data) > .upyx-page-title-hero + *,
html body .upyx-metres-business-page > .upyx-page-title-hero + *,
html body .chiffrage-v4-page:not(.ux-page) > .upyx-page-title-hero + *{
  margin-top:0!important;
}

/* Les cartes métier ont les mêmes bords et le même retrait que Quantitatifs. */
html body .upyx-metres-page .v4-page-card > .smart-box:not(.ux-section),
html body .upyx-metres-page .v4-page-card > .section-header.section-header-small,
html body .chiffrage-v4-page:not(.ux-page) > .card{
  padding:var(--upyx-card-padding)!important;
}
html body .upyx-metres-page .v4-page-card{
  row-gap:var(--upyx-section-gap)!important;
}
html body .upyx-metres-page .v4-page-card > *{
  margin-block:0!important;
}
html body .upyx-metres-page .section-header-small + .table-box{
  margin-top:0!important;
}
html body .upyx-metres-page .alert[style*="margin-top"]{
  margin-top:0!important;
}

/* Titres et descriptions commencent toujours sur le même axe. */
html body .upyx-metres-page .v4-page-card > .smart-box > h3,
html body .upyx-metres-page .v4-page-card > .smart-box > .template-intro{
  max-width:none!important;
}
html body .upyx-metres-page .v4-page-card > .smart-box > .template-intro{
  margin:0 0 20px 42px!important;
}

/* Grille commune pour les blocs de paramètres Murs / Pignons / Planchers. */
html body .upyx-metres-page .murs-general-config,
html body .upyx-metres-page .pignons-general-config,
html body .upyx-metres-page .planchers-general-config,
html body .upyx-metres-page .menu-general-config{
  display:grid!important;
  grid-template-columns:minmax(280px, .9fr) minmax(520px, 1.8fr)!important;
  gap:var(--upyx-field-gap)!important;
  align-items:stretch!important;
}
html body .upyx-metres-page .murs-total-label,
html body .upyx-metres-page .pignons-total-label,
html body .upyx-metres-page .planchers-total-label,
html body .upyx-metres-page .menu-total-label{
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  gap:10px!important;
  min-width:0!important;
}
html body .upyx-metres-page .murs-group-config,
html body .upyx-metres-page .pignons-group-config,
html body .upyx-metres-page .planchers-group-config,
html body .upyx-metres-page .menu-material-config{
  height:100%!important;
  box-sizing:border-box!important;
}

/* Tous les libellés de grilles portent les champs de la même façon. */
html body .upyx-metres-page .murs-group-fields,
html body .upyx-metres-page .pignons-group-fields,
html body .upyx-metres-page .planchers-group-fields,
html body .upyx-metres-page .form-grid,
html body .upyx-metres-page .zinguerie-auto-grid,
html body .upyx-metres-page .zinguerie-param-grid{
  align-items:end!important;
  gap:var(--upyx-field-gap)!important;
}
html body .upyx-metres-page .murs-group-fields > label,
html body .upyx-metres-page .pignons-group-fields > label,
html body .upyx-metres-page .planchers-group-fields > label,
html body .upyx-metres-page .form-grid > label,
html body .upyx-metres-page .zinguerie-auto-grid > label,
html body .upyx-metres-page .zinguerie-param-grid > label{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  min-width:0!important;
  margin:0!important;
}

/* Hauteur de saisie stable : mêmes lignes et mêmes bases visuelles. */
html body .upyx-metres-page input:not([type="checkbox"]):not([type="radio"]):not(.ux-input),
html body .upyx-metres-page select:not(.ux-select){
  width:100%!important;
  min-width:0!important;
  height:var(--upyx-control-height)!important;
  min-height:var(--upyx-control-height)!important;
  box-sizing:border-box!important;
  margin:0!important;
}
html body .upyx-metres-page input[type="checkbox"],
html body .upyx-metres-page input[type="radio"]{
  width:auto!important;
  min-width:22px!important;
  height:22px!important;
  min-height:22px!important;
  flex:0 0 22px!important;
}

/* Menuiseries : la case et son libellé restent dans leur colonne. */
html body .upyx-metres-page .menu-material-config{
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) minmax(180px,auto)!important;
  align-items:end!important;
  gap:var(--upyx-field-gap)!important;
}
html body .upyx-metres-page .menu-material-config > label{
  min-width:0!important;
  margin:0!important;
}
html body .upyx-metres-page .menu-material-config > label:not(.checkbox-line){
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
}
html body .upyx-metres-page .menu-material-config .checkbox-line{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  min-height:var(--upyx-control-height)!important;
  white-space:normal!important;
  overflow:hidden!important;
}

/* Les blocs internes ne créent pas de vide supplémentaire entre eux. */
html body .upyx-metres-page .smart-config-box > *{
  margin-top:0!important;
}
html body .upyx-metres-page .smart-config-box > * + *{
  margin-top:var(--upyx-field-gap)!important;
}
html body .upyx-metres-page .smart-config-box > .murs-general-config + .coherence-box,
html body .upyx-metres-page .smart-config-box > .pignons-general-config + .coherence-box,
html body .upyx-metres-page .smart-config-box > .menu-general-config + *,
html body .upyx-metres-page .smart-config-box > .planchers-general-config + *{
  margin-top:var(--upyx-field-gap)!important;
}

@media(max-width:1100px){
  html body .upyx-metres-page .murs-general-config,
  html body .upyx-metres-page .pignons-general-config,
  html body .upyx-metres-page .planchers-general-config,
  html body .upyx-metres-page .menu-general-config{
    grid-template-columns:1fr!important;
  }
  html body .upyx-metres-page .menu-material-config{
    grid-template-columns:1fr!important;
  }
}
@media(max-width:700px){
  :root{
    --upyx-card-padding:18px;
    --upyx-control-height:52px;
  }
  html body .upyx-metres-page .v4-page-card > .smart-box > .template-intro{
    margin-left:0!important;
  }
}

/* ======================================================================
   RC37 — Nomenclature, séparations et actions finales
   - chaque étape métier est une carte numérotée de même niveau ;
   - aucun texte libre entre le titre de page et la première étape ;
   - les actions Quantitatifs vivent dans le cartouche de titre afin de
     supprimer une ligne vide et de préserver la hauteur utile.
   ====================================================================== */
html body .upyx-v4-business-hero.upyx-page-title-with-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:20px!important;
}
html body .upyx-page-title-with-actions > div:first-child{
  min-width:0!important;
}
html body .upyx-page-title-with-actions .upyx-page-action-toolbar{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:18px!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
}
html body .upyx-page-title-with-actions .upyx-hero-action{
  min-height:40px!important;
  padding:6px 4px!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

/* Le seul espace entre étapes est le gap de la grille neutre. */
html body .upyx-metres-page .v4-page-card{
  gap:var(--upyx-section-gap)!important;
}
html body .upyx-metres-page .v4-page-card > .template-intro{
  display:none!important;
}
html body .upyx-metres-page .v4-page-card > .smart-box:not(.ux-section),
html body .upyx-metres-page .v4-page-card > .section-header.section-header-small{
  margin:0!important;
}

/* Zinguerie suit exactement la nomenclature des autres pages. */
html body #zinguerie .zinguerie-v4-card{
  gap:var(--upyx-section-gap)!important;
}
html body #zinguerie .zinguerie-smart-box > .template-intro{
  margin:0 0 16px 42px!important;
}

/* Planchers : l'étape Liste reste une carte autonome, séparée par le même gris. */
html body #planchers .planchers-v4{
  gap:var(--upyx-section-gap)!important;
}
html body #planchers .section-header.section-header-small + .table-box{
  margin-top:calc(-1 * var(--upyx-section-gap))!important;
  border-top-left-radius:0!important;
  border-top-right-radius:0!important;
}

@media(max-width:700px){
  html body .upyx-v4-business-hero.upyx-page-title-with-actions{
    align-items:flex-start!important;
    gap:12px!important;
  }
  html body .upyx-page-title-with-actions .upyx-page-action-toolbar{
    gap:10px!important;
  }
  html body .upyx-page-title-with-actions .upyx-hero-action span:last-child{
    display:none!important;
  }
  html body #zinguerie .zinguerie-smart-box > .template-intro{
    margin-left:0!important;
  }
}

/* ======================================================================
   RC37 — Murs / Pignons : une mission = un bloc numéroté autonome
   Référence visuelle : Quantitatifs.
   ====================================================================== */
html body #murs .parameter-step:not(.ux-section),
html body #pignons .parameter-step:not(.ux-section){
  display:block!important;
  width:100%!important;
  min-height:0!important;
  box-sizing:border-box!important;
}
html body #murs .parameter-single-field,
html body #pignons .parameter-single-field{
  display:grid!important;
  grid-template-columns:minmax(180px,280px)!important;
  gap:8px!important;
  width:min(100%,420px)!important;
  margin:0!important;
  padding:20px!important;
  background:#e7edf5!important;
  border:1px solid #c9d6e6!important;
  border-radius:14px!important;
  box-sizing:border-box!important;
}
html body #murs .parameter-fields-grid,
html body #pignons .parameter-fields-grid{
  display:grid!important;
  grid-template-columns:minmax(120px,.55fr) minmax(220px,1fr) minmax(220px,1fr)!important;
  gap:var(--upyx-field-gap)!important;
  align-items:end!important;
  margin:0!important;
  padding:20px!important;
  background:#e7edf5!important;
  border:1px solid #c9d6e6!important;
  border-radius:14px!important;
  box-sizing:border-box!important;
}
html body #murs .parameter-fields-grid > label,
html body #pignons .parameter-fields-grid > label{
  display:flex!important;
  flex-direction:column!important;
  gap:8px!important;
  margin:0!important;
  min-width:0!important;
}
html body #murs .parameter-step-identical .checkbox-line,
html body #pignons .parameter-step-identical .checkbox-line{
  margin:16px 0 0!important;
}
html body #murs .parameter-control-card:not(.ux-alert),
html body #pignons .parameter-control-card{
  margin:16px 0 0!important;
}
html body #murs .parameter-step-details .table-box,
html body #pignons .parameter-step-details .table-box{
  margin:0!important;
}
@media(max-width:900px){
  html body #murs .parameter-fields-grid,
  html body #pignons .parameter-fields-grid{
    grid-template-columns:1fr!important;
  }
  html body #murs .parameter-single-field,
  html body #pignons .parameter-single-field{
    width:100%!important;
    grid-template-columns:1fr!important;
  }
}

/* ======================================================================
   RC37 — Densité élégante et homogène
   Référence : une interface compacte, lisible et régulière.
   ====================================================================== */
:root{
  --upyx-control-height:48px;
  --upyx-control-radius:12px;
  --upyx-card-padding-compact:18px;
  --upyx-inner-gap-compact:14px;
}

/* Champs métier : hauteur unique, sans toucher aux cases à cocher. */
html body .upyx-metres-page input:not([type="checkbox"]):not([type="radio"]),
html body .upyx-metres-page select,
html body #chiffrage input:not([type="checkbox"]):not([type="radio"]),
html body #chiffrage select{
  height:var(--upyx-control-height)!important;
  min-height:var(--upyx-control-height)!important;
  padding:8px 12px!important;
  margin-top:4px!important;
  border-radius:var(--upyx-control-radius)!important;
  line-height:1.2!important;
}

/* Textareas restent confortables mais ne deviennent plus surdimensionnés. */
html body .upyx-metres-page textarea,
html body #chiffrage textarea{
  min-height:84px!important;
  padding:10px 12px!important;
  border-radius:var(--upyx-control-radius)!important;
}

/* Cartes d'étape : moins de vide, même rythme partout. */
html body .upyx-metres-page .v4-page-card,
html body .upyx-metres-page .smart-box:not(.ux-section),
html body .upyx-metres-page .table-box:not(.ux-data-frame),
html body #chiffrage .v4-page-card,
html body #chiffrage .smart-box{
  padding:var(--upyx-card-padding-compact)!important;
}

html body .upyx-metres-page .section-header,
html body #chiffrage .section-header{
  margin-bottom:var(--upyx-inner-gap-compact)!important;
}

html body .upyx-metres-page .section-header h3,
html body #chiffrage .section-header h3{
  margin:0!important;
  line-height:1.15!important;
}

html body .upyx-metres-page .section-header p,
html body #chiffrage .section-header p{
  margin:6px 0 0!important;
  line-height:1.35!important;
}

/* Sous-cartes et groupes de champs. */
html body .upyx-metres-page .parameter-single-field,
html body .upyx-metres-page .parameter-fields-grid,
html body .upyx-metres-page .parameter-card,
html body .upyx-metres-page .form-grid,
html body .upyx-metres-page .smart-grid,
html body .upyx-metres-page .selection-card,
html body .upyx-metres-page .zone-card{
  padding:16px!important;
  gap:var(--upyx-inner-gap-compact)!important;
}

/* Murs / Pignons : blocs courts, nets, sans grande zone vide. */
html body #murs .parameter-single-field,
html body #pignons .parameter-single-field{
  width:min(100%,360px)!important;
  padding:16px!important;
}
html body #murs .parameter-fields-grid,
html body #pignons .parameter-fields-grid{
  padding:16px!important;
  gap:14px!important;
}
html body #murs .parameter-step-identical .checkbox-line,
html body #pignons .parameter-step-identical .checkbox-line{
  margin:12px 0 0!important;
}
html body #murs .parameter-control-card:not(.ux-alert),
html body #pignons .parameter-control-card{
  margin:12px 0 0!important;
  min-height:0!important;
  padding:12px 16px!important;
}

/* Planchers : mêmes hauteurs et mêmes alignements que les autres écrans. */
html body #planchers .planchers-general-config,
html body #planchers .planchers-structure-grid,
html body #planchers .smart-box:not(.ux-section){
  gap:var(--upyx-inner-gap-compact)!important;
}
html body #planchers .planchers-general-config > *,
html body #planchers .planchers-structure-grid > *{
  padding:16px!important;
  min-height:0!important;
}

/* Zinguerie : champs alignés et bloc plus dense. */
html body #zinguerie .zinguerie-smart-box:not(.ux-section),
html body #zinguerie .zinguerie-v4-card .smart-box:not(.ux-section){
  padding:18px!important;
}
html body #zinguerie .zinguerie-smart-box > .template-intro{
  margin:0 0 12px 42px!important;
}

/* Menuiseries : ligne générale et choix plus compacts. */
html body #menuiseries .menuiseries-general,
html body #menuiseries .menuiseries-general-config,
html body #menuiseries .menuiseries-selection-panel{
  padding:16px!important;
  gap:14px!important;
}
html body #menuiseries .rubrique-card,
html body #menuiseries .menuiserie-choice,
html body #menuiseries .choice-card{
  min-height:64px!important;
  padding:10px 14px!important;
  border-radius:14px!important;
}
html body #menuiseries .rubrique-card input:not([type="checkbox"]),
html body #menuiseries .menuiserie-choice input:not([type="checkbox"]),
html body #menuiseries .choice-card input:not([type="checkbox"]){
  height:42px!important;
  min-height:42px!important;
}

/* Isolation et revêtements : supprimer les hauteurs artificielles. */
html body #isolation .zone-card,
html body #revetements .zone-card,
html body #revetements-exterieurs .zone-card{
  min-height:0!important;
  padding:16px!important;
}

/* Cartouche de page légèrement plus compact, identique partout. */
html body .upyx-v4-business-hero:not(.ux-page-header){
  min-height:88px!important;
  padding:20px 30px!important;
}
html body .upyx-v4-business-hero:not(.ux-page-header) h2{
  margin:0!important;
  line-height:1.1!important;
}

@media(max-width:700px){
  :root{
    --upyx-control-height:44px;
    --upyx-card-padding-compact:14px;
    --upyx-inner-gap-compact:12px;
  }
  html body .upyx-v4-business-hero:not(.ux-page-header){
    min-height:72px!important;
    padding:16px 18px!important;
  }
  html body .upyx-metres-page .parameter-single-field,
  html body .upyx-metres-page .parameter-fields-grid,
  html body .upyx-metres-page .parameter-card{
    padding:14px!important;
  }
}


/* ======================================================================
   RC37 — Compactage structurel définitif Murs / Pignons
   Le titre du bloc porte déjà le libellé : aucun doublon ni astérisque.
   ====================================================================== */
html body #murs .parameter-step-total:not(.ux-section),
html body #pignons .parameter-step-total:not(.ux-section){
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 180px!important;
  grid-template-rows:auto auto!important;
  column-gap:24px!important;
  row-gap:4px!important;
  align-items:center!important;
  padding:18px 22px!important;
}
html body #murs .parameter-step-total > h3,
html body #pignons .parameter-step-total > h3{
  grid-column:1!important;
  grid-row:1!important;
  margin:0!important;
}
html body #murs .parameter-step-total > .template-intro,
html body #pignons .parameter-step-total > .template-intro{
  grid-column:1!important;
  grid-row:2!important;
  margin:2px 0 0 42px!important;
}
html body #murs .parameter-step-total > .parameter-single-field,
html body #pignons .parameter-step-total > .parameter-single-field{
  grid-column:2!important;
  grid-row:1 / span 2!important;
  display:block!important;
  width:180px!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
}
html body #murs .parameter-step-total > .parameter-single-field input,
html body #pignons .parameter-step-total > .parameter-single-field input{
  width:100%!important;
  height:var(--ux-business-control-height,40px)!important;
  min-height:var(--ux-business-control-height,40px)!important;
  margin:0!important;
  padding:6px 12px!important;
}
html body #murs .required-star,
html body #pignons .required-star{display:none!important;}

/* Étape éléments identiques : densité et axes identiques. */
html body #murs .parameter-step-identical:not(.ux-section),
html body #pignons .parameter-step-identical:not(.ux-section){
  padding:18px 22px!important;
}
html body #murs .parameter-step-identical > .template-intro,
html body #pignons .parameter-step-identical > .template-intro{
  margin-bottom:12px!important;
}
html body #murs .parameter-fields-grid,
html body #pignons .parameter-fields-grid{
  padding:14px!important;
  gap:12px!important;
}
html body #murs .parameter-fields-grid input,
html body #pignons .parameter-fields-grid input{
  height:var(--ux-business-control-height,40px)!important;
  min-height:var(--ux-business-control-height,40px)!important;
  margin-top:2px!important;
}
html body #murs .parameter-step-identical .checkbox-line,
html body #pignons .parameter-step-identical .checkbox-line{
  margin:10px 0 0!important;
}
html body #murs .parameter-control-card:not(.ux-alert),
html body #pignons .parameter-control-card{
  width:100%!important;
  margin:10px 0 0!important;
  padding:9px 14px!important;
}

/* Le bloc Dimensions reste masqué tant qu'aucune ligne n'est utile. */
html body #murs .parameter-step-details:has(tbody:empty),
html body #pignons .parameter-step-details:has(tbody:empty){
  display:none!important;
}

@media(max-width:700px){
  html body #murs .parameter-step-total:not(.ux-section),
  html body #pignons .parameter-step-total:not(.ux-section){
    grid-template-columns:1fr!important;
    grid-template-rows:auto!important;
    padding:16px!important;
  }
  html body #murs .parameter-step-total > h3,
  html body #pignons .parameter-step-total > h3,
  html body #murs .parameter-step-total > .template-intro,
  html body #pignons .parameter-step-total > .template-intro,
  html body #murs .parameter-step-total > .parameter-single-field,
  html body #pignons .parameter-step-total > .parameter-single-field{
    grid-column:1!important;
    grid-row:auto!important;
  }
  html body #murs .parameter-step-total > .template-intro,
  html body #pignons .parameter-step-total > .template-intro{
    margin-left:42px!important;
  }
  html body #murs .parameter-step-total > .parameter-single-field,
  html body #pignons .parameter-step-total > .parameter-single-field{
    width:100%!important;
    margin-top:10px!important;
  }
}

/* ======================================================================
   RC37 — Propagation du modèle compact Murs / Pignons
   Référence : une mission par bloc, contenu horizontal compact,
   contrôles de 44 px, aucun doublon de titre, même rythme vertical.
   ====================================================================== */
:root{
  --upyx-metres-control-h:44px;
  --upyx-metres-block-pad-y:18px;
  --upyx-metres-block-pad-x:22px;
  --upyx-metres-inner-gap:12px;
}

/* Tous les contrôles métier reprennent la densité validée. */
html body #planchers input:not([type="checkbox"]),
html body #planchers select,
html body #toiture input:not([type="checkbox"]),
html body #toiture select,
html body #zinguerie input:not([type="checkbox"]),
html body #zinguerie select,
html body #menuiseries input:not([type="checkbox"]),
html body #menuiseries select,
html body #isolation input:not([type="checkbox"]),
html body #isolation select,
html body #bardage input:not([type="checkbox"]),
html body #bardage select{
  height:var(--upyx-metres-control-h)!important;
  min-height:var(--upyx-metres-control-h)!important;
  padding:6px 12px!important;
  border-radius:12px!important;
}

/* Suppression des titres répétés à l'intérieur des pages. */
html body #planchers .v4-page-card > .section-header:first-child,
html body #toiture .v4-page-card > .section-header:first-child{
  display:none!important;
}

/* Même enveloppe compacte pour chaque bloc métier. */
html body #planchers .smart-box:not(.ux-section),
html body #toiture .smart-box:not(.ux-section),
html body #toiture .card-soft:not(.ux-section),
html body #zinguerie .smart-box:not(.ux-section),
html body #menuiseries .smart-box:not(.ux-section),
html body #isolation .smart-box:not(.ux-section),
html body #bardage .smart-box:not(.ux-section){
  padding:var(--upyx-metres-block-pad-y) var(--upyx-metres-block-pad-x)!important;
  min-height:0!important;
}
html body #planchers .smart-box > h3,
html body #toiture .smart-box > h3,
html body #toiture .card-soft > h3,
html body #zinguerie .smart-box > h3,
html body #menuiseries .smart-box > h3,
html body #isolation .smart-box > h3,
html body #bardage .smart-box > h3{
  margin:0!important;
  line-height:1.15!important;
}
html body #planchers .template-intro,
html body #toiture .template-intro,
html body #zinguerie .template-intro,
html body #menuiseries .template-intro,
html body #isolation .template-intro,
html body #bardage .template-intro{
  margin:6px 0 var(--upyx-metres-inner-gap) 42px!important;
  line-height:1.3!important;
}

/* Planchers : paramètres en lignes courtes, sous-blocs alignés. */
html body #planchers .planchers-config-box{
  padding:14px!important;
  gap:12px!important;
}
html body #planchers .planchers-general-config{
  align-items:end!important;
  gap:12px!important;
}
html body #planchers .planchers-general-config > *,
html body #planchers .planchers-grid-2 > *{
  min-height:0!important;
  padding:12px 14px!important;
}
html body #planchers .section-header-small{
  padding:14px 18px!important;
  margin:var(--upyx-layout-section-gap) 0 0!important;
}

/* Toiture & Charpente : groupes moins épais et sans vide décoratif. */
html body #toiture .charpente-config-box:not(.ux-subsection-group),
html body #toiture .charpente-structure-config:not(.ux-subsection-group){
  padding:14px!important;
  gap:12px!important;
}
html body #toiture .charpente-general-config,
html body #toiture .charpente-field-groups,
html body #toiture .charpente-structure-primary,
html body #toiture .charpente-structure-grid,
html body #toiture .form-grid{
  gap:12px!important;
}
html body #toiture .charpente-field-group:not(.ux-subsection),
html body #toiture .roof-openings-box:not(.ux-section){
  padding:14px!important;
  min-height:0!important;
}
html body #toiture .charpente-field-group h4{
  margin:0 0 8px!important;
}

/* Zinguerie : cartes autonomes et champs sur une grille régulière. */
html body #zinguerie .zinguerie-v4-card{
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  display:flex!important;
  flex-direction:column!important;
  gap:var(--upyx-layout-section-gap)!important;
}
html body #zinguerie .zinguerie-smart-box:not(.ux-section){
  margin:0!important;
}
html body #zinguerie .zinguerie-auto-grid,
html body #zinguerie .zinguerie-param-grid,
html body #zinguerie .zinguerie-complement-grid{
  gap:12px!important;
}
html body #zinguerie .zinguerie-readonly-label,
html body #zinguerie .zinguerie-param-grid > label,
html body #zinguerie .zinguerie-complement-grid > label{
  min-height:0!important;
}

/* Menuiseries : configuration générale sur une ligne et choix plus fins. */
html body #menuiseries .smart-config-box{
  padding:14px!important;
}
html body #menuiseries .menu-general-config{
  padding:0!important;
  gap:16px!important;
  align-items:end!important;
}
html body #menuiseries .menu-type-group{
  padding:12px!important;
  margin-top:12px!important;
}
html body #menuiseries .menu-type-picker{
  gap:10px!important;
}
html body #menuiseries .menu-type-card{
  min-height:58px!important;
  padding:8px 10px!important;
  border-radius:12px!important;
}
html body #menuiseries .menu-card-qty{
  width:86px!important;
  max-width:86px!important;
}
html body #menuiseries .menu-family-title,
html body #menuiseries .menu-select-title{
  margin:12px 0 8px!important;
}
html body #menuiseries .coherence-box{
  margin-top:12px!important;
  padding:10px 14px!important;
}
html body #menuiseries .section-header-small{
  padding:14px 18px!important;
}

/* Isolation : sélecteurs et paramètres plus denses. */
html body #isolation .isolation-config-box{
  padding:14px!important;
  gap:12px!important;
}
html body #isolation .isolation-zone-picker,
html body #isolation .isolation-zone-params{
  gap:12px!important;
}
html body #isolation .isolation-zone-card{
  min-height:58px!important;
  padding:10px 14px!important;
}
html body #isolation .isolation-zone-panel{
  padding:14px!important;
  min-height:0!important;
}
html body #isolation .isolation-select-title{
  margin:10px 0 8px!important;
}

/* Revêtements : surfaces et sélections sans grandes zones vides. */
html body #bardage .smart-config-box{
  padding:14px!important;
  gap:12px!important;
}
html body #bardage .bardage-auto-grid,
html body #bardage .bardage-choice-grid,
html body #bardage .revetement-form-grid{
  gap:12px!important;
}
html body #bardage .bardage-choice-card,
html body #bardage .revetement-card,
html body #bardage .bardage-family-card{
  min-height:0!important;
  padding:12px 14px!important;
}
html body #bardage .bardage-select-title,
html body #bardage .bardage-family-title{
  margin:10px 0 8px!important;
}

@media(max-width:700px){
  :root{
    --upyx-metres-block-pad-y:16px;
    --upyx-metres-block-pad-x:16px;
  }
  html body #planchers .template-intro,
  html body #toiture .template-intro,
  html body #zinguerie .template-intro,
  html body #menuiseries .template-intro,
  html body #isolation .template-intro,
  html body #bardage .template-intro{
    margin-left:42px!important;
  }
  html body #menuiseries .menu-card-qty{
    width:76px!important;
    max-width:76px!important;
  }
}

/* RC37 — Planchers aligné sur le modèle compact Murs/Pignons */
html body #planchers .planchers-v4 {
  display: grid;
  gap: var(--upyx-section-gap, 20px);
}
html body #planchers .planchers-smart:not(.ux-section) {
  margin: 0 !important;
}
html body #planchers .parameter-single-field {
  max-width: 420px;
}
html body #planchers .parameter-single-field input,
html body #planchers .parameter-fields-grid input,
html body #planchers .planchers-structure-inline input {
  min-height: 44px !important;
  height: 44px !important;
}
html body #planchers .planchers-structure-inline {
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(280px, 1fr);
  align-items: end;
  gap: 20px;
}
html body #planchers .planchers-structure-inline > label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}
html body #planchers .planchers-structure-inline .parameter-control-card {
  margin: 0 !important;
  min-height: 44px;
  display: flex;
  align-items: center;
}
html body #planchers .parameter-step-heading-with-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
html body #planchers .parameter-step-heading-with-action button {
  flex: 0 0 auto;
}
@media (max-width: 800px) {
  html body #planchers .planchers-structure-inline {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  html body #planchers .parameter-step-heading-with-action {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ======================================================================
   RC37 FINAL — Planchers utilise le gabarit Pignons sans variante
   Ces règles finales neutralisent tout ancien override propre à Planchers.
   ====================================================================== */
html body #planchers .planchers-v4{
  display:grid!important;
  gap:var(--upyx-section-gap,20px)!important;
}
html body #planchers .parameter-step:not(.ux-section){
  margin:0!important;
}
html body #planchers .parameter-step-total:not(.ux-section){
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 180px!important;
  grid-template-rows:auto auto!important;
  column-gap:24px!important;
  row-gap:4px!important;
  align-items:center!important;
  padding:18px 22px!important;
  min-height:0!important;
}
html body #planchers .parameter-step-total > h3{
  grid-column:1!important;
  grid-row:1!important;
  margin:0!important;
}
html body #planchers .parameter-step-total > .template-intro{
  grid-column:1!important;
  grid-row:2!important;
  margin:2px 0 0 42px!important;
}
html body #planchers .parameter-step-total > .parameter-single-field{
  grid-column:2!important;
  grid-row:1 / span 2!important;
  display:block!important;
  width:180px!important;
  max-width:180px!important;
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
}
html body #planchers .parameter-step-total > .parameter-single-field input{
  width:100%!important;
  height:var(--ux-business-control-height,40px)!important;
  min-height:var(--ux-business-control-height,40px)!important;
  margin:0!important;
  padding:6px 12px!important;
}
html body #planchers .parameter-step-identical:not(.ux-section){
  padding:18px 22px!important;
  min-height:0!important;
}
html body #planchers .parameter-step-identical > .template-intro{
  margin-bottom:12px!important;
}
html body #planchers .parameter-step-identical > .parameter-fields-grid{
  display:grid!important;
  grid-template-columns:180px minmax(0,1fr) minmax(0,1fr)!important;
  padding:14px!important;
  gap:12px!important;
  background:var(--surface-soft,#e8eef7)!important;
  border:1px solid var(--line,#c9d8ea)!important;
  border-radius:18px!important;
}
html body #planchers .parameter-step-identical > .parameter-fields-grid > label{
  display:grid!important;
  gap:6px!important;
  min-width:0!important;
}
html body #planchers .parameter-step-identical > .parameter-fields-grid input{
  width:100%!important;
  height:var(--ux-business-control-height,40px)!important;
  min-height:var(--ux-business-control-height,40px)!important;
  margin:0!important;
}
html body #planchers .parameter-step-identical > .checkbox-line{
  margin:10px 0 0!important;
}
html body #planchers .parameter-step-identical > .parameter-control-card{
  margin:10px 0 0!important;
  padding:9px 14px!important;
  min-height:44px!important;
}
html body #planchers .parameter-step-structure:not(.ux-section){
  padding:18px 22px!important;
  min-height:0!important;
}
html body #planchers .parameter-step-structure > .template-intro{
  margin-bottom:12px!important;
}
html body #planchers .planchers-structure-inline{
  display:grid!important;
  grid-template-columns:180px!important;
  gap:12px!important;
  align-items:end!important;
}
html body #planchers .planchers-structure-inline input{
  height:var(--ux-business-control-height,40px)!important;
  min-height:var(--ux-business-control-height,40px)!important;
}
html body #planchers .planchers-structure-inline > label{
  gap:4px!important;
}
html body #planchers .planchers-structure-inline .parameter-control-card{
  min-height:44px!important;
  height:44px!important;
  margin:0!important;
}
html body #planchers .parameter-step-details:has(tbody:empty){
  display:none!important;
}
@media(max-width:700px){
  html body #planchers .parameter-step-total:not(.ux-section){
    grid-template-columns:1fr!important;
    grid-template-rows:auto!important;
    padding:16px!important;
  }
  html body #planchers .parameter-step-total > h3,
  html body #planchers .parameter-step-total > .template-intro,
  html body #planchers .parameter-step-total > .parameter-single-field{
    grid-column:1!important;
    grid-row:auto!important;
  }
  html body #planchers .parameter-step-total > .template-intro{
    margin-left:42px!important;
  }
  html body #planchers .parameter-step-total > .parameter-single-field{
    width:100%!important;
    max-width:none!important;
    margin-top:10px!important;
  }
  html body #planchers .parameter-step-identical > .parameter-fields-grid{
    grid-template-columns:1fr!important;
  }
}

/* ======================================================================
   RC37 — Propagation du gabarit Métrés validé
   Références figées : Murs, Pignons, Planchers.
   Même rythme, mêmes cartes, mêmes contrôles et mêmes séparations.
   ====================================================================== */
html body #toiture .v4-page-card,
html body #zinguerie .v4-page-card,
html body #menuiseries .v4-page-card,
html body #isolation .v4-page-card,
html body #bardage .v4-page-card{
  display:flex!important;
  flex-direction:column!important;
  gap:var(--upyx-section-gap,20px)!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
html body #toiture .parameter-step:not(.ux-section),
html body #zinguerie .parameter-step:not(.ux-section),
html body #menuiseries .parameter-step:not(.ux-section),
html body #isolation .parameter-step:not(.ux-section),
html body #bardage .parameter-step:not(.ux-section){
  display:block!important;
  width:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:18px 22px!important;
  box-sizing:border-box!important;
  background:#fff!important;
  border:1px solid #d7e1ee!important;
  border-radius:18px!important;
  box-shadow:0 10px 24px rgba(30,64,110,.06)!important;
}
html body #toiture .parameter-step > h3,
html body #zinguerie .parameter-step > h3,
html body #menuiseries .parameter-step > h3,
html body #isolation .parameter-step > h3,
html body #bardage .parameter-step > h3{
  margin:0!important;
}
html body #toiture .parameter-step > .template-intro,
html body #zinguerie .parameter-step > .template-intro,
html body #menuiseries .parameter-step > .template-intro,
html body #isolation .parameter-step > .template-intro,
html body #bardage .parameter-step > .template-intro{
  margin:4px 0 12px 42px!important;
}
html body #toiture input:not(.ux-input),
html body #toiture select:not(.ux-select),
html body #zinguerie input:not(.ux-input),
html body #zinguerie select:not(.ux-select),
html body #menuiseries input:not(.ux-input),
html body #menuiseries select:not(.ux-select),
html body #isolation input:not(.ux-input),
html body #isolation select:not(.ux-select),
html body #bardage input:not(.ux-input),
html body #bardage select:not(.ux-select){
  min-height:44px!important;
  height:44px!important;
  padding:6px 12px!important;
}
html body #toiture .smart-config-box:not(.ux-subsection-group),
html body #zinguerie .smart-config-box,
html body #menuiseries .smart-config-box,
html body #isolation .smart-config-box,
html body #bardage .smart-config-box,
html body #toiture .card-soft:not(.ux-section),
html body #zinguerie .card-soft,
html body #menuiseries .card-soft,
html body #isolation .card-soft,
html body #bardage .card-soft{
  margin:12px 0 0!important;
  padding:14px!important;
  min-height:0!important;
  border-radius:14px!important;
}
html body #toiture .form-grid,
html body #zinguerie .form-grid,
html body #menuiseries .form-grid,
html body #isolation .form-grid,
html body #bardage .form-grid{
  gap:12px!important;
}
html body #menuiseries .menu-general-config,
html body #menuiseries .menu-type-picker,
html body #isolation .isolation-zone-picker,
html body #isolation .isolation-zone-params{
  gap:12px!important;
}
html body #menuiseries .menu-type-group,
html body #isolation .isolation-param-card:not(.ux-subsection),
html body #bardage .bardage-type-group{
  padding:14px!important;
  margin-top:12px!important;
  min-height:0!important;
}
html body #menuiseries .menu-type-card,
html body #isolation .isolation-zone-card{
  min-height:60px!important;
  padding:10px 12px!important;
}
html body #menuiseries .menu-card-qty{
  height:40px!important;
  min-height:40px!important;
}
html body #toiture .table-box,
html body #menuiseries .table-box{
  margin:12px 0 0!important;
}
html body #toiture .parameter-step-details:has(tbody:empty),
html body #menuiseries .parameter-step-details:has(tbody:empty){
  display:none!important;
}
html body #zinguerie .parameter-step .template-intro{
  font-weight:400!important;
}
@media(max-width:900px){
  html body #toiture .parameter-step:not(.ux-section),
  html body #zinguerie .parameter-step:not(.ux-section),
  html body #menuiseries .parameter-step:not(.ux-section),
  html body #isolation .parameter-step:not(.ux-section),
  html body #bardage .parameter-step:not(.ux-section){
    padding:16px!important;
    border-radius:16px!important;
  }
  html body #toiture .parameter-step > .template-intro,
  html body #zinguerie .parameter-step > .template-intro,
  html body #menuiseries .parameter-step > .template-intro,
  html body #isolation .parameter-step > .template-intro,
  html body #bardage .parameter-step > .template-intro{
    margin-left:0!important;
  }
}

/* RC37 FINAL — gabarit Métrés strict Murs / Pignons / Planchers */
html body .upyx-metres-page .v4-page-card{
  display:flex!important;
  flex-direction:column!important;
  gap:var(--ux-business-section-gap,20px)!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
html body .upyx-metres-page .parameter-step:not(.ux-section){
  margin:0!important;
  padding:22px 26px!important;
  border:1px solid #d7e2f1!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 10px 24px rgba(31,65,114,.05)!important;
}
html body .upyx-metres-page .parameter-step>h3{
  margin:0 0 6px 52px!important;
  min-height:34px!important;
  display:flex!important;
  align-items:center!important;
  font-size:24px!important;
  line-height:1.15!important;
}
html body .upyx-metres-page .parameter-step>.template-intro{
  margin:0 0 18px 52px!important;
  font-size:17px!important;
  line-height:1.35!important;
  color:#667085!important;
}
html body .upyx-metres-page .parameter-fields-panel:not(.ux-subsection-group){
  margin:0!important;
  padding:16px!important;
  border:1px solid #c8d8ed!important;
  border-radius:16px!important;
  background:#eaf0f8!important;
}
html body .upyx-metres-page input:not([type=checkbox]):not([type=radio]):not(.ux-input),
html body .upyx-metres-page select:not(.ux-select){
  min-height:44px!important;
  height:44px!important;
}
html body #menuiseries .menu-general-config,
html body #bardage .bardage-general-config{
  margin:0!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
}
html body #menuiseries .menu-type-group,
html body #bardage .bardage-type-group{
  margin:0 0 14px!important;
  padding:14px!important;
  border:1px solid #c8d8ed!important;
  border-radius:14px!important;
  background:#edf3fa!important;
}
html body #menuiseries .menu-type-group:last-child,
html body #bardage .bardage-type-group:last-child{margin-bottom:0!important}
html body #isolation .isolation-zone-picker,
html body #isolation .isolation-zone-params{
  margin:0!important;
}
html body #isolation .isolation-param-card:not(.ux-subsection){
  padding:14px!important;
  border-radius:14px!important;
  min-height:0!important;
}
html body #bardage .revetements-config-panel:has(.bardage-option-config[hidden]){
  min-height:0!important;
}
html body #bardage .bardage-option-config{
  margin:0 0 14px!important;
}
html body #bardage .bardage-option-config:last-child{margin-bottom:0!important}
html body #zinguerie .zinguerie-smart-box:not(.ux-section){
  margin:0!important;
  padding:22px 26px!important;
  border:1px solid #d7e2f1!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 10px 24px rgba(31,65,114,.05)!important;
}
html body #zinguerie .zinguerie-auto-grid,
html body #zinguerie .zinguerie-param-grid,
html body #zinguerie .zinguerie-complement-grid{
  margin-top:14px!important;
  padding:16px!important;
  border:1px solid #c8d8ed!important;
  border-radius:16px!important;
  background:#eaf0f8!important;
  gap:14px!important;
}
html body #zinguerie .zinguerie-family{border-top:1px solid #d7e2f1!important}
@media(max-width:900px){
  html body .upyx-metres-page .v4-page-card{gap:16px!important}
  html body .upyx-metres-page .parameter-step:not(.ux-section){padding:16px!important}
  html body .upyx-metres-page .parameter-step>h3,
  html body .upyx-metres-page .parameter-step>.template-intro{margin-left:0!important}
}

/* RC37 final — Menuiseries compactes sur le gabarit validé */
html body #menuiseries .parameter-step:not(.ux-section){padding:18px 22px!important}
html body #menuiseries .parameter-step-1:not(.ux-section){
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 620px!important;
  grid-template-areas:"title fields" "intro fields"!important;
  align-items:center!important;
  column-gap:24px!important;
}
html body #menuiseries .parameter-step-1>h3{grid-area:title!important;margin:0!important}
html body #menuiseries .parameter-step-1>.template-intro{grid-area:intro!important;margin:4px 0 0 52px!important}
html body #menuiseries .parameter-step-1>.parameter-fields-panel{grid-area:fields!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important}
html body #menuiseries .menu-general-config{
  display:grid!important;
  grid-template-columns:180px minmax(220px,1fr) auto!important;
  gap:14px!important;
  align-items:end!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
}
html body #menuiseries .menu-general-config .menu-total-label,
html body #menuiseries .menu-general-config #menuGlobalMaterialLabel{padding:0!important;margin:0!important;border:0!important}
html body #menuiseries .menu-general-config input,
html body #menuiseries .menu-general-config select{height:var(--ux-business-control-height,40px)!important;min-height:var(--ux-business-control-height,40px)!important}
html body #menuiseries .menu-general-config .checkbox-line{height:44px!important;margin:0!important;white-space:nowrap!important}
html body #menuiseries .menuiseries-selection-panel{padding:12px!important}
html body #menuiseries .menu-type-group{padding:12px!important;margin:0 0 12px!important}
html body #menuiseries .menu-type-group:last-child{margin-bottom:0!important}
html body #menuiseries .menu-type-group h5{margin:0 0 10px!important}
html body #menuiseries .menu-type-picker{gap:10px!important}
html body #menuiseries .menu-type-card{min-height:56px!important;padding:8px 10px!important;gap:8px!important}
html body #menuiseries .menu-card-qty{height:40px!important;min-height:40px!important;width:88px!important}
html body #menuiseries .parameter-step-details .table-box{margin-top:10px!important}
@media(max-width:1100px){
 html body #menuiseries .parameter-step-1:not(.ux-section){grid-template-columns:1fr!important;grid-template-areas:"title" "intro" "fields"!important;row-gap:12px!important}
 html body #menuiseries .parameter-step-1>.template-intro{margin-left:0!important}
 html body #menuiseries .menu-general-config{grid-template-columns:1fr 1fr!important}
 html body #menuiseries .menu-general-config .checkbox-line{grid-column:1/-1!important}
}
@media(max-width:700px){
 html body #menuiseries .menu-general-config{grid-template-columns:1fr!important}
}

/* RC37 FINAL — suppression du niveau d'imbrication résiduel
   Menuiseries / Revêtements extérieurs : bloc blanc numéroté -> contenu direct */
html body #menuiseries .menuiseries-selection-panel,
html body #bardage .revetements-selection-panel{
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}

html body #menuiseries .menu-type-group,
html body #bardage .bardage-type-group{
  margin:0 0 12px!important;
  padding:12px 14px!important;
  border:1px solid #c8d8ed!important;
  border-radius:14px!important;
  background:#eef3f9!important;
  box-shadow:none!important;
}
html body #menuiseries .menu-type-group:last-child,
html body #bardage .bardage-type-group:last-child{
  margin-bottom:0!important;
}

html body #menuiseries .menu-family-title,
html body #bardage .bardage-family-title{
  margin:0 0 10px!important;
  min-height:28px!important;
}

html body #menuiseries .menu-type-picker,
html body #bardage .bardage-types-grid{
  gap:10px!important;
}

html body #menuiseries .menu-type-card,
html body #bardage .bardage-type-card{
  min-height:52px!important;
  padding:8px 10px!important;
  border-radius:12px!important;
  box-shadow:none!important;
}

html body #menuiseries .menu-card-qty{
  width:84px!important;
  min-width:84px!important;
  height:38px!important;
  min-height:38px!important;
}

@media(max-width:900px){
  html body #menuiseries .menu-type-group,
  html body #bardage .bardage-type-group{
    padding:12px!important;
  }
}

/* RC37 — Dernière passe UX : Projet regroupé par domaines */
#projectRubricsToggle{display:none!important}
.upyx-v5-step-lines{gap:var(--section-gap,20px)!important;padding:18px 24px 24px}
.upyx-project-domain{border:1px solid #dce5f1;border-radius:18px;background:#fff;overflow:hidden;box-shadow:0 8px 22px rgba(15,35,70,.035)}
.upyx-project-domain-head{width:100%;display:grid!important;grid-template-columns:44px minmax(0,1fr) auto 150px 28px;align-items:center;gap:14px;padding:15px 18px!important;margin:0!important;border:0!important;background:#fff!important;color:#14213d!important;text-align:left!important;box-shadow:none!important}
.upyx-project-domain-head:hover{background:#f8fbff!important}
.upyx-project-domain-icon{width:40px;height:40px;border-radius:12px;display:grid!important;place-items:center;background:#eef5ff;color:#0b63f6;font-size:23px!important}
.upyx-project-domain-copy strong{display:block;font-size:17px;color:#101a33}
.upyx-project-domain-copy small{display:block;margin-top:3px;color:#64748b;font-size:13px;font-weight:700}
.upyx-project-domain-progress{display:flex;align-items:baseline;gap:6px;white-space:nowrap;color:#52627a}
.upyx-project-domain-progress b{font-size:16px;color:#0b63f6}
.upyx-project-domain-progress small{font-size:12px;font-weight:800}
.upyx-project-domain-track{height:8px;border-radius:999px;background:#e8eef7;overflow:hidden}
.upyx-project-domain-track i{display:block;height:100%;border-radius:inherit;background:#0b63f6}
.upyx-project-domain-arrow{transition:transform .18s ease}
.upyx-project-domain.open .upyx-project-domain-arrow{transform:rotate(180deg)}
.upyx-project-domain-body{display:none;padding:0 14px 14px;background:#f8fbff;border-top:1px solid #edf2f8}
.upyx-project-domain.open .upyx-project-domain-body{display:grid;gap:9px}
.upyx-project-domain-body .upyx-v5-step-line{box-shadow:none;border-radius:14px}
.upyx-project-domain-body .upyx-v5-line-main{grid-template-columns:40px minmax(0,1fr) auto 28px;padding:12px 14px!important}
.upyx-project-domain-body .upyx-v5-line-detail{padding-left:68px}
@media(max-width:760px){
 .upyx-project-domain-head{grid-template-columns:38px minmax(0,1fr) 24px;padding:13px!important;gap:10px}
 .upyx-project-domain-progress{grid-column:2/3;justify-self:start}
 .upyx-project-domain-track{display:none}
 .upyx-project-domain-arrow{grid-column:3;grid-row:1/3}
 .upyx-project-domain-body{padding:0 10px 10px}
 .upyx-project-domain-body .upyx-v5-line-main{grid-template-columns:34px minmax(0,1fr) 26px!important}
 .upyx-project-domain-body .upyx-v5-line-main .upyx-v5-step-status{grid-column:2/3}
 .upyx-project-domain-body .upyx-v5-line-detail{padding:11px}
}

/* RC37 — Dernière passe UX : Devis compact, même grammaire que les Métrés */
#devis .upyx-assistant-card-rc35{padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
#devis .upyx-assistant-card-rc35>.upyx-assistant-head{background:#fff;border:1px solid #dce5f1;border-radius:18px;padding:16px 18px!important;margin:0 0 var(--section-gap,20px)!important;box-shadow:0 8px 22px rgba(15,35,70,.035)}
#devis .upyx-assistant-layout-rc35{display:block!important}
#devis .upyx-assistant-main-rc35{gap:var(--section-gap,20px)!important}
#devis .upyx-assistant-zone-rc35,
#devis .upyx-assistant-summary-panel-rc35{padding:16px 18px!important;border-radius:18px!important;box-shadow:0 8px 22px rgba(15,35,70,.035)!important;background:#fff!important;border:1px solid #dce5f1!important}
#devis .upyx-assistant-zone-rc35:first-of-type{background:#fff!important;border-color:#dce5f1!important}
#devis .upyx-assistant-zone-title{margin-bottom:12px!important}
#devis .upyx-assistant-zone-title>span{width:34px;height:34px;border-radius:11px}
#devis .upyx-assistant-zone-title h4{font-size:18px}
#devis .upyx-assistant-select select,
#devis .chiffrage-form-grid input{
  min-height:48px!important;
  height:48px!important;
  line-height:48px!important;
  padding:0 16px!important;
  border-radius:12px!important;
}
#devis .upyx-material-list-refmulti{gap:9px!important}
#devis .upyx-ref-rubrique-card-rc35{padding:9px 11px!important;border-radius:14px!important;background:#e7edf5!important;border-color:#c9d6e6!important;box-shadow:none!important}
#devis .upyx-ref-rubrique-card-rc35 .upyx-material-search-row input{height:40px!important;border-radius:11px!important}
#devis .upyx-assistant-summary-panel-rc35{position:static!important;background:#fff!important}
#devis .upyx-assistant-summary-panel-rc35 .upyx-assistant-actions{flex-direction:row!important;justify-content:flex-end!important}
#devis .upyx-assistant-summary-panel-rc35 .upyx-assistant-actions button{width:auto!important}
@media(max-width:760px){
 #devis .upyx-assistant-card-rc35>.upyx-assistant-head,
 #devis .upyx-assistant-zone-rc35,
 #devis .upyx-assistant-summary-panel-rc35{padding:13px!important;border-radius:15px!important}
 #devis .upyx-assistant-summary-panel-rc35 .upyx-assistant-actions{flex-direction:column-reverse!important}
 #devis .upyx-assistant-summary-panel-rc35 .upyx-assistant-actions button{width:100%!important}
}

/* Transition Auth invisible : aucun contenu intermédiaire */
body.auth-pending #loginOverlay {
  background: #06111f !important;
}

body.auth-pending .login-box {
  display: none !important;
}

/* Transition Auth invisible : aucun contenu intermédiaire */
body.auth-pending #loginOverlay {
  background: #06111f !important;
}

body.auth-pending .login-box {
  display: none !important;
}


/* Foundation F02 — Chevrons CSS sans caractères Unicode */
.accordion-nav .nav-block > .menu-btn::after{
  content:""!important;
  display:block!important;
  width:8px!important;
  height:8px!important;
  margin-left:auto!important;
  flex:0 0 auto!important;
  border-right:2px solid currentColor!important;
  border-bottom:2px solid currentColor!important;
  opacity:.75!important;
  transform:rotate(45deg)!important;
  transition:transform .18s ease!important;
}

.accordion-nav .nav-block.open > .menu-btn::after{
  transform:rotate(225deg)!important;
}

.upyx-v4-project-chevron{
  display:inline-block;
  width:8px;
  height:8px;
  margin-left:auto;
  flex:0 0 auto;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(45deg);
  opacity:.8;
}
