/* Accueil (choix du type d'étude), sélecteur de module et module dalles alvéolées */

/* ---------- Sélecteur de module dans la barre latérale ---------- */
.module-switch{display:flex;align-items:center;gap:11px;margin:28px 0 -30px;padding:11px 12px;border:1px solid #36515a;border-radius:7px;text-decoration:none;color:#e5efef;background:#1b3841;transition:background .15s,border-color .15s}
.module-switch:hover{background:#244650;border-color:#4c6c74}
.module-switch>span{font-size:16px;color:#eab179;width:21px;text-align:center}
.module-switch em{font-style:normal;font-size:12px;font-weight:600;line-height:1.25}
.module-switch small{display:block;font-weight:400;font-size:10px;color:#8fa9ae;margin-top:2px}
.status-dot.pending{background:#df955c}
.nav:disabled{opacity:.55;cursor:default}
.nav:disabled i{background:#2c4850;color:#c9a27d;font-size:9px}
a.crumb{text-decoration:none}a.crumb:hover{color:var(--ink)}
@media(max-width:1000px){.module-switch{justify-content:center;padding:10px 0;margin:22px 0 -20px}.module-switch em{display:none}}
@media(max-width:760px){.module-switch{margin:0;padding:8px 10px}}

/* ---------- Accueil ---------- */
body.portal{min-height:100vh;background:radial-gradient(1200px 500px at 85% -10%,#1f4550 0%,transparent 60%),var(--navy);color:#d7e4e4;display:flex;flex-direction:column}
.portal-top{display:flex;justify-content:space-between;align-items:center;padding:28px 48px}
.portal-user{display:flex;align-items:center;gap:10px;font-size:12px;color:#d7e4e4}
.portal-user small{color:#8da7ad;font-size:10px;margin-left:6px}
.portal-main{flex:1;width:100%;max-width:1100px;margin:0 auto;padding:40px 48px 30px;display:flex;flex-direction:column}
.portal .eyebrow{color:#8fb3ad}
.portal h1{color:white;font-size:34px;font-weight:600;letter-spacing:-.5px;margin:12px 0 10px}
.portal-lead{margin:0 0 36px;color:#a6bcbd;font-size:14px}
.portal-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.portal-card{position:relative;display:flex;flex-direction:column;background:white;color:var(--ink);border-radius:12px;padding:26px 26px 22px;text-decoration:none;border:2px solid transparent;box-shadow:0 18px 40px #0000002e;transition:transform .2s ease,box-shadow .2s ease,border-color .2s}
.portal-card:hover,.portal-card:focus-visible{transform:translateY(-4px);box-shadow:0 26px 50px #00000040;border-color:#dfa46f}
.portal-card.last::after{content:"Dernière étude ouverte";position:absolute;top:16px;right:16px;font-size:9px;letter-spacing:.6px;color:#557764;background:#edf3ef;border:1px solid #d9e5df;border-radius:4px;padding:4px 7px}
.portal-figure{display:block;background:#f2f5f4;border-radius:8px;padding:18px 22px;margin-bottom:18px}
.portal-figure svg{display:block;width:100%;height:96px}
.pf-slab{fill:#c9d3d1}.pf-block path{fill:#fff;stroke:#5c6b6e;stroke-width:2}.pf-beam path{fill:#4a5a5e}
.pf-hc{fill:#c9d3d1;stroke:#5c6b6e;stroke-width:2}.pf-core ellipse{fill:#fff;stroke:#5c6b6e;stroke-width:1.5}.pf-strand circle{fill:#df955c}
.portal-tag{align-self:flex-start;font-size:10px;font-weight:600;letter-spacing:.4px;color:var(--green);background:#eaf2ee;border-radius:4px;padding:5px 8px}
.portal-tag.new{color:#a35f27;background:#fbefe4}
.portal-card h2{font-size:20px;margin:14px 0 8px;font-weight:600}
.portal-card p{margin:0 0 14px;color:var(--muted);font-size:13px;line-height:1.55}
.portal-card ul{list-style:none;padding:0;margin:0 0 22px;display:flex;flex-wrap:wrap;gap:6px}
.portal-card li{font-size:10px;border:1px solid var(--line);border-radius:4px;padding:4px 8px;color:#5f6f72}
.portal-go{margin-top:auto;display:flex;justify-content:space-between;align-items:center;background:var(--green);color:white;border-radius:6px;padding:13px 16px;font-size:13px;font-weight:500}
.portal-go span{font-size:19px;transition:transform .2s}
.portal-card:hover .portal-go span{transform:translateX(4px)}
.portal-foot{margin:40px 0 0;font-size:10px;color:#6f8d93;text-align:center}
@media(max-width:800px){.portal-top{padding:18px 16px}.portal-user{display:none}.portal-main{padding:20px 16px}.portal h1{font-size:25px}.portal-choices{grid-template-columns:1fr;gap:16px}}

/* ---------- Module dalles alvéolées ---------- */
.hc-gap{margin-top:19px!important;margin-bottom:9px!important}
.hc-fields{display:grid;gap:12px;margin-top:20px}
.hc-fields label{display:block;font-size:11px;color:#597571}
.hc-fields select{display:block;width:100%;margin-top:6px;padding:9px 10px;border:1px solid var(--line);border-radius:5px;background:white;color:var(--ink)}
.hc-error{margin:12px 0 0;color:#a5402d;font-size:11px;background:#fbeeea;border-radius:5px;padding:9px 11px}
.hc-results{display:grid;gap:24px;min-width:0}
.hc-section-card{overflow:hidden;border:0}
.hc-dark{background:#1c3a41;color:#d7e4e4;padding:22px 24px 18px}
.hc-dark-head{display:flex;justify-content:space-between;align-items:center;font-size:9px;letter-spacing:1.6px;color:#a6c0bf;font-weight:700}
.hc-chip{border:1px solid #5d7b80;border-radius:4px;padding:5px 9px;letter-spacing:.5px;color:white}
.hc-drawing{background:white;border-radius:6px;margin:18px auto 12px;padding:16px;max-width:640px}
.hc-drawing svg{display:block;width:100%;height:auto;max-height:260px}
.hc-top{fill:#e6ebe9;stroke:#8a989b;stroke-dasharray:4 3}
.hc-body{fill:#c9d3d1;stroke:#4c5c60;stroke-width:1.6}
.hc-core{fill:#fff;stroke:#5c6b6e;stroke-width:1.3}
.hc-strand{fill:#df955c}
.hc-dim path{stroke:#7c8b8e;stroke-width:1;fill:none}.hc-dim text{font-size:11px;fill:#5f6f72;text-anchor:middle}
#hc-section-note{margin:0;text-align:center;font-size:10px;color:#a6c0bf}
.hc-summary,.hc-pending{padding:24px}
.hc-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px}
.hc-kpis div{border:1px solid var(--line);border-radius:7px;padding:12px;background:#fbfcfb}
.hc-kpis small{display:block;font-size:9px;color:var(--muted);letter-spacing:.3px}
.hc-kpis strong{display:inline-block;font-size:22px;font-weight:600;margin:6px 4px 0 0;color:var(--ink)}
.hc-kpis span{font-size:10px;color:var(--muted)}
.hc-table{width:100%;border-collapse:collapse;font-size:12px}
.hc-table th{text-align:left;font-weight:400;color:#5f6f72;padding:9px 0;border-top:1px solid var(--line);text-transform:none;letter-spacing:0;font-size:12px;background:none}
.hc-table td{text-align:right;padding:9px 0;border-top:1px solid var(--line);font-weight:500}
.hc-empty{border:1px dashed #e2c19f;background:#fdf7f1;border-radius:8px;padding:18px 20px;font-size:12px;color:#5f4a37}
.hc-empty strong{color:#8d4f1c;font-size:13px}
.hc-empty p{margin:8px 0 10px;line-height:1.55}
.hc-empty ol{margin:0;padding-left:20px;line-height:1.9}
@media(max-width:1200px){.hc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.hc-results{gap:16px}.hc-summary,.hc-pending{padding:18px}.hc-dark{padding:16px}}
.hc-scroll{overflow-x:auto;margin-bottom:16px}
.hc-cat{width:100%;border-collapse:collapse;font-size:11.5px;min-width:620px}
.hc-cat th{text-align:left;font-size:9px;letter-spacing:.5px;color:var(--muted);font-weight:600;padding:8px 8px;border-bottom:1px solid var(--line);text-transform:uppercase;background:none}
.hc-cat td{padding:8px;border-bottom:1px solid var(--line);white-space:nowrap}
.hc-cat tbody tr{cursor:pointer;transition:background .15s}
.hc-cat tbody tr:hover{background:#f6f9f8}
.hc-cat tr.is-selected{background:#eaf2ee}
.hc-cat tr.is-selected td:first-child{box-shadow:inset 3px 0 var(--green)}
.hc-pending-cell{color:#a35f27;font-style:italic}
.hc-dim text{font-size:12px}
.hc-steels{font-size:11px;color:#5f6f72;margin:-8px 0 14px;line-height:1.6}
.hc-solutions{padding:24px}
.hc-warn{border:1px solid #f1d3b8;background:#fdf3ea;color:#7a4a22;border-radius:7px;padding:10px 12px;font-size:11.5px;line-height:1.5;margin-bottom:14px}
.hc-ok{color:#2e6d5c;font-weight:600}.hc-ko{color:#a5402d;font-weight:600}
.hc-pick{border:1px solid #afcabd;background:#eaf2ee;color:var(--green);border-radius:4px;padding:5px 9px;font-size:10.5px}
.hc-pick:hover{background:#dcebe4}
.hc-note-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}.hc-note-btn{background:#e07b39;color:#fff;border:0;border-radius:5px;padding:11px 18px;font-size:12px;font-weight:600;cursor:pointer}.hc-note-btn:hover{background:#c96a2c}.hc-note-btn:disabled{background:#c9d3d6;cursor:not-allowed}#hc-note-hint{font-size:11px;color:#5b6d74}

/* Plans de calepinage des dalles alvéolées (page /dalles-plans, <body data-product="dalles">) : champs poutrelles masqués. */
body[data-product="dalles"] .plan-span-block .plan-form-grid:has(#zone-supportA),
body[data-product="dalles"] .plan-span-head span,
body[data-product="dalles"] label:has(#zone-mode),
body[data-product="dalles"] label:has(#zone-usage),
body[data-product="dalles"] .plan-choice-heading,
body[data-product="dalles"] .plan-choice-fields,
body[data-product="dalles"] details.plan-fields-section:has(#zone-roundCm),
body[data-product="dalles"] [data-opening-kind="negatives"],
body[data-product="dalles"] [data-opening-kind="balconies"],
body[data-product="dalles"] #plan-open-calculator,
body[data-product="dalles"] #plan-recalc-all,
body[data-product="dalles"] label:has(#project-fire-required),
body[data-product="dalles"] label:has(#project-fire-block),
body[data-product="dalles"] label:has(#project-fire-wall),
body[data-product="dalles"] label:has(#project-fire-finish),
body[data-product="dalles"] label:has(#project-seismic-zone),
body[data-product="dalles"] label:has(#project-seismic-category),
body[data-product="dalles"] label:has(#project-seismic-crawlspace),
body[data-product="dalles"] label:has(#project-stock-mode),
body[data-product="dalles"] label:has(#project-stock-restrict),
body[data-product="dalles"] section:has(> #supply-form), body[data-product="dalles"] details:has(#supply-form),
body[data-product="dalles"] #project-mentions { display: none !important; }
.slab-fields { border: 1px solid #d5e2da; border-radius: 6px; padding: 10px 12px; margin: 12px 0; }
.slab-fields legend { font-weight: 700; padding: 0 6px; color: #234f43; }
.slab-fields .plan-help { font-size: 11px; color: #5b6d74; margin: 8px 0 0; }

/* Calculateur de dalles : encadré « Résultat » (solution proposée et verdict du ferraillage choisi). */
.hc-verdict{padding:16px 18px;border-left:5px solid #e07b39}
.hc-verdict.pending{border-left-color:#c9d3d6}
.hc-verdict-head span{font-size:11px;font-weight:700;letter-spacing:.06em;color:#526f6a}
.hc-verdict-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;margin-top:10px}
.hc-verdict-main,.hc-verdict-best{border-radius:8px;padding:12px 14px;border:1px solid #d5e2da;background:#f8fbfa}
.hc-verdict-main small,.hc-verdict-best small{display:block;font-size:11px;color:#5b6d74;margin-bottom:4px}
.hc-verdict-main strong{display:block;font-size:22px;letter-spacing:.02em;margin-bottom:4px}
.hc-verdict-best strong{display:block;font-size:17px;color:#142c35;margin-bottom:4px}
.hc-verdict-main p,.hc-verdict-best p{margin:0 0 8px;font-size:12.5px;line-height:1.45;color:#3c5058}
.hc-verdict-main.ok{background:#e8f5ee;border-color:#9fd3b4}.hc-verdict-main.ok strong{color:#1e7b45}
.hc-verdict-main.ko{background:#fbeaea;border-color:#e5a5a0}.hc-verdict-main.ko strong{color:#c0392b}
.hc-verdict-best.ko{background:#fbeaea;border-color:#e5a5a0}
.hc-verdict-hint{margin:10px 0 0;font-size:12px;color:#5b6d74}

/* Calculateur de dalles : choix du mode (proposition idéale automatique / choix manuel). */
.hc-mode{grid-column:1/-1;border:1px solid #d5e2da;border-radius:8px;padding:10px 12px;background:#f8fbfa;margin-bottom:4px}
.hc-mode-title{display:block;font-size:11px;font-weight:700;letter-spacing:.05em;color:#526f6a;margin-bottom:6px;text-transform:uppercase}
.hc-mode-buttons{display:flex;gap:8px;flex-wrap:wrap}
.hc-mode-btn{flex:1 1 160px;padding:10px 12px;border:1px solid #c4d5cc;border-radius:6px;background:#fff;color:#234f43;font-size:13px;font-weight:600;cursor:pointer}
.hc-mode-btn.is-active{background:#e07b39;border-color:#e07b39;color:#fff}
.hc-mode .subnote{margin:6px 0 0}
#hc-type:disabled,#hc-variant:disabled{background:#eef4f6;color:#142c35;opacity:1;cursor:not-allowed}

/* Plans de calepinage dalles : largeur de chaque dalle, gaines et réservations. */
.slab-sub{margin-top:12px;border-top:1px dashed #d5e2da;padding-top:10px}
.slab-sub h4{margin:0 0 6px;font-size:12px;color:#234f43}.slab-sub h4 small{font-weight:400;color:#5b6d74}
#slab-bands{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:6px 10px}
.slab-band{display:flex;flex-direction:column;gap:3px;font-size:12px;padding:6px 8px;border-radius:6px;border:1px solid transparent}
.slab-band small{color:#5b6d74}.slab-band.is-forced{background:#fff4e8;border-color:#f0c9a5}.slab-band.is-picked{border-color:#e07b39;box-shadow:0 0 0 2px #f6d3b8}
.slab-item{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:flex-end;margin-bottom:8px;padding:8px;border:1px solid #d5e2da;border-radius:6px;font-size:12px;max-width:100%;box-sizing:border-box}.slab-item select{flex:1 1 120px;min-width:0}.slab-item label{flex:1 1 72px;min-width:0}.slab-item input{width:100%;min-width:0;box-sizing:border-box}.slab-item [data-slab-del]{flex:0 0 auto;color:#c0392b;font-size:15px;padding:4px 8px}
.slab-item label{display:flex;flex-direction:column;gap:2px}
.slab-item:has(select[data-k="type"] option[value="gaine"]:checked) .if-resa{display:none}
.slab-item:has(select[data-k="type"] option[value="resa"]:checked) .if-gaine{display:none}
.slab-sub-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}

/* Mode atelier plein écran des plans (plans-workspace.js) : haut = boutons et outils, gauche = niveaux, travées et
   paramétrage, centre = plan, bas = totaux, alertes, nomenclature et annexes (repliable). */
body.plan-ws-on{overflow:hidden}
#plan-ws{position:fixed;inset:0;z-index:900;display:grid;grid-template-columns:minmax(330px,390px) minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:"top top" "left main" "left bottom";background:#e9eeee}
#plan-ws .ws-top{grid-area:top;background:#142c35;padding:6px 10px;display:flex;flex-direction:column;gap:5px;box-shadow:0 2px 6px #0003}
#plan-ws .ws-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
#plan-ws .ws-top .panel{background:transparent;box-shadow:none;border:0;padding:0;margin:0}
#plan-ws .ws-top .plan-topbar{gap:6px;align-items:center}
#plan-ws .ws-top .plan-topbar>label:first-child{min-width:0;flex:0 1 auto;color:#cfe0db}
#plan-ws .ws-top .plan-preview-toolbar{padding:0;border:0;gap:8px;flex:1 1 auto;justify-content:flex-start}
#plan-ws .ws-top .plan-preview-toolbar .eyebrow,#plan-ws .ws-top .plan-preview-toolbar h2{display:none}
#plan-ws .ws-top label{color:#cfe0db}
#plan-ws .ws-top .plan-save-state{color:#9fc0b6;font-size:10px;margin:0}
#plan-ws .ws-top .plan-palette,#plan-ws .ws-top .plan-view-tools{margin:0;padding:3px 6px;background:#1f3d47;border-radius:6px}
#plan-ws .ws-left{grid-area:left;overflow:auto;background:#f6f9f8;border-right:1px solid #cfdcd7;padding:8px}
#plan-ws .ws-left .plan-inspector{padding:10px;box-shadow:none}
#plan-ws .ws-left .plan-form-grid,#plan-ws .ws-left .plan-choice-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
#plan-ws .ws-main{grid-area:main;position:relative;display:flex;flex-direction:column;min-height:0;overflow:hidden;align-self:stretch;margin:0;padding:0;max-width:none;width:auto}
#plan-ws .ws-main .plan-canvas{flex:1 1 0;max-height:none;min-height:0;height:auto;padding:10px}
#plan-ws .ws-main .plan-command{flex-shrink:0}
#plan-ws .ws-bottom{grid-area:bottom;position:relative;z-index:2;background:#fff;border-top:2px solid #e07b39;max-height:24vh;display:flex;flex-direction:column;min-height:0}
#plan-ws .ws-bottom-toggle{flex-shrink:0;text-align:left;border:0;background:#f1f5f4;padding:6px 12px;font-weight:700;font-size:12px;color:#234f43;cursor:pointer}
#plan-ws .ws-bottom-body{overflow:auto;padding:8px 12px;display:flex;flex-direction:column;gap:10px}
#plan-ws.ws-bottom-closed .ws-bottom-body{display:none}
#plan-ws .ws-bottom-body .plan-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
#plan-ws-toggle{white-space:nowrap}
/* Plein écran : la zone de dessin seule (sans cartouche ni panneau de droite) remplit tout l'espace central. */
#plan-ws .ws-main .plan-canvas{padding:0;overflow:hidden;background:#fff}
#plan-ws .ws-main .plan-sheet{width:100%!important;height:100%;box-shadow:none;margin:0}
#plan-ws .ws-main .plan-sheet svg{width:100%;height:100%;overflow:hidden}

/* Charges partielles et ponctuelles des dalles (calculateur) */
.hc-extra { margin-top: 10px; }
.hc-extra-table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 13px; }
.hc-extra-table th { text-align: left; font-weight: 600; color: #5b6d74; padding: 2px 4px; }
.hc-extra-table td { padding: 2px 4px; }
.hc-extra-table input, .hc-extra-table select { width: 100%; min-width: 0; padding: 5px 6px; border: 1px solid #cfd8db; border-radius: 6px; font: inherit; background: #fff; }
.hc-extra-table input:disabled { background: #f1f4f5; }
.hc-extra-table td:first-child { width: 30%; }
.hc-extra-table td:nth-child(2), .hc-extra-table td:nth-child(3) { width: 18%; }
.hc-extra-table input { font-size: 13px; padding: 5px 4px; }
.hc-extra-del { border: 0; background: none; color: #c0392b; font-size: 15px; cursor: pointer; padding: 2px 6px; }
.hc-extra-add { border: 1px dashed #9fb2b8; background: #fff; color: #233d48; border-radius: 8px; padding: 6px 12px; cursor: pointer; font: inherit; }
.hc-extra-add:hover { border-color: #e07b39; color: #e07b39; }
