  @import url('/api/fonts/css?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

  :root{
    --bg: #121212;
    --surface: #1A1A1A;
    --surface-2: #232323;
    --surface-3: #2D2D2D;
    --border: #3A3A3A;
    --text: #EDEDED;
    --text-dim: #A3A3A3;
    --text-faint: #737373;
    --teal: #2FD9C4;
    --amber: #F0A63B;
    --red: #E5555A;
    --on-accent: #0B1410;
    --grid-line: rgba(255,255,255,0.025);
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --sidebar-w: 220px;
  }

  :root[data-theme="light"]{
    --bg: #F4F5F7;
    --surface: #FFFFFF;
    --surface-2: #F0F1F4;
    --surface-3: #E7E9ED;
    --border: #DCDFE4;
    --text: #1B2029;
    --text-dim: #5B6472;
    --text-faint: #93A0AF;
    --teal: #0E9C89;
    --amber: #B8720F;
    --red: #C93B44;
    --on-accent: #FFFFFF;
    --grid-line: rgba(0,0,0,0.035);
  }

  * , *::before, *::after{ transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
  *{ box-sizing:border-box; margin:0; padding:0; }
  /* `text-size-adjust` (2026-09-09) : sans ça, iOS/Android grossissent
     arbitrairement certains blocs de texte en orientation paysage, ce qui
     casse une mise en page pourtant déjà fluide. */
  html,body{ height:100%; -webkit-text-size-adjust:100%; text-size-adjust:100%; }
  body{ background: var(--bg); color: var(--text); font-family: var(--font-body); min-height: 100vh; min-height: 100dvh; }
  button{ font-family: inherit; }
  ::-webkit-scrollbar{ width:8px; height:8px; }
  ::-webkit-scrollbar-thumb{ background: var(--border); border-radius: 4px; }

  .faint-grid{
    position:fixed; inset:0; pointer-events:none; z-index:0;
    background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
                       linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 32px 32px;
  }

  /* ---------- METER (signature element) ---------- */
  .meter{ display:flex; align-items:flex-end; gap: 4px; height: 64px; }
  .meter.small{ height: 22px; gap: 3px; }
  .meter .bar{
    width: 5px; border-radius: 2px 2px 0 0;
    background: linear-gradient(to top, var(--teal), var(--amber) 70%, var(--red) 92%);
    height: 10%; animation: meterIdle 2.6s ease-in-out infinite; opacity: 0.85;
  }
  .meter.small .bar{ width: 3px; }
  .meter .bar:nth-child(1){ animation-delay: -0.1s; }
  .meter .bar:nth-child(2){ animation-delay: -0.7s; }
  .meter .bar:nth-child(3){ animation-delay: -1.3s; }
  .meter .bar:nth-child(4){ animation-delay: -0.4s; }
  .meter .bar:nth-child(5){ animation-delay: -1.9s; }
  .meter .bar:nth-child(6){ animation-delay: -0.9s; }
  .meter .bar:nth-child(7){ animation-delay: -1.5s; }
  .meter.busy .bar{ animation-name: meterBusy; animation-duration: 0.9s; }
  @keyframes meterIdle{ 0%,100%{ height: 8%; } 50%{ height: 38%; } }
  @keyframes meterBusy{ 0%,100%{ height: 15%; } 50%{ height: 95%; } }
  @media (prefers-reduced-motion: reduce){ .meter .bar{ animation: none; height: 30%; } }

  /* ---------- LOGIN SCREEN ---------- */
  #screen-login, #screen-invite, #screen-reset, #screen-register, #screen-verify, #screen-username{ position:relative; z-index:1; min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px; }
  #screen-login .inner, #screen-invite .inner, #screen-reset .inner, #screen-register .inner, #screen-verify .inner, #screen-username .inner{ width:100%; max-width:380px; }

  /* ---------- LIEN DE PARTAGE PUBLIC (lecture seule, sans compte) ----------
     Contrairement à #screen-login/#screen-invite/#screen-reset (formulaire
     étroit centré), ce contenu est un canevas Électrique/Plan qui a besoin
     de toute la largeur — pas de `.inner` étroit ici. */
  /* Habillage refait le 2026-10-18 : c'est la vitrine du site pour les visiteurs sans
     compte (shared-viewer.js) — logo, document, « Découvrir Holbox », pied de page. */
  .link-view-screen{ min-height:100vh; display:flex; flex-direction:column; }
  .link-view-header{ position:sticky; top:0; z-index:30; display:flex; align-items:center; gap:18px; padding:14px 24px; border-bottom:1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
  .lv-brand{ flex:0 0 auto; display:flex; align-items:center; text-decoration:none; padding-right:18px; border-right:1px solid var(--border); align-self:stretch; }
  .lv-brand-img{ height:30px; width:auto; max-width:150px; object-fit:contain; display:block; }
  .lv-brand-text{ font-family: var(--font-display); font-weight:700; font-size:17px; letter-spacing:.01em; color: var(--text); }
  .lv-titles{ flex:1 1 auto; min-width:0; }
  .lv-crumb{ display:flex; align-items:center; gap:6px; font-size:12px; color: var(--text-dim); min-height:16px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .lv-crumb-icon{ display:inline-flex; color: var(--teal); }
  .lv-crumb-icon svg{ width:14px; height:14px; }
  .lv-crumb-sep{ color: var(--text-faint); }
  .lv-title-row{ display:flex; align-items:center; gap:10px; min-width:0; margin-top:2px; }
  .lv-project-logo{ height:26px; width:auto; max-width:90px; object-fit:contain; border-radius:5px; }
  .link-view-title{ font-family: var(--font-display); font-weight:700; font-size:20px; line-height:1.2; margin:0; color: var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .link-view-sub{ font-size:12px; color: var(--text-faint); margin-top:3px; }
  .lv-actions{ flex:0 0 auto; display:flex; align-items:center; gap:10px; }
  .lv-readonly{ display:inline-flex; align-items:center; gap:6px; font-size:12px; color: var(--text-dim); padding:5px 10px; border:1px solid var(--border); border-radius:999px; background: var(--surface); }
  .lv-cta{ text-decoration:none; white-space:nowrap; }
  .link-view-body{ flex:1; min-height:0; display:flex; flex-direction:column; padding:18px 24px; }
  .lv-foot{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:12px 24px; border-top:1px solid var(--border); font-size:12px; color: var(--text-faint); }
  .lv-foot a{ color: var(--text-dim); text-decoration:none; }
  .lv-foot a:hover{ color: var(--teal); }
  .lv-foot-pitch a{ font-weight:600; color: var(--text); }
  .lv-foot-legal{ display:flex; gap:14px; }
  /* liste des documents d'un projet partagé en entier */
  .lv-doc-grid .doc-card:focus-visible{ outline:2px solid var(--teal); outline-offset:2px; }
  .lv-doc-grid .doc-card:hover{ border-color: var(--teal); }
  .lv-doc-grid .doc-card-icon{ color: var(--teal); }
  .lv-doc-kind{ font-size:11px; color: var(--text-faint); }
  .lv-doc-bar{ display:flex; align-items:center; gap:12px; margin-bottom:14px; min-width:0; }
  .lv-doc-bar .btn{ flex:0 0 auto; }
  .lv-doc-bar-name{ display:flex; align-items:baseline; gap:8px; min-width:0; font-family: var(--font-display); font-weight:600; font-size:15px; color: var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .lv-doc-bar-name small{ font-family: var(--font-body); font-weight:400; font-size:12px; color: var(--text-faint); }
  .lv-doc-bar-icon{ align-self:center; display:inline-flex; color: var(--teal); }
  .lv-doc-body{ flex:1; min-height:0; display:flex; flex-direction:column; }
  /* lien « toutes les versions » d'un rapport : choix de la version */
  .lv-version-bar{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:14px; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background: var(--surface); }
  .lv-version-bar label{ font-size:12.5px; color: var(--text-dim); }
  .lv-version-bar select{ width:auto; min-width:240px; max-width:100%; }
  .lv-version-note{ font-size:12px; color: var(--text-faint); }
  /* fenêtre Partager d'un rapport : ce que voit la personne */
  .field.share-report-what label.share-radio{ display:flex; align-items:center; gap:8px; flex-wrap:nowrap; font-family: var(--font-body); font-size:13px; letter-spacing:normal; text-transform:none; color: var(--text); margin:7px 0; cursor:pointer; }
  .field.share-report-what .share-radio input[type="radio"]{ width:auto; flex:0 0 auto; margin:0; padding:0; accent-color: var(--teal); }
  .field.share-report-what .share-radio select{ width:auto; min-width:0; flex:0 1 auto; max-width:62%; padding:4px 8px; font-size:12.5px; }
  /* lien révoqué / introuvable */
  .lv-gone{ margin:8vh auto; max-width:440px; text-align:center; padding:32px 28px; border:1px solid var(--border); border-radius:14px; background: var(--surface); }
  .lv-gone-icon{ width:52px; height:52px; margin:0 auto 14px; border-radius:50%; display:grid; place-items:center; color: var(--text-dim); background: var(--surface-3); }
  .lv-gone h2{ font-family: var(--font-display); font-size:18px; margin:0 0 8px; color: var(--text); }
  .lv-gone p{ font-size:13px; color: var(--text-dim); margin:0 0 18px; line-height:1.5; }
  .lv-gone .btn{ text-decoration:none; display:inline-flex; }
  @media (max-width: 900px){
    .link-view-header{ flex-wrap:wrap; gap:10px 12px; padding:12px 16px; }
    .lv-brand{ border-right:0; padding-right:0; }
    .lv-titles{ order:3; flex-basis:100%; }
    .lv-actions{ margin-left:auto; }
    .lv-readonly span{ display:none; }
    .lv-cta{ padding:7px 12px; font-size:12.5px; }
    .link-view-title{ font-size:18px; white-space:normal; }
    .link-view-body{ padding:14px 16px; }
    .lv-foot{ padding:12px 16px; }
  }
  .forgot-pw-link{ display:block; width:100%; text-align:center; background:none; border:none; color: var(--text-faint); font-family: var(--mono); font-size:11.5px; cursor:pointer; margin-top:14px; padding:4px; }
  .forgot-pw-link:hover{ color: var(--teal); }
  .forgot-pw-form{ margin-top:14px; padding-top:14px; border-top:1px solid var(--border); }
  .forgot-pw-message{ font-family: var(--mono); font-size:12px; color: var(--text-dim); margin-top:10px; }
  .eyebrow{ font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--text-faint); text-transform: uppercase; margin-bottom: 10px; }
  .login-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 28px; }
  .login-title{ font-family: var(--font-display); font-weight: 700; font-size: 26px; letter-spacing: -0.01em; }
  .login-title span{ color: var(--teal); }
  .card{ background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 28px; }
  .field{ margin-bottom: 16px; }
  .field label{ display:block; font-family: var(--mono); font-size: 11px; color: var(--text-dim); letter-spacing: 0.05em; margin-bottom: 6px; text-transform: uppercase; }
  .field input{ width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 11px 12px; color: var(--text); font-family: var(--mono); font-size: 14px; outline: none; transition: border-color .15s ease; }
  .pw-wrap{ position:relative; }
  .pw-wrap input{ padding-right:40px; }
  .pw-toggle-btn{ position:absolute; right:6px; top:50%; transform:translateY(-50%); background:none; border:none; color: var(--text-faint); cursor:pointer; padding:6px; display:flex; border-radius:5px; }
  .pw-toggle-btn:hover{ color: var(--text); }
  .field input:focus{ border-color: var(--teal); }
  button.primary{ width: 100%; background: var(--teal); color: var(--on-accent); border: none; border-radius: 6px; padding: 12px; font-family: var(--font-display); font-weight: 600; font-size: 14px; cursor: pointer; margin-top: 6px; transition: filter .15s ease; }
  button.primary:hover{ filter: brightness(1.08); }
  button.primary:focus-visible{ outline: 2px solid var(--teal); outline-offset: 2px; }
  .login-error{ font-family: var(--mono); font-size: 12px; color: var(--red); margin-top: 12px; display:none; }
  .login-error.show{ display:block; }
  .login-note{ font-family: var(--mono); font-size: 11px; color: var(--text-faint); margin-top: 18px; line-height: 1.6; }
  /* En bas de la VRAIE page (#screen-login/#screen-landing sont tous deux
     position:relative + flex centré — voir plus haut), pas juste sous la
     carte de connexion (2026-08-25, retour utilisateur explicite : "il
     n'est pas tout en bas de la page de connexion mais sous le module de
     connexion, c'est différent" — et affiché aussi sur la page d'accueil). */
  .login-footer-line{ position:absolute; left:0; right:0; bottom:22px; font-family: var(--mono); font-size: 11px; color: var(--text-faint); text-align:center; z-index:1; }
  /* Pages légales (2026-10-17) : accueil, connexion, Mon compte */
  .legal-links{ display:flex; flex-wrap:wrap; justify-content:center; gap:4px 16px; margin-top:18px; font-family: var(--mono); font-size: 11px; }
  .legal-links a, .acc-legal a{ color: var(--text-faint); text-decoration: underline; text-underline-offset: 2px; }
  .legal-links a:hover, .acc-legal a:hover{ color: var(--text); }
  /* accueil : tout en bas, sous la ligne « Powered by » remontée d'un cran */
  .legal-links.legal-bottom{ position:absolute; left:0; right:0; bottom:14px; margin:0; padding:0 16px; z-index:1; }
  /* portail fabricants (2026-10-27) : premier lien du bas de l'accueil public, en couleur */
  .legal-links a.mfr-link{ color: var(--teal); }
  #screen-landing .login-footer-line{ bottom:38px; }

  .pw-rule{ font-family: var(--mono); font-size: 11px; color: var(--text-faint); margin-top: 6px; line-height: 1.5; }
  #invite-form > .pw-rule{ margin: 0 0 12px; }
  .register-next{ margin: 0 0 12px; }
  /* Mon compte › Abonnement (2026-10-18) */
  .bill-panel{ max-width: 760px; }
  .bill-plans{ display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap:12px; margin-top:12px; }
  .bill-plan{ border:1px solid var(--border); border-radius:10px; padding:14px; display:flex; flex-direction:column; gap:6px; }
  .bill-plan-name{ font-family: var(--font-display); font-weight:700; font-size:15px; }
  .bill-plan-price{ font-family: var(--font-display); font-size:24px; font-weight:700; }
  .bill-plan-price small{ font-size:12px; font-weight:500; color: var(--text-dim); }
  .bill-plan-sub{ font-size:12px; color: var(--text-dim); min-height:32px; }
  .bill-plan .btn{ margin-top:auto; justify-content:center; }
  .bill-plan .btn:disabled{ opacity:.45; cursor:not-allowed; filter:none; }

  /* Modules fermés par un admin (Maintenance, Modules) : closed-modules.js */
  .module-closed{ opacity:.55; }
  .sb-item.module-closed::after, .sb-item.module-closed-admin::after,
  .menubar-option.module-closed::after, .menubar-option.module-closed-admin::after{ content: attr(data-closed-label); margin-left:auto; font-size:10px; font-family: var(--mono); padding:1px 6px; border-radius:999px; border:1px solid var(--red); color: var(--red); white-space:nowrap; }
  .sb-item.module-closed-admin::after, .menubar-option.module-closed-admin::after{ border-color: var(--border); color: var(--text-dim); }
  .sidebar.collapsed .sb-item.module-closed::after, .sidebar.collapsed .sb-item.module-closed-admin::after{ display:none; }
  .module-closed-badge{ display:inline-block; margin-top:6px; font-size:10.5px; font-family: var(--mono); padding:1px 7px; border-radius:999px; border:1px solid var(--red); color: var(--red); }
  .doc-card:not(.module-closed) .module-closed-badge{ border-color: var(--border); color: var(--text-dim); }
  .closed-module-banner{ position:fixed; top:12px; left:50%; transform:translateX(-50%); z-index:320; display:none; align-items:center; gap:12px; max-width:min(720px, calc(100vw - 32px)); padding:10px 14px; border-radius:10px; background: var(--surface-3); border:1px solid var(--red); color: var(--text); font-size:13px; box-shadow:0 10px 30px rgba(0,0,0,.35); }
  .closed-module-banner.show{ display:flex; }
  .closed-module-banner button{ background:none; border:0; color: var(--text-dim); font-size:18px; line-height:1; cursor:pointer; }
  .closed-mods-list{ display:flex; flex-direction:column; gap:6px; }
  .closed-mods-row{ display:grid; grid-template-columns: 230px 1fr auto; gap:10px; align-items:center; }
  .closed-mods-row .af-input{ padding:6px 10px; }
  .closed-mods-row:not(.is-closed) [data-cm-reason]{ opacity:.5; }
  .closed-mods-name{ display:flex; align-items:center; gap:8px; cursor:pointer; font-size:13px; }
  .closed-mods-row.is-closed .closed-mods-name{ color: var(--red); font-weight:600; }
  .closed-mods-since{ font-size:11px; color: var(--text-faint); font-family: var(--mono); white-space:nowrap; }
  .closed-mods-mail{ margin-top:14px; padding-top:14px; border-top:1px solid var(--border); }
  .closed-mods-en summary{ cursor:pointer; font-size:12.5px; color: var(--text-dim); }
  @media (max-width: 900px){ .closed-mods-row{ grid-template-columns: 1fr; } }
  .bill-tab{ border-collapse:collapse; margin:4px 0 12px; font-size:13px; }
  .bill-tab td{ padding:4px 16px 4px 0; }
  .bill-tab td:first-child{ color: var(--text-dim); }
  .bill-warn{ margin:10px 0; padding:10px 12px; border:1px solid var(--red); border-radius:8px; font-size:13px; line-height:1.5; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
  .bill-ok{ margin-top:12px; color: var(--teal); font-size:13px; }
  .verify-msg{ margin: 0 0 14px; line-height: 1.55; }
  /* Sans accès (abonnement, 2026-10-18) : ni outils ni bibliothèque dans la barre latérale */
  #screen-app.no-access #sb-secondary-toggle, #screen-app.no-access #sb-nav-secondary{ display:none !important; }
  /* fenêtre Fabrics de l'application des fabricants (main.js initFabricsOnly) : Fabrics + Bibliothèque */
  #screen-app.fabrics-only #sb-nav-secondary .sb-item:not([data-view="bibliotheque"]), #screen-app.fabrics-only #sb-user-btn{ display:none !important; }
  /* Lecture des CGU jusqu'au bout (terms-reader.js) : au-dessus de tout, écrans de connexion compris */
  #terms-reader-overlay{ z-index: 400; padding: 16px; }
  .modal.terms-reader{ max-width: 720px; display:flex; flex-direction:column; max-height: calc(100vh - 32px); }
  .terms-reader-body{ flex: 1 1 auto; min-height: 160px; max-height: 60vh; overflow-y: auto; padding: 4px 14px 4px 2px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }
  .terms-reader-body h2{ font-family: var(--font-display); font-size: 15px; color: var(--text); margin: 18px 0 6px; }
  .terms-reader-body p{ margin: 0 0 10px; }
  .terms-reader-body ul{ margin: 0 0 10px; padding-left: 20px; }
  .terms-reader-body li{ margin: 3px 0; }
  .terms-reader-body strong{ color: var(--text); }
  .terms-reader-body a{ color: var(--teal); }
  .terms-reader-body .updated, .terms-reader-body .note{ font-size: 12px; color: var(--text-faint); margin-top: 10px; }
  .terms-reader-body .box{ background: var(--surface-2, rgba(255,255,255,.03)); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
  .terms-reader-body .todo{ background: rgba(255,176,46,.16); color: #ffb02e; border-radius: 4px; padding: 0 4px; font-weight: 600; }
  .terms-reader-hint{ font-family: var(--mono); font-size: 11px; color: var(--teal); margin-top: 10px; }
  .terms-reader-privacy{ font-size: 12px; color: var(--text-faint); margin-top: 6px; }
  .terms-reader-privacy a{ color: var(--text-dim); }
  .terms-reader .modal-actions .btn[disabled]{ opacity: .45; cursor: not-allowed; filter: none; }
  .acc-danger{ margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
  .acc-danger h4{ color: var(--red); }
  .acc-legal{ display:flex; flex-wrap:wrap; gap:6px 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; }

  /* ---------- LANDING SCREEN (page d'accueil publique) ---------- */
  #screen-landing{ position:relative; z-index:1; min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px 24px 72px; overflow:hidden; background: var(--bg); }
  .landing-bg{ position:absolute; inset:0; background-size:cover; background-position:center; z-index:0; overflow:hidden; }
  .landing-bg video{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
  .landing-bg::after{ content:''; position:absolute; inset:0; background: linear-gradient(180deg, rgba(10,10,10,0.55), rgba(10,10,10,0.75)); }
  :root[data-theme="light"] .landing-bg::after{ background: linear-gradient(180deg, rgba(244,245,247,0.7), rgba(244,245,247,0.88)); }
  .landing-content{ position:relative; z-index:1; max-width:560px; text-align:center; display:flex; flex-direction:column; align-items:center; }
  .landing-logo{ max-width:220px; max-height:72px; object-fit:contain; margin-bottom:10px; }
  .landing-title{ font-family: var(--font-display); font-weight:700; font-size:clamp(32px,5vw,48px); letter-spacing:-0.01em; margin:6px 0 14px; text-wrap:balance; }
  .landing-subtitle{ font-family: var(--font-body); font-size:16px; color: var(--text-dim); margin:0 0 10px; line-height:1.5; }
  .landing-body{ font-family: var(--font-body); font-size:13.5px; color: var(--text-faint); margin:0 0 30px; line-height:1.6; max-width:440px; }
  .landing-actions{ display:flex; gap:12px; flex-wrap:wrap; justify-content:center; width:100%; max-width:340px; }
  .landing-actions button{ flex:1; min-width:140px; }
  .landing-actions button.primary{ margin-top:0; }
  .landing-subscribe-btn{ background: transparent; color: var(--text); border:1px solid var(--border); border-radius:6px; padding:12px; font-family: var(--font-display); font-weight:600; font-size:14px; cursor:pointer; transition: border-color .15s ease, color .15s ease; }
  .landing-subscribe-btn:hover{ border-color: var(--text-dim); }

  /* ---------- APP SHELL ---------- */
  #screen-app{ display:none; position:relative; z-index:1; height:100vh; height:100dvh; overflow:hidden; }
  .shell{ display:flex; height:100%; }

  .sidebar{ width: var(--sidebar-w); flex-shrink:0; background: var(--surface); border-right: 1px solid var(--border); display:flex; flex-direction:column; transition: width .18s ease; overflow:hidden; }
  .sidebar.collapsed{ width: 64px; }
  .sb-top{ display:flex; align-items:center; justify-content:space-between; padding: 18px 16px; border-bottom: 1px solid var(--border); }
  .sb-brand{ display:flex; align-items:center; gap:8px; overflow:hidden; white-space:nowrap; }
  .sb-brand-mark{ width:22px; height:22px; flex-shrink:0; border-radius:5px; background: linear-gradient(135deg, var(--teal), var(--amber)); }
  .sb-brand-text{ font-family: var(--font-display); font-weight:700; font-size:15px; }
  .sb-brand-logo-img{ max-height:26px; max-width:160px; object-fit:contain; }
  .sb-toggle{ background:none; border:1px solid var(--border); border-radius:6px; width:26px; height:26px; flex-shrink:0; color: var(--text-dim); cursor:pointer; display:flex; align-items:center; justify-content:center; }
  .sb-toggle:hover{ color: var(--text); border-color: var(--text-dim); }
  .sb-toggle svg{ transition: transform .18s ease; }
  .sidebar.collapsed .sb-toggle svg{ transform: rotate(180deg); }
  /* Barre réduite : le favicon du site remplace le logo entier coupé et rouvre le menu au
     clic (branding.js, sidebar.js), sans flèche ; sans favicon, la flèche seule. */
  .sb-brand-compact{ display:none; width:26px; height:26px; object-fit:contain; border-radius:6px; flex-shrink:0; cursor:pointer; }
  .sb-brand-compact:hover{ opacity:.85; }
  .sb-brand-compact:focus-visible{ outline:2px solid var(--teal); outline-offset:2px; }
  .sidebar.collapsed .sb-top{ justify-content:center; padding:18px 0; }
  .sidebar.collapsed .sb-top.sb-top-compact .sb-toggle{ display:none; }
  .sidebar.collapsed .sb-brand{ display:none; }
  .sidebar.collapsed .sb-brand.has-compact{ display:flex; }
  .sidebar.collapsed .sb-brand.has-compact > :not(.sb-brand-compact){ display:none; }
  .sidebar.collapsed .sb-brand-compact{ display:block; }

  .sb-nav{ list-style:none; padding: 12px 10px; flex:1; }
  /* Retour utilisateur explicite (2026-08-25) : un projet avec beaucoup de
     documents étirait #sb-nav-primary au-delà de la hauteur de la sidebar
     (flex-item sans min-height:0 refuse de rétrécir sous sa hauteur de
     contenu par défaut) — poussant .sb-bottom hors du cadre, coupé net par
     overflow:hidden sur .sidebar. Ce seul nav défile désormais en interne,
     jamais .sb-nav-secondary (toujours courte, jamais concernée). */
  #sb-nav-primary{ min-height:0; overflow-y:auto; }
  .sb-item{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:8px; cursor:pointer; color: var(--text-dim); margin-bottom:2px; white-space:nowrap; overflow:hidden; }
  .sb-item svg{ flex-shrink:0; }
  .sb-item:hover{ background: var(--surface-2); color: var(--text); }
  .sb-item.active{ background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--teal); }
  .sb-item-label{ font-size:13px; font-weight:500; overflow:hidden; text-overflow:ellipsis; }
  .sidebar.collapsed .sb-item-label{ display:none; }
  .sidebar.collapsed .sb-item{ justify-content:center; }
  .sb-project-mark{ width:22px; height:22px; flex-shrink:0; border-radius:6px; background: linear-gradient(135deg, var(--teal), var(--amber)); display:flex; align-items:center; justify-content:center; font-family: var(--font-display); font-weight:700; font-size:11px; color:#0a0a0a; }
  .sb-project-mark-logo{ object-fit:contain; background:var(--surface-2); }
  .sb-nav-divider{ height:1px; background: var(--border); margin:8px 4px 10px; list-style:none; }
  .sb-doc-item{ padding-left:10px; }
  .sb-doc-icon{ width:18px; height:18px; flex-shrink:0; display:flex; align-items:center; justify-content:center; color: var(--text-faint); }
  .sb-doc-item:hover .sb-doc-icon, .sb-doc-item.active .sb-doc-icon{ color: var(--teal); }

  .sb-bottom{ padding: 14px 16px; border-top: 1px solid var(--border); }
  .sb-nav-secondary{ padding: 0 0 12px 0; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
  /* Menu « Outils » repliable (2026-09-26) */
  .sb-group-toggle{ width:100%; display:flex; align-items:center; gap:12px; padding:8px 12px; margin:0 0 4px; background:none; border:none; border-radius:8px; color: var(--text-faint); cursor:pointer; font-family: var(--font-body); text-align:left; white-space:nowrap; overflow:hidden; }
  .sb-group-toggle:hover{ background: var(--surface-2); color: var(--text); }
  .sb-group-toggle svg{ flex-shrink:0; }
  .sb-group-toggle .sb-item-label{ flex:1; font-size:11px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
  .sb-group-chevron{ transition: transform .18s ease; }
  .sidebar.sb-tools-folded .sb-group-chevron{ transform: rotate(-90deg); }
  .sidebar.sb-tools-folded .sb-nav-secondary{ display:none; }
  .sidebar.sb-tools-folded .sb-group-toggle{ margin-bottom:12px; border-bottom:1px solid var(--border); border-radius:8px 8px 0 0; padding-bottom:12px; }
  .sidebar.collapsed .sb-group-toggle{ justify-content:center; }
  .sidebar.collapsed .sb-group-toggle .sb-group-chevron{ display:none; }

  /* Page Applications (2026-09-26) */
  .app-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap:14px; margin-top:6px; }
  .app-card{ background: var(--surface); border:1px solid var(--border); border-radius:12px; padding:16px; display:flex; flex-direction:column; gap:10px; }
  .app-head{ display:flex; align-items:center; gap:12px; }
  .app-icon{ width:48px; height:48px; flex-shrink:0; border-radius:12px; background: var(--surface-2); display:flex; align-items:center; justify-content:center; overflow:hidden; color: var(--teal); }
  .app-icon img{ width:100%; height:100%; object-fit:contain; }
  .app-name{ font-family: var(--font-display); font-size:17px; font-weight:700; color: var(--text); }
  .app-version{ font-family: var(--mono); font-size:11px; color: var(--text-faint); margin-top:2px; }
  .app-desc{ font-size:13px; line-height:1.45; color: var(--text-dim); }
  .app-dls{ display:flex; gap:8px; flex-wrap:wrap; margin-top:auto; }
  /* « + d'infos » : page de présentation publique du logiciel (2026-10-17) */
  .app-more{ margin-left:auto; align-self:flex-start; padding:5px 10px; border-radius:7px; border:1px solid var(--border); color: var(--text-dim); font-size:12px; font-weight:600; text-decoration:none; white-space:nowrap; }
  .app-more:hover{ color: var(--text); border-color: var(--teal); }
  .app-dl{ display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border-radius:8px; background: var(--teal); color: var(--on-accent); font-size:12.5px; font-weight:600; text-decoration:none; }
  .app-dl small{ font-weight:500; opacity:.75; font-family: var(--mono); font-size:10.5px; }
  .app-dl:hover{ filter: brightness(1.08); }
  .app-dl-off{ background: var(--surface-2); color: var(--text-faint); cursor:default; font-weight:500; }
  .app-lic{ font-size:11.5px; color: var(--text-faint); border-top:1px solid var(--border); padding-top:8px; }
  .app-note{ margin:14px 0; font-size:12.5px; line-height:1.5; color: var(--text-dim); background: var(--surface-2); border-radius:8px; padding:10px 12px; }
  .app-note-warn{ color: var(--amber); }
  .app-activate{ margin-top:6px; }
  .app-activate-head{ display:flex; align-items:center; gap:10px; margin-bottom:6px; }
  .app-activate-title{ font-family: var(--font-display); font-size:15px; font-weight:700; color: var(--text); }
  .app-soon{ font-size:11px; font-weight:600; color: var(--amber); border:1px solid var(--amber); border-radius:999px; padding:2px 8px; }
  .app-activate-row{ display:flex; gap:8px; align-items:center; margin-top:10px; }
  .app-activate .btn:disabled, .app-activate .af-input:disabled{ opacity:.45; cursor:not-allowed; }
  .app-activate-row{ flex-wrap:wrap; }
  .app-code-msg{ font-size:12.5px; color: var(--text-dim); }
  .app-code-msg.ok{ color: var(--text); font-weight:600; }
  .app-code-msg.err{ color: var(--red); }
  .app-devices-head{ margin-top:16px; font-size:12px; font-weight:700; color: var(--text-dim); text-transform:uppercase; letter-spacing:.6px; }
  .app-devices-head span{ font-family: var(--mono); font-weight:500; color: var(--text-faint); margin-left:4px; }
  .app-devices{ display:flex; flex-direction:column; gap:6px; margin-top:8px; }
  .app-device{ display:flex; align-items:center; gap:10px; background: var(--surface-2); border-radius:8px; padding:8px 10px; }
  .app-device-main{ flex:1; min-width:0; }
  .app-device-name{ font-size:13px; font-weight:600; color: var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .app-device-name small{ font-weight:500; color: var(--text-faint); margin-left:6px; }
  .app-device-sub{ font-size:11.5px; color: var(--text-faint); margin-top:2px; }
  .sb-user{ display:flex; align-items:center; gap:10px; margin-bottom:10px; overflow:hidden; white-space:nowrap; width:100%; background:none; border:1px solid transparent; border-radius:6px; padding:4px 6px; margin-left:-6px; cursor:pointer; text-align:left; }
  .sb-user:hover{ border-color: var(--border); background: var(--surface-2); }
  .sb-avatar{ width:26px; height:26px; border-radius:50%; background: var(--surface-3); display:flex; align-items:center; justify-content:center; font-family:var(--mono); font-size:11px; color: var(--teal); flex-shrink:0; }
  .sb-avatar.has-img{ overflow:hidden; background:none; }
  .sb-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
  /* Mon compte (2026-10-03) : blocs en colonnes sur grand écran, empilés sur téléphone */
  .acc-grid{ columns:380px; column-gap:20px; max-width:1480px; }
  .acc-grid .lib-mod-panel{ max-width:none !important; margin:0 0 20px !important; min-width:0; break-inside:avoid; }
  /* Bloc Entreprise : au-dessus des colonnes (un column-span coupait les colonnes et mangeait l'espacement) */
  #my-account-company-container .acc-wide{ max-width:1480px !important; }
  /* Portail fabricants (2026-10-27, manufacturer.js) : Mon compte › Fabricant et Panneau admin › Fabricants */
  #my-account-manufacturer-container .mfr-panel{ max-width:960px; scroll-margin-top:16px; }
  .mfr-panel h4{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
  .mfr-panel .lib-note{ margin:0 0 10px; }
  .mfr-section{ font-family: var(--font-display); font-weight:600; font-size:13.5px; color: var(--text); margin:18px 0 4px; padding-top:12px; border-top:1px solid var(--border); }
  .mfr-grid{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:0 16px; }
  .mfr-grid .mfr-full{ grid-column:1 / -1; }
  .mfr-grid .af-label{ display:block; }
  .mfr-inline{ display:flex; gap:8px; }
  .mfr-inline .af-input{ flex:1; min-width:0; }
  .mfr-actions{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
  .mfr-check{ font-size:12.5px; line-height:1.45; margin-top:8px; padding:7px 10px; border-radius:6px; border:1px solid var(--border); background: var(--surface-2); color: var(--text-dim); overflow-wrap:anywhere; }
  /* vert fixe : l'accent du site (--teal, réglable dans Apparence) peut être orange ou rouge */
  .mfr-check.ok{ border-color: #2E9E57; color: var(--text); }
  .mfr-check.ok .mfr-ok-mark{ color: #2E9E57; font-weight:700; }
  .mfr-check.ko{ border-color: var(--red); color: var(--red); }
  .mfr-check.wait{ border-color: var(--amber); }
  .mfr-check-src{ display:block; font-family: var(--mono); font-size:10.5px; color: var(--text-faint); margin-top:2px; }
  .mfr-badge{ border:1px solid var(--border); background: var(--surface-2); color: var(--text-dim); }
  .mfr-folder-ico{ vertical-align:-3px; color: var(--text-dim); flex-shrink:0; }
  .mfr-badge.wait{ border-color: var(--amber); color: var(--amber); }
  .mfr-badge.info{ border-color: var(--amber); color: var(--amber); }
  .mfr-badge.ok{ border-color: #2E9E57; color: #2E9E57; }
  .mfr-badge.ko{ border-color: var(--red); color: var(--red); }
  .mfr-admin-msg{ border-left:3px solid var(--amber); background: var(--surface-2); padding:8px 12px; border-radius:0 6px 6px 0; margin:0 0 12px; font-size:13px; white-space:pre-wrap; overflow-wrap:anywhere; }
  .mfr-admin-msg .af-label{ margin-top:0; }
  .mfr-terms{ display:flex; gap:8px; align-items:flex-start; font-size:13px; color: var(--text-dim); margin-top:16px; cursor:pointer; }
  .mfr-terms input{ margin-top:3px; flex:none; }
  .mfr-terms a{ color: var(--teal); }
  .mfr-id-row{ display:flex; flex-wrap:wrap; align-items:flex-end; gap:12px; margin-bottom:10px; }
  .mfr-id-row .af-label{ margin-top:0; }
  .mfr-id{ font-family: var(--mono); font-size:22px; font-weight:600; letter-spacing:0.06em; color: var(--teal); user-select:all; }
  .mfr-id.small{ font-size:12px; letter-spacing:0.04em; margin-left:6px; }
  .mfr-dl{ display:grid; grid-template-columns:max-content minmax(0, 1fr); gap:4px 14px; margin:8px 0 0; font-size:13px; }
  .mfr-dl dt{ color: var(--text-faint); font-family: var(--mono); font-size:11px; text-transform:uppercase; letter-spacing:0.03em; padding-top:2px; }
  .mfr-dl dd{ margin:0; color: var(--text); overflow-wrap:anywhere; }
  .mfr-dl a, .mfr-panel .lib-note a{ color: var(--teal); }
  .mfr-docs{ display:flex; flex-wrap:wrap; gap:12px; margin-top:8px; }
  .mfr-docs img{ max-width:min(420px, 100%); max-height:300px; border-radius:6px; border:1px solid var(--border); display:block; }
  .btn.mfr-danger{ color: var(--red); border-color: var(--red); }
  /* relecture des produits envoyés (manufacturer-review.js) */
  .mfr-review dd{ position:relative; padding-right:28px; }
  .mfr-review dd.mfr-changed{ border-left:3px solid var(--amber); padding-left:8px; }
  .mfr-comment-btn{ position:absolute; right:0; top:0; background:none; border:0; cursor:pointer; opacity:.45; font-size:13px; }
  .mfr-comment-btn:hover{ opacity:1; }
  .mfr-sub-tbl{ border-collapse:collapse; font-size:12px; margin:2px 0; }
  .mfr-sub-tbl th, .mfr-sub-tbl td{ border:1px solid var(--border); padding:2px 6px; text-align:left; vertical-align:top; }
  .mfr-sub-tbl th{ color: var(--text-faint); font-weight:600; }
  .mfr-files{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
  .mfr-photo{ height:90px; border-radius:6px; border:1px solid var(--border); display:block; }
  .mfr-3d{ border:1px solid var(--border); border-radius:8px; overflow:hidden; max-width:100%; }
  .mfr-3d canvas{ display:block; max-width:100%; }
  .mfr-3d-fabrics{ height:360px; }
  @media (max-width: 900px){
    #my-account-manufacturer-container .mfr-panel{ scroll-margin-top:64px; }   /* sous le bouton de menu fixe */
    .mfr-grid{ grid-template-columns:1fr; }
    .mfr-dl{ grid-template-columns:1fr; gap:0; }
    .mfr-dl dd{ margin-bottom:6px; }
    .mfr-id{ font-size:18px; }
  }
  #my-account-security-container{ display:contents; }
  #view-my-account{ max-width:1480px; }
  .acc-grid .af-label{ display:block; }
  .acc-avatar-row{ display:flex; align-items:center; gap:16px; }
  .acc-avatar{ width:72px; height:72px; border-radius:50%; background: var(--surface-3); display:flex; align-items:center; justify-content:center; font-family:var(--mono); font-size:22px; color: var(--teal); flex-shrink:0; overflow:hidden; }
  .acc-avatar img{ width:100%; height:100%; object-fit:cover; display:block; }
  .acc-avatar-actions{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
  .acc-avatar-actions .lib-note{ flex-basis:100%; margin:0; }
  .sb-user-name{ font-family: var(--mono); font-size:12px; color: var(--text-dim); }
  .sidebar.collapsed .sb-user-name{ display:none; }
  .sidebar.collapsed .sb-user{ justify-content:center; padding:4px; margin-left:0; }
  .logout{ width:100%; font-family: var(--mono); font-size: 11px; color: var(--text-dim); background:none; border: 1px solid var(--border); padding: 7px; border-radius: 6px; cursor:pointer; }
  .logout:hover{ color: var(--text); border-color: var(--text-dim); }
  .view-as-banner{ position:fixed; top:12px; left:50%; transform:translateX(-50%); z-index:1000; display:flex; align-items:center; gap:10px; background: var(--amber); color: var(--on-accent); padding:8px 14px; border-radius:999px; font-family: var(--font-body); font-size:12.5px; font-weight:600; box-shadow:0 4px 16px rgba(0,0,0,0.35); }
  .view-as-banner button{ background: rgba(0,0,0,0.15); color: inherit; border:none; border-radius:999px; padding:4px 10px; font-size:11.5px; font-weight:600; cursor:pointer; font-family: var(--font-body); }
  .view-as-banner button:hover{ background: rgba(0,0,0,0.25); }
  .sidebar.collapsed .logout{ display:none; }
  .theme-switch-row{ width:100%; display:flex; align-items:center; gap:10px; margin-top:8px; padding:6px 9px; background:none; border:1px solid var(--border); border-radius:8px; color: var(--text-dim); cursor:pointer; font-family: var(--font-body); font-size:12px; }
  .theme-switch-row:hover{ color: var(--text); border-color: var(--text-dim); }
  .theme-switch-track{ position:relative; flex-shrink:0; width:38px; height:20px; border-radius:999px; background: var(--surface-3); border:1px solid var(--border); }
  .theme-track-icon{ position:absolute; top:50%; transform:translateY(-50%); color: var(--text-faint); pointer-events:none; }
  .theme-track-icon.sun{ left:4px; }
  .theme-track-icon.moon{ right:4px; }
  .theme-switch-thumb{ position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background: var(--teal); box-shadow: 0 1px 3px rgba(0,0,0,0.4); transition: transform .18s ease, background .18s ease; }
  :root[data-theme="light"] .theme-switch-thumb{ transform: translateX(18px); }
  .sidebar.collapsed .theme-switch-row{ justify-content:center; }

  .main{ flex:1; min-width:0; padding: 32px 40px; overflow-y:auto; display:flex; flex-direction:column; min-height:0; }
  .view{ display:none; max-width: 920px; }
  .view.show{ display:block; }
  /* Panneau admin → Utilisateurs (2026-08-04) : une ligne peut porter
     jusqu'à 6 boutons + un sélecteur de rôle (Rendre/Retirer Entreprise,
     licence, accès bibliothèque, réinitialisation, suppression...) — la
     largeur générique de .view (920px) les faisait déborder du cadre de la
     carte plutôt que de s'y ajuster. Élargi pour CE SEUL panneau, jamais la
     règle .view globale (qui reste correcte pour Synoptique/Plan/etc.). */
  #view-admin-panel.show{ max-width: 1280px; }
  /* Bibliothèque (2026-08-05, retour utilisateur explicite : "faire en
     sorte que le nombre de colonnes s'adapte à la taille de l'écran") —
     .project-grid utilise déjà `repeat(auto-fill, minmax(220px,1fr))`,
     intrinsèquement responsive, mais la règle .view générique (920px)
     plafonnait le nombre de colonnes à ~4 quel que soit l'espace
     disponible sur un écran large. Retiré pour CETTE seule vue, jamais la
     règle .view globale. */
  #view-bibliotheque.show{ max-width: none; }
  #view-elec-workspace.show{ display:flex; flex-direction:column; flex:1; min-height:0; max-width:none; }
  #view-plan-workspace.show{ display:flex; flex-direction:column; flex:1; min-height:0; max-width:none; }
  /* Documents de projet : pleine largeur — la visionneuse image/DWG
     (.fc-viewer) s'adapte à la fenêtre au lieu des 920 px des autres pages. */
  #view-fichier-workspace.show{ max-width:none; }
  #view-shared-viewer.show{ display:flex; flex-direction:column; flex:1; min-height:0; max-width:none; }
  #view-deviceflow-workspace.show{ display:flex; flex-direction:column; flex:1; min-height:0; max-width:none; }
  /* Contrairement aux autres workspaces (Synoptique/Plan), la Scène 3D sort
     complètement du layout .shell/.sidebar — plein viewport navigateur, un
     seul bouton pour revenir au site. Retour demandé explicitement par
     l'utilisateur : "le côté module dans le site rend le truc nul". */
  #view-scene3d-workspace.show{ display:flex; flex-direction:column; position:fixed; inset:0; z-index:400; max-width:none; margin:0; background:#0e1116; }
  /* Truss Builder — même traitement plein viewport que la Scène 3D (même
     famille d'espace de travail dédié), rendu dans #truss-builder-container
     (voir renderTrussBuilderWorkspace() dans truss-builder.js). */
  #view-truss-builder-workspace.show{ display:flex; flex-direction:column; position:fixed; inset:0; z-index:400; max-width:none; margin:0; background:#0e1116; }
  /* Éditeur d'assemblage GDTF — même famille encore (2026-08-06). */
  #view-gdtf-part-editor-workspace.show{ display:flex; flex-direction:column; position:fixed; inset:0; z-index:400; max-width:none; margin:0; background:#0e1116; }
  /* Texte/Tableau — même traitement plein viewport (2026-08-28, retour
     utilisateur explicite : "une vrai page dédier quoi, comme les scènes
     3D") — jusqu'ici ces deux vues n'avaient JAMAIS de règle `.show`
     dédiée et retombaient sur `.view.show{display:block}` générique,
     coincées dans .shell/la barre latérale avec un max-width:920px. */
  #view-texte-workspace.show{ display:flex; flex-direction:column; position:fixed; inset:0; z-index:400; max-width:none; margin:0; background:#0e1116; }
  #view-tableau-workspace.show{ display:flex; flex-direction:column; position:fixed; inset:0; z-index:400; max-width:none; margin:0; background:#0e1116; }
  /* Texte/Tableau réutilisent le bandeau `.scene3d-topline` (fixe/sombre,
     jamais dépendant du thème du site — même famille que Scène 3D/Truss
     Builder) pour leur en-tête ; `.doc-title-editable` reste la classe
     générique de renommage inline, ici juste recolorée pour ce fond fixe. */
  .scene3d-topline .doc-title-editable{ color:#EDEDED; }
  .scene3d-topline .doc-title-editable:hover{ background:#1c2029; }
  #plan-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  #elec-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  #deviceflow-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  #texte-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  #tableau-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  #fichier-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  #scene3d-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  #truss-builder-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  /* Repère des feuilles du bas et de la vue 3D en mobile (.scene3d-viewport
     y passe en position:absolute; inset:0) : sans lui, la vue recouvrait la
     barre Fabrics et la barre d’outils (2026-10-03). */
  #tb-main-row{ position:relative; }
  /* Atelier 3D (2026-09-15, atelier3d.js) — même famille que les autres
     ateliers plein écran ; menu « Fichier » en liste verticale façon menu
     Démarrer, posé dans le conteneur (la barre du haut coupe ses débordements). */
  #view-atelier3d-workspace.show{ display:flex; flex-direction:column; position:fixed; inset:0; z-index:400; max-width:none; margin:0; background:#0e1116; }
  #atelier3d-container{ display:flex; flex-direction:column; flex:1; min-height:0; position:relative; }
  .a3d-topline{ gap:12px; }
  .a3d-start{ display:inline-flex; align-items:center; gap:7px; height:30px; padding:0 12px 0 8px; flex-shrink:0; border-radius:6px; border:1px solid #2f3a44; background:linear-gradient(#1c222b, #161b22); color:#EDEDED; font:600 12.5px var(--font-display); cursor:pointer; }
  .a3d-start:hover{ border-color:#3a4a55; }
  .a3d-start[aria-expanded="true"]{ border-color:#2FD9C4; color:#2FD9C4; background:#10181a; }
  .a3d-start:focus-visible, .a3d-item:focus-visible, .a3d-footer button:focus-visible{ outline:2px solid #2FD9C4; outline-offset:1px; }
  .a3d-start svg{ width:16px; height:16px; flex:none; }
  .a3d-title{ display:flex; align-items:center; gap:8px; min-width:0; }
  .a3d-name{ color:#EDEDED; font-weight:600; font-size:13.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:42vw; }
  .a3d-pill{ font:500 10.5px var(--mono); color:#8A93A3; border:1px solid #262b35; border-radius:10px; padding:2px 7px; white-space:nowrap; flex:none; }
  .a3d-pill.ro{ color:#FFD54A; border-color:#4a4222; }
  .a3d-hint{ color:#5B6472; font-size:11.5px; white-space:nowrap; }
  .a3d-menu{ position:absolute; top:44px; left:8px; z-index:20; display:flex; min-width:290px; background:#14171d; border:1px solid #2f3643; border-radius:3px 8px 8px 8px; box-shadow:0 18px 44px rgba(0,0,0,.55); overflow:hidden; }
  .a3d-menu[hidden]{ display:none; }
  .a3d-menu-banner{ width:30px; flex:none; display:flex; align-items:flex-end; justify-content:center; padding:12px 0; background:linear-gradient(0deg, #0f5f57, #16323a 55%, #172028); }
  .a3d-menu-banner span{ writing-mode:vertical-rl; transform:rotate(180deg); font:700 12.5px var(--font-display); letter-spacing:.16em; text-transform:uppercase; color:#DFF7F3; white-space:nowrap; }
  .a3d-menu-items{ flex:1; padding:4px 0; display:flex; flex-direction:column; }
  .a3d-item{ display:flex; align-items:center; gap:10px; width:100%; padding:6px 14px 6px 10px; background:none; border:none; color:#EDEDED; font:13px var(--font-body); text-align:left; cursor:pointer; }
  .a3d-item .tb-ico{ width:26px; height:26px; flex:none; display:block; }
  .a3d-item:hover:not(:disabled){ background:#1f2a33; }
  .a3d-item:disabled{ color:#5B6472; cursor:default; }
  .a3d-item:disabled .tb-ico{ opacity:.38; }
  .a3d-kbd{ margin-left:auto; padding-left:18px; font:11px var(--mono); color:#5B6472; white-space:nowrap; }
  .a3d-sep{ height:1px; background:#262b35; margin:4px 10px 4px 46px; }
  .a3d-viewport{ position:relative; flex:1; min-height:0; overflow:hidden; }
  .a3d-viewport canvas{ display:block; }
  .a3d-empty{ position:absolute; inset:0; display:grid; place-items:center; padding:24px 16px; pointer-events:none; }
  .a3d-empty[hidden]{ display:none; }
  .a3d-empty-card{ pointer-events:auto; max-width:440px; text-align:center; display:grid; gap:12px; justify-items:center; color:#8A93A3; font-size:13px; line-height:1.55; }
  .a3d-empty-card h2{ color:#EDEDED; font:600 18px/1.2 var(--font-display); margin:0; }
  .a3d-empty-card p{ margin:0; }
  .a3d-empty-card .scene3d-btn-secondary{ width:auto; margin:0; padding:8px 14px; }
  .a3d-empty-ico{ color:#8A93A3; }
  .a3d-empty-ico svg{ width:64px; height:64px; display:block; }
  .a3d-empty-ico .acc{ stroke:#2FD9C4; }
  .a3d-footer{ position:absolute; right:12px; bottom:12px; display:flex; gap:10px; align-items:center; background:rgba(20,23,28,.9); border:1px solid #262b35; border-radius:7px; padding:5px 6px 5px 12px; color:#C6CFDB; font:12px var(--mono); font-variant-numeric:tabular-nums; }
  .a3d-footer[hidden]{ display:none; }
  .a3d-footer button{ background:none; border:1px solid #262b35; color:#8A93A3; border-radius:5px; padding:4px 9px; font:12px var(--font-body); cursor:pointer; }
  .a3d-footer button:hover{ color:#EDEDED; border-color:#3a4150; }
  .a3d-empty-actions{ display:flex; flex-wrap:wrap; gap:8px; justify-content:center; }
  .a3d-empty-card .a3d-empty-warn{ margin:0; padding:9px 12px; border:1px solid #4a4222; background:#1d1a10; color:#FFD54A; border-radius:7px; font-size:12.5px; line-height:1.5; text-align:left; }
  .a3d-empty-card .a3d-empty-warn[hidden]{ display:none; }
  .a3d-pill.new{ color:#2FD9C4; border-color:#1d4b45; }
  .a3d-viewport.importing .a3d-footer{ right:324px; }
  .a3d-import{ position:absolute; top:10px; right:10px; bottom:10px; width:300px; z-index:15; display:flex; flex-direction:column; background:#14171d; border:1px solid #2f3643; border-radius:8px; box-shadow:0 18px 44px rgba(0,0,0,.45); color:#C6CFDB; font:12.5px var(--font-body); }
  .a3d-import[hidden]{ display:none; }
  .a3d-imp-head{ padding:10px 12px 8px; border-bottom:1px solid #262b35; }
  .a3d-imp-title{ font:700 11.5px var(--font-display); letter-spacing:.12em; text-transform:uppercase; color:#2FD9C4; }
  .a3d-imp-file{ margin-top:3px; color:#EDEDED; font-weight:600; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .a3d-imp-body{ flex:1; min-height:0; overflow:auto; padding:10px 12px; display:grid; gap:9px; align-content:start; }
  .a3d-imp-field{ display:grid; gap:4px; }
  .a3d-imp-field > span, .a3d-imp-layers-head > span:first-child{ color:#8A93A3; font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
  .a3d-import select{ width:100%; background:#0e1116; color:#EDEDED; border:1px solid #2f3643; border-radius:5px; padding:5px 8px; font:12.5px var(--font-body); }
  .a3d-import select:focus-visible, .a3d-import button:focus-visible, .a3d-import input:focus-visible, .a3d-confirm-card button:focus-visible{ outline:2px solid #2FD9C4; outline-offset:1px; }
  .a3d-imp-check{ display:flex; align-items:center; gap:7px; cursor:pointer; }
  .a3d-imp-check em{ color:#5B6472; font-style:normal; }
  .a3d-imp-layers-head{ display:flex; align-items:center; justify-content:space-between; margin-top:2px; }
  .a3d-imp-layers-head button{ background:none; border:1px solid #262b35; color:#8A93A3; border-radius:4px; padding:1px 7px; margin-left:4px; font:11px var(--font-body); cursor:pointer; }
  .a3d-imp-layers-head button:hover{ color:#EDEDED; border-color:#3a4150; }
  .a3d-imp-layers{ display:grid; gap:1px; max-height:190px; overflow:auto; border:1px solid #1f242d; border-radius:6px; padding:3px; background:#0f1217; }
  .a3d-imp-layer{ display:flex; align-items:center; gap:7px; padding:3px 5px; border-radius:4px; cursor:pointer; min-width:0; }
  .a3d-imp-layer:hover{ background:#1a2029; }
  .a3d-imp-sw{ width:10px; height:10px; border-radius:2px; flex:none; box-shadow:0 0 0 1px rgba(255,255,255,.18) inset; }
  .a3d-imp-lname{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#EDEDED; }
  .a3d-imp-lcount{ font:11px var(--mono); color:#5B6472; }
  .a3d-imp-summary{ display:grid; gap:3px; padding:8px 9px; border:1px solid #262b35; border-radius:6px; font:11.5px var(--mono); color:#C6CFDB; font-variant-numeric:tabular-nums; }
  .a3d-imp-summary b{ color:#EDEDED; font-weight:600; }
  .a3d-imp-summary em{ color:#FFD54A; font-style:normal; }
  .a3d-imp-warn{ margin:0; padding:0 0 0 16px; color:#FFD54A; font-size:11.5px; line-height:1.45; display:grid; gap:3px; }
  .a3d-imp-actions{ display:flex; gap:8px; justify-content:flex-end; padding:10px 12px; border-top:1px solid #262b35; }
  .a3d-imp-actions button{ border-radius:6px; padding:7px 12px; font:600 12.5px var(--font-body); cursor:pointer; }
  .a3d-imp-cancel{ background:none; border:1px solid #2f3643; color:#C6CFDB; }
  .a3d-imp-cancel:hover{ color:#EDEDED; border-color:#3a4150; }
  .a3d-imp-ok{ background:#2FD9C4; border:1px solid #2FD9C4; color:#08201d; }
  .a3d-imp-ok:hover{ background:#4be3cf; }
  .a3d-drop{ position:absolute; inset:0; z-index:40; display:grid; place-items:center; background:rgba(15,95,87,.22); border:2px dashed #2FD9C4; border-radius:6px; color:#DFF7F3; font:600 16px var(--font-display); pointer-events:none; text-align:center; padding:16px; }
  .a3d-drop[hidden]{ display:none; }
  .a3d-busy{ position:absolute; inset:0; z-index:35; display:grid; place-items:center; background:rgba(10,12,16,.55); padding:16px; }
  .a3d-busy[hidden]{ display:none; }
  .a3d-busy-card{ display:flex; align-items:center; gap:12px; background:#14171d; border:1px solid #2f3643; border-radius:8px; padding:12px 16px; color:#EDEDED; font:13px var(--font-body); box-shadow:0 18px 44px rgba(0,0,0,.45); }
  .a3d-spinner{ width:18px; height:18px; border-radius:50%; border:2px solid #2f3643; border-top-color:#2FD9C4; animation:a3dspin .8s linear infinite; flex:none; }
  @keyframes a3dspin{ to{ transform:rotate(360deg); } }
  .a3d-confirm{ position:absolute; inset:0; z-index:45; display:grid; place-items:center; background:rgba(10,12,16,.6); padding:16px; }
  .a3d-confirm[hidden]{ display:none; }
  .a3d-confirm-card{ max-width:360px; background:#14171d; border:1px solid #2f3643; border-radius:8px; padding:16px; color:#EDEDED; font:13px/1.5 var(--font-body); display:grid; gap:12px; }
  .a3d-confirm-card p{ margin:0; }
  .a3d-confirm-card div{ display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
  .a3d-confirm-card button{ border-radius:6px; padding:7px 12px; font:600 12.5px var(--font-body); cursor:pointer; background:none; border:1px solid #2f3643; color:#C6CFDB; }
  .a3d-confirm-card button.danger{ background:#3a1c1c; border-color:#6b2a2a; color:#ffb3b3; }
  @media (max-width:900px){ .a3d-hint{ display:none; } .a3d-name{ max-width:38vw; } .a3d-import{ top:auto; left:8px; right:8px; bottom:8px; width:auto; max-height:58%; } .a3d-viewport.importing .a3d-footer{ display:none; } }
  /* Fabrics (2026-09-15, fabrics.js) — barre commune posée en tête de chaque
     vue d'outil (Objet 3D, Truss Builder, Éditeur de fixture, Plan 2D) :
     menu Fichier, onglets, bascule 3D/2D. L'onglet actif se fond dans la
     barre d'outils de l'outil juste en dessous (même fond #14171d). */
  .fab-bar{ display:flex; align-items:center; gap:10px; height:44px; flex-shrink:0; padding:0 10px; background:#0b0d11; border-bottom:1px solid #262b35; position:relative; }
  .fab-doc{ display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; margin-left:-4px; flex:none; cursor:help; }
  .fab-doc svg{ width:15px; height:15px; }
  .fab-doc[hidden]{ display:none; } /* sinon display:inline-flex gagne : case vide de 20 px quand le statut est caché */
  .fab-brand{ font:700 11.5px var(--font-display); letter-spacing:.16em; text-transform:uppercase; color:#2FD9C4; white-space:nowrap; flex:none; display:inline-flex; align-items:center; gap:7px; }
  .fab-brand .fab-logo{ width:20px; height:20px; flex:none; }
  .fab-tabs{ display:flex; gap:2px; min-width:0; overflow-x:auto; scrollbar-width:none; align-self:stretch; align-items:flex-end; }
  .fab-tab{ display:inline-flex; align-items:center; gap:7px; height:36px; padding:0 13px; border:1px solid transparent; border-bottom:none; border-radius:7px 7px 0 0; background:none; color:#8A93A3; font:600 12.5px var(--font-body); cursor:pointer; white-space:nowrap; flex:none; }
  .fab-tab svg{ width:16px; height:16px; flex:none; }
  .fab-tab .acc{ stroke:#2FD9C4; }
  .fab-tab:hover{ color:#EDEDED; }
  .fab-tab[aria-selected="true"]{ background:#14171d; border-color:#262b35; color:#EDEDED; height:37px; margin-bottom:-1px; }
  .fab-spacer{ flex:1; }
  .fab-dim{ display:inline-flex; border:1px solid #2f3643; border-radius:6px; overflow:hidden; flex:none; }
  .fab-dim button{ background:none; border:none; color:#8A93A3; font:700 12px var(--mono); padding:5px 12px; cursor:pointer; }
  .fab-dim button:hover{ color:#EDEDED; }
  .fab-dim button[aria-pressed="true"]{ background:#2FD9C4; color:#08201d; }
  .fab-tab:focus-visible, .fab-dim button:focus-visible{ outline:2px solid #2FD9C4; outline-offset:-2px; }
  .fab-menu{ top:46px; left:8px; z-index:60; }
  @media (max-width:900px){ .fab-brand{ display:none; } .fab-tab span{ display:none; } .fab-tab{ padding:0 12px; } }
  /* Fabrics sur téléphone (2026-10-03) : les barres d'outils glissent au doigt
     (overflow-x du .scene3d-topline) — un dégradé sur le bord indique qu'il y
     a encore des outils (classes posées par updateScrollHints(), fabrics.js). */
  @media (max-width:900px){
    .view .scene3d-topline, .fab-tabs{ overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
    .view .scene3d-topline::-webkit-scrollbar{ display:none; }
    .fab-scrollx:not(.fab-at-end){ -webkit-mask-image:linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image:linear-gradient(to right, #000 calc(100% - 40px), transparent); }
    .fab-scrollx.fab-at-end:not(.fab-at-start){ -webkit-mask-image:linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image:linear-gradient(to left, #000 calc(100% - 40px), transparent); }
    .fab-scrollx:not(.fab-at-end):not(.fab-at-start){ -webkit-mask-image:linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image:linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
    .fab-bar{ gap:8px; padding:0 8px; }
    .fab-dim button{ padding:5px 10px; }
    /* Truss Builder : nom plus court ; membrures (gauche) et inspecteur
       empilés en bas au lieu d'être superposés au même endroit. */
    #tb-name-input{ width:130px !important; flex:none; }
    #tb-main-row > .scene3d-left-panel{ height:24dvh; max-height:24dvh; }
    #tb-main-row > .scene3d-inspector{ bottom:24dvh; max-height:22dvh; border-radius:14px 14px 0 0; }
    #tb-main-row > .scene3d-inspector + *, #tb-main-row > .scene3d-left-panel{ box-shadow:0 -10px 30px rgba(0,0,0,.5); }
  }
  /* Fabrics › Plan 2D (fabrics-plan2d.js) : calques à gauche (réductible),
     visionneuse DWG (dwg-plan2d.js) recolorée pour le fond sombre. */
  #view-fabrics2d-workspace.show{ display:flex; flex-direction:column; position:fixed; inset:0; z-index:400; max-width:none; margin:0; background:#0e1116; }
  #fabrics2d-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  .f2d-main{ position:relative; flex:1; min-height:0; display:flex; }
  .f2d-side{ width:260px; flex:none; display:flex; flex-direction:column; min-height:0; background:#14171d; border-right:1px solid #262b35; color:#C6CFDB; font:12.5px var(--font-body); }
  .f2d-side[hidden]{ display:none; }
  .f2d-side.collapsed{ width:auto; }
  .f2d-side-head{ display:flex; align-items:center; justify-content:space-between; gap:6px; padding:9px 10px; border-bottom:1px solid #262b35; }
  .f2d-side-title{ font:700 11.5px var(--font-display); letter-spacing:.12em; text-transform:uppercase; color:#2FD9C4; }
  .f2d-side-head button, .f2d-expand{ background:none; border:1px solid #262b35; color:#8A93A3; border-radius:4px; padding:1px 7px; margin-left:4px; font:11px var(--font-body); cursor:pointer; }
  .f2d-side-head button:hover, .f2d-expand:hover{ color:#EDEDED; border-color:#3a4150; }
  .f2d-expand{ writing-mode:vertical-rl; margin:8px 6px; padding:10px 3px; }
  .f2d-side-head button:focus-visible, .f2d-expand:focus-visible, .f2d-name:focus-visible{ outline:2px solid #2FD9C4; outline-offset:1px; }
  .f2d-layers{ flex:1; min-height:0; overflow:auto; padding:4px; display:grid; gap:1px; align-content:start; }
  .f2d-info{ border-top:1px solid #262b35; padding:8px 10px; display:grid; gap:4px; font:11.5px var(--mono); color:#8A93A3; }
  .f2d-info span{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .f2d-info ul{ margin:2px 0 0; padding-left:16px; color:#FFD54A; font:11.5px/1.45 var(--font-body); }
  .f2d-viewer{ flex:1; min-width:0; display:flex; flex-direction:column; }
  .f2d-viewer[hidden]{ display:none; }
  .f2d-viewer .dwgv-bar{ background:#14171d; border-bottom-color:#262b35; }
  .f2d-viewer .dwgv-bar select, .f2d-viewer .dwgv-bar button{ background:#0e1116; color:#EDEDED; border-color:#2f3643; }
  .f2d-viewer .dwgv-zoom{ color:#8A93A3; }
  .f2d-name{ color:#EDEDED; background:#0e1116; border:1px solid #262b35; border-radius:5px; padding:4px 7px; font:600 13.5px var(--font-body); width:min(300px, 40vw); }
  @media (max-width:900px){ .f2d-side:not(.collapsed){ position:absolute; z-index:12; top:0; bottom:0; left:0; width:min(260px, 80vw); box-shadow:0 18px 44px rgba(0,0,0,.5); } }
  /* Fabrics › 3D Design : arborescence des éléments (fabrics-tree.js),
     panneau gauche réductible posé sur la vue 3D. */
  .a3d-tree{ position:absolute; top:10px; left:10px; bottom:10px; width:280px; z-index:14; display:flex; flex-direction:column; background:#14171d; border:1px solid #2f3643; border-radius:8px; box-shadow:0 18px 44px rgba(0,0,0,.45); color:#C6CFDB; font:12.5px var(--font-body); }
  .a3d-tree[hidden]{ display:none; }
  .a3d-tree.collapsed{ bottom:auto; width:auto; background:none; border:none; box-shadow:none; }
  .a3d-tree > .ftree{ display:flex; flex-direction:column; flex:1; min-height:0; }
  .ftree-head{ display:flex; align-items:center; gap:6px; padding:8px 8px 8px 10px; border-bottom:1px solid #262b35; }
  .ftree-title{ font:700 11.5px var(--font-display); letter-spacing:.12em; text-transform:uppercase; color:#2FD9C4; }
  .ftree-count{ font:11px var(--mono); color:#5B6472; }
  .ftree-sp{ flex:1; }
  .ftree-btn, .ftree-expand{ background:none; border:1px solid #262b35; color:#8A93A3; border-radius:5px; padding:2px 8px; font:11.5px var(--font-body); cursor:pointer; }
  .ftree-btn:hover, .ftree-expand:hover{ color:#EDEDED; border-color:#3a4150; }
  .ftree-expand{ background:#14171d; border-color:#2f3643; padding:6px 10px; box-shadow:0 8px 24px rgba(0,0,0,.35); }
  .ftree-list{ flex:1; min-height:0; overflow:auto; padding:4px; outline:none; }
  .ftree-list:focus-visible{ box-shadow:inset 0 0 0 1px #2FD9C4; }
  .ftree-row{ display:flex; align-items:center; gap:4px; height:26px; padding-right:4px; border:1px solid transparent; border-radius:5px; cursor:pointer; user-select:none; }
  .ftree-row:hover{ background:#1a2029; }
  .ftree-row.sel{ background:#10262a; border-color:#1d4b45; }
  .ftree-row.off .ftree-name, .ftree-row.off .ftree-ico{ opacity:.45; }
  .ftree-row.inlock .ftree-name{ color:#9fb0c0; }
  .ftree-row.dragging{ opacity:.5; }
  .ftree-row.drop-into{ background:#10262a; border-color:#2FD9C4; }
  .ftree-row.drop-before{ box-shadow:inset 0 2px 0 #2FD9C4; }
  .ftree-row.drop-after{ box-shadow:inset 0 -2px 0 #2FD9C4; }
  .ftree-caret{ width:16px; flex:none; padding:0; background:none; border:none; color:#8A93A3; font-size:10px; text-align:center; cursor:pointer; }
  .ftree-ico{ width:15px; height:15px; flex:none; display:inline-flex; color:#8A93A3; }
  .ftree-ico.fold{ color:#d9b35a; }
  .ftree-ico svg, .ftree-act svg{ width:100%; height:100%; display:block; }
  .ftree-name{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#EDEDED; }
  .ftree-n{ font:10.5px var(--mono); color:#5B6472; }
  .ftree-act{ width:22px; height:22px; flex:none; display:inline-flex; align-items:center; justify-content:center; padding:3px; background:none; border:none; border-radius:4px; color:#5B6472; cursor:pointer; }
  .ftree-act:hover{ color:#EDEDED; background:#232a35; }
  .ftree-act.on{ color:#FFD54A; }
  .ftree-act.del{ font-size:14px; line-height:1; visibility:hidden; }
  .ftree-row:hover .ftree-act.del, .ftree-act.del:focus-visible{ visibility:visible; }
  .ftree-rename{ flex:1; min-width:0; background:#0e1116; color:#EDEDED; border:1px solid #2FD9C4; border-radius:4px; padding:1px 5px; font:12.5px var(--font-body); }
  .ftree-empty{ color:#5B6472; padding:10px; }
  .ftree-foot{ border-top:1px solid #262b35; padding:6px 10px; color:#5B6472; font-size:11px; }
  .ftree-caret:focus-visible, .ftree-act:focus-visible, .ftree-btn:focus-visible, .ftree-expand:focus-visible{ outline:2px solid #2FD9C4; outline-offset:1px; }
  @media (max-width:900px){ .a3d-tree:not(.collapsed){ width:min(280px, 78vw); } }
  .ftree-ico.obj{ color:#2FD9C4; }
  .ftree-row.k-object .ftree-name{ font-weight:600; }
  .ftree-meta{ font:10.5px var(--mono); color:#5B6472; white-space:nowrap; }
  /* 3D Design : outils de scène (barre du haut) et panneau Position (droite, réductible). */
  .a3d-tools{ display:flex; gap:6px; flex-shrink:0; }
  .a3d-tools .tb-tool[aria-pressed="true"]{ border-color:#2FD9C4; color:#2FD9C4; }
  .a3d-tools .tb-tool:disabled{ opacity:.4; cursor:default; }
  .a3d-coords{ position:absolute; top:10px; right:10px; width:250px; z-index:14; background:#14171d; border:1px solid #2f3643; border-radius:8px; box-shadow:0 18px 44px rgba(0,0,0,.45); color:#C6CFDB; font:12.5px var(--font-body); }
  .a3d-coords[hidden]{ display:none; }
  .a3d-coords.collapsed{ width:auto; background:none; border:none; box-shadow:none; }
  .a3d-co-head{ display:flex; align-items:center; gap:6px; padding:8px 8px 8px 10px; border-bottom:1px solid #262b35; }
  .a3d-co-title{ font:700 11.5px var(--font-display); letter-spacing:.12em; text-transform:uppercase; color:#2FD9C4; }
  .a3d-co-name{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#EDEDED; }
  .a3d-co-body{ padding:10px; display:grid; gap:8px; }
  .a3d-co-row{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .a3d-co-row3{ display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; }
  .a3d-coords label{ display:grid; gap:3px; color:#8A93A3; font-size:11px; }
  .a3d-coords input{ width:100%; min-width:0; box-sizing:border-box; background:#0e1116; color:#EDEDED; border:1px solid #2f3643; border-radius:5px; padding:4px 6px; font:12px var(--mono); }
  .a3d-coords input:focus-visible, .a3d-co-rot button:focus-visible{ outline:2px solid #2FD9C4; outline-offset:1px; }
  .a3d-co-lbl{ color:#8A93A3; font-size:11px; }
  .a3d-co-rot{ display:flex; gap:6px; }
  .a3d-co-rot button{ flex:1; background:none; border:1px solid #2f3643; color:#C6CFDB; border-radius:5px; padding:4px; cursor:pointer; font:12px var(--font-body); }
  .a3d-co-rot button:hover{ color:#EDEDED; border-color:#3a4150; }
  .a3d-co-hint{ color:#5B6472; font-size:11px; line-height:1.4; }
  /* 3D Design : Draw (esquisses, fabrics-sketch.js) — barre de l'esquisse,
     menu du plan, étiquette de cote qui suit le curseur. */
  .a3d-tools[hidden]{ display:none; }
  .a3d-hint[hidden]{ display:none; }
  .a3d-sk-tools{ align-items:center; }
  .a3d-sk-sep{ width:1px; align-self:stretch; background:#262b35; margin:4px 2px; }
  .a3d-sk-snap{ display:flex; align-items:center; gap:6px; color:#8A93A3; font:12px var(--font-body); white-space:nowrap; }
  .a3d-sk-snap select{ background:#0e1116; color:#EDEDED; border:1px solid #2f3643; border-radius:5px; padding:3px 4px; font:12px var(--mono); }
  .a3d-sk-snap select:focus-visible{ outline:2px solid #2FD9C4; outline-offset:1px; }
  .a3d-tools .a3d-sk-done{ border-color:#1f5a53; color:#2FD9C4; }
  .a3d-sk-dims{ position:absolute; inset:0; z-index:12; pointer-events:none; overflow:hidden; }
  .a3d-sk-dim{ position:absolute; transform:translate(-50%, -50%); pointer-events:auto; cursor:move; user-select:none; white-space:nowrap; padding:1px 6px; border-radius:4px; background:rgba(14,17,22,.88); border:1px solid #33455e; color:#CFE0F7; font:12px var(--mono); font-variant-numeric:tabular-nums; }
  .a3d-sk-dim[hidden]{ display:none; }
  .a3d-sk-dim:hover{ border-color:#8FB3E6; }
  .a3d-sk-dim.sel{ border-color:#2FD9C4; color:#2FD9C4; }
  .a3d-sk-dim.editing{ padding:0; border-color:#FFD54A; }
  .a3d-sk-dim input{ width:84px; box-sizing:border-box; background:#0e1116; color:#FFD54A; border:none; border-radius:4px; padding:3px 6px; font:12px var(--mono); text-align:center; outline:none; }
  /* 3D Design : Extrude / invExtrude (fabrics-solid.js) — paramètres, fonctions d'une pièce. */
  .a3d-fp-body{ display:grid; gap:8px; padding:2px 8px 8px; }
  .a3d-fp-body label, .a3d-feat label{ display:grid; gap:3px; color:#8A93A3; font-size:11px; }
  .a3d-fp-body input, .a3d-fp-body select, .a3d-feat select{ width:100%; min-width:0; box-sizing:border-box; background:#0e1116; color:#EDEDED; border:1px solid #2f3643; border-radius:5px; padding:4px 6px; font:12px var(--mono); }
  .a3d-fp-body input:focus-visible, .a3d-fp-body select:focus-visible, .a3d-feat select:focus-visible, .a3d-fp-actions button:focus-visible, .a3d-feat-sk:focus-visible{ outline:2px solid #2FD9C4; outline-offset:1px; }
  .a3d-fp-where{ color:#8A93A3; font-size:11.5px; }
  .a3d-fp-actions{ display:flex; gap:6px; justify-content:flex-end; }
  .a3d-fp-actions button{ background:none; border:1px solid #2f3643; color:#C6CFDB; border-radius:5px; padding:5px 12px; font:12.5px var(--font-body); cursor:pointer; }
  .a3d-fp-actions button.ok{ border-color:#2FD9C4; color:#2FD9C4; }
  .a3d-feats{ display:grid; gap:8px; border-top:1px solid #262b35; padding-top:8px; }
  .a3d-feat{ display:grid; gap:6px; padding:7px; border:1px solid #262b35; border-radius:6px; background:#10141a; }
  .a3d-feat-head{ display:flex; align-items:center; gap:6px; min-width:0; }
  .a3d-feat-type{ font:600 12px var(--font-body); color:#2FD9C4; white-space:nowrap; }
  .a3d-feat-type.cut{ color:#FF8A8A; }
  .a3d-feat-sk{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:left; background:none; border:1px dashed #2f3643; color:#C6CFDB; border-radius:4px; padding:2px 6px; font:11.5px var(--font-body); cursor:pointer; }
  .a3d-feat-sk:hover{ border-color:#FFD54A; color:#FFD54A; }
  .a3d-feat-miss{ flex:1; color:#FF8A8A; font-size:11.5px; }
  .a3d-feat-issue{ color:#FFD54A; font-size:11px; line-height:1.4; }
  .a3d-coords .a3d-feats{ max-height:46vh; overflow:auto; }
  /* 3D Design : couleur des pièces (fabrics-material.js) — couleur de la pièce, pinceau « Peindre une face ». */
  .a3d-colors{ display:grid; gap:6px; border-top:1px solid #262b35; padding-top:8px; }
  .a3d-col-row{ display:flex; align-items:center; gap:8px; min-width:0; }
  .a3d-coords label.a3d-col-swatch{ display:block; flex:none; width:28px; height:24px; padding:0; border:1px solid #2f3643; border-radius:5px; overflow:hidden; cursor:pointer; }
  .a3d-coords .a3d-col-swatch input[type="color"]{ display:block; width:44px; height:38px; margin:-7px; padding:0; border:none; border-radius:0; background:none; cursor:pointer; }
  .a3d-col-swatch:focus-within{ outline:2px solid #2FD9C4; outline-offset:1px; }
  .a3d-col-name{ flex:1; min-width:0; color:#C6CFDB; }
  .a3d-col-paint{ flex:1; background:none; border:1px solid #2f3643; color:#C6CFDB; border-radius:5px; padding:4px 8px; cursor:pointer; font:12px var(--font-body); }
  .a3d-col-paint:hover{ color:#EDEDED; border-color:#3a4150; }
  .a3d-col-paint.on{ border-color:#2FD9C4; color:#2FD9C4; background:rgba(47,217,196,.08); }
  .a3d-col-paint:focus-visible, .a3d-col-faces button:focus-visible{ outline:2px solid #2FD9C4; outline-offset:1px; }
  .a3d-col-faces{ display:flex; align-items:center; justify-content:space-between; gap:8px; color:#8A93A3; font-size:11px; }
  .a3d-col-faces button{ background:none; border:none; color:#FF8A8A; font:11px var(--font-body); cursor:pointer; padding:2px 0; }
  .a3d-col-faces button:hover{ text-decoration:underline; }
  .a3d-col-count{ flex:none; color:#8A93A3; font-size:11px; }
  /* 3D Design : carte de texture (fabrics-texmap.js) — panneau à droite de la vue 3D, qui reste visible. */
  .a3d-work{ display:flex; flex:1; min-height:0; }
  .a3d-work > .a3d-viewport{ min-width:0; }
  .a3d-texmap{ flex:none; width:min(46vw, 760px); display:flex; flex-direction:column; min-height:0; background:#14171d; border-left:1px solid #2f3643; color:#C6CFDB; font:12.5px var(--font-body); }
  .a3d-texmap[hidden]{ display:none; }
  .txm-head{ display:flex; align-items:center; gap:8px; padding:8px 10px; border-bottom:1px solid #262b35; }
  .txm-title{ font:700 11.5px var(--font-display); letter-spacing:.12em; text-transform:uppercase; color:#2FD9C4; white-space:nowrap; }
  .txm-part{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:#EDEDED; }
  .txm-done{ background:none; border:1px solid #1f5a53; color:#2FD9C4; border-radius:5px; padding:4px 12px; font:12.5px var(--font-body); cursor:pointer; }
  .txm-tools{ display:flex; align-items:center; gap:6px; padding:6px 10px; border-bottom:1px solid #262b35; flex-wrap:wrap; }
  .txm-tools button, .txm-btns button, .txm-l-fix{ background:none; border:1px solid #2f3643; color:#C6CFDB; border-radius:5px; padding:4px 9px; font:12px var(--font-body); cursor:pointer; white-space:nowrap; }
  .txm-tools button:hover:not(:disabled), .txm-btns button:hover, .txm-l-fix:hover{ color:#EDEDED; border-color:#3a4150; }
  .txm-tools button:disabled{ opacity:.4; cursor:default; }
  .txm-btns button.on{ border-color:#2FD9C4; color:#2FD9C4; background:rgba(47,217,196,.08); }
  .txm-btns button.danger{ color:#FF8A8A; }
  .txm-texmap button:focus-visible, .a3d-texmap button:focus-visible, .a3d-texmap input:focus-visible, .txm-layer:focus-visible{ outline:2px solid #2FD9C4; outline-offset:1px; }
  .txm-sep{ width:1px; align-self:stretch; background:#262b35; margin:2px 2px; }
  .txm-flex{ flex:1; }
  .txm-zoom{ min-width:44px; text-align:center; color:#8A93A3; font:12px var(--mono); }
  .txm-stage{ position:relative; flex:1; min-height:180px; overflow:hidden; background:#0b0e13; }
  .txm-stage canvas{ position:absolute; inset:0; width:100%; height:100%; display:block; touch-action:none; }
  .txm-empty{ position:absolute; inset:0; display:grid; place-items:center; color:#8A93A3; padding:20px; text-align:center; }
  .txm-empty[hidden]{ display:none; }
  .txm-bottom{ display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:10px; padding:8px 10px; border-top:1px solid #262b35; max-height:42%; min-height:0; }
  .txm-layers, .txm-props{ display:flex; flex-direction:column; gap:6px; min-height:0; overflow:auto; }
  .txm-sec{ color:#8A93A3; font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
  .txm-list{ display:grid; gap:4px; }
  .txm-layer{ display:flex; align-items:center; gap:8px; padding:4px 6px; border:1px solid #262b35; border-radius:6px; background:#10141a; cursor:pointer; min-width:0; }
  .txm-layer:hover{ border-color:#3a4150; }
  .txm-layer.sel{ border-color:#2FD9C4; background:rgba(47,217,196,.07); }
  .txm-layer.txm-base{ cursor:default; border-style:dashed; }
  .txm-layer img, .txm-sw{ flex:none; width:30px; height:30px; object-fit:contain; border-radius:4px; background:#0b0e13; border:1px solid #2f3643; }
  .txm-l-txt{ display:grid; min-width:0; flex:1; }
  .txm-l-name{ color:#EDEDED; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .txm-l-meta{ color:#8A93A3; font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .txm-lost{ color:#FFD54A; }
  .txm-none, .txm-note{ color:#5B6472; font-size:11.5px; line-height:1.45; }
  .txm-zone{ display:grid; gap:1px; }
  .txm-zone b{ color:#EDEDED; font-weight:600; }
  .txm-zone span{ color:#8A93A3; font-size:11px; }
  .txm-row2{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .a3d-texmap label{ display:grid; gap:3px; color:#8A93A3; font-size:11px; }
  .a3d-texmap input[type="number"]{ width:100%; min-width:0; box-sizing:border-box; background:#0e1116; color:#EDEDED; border:1px solid #2f3643; border-radius:5px; padding:4px 6px; font:12px var(--mono); }
  .a3d-texmap label.txm-check{ display:flex; align-items:center; gap:6px; }
  .txm-btns{ display:flex; flex-wrap:wrap; gap:6px; }
  .txm-tools button.on{ border-color:#2FD9C4; color:#2FD9C4; background:rgba(47,217,196,.08); }
  .txm-paint{ gap:5px; }
  .a3d-texmap label.txm-opt{ display:flex; align-items:center; gap:4px; white-space:nowrap; }
  .a3d-texmap label.txm-opt input{ width:54px; }
  .a3d-texmap label.txm-swatch{ display:block; flex:none; width:26px; height:24px; border:1px solid #2f3643; border-radius:5px; overflow:hidden; cursor:pointer; }
  .txm-swatch input[type="color"]{ display:block; width:42px; height:38px; margin:-7px; padding:0; border:none; background:none; cursor:pointer; }
  .txm-swatch:focus-within{ outline:2px solid #2FD9C4; outline-offset:1px; }
  .txm-sw-paint{ background:repeating-linear-gradient(135deg, #d9342b 0 6px, #f2c200 6px 12px, #1f6feb 12px 18px); }
  .txm-projmenu{ top:6px; }
  .a3d-droplabel{ position:fixed; z-index:430; pointer-events:none; background:rgba(14,17,22,.92); border:1px solid #1f5a53; color:#2FD9C4; border-radius:5px; padding:3px 8px; font:12px var(--font-body); white-space:nowrap; }
  .a3d-droplabel[hidden]{ display:none; }
  .txm-chips{ display:flex; flex-wrap:wrap; gap:4px; }
  .txm-chip{ background:none; border:1px solid #2f3643; color:#C6CFDB; border-radius:12px; padding:2px 9px; font:11.5px var(--font-body); cursor:pointer; }
  .txm-chip:hover{ border-color:#3a4150; color:#EDEDED; }
  .txm-chip.on{ border-color:#2FD9C4; color:#2FD9C4; background:rgba(47,217,196,.08); }
  .txm-hint{ padding:6px 10px; border-top:1px solid #262b35; color:#5B6472; font-size:11px; }
  @media (max-width:900px){
    .a3d-work{ flex-direction:column; }
    .a3d-texmap{ width:auto; height:58%; border-left:none; border-top:1px solid #2f3643; }
    .txm-bottom{ grid-template-columns:1fr; max-height:46%; }
    .txm-hint{ display:none; }
  }
  .a3d-sk-label{ position:absolute; z-index:15; pointer-events:none; background:rgba(14,17,22,.92); border:1px solid #4a4222; color:#FFD54A; border-radius:5px; padding:2px 7px; font:12px var(--mono); font-variant-numeric:tabular-nums; white-space:nowrap; }
  .a3d-sk-label[hidden]{ display:none; }
  .a3d-plane-menu{ position:absolute; z-index:25; width:250px; background:#14171d; border:1px solid #2f3643; border-radius:8px; box-shadow:0 18px 44px rgba(0,0,0,.55); padding:6px; display:grid; gap:2px; }
  .a3d-plane-menu[hidden]{ display:none; }
  .a3d-pm-title{ font:700 11px var(--font-display); letter-spacing:.12em; text-transform:uppercase; color:#2FD9C4; padding:4px 8px 6px; }
  .a3d-plane-menu button{ display:grid; grid-template-columns:1fr auto; gap:1px 8px; text-align:left; background:none; border:1px solid transparent; border-radius:6px; padding:7px 9px; color:#EDEDED; font:13px var(--font-body); cursor:pointer; }
  .a3d-plane-menu button:hover, .a3d-plane-menu button:focus-visible{ background:#1f2a33; border-color:#2f3a44; outline:none; }
  .a3d-pm-axes{ font:11px var(--mono); color:#FFD54A; align-self:center; }
  .a3d-pm-hint{ grid-column:1 / -1; color:#8A93A3; font-size:11.5px; }
  @media (max-width:900px){ .a3d-sk-snap{ font-size:0; gap:0; } }
  /* Enregistrer plusieurs objets : fusion en un objet, ou scène Fabrics. */
  .modal.a3d-sm-modal{ width:100%; max-width:min(520px, calc(100vw - 32px)); }
  .a3d-sm-opts{ display:grid; gap:10px; margin:4px 0 12px; }
  .a3d-sm-opt{ display:grid; gap:4px; text-align:left; padding:12px 14px; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--text); font:13px/1.45 var(--font-body); cursor:pointer; }
  .a3d-sm-opt b{ font-size:14px; }
  .a3d-sm-opt span{ color:var(--text-dim); }
  .a3d-sm-opt:hover, .a3d-sm-opt:focus-visible{ border-color:var(--teal); outline:none; }
  @media (max-width:900px){ .a3d-tools .tb-tool span{ display:none; } .a3d-coords:not(.collapsed){ top:auto; bottom:56px; width:min(250px, 78vw); } }
  /* Éditeur de fixture : objet de Fabrics qui n'est pas une fixture, affiché
     en lecture seule (fabrics-viewer.js). */
  .gpe-ref{ position:relative; flex:1; min-height:0; }
  .gpe-ref-view{ position:absolute; inset:0; overflow:hidden; }
  .gpe-ref-view canvas{ display:block; }
  .gpe-ref-card{ position:absolute; top:12px; left:50%; transform:translateX(-50%); width:max-content; max-width:min(560px, calc(100% - 24px)); display:grid; gap:6px; background:rgba(20,23,29,.94); border:1px solid #2f3643; border-radius:8px; padding:10px 14px; color:#C6CFDB; font:12.5px/1.5 var(--font-body); box-shadow:0 12px 32px rgba(0,0,0,.4); }
  .gpe-ref-card b{ color:#EDEDED; }
  .gpe-ref-card .gpe-empty-actions{ justify-content:flex-start; }
  #gdtf-part-editor-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  .view-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom: 26px; }
  .view-title{ font-family: var(--font-display); font-weight:700; font-size:22px; }
  .doc-title-editable{ cursor:pointer; border-radius:6px; padding:2px 6px; margin:-2px -6px; transition: background .12s ease; }
  .doc-title-editable:hover{ background: var(--surface-2); }
  .view-sub{ font-family: var(--mono); font-size:12px; color: var(--text-faint); margin-top:4px; }
  .btn{ font-family: var(--font-display); font-weight:600; font-size:13px; border-radius:7px; padding:9px 16px; cursor:pointer; border:1px solid transparent; display:inline-flex; align-items:center; gap:7px; }
  .btn-primary{ background: var(--teal); color: var(--on-accent); }
  .btn-primary:hover{ filter:brightness(1.08); }
  .btn-ghost{ background:none; border-color: var(--border); color: var(--text-dim); }
  .btn-ghost:hover{ color: var(--text); border-color: var(--text-dim); }
  .btn-danger{ background: var(--red); color: #fff; }
  .btn-danger:hover{ filter: brightness(1.08); }
  .confirm-modal-text{ font-family: var(--mono); font-size:12.5px; color: var(--text-dim); line-height:1.6; margin-bottom:22px; }

  .app-toast{ position:fixed; bottom:24px; left:50%; transform:translate(-50%, 12px); background: var(--surface-3); border:1px solid var(--border); color: var(--text); font-family: var(--mono); font-size:12.5px; padding:10px 18px; border-radius:8px; box-shadow: 0 10px 30px rgba(0,0,0,0.35); opacity:0; transition: opacity .2s ease, transform .2s ease; z-index:300; pointer-events:none; }
  .app-toast.show{ opacity:1; transform:translate(-50%, 0); }

  .elec-color-panel{ display:none; position:fixed; top:120px; right:24px; width:230px; background: var(--surface); border:1px solid var(--border); border-radius:10px; box-shadow: 0 16px 40px rgba(0,0,0,0.4); z-index:150; }
  .elec-color-panel.show{ display:block; }
  .ecp-header{ display:flex; align-items:center; justify-content:space-between; padding:10px 12px; border-bottom:1px solid var(--border); cursor:grab; user-select:none; }
  .ecp-header:active{ cursor:grabbing; }
  .ecp-header span{ font-family: var(--font-display); font-weight:600; font-size:13px; color: var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .ecp-body{ padding:12px; display:flex; flex-direction:column; gap:8px; max-height:60vh; overflow-y:auto; }
  .ecp-none{ width:100%; text-align:left; background: var(--surface-2); border:1px solid var(--border); color: var(--text-dim); font-family: var(--mono); font-size:11.5px; padding:8px 10px; border-radius:7px; cursor:pointer; }
  .ecp-none.active{ border-color: var(--text-dim); color: var(--text); }
  .ecp-none:hover{ color: var(--text); }
  .ecp-swatch-row{ display:flex; align-items:center; gap:9px; }
  .ecp-swatch{ width:22px; height:22px; border-radius:50%; border:2px solid transparent; cursor:pointer; flex-shrink:0; }
  .ecp-swatch.active{ border-color: var(--text); }
  .ecp-swatch-name{ flex:1; min-width:0; background: var(--surface-2); border:1px solid var(--border); border-radius:6px; padding:6px 8px; color: var(--text); font-family: var(--font-body); font-size:11.5px; outline:none; }
  .ecp-swatch-name:focus{ border-color: var(--teal); }

  /* ---------- PROJECTS ---------- */
  .project-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
  .project-card{ position:relative; background: var(--surface); border:1px solid var(--border); border-radius:10px; padding:18px; cursor:pointer; transition: border-color .15s ease; }
  .project-card:hover{ border-color: var(--text-faint); }
  /* Carte d'un projet/document PARTAGÉ AVEC MOI — retour utilisateur
     explicite : "une couleur différente sur la carte et un logo d'équipe
     un peu bateau comme le logo de msn a l'époque" — même violet que les
     badges "Personnel"/"Accès accordé" de la Bibliothèque (#8B5CF6),
     cohérent avec le langage visuel déjà associé à "accès à autre chose
     que le mien" dans le reste de l'app. */
  .project-card-shared{ border-color: rgba(139,92,246,0.45); background: rgba(139,92,246,0.05); }
  .project-card-shared:hover{ border-color: #8B5CF6; }
  /* Carte d'un projet D'ENTREPRISE (2026-08-04) — couleur distincte du
     violet "partagé entre utilisateurs basiques" ci-dessus (retour
     utilisateur explicite : "les projets d'entreprise ont une autre
     couleur de carte [...] autre que les projets partagés entre
     utilisateur basique"), ambre pour rester cohérent avec le reste de la
     palette d'accent (voir .lib-badge-borrowed) plutôt qu'inventer une
     nouvelle teinte. */
  .project-card-company{ border-color: rgba(217,119,6,0.45); background: rgba(217,119,6,0.06); }
  .project-card-company:hover{ border-color: #D97706; }
  .pc-top{ display:flex; align-items:flex-start; justify-content:space-between; }
  .pc-icon{ width:34px; height:34px; border-radius:8px; background: var(--surface-2); display:flex; align-items:center; justify-content:center; color: var(--teal); }
  .pc-icon-logo img{ width:100%; height:100%; object-fit:contain; border-radius:8px; }
  .pc-shared-badge{ display:flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:999px; background: rgba(139,92,246,0.16); color:#8B5CF6; margin-left:6px; flex-shrink:0; }
  .pc-shared-badge-company{ background: rgba(217,119,6,0.16); color:#D97706; }
  .pc-menu-btn{ background:none; border:none; color: var(--text-faint); cursor:pointer; padding:4px; border-radius:5px; }
  .pc-menu-btn:hover{ color: var(--text); background: var(--surface-2); }
  .pc-name{ font-family: var(--font-display); font-weight:600; font-size:14.5px; margin-top:14px; }
  .pc-date{ font-family: var(--mono); font-size:11px; color: var(--text-faint); margin-top:4px; }
  .pc-meta{ font-family: var(--mono); font-size:10.5px; color: var(--teal); margin-top:8px; }
  .badge-row{ display:flex; gap:6px; margin-top:12px; flex-wrap:wrap; }
  .badge{ font-family: var(--mono); font-size:9.5px; font-weight:600; letter-spacing:0.04em; background: var(--surface-3); border:1px solid var(--border); color: var(--teal); border-radius:5px; padding:3px 6px; }
  .pc-dropdown{ position:absolute; top:44px; right:14px; background: var(--surface-3); border:1px solid var(--border); border-radius:8px; padding:6px; display:none; z-index:5; min-width:150px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
  .pc-dropdown.show{ display:block; }
  .pc-dropdown button{ width:100%; text-align:left; background:none; border:none; color: var(--text); font-size:12.5px; padding:8px 10px; border-radius:6px; cursor:pointer; display:flex; align-items:center; gap:8px; }
  .pc-dropdown button:hover{ background: var(--surface-2); }
  .pc-dropdown button.danger{ color: var(--red); }

  .empty-state{ border: 1.5px dashed var(--border); border-radius:12px; padding: 60px 24px; text-align:center; }
  .empty-state svg{ color: var(--text-faint); margin-bottom:14px; }
  .empty-state h3{ font-family: var(--font-display); font-size:16px; margin-bottom:6px; }
  .empty-state p{ font-family: var(--mono); font-size:12px; color: var(--text-dim); margin-bottom:18px; }

  /* ---------- MODAL ---------- */
  .modal-overlay{ position:fixed; inset:0; background: rgba(8,10,14,0.65); display:none; align-items:center; justify-content:center; z-index:50; }
  .modal-overlay.show{ display:flex; }
  .modal{ background: var(--surface); border:1px solid var(--border); border-radius:10px; padding:24px; width:100%; max-width:340px; }
  .modal h3{ font-family: var(--font-display); font-size:16px; margin-bottom:16px; }
  .modal.wide{ max-width:460px; max-height:85vh; overflow-y:auto; }
  #el-info-modal-overlay .modal.wide{ max-width:640px; }
  #plan-crop-modal-overlay .modal{ max-width:720px; }
  #led-wall-advanced-modal-overlay .modal{ max-width:min(1500px, 94vw); width:94vw; max-height:92vh; }
  /* Import de fiche technique dans le Rapport (2026-08-25) — la grille de
     vignettes de pages PDF a besoin de nettement plus de place que le
     ".modal.wide" générique (460px). */
  #libdoc-picker-modal-overlay .modal{ max-width:min(760px, 92vw); max-height:85vh; overflow-y:auto; }
  .libdoc-pages-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap:10px; max-height:55vh; overflow-y:auto; padding:2px; }
  .libdoc-page-cell{ display:flex; flex-direction:column; align-items:center; gap:4px; padding:6px; border:2px solid var(--border); border-radius:8px; background: var(--surface-2); cursor:pointer; font-family: var(--mono); font-size:11px; color: var(--text-dim); }
  .libdoc-page-cell canvas{ max-width:100%; border-radius:4px; background:#fff; }
  .libdoc-page-cell:hover{ border-color: var(--text-faint); }
  .libdoc-page-cell.selected{ border-color: var(--teal); background: rgba(47,217,196,0.1); color: var(--text); }
  /* Modale "Profil" du Truss Builder (2026-08-15) — le plan 2D doit tenir
     aussi grand que la fenêtre 3D (retour utilisateur explicite), la
     modale générique à 460px de large ne laisserait presque aucune place
     au canevas. Le canevas lui-même est dimensionné en JS
     (computeProfileCanvasDims()) d'après la taille réelle de #tb-viewport,
     ce cadre plus large n'est qu'un espace suffisant pour l'accueillir. */
  #tb-profile-modal-overlay .modal{ max-width:min(1400px, 94vw); width:94vw; max-height:92vh; overflow-y:auto; }

  .lib-cat-tabs{ display:flex; gap:8px; margin-bottom:22px; }
  .ds-sort-control{ display:flex; align-items:center; gap:8px; margin-bottom:16px; }
  .ds-sort-label{ font-family: var(--mono); font-size:11px; color: var(--text-faint); text-transform:uppercase; letter-spacing:0.05em; }
  .lib-cat-tab{ font-family: var(--font-display); font-weight:600; font-size:12.5px; padding:8px 14px; border-radius:999px; border:1px solid var(--border); background: var(--surface); color: var(--text-dim); cursor:pointer; }
  .lib-cat-tab.active{ background: var(--surface-2); color: var(--teal); border-color: rgba(47,217,196,0.35); }

  .lib-breadcrumb{ display:flex; align-items:center; gap:6px; margin-bottom:16px; flex-wrap:wrap; }
  .lib-crumb{ background:none; border:none; color: var(--text-faint); font-family: var(--font-body); font-size:12.5px; cursor:pointer; padding:3px 6px; border-radius:5px; }
  .lib-crumb:hover{ color: var(--text); background: var(--surface-2); }
  .lib-crumb.active{ color: var(--text); font-weight:600; }
  .lib-crumb.drag-over{ background: rgba(47,217,196,0.15); color: var(--teal); }
  .lib-crumb-sep{ color: var(--text-faint); font-size:12px; }
  .lib-folder-card{ cursor:pointer; }
  .lib-folder-card.drag-over{ border-color: var(--teal); background: rgba(47,217,196,0.06); }
  .lib-card.lib-card-base{ border-left: 3px solid var(--teal); }
  .lib-folder-card.lib-card-base .pc-icon{ color: var(--teal); }
  /* Aperçu de carte (2026-08-05) — fond blanc fixe, comme le mini rendu 3D
     de la fiche détail (scene3d-preview.js) : une silhouette sombre (la
     plupart des projecteurs/structures le sont) resterait illisible sur le
     fond sombre du thème par défaut. */
  .lib-card-thumb{ width:100%; aspect-ratio:4/3; border-radius:8px; background:#fff; margin-bottom:10px; overflow:hidden; display:flex; align-items:center; justify-content:center; }
  .lib-card-thumb img{ width:100%; height:100%; object-fit:contain; display:block; }
  .lib-card-thumb-ph{ width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#c3c8d2; }
  .lib-card-thumb-ph svg{ width:34px; height:34px; }
  .lib-card-thumb-rigpoint2d{ width:60%; height:60%; display:flex; align-items:center; justify-content:center; }
  .lib-card-thumb-rigpoint2d svg{ width:100%; height:100%; }
  .lib-badge{ display:inline-block; font-family: var(--font-body); font-size:10.5px; font-weight:600; padding:2px 7px; border-radius:999px; vertical-align:middle; margin-left:4px; }
  .lib-badge-site{ background: var(--teal); color: var(--on-accent); }
  /* produit publié depuis le portail fabricants (bibliotheque.js manufacturerBadgeHTML) */
  .lib-badge-mfr{ background: transparent; color: #2E9E57; border:1px solid #2E9E57; }
  .lib-badge-personal{ background: rgba(139,92,246,0.12); color: #8B5CF6; border:1px solid rgba(139,92,246,0.35); }
  .lib-badge-pending{ background: rgba(240,166,59,0.12); color: var(--amber); border:1px solid rgba(240,166,59,0.35); }
  .lib-badge-rejected{ background: rgba(220,80,80,0.12); color: #d55; border:1px solid rgba(220,80,80,0.35); }
  .lib-badge-gradateur{ background: rgba(139,92,246,0.12); color: #8B5CF6; border:1px solid rgba(139,92,246,0.35); }
  .lib-badge-warning{ background:#d32f2f; color:#fff; border:1px solid #d32f2f; display:inline-flex; align-items:center; gap:3px; }
  .lib-badge-warning svg{ flex-shrink:0; }
  .lib-badge-borrowed{ background: rgba(240,166,59,0.16); color: var(--amber); border:1px solid rgba(240,166,59,0.45); display:inline-flex; align-items:center; gap:3px; }
  .lib-badge-borrowed svg{ flex-shrink:0; }
  /* Puces d'étiquettes de catégorie (2026-08-25, params.categoryTags,
     multi-valeurs, posables sur N'IMPORTE quel item — voir bibliotheque.js
     libTagsChipsHTML()) — sous le nom/résumé de la carte, jamais mêlées aux
     .lib-badge (statut/scope, sémantique différente : un état du système,
     pas une étiquette libre posée par l'utilisateur). */
  .lib-tag-chips{ display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
  .lib-tag-chip{ font-family: var(--mono); font-size:10px; padding:2px 7px; border-radius:10px; background: var(--surface-3); color: var(--text-dim); }
  .lib-tag-chip.lib-review-chip{ background: #f59e0b; color: #1a1205; font-weight: 600; }
  .lib-mod-panel{ border:1px solid var(--border); border-radius:10px; padding:14px 16px; background: var(--surface); }
  .lib-mod-panel h4{ font-family: var(--font-display); font-size:13px; margin:0 0 10px; color: var(--text); }
  .lib-mod-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 0; border-top:1px solid var(--border); }
  .lib-mod-row:first-of-type{ border-top:none; }
  .lib-mod-row-name{ font-size:13px; color: var(--text); }
  .lib-mod-row-actions{ display:flex; gap:6px; flex-shrink:0; }
  .lib-move-tree{ max-height:320px; overflow-y:auto; margin-top:4px; }

  /* ---------- Panneau admin > Utilisateurs — ligne accordéon ---------- */
  .admin-user-list{ padding:4px 8px; }
  .admin-user-row{ border-top:1px solid var(--border); }
  .admin-user-row:first-child{ border-top:none; }
  .admin-user-row-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 6px; cursor:pointer; flex-wrap:wrap; }
  .admin-user-row-head:hover{ background: var(--surface-2); border-radius:8px; }
  .admin-user-row.expanded .admin-user-row-head{ background: var(--surface-2); border-radius:8px 8px 0 0; }
  .admin-user-row-head-main{ display:flex; align-items:baseline; gap:8px; min-width:0; }
  .admin-user-row-name{ font-size:14px; font-weight:600; color: var(--text); white-space:nowrap; }
  .admin-user-row-email{ font-size:12px; color: var(--text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .admin-user-row-head-meta{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
  .admin-user-row-chevron{ color: var(--text-dim); font-size:12px; width:14px; text-align:center; }
  .admin-user-usage{ margin:4px 0 12px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); }
  .admin-user-usage-head{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:6px; }
  .admin-user-usage-head > span:first-child{ font-family:var(--mono); font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--text-faint); }
  .admin-user-usage-head strong{ font-size:16px; }
  .admin-user-usage-list{ display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:2px 18px; }
  .admin-user-usage-row{ display:flex; justify-content:space-between; gap:8px; font-size:12.5px; padding:3px 0; border-bottom:1px dashed var(--border); }
  .admin-user-row-detail{ padding:12px 14px 16px; background: var(--surface-2); border-radius:0 0 8px 8px; display:flex; flex-direction:column; gap:12px; }
  .admin-user-detail-field{ display:flex; align-items:center; gap:8px; }
  .admin-user-profile{ display:flex; align-items:center; gap:14px; }
  .admin-user-avatar{ width:96px; height:96px; font-size:28px; text-decoration:none; }
  .admin-user-profile-main{ display:flex; flex-direction:column; gap:6px; min-width:0; }
  .admin-user-profile-name{ font-weight:600; overflow-wrap:anywhere; }
  #admin-moderation-ok:disabled{ opacity:.45; cursor:not-allowed; filter:none; }
  .admin-user-detail-actions{ display:flex; gap:6px; flex-wrap:wrap; align-items:center; }

  /* ---------- Panneau admin > Apparence ---------- */
  .branding-upload-row{ display:flex; align-items:center; gap:14px; }
  .branding-upload-preview{ width:64px; height:64px; border:1px solid var(--border); border-radius:8px; background: var(--surface-2); display:flex; align-items:center; justify-content:center; flex-shrink:0; overflow:hidden; }
  .branding-upload-preview img{ max-width:100%; max-height:100%; object-fit:contain; }
  .branding-upload-preview-sm{ width:40px; height:40px; }
  /* fond / vidéo (page d'accueil, maintenance) : aperçu 16:9, image ou vidéo */
  .branding-upload-preview.media-wide{ width:192px; height:108px; }
  .branding-upload-preview.media-wide img, .branding-upload-preview.media-wide video{ width:100%; height:100%; max-width:none; max-height:none; object-fit:cover; }
  .branding-upload-empty{ font-size:10px; color: var(--text-faint); text-align:center; padding:4px; }
  .branding-upload-actions{ display:flex; gap:8px; flex-wrap:wrap; }
  .branding-color-cols{ display:grid; grid-template-columns:1fr 1fr; gap:20px; }
  .branding-color-col-title{ font-family: var(--font-display); font-size:12px; font-weight:600; color: var(--text-dim); margin-bottom:8px; }
  .branding-color-row{ display:flex; align-items:center; gap:8px; padding:6px 0; }
  .branding-color-row label{ flex:1; font-size:12.5px; color: var(--text); }
  .branding-color-row input[type="color"]{ width:28px; height:28px; padding:0; border:1px solid var(--border); border-radius:6px; background:none; cursor:pointer; flex-shrink:0; }
  .branding-color-row input[type="text"]{ width:90px; flex-shrink:0; font-family: var(--mono); font-size:12px; padding:6px 8px; }
  @media (max-width: 720px){ .branding-color-cols{ grid-template-columns:1fr; } }
  .lib-move-row{ display:flex; align-items:center; gap:9px; width:100%; text-align:left; background:none; border:none; color: var(--text); font-family: var(--font-body); font-size:12.5px; padding:8px 10px; border-radius:6px; cursor:pointer; }
  .lib-move-row:hover{ background: var(--surface-2); }

  .lib-phase-toggle{ display:flex; gap:8px; }
  .plan-orientation-choice{ display:flex; gap:12px; margin-top:10px; }
  .plan-orientation-btn{ flex:1; display:flex; flex-direction:column; align-items:center; gap:10px; padding:22px 10px; border-radius:10px; border:1px solid var(--border); background: var(--surface-2); color: var(--text-dim); cursor:pointer; font-family: var(--font-body); font-size:13px; }
  .plan-orientation-btn:hover{ border-color: var(--teal); color: var(--text); }
  .plan-crop-stage{ position:relative; width:100%; max-height:60vh; overflow:hidden; background: var(--surface-2); border-radius:8px; display:flex; align-items:center; justify-content:center; user-select:none; }
  /* Réutilisé dans l'espace de travail de section (mode "Rogner", voir
     renderCropModeUI() dans rapport.js) : contrairement à la modale
     d'origine, .section-edit-viewport lui donne déjà une vraie hauteur —
     sans annuler le max-height:60vh hérité, la boîte reste à hauteur 0 tant
     que son contenu (dimensionné d'après SA PROPRE hauteur, boucle
     circulaire) n'en a pas encore une, et tout s'effondre à l'affichage. */
  .section-edit-viewport .plan-crop-stage{ height:100%; max-height:none; }
  .plan-crop-stage img{ max-width:100%; max-height:60vh; display:block; pointer-events:none; }
  .plan-crop-rect{ position:absolute; border:2px dashed var(--teal); box-shadow: 0 0 0 3000px rgba(0,0,0,0.5); cursor:move; }
  .plan-crop-handle{ position:absolute; width:14px; height:14px; background: var(--teal); border-radius:50%; margin:-7px; }
  .plan-crop-handle[data-crop-handle="nw"]{ top:0; left:0; cursor:nwse-resize; }
  .plan-crop-handle[data-crop-handle="ne"]{ top:0; right:0; margin-right:-7px; cursor:nesw-resize; }
  .plan-crop-handle[data-crop-handle="sw"]{ bottom:0; left:0; margin-bottom:-7px; cursor:nesw-resize; }
  .plan-crop-handle[data-crop-handle="se"]{ bottom:0; right:0; margin-bottom:-7px; margin-right:-7px; cursor:nwse-resize; }
  .lib-phase-btn{ flex:1; padding:9px; border-radius:6px; border:1px solid var(--border); background: var(--surface-2); color: var(--text-dim); font-family: var(--font-body); font-size:12.5px; cursor:pointer; }
  .lib-phase-btn.active{ background: var(--surface-3); color: var(--teal); border-color: rgba(47,217,196,0.4); }

  .lib-socket-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 0; border-bottom:1px solid var(--border); }
  .lib-socket-row:last-child{ border-bottom:none; }
  .lsr-label{ font-family: var(--font-body); font-size:12.5px; color: var(--text); flex:1; }
  .lsr-sub{ display:block; font-family: var(--mono); font-size:10px; color: var(--text-faint); margin-top:2px; }
  .lsr-amp-btn{ background: var(--surface-2); border:1px solid var(--border); color: var(--text-dim); font-size:10px; padding:2px 6px; border-radius:4px; cursor:pointer; margin-right:4px; }
  .lsr-amp-btn.active{ color: var(--teal); border-color: rgba(47,217,196,0.4); }
  .lib-socket-row .af-row-input{ width:56px; flex-shrink:0; }

  .lib-power-summary{ margin-top:14px; padding-top:12px; border-top:1px solid var(--border); }
  .lib-power-line{ font-family: var(--mono); font-size:12px; color: var(--text-dim); margin-bottom:4px; }
  .lib-power-line b{ color: var(--text); }
  .lib-warning{ margin-top:8px; font-family: var(--mono); font-size:11.5px; color: var(--red); background: rgba(229,85,90,0.08); border:1px solid rgba(229,85,90,0.35); border-radius:6px; padding:8px 10px; line-height:1.5; }
  .lib-note{ margin-top:10px; font-family: var(--mono); font-size:10.5px; color: var(--text-faint); line-height:1.6; }
  .lib-checkbox-row{ display:flex; align-items:flex-start; gap:9px; font-family: var(--font-body); font-size:12.5px; color: var(--text); cursor:pointer; line-height:1.4; }

  .lib-collapsible{ border:1px solid var(--border); border-radius:8px; padding:10px 12px; }
  .lib-collapsible-head{ width:100%; display:flex; align-items:center; justify-content:space-between; background:none; border:none; color: var(--text); font-family: var(--font-body); font-size:12.5px; cursor:pointer; padding:0; }
  .lib-collapsible-head svg{ transition: transform 0.15s; flex-shrink:0; color: var(--text-faint); }
  .lib-optional-tag{ font-family: var(--mono); font-size:10px; color: var(--text-faint); margin-left:6px; }
  .lib-phase-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 0; }
  .lpr-label{ font-family: var(--font-body); font-size:12px; color: var(--text-dim); }
  .lib-phase-row .lib-phase-toggle{ flex-shrink:0; }
  .lib-phase-row .lib-phase-btn{ flex:none; width:36px; padding:6px 0; font-size:11px; }
  .lib-checkbox-row input{ margin-top:2px; accent-color: var(--teal); }
  .lib-recon-fields{ margin-top:12px; padding:12px; background: var(--surface-2); border:1px solid var(--border); border-radius:8px; }
  .lib-recon-fields .af-label:first-child{ margin-top:0; }
  .pc-meta.recon{ color: var(--amber); margin-top:4px; }
  .modal-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
  .modal-head h3{ margin-bottom:0; }
  .info-row{ display:flex; justify-content:space-between; font-family: var(--mono); font-size:12px; color: var(--text-dim); padding:8px 0; border-bottom:1px solid var(--border); }
  .info-row b{ color: var(--text); font-weight:500; }
  .module-list{ display:flex; flex-direction:column; gap:9px; margin-top:6px; }
  .module-row{ display:flex; align-items:center; gap:9px; font-family: var(--mono); font-size:12px; color: var(--text-faint); }
  .module-row.on{ color: var(--text); }
  .module-row .dot{ width:7px; height:7px; border-radius:50%; background: var(--border); flex-shrink:0; }
  .module-row.on .dot{ background: var(--teal); }
  .modal .field{ margin-bottom:18px; }
  .modal-actions{ display:flex; gap:10px; }
  .modal-actions .btn{ flex:1; justify-content:center; }

  .panel{ background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 22px; margin-top: 16px; display:none; }
  .panel.show{ display:block; }
  .panel h4{ font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
  .section-title{ font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }

  .placeholder-view{ border: 1.5px dashed var(--border); border-radius:12px; padding: 60px 24px; text-align:center; }
  .placeholder-view h3{ font-family: var(--font-display); font-size:16px; margin-bottom:6px; }
  .placeholder-view p{ font-family: var(--mono); font-size:12px; color: var(--text-dim); }

  .pd-back{ margin-bottom:18px; }
  .pd-section-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
  .report-meta-line{ font-family: var(--mono); font-size:11px; color: var(--text-faint); margin-bottom:16px; }

  .doc-card-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap:14px; }
  .doc-card{ position:relative; background: var(--surface); border:1px solid var(--border); border-radius:10px; padding:16px; cursor:pointer; transition: border-color .15s ease; }
  .doc-card:hover{ border-color: var(--text-dim); }
  .doc-card-top{ display:flex; align-items:flex-start; justify-content:space-between; }
  .doc-card-icon{ width:32px; height:32px; border-radius:8px; background: var(--surface-2); display:flex; align-items:center; justify-content:center; color: var(--teal); flex-shrink:0; }
  .doc-card-actions{ display:flex; align-items:center; gap:2px; }
  .doc-card-menu-wrap{ position:relative; }
  .doc-card-name{ font-family: var(--font-display); font-weight:600; font-size:13.5px; margin-top:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .doc-card-meta{ font-family: var(--mono); font-size:10.5px; color: var(--text-faint); margin-top:4px; }
  /* Recherche des pages Projets / projet (2026-11-06) : champ de l'en-tête, dossier d'un document trouvé */
  .view-search{ flex:0 1 220px; width:220px; min-width:130px; height:38px; box-sizing:border-box; }
  .view-actions > :not(.view-search){ flex-shrink:0; } /* c'est le champ qui cède la place, jamais les boutons */
  .doc-card-where{ display:flex; align-items:center; gap:5px; margin-top:4px; min-width:0; font-family: var(--mono); font-size:10.5px; color: var(--text-dim); }
  .doc-card-where svg{ width:12px; height:12px; flex-shrink:0; }
  .doc-card-where span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .pd-search-scope{ font-family: var(--mono); font-size:12px; color: var(--text-dim); }
  .project-grid > .empty-hint{ grid-column:1 / -1; }
  #pd-filter-wrap{ display:flex; } /* le bouton Filtrer prend la hauteur des autres boutons (il était écrasé) */
  /* Invitations (2026-11-06, invites-panel.js) : Panneau admin › Utilisateurs › Invitations et Mon compte › Entreprise */
  .inv-count{ font-family: var(--mono); font-size:10.5px; opacity:.75; margin-left:2px; }
  .inv-toolbar{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
  .inv-toolbar .inv-filters{ margin-bottom:0; flex-wrap:wrap; flex:1 1 auto; }
  .inv-toolbar #inv-search{ flex:0 1 240px; min-width:160px; }
  .inv-actions{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; min-height:44px; padding:8px 12px; margin-bottom:10px; border:1px solid var(--border); border-radius:10px; background: var(--surface); }
  .inv-actions.empty{ border-style:dashed; background:none; }
  .inv-actions-who{ display:flex; align-items:center; gap:8px; min-width:0; overflow-wrap:anywhere; }
  .inv-actions-btns{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
  .inv-actions-btns select{ width:auto; height:34px; }
  .inv-danger{ color: var(--red); border-color: rgba(229,85,90,0.4); }
  .inv-fallback{ margin-bottom:10px; }
  .inv-list{ display:flex; flex-direction:column; gap:6px; }
  .inv-row{ display:grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) auto; gap:14px; align-items:center; padding:9px 12px; border:1px solid var(--border); border-radius:10px; background: var(--surface); cursor:pointer; }
  .inv-row:hover{ border-color: var(--text-faint); }
  .inv-row.selected{ border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal) inset; }
  .inv-cell{ min-width:0; font-size:12.5px; overflow-wrap:anywhere; }
  .inv-cell small{ display:block; font-family: var(--mono); font-size:10.5px; color: var(--text-faint); margin-top:2px; }
  .inv-who{ font-weight:600; }
  .inv-badge{ font-size:10.5px; font-weight:600; padding:2px 8px; border-radius:999px; white-space:nowrap; border:1px solid var(--border); color: var(--text-dim); background: var(--surface-2); }
  .inv-badge.pending{ color: var(--teal); background: rgba(47,217,196,0.12); border-color: rgba(47,217,196,0.35); }
  .inv-badge.expired{ color: #E0A93B; background: rgba(224,169,59,0.12); border-color: rgba(224,169,59,0.35); }
  .inv-badge.revoked{ color: var(--red); background: rgba(229,85,90,0.12); border-color: rgba(229,85,90,0.35); }
  @media (max-width: 900px){
    .inv-row{ grid-template-columns: minmax(0,1fr) auto; }
    .inv-row .inv-cell:not(.inv-who){ grid-column:1 / 2; }
    .inv-row .inv-badge{ grid-column:2; grid-row:1; align-self:start; }
    .inv-toolbar #inv-search{ flex:1 1 100%; }
  }
  .doc-card-dropdown{ position:absolute; top:100%; right:0; margin-top:4px; background: var(--surface-3); border:1px solid var(--border); border-radius:8px; padding:6px; min-width:160px; display:none; z-index:20; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
  .doc-card-dropdown.show{ display:block; }

  /* ---------- Mode lignes de Projets et des documents d'un projet (2026-11-04, participants.js) :
     sélecteur cartes / lignes, date écrite, logos du créateur et des comptes les plus actifs. ---------- */
  .view-toggle{ display:inline-flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; background: var(--surface); }
  .view-toggle .vt-btn{ background:transparent; border:0; color: var(--text-faint); padding:6px 9px; cursor:pointer; display:flex; align-items:center; }
  .view-toggle .vt-btn + .vt-btn{ border-left:1px solid var(--border); }
  .view-toggle .vt-btn.active{ background: var(--surface-3); color: var(--teal); }
  .view-toggle .vt-btn:hover:not(.active){ color: var(--text); }
  .acct-avs{ display:flex; align-items:center; justify-content:flex-end; min-width:0; }
  .acct-av{ width:26px; height:26px; border-radius:50%; background: var(--surface-3); border:2px solid var(--surface); display:flex; align-items:center; justify-content:center; font-family: var(--mono); font-size:10px; color: var(--teal); flex-shrink:0; overflow:hidden; margin-left:-3px; cursor:default; }
  .acct-av:first-child{ margin-left:0; }
  .acct-av img{ width:100%; height:100%; object-fit:cover; display:block; }
  .acct-av.creator{ box-shadow: 0 0 0 2px var(--teal); position:relative; z-index:1; }
  .acct-av.more{ font-size:10px; color: var(--text-dim); background: var(--surface-2); }
  /* projets */
  .project-grid.as-list{ display:flex; flex-direction:column; gap:8px; }
  .project-row{ display:grid; grid-template-columns: auto minmax(0,1fr) auto 150px auto; align-items:center; gap:16px; padding:10px 12px 10px 14px; }
  .project-row .pr-icon{ display:flex; align-items:center; }
  .project-row .pc-name{ margin-top:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .project-row .badge-row{ margin-top:5px; }
  .project-row .pr-date, .doc-card-grid.as-list .dr-date{ font-family: var(--mono); font-size:11px; color: var(--text-dim); text-align:right; white-space:nowrap; }
  .project-row .pr-menu{ position:relative; justify-self:end; }
  .doc-card-grid.as-list .doc-card-actions{ justify-self:end; }
  .project-row .pc-dropdown{ top:100%; right:0; margin-top:4px; }
  /* documents : la carte elle-même, disposée en ligne (la partie haute se « dissout » dans la grille) */
  .doc-card-grid.as-list{ display:flex; flex-direction:column; gap:8px; }
  .doc-card-grid.as-list .doc-card{ display:grid; grid-template-columns: auto minmax(0,1fr) auto 150px auto; grid-template-areas: "icon name date avs menu"; align-items:center; gap:16px; padding:9px 12px 9px 14px; }
  .doc-card-grid.as-list .doc-card-top{ display:contents; }
  .doc-card-grid.as-list .doc-card-icon{ grid-area:icon; }
  .doc-card-grid.as-list .doc-card-actions{ grid-area:menu; }
  .doc-card-grid.as-list .doc-card-name{ grid-area:name; margin-top:0; }
  .doc-card-grid.as-list .doc-card-meta{ display:none; }
  .doc-card-grid.as-list .doc-folder-card .doc-card-meta{ display:block; grid-area:date; margin-top:0; text-align:right; }
  .doc-card-grid.as-list .dr-date{ grid-area:date; }
  .doc-card-grid.as-list .acct-avs{ grid-area:avs; }
  .doc-card-grid.as-list .module-closed-badge{ grid-area:name; justify-self:end; margin-top:0; }
  .doc-card-grid.as-list .doc-card:has(> .doc-card-where){ grid-template-areas: "icon name date avs menu" "icon where date avs menu"; row-gap:2px; }
  .doc-card-grid.as-list .doc-card-where{ grid-area:where; margin-top:0; }
  @media (max-width: 900px){
    /* téléphone : nom (et menu), puis la date, puis les logos — le nom garde toute la largeur */
    .project-row{ grid-template-columns: auto minmax(0,1fr) auto; grid-template-areas: "icon main menu" "icon date date" "icon avs avs"; row-gap:6px; }
    .project-row .pr-icon{ grid-area:icon; } .project-row .pr-main{ grid-area:main; } .project-row .pr-menu{ grid-area:menu; }
    .project-row .pr-date{ grid-area:date; text-align:left; white-space:normal; } .project-row .acct-avs{ grid-area:avs; justify-content:flex-start; }
    .doc-card-grid.as-list .doc-card{ grid-template-columns: auto minmax(0,1fr) auto; grid-template-areas: "icon name menu" "icon date date" "icon avs avs"; row-gap:5px; }
    .doc-card-grid.as-list .doc-card:has(> .doc-card-where){ grid-template-areas: "icon name menu" "icon where where" "icon date date" "icon avs avs"; }
    .doc-card-grid.as-list .dr-date, .doc-card-grid.as-list .doc-folder-card .doc-card-meta{ text-align:left; white-space:normal; }
    .doc-card-grid.as-list .acct-avs{ justify-content:flex-start; }
    /* barre d'un projet : les boutons passent à la ligne plutôt que de sortir de l'écran */
    #pd-container .view-header > div:last-child{ flex-wrap:wrap; }
  }

  /* Glisser-déposer de fichiers OS (.pdf/.txt) — voir wireProjectHomeDropzone()
     dans project-home.js. #pd-container entier se teinte dès qu'un fichier
     survole la page ; une carte dossier précise se distingue en plus si
     c'est ELLE qui recevrait le dépôt (jamais le dossier actuellement
     ouvert dans ce cas). */
  #pd-container.pd-dropzone-active{ outline: 2px dashed var(--teal); outline-offset: -2px; border-radius:12px; background: rgba(47,217,196,0.05); }
  .doc-folder-card.doc-folder-card-drop-active{ border-color: var(--teal); background: rgba(47,217,196,0.12); box-shadow: 0 0 0 2px rgba(47,217,196,0.35); }

  .pc-menu-wrap{ position:relative; }
  .pd-new-doc-dropdown{ position:absolute; top:100%; right:0; margin-top:6px; background: var(--surface-3); border:1px solid var(--border); border-radius:8px; padding:6px; min-width:220px; display:none; z-index:20; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
  .pd-new-doc-dropdown.show{ display:block; }
  .pd-new-doc-dropdown .menubar-option{ display:flex; align-items:center; gap:10px; }

  .empty-hint{ font-family: var(--mono); font-size:12px; color: var(--text-faint); padding:8px 0; }
  .icon-only-btn{ width:38px; padding:0; display:flex; align-items:center; justify-content:center; }
  .icon-only-btn.active-filter{ color: var(--teal); border-color: rgba(47,217,196,0.4); }
  .mo-check{ display:inline-flex; width:15px; }

  .file-chip{ display:flex; align-items:center; gap:12px; background: var(--surface-2); border:1px solid var(--border); border-radius:8px; padding:12px 14px; }
  .file-chip .fc-icon{ width:32px; height:32px; border-radius:7px; background: var(--surface-3); display:flex; align-items:center; justify-content:center; color: var(--teal); flex-shrink:0; }
  .file-chip .fc-name{ font-family: var(--font-display); font-weight:600; font-size:13px; }
  .file-chip .fc-meta{ font-family: var(--mono); font-size:11px; color: var(--text-faint); margin-top:2px; }
  .file-chip .fc-remove{ margin-left:auto; }

  .elec-topline{ display:flex; align-items:center; gap:10px; margin-bottom:14px; }
  .elec-back-mini{ width:28px; height:28px; flex-shrink:0; display:flex; align-items:center; justify-content:center; background:none; border:1px solid var(--border); border-radius:6px; color: var(--text-dim); cursor:pointer; }
  .elec-back-mini:hover{ color: var(--text); border-color: var(--text-dim); }
  .elec-project-name{ font-family: var(--font-display); font-weight:700; font-size:17px; }

  .menubar{ display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid var(--border); margin-bottom:16px; padding-bottom:2px; }
  .menubar-left{ display:flex; gap:2px; min-width:0; }
  .menubar-group{ position:relative; }
  .menubar-item{ background:none; border:none; padding:8px 12px; font-family: var(--font-body); font-size:13px; color: var(--text-dim); cursor:pointer; border-radius:6px 6px 0 0; }
  .menubar-item.icon-only{ padding:8px 10px; display:flex; align-items:center; justify-content:center; }
  .menubar-layout-icons{ display:flex; gap:4px; flex-shrink:0; padding-bottom:4px; }
  .layout-icon-btn{ width:30px; height:28px; display:flex; align-items:center; justify-content:center; background: var(--surface-2); border:1px solid var(--border); border-radius:6px; color: var(--text-dim); cursor:pointer; }
  .layout-icon-btn:hover{ color: var(--text); }
  .layout-icon-btn.active{ background: var(--surface); color: var(--teal); border-color: rgba(47,217,196,0.4); }
  .layout-icon-btn.disabled{ opacity:0.35; cursor:default; }
  .menubar-item:hover{ background: var(--surface-2); color: var(--text); }
  .menubar-item.open{ background: var(--surface-2); color: var(--text); }
  .menubar-item.active-tab{ background: var(--surface-2); color: var(--teal); }
  .menubar-item.icon-only.active-tab{ box-shadow: 0 0 0 1.5px rgba(47,217,196,0.4); border-radius:6px; }
  .menubar-dropdown{ position:absolute; top:100%; left:0; margin-top:4px; background: var(--surface-3); border:1px solid var(--border); border-radius:8px; padding:6px; min-width:230px; display:none; z-index:20; box-shadow: 0 10px 30px rgba(0,0,0,0.4); max-height:70vh; overflow-y:auto; }
  .menubar-dropdown.wide{ min-width:340px; padding:14px; max-height:380px; overflow-y:auto; }
  .menubar-dropdown.show{ display:block; }
  .menubar-option{ width:100%; display:flex; align-items:center; gap:9px; text-align:left; background:none; border:none; padding:8px 10px; border-radius:6px; font-family: var(--font-body); font-size:13px; color: var(--text); cursor:pointer; }
  .menubar-option.lib-pick{ align-items:flex-start; padding:9px 10px; margin-bottom:2px; }
  .menubar-option.lib-pick:hover{ background: var(--surface-2); }
  .lib-pick-info{ display:flex; flex-direction:column; gap:3px; width:100%; }
  .lib-pick-name{ font-family: var(--font-display); font-weight:600; font-size:12.5px; color: var(--text); }
  .lib-pick-sub{ font-family: var(--mono); font-size:10px; color: var(--text-faint); line-height:1.5; }
  .lib-pick-group-label{ font-family: var(--mono); font-size:9.5px; letter-spacing:0.05em; text-transform:uppercase; color: var(--text-faint); padding:8px 10px 4px; }
  .lib-pick-group-label:first-child{ padding-top:2px; }
  .lib-pick-search{ width:100%; margin-bottom:8px; font-size:12px; }
  .lib-pick-breadcrumb{ display:flex; align-items:center; flex-wrap:wrap; gap:2px; padding:2px 2px 8px; }
  /* Fenêtres « Ouvrir » / « Enregistrer sous » / écrasement des éditeurs
     (library-dialogs.js, 2026-09-14) — au-dessus des ateliers plein écran. */
  .libdlg-overlay{ z-index:80; }
  .modal.libdlg{ max-width:560px; width:min(560px, calc(100vw - 32px)); display:flex; flex-direction:column; gap:12px; max-height:min(84vh, 760px); }
  .modal.libdlg .modal-head{ margin-bottom:0; }
  .modal.libdlg .modal-head h3{ margin:0; }
  .libdlg-nav{ display:flex; align-items:center; flex-wrap:wrap; gap:2px; min-height:28px; }
  .libdlg-list{ overflow-y:auto; min-height:180px; max-height:48vh; border:1px solid var(--border); border-radius:8px; padding:4px; display:flex; flex-direction:column; gap:1px; }
  .libdlg-row{ display:flex; align-items:center; gap:10px; width:100%; padding:8px 10px; border:none; background:none; color: var(--text); font:13px/1.3 var(--font-body); text-align:left; border-radius:6px; cursor:pointer; }
  .libdlg-row:hover, .libdlg-row:focus-visible{ background: var(--surface-2); outline:none; }
  .libdlg-row svg{ flex:none; color: var(--text-dim); }
  .libdlg-name{ display:flex; flex-direction:column; gap:1px; min-width:0; }
  .libdlg-sub{ font:11px var(--mono); color: var(--text-faint); }
  .libdlg-meta{ margin-left:auto; font:11px var(--mono); color: var(--text-faint); flex:none; }
  .libdlg-empty{ padding:22px 12px; color: var(--text-faint); font-size:12.5px; text-align:center; }
  .libdlg-field{ display:grid; gap:5px; font-size:12px; color: var(--text-dim); }
  .libdlg-newfolder{ display:flex; gap:8px; }
  .libdlg-newfolder[hidden]{ display:none; }
  .libdlg-newfolder .af-input{ flex:1; }
  .libdlg-actions{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
  .libdlg-spacer{ flex:1; }
  .libdlg-text{ margin:0; font-size:13.5px; line-height:1.5; color: var(--text-dim); }
  .libdlg-text b{ color: var(--text); }
  .libdlg-where{ margin:0; font:12px var(--mono); color: var(--text-faint); }
  .libdlg .btn:disabled{ opacity:.45; cursor:default; }
  .libdlg .libdlg-accent{ border-color: var(--teal); color: var(--teal); }
  .libdlg .libdlg-danger{ background: color-mix(in srgb, var(--red) 16%, transparent); border:1px solid var(--red); color: var(--red); }
  /* Boutons d'accès aux éditeurs, page Bibliothèque (admin/éditeur) — trait
     dans la couleur du bouton, accent teal du thème. */
  .lib-editor-btn svg{ width:16px; height:16px; flex:none; }
  .lib-editor-btn .acc{ stroke: var(--teal); }
  .lib-editor-btn:disabled{ opacity:.45; border-style:dashed; cursor:default; }
  /* « ‹ » dossier précédent (pickers + page Bibliothèque, 2026-09-14). */
  .lib-crumb.lib-crumb-back{ font-size:15px; line-height:1; padding:1px 8px 3px; border:1px solid var(--border); color: var(--text-dim); margin-right:4px; }
  .lib-crumb.lib-crumb-back:hover{ color: var(--text); background: var(--surface-3); }
  .lib-crumb.lib-crumb-back:disabled{ opacity:0.35; cursor:default; background:none; }
  .lib-pick-folder-row{ display:flex; align-items:center; gap:8px; padding:8px 10px; margin-bottom:2px; }
  .lib-pick-folder-row:hover{ background: var(--surface-2); }
  .lib-pick-folder-icon{ display:flex; color: var(--text-faint); flex-shrink:0; }
  .lib-pick-folder-name{ flex:1; font-family: var(--font-display); font-weight:600; font-size:12.5px; color: var(--text); text-align:left; }
  .lib-pick-folder-chevron{ color: var(--text-faint); font-size:14px; flex-shrink:0; }
  .elec-add-empty{ font-family: var(--mono); font-size:12px; color: var(--text-faint); text-align:center; padding:16px 10px; }
  .menubar-option:hover{ background: var(--surface-2); }
  .mo-check{ width:14px; height:14px; flex-shrink:0; color: var(--teal); display:flex; align-items:center; justify-content:center; }

  .elec-layout{ display:flex; flex-direction:column; flex:1; min-height:320px; gap:0; }
  .elec-row{ display:flex; flex:1 1 0; min-height:0; gap:0; }

  .elec-pane-wrap{ display:flex; flex-direction:column; min-width:0; min-height:0; background:transparent; border:none; border-radius:0; overflow:hidden; flex:1 1 0; }
  .elec-pane-body{ flex:1; min-height:0; overflow:auto; }
  .elec-pane-body.centered{ display:flex; align-items:center; justify-content:center; padding:20px; }

  .elec-pane-placeholder{ text-align:center; }
  .elec-pane-placeholder .icon-wrap{ width:40px; height:40px; border-radius:10px; background: var(--surface-2); display:flex; align-items:center; justify-content:center; color: var(--teal); margin:0 auto 12px; }
  .elec-pane-placeholder h3{ font-family: var(--font-display); font-size:14px; margin-bottom:6px; }
  .elec-pane-placeholder p{ font-family: var(--mono); font-size:11px; color: var(--text-dim); max-width:260px; margin:0 auto 12px; line-height:1.6; }
  .elec-soon{ font-family: var(--mono); font-size:9.5px; letter-spacing:0.06em; text-transform:uppercase; color: var(--amber); border:1px solid rgba(240,166,59,0.35); background: rgba(240,166,59,0.08); padding:3px 9px; border-radius:999px; }

  .add-form{ display:flex; flex-direction:column; }
  .af-label{ font-family: var(--mono); font-size:10.5px; color: var(--text-faint); text-transform:uppercase; letter-spacing:0.04em; margin:10px 0 5px; }
  .af-label:first-child{ margin-top:0; }
  .af-input{ background: var(--surface-2); border:1px solid var(--border); border-radius:6px; padding:8px 10px; color: var(--text); font-family: var(--font-body); font-size:13px; outline:none; width:100%; }
  .af-input:focus{ border-color: var(--teal); }
  .af-rows-head{ display:grid; grid-template-columns: 1.3fr 1.3fr 0.6fr 0.7fr 18px; gap:6px; padding:0 2px 4px; font-family: var(--mono); font-size:9.5px; color: var(--text-faint); text-transform:uppercase; }
  .af-row{ display:grid; grid-template-columns: 1.3fr 1.3fr 0.6fr 0.7fr 18px; gap:6px; margin-bottom:6px; align-items:center; }
  .af-row-input{ background: var(--surface-2); border:1px solid var(--border); border-radius:5px; padding:6px 7px; color: var(--text); font-family: var(--font-body); font-size:12px; width:100%; min-width:0; outline:none; }
  .af-row-input:focus{ border-color: var(--teal); }
  .af-row-input.narrow{ text-align:center; }
  .af-row-remove{ background:none; border:none; color: var(--text-faint); cursor:pointer; font-size:16px; line-height:1; padding:2px; }
  .af-row-remove:hover{ color: var(--red); }
  .af-row-spacer{ display:block; width:18px; }
  .af-add-row{ align-self:flex-start; background:none; border:1px dashed var(--border); color: var(--text-dim); font-family: var(--mono); font-size:11px; padding:6px 10px; border-radius:6px; cursor:pointer; margin-top:2px; }
  .af-add-row:hover{ color: var(--text); border-color: var(--text-dim); }
  .af-total{ font-family: var(--mono); font-size:11px; color: var(--text-faint); margin:12px 0 10px; }
  .af-submit{ width:100%; justify-content:center; }

  /* Section Rapport "Texte / Tableau" (2026-08-25) — contenu authored,
     jamais une capture : couleurs EXPLICITES (pas de var(--text) dérivée du
     thème) pour rester lisible quel que soit le thème actif au moment de la
     génération, cohérent avec le fond blanc forcé de .report-preview-layer. */
  .tt-report-content{ font-family: var(--font-body); padding:24px; box-sizing:border-box; }
  .tt-report-title{ font-family: var(--font-display); font-size:20px; font-weight:700; margin:0 0 16px; color:#111; }
  .tt-report-paragraph{ font-size:13px; line-height:1.65; margin:0 0 16px; color:#222; }
  .tt-report-table.ds-table{ font-family: var(--font-body); margin:0 0 20px; }
  .tt-report-table.ds-table th{ color:#555; background:#f3f3f3; position:static; }
  .tt-report-table.ds-table td{ color:#222; }
  .tt-report-table.ds-table td:first-child{ color:#222; font-weight:400; }
  /* Contenu d'un document TEXTE — MÊMES règles dans l'éditeur (.tx-flow) et
     dans le Rapport (cadre « Texte ») : ce qu'on écrit est ce qui s'imprime.
     Couleurs explicites (fond blanc quel que soit le thème). */
  .txt-rich-content{ font-family:'Inter', sans-serif; font-size:11pt; line-height:1.5; color:#1b1f27; overflow-wrap:break-word; }
  .txt-rich-content p{ margin:0 0 6pt; }
  .txt-rich-content h1{ font-size:20pt; font-weight:700; line-height:1.25; margin:14pt 0 6pt; color:#111; }
  .txt-rich-content h2{ font-size:16pt; font-weight:700; line-height:1.3; margin:12pt 0 5pt; color:#111; }
  .txt-rich-content h3{ font-size:13pt; font-weight:700; line-height:1.3; margin:10pt 0 4pt; color:#111; }
  .txt-rich-content h4{ font-size:11pt; font-weight:700; line-height:1.3; margin:8pt 0 3pt; color:#333; }
  .txt-rich-content > :first-child{ margin-top:0; }
  .txt-rich-content ul, .txt-rich-content ol{ margin:0 0 6pt; padding-left:22pt; }
  .txt-rich-content li{ margin:0 0 2pt; }
  .txt-rich-content blockquote{ margin:0 0 6pt; padding:2pt 0 2pt 12pt; border-left:3px solid #9aa3b2; color:#4a5160; font-style:italic; }
  .txt-rich-content pre{ margin:0 0 6pt; padding:6pt 8pt; background:#f3f4f6; border-radius:3px; font-family:'JetBrains Mono', monospace; font-size:9.5pt; line-height:1.45; white-space:pre-wrap; }
  .txt-rich-content hr{ border:none; border-top:1px solid #c9ced8; margin:10pt 0; }
  .txt-rich-content hr.tx-page-break{ border:none; margin:0; height:0; }
  .txt-rich-content a{ color:#1a73e8; text-decoration:underline; }
  .txt-rich-content img{ max-width:100%; height:auto; }
  .txt-rich-content img.tx-img-center{ display:block; margin:4pt auto 8pt; }
  .txt-rich-content img.tx-img-left{ float:left; margin:2pt 12pt 6pt 0; }
  .txt-rich-content img.tx-img-right{ float:right; margin:2pt 0 6pt 12pt; }
  .txt-rich-content table.tx-table{ border-collapse:collapse; margin:0 0 8pt; }
  .txt-rich-content .tx-table td, .txt-rich-content .tx-table th{ padding:3pt 6pt; vertical-align:top; min-width:24px; text-align:left; }
  .txt-rich-content .tx-table th{ background:#eef1f5; font-weight:700; }
  .txt-rich-content .tx-tbl-grid td, .txt-rich-content .tx-tbl-grid th{ border:1px solid #9aa3b2; }
  .txt-rich-content .tx-tbl-rows td, .txt-rich-content .tx-tbl-rows th{ border-bottom:1px solid #9aa3b2; }
  .txt-rich-content .tx-tbl-outer{ border:1px solid #9aa3b2; }

  /* ===== Document TEXTE (texte.js, refonte 2026-10-03) — traitement de
     texte paginé, même coquille sombre que l'éditeur du Rapport (bandeau
     .rp-ed-topline, panneau à onglets .rp-ed-side). Les feuilles blanches
     sont dessinées DERRIÈRE un seul flux éditable (.tx-flow) ; la
     pagination vit dans <style id="tx-pg-style">, généré par paginate(). ===== */
  .tx-status{ font-family:var(--mono); font-size:11px; color:#8A93A3; white-space:nowrap; margin-left:4px; }
  /* Menu « Modèle » du Texte (2026-10-27) : appliquer / enregistrer / mettre à jour un modèle de document */
  .tx-tpl-wrap{ position:relative; }
  /* « Ajouter au rapport » et « Word » du Texte (2026-10-27) : icône + libellé, libellé masqué sur téléphone */
  .tx-top-btn{ display:inline-flex; align-items:center; gap:6px; padding:6px 10px; font-size:12.5px; white-space:nowrap; }
  @media (max-width:900px){ .tx-top-btn span{ display:none; } .tx-top-btn{ padding:6px 8px; } #tx-pdf{ font-size:0; padding:6px 12px; } #tx-pdf::after{ content:"PDF"; font-size:12.5px; } #texte-container .tx-topline{ gap:6px; padding:0 8px; } }
  .tx-tpl-btn{ padding:6px 12px; font-size:12.5px; white-space:nowrap; }
  .tx-tpl-menu{ position:fixed; z-index:400; width:300px; max-width:calc(100vw - 24px); background:#1b1f27; border:1px solid #2c323d; border-radius:10px; box-shadow:0 12px 32px rgba(0,0,0,.45); padding:6px; display:flex; flex-direction:column; gap:2px; }
  .tx-tpl-menu[hidden]{ display:none; }
  .tx-tpl-item{ display:flex; flex-direction:column; gap:2px; text-align:left; background:none; border:0; border-radius:7px; padding:8px 10px; color:#e6e9ef; cursor:pointer; font:inherit; }
  .tx-tpl-item:hover, .tx-tpl-item:focus-visible{ background:#262b35; outline:none; }
  .tx-tpl-item b{ font-size:12.5px; font-weight:600; }
  .tx-tpl-item span{ font-size:11px; color:#8A93A3; }
  /* Liste du matériel du projet (Insérer, 2026-10-27) */
  .modal.tx-mat-modal{ max-width:760px; }
  .tx-mat-depts{ display:flex; flex-wrap:wrap; gap:6px; margin-bottom:12px; }
  .tx-mat-dept{ display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px; border:1px solid var(--border); background:var(--surface-2); color:var(--text); font:inherit; font-size:12.5px; cursor:pointer; }
  .tx-mat-dept span{ font-family:var(--mono); font-size:11px; color:var(--text-dim); }
  .tx-mat-dept[data-empty]{ opacity:.55; }
  .tx-mat-dept.on{ border-color:var(--teal); background:color-mix(in srgb, var(--teal) 16%, transparent); }
  .tx-mat-dept.on span{ color:var(--teal); }
  .tx-mat-body{ display:flex; flex-direction:column; gap:14px; max-height:50vh; overflow:auto; margin-bottom:10px; }
  .tx-mat-sec{ display:flex; flex-direction:column; gap:6px; align-items:flex-start; }
  .tx-mat-sec-head{ font-weight:600; font-size:13px; }
  .tx-mat-table{ width:100%; border-collapse:collapse; font-size:12.5px; }
  .tx-mat-table th{ text-align:left; font-family:var(--mono); font-size:10.5px; font-weight:500; color:var(--text-dim); text-transform:uppercase; letter-spacing:.04em; padding:4px 6px; }
  .tx-mat-table td{ padding:3px 6px; border-top:1px solid var(--border); vertical-align:middle; }
  .tx-mat-table td:first-child{ width:24px; }
  .tx-mat-table .af-input{ padding:5px 8px; }
  .tx-mat-table .tx-mat-qty{ width:72px; }
  .tx-mat-table .tx-mat-src{ font-size:11px; color:var(--text-dim); }
  .tx-mat-table tr.off td:not(:first-child){ opacity:.45; }
  @media (max-width:600px){ .tx-mat-table th:nth-child(4), .tx-mat-table td.tx-mat-src{ display:none; } .tx-mat-table .tx-mat-qty{ width:58px; } }
  .tx-ribbon{ display:flex; flex-wrap:wrap; align-items:center; row-gap:4px; padding:6px 8px; background:#14171d; border-bottom:1px solid #262b35; flex-shrink:0; }
  .tx-rgroup{ display:flex; align-items:center; gap:2px; padding:0 8px; border-right:1px solid #262b35; }
  .tx-rgroup:last-child{ border-right:none; }
  .tx-rbtn{ position:relative; display:inline-flex; align-items:center; justify-content:center; min-width:30px; height:30px; padding:0 6px; background:none; border:1px solid transparent; border-radius:6px; color:#C9CFD8; font-size:14px; font-family:var(--font-body); cursor:pointer; }
  .tx-rbtn:hover{ background:#1c2029; border-color:#2c3240; color:#fff; }
  .tx-rbtn.on{ background:#1a2a2c; border-color:rgba(47,217,196,.45); color:#2FD9C4; }
  .tx-rbtn:disabled{ opacity:.35; cursor:default; }
  .tx-glyph{ font-weight:600; font-size:13.5px; line-height:1; }
  .tx-glyph sup, .tx-glyph sub{ font-size:9px; }
  .tx-rselect, .tx-rinput{ height:30px; box-sizing:border-box; background:#0e1116; border:1px solid #2c3240; color:#EDEDED; border-radius:6px; padding:0 6px; font-size:12.5px; font-family:var(--font-body); }
  .tx-rselect:focus, .tx-rinput:focus{ outline:none; border-color:#2FD9C4; }
  .tx-style-select{ width:128px; }
  .tx-font-select{ width:148px; }
  .tx-lh-select{ width:58px; margin-left:4px; }
  .tx-rinput{ width:48px; text-align:center; }
  .tx-size{ display:flex; align-items:center; gap:2px; margin-left:4px; }
  .tx-color input{ position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; padding:0; border:none; }
  .tx-color i{ position:absolute; left:7px; right:7px; bottom:4px; height:3px; border-radius:2px; pointer-events:none; }
  .tx-tablepick-wrap{ position:relative; }
  .tx-tablepick{ position:absolute; top:36px; left:0; z-index:30; background:#171b22; border:1px solid #2c3240; border-radius:8px; padding:8px; box-shadow:0 12px 32px rgba(0,0,0,.55); }
  .tx-tablepick.inline{ position:static; box-shadow:none; align-self:flex-start; }
  .tx-tablepick[hidden]{ display:none !important; }
  .tx-tp-grid{ display:grid; grid-template-columns:repeat(10, 16px); gap:3px; }
  .tx-tp-grid i{ width:16px; height:16px; box-sizing:border-box; border:1px solid #3a4150; border-radius:2px; background:#0e1116; cursor:pointer; }
  .tx-tp-grid i.on{ background:#1a3a3a; border-color:#2FD9C4; }
  .tx-tp-label{ font-family:var(--mono); font-size:11px; color:#8A93A3; margin-top:6px; text-align:center; }
  .tx-body{ flex:1; min-height:0; display:grid; grid-template-columns:220px minmax(0,1fr) 320px; }
  .tx-outline{ background:#14171d; border-right:1px solid #262b35; padding:12px 10px; overflow-y:auto; min-height:0; }
  .tx-outline-list{ display:flex; flex-direction:column; gap:1px; }
  .tx-outline-item{ text-align:left; background:none; border:none; color:#C9CFD8; font-size:12.5px; padding:5px 8px; border-radius:6px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-family:var(--font-body); }
  .tx-outline-item:hover{ background:#1c2029; color:#fff; }
  .tx-outline-item.lvl1{ font-weight:600; color:#EDEDED; }
  .tx-outline-item.lvl2{ padding-left:18px; }
  .tx-outline-item.lvl3{ padding-left:28px; color:#8A93A3; }
  .tx-outline-item.lvl4{ padding-left:38px; color:#8A93A3; font-size:12px; }
  .tx-stats{ display:flex; flex-direction:column; gap:4px; font-size:12px; color:#8A93A3; }
  .tx-stats b{ color:#EDEDED; font-weight:600; }
  .tx-canvas{ overflow:auto; min-height:0; position:relative; background:#0b0d11; padding:28px 32px 90px; }
  .tx-zoomer{ position:relative; margin:0 auto; }
  .tx-stack{ position:absolute; left:0; top:0; transform-origin:0 0; }
  .tx-sheets{ position:absolute; inset:0; }
  .tx-sheet{ position:absolute; left:0; background:#fff; box-shadow:0 6px 24px rgba(0,0,0,.55); cursor:text; }
  .tx-margin-guide{ position:absolute; outline:1px dashed rgba(60,80,110,.12); pointer-events:none; }
  .tx-hf{ position:absolute; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px; font-size:9pt; line-height:1.3; color:#6b7280; pointer-events:none; white-space:pre-wrap; }
  .tx-hf span:nth-child(2){ text-align:center; }
  .tx-hf span:nth-child(3){ text-align:right; }
  .tx-flow{ position:absolute; outline:none; caret-color:#111; }
  #tx-editor hr.tx-page-break{ border:none; border-top:1px dashed #9aa3b2; margin:8pt 0 0; overflow:visible; position:relative; }
  #tx-editor hr.tx-page-break::after{ content:var(--tx-break-label, ""); position:absolute; left:50%; top:-8px; transform:translateX(-50%); background:#fff; color:#9aa3b2; font:600 9px/14px var(--mono); padding:0 6px; letter-spacing:.06em; text-transform:uppercase; }
  .tx-img-overlay{ position:absolute; outline:2px solid #2FD9C4; pointer-events:none; }
  .tx-img-handle{ position:absolute; right:-7px; bottom:-7px; width:12px; height:12px; background:#2FD9C4; border:2px solid #fff; border-radius:3px; pointer-events:auto; cursor:nwse-resize; }
  .tx-tabs{ flex-wrap:wrap; }
  .tx-tabs .rp-ed-tab{ flex:1 0 auto; padding:9px 7px; font-size:12px; }
  .tx-row{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
  .tx-row input[type=color]{ width:40px; height:30px; padding:1px; background:#0e1116; border:1px solid #2c3240; border-radius:6px; cursor:pointer; }
  .tx-chars{ display:grid; grid-template-columns:repeat(9, 1fr); gap:3px; }
  .tx-char{ background:#1c2029; border:1px solid #2c3240; color:#EDEDED; border-radius:5px; height:28px; cursor:pointer; font-size:14px; padding:0; }
  .tx-char:hover{ border-color:#2FD9C4; }
  .tx-side input[type=range]{ width:100%; accent-color:#2FD9C4; }
  ::highlight(tx-find){ background-color:#ffe36e; color:#111; }
  ::highlight(tx-find-cur){ background-color:#ff9b3d; color:#111; }
  .tx-pdf-page{ position:relative; background:#fff; overflow:hidden; }
  .tx-pdf-view{ position:absolute; overflow:hidden; }
  .tx-pdf-page .tx-table-refresh-btn{ visibility:hidden; }
  @media (max-width:900px){
    .tx-body{ display:flex; flex-direction:column; }
    .tx-canvas{ flex:1; min-height:50vh; order:1; padding:14px 8px 60px; }
    .tx-outline{ display:none; }
    .tx-side{ order:2; max-height:38vh; border-left:none; border-top:1px solid #262b35; }
    .tx-status{ display:none; }
    /* Ruban sur UNE ligne qui défile (Texte et Tableau), zoom masqué : la place va à la page. */
    .tx-ribbon{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin; }
    .tx-rgroup{ flex-shrink:0; }
    #view-texte-workspace .rp-ed-zoom, #view-tableau-workspace .rp-ed-zoom{ display:none; }
    .ss-top-btn{ padding:5px 8px !important; }
  }
  /* Feuille blanche de l'aperçu d'un document Fichier (fichier.js) */
  .tx-page-wrap{ flex:1; overflow-y:auto; padding:24px; display:flex; justify-content:center; }
  .tx-page{ width:100%; max-width:840px; background:#fff; border-radius:6px; box-shadow:0 4px 20px rgba(0,0,0,0.3); min-height:70vh; }
  /* Table collée depuis le module Tableau (voir tableau.js/tbBuildRangeHTML())
     — bouton d'actualisation posé juste à côté, jamais éditable lui-même. */
  .tx-pasted-table{ border-collapse:collapse; margin:0 0 8pt; }
  .tx-pasted-table td, .tx-pasted-table th{ border:1px solid #b8bfcc; padding:3pt 6pt; }
  .tx-table-refresh-btn{ display:inline-flex; align-items:center; gap:5px; margin:0 0 8pt; background:#f1f1f1; border:1px solid #ccc; color:#333; border-radius:5px; padding:2px 9px; font-size:11px; font-family: var(--font-body); cursor:pointer; user-select:none; }
  .tx-table-refresh-btn:hover{ background:#e6e6e6; }

  /* ===== Document TABLEAU (tableau.js, refonte 2026-10-03) — tableur :
     bandeau et ruban sombres (mêmes classes .tx-rbtn/.tx-rgroup que le
     Texte), grille BLANCHE virtualisée (.ss-c en position absolue), volets
     figés (.ss-p-corner/top/left, seul .ss-p-main défile), en-têtes à part. ===== */
  .ss-ribbon .tx-rinput{ width:44px; }
  .ss-fmt-select{ width:150px; }
  .ss-arrow{ font-size:10px; margin-left:1px; opacity:.7; }
  .ss-nofill-ico{ width:13px; height:13px; border:1.5px solid currentColor; border-radius:2px; position:relative; display:inline-block; overflow:hidden; }
  .ss-nofill-ico::after{ content:""; position:absolute; left:-4px; right:-4px; top:50%; height:1.5px; background:#ff6b6b; transform:rotate(-45deg); }
  .ss-bdpick{ width:220px; display:grid; grid-template-columns:1fr 1fr; gap:3px; }
  .ss-bdopt{ display:flex; align-items:center; gap:7px; background:none; border:1px solid transparent; color:#C9CFD8; border-radius:5px; padding:6px; font-size:11.5px; cursor:pointer; text-align:left; font-family:var(--font-body); }
  .ss-bdopt:hover{ background:#1c2029; border-color:#2c3240; color:#fff; }
  .ss-bdico{ width:15px; height:15px; flex:none; box-sizing:border-box; border:1px dashed #5d6574; }
  .ss-bdico.bd-all, .ss-bdico.bd-inner{ background:linear-gradient(#EDEDED, #EDEDED) center / 1.5px 100% no-repeat, linear-gradient(#EDEDED, #EDEDED) center / 100% 1.5px no-repeat; }
  .ss-bdico.bd-all, .ss-bdico.bd-outer{ border:1.5px solid #EDEDED; }
  .ss-bdico.bd-thick{ border:3px solid #EDEDED; }
  .ss-bdico.bd-top{ border-top:2px solid #EDEDED; }
  .ss-bdico.bd-bottom{ border-bottom:2px solid #EDEDED; }
  .ss-bdico.bd-left{ border-left:2px solid #EDEDED; }
  .ss-bdico.bd-right{ border-right:2px solid #EDEDED; }
  .ss-bdcolor{ grid-column:1 / -1; display:flex; align-items:center; justify-content:space-between; font-size:11.5px; color:#8A93A3; padding:6px 6px 0; border-top:1px solid #262b35; margin-top:3px; }
  .ss-bdcolor input{ width:38px; height:24px; padding:1px; border:1px solid #2c3240; background:#0e1116; border-radius:5px; cursor:pointer; }
  .ss-listpick{ min-width:240px; display:flex; flex-direction:column; padding:5px; }
  .ss-listpick button, .ss-menu button{ background:none; border:none; color:#C9CFD8; text-align:left; padding:7px 10px; border-radius:5px; font-size:12.5px; font-family:var(--font-body); cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:14px; white-space:nowrap; }
  .ss-listpick button:hover, .ss-menu button:hover{ background:#1c2029; color:#fff; }
  .ss-listpick button.danger:hover, .ss-menu button.danger:hover{ color:#ff8a8a; }
  .ss-listpick em{ font-style:normal; font-family:var(--mono); font-size:10.5px; color:#8A93A3; }
  .ss-listpick hr, .ss-menu hr{ border:none; border-top:1px solid #262b35; margin:4px 2px; }
  .ss-check{ display:flex; align-items:center; gap:8px; font-size:12px; color:#C9CFD8; padding:6px 10px; cursor:pointer; white-space:nowrap; }
  .ss-check input{ accent-color:#2FD9C4; }
  .ss-export-pick{ right:0; left:auto; top:38px; }
  .ss-top-btn{ display:inline-flex !important; align-items:center; gap:6px; flex-shrink:0; }
  #view-tableau-workspace .rp-ed-pdf-btn, #view-texte-workspace .rp-ed-pdf-btn{ white-space:nowrap; }
  .ss-fbar{ display:flex; align-items:stretch; background:#14171d; border-bottom:1px solid #262b35; height:32px; flex-shrink:0; }
  .ss-name{ width:100px; background:#0e1116; border:none; border-right:1px solid #262b35; color:#EDEDED; font-family:var(--mono); font-size:12px; padding:0 10px; outline:none; }
  .ss-name:focus{ box-shadow:inset 0 -2px 0 #2FD9C4; }
  .ss-fx{ display:flex; align-items:center; padding:0 9px; color:#8A93A3; border-right:1px solid #262b35; }
  .ss-formula{ flex:1; resize:none; background:#0e1116; border:none; color:#EDEDED; font-family:var(--mono); font-size:12.5px; padding:7px 10px; outline:none; line-height:18px; height:32px; box-sizing:border-box; white-space:pre; overflow:hidden; }
  .ss-formula:focus{ background:#10141b; box-shadow:inset 0 -2px 0 #2FD9C4; }
  .ss-wrap{ position:relative; flex:1; min-height:0; background:#fff; overflow:hidden; outline:none; user-select:none; font-family:'Inter', sans-serif; }
  .ss-corner{ position:absolute; left:0; top:0; background:#eceff3; border-right:1px solid #c5cbd4; border-bottom:1px solid #c5cbd4; z-index:6; cursor:pointer; box-sizing:border-box; }
  .ss-corner:hover{ background:#dfe4ea; }
  .ss-colhead, .ss-rowhead{ position:absolute; overflow:hidden; background:#f3f5f8; z-index:5; }
  .ss-colhead{ top:0; }
  .ss-colhead.ss-scrollx{ right:0; }
  .ss-rowhead{ left:0; }
  .ss-rowhead.ss-scrolly{ bottom:0; }
  .ss-colhead .ss-in{ position:absolute; left:0; top:0; bottom:0; }
  .ss-rowhead .ss-in{ position:absolute; left:0; top:0; right:0; }
  .ss-hc, .ss-hr{ position:absolute; box-sizing:border-box; color:#5f6672; display:flex; align-items:center; justify-content:center; font-family:var(--font-body); }
  .ss-hc{ top:0; bottom:0; border-right:1px solid #d9dde3; border-bottom:1px solid #c5cbd4; }
  .ss-hr{ left:0; right:0; border-bottom:1px solid #d9dde3; border-right:1px solid #c5cbd4; }
  .ss-hc.on, .ss-hr.on{ background:#d5efeb; color:#0b5e55; font-weight:600; }
  .ss-hc.full, .ss-hr.full{ background:#1a9e8f; color:#fff; }
  .ss-rz{ position:absolute; z-index:2; }
  .ss-hc .ss-rz{ top:0; bottom:0; right:-3px; width:6px; cursor:col-resize; }
  .ss-hr .ss-rz{ left:0; right:0; bottom:-3px; height:6px; cursor:row-resize; }
  .ss-rz:hover{ background:#1a9e8f; }
  .ss-pane{ position:absolute; overflow:hidden; }
  .ss-p-top{ right:0; }
  .ss-p-left{ bottom:0; }
  .ss-p-main{ right:0; bottom:0; overflow:auto; }
  .ss-pane .ss-in{ position:absolute; left:0; top:0; }
  .ss-p-main > .ss-in{ position:relative; }
  .ss-cells, .ss-ovl, .ss-edl{ position:absolute; left:0; top:0; }
  .ss-wrap.has-fr .ss-p-top, .ss-wrap.has-fr .ss-p-corner{ box-shadow:0 2px 0 #aab2bd; z-index:3; }
  .ss-wrap.has-fc .ss-p-left{ box-shadow:2px 0 0 #aab2bd; z-index:3; }
  .ss-wrap.has-fr.has-fc .ss-p-corner{ box-shadow:2px 2px 0 #aab2bd; z-index:4; }
  .ss-c{ position:absolute; box-sizing:border-box; border-right:1px solid #e3e6eb; border-bottom:1px solid #e3e6eb; overflow:hidden; display:flex; padding:0 4px; color:#1b1f27; line-height:1.25; }
  .ss-c.va-top{ align-items:flex-start; padding-top:2px; }
  .ss-c.va-middle{ align-items:center; }
  .ss-c.va-bottom{ align-items:flex-end; padding-bottom:3px; }
  .ss-c.al-left{ justify-content:flex-start; }
  .ss-c.al-center{ justify-content:center; text-align:center; }
  .ss-c.al-right{ justify-content:flex-end; text-align:right; }
  .ss-t{ white-space:pre; overflow:hidden; max-width:100%; }
  .ss-c.wrap .ss-t{ white-space:pre-wrap; overflow-wrap:anywhere; }
  .ss-c.ovf{ overflow:visible; }
  .ss-c.ovf .ss-t{ max-width:none; flex:none; }
  .ss-c.err .ss-t{ color:#c5221f; }
  .ss-bd{ position:absolute; box-sizing:border-box; pointer-events:none; }
  .ss-sel{ position:absolute; box-sizing:border-box; pointer-events:none; }
  .ss-sel.multi{ background:rgba(26,158,143,.10); }
  .ss-act{ position:absolute; box-sizing:border-box; border:2px solid #1a9e8f; pointer-events:none; }
  .ss-fill{ position:absolute; width:8px; height:8px; box-sizing:border-box; background:#1a9e8f; border:1px solid #fff; cursor:crosshair; z-index:3; }
  .ss-fillprev{ position:absolute; box-sizing:border-box; border:1.5px dashed #1a9e8f; pointer-events:none; }
  .ss-editor{ position:absolute; z-index:4; box-sizing:border-box; border:2px solid #1a9e8f; outline:none; resize:none; background:#fff; color:#1b1f27; padding:1px 4px; font-family:'Inter', sans-serif; line-height:1.25; box-shadow:0 3px 12px rgba(0,0,0,.22); overflow:hidden; white-space:pre; user-select:text; }
  .ss-bottom{ display:flex; align-items:stretch; gap:12px; height:34px; background:#14171d; border-top:1px solid #262b35; flex-shrink:0; padding:0 12px 0 6px; }
  .ss-tabs{ display:flex; align-items:flex-start; gap:2px; overflow-x:auto; flex:1; min-width:0; }
  .ss-tab-add{ width:28px; height:24px; margin:5px 6px 0 0; background:none; border:1px solid #2c3240; color:#C9CFD8; border-radius:6px; cursor:pointer; font-size:15px; line-height:1; flex:none; }
  .ss-tab-add:hover{ border-color:#2FD9C4; color:#fff; }
  .ss-tab{ height:29px; padding:0 14px; background:none; border:none; border-radius:0 0 7px 7px; color:#8A93A3; font-size:12.5px; font-family:var(--font-body); cursor:pointer; white-space:nowrap; flex:none; }
  .ss-tab:hover{ color:#EDEDED; background:#1a1e26; }
  .ss-tab.active{ background:#0e1116; color:#2FD9C4; box-shadow:inset 0 2px 0 #2FD9C4; font-weight:600; }
  .ss-stats{ display:flex; align-items:center; font-size:12px; color:#8A93A3; white-space:nowrap; }
  .ss-stats b{ color:#EDEDED; font-weight:600; }
  .ss-menu{ position:fixed; z-index:1000; min-width:230px; background:#171b22; border:1px solid #2c3240; border-radius:8px; padding:5px; box-shadow:0 14px 36px rgba(0,0,0,.55); display:flex; flex-direction:column; }
  .ss-fnmenu{ max-height:60vh; overflow-y:auto; font-family:var(--mono); }
  /* Feuille imprimée (Rapport) / collée dans un Texte */
  .tt-report-table.ss-print-table, .tx-pasted-table{ table-layout:fixed; border-collapse:collapse; }
  .tt-report-table.ss-print-table td, .tt-report-table.ss-print-table th{ border:1px solid #d5d9e0; padding:3px 6px; font-size:9.5pt; color:#1b1f27; vertical-align:bottom; overflow:hidden; text-align:left; }
  .tt-report-table.ss-print-table th{ background:#eef1f5; font-weight:700; }
  @media (max-width:900px){
    .ss-name{ width:70px; }
    .ss-stats{ display:none; }
  }

  .ds-table{ width:100%; border-collapse:collapse; font-family: var(--mono); font-size:12px; }
  .ds-table th{ text-align:left; color: var(--text-faint); font-weight:500; padding:8px 10px; border-bottom:1px solid var(--border); text-transform:uppercase; letter-spacing:0.03em; font-size:10px; position:sticky; top:0; background: var(--surface); }
  .ds-table td{ padding:9px 10px; border-bottom:1px solid var(--surface-2); color: var(--text-dim); }
  .ds-table td:first-child{ color: var(--text); font-weight:500; font-family: var(--font-body); }
  /* .ds-inventory-table : les 2 tableaux (armoires/câbles) de l'Inventaire ont un
     nombre de colonnes différent avant "Quantité" — table-layout:fixed + une
     largeur fixe partagée sur la colonne Quantité (.ds-qty-col) aligne son bord
     gauche entre les deux tableaux malgré ça. */
  .ds-inventory-table{ table-layout:fixed; }
  .ds-inventory-table .ds-qty-col{ width:110px; }
  .ds-inventory-table th:last-child, .ds-inventory-table td:last-child{ text-align:right; }
  .ds-badge{ display:inline-block; font-size:10px; padding:2px 7px; border-radius:999px; background: var(--surface-2); border:1px solid var(--border); color: var(--text-faint); margin-right:4px; }
  .ds-phase-cell{ font-family: var(--mono); font-size:11px; color: var(--text-dim); }
  .ds-phase-cell.no-data{ color: var(--text-faint); font-style:italic; }
  .ds-badge.on{ color: var(--teal); border-color: rgba(47,217,196,0.35); background: rgba(47,217,196,0.08); }
  .ds-section-title{ font-family: var(--font-display); font-size:13px; font-weight:600; color: var(--text); margin:26px 0 10px; }
  .ds-section-title:first-of-type{ margin-top:0; }
  .ds-section-header-row{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin:26px 0 10px; }
  .ds-section-header-row:first-of-type{ margin-top:0; }
  .ds-section-header-row .ds-section-title{ margin:0; }
  .ds-filter-input{ max-width:240px; font-size:11.5px; padding:6px 10px; }
  .ds-neg{ color: var(--red); font-weight:600; }
  .ds-warn-badge{ display:inline-flex; width:15px; height:15px; border-radius:50%; align-items:center; justify-content:center; margin-right:6px; vertical-align:middle; color:#fff; }
  .ds-warn-badge.over{ background: var(--red); }
  .ds-warn-badge.near{ background: var(--amber); color: var(--on-accent); }
  .ds-length-input{ width:64px; background: var(--surface-2); border:1px solid var(--border); border-radius:5px; color: var(--text); font-family: var(--mono); font-size:12px; padding:4px 6px; }
  .ds-length-input:focus{ border-color: var(--teal); outline:none; }
  /* Longueur AUTO-calculée depuis l'onglet Plans (jamais encore saisie à la
     main) — teinte légèrement différente pour signaler que taper dedans la
     figera définitivement (voir autoConnLengthM() dans elec-engine.js). */
  .ds-length-input.ds-length-auto{ color: var(--teal); border-style:dashed; font-style:italic; }
  .ds-global-line{ margin-top:12px; font-family: var(--mono); font-size:13px; color: var(--text-dim); }
  .ds-global-line b{ color: var(--text); }
  .ds-source-block{ margin-bottom:18px; }
  .ds-source-title{ font-family: var(--font-display); font-weight:600; font-size:12.5px; color: var(--text-dim); margin-bottom:6px; }

  .ds-subtabs{ display:flex; align-items:center; gap:6px; margin-bottom:18px; border-bottom:1px solid var(--border); padding-bottom:10px; flex-wrap:wrap; }
  .ds-subtab{ display:flex; align-items:center; gap:6px; background: var(--surface-2); border:1px solid var(--border); border-radius:999px; padding:6px 10px 6px 12px; font-family: var(--font-body); font-size:12px; color: var(--text-dim); cursor:pointer; }
  .ds-subtab.active{ color: var(--teal); border-color: rgba(47,217,196,0.4); background: var(--surface-3); }
  .ds-subtab-dot{ width:8px; height:8px; border-radius:50%; flex-shrink:0; }
  .ds-subtab-del{ margin-left:2px; color: var(--text-faint); font-size:13px; line-height:1; padding:0 2px; border-radius:3px; }
  .ds-subtab-del:hover{ color: var(--red); background: rgba(229,85,90,0.12); }
  .ds-subtab-add-wrap{ position:relative; }
  .ds-subtab-add{ display:flex; align-items:center; gap:4px; background:none; border:1px dashed var(--border); border-radius:999px; padding:6px 10px; font-family: var(--font-body); font-size:12px; color: var(--text-faint); cursor:pointer; }
  .ds-subtab-add:hover{ color: var(--text-dim); border-color: var(--text-faint); }
  .ds-group-picker{ position:absolute; top:100%; left:0; margin-top:6px; background: var(--surface-3); border:1px solid var(--border); border-radius:8px; padding:6px; min-width:180px; z-index:20; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
  .ds-group-picker-opt{ display:flex; align-items:center; gap:8px; width:100%; text-align:left; background:none; border:none; color: var(--text); font-family: var(--font-body); font-size:12.5px; padding:7px 8px; border-radius:6px; cursor:pointer; }
  .ds-group-picker-opt:hover{ background: var(--surface-2); }

  .elec-canvas{ position:relative; width:100%; height:100%; min-height:260px; overflow:hidden; cursor:grab; background-image: radial-gradient(circle, var(--border) 1px, transparent 1px); background-size:22px 22px; }
  .elec-canvas.panning{ cursor:grabbing; }
  .elec-canvas-zoom-layer{ position:relative; width:1400px; height:850px; flex-shrink:0; transform-origin: 0 0; }
  .elec-plan-bg{ position:absolute; inset:0; background-size:contain; background-repeat:no-repeat; background-position:center; pointer-events:none; z-index:0; }
  /* Fenêtre « Importer un plan DWG » (dwg-plan2d.js) */
  .modal.wide.dwgp-modal{ width:100%; max-width:min(1180px, calc(100vw - 32px)); max-height:94vh; }
  .dwgp-modal h3 .dwgp-file{ color:var(--text-dim); font-weight:500; font-size:13px; margin-left:8px; }
  .dwgp-body{ display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:14px; min-height:0; }
  .dwgp-preview{ position:relative; height:62vh; min-height:360px; border:1px solid var(--border); border-radius:8px; background:var(--bg); display:grid; place-items:center; overflow:hidden; padding:8px; }
  .dwgp-preview canvas{ max-width:100%; max-height:100%; box-shadow:0 2px 14px rgba(0,0,0,.25); }
  .dwgp-status{ position:absolute; left:50%; bottom:14px; transform:translateX(-50%); max-width:calc(100% - 24px); background:var(--surface); border:1px solid var(--border); color:var(--text); border-radius:7px; padding:7px 12px; font-size:12.5px; box-shadow:0 6px 20px rgba(0,0,0,.25); }
  .dwgp-status[hidden]{ display:none; }
  .dwgp-side{ display:grid; gap:10px; align-content:start; max-height:62vh; overflow:auto; padding-right:2px; }
  .dwgp-side[hidden]{ display:none; }
  .dwgp-field{ display:grid; gap:4px; }
  .dwgp-field > span, .dwgp-layers-head > span:first-child{ color:var(--text-dim); font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
  .dwgp-side select{ width:100%; background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:6px; padding:6px 8px; font:12.5px var(--font-body); }
  .dwgp-check{ display:flex; align-items:center; gap:7px; cursor:pointer; font-size:12.5px; }
  .dwgp-layers-head{ display:flex; align-items:center; justify-content:space-between; }
  .dwgp-layers-head button{ background:none; border:1px solid var(--border); color:var(--text-dim); border-radius:4px; padding:1px 7px; margin-left:4px; font:11px var(--font-body); cursor:pointer; }
  .dwgp-layers-head button:hover{ color:var(--text); }
  .dwgp-layers{ display:grid; gap:1px; max-height:200px; overflow:auto; border:1px solid var(--border); border-radius:6px; padding:3px; }
  .dwgp-layer{ display:flex; align-items:center; gap:7px; padding:3px 5px; border-radius:4px; cursor:pointer; min-width:0; font-size:12.5px; }
  .dwgp-layer:hover{ background:var(--bg); }
  .dwgp-sw{ width:10px; height:10px; border-radius:2px; flex:none; box-shadow:0 0 0 1px rgba(128,128,128,.45) inset; }
  .dwgp-lname{ flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .dwgp-lcount{ font:11px var(--mono); color:var(--text-faint); }
  .dwgp-info{ display:grid; gap:3px; padding:8px 9px; border:1px solid var(--border); border-radius:6px; font-size:12px; color:var(--text-dim); }
  .dwgp-info b{ color:var(--text); }
  .dwgp-warn{ margin:0; padding:0 0 0 16px; color:var(--amber); font-size:11.5px; line-height:1.45; display:grid; gap:3px; }
  @media (max-width:900px){ .dwgp-body{ grid-template-columns:1fr; } .dwgp-preview{ height:40vh; min-height:220px; } .dwgp-side{ max-height:none; } }
  /* Sources du fond de plan + choix d'un document du projet (plan-background.js) */
  .plan-bg-sources{ display:grid; gap:6px; margin-top:6px; }
  .plan-bg-sources .btn{ width:100%; justify-content:center; }
  .pbgp-list{ display:grid; gap:4px; max-height:50vh; overflow:auto; margin:6px 0 12px; }
  .pbgp-row{ display:flex; align-items:center; gap:10px; width:100%; text-align:left; padding:8px 10px; border:1px solid var(--border); border-radius:7px; background:none; color:var(--text); font:13px var(--font-body); cursor:pointer; }
  .pbgp-row:hover{ border-color:var(--teal); }
  .pbgp-kind{ margin-left:auto; font:11px var(--mono); color:var(--text-faint); }
  .pbgp-empty{ color:var(--text-dim); font-size:13px; line-height:1.5; margin:6px 0 12px; }
  /* Visionneuse image / DWG des documents de projet (fichier.js, dwg-plan2d.js) */
  .fc-viewer{ display:flex; flex-direction:column; height:calc(100vh - 190px); min-height:320px; margin:0 20px 20px; border:1px solid var(--border); border-radius:8px; overflow:hidden; background:var(--surface); }
  .dwgv-bar{ display:flex; align-items:center; gap:8px; padding:8px 10px; border-bottom:1px solid var(--border); flex-wrap:wrap; }
  .dwgv-bar select{ background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:6px; padding:5px 8px; font:12.5px var(--font-body); max-width:100%; }
  .dwgv-bar button{ background:none; border:1px solid var(--border); color:var(--text); border-radius:6px; padding:4px 10px; font:13px var(--font-body); cursor:pointer; }
  .dwgv-bar button:hover{ border-color:var(--teal); }
  .dwgv-zoom{ font:12px var(--mono); color:var(--text-dim); min-width:54px; text-align:right; }
  .dwgv-stage{ position:relative; flex:1; min-height:0; overflow:hidden; background:#ffffff; cursor:grab; touch-action:none; }
  .dwgv-stage.imgv{ background:var(--bg); }
  .dwgv-stage.dark{ background:#15181d; }
  .dwgv-stage.grabbing{ cursor:grabbing; }
  .dwgv-stage canvas, .dwgv-stage img{ position:absolute; left:0; top:0; max-width:none; user-select:none; -webkit-user-drag:none; }
  .dwgv-hint{ position:absolute; left:10px; bottom:8px; font:11px var(--font-body); color:#5b6472; background:rgba(255,255,255,.85); padding:2px 7px; border-radius:5px; pointer-events:none; }
  .dwgv-status{ position:absolute; inset:0; display:grid; place-items:center; color:#5b6472; font:13px var(--font-body); padding:16px; text-align:center; }
  @media (max-width:900px){ .fc-viewer{ margin:0 12px 12px; height:calc(100vh - 220px); } .dwgv-hint{ display:none; } }
  .elec-landscape-guide{ position:absolute; border:2px dashed rgba(47,217,196,0.85); box-shadow: 0 0 0 3000px rgba(0,0,0,0.55); pointer-events:none; z-index:5; }
  .elec-group-visibility-panel{ position:absolute; top:10px; right:10px; background: var(--surface-3); border:1px solid var(--border); border-radius:9px; padding:10px 12px; z-index:6; max-height:calc(100% - 60px); overflow-y:auto; min-width:170px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
  .egv-head{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
  .egv-title{ font-family: var(--font-display); font-size:11px; font-weight:600; color: var(--text-faint); text-transform:uppercase; letter-spacing:0.04em; flex:1; }
  .egv-collapse-btn{ background:none; border:none; color: var(--text-faint); cursor:pointer; padding:2px; display:flex; border-radius:4px; }
  .egv-collapse-btn:hover{ color: var(--text); background: var(--surface-2); }
  .egv-add-group-btn{ background:none; border:1px solid var(--border); color: var(--text-faint); cursor:pointer; width:18px; height:18px; line-height:1; display:flex; align-items:center; justify-content:center; border-radius:4px; font-size:13px; padding:0; flex-shrink:0; }
  .egv-add-group-btn:hover{ color: var(--text); border-color: var(--teal); }
  .egv-color-swatch{ position:relative; cursor:pointer; overflow:hidden; }
  .egv-color-swatch input[type="color"]{ position:absolute; inset:-4px; width:16px; height:16px; opacity:0; cursor:pointer; border:none; padding:0; }
  .egv-collapsed-btn{ position:absolute; top:10px; right:10px; z-index:6; width:32px; height:32px; display:flex; align-items:center; justify-content:center; background: var(--surface-3); border:1px solid var(--border); border-radius:9px; color: var(--text-dim); cursor:pointer; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
  .egv-collapsed-btn:hover{ color: var(--text); }
  .egv-row{ display:flex; align-items:center; gap:8px; padding:4px 0; font-family: var(--font-body); font-size:12px; color: var(--text-dim); }
  .egv-eye-btn{ background:none; border:none; color: var(--text-dim); cursor:pointer; padding:2px; display:flex; flex-shrink:0; border-radius:4px; }
  .egv-eye-btn:hover{ color: var(--text); }
  .egv-eye-btn.off{ color: var(--text-faint); opacity:0.5; }
  .egv-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0; }
  .egv-highlight-btn{ background:none; border:none; color: var(--text-faint); cursor:pointer; padding:2px; display:flex; flex-shrink:0; border-radius:4px; }
  .egv-highlight-btn:hover{ color: var(--amber); }
  .egv-highlight-btn.active{ color: var(--amber); }
  .egv-icon-group{ display:flex; align-items:center; gap:2px; flex-shrink:0; }
  .egv-name-input{ flex:1; min-width:0; background:none; border:1px solid transparent; border-radius:4px; padding:2px 4px; font-family: var(--font-body); font-size:12px; color: var(--text-dim); outline:none; }
  .egv-name-input:hover, .egv-name-input:focus{ border-color: var(--border); background: var(--surface-2); color: var(--text); }
  .df-groups-panel{ left:10px; right:auto; top:auto; bottom:10px; max-height:min(260px, calc(100% - 20px)); }
  .df-groups-collapsed-btn{ left:10px; right:auto; top:auto; bottom:10px; }
  .df-group-row.active{ background: rgba(240,166,59,0.12); border-radius:6px; margin:0 -6px; padding:4px 6px; }
  .df-group-toggle-btn{ display:inline-flex; align-items:center; gap:5px; padding:4px 9px; border-radius:999px; border:1px solid var(--border); background: var(--surface-2); color: var(--text-dim); font-family: var(--font-body); font-size:11.5px; cursor:pointer; }
  .df-group-toggle-btn:hover{ border-color: var(--text-dim); }
  .df-group-toggle-btn.active{ font-weight:600; }
  .elec-canvas-zoom-ctrl{ position:absolute; bottom:8px; right:8px; display:flex; align-items:center; gap:2px; background: var(--surface-3); border:1px solid var(--border); border-radius:8px; padding:3px 4px; z-index:15; font-family: var(--mono); font-size:10.5px; color: var(--text-dim); }
  .elec-canvas-zoom-ctrl button{ width:20px; height:20px; display:flex; align-items:center; justify-content:center; background:none; border:none; color: var(--text-dim); cursor:pointer; border-radius:4px; font-size:13px; line-height:1; }
  .elec-canvas-zoom-ctrl button:hover{ color: var(--text); background: var(--surface-2); }
  .elec-canvas-zoom-ctrl span{ min-width:34px; text-align:center; }
  .elec-canvas-empty{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; text-align:center; padding:24px; font-family: var(--mono); font-size:11.5px; color: var(--text-faint); pointer-events:none; }
  .elec-node{ position:absolute; transform:translate(-50%, -50%); display:flex; flex-direction:column; align-items:center; justify-content:center; background: var(--surface-2); border:1px solid var(--border); border-radius:8px; padding:10px 14px; cursor:grab; user-select:none; touch-action:none; width:132px; box-sizing:border-box; text-align:center; box-shadow:0 4px 14px rgba(0,0,0,0.25); transition:none; }
  .elec-node:hover{ border-color: var(--text-dim); }
  .elec-node.dragging{ cursor:grabbing; border-color: var(--teal); z-index:5; }
  .elec-node:has(.elec-node-dropdown.show){ z-index:20; }
  .elec-node.device{ border-color: rgba(240,166,59,0.4); }
  .elec-node.gradateur{ border-color: rgba(139,92,246,0.5); }
  .elec-node.multiprise{ border-color: rgba(139,92,246,0.5); border-style:dashed; }
  .elec-node.info-bubble{ border-radius:14px; border-color: rgba(240,166,59,0.5); background: var(--surface-2); cursor:grab; padding:10px 12px; }
  .elec-node.info-bubble.dragging{ cursor:grabbing; }
  .info-bubble-body{ font-family: var(--font-body); font-size:11.5px; line-height:1.5; color: var(--text); white-space:pre-wrap; word-wrap:break-word; text-align:left; padding-right:14px; }
  .info-bubble-placeholder{ color: var(--text-faint); font-style:italic; }
  .info-bubble-count-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 10px; font-family: var(--font-body); font-size:12px; color: var(--text-dim); border-bottom:1px solid var(--border); margin-bottom:4px; }
  .info-bubble-stepper{ display:flex; align-items:center; gap:8px; }
  .info-bubble-stepper button{ width:22px; height:22px; border-radius:5px; border:1px solid var(--border); background: var(--surface-3); color: var(--text); cursor:pointer; font-size:13px; line-height:1; display:flex; align-items:center; justify-content:center; }
  .info-bubble-stepper button:hover{ border-color: var(--text-dim); }
  .info-bubble-stepper span{ font-family: var(--mono); font-size:12px; min-width:14px; text-align:center; }
  .elec-node.source{ box-shadow: 0 0 0 2px var(--teal), 0 4px 14px rgba(0,0,0,0.25); }
  .elec-node.df-group-highlight{ box-shadow: 0 0 0 2px var(--amber), 0 4px 14px rgba(0,0,0,0.25); }
  .elec-node-body{ max-width:100%; }
  .elec-node-name{ font-family: var(--font-display); font-weight:600; font-size:12.5px; padding-right:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .elec-node-meta{ font-family: var(--mono); font-size:10.5px; color: var(--text-dim); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  /* puissance à l'allumage d'un device (2026-10-27) : pic de mise sous tension, distinct de la consommation */
  .elec-node-meta.elec-node-inrush{ color: var(--amber); margin-top:1px; }
  .elec-node-menu-btn{ position:absolute; top:3px; right:3px; width:18px; height:18px; display:flex; align-items:center; justify-content:center; background:none; border:none; color: var(--text-faint); cursor:pointer; border-radius:4px; z-index:7; }
  .elec-node-menu-btn:hover{ color: var(--text); background: var(--surface-3); }
  .elec-node-source-badge{ position:absolute; top:-7px; left:-7px; width:16px; height:16px; border-radius:50%; background: var(--teal); color: var(--on-accent); display:flex; align-items:center; justify-content:center; z-index:7; box-shadow:0 1px 4px rgba(0,0,0,0.4); }
  .elec-node-warn-badge{ position:absolute; bottom:-7px; right:-7px; width:16px; height:16px; border-radius:50%; background: var(--red); color:#fff; display:flex; align-items:center; justify-content:center; z-index:7; box-shadow:0 1px 4px rgba(0,0,0,0.4); }
  .elec-node-warn-badge.near{ background: var(--amber); color: var(--on-accent); }
  .elec-node-warn-badge.downstream{ background: #3b82f6; color: #fff; }
  .elec-node-number-badge{ position:absolute; bottom:-7px; left:50%; transform:translateX(-50%); min-width:16px; height:16px; padding:0 5px; border-radius:8px; background: var(--surface-3); border:1px solid var(--border); color: var(--text); font-family: var(--mono); font-size:9px; font-weight:600; display:flex; align-items:center; justify-content:center; white-space:nowrap; z-index:7; box-shadow:0 1px 4px rgba(0,0,0,0.4); }
  /* Orientation verticale : les prises passent des bords gauche/droite aux bords haut/bas
     (voir .conn-dot.vertical.input/.output) — la bulle de numéro doit donc migrer sur un
     bord latéral, resté libre, plutôt que de rester en bas. */
  .elec-node.vertical .elec-node-number-badge{ bottom:auto; left:auto; right:-7px; top:50%; transform:translateY(-50%); }
  /* Toujours visible, juste à gauche du bouton ⋮ (2026-08-25, retour
     utilisateur explicite) — même positionnement top/right que
     .elec-node-menu-btn (18px + 2px d'écart). */
  .elec-node-lock-toggle{ position:absolute; top:3px; right:23px; width:18px; height:18px; display:flex; align-items:center; justify-content:center; background:none; border:none; color: var(--text-faint); cursor:pointer; border-radius:4px; z-index:7; padding:0; }
  .elec-node-lock-toggle:hover{ color: var(--text); background: var(--surface-2); }
  .elec-node-lock-toggle.locked{ color: var(--amber); }
  .elec-node-lock-toggle.locked:hover{ color: var(--amber); background: rgba(240,166,59,0.14); }
  .elec-node-orient-btn{ position:absolute; top:3px; left:3px; width:18px; height:18px; display:flex; align-items:center; justify-content:center; background:none; border:none; color: var(--text-faint); cursor:pointer; border-radius:4px; z-index:7; }
  .elec-node-orient-btn:hover{ color: var(--text); background: var(--surface-3); }

  /* Device Flow — rack (2026-08-25) : conteneur décoratif "grosse armoire
     qui en contient des petites", jamais un vrai obstacle de câblage
     (les devices posés dessus restent des éléments indépendants). */
  /* Boîtier "physique" (2026-08-26, retour utilisateur explicite : "rend le
     physique, pas juste transparent avec du texte") — plus un simple
     contour pointillé quasi transparent, un vrai panneau solide avec une
     bande de titre distincte en haut, comme le reste des nœuds (.elec-node)
     mais visuellement un CONTENEUR (bord plus épais, coins moins arrondis). */
  .df-rack-box{ position:absolute; transform:translate(-50%,-50%); box-sizing:border-box; border:2px solid var(--border); border-radius:8px; background: var(--surface-2); box-shadow:0 4px 14px rgba(0,0,0,0.25); cursor:grab; touch-action:none; }
  .df-rack-box.selected{ border-color: var(--teal); }
  /* Rack survolé pendant le glisser d'un appareil (dfDropTargetRackId,
     2026-08-25) — "on a qu'à les glisser dedans", retour visuel direct que
     ce rack va effectivement recevoir l'appareil au relâchement. */
  .df-rack-box.drop-target{ border-color: var(--teal); background: rgba(47,217,196,0.12); }
  .df-rack-box.df-group-highlight{ border-color: var(--amber); box-shadow: 0 0 0 2px var(--amber), 0 4px 14px rgba(0,0,0,0.25); }
  /* Rack coloré : boutons posés sur le bandeau dans la même encre que le titre (blanc ou noir selon la couleur). */
  .df-rack-box.df-rack-inked > .elec-node-menu-btn, .df-rack-box.df-rack-inked > .elec-node-lock-toggle{ color:var(--df-rack-ink); }
  .df-rack-title{ position:absolute; top:0; left:0; right:0; box-sizing:border-box; padding:6px 10px; background: var(--surface-3); border-bottom:1px solid var(--border); border-radius:6px 6px 0 0; font-family: var(--mono); font-size:11px; color: var(--text-faint); text-transform:uppercase; letter-spacing:0.04em; pointer-events:none; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .df-domain-dot{ display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px; vertical-align:middle; }
  .df-connector-row select.af-input, .df-connector-row input.af-input{ margin:0; }
  .elec-node-side-btn{ position:absolute; top:3px; left:3px; width:18px; height:18px; display:flex; align-items:center; justify-content:center; background:none; border:none; color: var(--text-faint); cursor:pointer; border-radius:4px; z-index:7; }
  .elec-node-side-btn:hover{ color: var(--text); background: var(--surface-3); }
  .info-bubble-resize-handle{ position:absolute; right:-7px; bottom:-7px; width:13px; height:13px; border-radius:50%; background: var(--teal); border:1.5px solid var(--surface-2); cursor:nwse-resize; z-index:8; touch-action:none; }
  /* Zone cliquable agrandie (invisible) au-delà du petit rond visible — sans
     ça la poignée est difficile à attraper précisément à la souris, ce qui
     peut donner l'impression que le redimensionnement "ne s'accroche pas". */
  .info-bubble-resize-handle::before{ content:''; position:absolute; inset:-7px; }
  .info-bubble-resize-handle:hover{ transform:scale(1.2); }
  /* Poignée de redimensionnement d'une armoire/gradateur/device en Plan
     (2026-08-28) — même mécanique visuelle que .info-bubble-resize-handle
     ci-dessus (coin bas-droit, zone de clic élargie), jamais rendue en
     Synoptique (voir elecNodeHTML()). */
  .elec-node-resize-handle{ position:absolute; right:-7px; bottom:-7px; width:13px; height:13px; border-radius:50%; background: var(--teal); border:1.5px solid var(--surface-2); cursor:nwse-resize; z-index:8; touch-action:none; }
  .elec-node-resize-handle::before{ content:''; position:absolute; inset:-7px; }
  .elec-node-resize-handle:hover{ transform:scale(1.2); }
  .elec-node-dropdown{ position:absolute; top:100%; right:0; margin-top:4px; background: var(--surface-3); border:1px solid var(--border); border-radius:8px; padding:5px; min-width:130px; display:none; z-index:10; box-shadow: 0 8px 24px rgba(0,0,0,0.35); text-align:left; }
  .elec-node-dropdown.show{ display:block; }
  .elec-node-dropdown .menubar-option.danger{ color: var(--red); }
  .menubar-back{ display:flex; align-items:center; gap:6px; background:none; border:none; color: var(--text-dim); font-family: var(--mono); font-size:11.5px; padding:6px 8px; margin-bottom:6px; cursor:pointer; border-radius:6px; }
  .menubar-back:hover{ color: var(--text); background: var(--surface-2); }

  .conn-dot{ position:absolute; width:8px; height:8px; border-radius:50%; background: var(--teal); border:1.5px solid var(--surface-2); z-index:6; cursor:crosshair; }
  .conn-dot.input{ left:-5px; }
  .conn-dot.output{ right:-5px; background: var(--amber); }
  .conn-dot.output.recon{ background: var(--red); }
  .conn-dot.vertical.input{ left:auto; top:-5px; }
  .conn-dot.vertical.output{ right:auto; bottom:-5px; }
  /* Bulles d'info : entrées sur l'un des 4 côtés (rotateInfoBubbleSide()),
     indépendant du système gauche/droite (horizontal) ou haut/bas (vertical)
     à 2 positions des armoires/devices ci-dessus. */
  .conn-dot.side-left{ left:-5px; right:auto; top:auto; bottom:auto; }
  .conn-dot.side-right{ right:-5px; left:auto; top:auto; bottom:auto; }
  .conn-dot.side-top{ top:-5px; bottom:auto; left:auto; right:auto; }
  .conn-dot.side-bottom{ bottom:-5px; top:auto; left:auto; right:auto; }
  .conn-dot::after{ content: attr(data-tooltip); position:absolute; top:50%; transform:translateY(-50%); background: var(--surface-3); color: var(--text); font-family: var(--mono); font-size:9.5px; padding:3px 8px; border-radius:5px; border:1px solid var(--border); white-space:nowrap; opacity:0; pointer-events:none; transition: opacity .12s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index:20; }
  .conn-dot.input::after{ right:14px; }
  .conn-dot.output::after{ left:14px; }
  .conn-dot.vertical::after{ top:auto; right:auto; left:50%; transform:translateX(-50%); }
  .conn-dot.vertical.input::after{ top:14px; }
  .conn-dot.vertical.output::after{ bottom:14px; }
  .conn-dot.side-top::after{ top:14px; bottom:auto; left:50%; right:auto; transform:translateX(-50%); }
  .conn-dot.side-bottom::after{ bottom:14px; top:auto; left:50%; right:auto; transform:translateX(-50%); }
  .conn-dot.side-right::after{ right:14px; left:auto; top:50%; transform:translateY(-50%); }
  .conn-dot:hover{ transform: scale(1.35); }
  .conn-dot:hover::after{ opacity:1; }
  .conn-dot.pending{ box-shadow: 0 0 0 3px rgba(47,217,196,0.4); transform: scale(1.3); }
  .conn-dot.occupied{ background: var(--text-faint); }
  /* Prises d'une armoire/d'un device (Élec) ou d'un appareil (Device Flow)
     sur l'un des 4 côtés — rotation par pas de 90° (2026-09-14, voir
     portSideForStep() dans elec-engine.js). Placées APRÈS .conn-dot.input/
     .output pour l'emporter à spécificité égale ; la position le long du bord
     vient du style inline (top: ou left:). */
  .conn-dot.ps-left{ left:-5px; right:auto; bottom:auto; }
  .conn-dot.ps-right{ right:-5px; left:auto; bottom:auto; }
  .conn-dot.ps-top{ top:-5px; bottom:auto; right:auto; }
  .conn-dot.ps-bottom{ bottom:-5px; top:auto; right:auto; }
  .conn-dot.ps-left::after{ right:14px; left:auto; top:50%; bottom:auto; transform:translateY(-50%); }
  .conn-dot.ps-right::after{ left:14px; right:auto; top:50%; bottom:auto; transform:translateY(-50%); }
  .conn-dot.ps-top::after{ bottom:14px; top:auto; left:50%; right:auto; transform:translateX(-50%); }
  .conn-dot.ps-bottom::after{ top:14px; bottom:auto; left:50%; right:auto; transform:translateX(-50%); }
  /* Point "gris" Device Flow (2026-08-25) — regroupe les connecteurs
     au-delà de DF_MAX_SHOWN_PER_SIDE (ou d'un type déjà représenté),
     ouvre un picker au clic plutôt que d'agir comme un vrai port — voir
     dfConnDotsHTML()/openDfPortPickerModal() dans deviceflow.js. Distinct
     du gris de `.occupied` (un connecteur RÉEL déjà relié) : contour
     pointillé + glyphe "+" plutôt qu'un simple aplat. */
  .conn-dot.more{ background: var(--surface-3); border:1.5px dashed var(--text-dim); }
  .conn-dot.more::before{ content:'+'; position:absolute; inset:-1.5px; display:flex; align-items:center; justify-content:center; font-size:8px; line-height:1; color:var(--text-dim); font-family:var(--mono); pointer-events:none; }
  .elec-wires-svg{ position:absolute; inset:0; pointer-events:none; z-index:1; overflow:visible; }
  .elec-wire-hit{ fill:none; stroke:transparent; stroke-width:14; pointer-events:stroke; cursor:pointer; }
  .elec-wire{ fill:none; stroke: var(--teal); stroke-width:1.75; stroke-linejoin:round; stroke-linecap:round; opacity:0.8; pointer-events:none; cursor:pointer; }
  .elec-wire-hit:hover + .elec-wire{ opacity:1; stroke-width:2.5; }
  .elec-wire.selected{ opacity:1; stroke-width:2.75; stroke-dasharray:5 3; }
  .elec-wire-preview{ fill:none; stroke: var(--amber); stroke-width:2; stroke-dasharray:4 4; pointer-events:none; }
  .elec-wire-preview-dot{ fill: var(--amber); pointer-events:none; }
  /* Poignées des points posés du câble sélectionné (nouveau câblage
     2026-11-06, style de l'ancien câble à points) : virage à tirer, point
     de section à retirer par double-clic. Le SVG des câbles est en
     pointer-events:none — ces ronds réactivent explicitement la saisie.
     Masqués dans le rapport, la lecture seule et l'impression (listes plus bas). */
  .wire-waypoint-handle{ fill: var(--surface-2); stroke: var(--teal); stroke-width:1.6; pointer-events:all; cursor:move; }
  .wire-waypoint-handle:hover{ stroke-width:3; fill: var(--teal); }
  .elec-canvas.wire-drawing{ cursor:crosshair; }
  .wire-draw-hint{ position:absolute; top:8px; left:8px; z-index:16; background: var(--surface-3); border:1px solid var(--amber); color: var(--text); font-family: var(--mono); font-size:11px; padding:6px 10px; border-radius:8px; box-shadow:0 8px 20px rgba(0,0,0,0.3); }
  .elec-wire-labels{ position:absolute; inset:0; z-index:8; pointer-events:none; }
  /* Device Flow : sortie / entrée utilisées aux deux bouts de chaque câble
     (2026-10-09), en tout petit — lisibles en zoomant (le PDF du Rapport les
     réécrit en texte vectoriel, voir collectPortTagRuns dans report-pages.js). */
  .df-port-tags{ position:absolute; left:0; top:0; z-index:7; pointer-events:none; }
  /* petit fond blanc (lisible par-dessus un câble qui tourne juste après la prise),
     texte foncé dans les deux thèmes */
  .df-port-tag{ position:absolute; transform-origin:0 0; font-family: var(--mono); font-size:5px; line-height:1; font-weight:600; color:#3b4250; background:#fff; padding:0 1px; border-radius:1px; white-space:nowrap; }

  /* Bug réel corrigé (2026-08-26, découvert en construisant l'onglet "Plans"
     du module Électricité) : sans `pointer-events:none` sur la racine, ce
     SVG plein-calque (z-index:2, AU-DESSUS de .elec-node qui reste à
     z-index:auto quel que soit son ordre DOM) interceptait tout clic tombant
     sur sa zone VIDE (aucune forme peinte à cet endroit précis) — y compris
     par-dessus une armoire/un device, rendant le glisser/la sélection
     silencieusement inopérants dès qu'un onglet "implantation" existe
     (déjà vrai pour le module Plan autonome, jamais remarqué faute de test
     automatisé du glisser à cet endroit). La règle enfant ci-dessous
     (`[data-plan-obj]`) réactive `pointer-events` explicitement pour les
     VRAIS objets du Plan — un enfant peut toujours ré-activer ce qu'un
     ancêtre désactive, même schéma déjà en place pour `.elec-wire-labels`
     juste au-dessus. */
  .elec-plan-objects-svg{ position:absolute; left:0; top:0; z-index:2; overflow:visible; pointer-events:none; }
  .elec-plan-objects-svg [data-plan-obj]{ cursor:move; pointer-events:all; }
  .elec-plan-objects-svg .plan-obj-selected{ filter: drop-shadow(0 0 0 1px var(--teal)); }
  /* Ligne de référence de l'échelle, quand elle est affichée (2026-09-09) :
     elle n'est PAS un `[data-plan-obj]` (pas de sélection/panneau de style,
     voir planObjectsSvgHTML()), il faut donc lui ré-activer `pointer-events`
     ici aussi — sinon le `pointer-events:none` de l'ancêtre la rend
     silencieusement impossible à saisir, exactement le piège décrit
     ci-dessus. */
  .elec-plan-objects-svg .plan-scale-hit{ pointer-events:all; cursor:grab; }
  .elec-plan-objects-svg .plan-scale-hit:active{ cursor:grabbing; }
  .plan-handle{ fill: var(--teal); stroke:#04231f; stroke-width:1.5; cursor:pointer; pointer-events:all; }
  /* Bords de l'objet choisi (2026-10-20) : un clic sans glisser donne sa dimension réelle
     (fenêtre .plan-dim-pop, elec-engine.js) ; glisser déplace l'objet comme son corps. */
  .elec-plan-objects-svg .plan-edge-hit{ stroke:transparent; stroke-width:12; stroke-linecap:round; fill:none; pointer-events:stroke; cursor:pointer; }
  .elec-plan-objects-svg .plan-edge-hit:hover{ stroke: var(--teal); stroke-opacity:.45; }
  .elec-plan-objects-svg .plan-edge-hit.active{ stroke: var(--teal); stroke-opacity:.85; }
  .plan-dim-pop{ position:fixed; z-index:650; width:230px; background: var(--surface-3); border:1px solid var(--border); border-radius:9px; padding:10px 12px; box-shadow: 0 10px 28px rgba(0,0,0,0.35); color: var(--text); font-family: var(--font-body); font-size:12.5px; display:grid; gap:8px; }
  .plan-dim-head{ display:flex; align-items:center; gap:8px; }
  .plan-dim-title{ flex:1; font-family: var(--font-display); font-size:11px; font-weight:600; color: var(--text-faint); text-transform:uppercase; letter-spacing:0.04em; }
  .plan-dim-x{ background:none; border:none; color: var(--text-dim); cursor:pointer; font-size:13px; padding:2px 4px; border-radius:4px; }
  .plan-dim-x:hover{ color: var(--text); }
  .plan-dim-row{ display:flex; align-items:center; gap:6px; color: var(--text-dim); }
  .plan-dim-row input{ width:110px; height:28px; border:1px solid var(--border); border-radius:5px; background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size:12.5px; padding:0 8px; }
  .plan-dim-check{ display:flex; align-items:center; gap:6px; color: var(--text-dim); cursor:pointer; }
  .plan-dim-note{ color: var(--text-dim); font-size:11.5px; line-height:1.45; }
  .plan-dim-ok{ width:100%; justify-content:center; }
  .plan-dim-pop input:focus-visible, .plan-dim-pop button:focus-visible{ outline:2px solid var(--teal); outline-offset:1px; }
  .plan-line{ cursor:move; pointer-events:all; }
  .plan-line-label{ font-family: var(--font-body); fill: var(--text); pointer-events:none; }
  .plan-line-measure-label{ font-family: var(--font-body); fill: var(--teal); pointer-events:none; paint-order:stroke; stroke:rgba(0,0,0,0.55); stroke-width:3px; }
  .plan-text-obj{ position:absolute; z-index:3; font-family:Arial, sans-serif; white-space:nowrap; cursor:move; padding:2px 4px; user-select:none; }
  .plan-text-obj.selected{ outline:1px dashed var(--teal); }
  .plan-text-handle{ position:absolute; right:-9px; bottom:-9px; width:14px; height:14px; background: var(--teal); border-radius:50%; cursor:nwse-resize; border:1.5px solid #04231f; }
  .plan-style-panel{ left:auto; right:10px; top:10px; min-width:150px; padding:10px; }
  .plan-style-collapsed-btn{ top:10px; right:10px; left:auto; }
  /* Panneau "Longueur réelle" de l'outil Échelle (2026-08-17) — coin
     opposé au panneau de style pour ne jamais se chevaucher, ni avec le
     panneau de visibilité des groupes (Synoptique uniquement). */
  .plan-scale-panel{ left:10px; right:auto; top:10px; min-width:210px; padding:10px; }
  .plan-scale-panel input[type="number"]{ height:28px; border:1px solid var(--border); border-radius:5px; background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size:12.5px; padding:0 8px; }
  .pss-row{ display:flex; align-items:center; gap:6px; margin-top:8px; flex-wrap:wrap; }
  .pss-icon{ display:flex; align-items:center; justify-content:center; width:22px; height:22px; color: var(--text-faint); flex-shrink:0; }
  .plan-color-input-sm{ width:26px; height:26px; border:1px solid var(--border); border-radius:5px; background: var(--surface-2); cursor:pointer; padding:1px; flex-shrink:0; }
  .pss-range-sm{ flex:1; min-width:50px; }
  .pss-icon-btn{ display:flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:5px; border:1px solid var(--border); background: var(--surface-2); color: var(--text-faint); cursor:pointer; flex-shrink:0; }
  .pss-icon-btn.active{ color: var(--teal); border-color: rgba(47,217,196,0.4); background: rgba(47,217,196,0.08); }
  .pss-icon-btn.pss-delete{ margin-left:auto; color: var(--red); border-color: rgba(229,85,90,0.3); }
  .pss-icon-btn.pss-delete:hover{ background: rgba(229,85,90,0.12); }
  .pss-icon-label{ font-family: var(--font-body); font-size:11.5px; color: var(--text-dim); }
  .pss-px-input{ width:52px; height:26px; border:1px solid var(--border); border-radius:5px; background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size:11.5px; text-align:center; padding:0 4px; }
  .pss-divider{ height:1px; background: var(--border); margin:10px 0; }
  .pss-text-input{ font-size:12px; padding:7px 8px; }
  .wire-label-btn{ position:absolute; transform:translate(-50%, -50%); background: var(--surface-3); border:1px solid var(--border); border-radius:4px; padding:2px 8px; font-family: var(--mono); font-size:9px; color: var(--text); cursor:grab; white-space:nowrap; pointer-events:auto; touch-action:none; }
  .wire-label-btn:active{ cursor:grabbing; }
  .wire-label-btn:hover{ border-color: var(--teal); color: var(--teal); }

  .elec-vdivider{ width:10px; margin:0 -2px; cursor:col-resize; position:relative; flex-shrink:0; z-index:2; touch-action:none; }
  .elec-vdivider::after{ content:''; position:absolute; top:4px; bottom:4px; left:4px; width:2px; border-radius:2px; background: var(--border); transition: background .1s ease; }
  .elec-vdivider:hover::after{ background: var(--teal); }
  .elec-hdivider{ height:10px; margin:-2px 0; cursor:row-resize; position:relative; flex-shrink:0; z-index:2; touch-action:none; }
  .elec-hdivider::after{ content:''; position:absolute; left:4px; right:4px; top:4px; height:2px; border-radius:2px; background: var(--border); transition: background .1s ease; }
  .elec-hdivider:hover::after{ background: var(--teal); }
  body.elec-resizing-h .elec-vdivider::after{ background: var(--teal); }
  body.elec-resizing-v .elec-hdivider::after{ background: var(--teal); }
  body.elec-resizing-h, body.elec-resizing-h *{ cursor: col-resize !important; user-select: none !important; }
  body.elec-resizing-v, body.elec-resizing-v *{ cursor: row-resize !important; user-select: none !important; }


  .report-row{ display:flex; align-items:center; gap:14px; background: var(--surface); border:1px solid var(--border); border-radius:9px; padding:13px 16px; margin-bottom:10px; cursor:pointer; transition: border-color .15s ease; }
  .report-row-active{ border-color: var(--teal); }
  .report-row:hover{ border-color: var(--text-faint); }
  .rr-icon{ width:32px; height:32px; border-radius:7px; background: var(--surface-2); display:flex; align-items:center; justify-content:center; color: var(--teal); flex-shrink:0; }
  .rr-main{ flex:1; min-width:0; }
  .rr-name{ font-family: var(--font-display); font-weight:600; font-size:13.5px; }
  .rr-file{ font-family: var(--mono); font-size:11px; color: var(--text-faint); margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .rr-stats{ font-family: var(--mono); font-size:11px; color: var(--text-dim); flex-shrink:0; }
  .empty-hint{ font-family: var(--mono); font-size:12px; color: var(--text-faint); }

  /* ---------- RAPPORT — sections cumulées ---------- */
  .report-section-wrap{ margin-bottom:8px; }
  .report-section-row{ display:flex; align-items:center; gap:10px; background: var(--surface); border:1px solid var(--border); border-radius:8px; padding:9px 12px; }
  .ds-table-chips-row{ display:flex; gap:6px; margin:6px 2px 0; }
  .report-section-kind{ font-family: var(--mono); font-size:10px; letter-spacing:0.04em; text-transform:uppercase; color: var(--teal); background: var(--surface-3); border-radius:5px; padding:3px 7px; flex-shrink:0; }
  .report-section-name{ flex:1; min-width:0; font-size:12.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .report-section-tag{ font-family: var(--mono); font-size:9.5px; color: var(--text-faint); background: var(--surface-3); border-radius:5px; padding:3px 7px; flex-shrink:0; }
  .report-add-btns{ display:flex; gap:6px; flex-shrink:0; }
  .report-add-btn{ font-family: var(--mono); font-size:10.5px; background: var(--surface-2); border:1px solid var(--border); color: var(--text-dim); border-radius:6px; padding:5px 9px; cursor:pointer; }
  .report-add-btn:hover{ color: var(--text); border-color: var(--text-dim); }

  /* ---------- RAPPORT — page de garde ---------- */
  .cover-enable-row{ display:flex; align-items:center; gap:8px; font-size:12.5px; color: var(--text); cursor:pointer; margin-top:10px; }
  .cover-orientation-row{ display:flex; gap:8px; margin:14px 0; }
  .cover-orient-btn{ font-family: var(--mono); font-size:11px; background: var(--surface-2); border:1px solid var(--border); color: var(--text-dim); border-radius:7px; padding:8px 16px; cursor:pointer; }
  .cover-orient-btn:hover{ color: var(--text); border-color: var(--text-dim); }
  .cover-orient-btn.active{ color: var(--teal); border-color: rgba(47,217,196,0.4); background: var(--surface-3); }
  .cover-toolbar{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
  .cover-opacity-label{ display:flex; align-items:center; gap:6px; font-family: var(--mono); font-size:10.5px; color: var(--text-dim); }
  .cover-canvas-viewport{ position:relative; width:100%; overflow:hidden; border:1px solid var(--border); border-radius:8px; background:#fff; }
  .cover-canvas-layer{ position:relative; overflow:hidden; transform-origin:top left; background:#fff; container-type:inline-size; }
  .cover-logo-obj{ position:absolute; transform:translate(-50%,-50%); cursor:grab; touch-action:none; }
  .cover-logo-obj img{ display:block; width:100%; height:auto; pointer-events:none; }
  .cover-logo-obj.selected{ outline:1.5px dashed var(--teal); outline-offset:6px; }
  .cover-logo-toolbar{ position:absolute; top:100%; left:50%; transform:translateX(-50%); margin-top:8px; display:flex; align-items:center; gap:5px; background: var(--surface-3); border:1px solid var(--border); border-radius:7px; padding:5px 6px; white-space:nowrap; z-index:5; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
  .cover-logo-toolbar button{ font-family: var(--mono); font-size:10px; background: var(--surface-2); border:1px solid var(--border); color: var(--text-dim); border-radius:5px; padding:4px 7px; cursor:pointer; }
  .cover-logo-toolbar button:hover{ color: var(--text); border-color: var(--text-dim); }
  .cover-logo-resize-handle{ position:absolute; right:-7px; bottom:-7px; width:14px; height:14px; border-radius:50%; background: var(--teal); border:2px solid #fff; cursor:nwse-resize; box-shadow:0 2px 6px rgba(0,0,0,0.35); }
  .cover-text-obj{ position:absolute; transform:translate(-50%,-50%); cursor:grab; max-width:90%; touch-action:none; }
  .cover-text-obj.selected .cover-text-content{ outline:1.5px dashed var(--teal); outline-offset:4px; }
  .cover-text-content{ line-height:1.25; text-align:center; white-space:pre-wrap; word-wrap:break-word; font-family: var(--font-body, sans-serif); }
  .cover-text-placeholder{ color:#999; font-style:italic; }
  .cover-text-edit-area{ font-family: var(--font-body, sans-serif); line-height:1.25; text-align:center; background: rgba(255,255,255,0.94); border:1.5px dashed var(--teal); border-radius:4px; min-width:160px; min-height:40px; resize:both; color:inherit; }
  .cover-text-toolbar{ position:absolute; top:100%; left:50%; transform:translateX(-50%); margin-top:8px; display:flex; align-items:center; gap:5px; background: var(--surface-3); border:1px solid var(--border); border-radius:7px; padding:5px 6px; white-space:nowrap; z-index:5; box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
  .cover-text-toolbar.above{ top:auto; bottom:100%; margin-top:0; margin-bottom:8px; }
  .cover-text-toolbar button{ font-family: var(--mono); font-size:10px; background: var(--surface-2); border:1px solid var(--border); color: var(--text-dim); border-radius:5px; padding:4px 7px; cursor:pointer; }
  .cover-text-toolbar button:hover{ color: var(--text); border-color: var(--text-dim); }
  .cover-text-toolbar input[type="color"]{ width:22px; height:22px; padding:0; border:1px solid var(--border); border-radius:5px; background:none; cursor:pointer; }

  #report-print-root{ display:none; }
  .report-generating-overlay{ position:fixed; inset:0; z-index:2000; background: rgba(8,10,14,0.75); display:flex; align-items:center; justify-content:center; color:#fff; font-family: var(--font-display); font-size:14px; font-weight:600; }
  .report-section-rename-input{ flex:1; min-width:0; font-size:12.5px; padding:5px 8px; }

  /* ---------- RAPPORT — aperçu d'une section capturée ----------
     Même liste d'éléments masqués que l'impression (menubar, poignées de
     zoom, repère de mise en page...) pour que l'aperçu représente fidèlement
     ce qui sortira réellement sur la page imprimée. */
  .report-preview-modal{ max-width:min(90vw, 1100px); width:90vw; }
  .report-preview-viewport{ position:relative; width:100%; height:min(70vh, 700px); overflow:hidden; border:1px solid var(--border); border-radius:8px; background: var(--surface-2); display:flex; align-items:center; justify-content:center; }
  .report-preview-layer{ position:relative; transform-origin:center center; background:#fff; }
  .report-preview-layer .menubar, .report-preview-layer .elec-canvas-zoom-ctrl,
  .report-preview-layer .elec-group-visibility-panel, .report-preview-layer .egv-collapsed-btn,
  .report-preview-layer .elec-color-panel, .report-preview-layer .elec-landscape-guide,
  .report-preview-layer .wire-draw-hint, .report-preview-layer .plan-style-panel,
  .report-preview-layer .plan-style-collapsed-btn, .report-preview-layer .elec-vdivider,
  .report-preview-layer .elec-hdivider, .report-preview-layer .elec-back-mini,
  .report-preview-layer .elec-topline,
  .report-preview-layer .elec-node-menu-btn, .report-preview-layer .elec-node-orient-btn,
  .report-preview-layer .elec-node-side-btn, .report-preview-layer .info-bubble-resize-handle,
  .report-preview-layer .elec-node-resize-handle, .report-preview-layer .elec-node-lock-toggle,
  .report-preview-layer .wire-waypoint-handle,
  .report-preview-layer .elec-node-dropdown,
  .report-preview-layer .ds-subtabs, .report-preview-layer .pd-back{ display:none !important; }
  .report-preview-layer #elec-container, .report-preview-layer #plan-container{ display:block; height:auto; }

  /* Viewer lecture seule (partage, voir shared-viewer.js) — cache les
     contrôles d'ÉDITION (menus de nœud, panneau couleur, repère de mise en
     page...) mais GARDE `.elec-canvas-zoom-ctrl` visible (contrairement à
     `.report-preview-layer` ci-dessus, pensé pour une capture figée) :
     l'utilisateur doit pouvoir zoomer/dézoomer/se déplacer, demande
     explicite. Aucun handler d'édition n'est de toute façon jamais câblé
     sur ce rendu (renderReadOnlyDoc() n'appelle jamais wireElecNodes()),
     ces règles ne sont qu'un filet visuel en plus. */
  .shared-readonly-layer .menubar, .shared-readonly-layer .elec-color-panel,
  .shared-readonly-layer .elec-landscape-guide, .shared-readonly-layer .wire-draw-hint,
  .shared-readonly-layer .plan-style-panel, .shared-readonly-layer .plan-style-collapsed-btn,
  .shared-readonly-layer .elec-node-menu-btn, .shared-readonly-layer .elec-node-orient-btn,
  .shared-readonly-layer .elec-node-side-btn, .shared-readonly-layer .info-bubble-resize-handle,
  .shared-readonly-layer .elec-node-resize-handle, .shared-readonly-layer .elec-node-lock-toggle,
  .shared-readonly-layer .wire-waypoint-handle,
  .shared-readonly-layer .elec-node-dropdown, .shared-readonly-layer .elec-group-visibility-panel,
  .shared-readonly-layer .egv-collapsed-btn, .shared-readonly-layer .elec-topline,
  .shared-readonly-layer .elec-back-mini,
  /* Data sheets (elecDatasheetPaneHTML(), voir shared-viewer.js) : tri/filtre/
     onglets de vue par groupe ne sont jamais câblés ici (même raison que le
     reste de cette liste) — mêmes classes déjà masquées dans
     .report-preview-layer pour la même raison (voir plus haut). */
  .shared-readonly-layer .ds-sort-control, .shared-readonly-layer .ds-filter-input,
  .shared-readonly-layer .ds-subtabs, .shared-readonly-layer .pd-back{ display:none !important; }
  /* Le champ Longueur du tableau Câbles reste un vrai <input> éditable dans
     le HTML retourné par elecCablesTableHTML() (aucune version "lecture
     seule" séparée n'existe) — jamais câblé ici comme le reste des contrôles
     ci-dessus, mais visuellement toujours cliquable/éditable sans ce
     correctif : pointer-events:none plutôt que display:none pour garder la
     valeur déjà renseignée lisible. */
  .shared-readonly-layer input.ds-length-input{ pointer-events:none; opacity:0.75; }
  .shared-readonly-layer .elec-node{ cursor:default; }
  /* Hauteur du canevas en lecture seule (2026-10-18) : l'ancien `height:75vh` sur
     .elec-pane-wrap était annulé par son `flex:1 1 0` — le canevas retombait à la
     hauteur minimale (320 px) sous les onglets Synoptique / Data sheets, et à rien
     sur téléphone. Hauteur explicite sur le calque, quel que soit son conteneur. */
  .elec-layout.shared-readonly-layer{ flex:none; height:clamp(380px, calc(100dvh - 250px), 1600px); min-height:0; }
  /* page du lien public : la chaîne de conteneurs est en colonne flex, le canevas
     prend exactement la place entre l'en-tête et le pied de page */
  .link-view-body #shared-elec-subtab-body{ flex:1 1 auto; display:flex; flex-direction:column; min-height:0; }
  .link-view-body .elec-layout.shared-readonly-layer{ flex:1 1 auto; height:auto; min-height:380px; }

  /* Viewer lecture seule — RAPPORT (partage, voir rapport-shared-viewer.js) :
     contenu déjà figé (section.domHTML), pas de pan/zoom nécessaire —
     simple défilement vertical de toutes les pages du rapport, chacune
     rendue via renderCapturePage()/.report-preview-layer réutilisés tels
     quels (voir rapport.js). .shared-rapport-viewport doit avoir une taille
     RÉELLE (pas 0) avant l'appel à renderCapturePage() — voir le commentaire
     dans rapport-shared-viewer.js sur l'ordre d'attache au DOM. */
  .shared-rapport-pages{ display:flex; flex-direction:column; align-items:center; gap:28px; padding:8px 0 48px; }
  .shared-rapport-page-label{ font-size:12px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.04em; margin-bottom:8px; align-self:flex-start; }
  .shared-rapport-page-wrap{ display:flex; flex-direction:column; width:min(860px,92vw); }
  .shared-rapport-viewport{ position:relative; width:100%; }
  .shared-rapport-flow-box{ background:#fff; box-shadow:0 4px 20px rgba(0,0,0,0.35); }

  /* Viewer lecture seule — SCÈNE 3D (partage, voir scene3d-shared-viewer.js) :
     un seul canevas plein cadre, orbite/zoom/pan uniquement (OrbitControls),
     jamais de chrome d'édition (pas de HUD/inspecteur/barre d'outils —
     rien de tout ça n'est construit par ce viewer minimal). */
  .shared-scene3d-viewport{ position:relative; width:100%; height:75vh; border-radius:8px; overflow:hidden; background:#0e1116; }
  .shared-scene3d-viewport canvas{ display:block; }
  /* Onglet Plan du lecteur 3D (vrai rendu plan, scene3d-shared-viewer.js, 2026-10-18) */
  .ssv-plan-box{ display:flex; flex-direction:column; height:75vh; border:1px solid #262b35; border-radius:8px; overflow:hidden; background:#14171d; }
  .ssv-plan-toolbar{ flex-wrap:wrap; row-gap:6px; }
  .ssv-plan-label{ font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:#5B6472; margin-right:2px; }
  .ssv-plan-sep{ width:1px; align-self:stretch; background:#262b35; margin:0 4px; }
  .ssv-plan-spacer{ flex:1 1 auto; }
  .ssv-plan-check{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:#C9CED6; cursor:pointer; margin-right:6px; }
  .ssv-plan-dl{ text-decoration:none; }
  .ssv-plan-stage{ position:relative; flex:1 1 auto; min-height:0; overflow:hidden; background:#fff; cursor:grab; touch-action:none; }
  .ssv-plan-stage.panning{ cursor:grabbing; }
  .ssv-plan-pan{ position:absolute; left:0; top:0; transform-origin:0 0; }
  .ssv-plan-img{ display:block; user-select:none; -webkit-user-drag:none; }
  .ssv-plan-status{ position:absolute; inset:0; display:grid; place-items:center; background:rgba(255,255,255,.85); color:#333; font-size:13px; }
  .ssv-plan-status[hidden]{ display:none; }
  .ssv-plan-zoom{ position:absolute; right:12px; bottom:12px; display:flex; align-items:center; gap:2px; padding:3px; border-radius:8px; background:#14171d; border:1px solid #262b35; }
  .ssv-plan-zoom button{ background:none; border:0; color:#EDEDED; width:28px; height:26px; border-radius:6px; cursor:pointer; font-size:15px; }
  .ssv-plan-zoom button:hover{ background:#262b35; }
  .ssv-plan-zoom span{ font-family: var(--mono); font-size:11.5px; color:#C9CED6; min-width:44px; text-align:center; }
  /* 3D impossible (WebGL indisponible ou perdu) */
  .ssv-nogl{ height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; padding:24px; text-align:center; color:#C9CED6; }
  .ssv-nogl svg{ color:#5B6472; }
  .ssv-nogl b{ font-family: var(--font-display); font-size:16px; color:#EDEDED; }
  .ssv-nogl span{ max-width:520px; font-size:13px; line-height:1.5; color:#9AA3AF; }
  /* Onglets DMX/Data/Plan lecture seule (2026-08-04) — mêmes classes fixes
     (.scene3d-tab, famille .scene3d-dmx- et .scene3d-data-) que l'espace de
     travail éditable, juste réutilisées hors de .scene3d-topline/.scene3d-body
     (qui supposent le plein viewport fixe de la Scène 3D, absent ici) — d'où
     ces deux classes de mise en page dédiées, hauteur explicite en vh
     comme .shared-scene3d-viewport plutôt qu'un flex:1 qui s'effondrerait
     sans chaîne de hauteur ancestrale garantie (le conteneur du viewer
     partagé n'est pas un flex-direction:column borné comme #scene3d-container). */
  .shared-scene3d-tabbar{ display:flex; align-items:center; gap:2px; background:#14171d; border:1px solid #262b35; border-radius:8px; padding:0 6px; height:40px; margin-bottom:14px; }
  .shared-scene3d-tab-panel{ }
  .shared-scene3d-fixed-body{ height:75vh; display:flex; background:#14171d; border:1px solid #262b35; border-radius:8px; overflow:hidden; }
  .shared-scene3d-fixed-body .scene3d-data-panel{ flex:1; min-height:0; }
  .scene3d-dmx-patch-grid.readonly .scene3d-dmx-patch-cell{ cursor:default; }

  /* .elec-layout reste un conteneur flex (colonne) même quand ses parents
     passent en display:block — un enfant flex avec flex:1 1 0 sans hauteur
     explicite sur le conteneur retombe sur son seul min-height (320px),
     au lieu de contenir le canevas figé (souvent bien plus grand). Il faut
     casser la chaîne flex ici aussi, pas seulement sur .elec-pane-wrap. */
  .report-preview-layer .elec-layout{ display:block; }
  .report-preview-layer .elec-pane-wrap{ display:block; overflow:visible; height:auto; }
  .report-preview-layer .elec-pane-body{ height:auto; overflow:visible; }
  /* La taille exacte de `.elec-canvas` est figée en ligne par JS à sa taille
     de capture d'origine (voir openSectionPreview() dans rapport.js) — pas
     de taille fixe ici, un cadrage capturé à une taille différente serait
     sinon déformé/mal cadré (voir CLAUDE.md, "Rapport combiné"). overflow
     reste "hidden" (valeur par défaut de .elec-canvas) : le calque de zoom
     doit rester rogné aux bords du canevas figé, exactement comme à
     l'écran — sinon le contenu déborderait visuellement au lieu d'être
     recadré comme au moment de la capture. */
  .report-preview-layer .elec-canvas{ min-height:0; }
  /* Fond quadrillé de points de l'éditeur en direct retiré dans toute
     capture (aperçu/éditeur/impression) — ne garder que le fond blanc de la
     page, le quadrillage n'a de sens que pour l'alignement en direct. */
  .report-preview-layer .elec-canvas{ background-image:none; background-color:#fff; }
  /* Tri et filtres des tableaux Data sheets : des contrôles d'édition en
     direct qui n'ont rien à faire dans une capture (la barre d'onglets
     Synoptique/Data sheets elle-même est déjà couverte par .menubar
     ci-dessus). */
  .report-preview-layer .ds-sort-control, .report-preview-layer .ds-filter-input{ display:none !important; }

  /* ---------- RAPPORT — édition d'une section capturée (légende de groupes) ----------
     .section-edit-layer réutilise toutes les règles .report-preview-layer
     ci-dessus (menubar masqué, chaîne flex cassée, canevas figé...) — voir
     renderSectionEditWorkspace() dans rapport.js, la classe est appliquée
     en plus, pas à la place. */
  .section-edit-toolbar{ display:flex; gap:8px; margin:14px 0 16px; }
  .section-edit-viewport{ position:relative; width:100%; height:calc(100vh - 160px); border:1px solid var(--border); border-radius:8px; background: var(--surface-2); display:flex; align-items:center; justify-content:center; }

  /* ---------- RAPPORT — page matérialisée + capture déplaçable/redimensionnable ----------
     .report-page-box représente la vraie page imprimée (ratio verrouillé sur
     PRINT_PAGE_PX, dimensionné à une taille de référence fixe en JS puis mis à
     l'échelle pour remplir .section-edit-viewport/.report-preview-viewport —
     même pattern que .cover-canvas-layer dans report-cover.js). .report-capture-frame
     est positionné/dimensionné en % de cette page via section.placement — voir
     renderCapturePage() dans rapport.js. `overflow:hidden` rogne tout ce qui
     dépasse la page, pour un aperçu fidèle à ce que .report-print-page.canvas-fit
     rogne réellement à l'impression (bug corrigé : sans lui, une capture glissée
     hors de la page flottait visuellement dans le gris du viewport au lieu
     d'être coupée par le bord de la page, donnant une fausse idée de ce qui
     sortirait réellement en PDF). */
  .report-page-box{ position:relative; overflow:hidden; background:#fff; box-shadow:0 4px 20px rgba(0,0,0,0.35); flex-shrink:0; }
  .report-capture-frame{ position:absolute; }
  .report-capture-frame.draggable{ cursor:grab; touch-action:none; }
  .report-capture-frame.draggable.dragging{ cursor:grabbing; }
  .report-capture-clip{ position:absolute; inset:0; overflow:hidden; }
  .report-capture-clip .section-edit-layer,
  .report-capture-clip .report-preview-layer{ position:absolute; top:0; left:0; transform-origin:0 0; }
  /* Poignée ajoutée comme enfant direct de .section-edit-viewport (jamais de
     .report-page-box, qui rogne désormais son contenu — voir plus haut), et
     positionnée en JS (left/top en px, coin bas-droit réel du frame, voir
     positionExternalHandle() dans rapport.js) plutôt que par right/bottom
     négatifs relatifs à un parent : elle doit rester cliquable même quand ce
     coin est hors des limites visibles de la page (bug corrigé — même
     symptôme que l'ancien piège du clip sur le viewport, cette fois pour une
     capture délibérément glissée loin du centre par l'utilisateur, pas
     seulement un placement par défaut proche des bords). */
  .report-capture-resize-handle{ position:absolute; transform:translate(-50%, -50%); width:26px; height:26px; border-radius:50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H3v5M16 21h5v-5M3 3l7 7M21 21l-7-7'/%3E%3C/svg%3E") center/15px no-repeat; border:2px solid #fff; box-shadow:0 2px 10px rgba(0,0,0,0.4); cursor:nwse-resize; z-index:20; touch-action:none; }
  .report-capture-resize-handle::before{ content:''; position:absolute; inset:-10px; }
  .report-capture-resize-handle:hover{ transform:translate(-50%, -50%) scale(1.15); }
  .ds-table-chip{ display:inline-flex; align-items:center; gap:4px; font-family: var(--mono); font-size:10.5px; padding:4px 8px; border-radius:12px; border:1px solid var(--border); background: var(--surface-2); color: var(--text-dim); cursor:pointer; }
  .ds-table-chip:hover{ border-color: var(--text-dim); }
  .ds-table-chip.hidden-table{ opacity:0.5; text-decoration:line-through; }
  /* Bandeau persistant affiché par-dessus le document réellement ouvert
     quand on édite les filtres Data sheets d'une section de rapport (voir
     openDatasheetEditWorkspace() dans rapport.js) — la page Data sheets
     elle-même n'est pas modifiée, ce bandeau flotte juste au-dessus. */
  .datasheet-edit-banner{ position:fixed; bottom:0; left:0; right:0; z-index:600; background: var(--teal); color: var(--on-accent); padding:10px 20px; display:flex; align-items:center; justify-content:space-between; gap:16px; box-shadow:0 -4px 16px rgba(0,0,0,0.3); font-family: var(--font-body); font-size:13px; }
  .datasheet-edit-banner .btn{ flex-shrink:0; }
  .report-legend-bubble{ position:absolute; background: rgba(255,255,255,0.96); border:1px solid var(--border); border-radius:8px; padding:10px 12px; box-shadow:0 6px 20px rgba(0,0,0,0.25); font-family: var(--font-body, sans-serif); min-width:120px; z-index:8; }
  .report-legend-bubble.editable{ cursor:grab; touch-action:none; }
  .report-legend-title{ font-family: var(--font-display); font-weight:600; font-size:12px; color:#1a1a1a; margin-bottom:6px; }
  .report-legend-row{ display:flex; align-items:center; gap:7px; font-size:11.5px; color:#1a1a1a; padding:2px 0; white-space:nowrap; }
  .report-legend-dot{ width:9px; height:9px; border-radius:50%; flex-shrink:0; }
  .report-legend-remove{ position:absolute; top:-8px; right:-8px; width:18px; height:18px; border-radius:50%; background: var(--surface-3); border:1px solid var(--border); color: var(--text-dim); cursor:pointer; font-size:13px; line-height:1; display:flex; align-items:center; justify-content:center; }
  .report-legend-remove:hover{ color: var(--text); }
  .report-legend-resize-handle{ position:absolute; right:-11px; bottom:-11px; width:22px; height:22px; border-radius:50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H3v5M16 21h5v-5M3 3l7 7M21 21l-7-7'/%3E%3C/svg%3E") center/13px no-repeat; border:2px solid #fff; box-shadow:0 2px 8px rgba(0,0,0,0.35); cursor:nwse-resize; touch-action:none; z-index:9; }
  .report-legend-resize-handle::before{ content:''; position:absolute; inset:-8px; }
  .report-legend-resize-handle:hover{ transform:scale(1.15); }

  /* ---------- RAPPORT — mise en page du rapport ENTIER avant impression ----------
     openReportLayoutWorkspace()/renderReportLayoutWorkspace() dans rapport.js
     — contrairement à .section-edit-viewport (UNE page centrée), ce viewport
     défile verticalement et empile TOUTES les sections à la suite, dans
     l'ordre. Les sections Synoptique/Plan réutilisent .report-page-box tel
     quel (via renderCapturePage(), déjà éditable) ; les sections Data sheets
     utilisent .report-layout-flow-box (overflow VISIBLE, hauteur libre —
     jamais .report-page-box qui rogne, le contenu Data sheets doit pouvoir
     s'étaler au-delà d'une page comme à l'impression réelle). */
  .report-layout-viewport{ width:100%; height:calc(100vh - 160px); overflow:auto; border:1px solid var(--border); border-radius:8px; background: var(--surface-2); padding:24px 0; display:flex; flex-direction:column; align-items:center; gap:22px; }
  .report-layout-page-wrap{ position:relative; flex-shrink:0; }
  .report-layout-page-label-row{ display:flex; align-items:center; justify-content:center; gap:12px; margin-bottom:6px; }
  .report-layout-page-label{ text-align:center; font-family: var(--font-body); font-size:12px; color: var(--text-dim); }
  .report-layout-reset-btn{ padding:2px 10px; font-size:11px; height:auto; line-height:1.6; }
  .report-layout-flow-box{ position:relative; overflow:visible; background:#fff; box-shadow:0 4px 20px rgba(0,0,0,0.35); }
  /* Barre de contrôle flottante par tableau Data sheets — jamais injectée
     dans le domHTML capturé (contrairement à la légende de groupes), posée
     comme overlay à part positionné en JS via getBoundingClientRect() : le
     contenu capturé (et donc l'impression finale) n'a jamais à "savoir" que
     cette barre existe, pas besoin de l'ajouter aux listes de masquage
     .report-preview-layer/@media print qui doivent rester des miroirs
     exactes l'une de l'autre (voir docs/pitfalls.md#chrome-ui-oublis). */
  .ds-spacing-toolbar{ position:absolute; display:flex; align-items:center; gap:6px; background: var(--surface-3); border:1px solid var(--teal); border-radius:6px; padding:4px 8px; font-family: var(--font-body); font-size:11px; color: var(--text); z-index:15; white-space:nowrap; }
  .ds-spacing-toolbar label{ display:flex; align-items:center; gap:4px; }
  .ds-spacing-toolbar input[type="number"]{ width:52px; background: var(--surface-2); border:1px solid var(--border); border-radius:4px; color: var(--text); padding:2px 4px; font-size:11px; }
  .ds-spacing-toolbar button{ background:none; border:1px solid var(--border); border-radius:4px; color: var(--text-dim); padding:2px 7px; font-size:11px; cursor:pointer; }
  .ds-spacing-toolbar button.active{ background: var(--teal); border-color: var(--teal); color: var(--on-accent); }
  /* Marqueur visuel du saut de page demandé — indication honnête de "un saut
     de page a été posé ICI", jamais une tentative de deviner où les sauts
     NATURELS tomberaient (impossible à prévoir fidèlement hors du vrai
     moteur d'impression, voir docs/pitfalls.md#page-size-verification). */
  .ds-pagebreak-marker{ border-top:2px dashed var(--teal); position:relative; margin-bottom:2px; }
  .ds-pagebreak-marker::after{ content:'✂ Saut de page'; position:absolute; top:-9px; left:8px; background: var(--surface-2); padding:0 6px; font-family: var(--font-body); font-size:10px; color: var(--teal); }

  /* ---------- EXPORT PDF (impression d'une vue Électricité/Plan, ou d'un
     rapport combiné à plusieurs sections) ----------
     Premier essai : on imprime tel quel le cadrage (zoom/pan) déjà choisi à
     l'écran (aligné sur le repère de mise en page existant), pas de recalcul
     de mise en page plus poussé. */
  @media print {
    /* Sans ça, la plupart des navigateurs n'impriment PAS les couleurs de
       fond/box-shadow par défaut — seul le contenu "encre" (texte,
       bordures) sort, tout le reste redevient blanc, SAUF si l'utilisateur
       coche lui-même "Graphiques d'arrière-plan" dans la boîte de dialogue
       d'impression du système. C'est exactement ce qui rendait les
       pastilles de couleur de la légende (`background:${g.color}`, un
       simple fond uni, pas de bordure) invisibles dans un vrai PDF généré
       via `window.print()` — nos propres tests Playwright ne l'ont jamais
       repéré car `page.pdf({printBackground:true})` force ce comportement
       indépendamment du CSS, contournant le symptôme sans corriger la
       cause. `exact` déclare l'intention explicitement pour toute la page,
       sans dépendre d'un réglage utilisateur. */
    *{ print-color-adjust: exact !important; -webkit-print-color-adjust: exact !important; }
    /* `print-color-adjust:exact` ci-dessus force AUSSI le fond de `body`
       (`var(--bg)`, gris clair en thème clair, quasi-noir en thème sombre —
       voir `body{background:var(--bg)}` en dehors de `@media print`) à
       s'imprimer sur toute la page, y compris dans les marges (zone que
       rien d'autre ne peint) — bug corrigé, repéré comme un "artefact gris"
       débordant derrière la page de garde et les data sheets. Avant ce
       correctif, `printBackground:true` de Playwright masquait déjà ce même
       problème dans tous nos tests (il force les fonds indépendamment du
       CSS, donc ce gris est probablement resté invisible depuis le début
       de la session — jamais un vrai bug introduit par le correctif
       couleur ci-dessus, juste enfin révélé par lui). Le thème de l'écran
       ne doit jamais influencer une page imprimée : blanc forcé, quel que
       soit le thème actif au moment de la génération. */
    html, body{ background:#fff !important; }
    /* Dimensions A4 explicites (297×210mm), pas juste "landscape" — sans
       ça la taille physique réelle de la page dépend du papier par défaut
       du système/imprimante (souvent Letter, pas A4), ce qui décale tout
       calcul basé sur un cadrage A4 (repère de mise en page, mise à
       l'échelle du cadrage figé — voir PRINT_PAGE_PX dans rapport.js). */
    @page { size: 297mm 210mm; margin: 8mm; }
    @page portrait-report-page { size: 210mm 297mm; margin: 8mm; }
    body *{ visibility: hidden; }
    #screen-app, #screen-app *{ visibility: visible; }
    .sidebar, .view-as-banner, .menubar, .elec-canvas-zoom-ctrl,
    .elec-group-visibility-panel, .egv-collapsed-btn, .elec-color-panel,
    .modal-overlay, .app-toast, .elec-landscape-guide, .wire-draw-hint,
    .plan-style-panel, .plan-style-collapsed-btn, .view-header,
    .elec-vdivider, .elec-hdivider, .elec-back-mini, .elec-topline,
    .elec-node-menu-btn, .elec-node-orient-btn, .elec-node-side-btn,
    .info-bubble-resize-handle, .elec-node-resize-handle, .elec-node-lock-toggle, .elec-node-dropdown,
    .wire-waypoint-handle,
    .ds-sort-control, .ds-filter-input, .ds-subtabs, .pd-back{ display:none !important; }
    /* Fond quadrillé de points de l'éditeur en direct : ne garder que le
       fond blanc de la page à l'impression. */
    .elec-canvas{ background-image:none !important; background-color:#fff !important; }

    /* Rapport combiné : #report-print-root remplace entièrement #screen-app. */
    body[data-print-mode="report"] #screen-app{ display:none !important; }
    body[data-print-mode="report"] #report-print-root{
      display:block !important; visibility:visible !important;
    }
    body[data-print-mode="report"] #report-print-root *{ visibility:visible !important; }
    .report-print-page{ page-break-after: always; }
    .report-print-page:last-child{ page-break-after: auto; }
    .report-print-page.portrait{ page: portrait-report-page; }
    /* Synoptique/Plan : cadrage figé au moment de la capture (voir
       captureCanvasSize()/pinAndScaleCanvasSection() dans rapport.js) — le
       canevas capturé garde sa taille en pixels d'origine (fixée en ligne
       par JS, pas ici, sinon un !important ici l'emporterait sur le style
       en ligne), et #elec-container/#plan-container est positionné/mis à
       l'échelle selon section.placement (voir pinAndScaleCanvasSection()
       dans rapport.js) — position:absolute + transform-origin:top left,
       pas centré par le flex du parent comme avant : le placement peut être
       n'importe où sur la page, pas nécessairement centré. Une page à
       hauteur fixe, jamais de contenu qui déborde. */
    .report-print-page.canvas-fit{ position:relative; overflow:hidden; height:194mm; }
    .report-print-page.canvas-fit.portrait{ height:281mm; }
    /* Page de garde (bug corrigé) : buildCoverPageHTML() (report-cover.js)
       enveloppe son contenu dans un calque `height:100%` (pour que la
       position en % des textes/logo et les tailles en `cqw` restent
       fidèles à l'éditeur, voir report-cover.js) — sans hauteur EXPLICITE
       ici sur `.report-print-page.cover` elle-même, ce `height:100%` se
       résout à 0 (pourcentage de hauteur contre un parent en `height:auto`,
       règle CSS standard) et tout le contenu de la page de garde
       disparaissait silencieusement (aucune erreur, juste une page blanche
       — repéré en confirmant qu'aucun texte n'était présent dans le PDF
       réel, pas juste invisible). Mêmes dimensions que `.canvas-fit`, la
       page de garde remplit elle aussi toute la zone imprimable. */
    .report-print-page.cover{ height:194mm; }
    .report-print-page.cover.portrait{ height:281mm; }
    .report-print-page.canvas-fit #elec-container, .report-print-page.canvas-fit #plan-container{
      position:absolute; display:block; height:auto; transform-origin:top left;
    }
    /* Même casse de la chaîne flex qu'en aperçu (voir .report-preview-layer
       .elec-layout) — sinon #elec-container retombe sur le min-height:320px
       de .elec-layout au lieu de contenir le canevas figé à sa vraie taille. */
    .report-print-page.canvas-fit .elec-layout{ display:block; }
    .report-print-page.canvas-fit .elec-pane-wrap{ display:block; overflow:visible; height:auto; }
    /* Data sheets/Rapport SoundVision : contenu HTML qui peut dépasser une
       page (beaucoup d'armoires/câbles) — laissé s'étaler naturellement sur
       plusieurs pages imprimées plutôt que rogné dans une boîte à hauteur
       fixe. */
    .report-print-page.flow{ overflow:visible; height:auto; }
    .report-print-page.flow #elec-container{ display:block; height:auto; }
    /* Même casse de la chaîne flex que .canvas-fit — sans ça .elec-pane-wrap
       reste soumis au flex:1 1 0 hérité de .elec-layout (toujours flex par
       défaut) et se retrouve coincé dans les 320px de min-height de
       .elec-layout au lieu de contenir tout le tableau Data sheets. */
    .report-print-page.flow .elec-layout{ display:block; }
    .report-print-page.flow .elec-pane-wrap{ display:block; overflow:visible; height:auto; }
    .report-print-page.flow .elec-pane-body{ height:auto; overflow:visible; }
    /* Chaque tableau Data sheets (Composition/Câbles/Phase/Inventaire, voir
       data-ds-table dans elec-engine.js) évite de commencer tronqué en bas
       d'une page — mais SANS saut systématique : retour utilisateur, "la
       règle ne doit pas être aussi absolue, si un tableau est suffisamment
       petit pour rentrer en dessous d'un autre sans créer de nouvelle page,
       tu peux l'y mettre" (un `break-before:page` inconditionnel entre
       chaque bloc, essayé d'abord, produisait des pages avec un tout petit
       tableau — ex. Phase, 4 lignes — seul, largement vide, alors qu'il
       aurait tenu sous le tableau précédent). `break-inside:avoid` sur
       l'en-tête/le corps + `break-after:avoid` sur l'en-tête (jamais
       orphelin seul en bas de page, détaché de son tableau) suffisent à
       éviter les coupures disgracieuses ; le flux normal du navigateur
       s'occupe de sauter une page seulement quand le bloc ne rentre
       vraiment pas — un tableau PEUT toujours s'étaler sur plusieurs pages
       ensuite (`break-inside:auto` par défaut sur `.ds-table`). */
    .ds-section-header-row{ break-inside: avoid; break-after: avoid; }
    .ds-table thead, .ds-table tr{ break-inside: avoid; }
    body{ position:static !important; height:auto !important; }
    #screen-app{ position:static !important; height:auto !important; overflow:visible !important; }
    .shell{ display:block !important; height:auto !important; }
    .main{ padding:0 !important; overflow:visible !important; display:block !important; }
    /* Le préfixe #screen-app scope ces règles à l'export PDF d'un seul
       document (exportCurrentViewToPdf, DOM live) — sans lui, elles
       s'appliquaient aussi (via !important, imbattable par un style en
       ligne) au contenu cloné dans #report-print-root et cassaient le
       cadrage figé au moment de la capture (voir plus haut). */
    #screen-app #elec-container, #screen-app #plan-container{ display:block !important; height:auto !important; }
    #screen-app .elec-pane-wrap{ display:block !important; overflow:visible !important; }
    #screen-app .elec-pane-body{ overflow:visible !important; height:194mm !important; }
    #screen-app .elec-canvas{ width:100% !important; height:100% !important; }
    body[data-print-pane="a"] .elec-pane-wrap[data-pane-wrap="b"]{ display:none !important; }
    body[data-print-pane="b"] .elec-pane-wrap[data-pane-wrap="a"]{ display:none !important; }
  }

  .scene-preview-box{ width:100%; height:190px; border-radius:8px; overflow:hidden; margin-bottom:14px; background:#0e1116; border:1px solid var(--border); }
  /* Aperçu interactif (2026-08-05, OrbitControls) — curseur "poignée" pour
     signaler que le modèle se fait tourner à la souris, sans quoi rien ne
     distingue visuellement ce bloc d'une simple image statique. */
  .scene-preview-box canvas{ display:block; width:100%; height:100%; cursor:grab; touch-action:none; }
  .scene-preview-box canvas:active{ cursor:grabbing; }

  .dmx-mode-details{ border:1px solid var(--border); border-radius:8px; margin-top:8px; overflow:hidden; }
  .dmx-mode-details summary{ padding:9px 12px; font-family: var(--font-body); font-size:12.5px; font-weight:600; cursor:pointer; background: var(--surface-2); color: var(--text); list-style:none; }
  .dmx-mode-details summary::-webkit-details-marker{ display:none; }
  .dmx-mode-details summary::before{ content:'▸'; display:inline-block; width:12px; color: var(--text-faint); }
  .dmx-mode-details[open] summary::before{ content:'▾'; }
  .dmx-channel-table{ max-height:260px; overflow-y:auto; padding:4px 0; }
  .dmx-channel-row{ display:flex; align-items:baseline; gap:8px; padding:5px 12px; font-family: var(--mono); font-size:11.5px; border-top:1px solid var(--border); }
  .dmx-channel-row:first-child{ border-top:none; }
  .dmx-ch-num{ flex-shrink:0; width:40px; color: var(--text-faint); }
  .dmx-ch-fn{ flex-shrink:0; color: var(--text); font-weight:600; min-width:120px; }
  .dmx-ch-notes{ color: var(--text-dim); font-family: var(--font-body); font-size:11px; }

  .btn-sm{ padding:5px 10px; font-size:11.5px; }

  .gdtf-visual-banner{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 12px; border-radius:8px; margin-bottom:14px; font-family: var(--font-body); font-size:12.5px; line-height:1.4; }
  .gdtf-visual-banner span{ flex:1; min-width:180px; }
  .gdtf-visual-warning{ background: rgba(211,47,47,0.1); border:1px solid rgba(211,47,47,0.35); color:#d32f2f; }
  .gdtf-visual-info{ background: rgba(43,158,181,0.1); border:1px solid rgba(43,158,181,0.35); color: var(--teal); }
  .gdtf-visual-neutral{ background: var(--surface-2); border:1px solid var(--border); color: var(--text-dim); }

  /* Ouverte PAR-DESSUS la fiche détail (#el-info-modal-overlay, même
     z-index:50 que tout .modal-overlay) : sans ce z-index plus élevé, l'ordre
     DOM (fiche détail plus tard dans index.html) la ferait passer dessus et
     intercepterait les clics sur la liste. */
  #gdtf-borrow-modal-overlay{ z-index:60; }
  /* Confirmation générique (showConfirm(), toast.js) — TOUJOURS la boîte la
     plus urgente/prioritaire de l'app, souvent déclenchée DEPUIS un autre
     modal déjà ouvert (ex. "Supprimer ce câble ?" appelé depuis
     #wire-modal-overlay/#df-wire-modal-overlay). #confirm-modal-overlay est
     statique dans index.html, DÉCLARÉ AVANT tout modal construit
     dynamiquement en JS (`document.body.appendChild(overlay)`, ex.
     ensureDfWireModalEl()) — à z-index égal (50, comme tout .modal-overlay),
     l'ordre DOM fait gagner le modal ajouté APRÈS, jamais la confirmation,
     qui reste alors invisible/inatteignable derrière lui (bug réel corrigé
     le 2026-08-25, repéré en testant "Supprimer" depuis
     #df-wire-modal-overlay — un clic sur #confirm-modal-ok butait sur le
     modal câble encore affiché par-dessus). Un z-index PLUS ÉLEVÉ que
     n'importe quel autre modal (même 60, voir gdtf-borrow-modal-overlay
     ci-dessus) règle ce cas une fois pour toutes, pour CHAQUE futur modal
     qui appellerait showConfirm() depuis l'intérieur de lui-même — jamais
     besoin de retoucher ce fichier à chaque nouveau cas. */
  #confirm-modal-overlay{ z-index:70; }
  .gdtf-borrow-list{ max-height:360px; overflow-y:auto; display:flex; flex-direction:column; gap:4px; }
  .gdtf-borrow-row{ display:flex; flex-direction:column; gap:2px; text-align:left; padding:9px 12px; border-radius:7px; border:1px solid transparent; background:none; cursor:pointer; font-family: var(--font-body); }
  .gdtf-borrow-row:hover{ background: var(--surface-2); border-color: var(--border); }
  .gdtf-borrow-row-name{ font-size:13px; font-weight:600; color: var(--text); }
  .gdtf-borrow-row-meta{ font-size:11.5px; color: var(--text-dim); }

  /* Peut s'ouvrir par-dessus #el-modal-overlay (import déclenché depuis
     l'édition d'un device) — même raison que gdtf-borrow-modal-overlay
     ci-dessus, même valeur de z-index. */
  #scene3d-import-modal-overlay{ z-index:60; }
  .s3i-back{ background:none; border:none; color: var(--text-dim); font-size:12.5px; display:flex; align-items:center; gap:4px; cursor:pointer; padding:4px 0; margin-bottom:8px; font-family: var(--font-body); }
  .s3i-back:hover{ color: var(--text); }
  .s3i-row{ display:flex; align-items:center; gap:10px; text-align:left; width:100%; padding:9px 12px; border-radius:7px; border:1px solid transparent; background:none; cursor:pointer; font-family: var(--font-body); }
  .s3i-row:hover{ background: var(--surface-2); border-color: var(--border); }
  .s3i-row-name{ font-size:13px; font-weight:600; color: var(--text); flex:1; }
  .s3i-row-meta{ font-size:11.5px; color: var(--text-dim); }
  .s3i-swatch{ width:12px; height:12px; border-radius:50%; flex-shrink:0; }
  .s3i-table{ width:100%; border-collapse:collapse; font-size:12.5px; margin:10px 0; }
  .s3i-table th, .s3i-table td{ text-align:left; padding:6px 8px; border-bottom:1px solid var(--border); }
  .s3i-table th{ color: var(--text-dim); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.03em; }
  .s3i-total-row{ display:flex; justify-content:space-between; font-size:13px; font-weight:600; margin-top:6px; }
  .s3i-total-row.s3i-inrush-row{ color: var(--amber); font-weight:500; margin-top:2px; }
  .s3i-warning{ background: rgba(211,47,47,0.1); border:1px solid rgba(211,47,47,0.35); color:#d32f2f; border-radius:8px; padding:9px 11px; font-size:12px; line-height:1.4; margin-top:10px; }
  .s3i-device-plan{ background: var(--surface-2); border:1px solid var(--border); border-radius:8px; padding:9px 11px; font-size:12.5px; margin-top:6px; }
  .s3i-device-plan + .s3i-device-plan{ margin-top:6px; }
  /* Éditeur de prises d'un device (Élec, 2026-09-11) : nombre de prises, watts ou affectation par prise */
  .dev-sockets{ margin:12px 0 14px; }
  .dev-sockets .s3i-total-row{ margin-top:10px; }
  .dev-sockets-machines{ max-height:300px; overflow-y:auto; border:1px solid var(--border); border-radius:8px; }
  .dev-sockets-machines .s3i-table{ margin:0; }
  .dev-sockets-machines thead th{ position:sticky; top:0; background: var(--surface-2); }
  .dev-sockets-head{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:8px; }
  .dev-sockets-list{ display:flex; flex-direction:column; gap:6px; margin-top:8px; }
  .dev-sockets-row{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:6px 10px; background: var(--surface-2); border:1px solid var(--border); border-radius:8px; font-size:12.5px; }
  .dev-sockets-row.over{ border-color: rgba(211,47,47,0.55); }
  .dev-sockets-label{ min-width:62px; font-weight:600; }
  .dev-sockets-watts{ font-family: var(--mono); }
  .dev-sockets-input{ width:110px; margin:0; padding:5px 8px; }
  .dev-sockets-unit{ color: var(--text-dim); }
  .dev-sockets-peak{ color: var(--amber); font-size:11.5px; }
  .dev-sockets-over{ display:none; margin-left:auto; color:#d32f2f; font-size:11.5px; }
  .dev-sockets-row.over .dev-sockets-over{ display:inline; }
  .dev-sockets-select{ margin:0; padding:4px 6px; min-width:96px; }

  /* ===================== SCÈNE 3D =====================
     Palette FIXE (jamais var(--text)/var(--surface) etc.) volontairement,
     dans tout ce module : #view-scene3d-workspace force un fond sombre
     quel que soit le thème du site (voir plus haut), donc du texte ou des
     panneaux suivant les variables de thème peuvent devenir illisibles en
     thème clair (repéré sur le titre du document, quasi invisible — noir
     sur noir). Toute l'interface Scène 3D (topline/barre d'outils/panneaux)
     est donc délibérément toujours sombre, comme un vrai outil CAO
     (Capture/WYSIWYG/Blender), plutôt que de suivre le thème du reste du
     site. */
  .scene3d-topline{ display:flex; align-items:center; gap:14px; padding:0 14px; height:44px; flex-shrink:0; background:#14171d; border-bottom:1px solid #262b35; overflow-x:auto; overflow-y:hidden; }
  /* Boutons scopés (pas .elec-back-mini/.btn-ghost partagés) : ces classes
     suivent var(--border)/var(--text-dim), qui suivent le thème du site —
     même piège de contraste que le titre sur ce fond toujours sombre. */
  .scene3d-topline .scene3d-back-btn{ width:28px; height:28px; flex-shrink:0; display:flex; align-items:center; justify-content:center; background:none; border:1px solid #262b35; border-radius:6px; color:#8A93A3; cursor:pointer; }
  .scene3d-topline .scene3d-back-btn:hover{ color:#EDEDED; border-color:#3a4150; }
  .scene3d-topline .scene3d-clear-btn{ background:none; border:1px solid #262b35; color:#8A93A3; border-radius:6px; padding:6px 12px; font-size:12px; font-family: var(--font-body); cursor:pointer; }
  .scene3d-topline .scene3d-clear-btn:hover{ color:#EDEDED; border-color:#3a4150; }
  .scene3d-doc-title{ font-family: var(--font-display); font-weight:600; font-size:13.5px; color:#EDEDED; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:240px; }
  .scene3d-tabs{ display:flex; gap:2px; align-self:stretch; }
  .scene3d-tab{ display:flex; align-items:center; gap:6px; background:none; border:none; border-bottom:2px solid transparent; color:#8A93A3; padding:0 14px; font-size:12.5px; font-family: var(--font-body); cursor:pointer; }
  .scene3d-tab:hover{ color:#EDEDED; }
  .scene3d-tab.active{ color:#2FD9C4; border-bottom-color:#2FD9C4; font-weight:600; }
  .scene3d-tab svg{ flex-shrink:0; }

  .scene3d-toolbar{ display:flex; align-items:center; gap:6px; padding:6px 14px; flex-shrink:0; background:#181c24; border-bottom:1px solid #262b35; position:relative; }
  .scene3d-tool-btn{ width:30px; height:30px; flex-shrink:0; display:flex; align-items:center; justify-content:center; background:none; border:1px solid #262b35; border-radius:6px; color:#8A93A3; cursor:pointer; }
  .scene3d-tool-btn:hover{ color:#EDEDED; border-color:#3a4150; }
  .scene3d-tool-btn.active{ color:#2FD9C4; border-color:#2FD9C4; background:rgba(47,217,196,.1); }
  .scene3d-tool-btn:disabled{ opacity:.35; cursor:not-allowed; }
  .scene3d-tool-btn:disabled:hover{ color:#8A93A3; border-color:#262b35; }
  .scene3d-tool-sep{ width:1px; height:20px; background:#262b35; margin:0 4px; flex-shrink:0; }

  .scene3d-split-popover{ position:absolute; top:100%; left:14px; margin-top:6px; background:#1a1e26; border:1px solid #262b35; border-radius:8px; padding:8px; display:none; gap:6px; z-index:30; box-shadow:0 10px 30px rgba(0,0,0,.5); }
  .scene3d-split-popover.show{ display:flex; }
  .scene3d-split-opt{ width:44px; height:36px; background:#14171d; border:1px solid #262b35; border-radius:6px; cursor:pointer; display:flex; align-items:center; justify-content:center; color:#8A93A3; padding:0; }
  .scene3d-split-opt:hover, .scene3d-split-opt.active{ border-color:#2FD9C4; color:#2FD9C4; }

  .scene3d-body{ display:flex; flex:1; min-height:0; gap:0; overflow:hidden; }

  .scene3d-left-panel{ width:250px; flex-shrink:0; background:#14171d; border-right:1px solid #262b35; display:flex; flex-direction:column; min-height:0; }
  .scene3d-left-tabs{ display:flex; border-bottom:1px solid #262b35; flex-shrink:0; }
  .scene3d-left-tab{ flex:1; background:none; border:none; color:#8A93A3; padding:10px 0; font-size:12.5px; font-family: var(--font-body); cursor:pointer; border-bottom:2px solid transparent; }
  .scene3d-left-tab:hover{ color:#EDEDED; }
  .scene3d-left-tab.active{ color:#2FD9C4; border-bottom-color:#2FD9C4; font-weight:600; }
  .scene3d-left-content{ flex:1; overflow-y:auto; padding:10px; display:flex; flex-direction:column; gap:8px; min-height:0; }

  .scene3d-search{ background:#0e1116; border:1px solid #262b35; color:#EDEDED; border-radius:6px; padding:6px 8px; font-size:12.5px; font-family: var(--font-body); }
  .scene3d-search:focus{ outline:none; border-color:#2FD9C4; }
  .scene3d-lib-list{ display:flex; flex-direction:column; gap:2px; overflow-y:auto; }
  .scene3d-lib-row{ display:flex; align-items:center; gap:8px; padding:7px 8px; border-radius:6px; border:none; background:none; color:#EDEDED; font-family: var(--font-body); font-size:12.5px; text-align:left; cursor:pointer; user-select:none; }
  .scene3d-lib-row:hover{ background:rgba(255,255,255,.05); }
  .scene3d-lib-item{ cursor:pointer; }
  .scene3d-lib-item.armed{ background:rgba(47,217,196,.14); color:#2FD9C4; }
  .scene3d-chevron{ margin-left:auto; color:#5B6472; }
  .scene3d-crumb{ display:flex; flex-wrap:wrap; align-items:center; gap:3px; font-size:11.5px; color:#5B6472; padding:2px 4px; }
  .scene3d-crumb-btn{ background:none; border:none; color:#5B6472; font-family: var(--font-body); font-size:11.5px; cursor:pointer; padding:1px 2px; }
  .scene3d-crumb-btn.active{ color:#2FD9C4; font-weight:600; }
  /* « ‹ » dossier précédent des pickers de bibliothèque (2026-09-14). */
  .scene3d-crumb-btn.scene3d-crumb-back{ font-size:15px; line-height:1; color:#8A93A3; padding:0 6px 1px; border:1px solid #262b35; border-radius:5px; margin-right:3px; }
  .scene3d-crumb-btn.scene3d-crumb-back:hover{ color:#EDEDED; border-color:#3a4150; }
  .scene3d-hint{ font-size:11px; color:#5B6472; line-height:1.5; padding:8px; border:1px dashed #262b35; border-radius:6px; margin-top:auto; }
  .scene3d-phys-summary{ margin-top:6px; color:#9AA4B2; border-style:solid; font-size:12px; }
  .scene3d-dmx-artnet{ color:#7E8A99; font-weight:400; font-size:.9em; }
  .scene3d-empty{ font-size:12px; color:#5B6472; line-height:1.6; padding:6px; }

  .scene3d-outliner-group-label{ display:flex; align-items:center; gap:6px; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:#5B6472; padding:8px 4px 2px; }
  .scene3d-outliner-collapse-btn{ flex-shrink:0; display:flex; align-items:center; justify-content:center; width:16px; height:16px; padding:0; border:none; border-radius:4px; background:transparent; color:#5B6472; cursor:pointer; font-size:9px; line-height:1; }
  .scene3d-outliner-collapse-btn:hover{ background:rgba(255,255,255,.08); color:#EDEDED; }
  .scene3d-outliner-row{ display:flex; align-items:center; gap:8px; padding:6px 8px; border-radius:6px; cursor:pointer; color:#EDEDED; font-size:12.5px; font-family: var(--font-body); }
  .scene3d-outliner-row:hover{ background:rgba(255,255,255,.05); }
  .scene3d-outliner-row.selected{ background:rgba(47,217,196,.14); color:#2FD9C4; }
  .scene3d-outliner-row svg{ flex-shrink:0; }
  .scene3d-outliner-row span{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .scene3d-outliner-row.hidden-obj{ opacity:.45; }
  .scene3d-outliner-eye-btn{ flex-shrink:0; display:flex; align-items:center; justify-content:center; width:22px; height:22px; padding:0; border:none; border-radius:5px; background:transparent; color:#EDEDED; cursor:pointer; }
  .scene3d-outliner-eye-btn:hover{ background:rgba(255,255,255,.1); }

  .scene3d-groups-list{ display:flex; flex-direction:column; gap:2px; }
  .scene3d-group-row{ display:flex; align-items:center; gap:8px; padding:6px 4px; border-radius:6px; }
  .scene3d-group-row:hover{ background:rgba(255,255,255,.05); }
  .scene3d-group-row.hidden-group{ opacity:.5; }
  .scene3d-group-swatch{ flex-shrink:0; width:18px; height:18px; border-radius:50%; border:1px solid rgba(255,255,255,.25); cursor:pointer; padding:0; }
  .scene3d-group-name{ flex:1; min-width:0; background:transparent; border:none; color:#EDEDED; font-size:12.5px; font-family: var(--font-body); padding:2px 0; }
  .scene3d-group-name:focus{ outline:none; border-bottom:1px solid #2FD9C4; }
  .scene3d-group-count{ flex-shrink:0; font-size:11px; color:#5B6472; min-width:14px; text-align:right; }
  .scene3d-group-delete{ flex-shrink:0; display:flex; align-items:center; justify-content:center; width:22px; height:22px; padding:0; border:none; border-radius:5px; background:transparent; color:#5B6472; cursor:pointer; }
  .scene3d-group-delete:hover{ background:rgba(229,85,90,.15); color:#E5555A; }
  .scene3d-color-popover{ display:flex; flex-wrap:wrap; gap:6px; padding:8px 10px; margin:2px 0 6px; background:#0e1116; border:1px solid #262b35; border-radius:6px; }
  .scene3d-color-swatch{ width:20px; height:20px; border-radius:50%; border:1px solid rgba(255,255,255,.25); cursor:pointer; padding:0; }
  .scene3d-color-swatch.active{ box-shadow:0 0 0 2px #2FD9C4; }
  .scene3d-add-group-btn{ margin-top:10px; }

  .scene3d-group-toggle-list{ display:flex; flex-direction:column; gap:4px; margin-bottom:10px; }
  .scene3d-group-toggle{ display:flex; align-items:center; gap:8px; background:#0e1116; border:1px solid #262b35; color:#cfd4de; border-radius:6px; padding:6px 8px; cursor:pointer; font-size:12px; font-family: var(--font-body); text-align:left; }
  .scene3d-group-toggle:hover{ border-color:#2FD9C4; }
  .scene3d-group-toggle.active{ border-color:#2FD9C4; color:#2FD9C4; background:rgba(47,217,196,.08); }
  .scene3d-group-toggle.partial{ border-style:dashed; }
  .scene3d-group-toggle-dot{ flex-shrink:0; width:10px; height:10px; border-radius:50%; }

  .scene3d-stub-panel{ flex:1; display:flex; align-items:center; justify-content:center; color:#5B6472; font-family: var(--font-body); font-size:13px; text-align:center; padding:40px; }

  /* Onglet DMX — liste des projecteurs (gauche) + panneau d'adressage (droite, réutilise .scene3d-inspector) */
  .scene3d-dmx-list-header{ position:relative; display:flex; padding:10px 10px 0; flex-shrink:0; }
  .scene3d-dmx-autopatch-popover{ position:absolute; top:100%; left:10px; margin-top:6px; background:#1a1e26; border:1px solid #262b35; border-radius:8px; padding:10px; display:none; flex-direction:column; gap:6px; z-index:30; box-shadow:0 10px 30px rgba(0,0,0,.5); width:240px; }
  .scene3d-dmx-autopatch-popover.show{ display:flex; }
  .scene3d-dmx-autopatch-hint{ color:#8A93A3; font-size:11px; line-height:1.5; margin-bottom:2px; font-family: var(--font-body); }
  .scene3d-dmx-autopatch-popover button{ background:#14171d; border:1px solid #262b35; border-radius:6px; color:#EDEDED; font-size:12px; font-family: var(--font-body); padding:8px 10px; cursor:pointer; text-align:left; }
  .scene3d-dmx-autopatch-popover button:hover{ border-color:#2FD9C4; color:#2FD9C4; }
  /* Export Data (MVR/GDTF, 2026-08-12) — colonne à DROITE de l'écran (voir
     .scene3d-data-export-col plus bas) : le popover partagé s'ancre par
     défaut à `left:10px` de son bouton (pensé pour Autopatch, ancré à
     GAUCHE de l'écran) — laissé tel quel, ça déborderait du viewport pour
     un bouton près du bord DROIT. Ancrage à droite pour cette seule
     instance, jamais pour la règle générique partagée avec Autopatch. */
  #scene3d-data-export-popover{ left:auto; right:0; }
  .scene3d-dmx-list{ flex:1; overflow-y:auto; padding:10px; }
  .scene3d-dmx-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; border-radius:6px; cursor:grab; color:#EDEDED; font-size:12.5px; font-family: var(--font-body); }
  .scene3d-dmx-row:active{ cursor:grabbing; }
  .scene3d-dmx-row:hover{ background:rgba(255,255,255,.05); }
  .scene3d-dmx-row.selected{ background:rgba(47,217,196,.14); color:#2FD9C4; }
  .scene3d-dmx-row-name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .scene3d-dmx-row-addr{ font-family: var(--mono); font-size:11.5px; color:#5B6472; flex-shrink:0; }
  .scene3d-dmx-row-addr.conflict{ color:#ff6b6b; }
  .scene3d-dmx-fixture-name{ color:#EDEDED; font-size:12.5px; }
  /* Numéro de fixture — identifiant de patch/paperwork, affiché en préfixe
     partout où une fixture est identifiée (listes DMX, Liste/Outliner). */
  .scene3d-dmx-fixnum{ color:#5B6472; font-family: var(--mono); }
  .scene3d-dmx-row.selected .scene3d-dmx-fixnum, .scene3d-dmx-drag-row.selected .scene3d-dmx-fixnum{ color:inherit; opacity:.75; }
  .scene3d-dmx-feedback{ margin:6px 0; }
  .scene3d-dmx-warning{ color:#ff6b6b; font-size:11px; line-height:1.5; margin-bottom:4px; }

  /* Onglet Plan — capture de vues (fond blanc / filaire noir, inversé par rapport au reste de Scène 3D) */
  .scene3d-plan-main{ flex:1; display:flex; flex-direction:column; min-width:0; }
  .scene3d-plan-toolbar{ display:flex; align-items:center; gap:6px; padding:8px 10px; background:#14171d; border-bottom:1px solid #262b35; }
  .scene3d-plan-view-btn{ background:#0e1116; border:1px solid #262b35; color:#EDEDED; border-radius:6px; padding:6px 12px; font-size:12.5px; font-family: var(--font-body); cursor:pointer; }
  .scene3d-plan-view-btn:hover{ border-color:#2FD9C4; }
  .scene3d-plan-view-btn.active{ border-color:#2FD9C4; color:#2FD9C4; background:rgba(47,217,196,.08); }
  /* Popover générique de barre d'outils (réglages "Affichage DMX" du Plan) —
     même chrome visuel que .scene3d-dmx-autopatch-popover, gardé sous un nom
     distinct puisque son contenu (cases à cocher) diffère sémantiquement. */
  .scene3d-toolbar-popover{ position:absolute; top:100%; right:0; margin-top:6px; background:#1a1e26; border:1px solid #262b35; border-radius:8px; padding:10px; display:none; flex-direction:column; gap:6px; z-index:30; box-shadow:0 10px 30px rgba(0,0,0,.5); width:210px; }
  .scene3d-toolbar-popover.show{ display:flex; }
  .scene3d-toolbar-popover-check{ display:flex; align-items:center; gap:8px; color:#EDEDED; font-size:12.5px; font-family: var(--font-body); cursor:pointer; }
  .scene3d-toolbar-popover-sep{ height:1px; background:#262b35; margin:2px 0; }
  /* "Connecter une console" (2026-08-06, onglet Live uniquement) — jeton de
     connexion grandMA2/3 Web Remote, réglage propre à CET appareil
     (localStorage, voir scene3d-engine.js), jamais persisté dans le document. */
  .scene3d-console-connect-wrap{ position:relative; margin-right:8px; }
  /* position:fixed (pas absolute) — ce popover vit dans .scene3d-topline,
     qui a overflow-y:hidden (voir plus bas, débordement horizontal du
     Truss Builder) : en absolute il était donc TOUJOURS rogné au clic,
     display:flex bien calculé mais jamais peint à l'écran. fixed échappe
     au rognage d'un ancêtre (tant qu'aucun ancêtre n'a de transform/filter,
     vérifié absent ici) — top/left posés en JS via getBoundingClientRect()
     du bouton, pas de valeur statique top/right possible avec fixed. */
  .scene3d-console-connect-popover{ position:fixed; margin-top:6px; background:#1a1e26; border:1px solid #262b35; border-radius:8px; padding:14px; display:none; flex-direction:column; z-index:30; box-shadow:0 10px 30px rgba(0,0,0,.5); width:280px; }
  .scene3d-console-connect-popover.show{ display:flex; }
  .scene3d-console-connect-title{ color:#EDEDED; font-size:13px; font-weight:600; margin-bottom:8px; display:flex; align-items:center; justify-content:space-between; gap:8px; }
  /* Petite LED d'état (2026-08-06, retour utilisateur explicite) : vert =
     joignable, jaune = instable (résultats de test qui alternent), rouge =
     injoignable/pas encore testé — jamais une vraie session WebSocket
     persistante (juste le résultat du dernier test de joignabilité HTTP, voir
     scene3d-engine.js). Badge sur le bouton (coin) + copie lisible dans le
     popover (avec libellé texte à côté). */
  #scene3d-console-connect-btn{ position:relative; }
  .scene3d-console-connect-led{ display:inline-block; width:7px; height:7px; border-radius:50%; background:#5B6472; box-shadow:0 0 0 1.5px #14171d; }
  #scene3d-console-connect-btn .scene3d-console-connect-led{ position:absolute; top:3px; right:3px; }
  .scene3d-console-connect-led.ok{ background:#2FD9C4; }
  .scene3d-console-connect-led.warn{ background:#F0B23C; }
  .scene3d-console-connect-led.err{ background:#E5555A; }
  .scene3d-console-connect-led-row{ display:flex; align-items:center; gap:6px; font-size:10.5px; font-weight:400; color:#8A93A3; text-transform:none; letter-spacing:0; }
  .scene3d-console-connect-hint{ color:#8A93A3; font-size:11.5px; line-height:1.5; margin:0 0 10px; }
  .scene3d-console-connect-actions{ display:flex; gap:8px; }
  .scene3d-console-connect-actions .scene3d-btn-secondary{ width:auto; flex:1; margin-top:8px; }
  .scene3d-console-connect-status{ margin-top:8px; font-size:11.5px; min-height:14px; color:#8A93A3; }
  .scene3d-console-connect-status.ok{ color:#2FD9C4; }
  .scene3d-console-connect-status.err{ color:#E5555A; }
  /* Poste pilote Holbox Bridge (2026-09-11, route pilot — voir
     scene3d-pilot.js) : fenêtre dédiée au seul onglet Live d'une scène, sans
     aucune navigation — tout ce qui permettrait d'aller ailleurs ou d'éditer
     est masqué. */
  body.pilot-mode .sidebar,
  body.pilot-mode #mobile-menu-btn,
  body.pilot-mode #mobile-nav-backdrop,
  body.pilot-mode #view-as-banner,
  body.pilot-mode .scene3d-tabs,
  body.pilot-mode #scene3d-back-btn,
  body.pilot-mode #scene3d-clear-btn,
  body.pilot-mode #scene3d-console-connect-wrap,
  body.pilot-mode .scene3d-live-manip{ display:none !important; }
  .scene3d-pilot-banner{ display:flex; align-items:center; gap:8px; font-size:12px; color:#B8C0CE; white-space:nowrap; }
  .scene3d-pilot-code{ font-weight:600; letter-spacing:.06em; color:#EDEDED; background:#0e1116; border:1px solid #262b35; border-radius:5px; padding:2px 8px; }
  .pilot-message-screen{ position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; padding:16px; background:#0e1116; }
  .pilot-message-card{ max-width:440px; background:#1a1e26; border:1px solid #262b35; border-radius:10px; padding:22px; color:#EDEDED; }
  .pilot-message-eyebrow{ font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:#5B6472; margin-bottom:8px; }
  .pilot-message-card h1{ font-size:16px; margin:0 0 8px; }
  .pilot-message-card p{ font-size:13px; line-height:1.6; color:#8A93A3; margin:0; }
  /* Onglet Live en lecture seule par défaut (2026-09-11) — case "Manipuler"
     dans le titre du panneau, champs grisés tant qu'elle n'est pas cochée. */
  .scene3d-inspector h2.scene3d-live-inspector-title{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
  .scene3d-live-manip{ display:flex; align-items:center; gap:5px; font-size:11px; text-transform:none; letter-spacing:0; color:#B8C0CE; cursor:pointer; }
  .scene3d-live-manip input{ margin:0; accent-color:#2FD9C4; }
  .scene3d-live-lock-hint{ font-size:11.5px; line-height:1.5; color:#8A93A3; margin:0 0 10px; }
  .scene3d-live-lock-hint:empty{ display:none; }
  .scene3d-live-lock-hint .scene3d-btn-secondary{ width:auto; margin-top:6px; }
  #scene3d-live-inspector.locked input:disabled,
  #scene3d-live-inspector.locked select:disabled,
  #scene3d-live-inspector.locked button:disabled{ opacity:.45; cursor:not-allowed; }
  .scene3d-live-reset-all-btn:disabled{ opacity:.4; cursor:not-allowed; }
  /* Case « Manipuler » flottante (2026-09-11) — coin haut-droit de la vue
     Live ; tant qu'elle n'est pas cochée, liste et panneau de contrôle sont
     masqués (.live-readonly posée par setLiveLocked()). */
  .scene3d-live-manip-float{ position:absolute; top:10px; right:10px; z-index:6; display:flex; flex-direction:column; align-items:flex-end; gap:6px; max-width:min(280px, 70%); }
  .scene3d-live-manip-float .scene3d-live-manip{ background:rgba(20,23,29,.9); border:1px solid #262b35; border-radius:999px; padding:6px 12px; font-size:12px; font-weight:600; color:#EDEDED; }
  .scene3d-live-manip-float .scene3d-live-lock-hint{ margin:0; background:rgba(20,23,29,.85); border:1px solid #262b35; border-radius:8px; padding:6px 9px; font-size:11px; text-align:right; }
  .scene3d-live-manip-float .scene3d-live-lock-hint .scene3d-btn-secondary{ display:block; margin:6px 0 0 auto; }
  #scene3d-tab-live.live-readonly > .scene3d-left-panel,
  #scene3d-tab-live.live-readonly > .scene3d-inspector{ display:none !important; }
  /* Barre du bas : mobile uniquement (voir le bloc max-width 900px plus bas). */
  .scene3d-mobile-dock{ display:none; }
  /* Import MVR (onglet Data) — fenêtre de choix par type de fixture. */
  .scene3d-mvr-import-body{ padding:0 20px; max-height:60vh; overflow-y:auto; }
  .scene3d-mvr-type{ border:1px solid var(--border); border-radius:8px; padding:10px 12px; margin:8px 0; }
  .scene3d-mvr-type-head{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; flex-wrap:wrap; font-size:13px; margin-bottom:6px; }
  .scene3d-mvr-type-meta{ color:var(--text-dim); font-size:12px; }
  .scene3d-mvr-type select, .scene3d-mvr-type input[type="search"]{ width:100%; box-sizing:border-box; background:var(--surface-2); border:1px solid var(--border); color:var(--text); border-radius:6px; padding:6px 8px; font-size:13px; font-family:var(--font-body); }
  .scene3d-mvr-pick{ display:flex; flex-direction:column; gap:6px; margin-top:6px; }
  .scene3d-mvr-pick[hidden]{ display:none; }
  .scene3d-mvr-options{ display:flex; flex-direction:column; gap:6px; margin:12px 0 6px; font-size:13px; }
  .scene3d-mvr-options label{ display:flex; align-items:flex-start; gap:8px; cursor:pointer; }
  /* Mini-fenêtre de positionnement de l'étiquette DMX (2026-08-04) — un seul
     réglage GLOBAL (pas par projecteur, voir scene3d-engine.js), pad carré
     avec un point fixe (le projecteur) et une poignée déplaçable (le texte). */
  .scene3d-dmx-label-pos-title{ color:#8A93A3; font-size:11px; text-transform:uppercase; letter-spacing:.04em; margin-top:2px; }
  .scene3d-dmx-label-pos-pad{ position:relative; width:100%; height:110px; background:#0e1116; border:1px solid #262b35; border-radius:6px; margin-top:2px; cursor:crosshair; touch-action:none; }
  .scene3d-dmx-label-pos-fixture{ position:absolute; left:50%; top:50%; width:10px; height:10px; margin:-5px; border-radius:50%; background:#5B6472; pointer-events:none; }
  .scene3d-dmx-label-pos-fixture::after{ content:''; position:absolute; inset:-4px; border:1px dashed #3a4150; border-radius:50%; }
  .scene3d-dmx-label-pos-handle{ position:absolute; left:50%; top:50%; width:16px; height:16px; margin:-8px; border-radius:4px; background:#2FD9C4; border:2px solid #14171d; cursor:grab; box-shadow:0 0 0 1px rgba(47,217,196,.4); }
  .scene3d-dmx-label-pos-handle:active{ cursor:grabbing; }
  .scene3d-dmx-label-pos-reset{ align-self:flex-start; background:none; border:none; color:#5B6472; font-size:11px; font-family: var(--font-body); cursor:pointer; padding:0; margin-top:2px; }
  .scene3d-dmx-label-pos-reset:hover{ color:#EDEDED; }
  .scene3d-plan-viewport{ flex:1; position:relative; background:#f1f0ee; min-width:0; overflow:hidden; }
  .scene3d-plan-viewport canvas{ display:block; width:100%; height:100%; }
  /* Cadrage avant capture — même langage visuel que .plan-crop-rect (modale de recadrage d'image existante), couleur d'accent Scène 3D plutôt que la variable de thème du site */
  .scene3d-plan-crop-rect{ position:absolute; border:2px dashed #2FD9C4; box-shadow: 0 0 0 3000px rgba(20,23,28,.45); cursor:move; z-index:4; }
  .scene3d-plan-crop-handle{ position:absolute; width:14px; height:14px; background:#2FD9C4; border-radius:50%; margin:-7px; }
  .scene3d-plan-crop-handle[data-plan-crop-handle="nw"]{ top:0; left:0; cursor:nwse-resize; }
  .scene3d-plan-crop-handle[data-plan-crop-handle="ne"]{ top:0; right:0; margin-right:-7px; cursor:nesw-resize; }
  .scene3d-plan-crop-handle[data-plan-crop-handle="sw"]{ bottom:0; left:0; margin-bottom:-7px; cursor:nesw-resize; }
  .scene3d-plan-crop-handle[data-plan-crop-handle="se"]{ bottom:0; right:0; margin-bottom:-7px; margin-right:-7px; cursor:nwse-resize; }
  /* Panneau flottant de propriétés d'une mesure (onglet Plan) — apparaît au
     clic simple (sans glisser) sur une cote déjà posée ; contrairement à
     .scene3d-inspector (colonne fixe de l'onglet 3D), c'est une carte
     flottante qui n'occupe de la place que quand une mesure est vraiment
     sélectionnée. */
  .scene3d-plan-measure-panel{ position:absolute; top:12px; right:12px; width:230px; background:#1a1e26; border:1px solid #262b35; border-radius:8px; padding:12px; z-index:5; box-shadow:0 10px 30px rgba(0,0,0,.5); }
  .scene3d-plan-measure-panel-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; color:#EDEDED; font-size:13px; font-weight:600; font-family: var(--font-body); }
  .scene3d-plan-measure-panel-header button{ background:none; border:none; color:#8A93A3; font-size:16px; line-height:1; cursor:pointer; padding:0 2px; }
  .scene3d-plan-measure-panel-header button:hover{ color:#EDEDED; }
  /* Trait/point survolé pendant le pointage de l'outil de mesure — voir
     hoverHighlightForMeasureTool() dans scene3d-engine.js. */
  .scene3d-plan-measure-hover-dot{ position:absolute; width:12px; height:12px; margin:-6px; border-radius:50%; background:#FFD54A; box-shadow:0 0 0 3px rgba(255,213,74,.35); pointer-events:none; z-index:6; display:none; }
  .scene3d-plan-crop-clear{ position:absolute; top:-14px; right:-14px; width:24px; height:24px; border-radius:50%; background:#14171d; border:1px solid #2FD9C4; color:#EDEDED; font-size:14px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; }
  .scene3d-plan-crop-clear:hover{ background:#2FD9C4; color:#0e1116; }

  /* Onglet Data — inventaire en lecture seule (projecteurs + structures) */
  .scene3d-data-panel{ flex:1; overflow-y:auto; padding:24px 28px; }
  .scene3d-data-section{ margin-bottom:28px; max-width:640px; }
  /* Colonne "Exporter" (MVR/GDTF, 2026-08-12) — à DROITE des tableaux
     d'inventaire, jamais un bandeau au-dessus : `.scene3d-data-panel` est
     déjà plafonné à 640px, laissant une large zone morte à droite sur un
     écran large — c'est cette zone que ce panneau occupe, plutôt qu'un
     bandeau full-width qui aurait dupliqué la largeur déjà utilisée par les
     tableaux. `align-self:flex-start` est le point important : sans lui,
     ce panneau (comme tout enfant direct de `.scene3d-body{display:flex}`)
     s'étire par défaut sur toute la hauteur de l'onglet — le bouton
     "Exporter" et son popover (`.scene3d-dmx-autopatch-popover`, réutilisée
     telle quelle) hériteraient de cet étirement (bouton étiré en un rectangle
     teal géant sur toute la hauteur de l'écran, bug réel constaté à la
     première version de cette feature, repéré par capture d'écran).*/
  .scene3d-data-export-col{ flex-shrink:0; width:240px; padding:24px 28px 0 0; align-self:flex-start; position:relative; }
  .scene3d-data-title{ font-size:13px; text-transform:uppercase; letter-spacing:.05em; color:#5B6472; margin-bottom:10px; font-family: var(--font-body); }
  .scene3d-data-table{ width:100%; border-collapse:collapse; font-family: var(--font-body); font-size:12.5px; color:#EDEDED; }
  .scene3d-data-table th{ text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.04em; color:#5B6472; padding:6px 10px; border-bottom:1px solid #262b35; }
  .scene3d-data-table td{ padding:8px 10px; border-bottom:1px solid #1c2029; }
  .scene3d-data-table tr:last-child td{ border-bottom:none; }

  /* Onglet DMX — layout à 4 vues simultanées (liste+adressage / tableau d'univers / 2 vues 3D), retour utilisateur explicite : pas de bascule d'onglet/méthode.
     Zones nommées explicites plutôt qu'un auto-placement implicite : avec
     seulement `grid-row:1/3` sur le panneau vues et un placement automatique
     pour les 2 autres, l'algorithme de la grille CSS aurait dû ouvrir une
     3ᵉ colonne implicite pour les vues (aucune des 2 colonnes explicites
     n'a ses 2 lignes libres), écrasant la largeur voulue pour liste/tableau.
     Colonne de gauche volontairement PLUS LARGE (1.35fr vs 1fr) — retour
     utilisateur explicite : "c'est la liste à laquelle je veux que tu
     donnes plus de place, pas aux cases". */
  .scene3d-dmx-grid{ flex:1; min-height:0; display:grid; grid-template-columns:1.35fr 1fr; grid-template-rows:1fr 1fr; grid-template-areas:"list views" "universe views"; gap:1px; background:#262b35; }
  .scene3d-dmx-quadrant{ background:#14171d; min-width:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; }
  #scene3d-dmx-quadrant-list{ grid-area:list; }
  #scene3d-dmx-quadrant-universe{ grid-area:universe; }
  #scene3d-dmx-quadrant-views{ grid-area:views; }
  .scene3d-dmx-inline-inspector{ width:auto; border-left:none; border-top:1px solid #262b35; flex-shrink:0; }
  .scene3d-dmx-views{ flex:1; position:relative; background:#0e1116; min-width:0; min-height:0; }
  .scene3d-dmx-views canvas{ display:block; width:100%; height:100%; }

  .scene3d-dmx-universe-pane{ display:flex; flex-direction:column; flex:1; width:100%; min-width:0; height:100%; min-height:0; }
  .scene3d-dmx-universe-tabs{ display:flex; align-items:center; gap:4px; padding:8px; flex-wrap:wrap; border-bottom:1px solid #262b35; }
  .scene3d-dmx-universe-tab{ display:flex; align-items:center; gap:6px; background:#0e1116; border:1px solid #262b35; color:#EDEDED; border-radius:6px; padding:5px 8px 5px 12px; font-size:12px; font-family: var(--font-body); cursor:pointer; }
  .scene3d-dmx-universe-tab:hover{ border-color:#2FD9C4; }
  .scene3d-dmx-universe-tab.active{ border-color:#2FD9C4; color:#2FD9C4; background:rgba(47,217,196,.08); }
  .scene3d-dmx-universe-tab-del{ display:flex; align-items:center; justify-content:center; width:16px; height:16px; border-radius:4px; color:#5B6472; font-size:13px; line-height:1; }
  .scene3d-dmx-universe-tab-del:hover{ background:rgba(255,107,107,.18); color:#ff6b6b; }
  .scene3d-dmx-universe-tab-add{ background:none; border:1px dashed #262b35; color:#5B6472; border-radius:6px; width:26px; height:26px; font-size:15px; cursor:pointer; line-height:1; }
  .scene3d-dmx-universe-tab-add:hover{ border-color:#2FD9C4; color:#2FD9C4; }
  .scene3d-dmx-universe-body{ flex:1; min-height:0; display:flex; gap:0; }
  /* Largeur de la liste à glisser (panneau mini uniquement désormais, voir
     dmxDragListHTML()) — retour utilisateur explicite : "c'est la liste à
     laquelle je veux que tu donnes plus de place, pas aux cases". Nom sur
     2 lignes (`white-space:normal`, pas d'ellipsis) plutôt qu'une colonne
     encore plus large : un nom de projecteur long reste lisible en entier
     sans pousser indéfiniment la largeur de la liste. */
  .scene3d-dmx-drag-list{ width:220px; flex-shrink:0; overflow-y:auto; padding:8px; border-right:1px solid #262b35; }
  .scene3d-dmx-drag-row{ display:flex; align-items:center; justify-content:space-between; gap:6px; padding:7px 9px; border-radius:6px; margin-bottom:2px; cursor:grab; color:#EDEDED; font-size:12px; font-family: var(--font-body); background:rgba(255,255,255,.03); }
  .scene3d-dmx-drag-row:hover{ background:rgba(255,255,255,.07); }
  .scene3d-dmx-drag-row:active{ cursor:grabbing; }
  .scene3d-dmx-drag-row.selected{ background:rgba(47,217,196,.14); color:#2FD9C4; }
  .scene3d-dmx-drag-name{ flex:1; min-width:0; white-space:normal; line-height:1.25; word-break:break-word; }
  .scene3d-dmx-drag-addr{ font-family: var(--mono); font-size:11px; color:#5B6472; flex-shrink:0; }
  /* Cases plus larges que hautes (retour utilisateur : "un peu moche ce
     tableau, donne plus d'espace au projecteur") — le nom d'un projecteur
     ne tient pas dans une case carrée de ~50px ; `grid-auto-rows` fixe
     (pas `aspect-ratio:1`) donne une case RECTANGULAIRE avec assez de
     largeur ET de hauteur (2 lignes) pour lire le nom sans le tronquer
     à quelques caractères. Revu légèrement à la baisse ensuite (112→92,
     52→42) — retour utilisateur explicite : "les cases sont grosses" —
     reste nettement plus spacieux que l'aspect-ratio:1 d'origine (~50px). */
  .scene3d-dmx-patch-grid{ flex:1; overflow-y:auto; padding:8px; display:grid; grid-template-columns:repeat(auto-fill, minmax(92px, 1fr)); grid-auto-rows:42px; gap:4px; align-content:start; }
  .scene3d-dmx-patch-cell{ position:relative; border-radius:4px; border:1px solid #262b35; background:#0e1116; padding:4px 6px; overflow:hidden; cursor:default; }
  /* Le contenu texte ne doit jamais devenir la cible du survol/dépôt à la place de la case elle-même */
  .scene3d-dmx-patch-cell *{ pointer-events:none; }
  .scene3d-dmx-patch-cell.empty{ opacity:.6; }
  .scene3d-dmx-patch-cell.occupied{ background:rgba(47,217,196,.14); border-color:#2FD9C4; cursor:pointer; }
  .scene3d-dmx-patch-cell.occupied.cont{ background:rgba(47,217,196,.06); border-style:dashed; }
  /* Alterne une seconde teinte (bleu) à chaque nouveau projecteur rencontré
     le long des 512 canaux — retour utilisateur explicite : "que le suivant
     change légèrement la couleur, pour les faire s'alterner pour plus de
     lisibilité", pour distinguer d'un coup d'œil où finit un projecteur et
     où commence le suivant sans lire chaque étiquette. */
  .scene3d-dmx-patch-cell.occupied.alt{ background:rgba(94,163,255,.16); border-color:#5EA3FF; }
  .scene3d-dmx-patch-cell.occupied.alt.cont{ background:rgba(94,163,255,.07); }
  .scene3d-dmx-patch-cell.occupied.alt .scene3d-dmx-patch-ch{ color:#5EA3FF; }
  .scene3d-dmx-patch-cell.preview{ background:rgba(255,167,38,.22); border-color:#FFA726; border-style:dashed; }
  /* Sélectionner un projecteur déjà patché (méthode 1, liste) le surligne
     aussi dans le tableau (méthode 2) — retour utilisateur explicite :
     "quand je sélectionne en dmx un projecteur déjà présent dans un
     tableau ça le highlight". Anneau jaune, distinct des teintes
     occupied/alt/preview déjà utilisées ici. */
  .scene3d-dmx-patch-cell.selected{ box-shadow: 0 0 0 2px #FFD54A inset; border-color:#FFD54A; }
  .scene3d-dmx-patch-ch{ display:block; font-size:9.5px; color:#5B6472; font-family: var(--mono); }
  .scene3d-dmx-patch-cell.occupied .scene3d-dmx-patch-ch{ color:#2FD9C4; }
  .scene3d-dmx-patch-name{ display:block; font-size:10px; color:#EDEDED; line-height:1.15; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-family: var(--font-body); }
  /* Variante compacte — panneau "DMX" d'une disposition 2/4 vues, moins de place */
  .scene3d-dmx-universe-pane.compact .scene3d-dmx-universe-tabs{ padding:4px; gap:3px; }
  .scene3d-dmx-universe-pane.compact .scene3d-dmx-universe-tab{ font-size:10.5px; padding:3px 6px 3px 8px; }
  .scene3d-dmx-universe-pane.compact .scene3d-dmx-drag-list{ width:110px; padding:4px; }
  .scene3d-dmx-universe-pane.compact .scene3d-dmx-drag-row{ padding:4px 6px; font-size:10.5px; }
  .scene3d-dmx-universe-pane.compact .scene3d-dmx-drag-addr{ display:none; }
  .scene3d-dmx-universe-pane.compact .scene3d-dmx-patch-grid{ padding:4px; grid-template-columns:repeat(auto-fill, minmax(28px, 1fr)); gap:2px; }
  .scene3d-dmx-universe-pane.compact .scene3d-dmx-patch-name{ font-size:8px; }
  .scene3d-dmx-universe-pane.compact .scene3d-dmx-patch-ch{ font-size:8px; }

  .scene3d-viewport{ flex:1; position:relative; background:#0e1116; min-width:0; }
  .scene3d-viewport canvas{ display:block; width:100%; height:100%; }
  /* right, pas left : le coin bas-gauche est occupé par le repère d'axes qui suit la caméra (voir renderGizmo() dans scene3d-engine.js) — les deux se chevauchaient au même coin avant ce correctif. */
  .scene3d-hud{ position:absolute; right:10px; bottom:10px; font-size:11px; color:#cfd4de; background:rgba(20,23,28,.7); padding:4px 8px; border-radius:5px; pointer-events:none; z-index:2; }
  .scene3d-pane-label{ position:absolute; z-index:2; background:rgba(20,23,28,.85); border:1px solid #262b35; color:#cfd4de; font-size:10.5px; font-family: var(--font-body); border-radius:5px; padding:3px 6px; pointer-events:none; }
  .scene3d-pane-select{ position:absolute; z-index:3; background:rgba(20,23,28,.9); border:1px solid #262b35; color:#cfd4de; font-size:10.5px; font-family: var(--font-body); border-radius:5px; padding:2px 4px; }
  .scene3d-pane-divider{ position:absolute; background:#262b35; pointer-events:none; z-index:2; }
  .scene3d-pane-focused-ring{ position:absolute; border:1.5px solid #2FD9C4; pointer-events:none; z-index:2; border-radius:2px; opacity:.55; }
  .scene3d-boxselect-rect{ position:absolute; border:1px solid #2FD9C4; background:rgba(47,217,196,.14); pointer-events:none; z-index:5; display:none; }

  .scene3d-inspector{ width:220px; flex-shrink:0; background:#14171d; border-left:1px solid #262b35; padding:12px; overflow-y:auto; }
  .scene3d-inspector h2{ font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:#5B6472; margin:0 0 10px; }
  .scene3d-field{ margin-bottom:10px; }
  .scene3d-field label{ display:block; font-size:11px; color:#5B6472; margin-bottom:3px; }
  .scene3d-field input, .scene3d-field select{ width:100%; background:#0e1116; border:1px solid #262b35; color:#EDEDED; border-radius:5px; padding:5px 7px; font-size:12.5px; font-family: var(--font-body); }
  .scene3d-field input:focus, .scene3d-field select:focus{ outline:none; border-color:#2FD9C4; }
  /* Presse-papier de coordonnées (coord-clipboard.js) — copier/coller un
     {x,y,z}, réutilisé par le Truss Builder et l'inspecteur Scène 3D. */
  .coord-clip-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:3px; }
  .coord-clip-row label{ font-size:11px; color:#5B6472; }
  .coord-clip-btns{ display:flex; gap:4px; }
  .coord-clip-btn{ display:flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:5px; border:1px solid #262b35; background:#0e1116; color:#8A93A3; cursor:pointer; padding:0; }
  .coord-clip-btn:hover{ color:#2FD9C4; border-color:#2FD9C4; }
  /* Onglet Live (2026-08-06) — liste de fixtures (réutilise .scene3d-dmx-row
     tel quel pour rester visuellement cohérent avec l'onglet DMX) + slider
     de contrôle dédié, un peu plus épais qu'un input standard pour rester
     confortable à glisser. */
  .scene3d-live-list-title{ flex:1; padding:10px 10px; font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:#5B6472; }
  /* Réinitialiser tous les projecteurs (2026-08-06) — petit bouton texte à
     côté du titre de liste, teinte rouge au survol (action qui efface un
     réglage manuel potentiellement sur toute la scène). */
  .scene3d-live-reset-all-btn{ margin:6px 8px; flex-shrink:0; background:none; border:1px solid #262b35; color:#8A93A3; border-radius:5px; padding:4px 8px; font-size:11px; font-family: var(--font-body); cursor:pointer; white-space:nowrap; }
  .scene3d-live-reset-all-btn:hover{ color:#E5555A; border-color:#E5555A; }
  .scene3d-live-row-dot{ width:10px; height:10px; border-radius:50%; flex-shrink:0; border:1px solid rgba(255,255,255,.25); }
  .scene3d-live-range{ width:100%; accent-color:#2FD9C4; cursor:pointer; }
  /* Réglages manuels d'un projecteur (2026-10-21) : à la main au montage, la console ne les pilote pas */
  .scene3d-manual{ border:1px solid #262b35; border-radius:8px; padding:8px; margin:8px 0; background:#11141a; }
  .scene3d-manual-title{ font-size:12px; font-weight:600; color:#E6E9EF; }
  .scene3d-manual-sub{ font-size:11px; color:#5B6472; margin:2px 0 8px; line-height:1.4; }
  .scene3d-manual-row{ display:flex; align-items:center; gap:6px; }
  .scene3d-manual-row .scene3d-live-range{ flex:1; min-width:0; }
  .scene3d-manual-row select{ flex:1; min-width:0; }
  .scene3d-manual-num{ width:56px; flex:none; }
  .scene3d-manual-unit{ font-size:11px; color:#5B6472; flex:none; }
  .scene3d-manual-blades{ display:flex; flex-direction:column; gap:6px; align-items:stretch; }
  .scene3d-manual-preview{ width:96px; height:96px; border-radius:50%; background:#0b0d11; flex:none; border:1px solid #262b35; align-self:center; }
  .scene3d-manual-blade-rows{ display:flex; flex-direction:column; gap:4px; }
  .scene3d-manual-blade{ display:flex; align-items:center; gap:4px; font-size:11px; color:#8b93a1; }
  .scene3d-manual-blade > span:first-child{ width:44px; flex:none; }
  .scene3d-manual-blade .scene3d-live-range{ flex:1; min-width:0; }
  .scene3d-manual-blade .scene3d-manual-num{ width:44px; }
  .scene3d-manual-dmx{ font-size:11px; color:#2FD9C4; margin-top:6px; line-height:1.4; }
  /* points de levage d'une tour (2026-10-21) : moteur orange, bout de chaîne turquoise, comme dans la 3D */
  .tl-dot{ display:inline-block; width:9px; height:9px; border-radius:50%; vertical-align:middle; margin-right:2px; }
  .tl-dot.tl-motor{ background:#ff8c00; }
  .tl-dot.tl-chain{ background:#2fd9c4; }
  /* plus spécifique que « .scene3d-field input » (pleine largeur) */
  .scene3d-manual .scene3d-field input[type=range]{ flex:1; min-width:0; width:auto; padding:0; border:0; background:none; }
  .scene3d-manual .scene3d-field input.scene3d-manual-num{ width:58px; flex:none; padding:4px 5px; }
  .scene3d-manual .scene3d-manual-blade input.scene3d-manual-num{ width:46px; }
  .scene3d-manual .scene3d-field input[type=color]{ width:34px; height:28px; flex:none; padding:2px; }
  .scene3d-manual .scene3d-field input[type=checkbox]{ width:auto; flex:none; padding:0; }
  .scene3d-manual .scene3d-field select{ flex:1; min-width:0; width:auto; }
  /* Fixture multi-sources (2026-08-06, révisé le même jour en hiérarchie
     dépliable — retour utilisateur explicite : "fait une fixture 1 et en
     dessous développe le 1.1, 1.2") — ligne parente (réglages mécaniques
     partagés) + chevron + lignes enfants "1.01"/"1.02"/... indentées. */
  .scene3d-live-parent-row{ gap:6px; }
  .scene3d-live-expand-btn{ background:none; border:none; color:#8A93A3; cursor:pointer; padding:0; font-size:11px; width:14px; flex-shrink:0; line-height:1; }
  .scene3d-live-expand-btn:hover{ color:#EDEDED; }
  .scene3d-live-child-row{ padding-left:30px; }
  /* Bascule filaire/rendu 3D — coin haut-gauche du viewport Live (retour
     utilisateur explicite : "mets une option en haut" — la Live tab n'a pas
     de barre d'outils comme l'onglet 3D, #scene3d-toolbar y reste masquée). */
  .scene3d-live-toolbar{ position:absolute; left:10px; top:10px; z-index:5; display:flex; gap:6px; }
  /* Réglage global de fumée/brume — carte flottante en bas-gauche du
     viewport Live, même traitement que .scene3d-hud (fond semi-opaque). */
  .scene3d-live-fog-control{ position:absolute; left:10px; bottom:10px; z-index:5; background:rgba(20,23,29,.85); border:1px solid #262b35; border-radius:8px; padding:8px 10px; width:170px; }
  .scene3d-live-fog-control label{ display:block; font-size:11px; color:#8A93A3; margin-bottom:4px; }
  .scene3d-live-fog-control input[type="range"]{ width:100%; accent-color:#2FD9C4; cursor:pointer; }
  .scene3d-live-fog-control input[type="range"] + label{ margin-top:6px; }
  /* Valeurs des curseurs de la vue Live : cliquables pour une saisie au clavier. */
  #scene3d-tab-live span[id$="-val"]{ cursor:text; border-bottom:1px dotted rgba(237,237,237,.35); }
  #scene3d-tab-live span[id$="-val"]:hover{ color:#2FD9C4; border-bottom-color:#2FD9C4; }
  #scene3d-tab-live .scene3d-live-val-input{ width:68px !important; display:inline-block; vertical-align:baseline; background:#0e1116; border:1px solid #2FD9C4; color:#EDEDED; border-radius:4px; padding:1px 4px; font-size:11px; font-family: var(--font-body); }
  .scene3d-live-fog-control .scene3d-live-quality-row{ display:flex; align-items:center; justify-content:space-between; gap:6px; margin-bottom:8px; }
  .scene3d-live-fog-control select{ flex:1; min-width:0; background:#0e1116; border:1px solid #262b35; color:#EDEDED; border-radius:5px; padding:3px 4px; font-size:11px; font-family: var(--font-body); cursor:pointer; }
  .scene3d-row2{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .scene3d-row3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:4px; }
  .scene3d-row3 input{ width:100%; min-width:0; background:#0e1116; border:1px solid #262b35; color:#EDEDED; border-radius:5px; padding:4px 3px; font-size:11px; font-family: var(--font-body); text-align:center; }
  .scene3d-row3 input:focus{ outline:none; border-color:#2FD9C4; }
  .scene3d-rot-buttons{ display:flex; gap:6px; margin-top:4px; }
  .scene3d-rot-buttons button{ flex:1; background:#0e1116; border:1px solid #262b35; color:#EDEDED; border-radius:5px; padding:6px 0; cursor:pointer; font-size:13px; }
  .scene3d-rot-buttons button:hover{ border-color:#2FD9C4; }
  /* Aperçu figé de plusieurs machines : curseur d'écart minimal + Valider / Annuler. */
  .scene3d-arm-lock{ margin:6px 0 10px; padding:10px; border:1px solid #2FD9C4; border-radius:8px; background:rgba(47,217,196,.06); }
  .scene3d-arm-lock input[type="range"]{ width:100%; accent-color:#2FD9C4; margin-top:6px; }
  .scene3d-arm-lock .scene3d-hint{ margin-top:6px; }
  .scene3d-rot-buttons button.scene3d-btn-primary{ background:#2FD9C4; border-color:#2FD9C4; color:#0b0d11; font-weight:600; }
  .scene3d-rot-buttons button.scene3d-btn-primary:hover{ background:#5ee6d6; }
  .scene3d-btn-secondary{ width:100%; margin-top:8px; background:#0e1116; border:1px solid #262b35; color:#EDEDED; border-radius:6px; padding:7px 0; cursor:pointer; font-size:12.5px; font-family: var(--font-body); display:flex; align-items:center; justify-content:center; gap:6px; }
  .scene3d-btn-secondary:hover{ border-color:#2FD9C4; color:#2FD9C4; }
  #scene3d-delete-btn{ width:100%; margin-top:14px; background:rgba(229,85,90,.12); border:1px solid rgba(229,85,90,.35); color:#E5555A; border-radius:6px; padding:8px 0; cursor:pointer; font-size:12.5px; font-family: var(--font-body); }
  #scene3d-delete-btn:hover{ background:rgba(229,85,90,.2); }

  /* ==========================================================================
     MOBILE / TACTILE (2026-09-09)
     Retour utilisateur : "j'essaye de lire le site depuis un téléphone, et le
     menu de gauche prend trop de place, en plus, seule une partie est
     déroulante donc super nul" — mesuré avant correctif sur un vrai Chrome en
     390x844 : sidebar 220px = 56% de la largeur, contenu réellement utilisable
     90px = 23%, `.menubar` du Plan à `clientWidth:90 / scrollWidth:432` avec
     `overflow-x:visible` (les 2/3 des outils hors-écran ET inatteignables),
     canevas de 90px de large. Verticalement, `.sb-bottom` occupait 372px FIGÉS
     (44% de la hauteur) puisque seul `#sb-nav-primary` avait `overflow-y:auto`.

     Trois règles, un seul point de bascule, ZÉRO duplication de code JS :
       1. le menu n'occupe plus jamais de largeur — il se superpose à la demande ;
       2. un espace de travail = tout l'écran, aucun chrome permanent ;
       3. rien ne déborde en silence : ça enveloppe, ça défile, ou ça rétrécit.

     TOUT est exprimé en unités fluides (`min()`, `clamp()`, `vw`, `dvh`) —
     retour utilisateur explicite : "tout les téléphones n'ont pas la même
     résolution". Vérifié de 320px (iPhone SE) à 768px (iPad portrait).

     La Scène 3D, le Truss Builder et l'Éditeur d'assemblage GDTF sont
     volontairement HORS de ce chantier (déjà plein écran, palette fixe, et
     contrôles tactiles à concevoir séparément).
     ========================================================================== */
  #mobile-menu-btn, #mobile-nav-backdrop{ display:none; }

  @media (max-width: 900px){

    /* ---------- Tiroir de navigation ---------- */
    #mobile-menu-btn{
      display:flex; align-items:center; justify-content:center;
      position:fixed; top:10px; left:10px; z-index:210;
      width:44px; height:44px;              /* cible tactile confortable */
      border-radius:10px; cursor:pointer;
      background: var(--surface); border:1px solid var(--border); color: var(--text);
      box-shadow: 0 4px 16px rgba(0,0,0,.3);
    }
    body.fullscreen-view #mobile-menu-btn,
    body.nav-open #mobile-menu-btn{ display:none; }

    #mobile-nav-backdrop{
      display:block; position:fixed; inset:0; z-index:190;
      background: rgba(8,10,14,.62);
      opacity:0; pointer-events:none; transition: opacity .22s ease;
    }
    #mobile-nav-backdrop.show{ opacity:1; pointer-events:auto; }

    .sidebar{
      position:fixed; top:0; left:0; bottom:0;
      width: min(84vw, 330px);
      z-index:200;
      transform: translateX(-100%);
      transition: transform .22s ease;
      /* UN SEUL conteneur de défilement, de haut en bas — c'est ce qui règle
         le "seule une partie est déroulante" : `#sb-nav-primary` rend son
         `overflow` juste en dessous. */
      overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
    }
    .sidebar.mobile-open{ transform:none; box-shadow: 0 0 46px rgba(0,0,0,.55); }
    #sb-nav-primary{ overflow-y:visible; min-height:auto; flex:0 0 auto; }
    .sb-bottom{ flex:0 0 auto; }

    /* Le mode "réduit" du bureau (64px d'icônes sans libellé) n'a aucun sens
       une fois la sidebar hors-flux : neutralisé, sinon un compte qui a
       replié le menu sur PC retrouve un tiroir d'icônes muettes au téléphone. */
    .sidebar.collapsed{ width: min(84vw, 330px); }
    .sidebar.collapsed .sb-item-label,
    .sidebar.collapsed .sb-user-name,
    .sidebar.collapsed .sb-brand-text{ display:block; }
    .sidebar.collapsed .logout{ display:block; width:100%; }
    .sidebar.collapsed .sb-item{ justify-content:flex-start; }
    .sidebar.collapsed .sb-user{ justify-content:flex-start; padding:4px 6px; margin-left:-6px; }
    .sidebar.collapsed .theme-switch-row{ justify-content:flex-start; }
    .sidebar.collapsed .sb-toggle svg{ transform:none; }
    .sidebar.collapsed .sb-top{ justify-content:space-between; padding:18px 16px; }
    .sidebar.collapsed .sb-top.sb-top-compact .sb-toggle{ display:flex; }
    .sidebar.collapsed .sb-brand{ display:flex; }
    .sidebar.collapsed .sb-brand.has-compact > :not(.sb-brand-compact){ display:block; }
    .sidebar.collapsed .sb-brand-compact{ display:none; }
    .sb-item{ padding:12px; }               /* cibles tactiles */
    .sb-toggle{ width:36px; height:36px; }

    /* ---------- Contenu fluide ---------- */
    .main{ padding: 62px clamp(12px, 3.5vw, 22px) 24px; }
    .view, #view-admin-panel.show, #view-bibliotheque.show{ max-width:none; }
    .view-header{ flex-wrap:wrap; gap:10px; margin-bottom:18px; }
    .view-header > *{ min-width:0; }
    .view-actions{ flex-wrap:wrap; }
    .view-actions .view-search{ flex:1 1 100%; width:auto; order:-1; }
    .lib-cat-tabs{ flex-wrap:wrap; gap:6px; margin-bottom:16px; }
    /* `!important` assumé : la largeur de 220px est posée en style EN LIGNE
       dans index.html, rien d'autre ne peut la battre. */
    #lib-search-input{ width:100% !important; }

    /* `min(Xpx, 100%)` garantit qu'une carte ne déborde JAMAIS, même sur un
       écran de 320px — `minmax(220px, 1fr)` seul force une colonne plus large
       que le conteneur et déborde en silence. */
    .project-grid{ grid-template-columns: repeat(auto-fill, minmax(min(160px,100%), 1fr)); gap:10px; }
    .doc-card-grid{ grid-template-columns: repeat(auto-fill, minmax(min(170px,100%), 1fr)); gap:10px; }
    .libdoc-pages-grid{ grid-template-columns: repeat(auto-fill, minmax(min(100px,100%), 1fr)); }

    /* ---------- Espaces de travail plein écran ---------- */
    /* Spécificité (id + classe) supérieure à `.view.show{display:block}`. */
    #view-elec-workspace.show, #view-plan-workspace.show,
    #view-deviceflow-workspace.show, #view-fichier-workspace.show{
      position:fixed; inset:0; z-index:60;
      display:flex; flex-direction:column;
      background: var(--bg);
      padding: 8px clamp(6px, 2vw, 12px) 6px;
      max-width:none; overflow:hidden;
    }

    /* Barre d'outils : elle ENVELOPPE au lieu de défiler horizontalement.
       Un `overflow-x:auto` ici découperait les menus déroulants
       (`.menubar-dropdown`, en `position:absolute` à l'intérieur) — exactement
       le piège déjà rencontré sur la barre du Truss Builder. */
    .menubar{ flex-wrap:wrap; justify-content:flex-start; gap:6px; margin-bottom:10px; position:relative; }
    .menubar-left{ flex-wrap:wrap; flex:1 1 auto; }
    .menubar-layout-icons{ margin-left:auto; }
    .menubar-item{ padding:10px 12px; }
    .menubar-item.icon-only{ padding:10px; }
    /* Le menu déroulant s'ancre désormais sur la BARRE entière plutôt que sur
       son bouton (`.menubar-group` passe en `static`) : plein cadre sous la
       barre, jamais coupé au bord droit de l'écran quel que soit le bouton
       cliqué, et son `min-width:230px`/`340px` ne peut plus déborder. */
    .menubar-group{ position:static; }
    .menubar-dropdown{ left: clamp(4px, 1.5vw, 10px); right: clamp(4px, 1.5vw, 10px); min-width:0; max-height:60dvh; }
    .menubar-dropdown.wide{ min-width:0; max-height:60dvh; }

    .elec-topline{ gap:8px; margin-bottom:10px; flex-wrap:wrap; }
    .elec-layout{ min-height:0; }
    /* Sans ça, le navigateur s'approprie le geste (pan/zoom de page) et le
       glisser d'un élément ou le tracé d'un câble ne répond jamais au doigt. */
    .elec-canvas{ touch-action:none; }
    /* Tableaux Data sheets : défilement horizontal DANS le panneau plutôt que
       des colonnes écrasées à 20px. */
    .elec-pane-body{ overflow-x:auto; }
    .ds-table{ min-width:520px; }

    /* ---------- Panneaux flottants → feuilles du bas ---------- */
    /* `.plan-style-panel` porte toujours aussi `.elec-group-visibility-panel`
       (voir planStylePanelHTML()), les deux sont donc couvertes ici. */
    .elec-color-panel, .elec-group-visibility-panel{
      position:fixed; left:0; right:0; bottom:0; top:auto;
      width:auto; min-width:0; max-width:none;
      max-height:46dvh; overflow-y:auto;
      border-radius:14px 14px 0 0;
      padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
      z-index:160;
    }
    /* Au-dessus du zoom (.elec-canvas-zoom-ctrl, en bas à droite) : posé à
       12px du bas, il le recouvrait et le zoom devenait inaccessible (2026-11-06). */
    .plan-style-collapsed-btn, .egv-collapsed-btn{ top:auto; bottom:50px; right:12px; left:auto; z-index:160; }

    /* ---------- Modales → feuilles du bas ---------- */
    .modal-overlay{ align-items:flex-end; }
    .modal, .modal.wide{
      max-width:none; width:100%;
      max-height:88dvh; overflow-y:auto;
      border-radius:14px 14px 0 0;
      padding: 18px clamp(12px,4vw,18px) calc(18px + env(safe-area-inset-bottom, 0px));
    }

    /* ---------- Saisie ---------- */
    /* iOS zoome AUTOMATIQUEMENT sur tout champ dont la police est < 16px, ce
       qui décale toute la mise en page et ne se défait pas tout seul. */
    input[type="text"], input[type="number"], input[type="password"],
    input[type="email"], input[type="search"], input[type="date"],
    input:not([type]), textarea, select{ font-size:16px; }
  }

  /* ---------- Scène 3D tactile (2026-09-09) ----------
     Pavés de navigation : masqués par défaut, révélés au point de bascule
     mobile. Palette FIXE (#EDEDED/#14171d/#2FD9C4...) comme tout le reste
     du module — jamais var(--text)/var(--surface), voir la règle générale
     "Interface en 3 zones fixes" (un fond de scène sombre est forcé quel
     que soit le thème du site, du texte theme-following y devient noir sur
     noir). */
  .scene3d-touch-pads, .scene3d-pads-toggle{ display:none; }

  @media (max-width: 900px){
    /* Le module est déjà plein écran (#view-scene3d-workspace.show), il
       n'y a donc rien à refaire de ce côté — seules les deux colonnes
       fixes (250px + 220px = 470px, soit plus que l'écran entier) doivent
       devenir des feuilles du bas. */
    .scene3d-body{ position:relative; }
    .scene3d-left-panel, .scene3d-inspector{
      position:absolute; left:0; right:0; bottom:0; top:auto;
      width:auto; max-width:none;
      max-height:44dvh; overflow-y:auto; z-index:30;
      border:none; border-top:1px solid #262b35;
      border-radius:14px 14px 0 0;
      box-shadow: 0 -10px 30px rgba(0,0,0,.5);
      padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    }
    /* Les deux se superposeraient au même endroit : l'inspecteur (contextuel,
       il n'apparaît qu'avec une sélection) passe au-dessus. */
    .scene3d-inspector{ z-index:31; }
    /* ...mais seulement quand il a quelque chose à montrer : vide
       (« Aucun objet sélectionné »), il recouvrait la Bibliothèque/la Liste
       pour rien et en masquait une partie. */
    .scene3d-inspector:has(> #scene3d-inspector-body > .scene3d-empty:only-child){ display:none; }
    /* L'« Adressage DMX » de l'onglet DMX porte aussi la classe
       .scene3d-inspector, mais il vit DANS la colonne de la liste : il reste
       à sa place, sous la liste, au lieu de devenir une feuille posée sur le
       patch (2026-11-06, il en cachait les dernières lignes). */
    .scene3d-dmx-inline-inspector{
      position:static; max-height:45%; overflow-y:auto;
      border-radius:0; box-shadow:none; z-index:auto;
    }
    .scene3d-viewport{ position:absolute; inset:0; }
    /* Sans ça le navigateur s'approprie le geste et ni la sélection ni la
       manipulation directe ne répondent au doigt. */
    .scene3d-viewport canvas{ touch-action:none; }

    .scene3d-touch-pads{
      display:flex; justify-content:space-between; align-items:flex-end;
      position:absolute; left:12px; right:12px;
      bottom: calc(46dvh + 10px);   /* juste au-dessus des feuilles du bas */
      z-index:25; pointer-events:none;
    }
    .scene3d-touch-pads.hidden{ display:none; }
    .scene3d-pad{
      pointer-events:auto;
      /* --pad-size : posé par placeTouchPads() en disposition 2/4 vues (pavés dans la vue pilotée) */
      width: var(--pad-size, min(26vw, 96px)); height: var(--pad-size, min(26vw, 96px));
      display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
      border-radius:50%;
      background: rgba(20,23,29,.82);
      border:1px solid #2b313c;
      color:#EDEDED;
      backdrop-filter: blur(3px);
      box-shadow: 0 6px 20px rgba(0,0,0,.45);
      touch-action:none; user-select:none;
      transition: border-color .15s ease, background .15s ease;
    }
    .scene3d-pad svg{ width:52%; height:52%; opacity:.9; }
    .scene3d-pad span{ font-family: var(--mono); font-size:9px; letter-spacing:.04em; text-transform:uppercase; opacity:.65; }
    .scene3d-pad.active{ border-color:#2FD9C4; background: rgba(20,23,29,.95); }
    .scene3d-pad.active svg{ color:#2FD9C4; opacity:1; }
    /* Vue Dessus/Face/Côté : axe figé par conception, rien à orbiter. */
    .scene3d-pad.disabled{ opacity:.3; }

    .scene3d-pads-toggle{
      display:flex; align-items:center; justify-content:center;
      position:absolute; right:12px; bottom: calc(46dvh + min(26vw,96px) + 18px);
      width:36px; height:36px; border-radius:9px; z-index:26; cursor:pointer;
      background: rgba(20,23,29,.82); border:1px solid #2b313c; color:#EDEDED;
    }
    .scene3d-pads-toggle.pads-off{ color:#8a8f98; }
  }

  /* Barre du bas mobile façon barre des tâches (2026-09-11, retour
     utilisateur : "les onglets en bas, rends-les minimal comme fermés avec
     des boutons en bas [...] impossible d'accéder au réglage de fumée") —
     onglets + boutons « Panneau »/« Réglages » ; les feuilles du bas sont
     FERMÉES par défaut et s'ouvrent au-dessus de la barre (data-mobile-sheet
     sur #scene3d-container, voir setMobileSheet() dans scene3d-engine.js).
     Règles posées APRÈS le bloc mobile précédent : elles le complètent. */
  @media (max-width: 900px){
    #scene3d-container{ --s3d-dock-h: 58px; }
    #scene3d-container .scene3d-topline .scene3d-tabs{ display:none; }
    .scene3d-mobile-dock{
      display:flex; align-items:stretch; gap:4px;
      position:fixed; left:0; right:0; bottom:0; z-index:40;
      height: calc(var(--s3d-dock-h) + env(safe-area-inset-bottom, 0px));
      padding: 4px 6px env(safe-area-inset-bottom, 0px);
      background:#14171d; border-top:1px solid #262b35;
      box-shadow: 0 -8px 24px rgba(0,0,0,.35);
    }
    body.pilot-mode .scene3d-mobile-dock{ display:none !important; }
    .scene3d-dock-sheets{ display:flex; gap:2px; padding-right:6px; border-right:1px solid #262b35; }
    .scene3d-dock-tabs{ display:flex; flex:1; gap:2px; min-width:0; }
    .scene3d-mobile-dock .scene3d-dock-btn{
      flex:1; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
      padding:2px 4px; margin:0; background:none; border:none; border-radius:8px;
      color:#8A93A3; font-size:10px; font-weight:500; font-family:var(--font-body); cursor:pointer;
    }
    .scene3d-dock-sheets .scene3d-dock-btn{ flex:0 0 auto; width:56px; }
    .scene3d-mobile-dock .scene3d-dock-btn span{ max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
    .scene3d-mobile-dock .scene3d-dock-btn.active{ color:#2FD9C4; background:rgba(47,217,196,.1); }
    .scene3d-mobile-dock .scene3d-dock-btn:disabled{ opacity:.3; cursor:default; }
    /* Chaque onglet s'arrête AU-DESSUS de la barre (2026-11-06) : elle est en
       position fixe, et le bas de l'onglet passait dessous sans pouvoir
       défiler (dernières lignes du patch DMX, « Adressage DMX »…). Tout ce
       qui est posé en bas d'un onglet (feuilles, pavés, légende des charges)
       se cale donc sur le bas de l'onglet, plus sur la hauteur de la barre. */
    #scene3d-container .scene3d-body{ margin-bottom: calc(var(--s3d-dock-h) + env(safe-area-inset-bottom, 0px)); }
    body.pilot-mode #scene3d-container .scene3d-body{ margin-bottom:0; }
    /* Feuilles fermées par défaut, ouvertes une à la fois au-dessus de la barre. */
    #scene3d-container .scene3d-body > .scene3d-left-panel,
    #scene3d-container .scene3d-body > .scene3d-inspector{
      display:none;
      bottom:0;
      max-height:52dvh; padding-bottom:10px;
    }
    #scene3d-container[data-mobile-sheet="left"] .scene3d-body > .scene3d-left-panel{ display:flex; }
    #scene3d-container[data-mobile-sheet="right"] .scene3d-body > .scene3d-inspector{ display:block; }
    /* Pavés, bouton de masquage, HUD et fumée remontés au-dessus de la barre. */
    .scene3d-touch-pads{ bottom:12px; }
    .scene3d-pads-toggle{ bottom: calc(min(26vw, 96px) + 20px); }
    /* En haut de la vue : en bas, le pavé Déplacer le recouvrait. */
    .scene3d-hud{ top:8px; bottom:auto; }
    #scene3d-live-viewport .scene3d-live-fog-control{ top:10px; bottom:auto; left:50px; width:min(150px, 34vw); }
  }

  /* Très petits écrans (iPhone SE et assimilés) : une seule colonne, marges
     encore réduites — jamais une mise en page différente, juste plus serrée. */
  @media (max-width: 380px){
    .main{ padding-left:10px; padding-right:10px; }
    .project-grid, .doc-card-grid{ grid-template-columns:1fr; }
  }

  /* Barre de l'atelier Truss Builder — icônes (2026-09-12, piste "trait
     technique", dessins dans js/truss-builder-icons.js) : icône au-dessus d'un
     libellé court ; bandeau de CETTE barre porté à 56px (44px partout
     ailleurs) pour que les dessins restent lisibles à 28px. Couleurs de l'icône fixes ; l'état
     actif reste la bordure et le libellé teal posés en style inline. Espacement
     resserré pour CETTE barre seulement (le bandeau est partagé). */
  #tb-topline{ gap:6px; height:56px; }
  /* Éditeur de fixture : barre assez haute pour les boutons à icône des
     outils de fichier (2026-09-14), état vide, données DMX. */
  #gpe-topline{ gap:6px; height:56px; }
  .gpe-empty{ flex:1; display:grid; place-items:center; background:#0e1116; padding:24px 16px; }
  .gpe-empty-card{ max-width:460px; text-align:center; display:grid; gap:12px; justify-items:center; color:#8A93A3; font-size:13px; line-height:1.55; }
  .gpe-empty-card h2{ color:#EDEDED; font:600 18px/1.2 var(--font-display); margin:0; }
  .gpe-empty-card p{ margin:0; }
  .gpe-empty-ico svg{ width:64px; height:64px; display:block; }
  .gpe-empty-actions{ display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
  .gpe-empty-actions .scene3d-btn-secondary{ width:auto; margin:0; padding:8px 14px; }
  .gpe-dmx-hint{ color:#8A93A3; font-size:11.5px; line-height:1.5; margin:-4px 0 8px; }
  .gpe-tabs{ display:flex; gap:4px; margin:0 0 12px; border-bottom:1px solid #262b35; }
  .gpe-tabs button{ background:none; border:none; border-bottom:2px solid transparent; color:#8A93A3; font:inherit; font-size:12.5px; padding:6px 10px; cursor:pointer; margin-bottom:-1px; }
  .gpe-tabs button.on{ color:#EDEDED; border-bottom-color:#2FD9C4; }
  .gpe-light-file{ display:grid; gap:4px; font-size:11.5px; line-height:1.45; color:#C9CED6; margin:2px 0 10px; }
  .gpe-light-file > div{ padding:4px 6px; border:1px solid #262b35; border-radius:5px; }
  .gpe-light-file b{ color:#EDEDED; font-weight:600; }
  .gpe-dmx-rows{ display:grid; gap:4px; margin-bottom:8px; max-height:340px; overflow-y:auto; }
  .gpe-dmx-row{ display:flex; gap:6px; align-items:center; }
  .gpe-dmx-ch{ width:22px; text-align:right; font:11px var(--mono); color:#5B6472; flex:none; }
  .gpe-dmx-row select{ flex:1 1 0; width:0; min-width:0; background:#0e1116; border:1px solid #262b35; color:#EDEDED; border-radius:5px; padding:4px 6px; font-size:12px; font-family:inherit; }
  .gpe-dmx-row button{ background:none; border:1px solid #262b35; color:#8A93A3; border-radius:4px; width:24px; height:24px; cursor:pointer; flex:none; }
  .gpe-dmx-row button:hover{ color:#EDEDED; border-color:#3a4150; }
  .scene3d-topline .scene3d-clear-btn.tb-tool{ display:inline-flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; height:50px; padding:3px 9px; flex-shrink:0; font-size:10.5px; line-height:1.1; white-space:nowrap; }
  .scene3d-topline .tb-tool .tb-ico{ width:28px; height:28px; display:block; flex:none; }
  .scene3d-topline .scene3d-clear-btn.tb-tool:disabled{ opacity:.38; cursor:default; }
  .scene3d-topline .scene3d-clear-btn.tb-tool:disabled:hover{ color:#8A93A3; border-color:#262b35; }
  .scene3d-topline label.tb-tool-check{ display:inline-flex; flex-direction:column; align-items:center; justify-content:center; gap:1px; height:50px; padding:3px 9px; border:1px solid #262b35; border-radius:6px; font-size:10.5px; line-height:1.1; color:#8A93A3; cursor:pointer; flex-shrink:0; white-space:nowrap; }
  .scene3d-topline label.tb-tool-check:hover{ color:#EDEDED; border-color:#3a4150; }
  .scene3d-topline label.tb-tool-check .tb-ico{ width:28px; height:28px; display:block; flex:none; }
  .scene3d-topline label.tb-tool-check span{ display:inline-flex; align-items:center; gap:3px; }
  .scene3d-topline label.tb-tool-check input{ margin:0; width:11px; height:11px; accent-color:#2FD9C4; }
  .tb-tool-inline{ display:inline-flex !important; align-items:center; gap:6px; }
  .tb-tool-inline .tb-ico{ width:20px; height:20px; flex:none; }

  /* Onglets Structure 3D / Profil de l'atelier (2026-09-12) : curseur glissant.
     Deux colonnes égales, le fond teal (.tb-seg-thumb) glisse de l'une à
     l'autre ; le curseur est conservé d'un rendu de la barre à l'autre
     (mountToplineKeepingSeg dans truss-builder.js). */
  .scene3d-topline .tb-seg{ position:relative; display:grid; grid-template-columns:1fr 1fr; padding:2px; border:1px solid #262b35; border-radius:9px; background:#0e1116; flex-shrink:0; }
  .scene3d-topline .tb-seg-thumb{ position:absolute; top:2px; bottom:2px; left:2px; width:calc(50% - 2px); border-radius:7px; background:#1a2a2c; box-shadow:inset 0 0 0 1px rgba(47,217,196,.5), 0 1px 6px rgba(0,0,0,.45); transition:transform .28s cubic-bezier(.32,.72,.24,1); pointer-events:none; }
  .scene3d-topline .tb-seg.is-profil .tb-seg-thumb{ transform:translateX(100%); }
  .scene3d-topline .tb-seg .scene3d-clear-btn.tb-tool, .scene3d-topline .tb-seg .scene3d-clear-btn.tb-tool:hover{ position:relative; z-index:1; height:46px; border-color:transparent; background:none; transition:color .2s; }
  .scene3d-topline .tb-seg:not(.is-profil) #tb-tab-3d-btn, .scene3d-topline .tb-seg.is-profil #tb-profile-btn{ color:#2FD9C4; }
  @media (prefers-reduced-motion: reduce){ .scene3d-topline .tb-seg-thumb{ transition:none; } }

  /* ===================== RAPPORT — ÉDITEUR DE PAGES (2026-09-19) =====================
     Refonte « rapport vivant » (report-editor.js / report-pages.js). Palette
     sombre FIXE des modules plein écran (comme Scène 3D, Texte, Tableau) ;
     les pages restent blanches. Les pages sont dessinées à 96 dpi et
     simplement mises à l'échelle par transform (voir sizeSlot()). */
  #view-report-editor.show{ display:flex; flex-direction:column; position:fixed; inset:0; z-index:400; max-width:none; margin:0; background:#0e1116; color:#EDEDED; }
  #report-editor-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  .rp-ed-top-spacer{ flex:1; }
  .rp-ed-topline .elec-project-name{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; flex-shrink:1; }
  .rp-ed-icon-btn{ display:inline-flex; align-items:center; justify-content:center; padding:5px 8px !important; }
  .rp-ed-icon-btn:disabled{ opacity:.35; cursor:default; }
  .rp-ed-zoom{ display:flex; align-items:center; gap:6px; flex-shrink:0; }
  .rp-ed-zoom span{ font-family:var(--mono); font-size:11.5px; color:#8A93A3; min-width:40px; text-align:center; }
  .rp-ed-pdf-btn{ flex-shrink:0; padding:6px 14px; font-size:12.5px; }
  .rp-ed-title-input{ max-width:320px; height:28px; padding:2px 8px; background:#0e1116; color:#EDEDED; border-color:#3a4150; }
  .rp-ed-body{ flex:1; min-height:0; display:grid; grid-template-columns:220px minmax(0,1fr) 320px; }
  .rp-ed-pages, .rp-ed-side{ background:#14171d; overflow-y:auto; min-height:0; }
  .rp-ed-pages{ border-right:1px solid #262b35; padding:12px 10px; }
  .rp-ed-side{ border-left:1px solid #262b35; display:flex; flex-direction:column; }
  .rp-ed-panel-head{ font-family:var(--mono); font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:#8A93A3; margin:0 0 8px; }
  .rp-ed-newpage{ display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:12px; }
  .rp-ed-newpage .rp-ed-select{ grid-column:1 / -1; }
  .rp-ed-btn{ background:#1c2029; border:1px solid #2c3240; color:#C9CFD8; border-radius:6px; padding:6px 10px; font-size:12px; font-family:var(--font-body); cursor:pointer; }
  .rp-ed-btn:hover{ color:#fff; border-color:#3f4758; }
  .rp-ed-btn.danger:hover{ color:#ff8a8a; border-color:#6b2b2b; }
  .rp-ed-select, .rp-ed-input{ width:100%; box-sizing:border-box; background:#0e1116; border:1px solid #2c3240; color:#EDEDED; border-radius:6px; padding:6px 8px; font-size:12.5px; font-family:var(--font-body); }
  .rp-ed-textarea{ resize:vertical; min-height:70px; line-height:1.4; }
  .rp-ed-pagelist{ display:flex; flex-direction:column; gap:8px; }
  .rp-ed-pagecard{ display:grid; grid-template-columns:54px 1fr; grid-template-rows:auto auto; gap:4px 8px; padding:8px; border:1px solid #262b35; border-radius:8px; background:#171b22; cursor:pointer; }
  .rp-ed-pagecard:hover{ border-color:#3a4150; }
  .rp-ed-pagecard.selected{ border-color:#2FD9C4; box-shadow:0 0 0 1px rgba(47,217,196,.35); }
  .rp-ed-thumb{ grid-row:1 / span 2; position:relative; background:#fff; border-radius:2px; align-self:start; overflow:hidden; }
  .rp-ed-thumb.portrait{ width:40px; height:57px; margin-left:7px; }
  .rp-ed-thumb.landscape{ width:54px; height:38px; margin-top:9px; }
  .rp-ed-thumb i{ position:absolute; opacity:.55; border-radius:1px; }
  .rp-ed-pagemeta{ display:flex; flex-direction:column; min-width:0; }
  .rp-ed-pagemeta b{ font-size:12.5px; color:#EDEDED; }
  .rp-ed-pagemeta span{ font-size:10.5px; color:#8A93A3; line-height:1.35; }
  .rp-ed-pagebtns{ display:flex; gap:3px; flex-wrap:wrap; }
  .rp-ed-pagebtns button{ background:none; border:1px solid #2c3240; color:#8A93A3; border-radius:5px; width:24px; height:22px; padding:0; font-size:11px; cursor:pointer; }
  .rp-ed-pagebtns button:hover:not(:disabled){ color:#fff; border-color:#4a5264; }
  .rp-ed-pagebtns button:disabled{ opacity:.3; cursor:default; }
  .rp-ed-canvas{ overflow:auto; min-height:0; position:relative; background:#0b0d11; }
  .rp-ed-stack{ display:flex; flex-direction:column; align-items:center; gap:26px; padding:24px 28px 80px; min-width:min-content; }
  .rp-ed-stack-building{ position:absolute; left:0; top:0; width:100%; box-sizing:border-box; visibility:hidden; pointer-events:none; }
  .rp-ed-slot-label{ font-family:var(--mono); font-size:11px; color:#8A93A3; margin:0 0 6px 2px; }
  .rp-ed-slot.selected .rp-ed-slot-label{ color:#2FD9C4; }
  .rp-ed-slot-page{ position:relative; box-shadow:0 6px 24px rgba(0,0,0,.55); background:#fff; }
  .rp-ed-slot.selected .rp-ed-slot-page{ box-shadow:0 0 0 2px rgba(47,217,196,.55), 0 6px 24px rgba(0,0,0,.55); }
  .rp-ed-slot-page > .rp-page{ position:absolute; left:0; top:0; transform-origin:0 0; }
  .rp-ed-slot.virtual .rp-ed-slot-page::after{ content:""; position:absolute; inset:0; background:repeating-linear-gradient(135deg, rgba(14,17,22,.05) 0 10px, transparent 10px 20px); pointer-events:none; }
  .rp-ed-slot:not(.virtual) .rp-frame{ cursor:move; }
  .rp-ed-slot:not(.virtual) .rp-frame:hover{ outline:calc(1px * var(--rp-inv-zoom, 1)) dashed rgba(47,140,200,.7); }
  .rp-ed-slot .rp-frame.rp-overflowing::after{ content:attr(data-overflow-label); position:absolute; right:0; bottom:0; background:#2FD9C4; color:#0e1116; font:600 calc(10px * var(--rp-inv-zoom, 1))/1.4 var(--mono); padding:calc(1px * var(--rp-inv-zoom, 1)) calc(6px * var(--rp-inv-zoom, 1)); border-radius:calc(4px * var(--rp-inv-zoom, 1)) 0 0 0; pointer-events:none; }
  .rp-ed-slot .rp-frame.rp-cadrage{ cursor:grab; }
  .rp-sel{ position:absolute; pointer-events:none; outline:calc(2px * var(--rp-inv-zoom, 1)) solid #2FD9C4; z-index:5; }
  .rp-sel.cadrage{ outline-color:#f59e0b; outline-style:dashed; }
  .rp-sel-h{ position:absolute; width:calc(10px * var(--rp-inv-zoom, 1)); height:calc(10px * var(--rp-inv-zoom, 1)); background:#fff; border:calc(1.5px * var(--rp-inv-zoom, 1)) solid #1a9d8d; border-radius:2px; transform:translate(-50%,-50%); pointer-events:auto; z-index:6; box-sizing:border-box; }
  .rp-sel-h-nw{ left:0; top:0; cursor:nwse-resize; }
  .rp-sel-h-n{ left:50%; top:0; cursor:ns-resize; }
  .rp-sel-h-ne{ left:100%; top:0; cursor:nesw-resize; }
  .rp-sel-h-e{ left:100%; top:50%; cursor:ew-resize; }
  .rp-sel-h-se{ left:100%; top:100%; cursor:nwse-resize; }
  .rp-sel-h-s{ left:50%; top:100%; cursor:ns-resize; }
  .rp-sel-h-sw{ left:0; top:100%; cursor:nesw-resize; }
  /* ===== Rapport — annotations (report-annot.js, 2026-10-03) : cadre
     `annot` posé au-dessus des autres. Seul le TRACÉ capte le clic (la
     boîte d'une flèche en diagonale ne doit pas masquer le plan dessous). ===== */
  .rp-frame.rp-frame-annot{ overflow:visible; pointer-events:none; isolation:auto; }
  .rp-frame.rp-frame-annot .rp-frame-content{ overflow:visible; }
  .rp-annot{ position:absolute; inset:0; overflow:visible; }
  .rp-annot-svg{ position:absolute; left:0; top:0; overflow:visible; }
  .rp-annot-text{ position:absolute; inset:0; overflow:hidden; box-sizing:border-box; font-family:var(--font-body); line-height:1.3; overflow-wrap:anywhere; }
  .rp-annot-text.marker{ display:flex; align-items:center; justify-content:center; font-weight:700; line-height:1; padding:0; }
  .rp-ed-slot:not(.virtual) .rp-frame-annot .rp-annot-hit{ pointer-events:stroke; cursor:move; }
  .rp-ed-slot:not(.virtual) .rp-frame-annot .rp-annot-shape.filled, .rp-ed-slot:not(.virtual) .rp-frame-annot .rp-annot-text{ pointer-events:auto; cursor:move; }
  .rp-ed-slot:not(.virtual) .rp-frame-annot:hover{ outline:none; }
  .rp-annot-preview{ opacity:.85; z-index:20; }
  #rp-ed-canvas.annotating .rp-ed-slot:not(.virtual) .rp-page, #rp-ed-canvas.annotating .rp-ed-slot:not(.virtual) .rp-page *{ cursor:crosshair !important; }
  #rp-ed-canvas.annotating .rp-ed-slot:not(.virtual) .rp-page{ touch-action:none; } /* au doigt : on dessine, la page ne défile pas */
  .rp-sel.pointy{ outline:calc(1px * var(--rp-inv-zoom, 1)) dashed rgba(47,217,196,.55); }
  .rp-sel-h.rp-sel-pt{ width:calc(13px * var(--rp-inv-zoom, 1)); height:calc(13px * var(--rp-inv-zoom, 1)); border-radius:50%; background:#2FD9C4; border-color:#ffffff; cursor:move; }
  .rp-ed-annot-btn{ display:inline-flex !important; align-items:center; gap:6px; flex-shrink:0; }
  .rp-ed-annot-btn.active{ color:#2FD9C4 !important; border-color:#2FD9C4 !important; }
  .rp-ed-annot-tools{ display:grid; grid-template-columns:repeat(4, 1fr); gap:5px; }
  .rp-ed-annot-tool{ display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 2px 6px; background:#171b22; border:1px solid #262b35; border-radius:8px; color:#C9CFD8; font:500 10.5px/1.15 var(--font-body); cursor:pointer; text-align:center; }
  .rp-ed-annot-tool:hover{ border-color:#3f4758; color:#fff; }
  .rp-ed-annot-tool.active{ border-color:#2FD9C4; background:#1a2a2c; color:#2FD9C4; box-shadow:0 0 0 1px rgba(47,217,196,.35); }
  .rp-ed-annot-colors{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
  .rp-ed-swatch{ width:22px; height:22px; border-radius:50%; border:1px solid rgba(255,255,255,.25); cursor:pointer; padding:0; }
  .rp-ed-swatch.active{ box-shadow:0 0 0 2px #14171d, 0 0 0 4px #2FD9C4; }
  .rp-ed-annot-colors input[type=color]{ width:30px; height:24px; padding:0; border:1px solid #2c3240; background:#0e1116; border-radius:6px; cursor:pointer; }
  .rp-ed-annot-kind{ font-size:12px; color:#9fe9df; }
  .rp-sel-h-w{ left:0; top:50%; cursor:ew-resize; }
  .rp-guide{ position:absolute; background:#e2368f; z-index:7; pointer-events:none; }
  .rp-guide.v{ top:0; width:calc(1px * var(--rp-inv-zoom, 1)); }
  .rp-guide.h{ left:0; height:calc(1px * var(--rp-inv-zoom, 1)); }
  .rp-ed-tabs{ display:flex; border-bottom:1px solid #262b35; flex-shrink:0; }
  .rp-ed-tab{ flex:1; background:none; border:none; border-bottom:2px solid transparent; color:#8A93A3; padding:10px; font-size:12.5px; font-family:var(--font-body); cursor:pointer; }
  .rp-ed-tab.active{ color:#EDEDED; border-bottom-color:#2FD9C4; }
  .rp-ed-side-body{ padding:12px; display:flex; flex-direction:column; gap:8px; overflow-y:auto; }
  .rp-ed-label{ font-family:var(--mono); font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; color:#8A93A3; margin-top:6px; }
  .rp-ed-hint{ font-size:11.5px; color:#8A93A3; line-height:1.45; }
  .rp-ed-hint.accent{ color:#9fe9df; }
  .rp-ed-hint.warn{ color:#f5b25b; }
  .rp-ed-muted{ font-size:11.5px; color:#5d6574; }
  .rp-ed-doclist{ display:flex; flex-direction:column; gap:6px; }
  .rp-ed-docrow{ border:1px solid #262b35; border-radius:8px; padding:8px; background:#171b22; display:flex; flex-direction:column; gap:3px; }
  .rp-ed-docname{ font-size:12.5px; color:#EDEDED; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .rp-ed-dockind{ font-size:10.5px; color:#8A93A3; }
  .rp-ed-chips{ display:flex; gap:5px; flex-wrap:wrap; margin-top:3px; }
  .rp-ed-chip{ background:#1c2029; border:1px solid #2c3240; color:#C9CFD8; border-radius:999px; padding:4px 10px; font-size:11.5px; font-family:var(--font-body); cursor:pointer; }
  .rp-ed-chip:hover{ border-color:#2FD9C4; color:#fff; }
  .rp-ed-frame-title{ font-size:14px; font-weight:600; color:#EDEDED; display:flex; align-items:center; gap:8px; }
  .rp-ed-badge{ font-family:var(--mono); font-size:9.5px; text-transform:uppercase; letter-spacing:.05em; color:#0e1116; background:#2FD9C4; border-radius:999px; padding:1px 7px; }
  .rp-ed-source{ display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; font-size:12px; color:#C9CFD8; }
  .rp-ed-source em{ font-style:normal; color:#8A93A3; font-size:11px; }
  .rp-ed-link{ background:none; border:none; color:#2FD9C4; font-size:11.5px; padding:0; cursor:pointer; text-decoration:underline; }
  .rp-ed-geom{ display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; }
  .rp-ed-num{ display:flex; flex-direction:column; gap:2px; font-family:var(--mono); font-size:10px; color:#8A93A3; }
  .rp-ed-num input{ width:100%; box-sizing:border-box; background:#0e1116; border:1px solid #2c3240; color:#EDEDED; border-radius:5px; padding:5px 4px; font-size:12px; font-family:var(--mono); }
  .rp-ed-seg{ display:flex; border:1px solid #2c3240; border-radius:7px; overflow:hidden; }
  .rp-ed-seg button{ flex:1; background:#171b22; border:none; border-right:1px solid #2c3240; color:#8A93A3; padding:7px 6px; font-size:11.5px; font-family:var(--font-body); cursor:pointer; }
  .rp-ed-seg button:last-child{ border-right:none; }
  .rp-ed-seg button.active{ background:#1a2a2c; color:#2FD9C4; }
  .rp-ed-seg.small button{ padding:5px 4px; font-size:11px; }
  .rp-ed-checklist{ display:flex; flex-direction:column; gap:4px; }
  .rp-ed-check{ display:flex; align-items:center; gap:7px; font-size:12px; color:#C9CFD8; cursor:pointer; }
  .rp-ed-dot{ width:10px; height:10px; border-radius:50%; flex-shrink:0; }
  /* groupes d'un cadre Vue (☀ mettre en évidence, œil masquer — report-editor.js) */
  .rp-ed-groups{ display:flex; flex-direction:column; gap:1px; margin-bottom:6px; }
  .rp-ed-group{ display:flex; align-items:center; gap:7px; padding:3px 4px; border-radius:6px; font-size:12px; color:#C9CFD8; }
  .rp-ed-group:hover{ background: rgba(255,255,255,0.04); }
  .rp-ed-group-name{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .rp-ed-group.is-hidden .rp-ed-group-name, .rp-ed-group.is-hidden .rp-ed-dot{ opacity:.45; }
  .rp-ed-dstables{ display:flex; flex-direction:column; gap:5px; }
  .rp-ed-dstable{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  .rp-ed-dstable .rp-ed-check{ flex:1; min-width:110px; }
  .rp-ed-mini{ display:inline-flex; align-items:center; gap:4px; font-size:11px; color:#8A93A3; }
  .rp-ed-mini.block{ display:flex; flex-direction:column; align-items:stretch; }
  .rp-ed-mini input[type=number]{ width:48px; background:#0e1116; border:1px solid #2c3240; color:#EDEDED; border-radius:5px; padding:3px 4px; font-size:11.5px; }
  .rp-ed-row2{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .rp-ed-row2 .rp-ed-mini{ flex-direction:column; align-items:stretch; }
  .rp-ed-tokens{ display:flex; flex-wrap:wrap; gap:4px; }
  .rp-ed-token{ background:#1c2029; border:1px solid #2c3240; color:#9fe9df; border-radius:5px; padding:2px 6px; font-family:var(--mono); font-size:10.5px; cursor:pointer; }
  .rp-ed-actions{ display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:8px; }

  /* Page A4 et cadres (communs à l'éditeur, au lien partagé et au PDF). */
  .rp-page{ position:relative; background:#fff; color:#111; overflow:hidden; font-family:var(--font-body); }
  /* Une page de rapport est un document imprimable : toujours le thème CLAIR,
     quel que soit le thème (ou l'apparence personnalisée) de la personne qui
     l'affiche — mêmes valeurs que :root[data-theme="light"] plus haut. */
  .rp-page{ --bg:#F4F5F7; --surface:#FFFFFF; --surface-2:#F0F1F4; --surface-3:#E7E9ED; --border:#DCDFE4; --text:#1B2029; --text-dim:#5B6472; --text-faint:#93A0AF; --teal:#0E9C89; --amber:#B8720F; --red:#C93B44; --on-accent:#FFFFFF; --grid-line:rgba(0,0,0,0.035); }
  .rp-frame{ position:absolute; box-sizing:border-box; overflow:hidden; isolation:isolate; } /* isolation : les z-index internes (armoires...) ne passent jamais devant un cadre posé au-dessus */
  .rp-frame-content{ position:absolute; inset:0; pointer-events:none; }
  .rp-view-layer{ width:100%; height:100%; background:#fff; }
  .rp-view-layer .elec-layout, .rp-view-layer .elec-pane-wrap, .rp-view-layer .elec-pane-body{ height:100%; }
  .rp-view-layer .elec-canvas{ min-height:0; cursor:default; background:#fff; }
  .rp-flow-clip{ position:relative; overflow:hidden; }
  .rp-flow-layer{ transform-origin:0 0; background:transparent; }
  .rp-img-clip{ position:absolute; inset:0; overflow:hidden; }
  .rp-text{ position:absolute; inset:0; display:flex; flex-direction:column; overflow:hidden; line-height:1.25; overflow-wrap:anywhere; padding:0 1px; }
  .rp-legend{ display:inline-block; transform-origin:0 0; background:#fff; border:1px solid #d6d9de; border-radius:6px; padding:6px 10px; font-size:11px; color:#222; white-space:nowrap; }
  .rp-legend-title{ font-weight:700; font-size:11px; margin-bottom:4px; color:#111; }
  .rp-legend-row{ display:flex; align-items:center; gap:6px; line-height:1.6; }
  .rp-legend-dot{ width:9px; height:9px; border-radius:50%; flex-shrink:0; }
  .rp-missing, .rp-placeholder{ position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:4px; font-family:var(--font-body); font-size:13px; color:#7a8290; background:repeating-linear-gradient(135deg, #f6f7f9 0 12px, #eef0f3 12px 24px); border:1.5px dashed #b8bec8; box-sizing:border-box; padding:8px; }
  /* ===== Rapport — modèles de page à cartouche (report-templates.js,
     2026-10-03) : overlay figé sous les cadres, zones en surbrillance. ===== */
  .rp-tpl{ position:absolute; inset:0; pointer-events:none; }
  .rp-tpl-box{ position:absolute; box-sizing:border-box; }
  .rp-tpl-text{ position:absolute; display:flex; flex-direction:column; overflow:hidden; line-height:1.2; font-family:var(--font-body); overflow-wrap:anywhere; box-sizing:border-box; }
  .rp-tpl-logo{ position:absolute; display:flex; align-items:center; justify-content:center; box-sizing:border-box; }
  .rp-tpl-logo img{ max-width:100%; max-height:100%; object-fit:contain; }
  .rp-tpl-logo.empty{ border:1.5px dashed #e57373; color:#e57373; font:600 8pt var(--mono); background:rgba(229,115,115,.06); }
  .rp-tpl-north{ position:absolute; }
  .rp-tpl-scale{ position:absolute; display:flex; flex-direction:column; justify-content:center; gap:0.8mm; box-sizing:border-box; }
  .rp-tpl-scale-bar{ display:flex; height:1.6mm; padding-left:0.25mm; }
  .rp-tpl-scale-bar i{ display:block; box-sizing:border-box; }
  .rp-tpl-scale-label{ font:600 6pt/1 var(--font-body); text-align:center; white-space:nowrap; }
  /* ===== Design — éditeur de modèles de page (design.js, 2026-10-03) ===== */
  #view-design-workspace.show{ display:flex; flex-direction:column; position:fixed; inset:0; z-index:400; max-width:none; margin:0; background:#0e1116; color:#EDEDED; }
  #design-container{ display:flex; flex-direction:column; flex:1; min-height:0; }
  .dz-brand{ font-family:var(--mono); font-size:11px; letter-spacing:.14em; color:#2FD9C4; font-weight:700; flex-shrink:0; }
  .dz-dirty{ color:#f4b740; font-size:12px; flex-shrink:0; }
  .dz-menu{ right:0; left:auto; }
  .dz-tools{ gap:2px; }
  .dz-tool{ display:inline-flex; flex-direction:column; align-items:center; gap:2px; min-width:58px; padding:5px 6px; background:none; border:1px solid transparent; border-radius:7px; color:#C9CFD8; cursor:pointer; font-size:10.5px; font-family:var(--font-body); flex-shrink:0; }
  .dz-tool:hover{ background:#1c2029; }
  .dz-tool.on{ background:rgba(47,217,196,.12); border-color:#2FD9C4; color:#2FD9C4; }
  .dz-tools-spacer{ flex:1; }
  .dz-top-actions{ display:flex; align-items:center; gap:8px; }
  .dz-mobtabs{ display:none; }
  .dz-side{ overflow-y:auto; }
  .dz-side .rp-ed-side-body > *{ flex-shrink:0; }
  .dz-canvas, .dz-ruler{ touch-action:none; }
  @media (pointer: coarse){
    .dz-h{ width:calc(18px * var(--dz-inv, 1)); height:calc(18px * var(--dz-inv, 1)); border-radius:50%; }
    .dz-uguide.v{ width:calc(16px * var(--dz-inv, 1)); margin-left:calc(-8px * var(--dz-inv, 1)); }
    .dz-uguide.h{ height:calc(16px * var(--dz-inv, 1)); margin-top:calc(-8px * var(--dz-inv, 1)); }
  }
  .dz-preview{ display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#C9CFD8; padding:0 8px; white-space:nowrap; cursor:pointer; }
  .dz-body{ flex:1; min-height:0; display:grid; grid-template-columns:220px minmax(0,1fr) 320px; }
  .dz-layers{ background:#14171d; border-right:1px solid #262b35; padding:12px 10px; overflow-y:auto; min-height:0; }
  .dz-layer-list{ display:flex; flex-direction:column; gap:2px; }
  .dz-layer{ display:flex; align-items:center; gap:7px; width:100%; text-align:left; background:none; border:1px solid transparent; border-radius:6px; color:#C9CFD8; padding:5px 7px; font-size:12px; font-family:var(--font-body); cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .dz-layer:hover{ background:#1c2029; }
  .dz-layer.on{ background:rgba(47,217,196,.12); border-color:#2FD9C4; color:#fff; }
  .dz-layer em{ margin-left:auto; font-style:normal; font-family:var(--mono); font-size:10px; color:#8A93A3; }
  .dz-layer.zone{ color:#9fe9df; }
  .dz-layer-ico{ width:10px; height:10px; border:1.5px solid currentColor; border-radius:2px; flex-shrink:0; opacity:.7; }
  .dz-layer-ico.z{ border-style:dashed; border-color:#2FD9C4; }
  .dz-layer-ico.text{ border:none; border-bottom:2px solid currentColor; border-radius:0; }
  .dz-layer-ico.ellipse{ border-radius:50%; }
  .dz-layer-ico.hline{ border:none; border-top:2px solid currentColor; border-radius:0; height:0; }
  .dz-layer-ico.vline{ border:none; border-left:2px solid currentColor; border-radius:0; width:0; }
  .dz-canvas{ overflow:auto; min-height:0; position:relative; background:#0b0d11; display:flex; padding:30px; box-sizing:border-box; }
  .dz-canvas.drawing .dz-page{ cursor:crosshair; }
  .dz-stage{ display:grid; grid-template-columns:22px minmax(0,1fr); grid-template-rows:22px minmax(0,1fr); min-height:0; min-width:0; }
  .dz-stage .dz-canvas{ grid-column:2; grid-row:2; }
  .dz-ruler{ display:block; width:100%; height:100%; cursor:copy; touch-action:none; }
  .dz-ruler-x{ grid-column:2; grid-row:1; border-bottom:1px solid #262b35; cursor:row-resize; }
  .dz-ruler-y{ grid-column:1; grid-row:2; border-right:1px solid #262b35; cursor:col-resize; }
  .dz-ruler-corner{ grid-column:1; grid-row:1; background:#12151b; border:none; border-right:1px solid #262b35; border-bottom:1px solid #262b35; color:#5b6474; font:700 11px var(--mono); cursor:pointer; padding:0; }
  .dz-ruler-corner.on{ color:#2FD9C4; }
  .dz-fguides{ position:absolute; inset:0; pointer-events:none; }
  .dz-fguide{ position:absolute; pointer-events:none; }
  .dz-fguide.v{ top:0; bottom:0; width:0; border-left:calc(1px * var(--dz-inv, 1)) dashed rgba(14,156,137,.45); }
  .dz-fguide.h{ left:0; right:0; height:0; border-top:calc(1px * var(--dz-inv, 1)) dashed rgba(14,156,137,.45); }
  .dz-fguide.third{ border-color:rgba(124,92,255,.42); }
  .dz-fguide.quarter{ border-color:rgba(214,140,20,.38); }
  .dz-fguide span{ position:absolute; font:700 calc(10px * var(--dz-inv, 1))/1 var(--mono); color:#0e9c89; background:rgba(255,255,255,.85); padding:calc(1px * var(--dz-inv, 1)) calc(3px * var(--dz-inv, 1)); border-radius:calc(3px * var(--dz-inv, 1)); }
  .dz-fguide.third span{ color:#6d4fe0; }
  .dz-fguide.quarter span{ color:#b26f00; }
  .dz-fguide.v span{ top:calc(2px * var(--dz-inv, 1)); left:calc(3px * var(--dz-inv, 1)); }
  .dz-fguide.h span{ left:calc(2px * var(--dz-inv, 1)); top:calc(2px * var(--dz-inv, 1)); }
  .dz-uguide{ position:absolute; pointer-events:auto; z-index:2; }
  .dz-uguide.v{ top:0; bottom:0; width:calc(7px * var(--dz-inv, 1)); margin-left:calc(-3.5px * var(--dz-inv, 1)); cursor:col-resize; background:linear-gradient(90deg, transparent calc(50% - 0.5px * var(--dz-inv, 1)), #0ea5e9 calc(50% - 0.5px * var(--dz-inv, 1)), #0ea5e9 calc(50% + 0.5px * var(--dz-inv, 1)), transparent calc(50% + 0.5px * var(--dz-inv, 1))); }
  .dz-uguide.h{ left:0; right:0; height:calc(7px * var(--dz-inv, 1)); margin-top:calc(-3.5px * var(--dz-inv, 1)); cursor:row-resize; background:linear-gradient(180deg, transparent calc(50% - 0.5px * var(--dz-inv, 1)), #0ea5e9 calc(50% - 0.5px * var(--dz-inv, 1)), #0ea5e9 calc(50% + 0.5px * var(--dz-inv, 1)), transparent calc(50% + 0.5px * var(--dz-inv, 1))); }
  .dz-uguide.temp{ pointer-events:none; opacity:.8; }
  .dz-canvas.drawing .dz-uguide{ pointer-events:none; }
  .dz-snapline{ position:absolute; pointer-events:none; z-index:3; }
  .dz-snapline.v{ top:0; bottom:0; border-left:calc(1px * var(--dz-inv, 1)) solid #ff3d8b; }
  .dz-snapline.h{ left:0; right:0; border-top:calc(1px * var(--dz-inv, 1)) solid #ff3d8b; }
  .dz-zoomer{ margin:auto; position:relative; flex-shrink:0; }
  .dz-page{ position:absolute; left:0; top:0; transform-origin:0 0; background:#fff; color:#1f2933; box-shadow:0 6px 30px rgba(0,0,0,.6); overflow:hidden; user-select:none; }
  .dz-margin{ position:absolute; inset:7mm; border:1px dashed rgba(47,217,196,.25); pointer-events:none; }
  .dz-zones, .dz-hits{ position:absolute; inset:0; pointer-events:none; }
  .dz-zone{ position:absolute; box-sizing:border-box; border:calc(1.5px * var(--dz-inv, 1)) dashed #0e9c89; background:repeating-linear-gradient(135deg, rgba(14,156,137,.05) 0 12px, rgba(14,156,137,.11) 12px 24px); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; color:#0b7a6b; font:600 12px var(--font-body); text-align:center; padding:4px; overflow:hidden; }
  .dz-zone.notes{ border-color:#c48a12; color:#8a5d00; background:repeating-linear-gradient(135deg, rgba(244,183,64,.06) 0 12px, rgba(244,183,64,.13) 12px 24px); }
  .dz-zone em{ font-weight:400; font-size:11px; opacity:.8; }
  .dz-hit{ position:absolute; pointer-events:auto; cursor:move; }
  .dz-canvas.drawing .dz-hit{ pointer-events:none; }
  .dz-hit:hover{ outline:calc(1px * var(--dz-inv, 1)) solid rgba(47,217,196,.7); }
  .dz-sel{ position:absolute; outline:calc(1.5px * var(--dz-inv, 1)) solid #2FD9C4; pointer-events:none; }
  .dz-h{ position:absolute; width:calc(9px * var(--dz-inv, 1)); height:calc(9px * var(--dz-inv, 1)); background:#fff; border:calc(1.5px * var(--dz-inv, 1)) solid #0e9c89; box-sizing:border-box; pointer-events:auto; transform:translate(-50%, -50%); }
  .dz-h-nw{ left:0; top:0; cursor:nwse-resize; } .dz-h-n{ left:50%; top:0; cursor:ns-resize; } .dz-h-ne{ left:100%; top:0; cursor:nesw-resize; }
  .dz-h-e{ left:100%; top:50%; cursor:ew-resize; } .dz-h-se{ left:100%; top:100%; cursor:nwse-resize; } .dz-h-s{ left:50%; top:100%; cursor:ns-resize; }
  .dz-h-sw{ left:0; top:100%; cursor:nesw-resize; } .dz-h-w{ left:0; top:50%; cursor:ew-resize; }
  .dz-ghost{ position:absolute; outline:calc(1.5px * var(--dz-inv, 1)) dashed #0e9c89; background:rgba(47,217,196,.08); pointer-events:none; }
  .dz-colors{ display:flex; flex-wrap:wrap; gap:4px; align-items:center; }
  .dz-col{ background:#1c2029; border:1px solid #2c3240; color:#C9CFD8; border-radius:5px; padding:3px 8px; font-size:11.5px; cursor:pointer; font-family:var(--font-body); }
  .dz-col.on{ border-color:#2FD9C4; color:#2FD9C4; }
  .dz-colors input[type=color]{ width:28px; height:24px; padding:0; border:1px solid #2c3240; border-radius:5px; background:none; cursor:pointer; }
  .dz-colors input[type=color].on{ border-color:#2FD9C4; }
  .rp-ed-token.field{ color:#f4c76b; font-family:var(--font-body); }
  .dz-thumb{ position:relative; overflow:hidden; background:#fff; border-radius:3px; box-shadow:0 1px 4px rgba(0,0,0,.35); }
  .dz-thumb-page{ position:absolute; left:0; top:0; transform-origin:0 0; color:#1f2933; }
  .dz-thumb-zone{ position:absolute; background:rgba(14,156,137,.14); border:2px dashed #0e9c89; box-sizing:border-box; }
  .lib-pagetpl-thumb{ display:flex; justify-content:center; margin:8px 0 4px; min-height:60px; }
  .rp-ed-tplcards{ display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:8px; }
  @media (max-width: 900px){
    .dz-body{ display:flex; flex-direction:column; }
    .dz-stage{ flex:1; min-height:0; }
    .dz-canvas{ padding:12px; }
    .dz-layers, .dz-side{ order:3; height:38vh; max-height:none; flex-shrink:0; border-left:none; border-right:none; border-top:1px solid #262b35; }
    .dz-layers{ display:none; }
    .dz-body.show-layers .dz-layers{ display:block; }
    .dz-body.show-layers .dz-side{ display:none; }
    .dz-mobtabs{ display:flex; order:2; flex-shrink:0; background:#14171d; border-top:1px solid #262b35; }
    .dz-mobtabs button{ flex:1; background:none; border:none; border-bottom:2px solid transparent; color:#8A93A3; padding:9px 6px; font:600 12.5px var(--font-body); cursor:pointer; }
    .dz-mobtabs button.on{ color:#2FD9C4; border-bottom-color:#2FD9C4; }
    .dz-tools{ flex-wrap:nowrap; overflow-x:auto; }
    .dz-tools .dz-tools-spacer{ display:none; }
    .dz-tool{ min-width:52px; }
    .dz-topline{ flex-wrap:wrap; row-gap:6px; column-gap:8px; height:auto; padding:6px 10px; }
    .dz-topline .dz-brand, .dz-topline .rp-ed-top-spacer{ display:none; }
    .dz-topline .dz-name{ flex:1 1 120px; min-width:0; max-width:none; }
    .dz-top-actions{ order:5; flex-basis:100%; overflow-x:auto; scrollbar-width:none; padding-bottom:2px; }
    .dz-top-actions > *{ flex-shrink:0; }
  }
  .rp-mono .rp-frame-content{ filter:grayscale(1); }
  .rp-placeholder.zone{ color:#0b7a6b; background:repeating-linear-gradient(135deg, rgba(14,156,137,.05) 0 12px, rgba(14,156,137,.10) 12px 24px); border-color:#0e9c89; font-weight:600; }
  .rp-placeholder.zone span{ font-weight:400; color:#5f8f88; }
  .rp-sel.zone{ outline:calc(3px * var(--rp-inv-zoom, 1)) solid #2FD9C4; box-shadow:0 0 0 99999px rgba(11,13,17,.30); }
  .rp-sel-zone-tag{ position:absolute; left:calc(-3px * var(--rp-inv-zoom, 1)); bottom:100%; margin-bottom:calc(3px * var(--rp-inv-zoom, 1)); background:#2FD9C4; color:#08201d; font:700 calc(10.5px * var(--rp-inv-zoom, 1))/1.4 var(--mono); padding:calc(2px * var(--rp-inv-zoom, 1)) calc(8px * var(--rp-inv-zoom, 1)); border-radius:calc(4px * var(--rp-inv-zoom, 1)) calc(4px * var(--rp-inv-zoom, 1)) 0 0; white-space:nowrap; text-transform:uppercase; letter-spacing:.04em; }
  .rp-ed-zonebar{ display:flex; flex-wrap:wrap; align-items:center; gap:5px; padding-bottom:10px; border-bottom:1px solid #262b35; margin-bottom:4px; }
  .rp-ed-zonebar-label{ font-family:var(--mono); font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; color:#8A93A3; width:100%; }
  .rp-ed-chip.active{ border-color:#2FD9C4; color:#2FD9C4; background:#1a2a2c; }
  .rp-ed-banner{ display:flex; align-items:center; gap:12px; padding:9px 16px; background:#1d1a10; border-bottom:1px solid #5b4a1a; color:#E4D9B5; font-size:13px; flex-shrink:0; }
  .rp-ed-banner[hidden]{ display:none; }
  .rp-ed-banner span{ flex:1; min-width:0; }
  .rp-ed-banner-go{ height:30px; padding:0 14px; background:#FFD54A; border:none; border-radius:7px; color:#2a2006; font:600 12.5px var(--font-body); cursor:pointer; flex-shrink:0; }
  .rp-ed-banner-x{ background:none; border:none; color:#8A93A3; font-size:17px; cursor:pointer; }
  .rp-placeholder span{ font-size:11px; color:#9aa1ad; }
  .rp-missing{ color:#b45f06; border-color:#e0b98a; }
  .rp-pdf-stage{ position:fixed; left:-99999px; top:0; }
  .report-add-btn.primary{ color:#0e1116; background:#2FD9C4; border-color:#2FD9C4; }

  /* Lien partagé d'un rapport (rapport-shared-viewer.js). */
  .shared-rapport-bar{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:14px; font-size:12.5px; color:var(--text-dim); }
  .shared-rapport-pages .shared-rapport-page-wrap{ position:relative; display:block; background:#fff; box-shadow:0 4px 20px rgba(0,0,0,0.35); overflow:hidden; max-width:100%; }
  .shared-rapport-pages .shared-rapport-page-wrap > .rp-page{ position:absolute; left:0; top:0; }

  @media (max-width: 900px){
    .rp-ed-body{ display:flex; flex-direction:column; }
    .rp-ed-canvas{ flex:1; min-height:45vh; order:1; }
    .rp-ed-pages{ order:2; max-height:30vh; border-right:none; border-top:1px solid #262b35; }
    .rp-ed-side{ order:3; max-height:40vh; border-left:none; border-top:1px solid #262b35; }
    .rp-ed-zoom [data-rp-zoom="fit"]{ display:none; }
  }

  /* Rapport — en-tête / pied de page (report-pages.js renderHeaderFooter()). */
  .rp-hf{ position:absolute; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:4mm; color:#333; font-family:var(--font-body); line-height:1.2; box-sizing:border-box; }
  .rp-hf.line.rp-hf-header{ border-bottom:0.3mm solid #c9ced6; }
  .rp-hf.line.rp-hf-footer{ border-top:0.3mm solid #c9ced6; }
  .rp-hf-slot{ min-width:0; height:100%; display:flex; align-items:center; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
  .rp-hf-slot.center{ justify-content:center; text-align:center; }
  .rp-hf-slot.right{ justify-content:flex-end; text-align:right; }
  .rp-hf-slot img{ height:80%; width:auto; max-width:100%; object-fit:contain; }
  /* PDF « B2 » : le texte de ces zones est réécrit en vrai texte PDF — il est
     masqué le temps de rasteriser le fond de page (voir generateReportPdf()). */
  .rp-pdf-textless, .rp-pdf-textless *{ color:transparent !important; text-shadow:none !important; }
  /* repères de port Device Flow : leur fond blanc est redessiné en vectoriel avec le texte */
  .rp-pdf-textless .df-port-tag{ background:transparent !important; }
  /* Éditeur — onglet En-tête / pied. */
  .rp-ed-hfslot{ display:grid; grid-template-columns:62px 92px 1fr; gap:6px; align-items:center; }
  .rp-ed-hfslot > span{ font-size:11px; color:#8A93A3; }
  .rp-ed-section{ border:1px solid #262b35; border-radius:8px; padding:10px; display:flex; flex-direction:column; gap:7px; background:#171b22; }
  .rp-ed-logo-preview{ display:flex; align-items:center; gap:8px; }
  .rp-ed-logo-preview img{ max-height:32px; max-width:120px; background:#fff; border-radius:4px; padding:2px; }

  /* Rapport — visionneuse d'une version figée (onglet Versions de l'éditeur). */
  .rp-ed-vviewer{ position:absolute; inset:0; z-index:20; background:#0e1116; display:flex; flex-direction:column; }
  .rp-ed-vviewer-body{ flex:1; overflow:auto; padding:18px 24px 60px; color:#EDEDED; }
  .rp-ed-vviewer .shared-rapport-bar{ color:#8A93A3; }
  #report-editor-container{ position:relative; }

  /* Sélecteur de langue des écrans publics (accueil, connexion) — i18n.js. */
  .lang-switch{ position:absolute; top:14px; right:16px; z-index:20; display:flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; background:var(--surface); }
  .lang-switch button{ background:none; border:none; color:var(--text-dim); font-family:var(--mono); font-size:11.5px; padding:5px 10px; cursor:pointer; }
  .lang-switch button.active{ background:var(--surface-3); color:var(--text); }
  #screen-landing, #screen-login{ position:relative; }

  /* Page Partage (shares.js renderPartagePage, refaite le 2026-10-18) : chiffres clés,
     cartes projet aux documents alignés en colonnes, puces d'accès lisibles. */
  .shp{ max-width:1180px; }
  .shp-stats{ display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:12px; margin-bottom:22px; }
  .shp-stat{ background: var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px 16px; }
  .shp-stat-value{ font-family: var(--font-display); font-size:26px; font-weight:700; line-height:1; color: var(--text); }
  .shp-stat-label{ font-size:12.5px; color: var(--text-dim); margin-top:6px; }
  .shp-grid{ display:grid; grid-template-columns: minmax(0, 1fr) 330px; gap:20px; align-items:start; }
  .shp-h{ font-family: var(--font-display); font-size:15px; font-weight:600; color: var(--text); margin:0; }
  .shp-section-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
  .shp-seg{ display:inline-flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; background: var(--surface); }
  .shp-seg button{ background:none; border:0; color: var(--text-dim); font-family: var(--font-body); font-size:12.5px; padding:6px 12px; cursor:pointer; }
  .shp-seg button span{ color: var(--text-faint); margin-left:3px; }
  .shp-seg button.active{ background: var(--surface-3); color: var(--text); }
  .shp-projects{ display:flex; flex-direction:column; gap:12px; }
  .shp-project{ background: var(--surface); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
  .shp-project.is-shared{ border-left:3px solid var(--teal); }
  .shp-project-head{ display:flex; align-items:center; gap:12px; padding:14px 16px; }
  .shp-project-mark{ flex:0 0 auto; width:34px; height:34px; border-radius:8px; display:grid; place-items:center; background: var(--surface-3); color: var(--text); font-family: var(--font-display); font-weight:700; font-size:15px; }
  .shp-project-title{ flex:1 1 auto; min-width:0; }
  .shp-project-name{ font-family: var(--font-display); font-weight:600; font-size:15px; color: var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .shp-project-meta{ font-size:12px; color: var(--text-faint); margin-top:2px; }
  .shp-project-head .btn{ flex:0 0 auto; }
  .shp-rows{ border-top:1px solid var(--border); }
  .shp-row{ display:grid; grid-template-columns: 22px minmax(0, 1.15fr) minmax(0, 1fr) 92px; gap:12px; align-items:center; padding:9px 16px; border-top:1px solid var(--border); }
  .shp-row:first-child{ border-top:0; }
  .shp-row-project{ background: var(--surface-2); }
  .shp-row-icon{ color: var(--text-faint); display:grid; place-items:center; }
  .shp-row.is-shared .shp-row-icon{ color: var(--teal); }
  .shp-row-name{ font-size:13.5px; color: var(--text); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .shp-row-name small{ display:block; font-size:11.5px; color: var(--text-faint); margin-top:1px; }
  .shp-row-access{ display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
  .shp-row-action{ display:flex; justify-content:flex-end; }
  .shp-private{ font-size:12px; color: var(--text-faint); }
  .shp-chip{ display:inline-flex; align-items:center; gap:6px; max-width:100%; padding:2px 4px 2px 2px; border:1px solid var(--border); border-radius:999px; background: var(--surface-2); font-size:12px; color: var(--text); }
  .shp-chip-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .shp-chip-link{ padding:3px 9px; gap:5px; color: var(--amber); border-color: rgba(240,166,59,0.4); background: rgba(240,166,59,0.08); }
  .shp-avatar{ flex:0 0 auto; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; font-size:9.5px; font-weight:700; letter-spacing:.02em; color:#fff; background: hsl(var(--shp-hue, 200) 45% 42%); }
  .shp-pill{ display:inline-flex; align-items:center; gap:3px; padding:1px 7px; border-radius:999px; font-size:10.5px; font-weight:600; white-space:nowrap; }
  .shp-pill-edit{ color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, transparent); }
  .shp-pill-view{ color: var(--text-dim); background: var(--surface-3); }
  :root[data-theme="light"] .shp-pill-edit{ color: color-mix(in srgb, var(--teal) 70%, #000); background: color-mix(in srgb, var(--teal) 16%, transparent); }
  :root[data-theme="light"] .shp-chip-link, :root[data-theme="light"] .shp-link-icon{ color:#A8650A; }
  .shp-aside{ display:flex; flex-direction:column; gap:14px; }
  .shp-card{ background: var(--surface); border:1px solid var(--border); border-radius:12px; padding:14px 16px; }
  .shp-card-note{ font-size:12px; color: var(--text-faint); margin:4px 0 6px; }
  .shp-side-row{ display:flex; align-items:flex-start; gap:10px; padding:10px 0; border-top:1px solid var(--border); }
  .shp-card .shp-h + .shp-card-note + div > .shp-side-row:first-child, .shp-card .shp-h + div > .shp-side-row:first-child{ border-top:0; }
  .shp-side-row .shp-avatar{ width:30px; height:30px; font-size:11px; }
  .shp-side-text{ min-width:0; flex:1 1 auto; }
  .shp-side-name{ font-size:13.5px; color: var(--text); font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .shp-side-meta{ font-size:12px; color: var(--text-faint); margin-top:2px; }
  .shp-link-icon{ flex:0 0 auto; width:30px; height:30px; border-radius:8px; display:grid; place-items:center; color: var(--amber); background: rgba(240,166,59,0.1); }
  .shp-link-actions{ display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
  .shp-danger:hover{ color: var(--red); border-color: var(--red); }
  .shp-empty{ font-size:12.5px; color: var(--text-faint); padding:14px 0; }
  .shp-projects > .shp-empty{ background: var(--surface); border:1px dashed var(--border); border-radius:12px; padding:22px; text-align:center; }
  @media (max-width: 1100px){
    .shp-grid{ grid-template-columns: minmax(0, 1fr); }
    .shp-stats{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 900px){
    .shp-row{ grid-template-columns: 22px minmax(0, 1fr) auto; row-gap:6px; }
    .shp-row-access{ grid-column: 2 / 4; grid-row: 2; }
    .shp-row-action{ grid-column: 3; grid-row: 1; }
    .shp-row-project .shp-row-action{ display:none; }
    .shp-project-head{ flex-wrap:wrap; row-gap:10px; }
    .shp-project-title{ flex:1 1 calc(100% - 50px); }
    .shp-project-head .btn{ margin-left:46px; }
    .shp-stat-value{ font-size:22px; }
  }

/* Calcul des charges (Scène 3D, 2026-10-20) : panneau flottant sur la vue. */
.lc-panel{ position:absolute; top:10px; right:10px; width:400px; max-width:calc(100% - 20px); max-height:calc(100% - 20px); overflow:auto; z-index:30; background:rgba(17,20,26,.97); border:1px solid #2a313d; border-radius:10px; padding:10px 12px; color:#d8dde6; font-size:12.5px; box-shadow:0 8px 30px rgba(0,0,0,.45); }
.lc-head{ display:flex; align-items:baseline; gap:8px; margin-bottom:4px; }
.lc-head b{ font-size:14px; color:#fff; }
.lc-sub{ color:#ffc93c; font-size:11px; text-transform:uppercase; letter-spacing:.06em; }
.lc-x{ margin-left:auto; background:none; border:none; color:#8a93a3; font-size:18px; cursor:pointer; line-height:1; }
.lc-info{ color:#9aa3b2; margin-bottom:8px; }
.lc-grid{ display:grid; grid-template-columns:1fr 1fr; gap:6px 10px; margin-bottom:8px; }
.lc-field{ display:flex; flex-direction:column; gap:2px; color:#8a93a3; font-size:11px; }
.lc-field input, .lc-field select{ background:#0d1016; color:#e6e9ef; border:1px solid #2a313d; border-radius:5px; padding:4px 6px; font-size:12px; }
.lc-summary{ display:flex; align-items:baseline; gap:8px; padding:6px 8px; border-radius:6px; margin:6px 0; background:#0d1016; }
.lc-summary b{ font-size:18px; }
.lc-summary .lc-tot{ margin-left:auto; color:#9aa3b2; }
.lc-summary.ok b{ color:#3cd18a; } .lc-summary.mid b{ color:#ffc93c; } .lc-summary.ko b{ color:#ff5a5a; }
.lc-table{ width:100%; border-collapse:collapse; margin:6px 0; font-variant-numeric:tabular-nums; }
.lc-table th{ text-align:left; color:#8a93a3; font-weight:500; font-size:11px; border-bottom:1px solid #2a313d; padding:3px 4px; }
.lc-table td{ padding:3px 4px; border-bottom:1px solid #1d222b; }
.lc-table tr.ok td:last-child, .lc-table tr.ok td:nth-child(4){ color:#3cd18a; }
.lc-table tr.mid td:last-child, .lc-table tr.mid td:nth-child(4){ color:#ffc93c; }
.lc-table tr.ko td{ color:#ff8a8a; }
.lc-env{ color:#8a93a3; font-size:10.5px; }
.lc-check{ display:flex !important; flex-direction:row !important; align-items:center; gap:6px; grid-column:1 / -1; }
.lc-check input{ width:auto; }
.lc-tag{ font-size:10px; padding:0 4px; border:1px solid #4a5260; border-radius:3px; color:#c7cdd6; }
.lc-warn{ padding:5px 8px; border-radius:5px; margin:4px 0; border-left:3px solid #8a93a3; background:#0d1016; }
.lc-warn.err{ border-left-color:#ff5a5a; } .lc-warn.warn{ border-left-color:#ffc93c; } .lc-warn.info{ border-left-color:#5aa0ff; }
.lc-note{ color:#8a93a3; font-size:11px; }
.lc-details{ margin:6px 0; color:#9aa3b2; } .lc-details ul{ margin:4px 0 4px 16px; padding:0; }
.lc-disclaimer{ margin-top:8px; color:#8a93a3; font-size:11px; border-top:1px solid #2a313d; padding-top:6px; }
.lc-hint{ color:#ffc93c; font-size:11px; margin:-4px 0 8px; }

/* ---------- Vérification manuelle poids / puissance (2026-10-21, copie — data-checks-ui.js) ---------- */
.dc-block .dc-row{ display:grid; grid-template-columns: 1fr auto auto; gap:8px; align-items:center; padding:7px 0; border-bottom:1px solid var(--border); font-size:12px; }
.dc-block .dc-what b{ font-weight:600; }
.dc-val{ font-family: var(--mono); color: var(--text); margin-left:4px; }
.dc-src, .dc-path{ font-family: var(--mono); font-size:10.5px; color: var(--text-faint); margin-top:2px; }
.dc-note, .dc-intro, .dc-counts{ font-size:11.5px; color: var(--text-dim); margin:8px 0; }
.dc-chip{ display:inline-block; font-family: var(--mono); font-size:10.5px; padding:2px 7px; border-radius:10px; border:1px solid var(--border); white-space:nowrap; }
.dc-chip.ok{ color:#3cd18a; border-color: rgba(60,209,138,0.45); background: rgba(60,209,138,0.08); }
.dc-chip.changed{ color:#ffc93c; border-color: rgba(255,201,60,0.5); background: rgba(255,201,60,0.08); }
.dc-chip.none{ color: var(--text-faint); }
#dc-list-overlay{ z-index:49; }
.modal.wide.dc-modal{ width:100%; max-width:min(1100px, calc(100vw - 32px)); max-height:92vh; display:flex; flex-direction:column; }
.dc-filters{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.dc-filters .af-input{ width:auto; min-width:150px; flex:0 1 auto; padding:6px 8px; }
.dc-filters input[type=search]{ flex:1 1 180px; }
.dc-table-wrap{ overflow:auto; flex:1; min-height:200px; border:1px solid var(--border); border-radius:8px; }
.dc-table{ width:100%; border-collapse:collapse; font-size:12px; }
.dc-table th{ position:sticky; top:0; background: var(--surface-2); text-align:left; font-family: var(--mono); font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color: var(--text-faint); padding:7px 8px; }
.dc-table td{ padding:6px 8px; border-top:1px solid var(--border); vertical-align:top; }
.dc-table td a{ color: var(--text); text-decoration:none; }
.dc-table td a:hover{ text-decoration:underline; }
.dc-table tr.changed td:first-child{ box-shadow: inset 3px 0 0 #ffc93c; }
.dc-table tr.ok td:first-child{ box-shadow: inset 3px 0 0 #3cd18a; }
.dc-empty{ text-align:center; color: var(--text-faint); padding:24px !important; }
.dc-pages{ display:flex; gap:10px; align-items:center; justify-content:center; margin-top:8px; font-size:12px; }
@media (max-width: 900px){ .dc-block .dc-row{ grid-template-columns: 1fr; } }
.dc-sus{ font-family: var(--mono); font-size:10.5px; color:#ffc93c; margin-top:3px; }

/* Onglet « Charges » de la Scène 3D (2026-10-23) : panneaux de calcul rangés dans l'inspecteur de l'onglet */
.lc-panel.lc-docked{ position:static; width:auto; max-width:none; max-height:none; overflow:visible; box-shadow:none; border:none; border-radius:0; background:none; padding:2px 4px; }
.scene3d-calc-legend{ position:absolute; left:12px; bottom:12px; z-index:5; background:rgba(17,20,26,.92); border:1px solid #2a313d; border-radius:8px; padding:8px 12px 10px; color:#d8dde6; font-size:11.5px; width:270px; max-width:calc(100% - 24px); box-sizing:border-box; pointer-events:none; }
.scene3d-calc-legend[hidden]{ display:none; }
.scene3d-calc-legend.with-calcs{ width:460px; }
.scene3d-calc-legend-bar{ height:10px; border-radius:5px; margin:6px 0 3px; }
.scene3d-calc-legend-ticks{ position:relative; height:12px; margin:0 6px 4px; color:#9aa3b2; font-size:10.5px; }
.scene3d-calc-legend-ticks span{ position:absolute; top:0; transform:translateX(-50%); white-space:nowrap; }
/* légende du vent : pastilles des appuis et flèche du vent le plus défavorable (2026-10-27) */
.scene3d-calc-legend-keys{ display:flex; flex-wrap:wrap; gap:4px 12px; margin:6px 0 2px; color:#9aa3b2; }
.scene3d-calc-legend-keys span{ display:inline-flex; align-items:center; gap:6px; }
.scene3d-calc-legend-keys i{ width:10px; height:10px; border-radius:50%; background:var(--k); flex-shrink:0; }
.scene3d-calc-legend-keys i.arrow{ width:12px; height:2px; border-radius:1px; position:relative; margin-right:4px; }
.scene3d-calc-legend-keys i.arrow::after{ content:""; position:absolute; right:-5px; top:-3px; border-left:6px solid var(--k); border-top:4px solid transparent; border-bottom:4px solid transparent; }
/* sécurité retenue (toujours visible), case « Afficher les calculs », formules et calculs chiffrés */
.scene3d-calc-legend-safety{ margin-top:6px; padding-top:6px; border-top:1px solid #2a313d; display:flex; flex-direction:column; gap:2px; color:#c3cad6; }
.scene3d-calc-legend-toggle, .scene3d-calc-legend-calcs{ pointer-events:auto; }
.scene3d-calc-legend-toggle{ display:flex; align-items:center; gap:6px; margin-top:6px; cursor:pointer; color:#d8dde6; }
.scene3d-calc-legend-toggle input{ margin:0; accent-color:#2fd9c4; }
.scene3d-calc-legend-calcs{ margin-top:6px; padding:6px 6px 2px 0; border-top:1px solid #2a313d; max-height:min(42vh, 340px); overflow:auto; display:flex; flex-direction:column; gap:3px; font-size:11px; line-height:1.45; color:#c3cad6; font-variant-numeric:tabular-nums; overscroll-behavior:contain; }
.scene3d-calc-legend-calcs b{ color:#e8ecf2; margin-top:4px; }
.scene3d-calc-legend-calcs b:first-child{ margin-top:0; }
.scene3d-calc-legend-calcs .sub{ padding-left:12px; color:#9aa3b2; }
/* téléphone : calculs moins hauts (la légende reste au-dessus de la barre du bas : l'onglet s'arrête avant elle) */
@media (max-width: 900px){
  .scene3d-calc-legend-calcs{ max-height: 30vh; }
}
.scene3d-calc-hint{ position:absolute; left:50%; top:10px; transform:translateX(-50%); z-index:5; pointer-events:none; }

/* Banc d'essai Live de l'éditeur de fixture (2026-10-23) */
.scene3d-bench-back{ margin-left:6px; font-size:12.5px; }
.scene3d-back-btn:has(.scene3d-bench-back){ width:auto; padding:0 10px; }
.scene3d-bench-banner{ margin-left:8px; padding:3px 9px; border-radius:6px; background:#3a2f0b; color:#ffd54a; font-size:12px; white-space:nowrap; }
.gpe-bench-btn{ color:#3ecfa9 !important; border-color:#2b6b5c !important; }
/* Éditeur de fixture : corrections rapides et onglet Contrôle (2026-10-23) */
.gpe-quick{ display:flex; flex-direction:column; gap:6px; }
.gpe-quick .scene3d-btn-secondary{ margin-top:0; }
.gpe-quick-row{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:12px; color:#8A93A3; margin:6px 0; }
.gpe-quick-row button{ background:#151a22; border:1px solid #262b35; color:#d8dde6; border-radius:5px; padding:3px 9px; cursor:pointer; font:inherit; font-size:12px; }
.gpe-quick-row button:hover{ border-color:#2FD9C4; }
.gpe-photo{ background:#fff; border-radius:8px; padding:6px; margin:4px 0 10px; text-align:center; }
.gpe-photo img{ max-width:100%; max-height:180px; object-fit:contain; }
.gpe-checks{ display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.gpe-check{ display:flex; align-items:flex-start; gap:6px; font-size:12px; line-height:1.45; padding:6px 8px; border-radius:6px; background:#151a22; border-left:3px solid #5B6472; color:#d8dde6; }
.gpe-check span{ flex:1; }
.gpe-check.err{ border-left-color:#ff5a5a; } .gpe-check.warn{ border-left-color:#ffc93c; } .gpe-check.ok{ border-left-color:#3cd18a; }
.gpe-check button{ background:none; border:1px solid #262b35; color:#8A93A3; border-radius:4px; padding:2px 7px; cursor:pointer; font:inherit; font-size:11.5px; flex-shrink:0; }
/* onglet Charges : inspecteur plus large, champs sur une colonne, état vide masqué une fois un calcul ouvert */
#scene3d-calc-inspector{ width:380px; }
@media (max-width:900px){ #scene3d-calc-inspector{ width:auto; } .scene3d-calc-center > .scene3d-viewport{ position:relative; inset:auto; } } /* téléphone : la vue sous la barre d'outils, pas par-dessus */
#scene3d-calc-inspector-body:has(.lc-panel) > .scene3d-empty{ display:none; }
.lc-docked .lc-head{ flex-wrap:wrap; }
.gpe-tabs{ flex-wrap:wrap; } /* 4 onglets (Contrôle, DMX, Électricité, Lumière) dans un inspecteur étroit */

/* Onglet Charges : barre d'outils au-dessus de la vue, sans panneau de gauche (2026-10-23) */
.scene3d-calc-center{ flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; }
.scene3d-calc-center > .scene3d-viewport{ flex:1; min-height:0; }
.scene3d-calc-toolbar{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; padding:6px 12px; background:#181c24; border-bottom:1px solid #262b35; flex-shrink:0; }
.scene3d-calc-tgroup{ display:flex; align-items:center; gap:4px; }
.scene3d-calc-tspacer{ flex:1; }
.scene3d-calc-tbtn{ display:flex; align-items:center; gap:6px; height:30px; padding:0 10px; background:none; border:1px solid #262b35; border-radius:6px; color:#aab2c0; cursor:pointer; font:inherit; font-size:12.5px; white-space:nowrap; }
.scene3d-calc-tbtn:hover{ color:#EDEDED; border-color:#3a4150; }
.scene3d-calc-tbtn.active{ color:#2FD9C4; border-color:#2FD9C4; background:rgba(47,217,196,.1); }
.scene3d-calc-tbtn:disabled{ opacity:.4; cursor:default; }
/* la barre d'outils s'adapte à SA largeur (pas à celle de la fenêtre) : libellés de groupe d'abord, puis texte des boutons */
.scene3d-calc-center{ container-type:inline-size; }
.lc-docked .lc-study-btn{ display:none; } /* « Ajouter au rapport » est dans la barre d'outils de l'onglet */

/* Inspecteur de l'onglet Charges refondu (2026-10-23, retour utilisateur : « rends le menu de droite plus clair,
   lisible ») : résultat en tête, une section par sujet, taux en barres, réglages et détails repliés */
.lc-panel.lc-docked{ font-size:12.5px; line-height:1.4; padding:4px 2px 12px; }
.lc-docked .lc-head{ align-items:center; flex-wrap:wrap; margin:0 0 2px; }
.lc-docked .lc-head b{ font-size:15px; }
.lc-docked .lc-info{ color:#9aa3b2; margin:0 0 10px; }
.lc-docked .lc-info b{ color:#EDEDED; font-weight:600; }
.lc-docked .lc-summary{ display:grid; grid-template-columns:auto 1fr; column-gap:14px; row-gap:2px; align-items:center; margin:0 0 8px; padding:12px 14px; border-radius:10px; background:#151a22; border:1px solid #262d39; border-left:4px solid #8d96a6; }
.lc-docked .lc-summary b{ grid-row:span 4; font-size:30px; line-height:1; font-variant-numeric:tabular-nums; }
.lc-docked .lc-summary > span{ grid-column:2; color:#9aa3b2; font-size:12px; }
.lc-docked .lc-summary .lc-tot{ margin:0; color:#EDEDED; font-size:13.5px; font-weight:600; }
.lc-docked .lc-summary .lc-tag{ justify-self:start; color:#ff8a8a; border-color:#ff5a5a; }
.lc-docked .lc-summary.ok{ border-left-color:#3cd18a; } .lc-docked .lc-summary.mid{ border-left-color:#ffc93c; } .lc-docked .lc-summary.ko{ border-left-color:#ff5a5a; }
.lc-split{ display:flex; flex-wrap:wrap; gap:6px; margin:0 0 6px; }
.lc-split span{ flex:1 1 0; min-width:80px; display:flex; flex-direction:column; padding:6px 9px; background:#11151c; border:1px solid #232a35; border-radius:7px; color:#8a93a3; font-size:11px; }
.lc-split b{ color:#EDEDED; font-size:13px; font-weight:600; font-variant-numeric:tabular-nums; }
.lc-gov{ color:#9aa3b2; font-size:12px; margin:2px 0 0; }
.lc-gov b{ color:#EDEDED; font-weight:600; }
.lc-sec{ margin-top:16px; }
.lc-sec h4{ display:flex; align-items:baseline; gap:8px; margin:0 0 4px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.07em; color:#8a93a3; }
.lc-sec h4 small{ font-size:11px; color:#5B6472; letter-spacing:0; }
.lc-docked .lc-table{ font-size:12px; margin:0; }
.lc-docked .lc-table th{ font-size:10.5px; font-weight:500; text-transform:uppercase; letter-spacing:.04em; color:#6b7483; padding:4px 0 4px 8px; }
.lc-docked .lc-table td{ padding:6px 0 6px 8px; vertical-align:top; border-bottom:1px solid #1d222b; }
.lc-docked .lc-table th:first-child, .lc-docked .lc-table td:first-child{ padding-left:0; word-break:break-word; }
.lc-docked .lc-table th:not(:first-child), .lc-docked .lc-table td:not(:first-child){ text-align:right; white-space:nowrap; }
.lc-docked .lc-table td b{ color:#EDEDED; font-weight:600; }
.lc-docked .lc-env{ color:#7d8696; font-size:11px; margin-top:1px; }
.lc-docked .lc-table td:first-child .lc-env{ white-space:normal; }
/* un taux ne se lit plus qu'à la dernière colonne (avant : couleur sur la 4e colonne, quelle qu'elle soit) */
.lc-panel.lc-docked .lc-table tr[class] td{ color:#d8dde6; }
.lc-panel.lc-docked .lc-table tr.ok td.lc-u{ color:#3cd18a; }
.lc-panel.lc-docked .lc-table tr.mid td.lc-u, .lc-panel.lc-docked .lc-table tr[class] td.mid{ color:#ffc93c; }
.lc-panel.lc-docked .lc-table tr.ko td.lc-u{ color:#ff6b6b; font-weight:600; }
.lc-u{ min-width:58px; }
.lc-bar{ display:block; height:4px; margin-top:5px; border-radius:2px; background:#232a35; overflow:hidden; }
.lc-bar i{ display:block; height:100%; background:#8d96a6; }
.lc-bar.ok i{ background:#3cd18a; } .lc-bar.mid i{ background:#ffc93c; } .lc-bar.ko i{ background:#ff5a5a; }
.lc-docked .lc-warn{ margin:0 0 6px; padding:7px 10px; border-radius:6px; background:#151a22; font-size:12px; line-height:1.4; }
.lc-warn.mid{ border-left-color:#ffc93c; }
.lc-docked .lc-note{ margin-top:6px; line-height:1.4; }
.lc-docked .lc-hint{ color:#7d8696; font-size:11px; margin:6px 0 0; }
.lc-supctl{ margin:0 0 6px; }
.lc-supctl .lc-check{ display:flex; align-items:center; gap:6px; color:#c7cdd6; font-size:12px; }
.lc-sec > .lc-field{ margin-bottom:6px; }
.lc-fold{ margin-top:12px; border:1px solid #232a35; border-radius:8px; background:#11151c; }
.lc-fold > summary{ display:flex; align-items:center; gap:8px; padding:8px 10px; cursor:pointer; list-style:none; font-size:12px; font-weight:600; color:#c7cdd6; }
.lc-fold > summary::-webkit-details-marker{ display:none; }
.lc-fold > summary::before{ content:""; width:6px; height:6px; flex-shrink:0; border-right:1.5px solid #8a93a3; border-bottom:1.5px solid #8a93a3; transform:rotate(-45deg); transition:transform .15s; }
.lc-fold[open] > summary::before{ transform:rotate(45deg); }
.lc-fold > summary small{ margin-left:auto; color:#8a93a3; font-size:11.5px; font-weight:400; }
.lc-fold-body{ padding:0 10px 10px; }
.lc-fold-body .lc-warn{ background:#151a22; }
.lc-docked .lc-fields{ grid-template-columns:1fr 1fr; align-items:end; gap:8px 10px; margin:0; }
.lc-docked .lc-fields .lc-field{ font-size:11px; }
.lc-lgroup + .lc-lgroup{ margin-top:10px; }
.lc-lhead{ display:flex; justify-content:space-between; gap:8px; padding-bottom:3px; margin-bottom:3px; border-bottom:1px solid #232a35; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; color:#8a93a3; }
.lc-lhead b{ color:#c7cdd6; letter-spacing:0; font-weight:600; }
.lc-loads ul{ list-style:none; margin:0; padding:0; }
.lc-loads li{ display:flex; justify-content:space-between; gap:10px; padding:2px 0; color:#c7cdd6; }
.lc-loads li em{ font-style:normal; color:#7d8696; }
.lc-loads li > b{ font-weight:500; white-space:nowrap; font-variant-numeric:tabular-nums; }
.lc-docked .lc-disclaimer{ margin-top:16px; line-height:1.4; }
.lc-docked .lc-fields{ grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); }
.lc-docked .lc-field input, .lc-docked .lc-field select{ width:100%; min-width:0; box-sizing:border-box; }

/* Onglet Charges : barre d'outils en icônes seules, sous-menu du palan, outil en main rappelé sur la vue (2026-10-23) */
.scene3d-calc-toolbar{ gap:4px; padding:6px 10px; }
.scene3d-calc-tgroup{ gap:2px; }
.scene3d-calc-tbtn{ position:relative; width:34px; height:32px; padding:0; justify-content:center; }
.scene3d-calc-tbtn svg{ width:17px; height:17px; }
.scene3d-calc-menuwrap{ position:relative; }
.scene3d-calc-caret{ position:absolute; right:3px; bottom:4px; width:0; height:0; border-left:3px solid transparent; border-right:3px solid transparent; border-top:3px solid currentColor; opacity:.7; }
.scene3d-calc-menu{ position:absolute; top:calc(100% + 6px); left:0; z-index:40; width:320px; max-width:calc(100vw - 24px); max-height:min(70vh, 560px); overflow:auto; padding:6px; background:#151a22; border:1px solid #2a313d; border-radius:10px; box-shadow:0 12px 32px rgba(0,0,0,.5); }
.scene3d-calc-menu-title{ padding:4px 8px 6px; font-size:10.5px; text-transform:uppercase; letter-spacing:.07em; color:#8a93a3; }
.scene3d-calc-menu-list{ display:flex; flex-direction:column; gap:2px; }
.scene3d-calc-menu-item{ display:flex; flex-direction:column; align-items:flex-start; gap:1px; width:100%; padding:7px 9px; text-align:left; background:none; border:1px solid transparent; border-radius:7px; color:#d8dde6; cursor:pointer; font:inherit; font-size:12.5px; }
.scene3d-calc-menu-item span{ color:#8a93a3; font-size:11px; }
.scene3d-calc-menu-item:hover, .scene3d-calc-menu-item:focus-visible{ background:#1d2430; outline:none; }
.scene3d-calc-menu-item.active{ border-color:#2FD9C4; }
.scene3d-calc-menu-new{ width:100%; margin-top:6px; padding:8px 9px; text-align:left; background:none; border:1px dashed #3a4150; border-radius:7px; color:#2FD9C4; cursor:pointer; font:inherit; font-size:12.5px; }
.scene3d-calc-menu-new:hover{ border-color:#2FD9C4; }
.scene3d-calc-hoistform{ display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:8px 10px; margin-top:6px; padding:10px 4px 4px; border-top:1px solid #2a313d; }
.scene3d-calc-hoistform label{ display:flex; flex-direction:column; gap:3px; font-size:11px; color:#8a93a3; }
.scene3d-calc-hoistform .wide{ grid-column:1 / -1; }
.scene3d-calc-hoistform input, .scene3d-calc-hoistform select{ width:100%; min-width:0; box-sizing:border-box; padding:5px 7px; background:#0d1016; color:#e6e9ef; border:1px solid #2a313d; border-radius:5px; font:inherit; font-size:12px; }
.scene3d-calc-hoistform small{ color:#7d8696; font-size:10.5px; line-height:1.35; }
.scene3d-calc-hoistform-actions{ display:flex; justify-content:flex-end; gap:6px; }
.scene3d-calc-hoistform-actions button{ height:30px; margin:0; padding:0 12px; background:none; border:1px solid #2a313d; border-radius:6px; color:#c7cdd6; cursor:pointer; font:inherit; font-size:12px; }
.scene3d-calc-hoistform-actions button[type=submit]{ background:#2FD9C4; border-color:#2FD9C4; color:#0b0d11; font-weight:600; }
.scene3d-calc-hint:not(:empty){ max-width:calc(100% - 24px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding:6px 14px; background:rgba(17,20,26,.92); border:1px solid #2a313d; border-radius:999px; color:#d8dde6; font-size:12px; }
/* Marge de sécurité (réglages du calcul) et base du taux dans le résumé */
.lc-docked .lc-margin{ grid-column:1 / -1; }
.lc-margin-row{ display:flex; align-items:center; gap:6px; }
.lc-margin-row select{ flex:1 1 auto; }
.lc-docked .lc-margin-row input{ flex:0 0 84px; width:84px; }
.lc-margin-row em{ font-style:normal; color:#8a93a3; font-size:12px; }
.lc-margin small{ margin-top:2px; color:#7d8696; font-size:10.5px; line-height:1.35; }
.lc-docked .lc-summary .lc-basis{ color:#7d8696; font-size:11px; }
/* Accroche des grappes son, inspecteur de la Scène 3D (2026-10-23) : 1 ou 2 points, moteur, placement sur un pont */
.scene3d-larig-tabs{ flex-wrap:wrap; margin-bottom:8px; }
.scene3d-larig-pt{ display:flex; flex-direction:column; gap:6px; margin:0 0 8px; padding:8px; background:#151a22; border:1px solid #262b35; border-radius:8px; }
.scene3d-larig-head{ display:flex; justify-content:space-between; align-items:baseline; gap:8px; color:#EDEDED; font-size:12.5px; }
.scene3d-larig-head span{ color:#ffb15c; font-size:12px; }
.scene3d-larig-pt select{ width:100%; }
.scene3d-larig-pt .scene3d-btn-secondary{ margin-top:0; }
.scene3d-larig-pt .scene3d-btn-secondary.active{ border-color:#2FD9C4; color:#2FD9C4; }
.scene3d-larig-pt small{ color:#8A93A3; font-size:11px; line-height:1.4; }
.scene3d-hint.warn{ margin-top:6px; border-color:#5c4a12; color:#ffc93c; }
/* Outil Vent de l'onglet Charges (2026-10-23) : zones au vent éditables dans l'inspecteur */
.wc-zone{ display:flex; flex-direction:column; gap:8px; margin:0 0 8px; padding:10px; background:#11151c; border:1px solid #232a35; border-radius:8px; }
.wc-zone-head{ display:flex; align-items:center; gap:8px; }
/* nom de la zone / du lest : champ visiblement modifiable (crayon), demande utilisateur « pouvoir renommer les zones » */
.wc-zone-head input{ flex:1 1 auto; min-width:0; background:#0d1016 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8696' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E") no-repeat right 7px center; border:1px solid #232a35; border-radius:5px; color:#EDEDED; font:inherit; font-weight:600; padding:4px 24px 4px 7px; cursor:text; }
.wc-zone-head input:hover, .wc-zone-head input:focus{ border-color:#3a4352; outline:none; }
.wc-zone-head span{ color:#7d8696; font-size:11px; white-space:nowrap; }
.wc-zone-head .lc-x{ margin-left:0; }
.wc-zone-grid{ display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); gap:8px 10px; align-items:end; }
.wc-zone-grid .wide{ grid-column:1 / -1; }
.wc-zone-grid .lc-field{ font-size:11px; }
.wc-zone-grid .lc-field input, .wc-zone-grid .lc-field select{ width:100%; min-width:0; box-sizing:border-box; }
.wc-zone-grid .lc-check{ display:flex; align-items:center; gap:6px; color:#c7cdd6; font-size:12px; }
.wc-zone-grid small{ color:#7d8696; font-size:11px; }
.wc-add{ display:flex; gap:8px; flex-wrap:wrap; }
.wc-add .scene3d-btn-secondary{ margin-top:0; flex:1 1 auto; }
.wc-arrow{ display:inline-block; color:#2FD9C4; font-weight:700; }
.lc-panel.lc-docked .lc-table td .wc-miss{ color:#ff6b6b; font-weight:600; }
/* lests (Charges › Vent) : carte au liseré orange comme le bloc dans la vue, ligne de conseil colorée */
.wc-ballast{ border-left:3px solid #ffb15c; }
.wc-zone-grid .wc-guy-btn{ grid-column:1 / -1; margin-top:0; }
.wc-reco{ padding:6px 9px; border-radius:6px; background:#0d1016; border-left:3px solid #8a93a3; color:#c7cdd6; font-size:12px; line-height:1.4; }
.wc-reco.ok{ border-left-color:#3cd18a; } .wc-reco.ko{ border-left-color:#ff5a5a; color:#ffd2d2; } .wc-reco.mid{ border-left-color:#ffc93c; } .wc-reco.info{ border-left-color:#5aa0ff; }
.lc-panel.lc-docked .lc-table tr.wc-cur td{ background:#1a2230; font-weight:600; }

/* ===================== Visite guidée des modules (tour.js, 2026-10-23) =====================
   Bouton « ? » de la barre des modules, menu, sommaire (tiroir à droite), calque de visite : zone éclairée par une
   ombre géante, bulle placée à côté de la zone (feuille du bas sous 900 px). Au-dessus de tout (5000+). */
.tour-help-btn{ flex:0 0 auto; align-self:center; width:28px; height:28px; padding:0; border-radius:50%; border:1.5px solid var(--teal); background:transparent; color:var(--teal); font:700 14px/1 var(--font-body); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.tour-help-btn:hover, .tour-help-btn:focus-visible{ background:color-mix(in srgb, var(--teal) 16%, transparent); outline:none; }
.tour-menu{ position:fixed; z-index:5100; width:300px; box-sizing:border-box; padding:6px; border-radius:12px; background:var(--surface-2); border:1px solid var(--border); box-shadow:0 18px 50px rgba(0,0,0,0.5); display:flex; flex-direction:column; gap:2px; font-family:var(--font-body); color:var(--text); }
.tour-menu-head{ padding:8px 10px 6px; font-size:11px; letter-spacing:0.08em; text-transform:uppercase; color:var(--text-dim); }
.tour-menu-item{ display:flex; gap:10px; align-items:center; padding:9px 10px; border:0; border-radius:8px; background:transparent; color:var(--text); font:inherit; text-align:left; cursor:pointer; }
.tour-menu-item:hover, .tour-menu-item:focus-visible{ background:var(--surface-3); outline:none; }
.tour-menu-item > span:last-child{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.tour-menu-item b{ font-size:13.5px; font-weight:600; }
.tour-menu-item small{ font-size:12px; color:var(--text-dim); }
.tour-menu-ico{ flex:0 0 auto; width:28px; height:28px; border-radius:50%; background:var(--surface-3); color:var(--text-dim); display:flex; align-items:center; justify-content:center; font-size:12px; }
.tour-menu-item.tour-main .tour-menu-ico{ background:var(--teal); color:var(--on-accent); }
.tour-layer{ position:fixed; inset:0; z-index:5000; }
.tour-layer.nospot{ background:rgba(4,6,9,0.62); }
.tour-spot{ position:fixed; box-sizing:border-box; border:2px solid var(--teal); border-radius:10px; box-shadow:0 0 0 200vmax rgba(4,6,9,0.62); pointer-events:none; transition:left .25s, top .25s, width .25s, height .25s; }
.tour-bubble{ position:fixed; width:min(400px, calc(100vw - 24px)); max-height:calc(100vh - 24px); overflow:auto; box-sizing:border-box; padding:16px; border-radius:14px; background:var(--surface); color:var(--text); border:1px solid var(--border); box-shadow:0 24px 60px rgba(0,0,0,0.55); display:flex; flex-direction:column; gap:10px; font-family:var(--font-body); transition:left .25s, top .25s; }
.tour-bubble.sheet{ left:0 !important; right:0; bottom:0; top:auto !important; width:100%; max-height:72vh; border-radius:16px 16px 0 0; padding-bottom:calc(16px + env(safe-area-inset-bottom, 0px)); }
.tour-b-head{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tour-chip{ padding:3px 9px; border-radius:999px; background:color-mix(in srgb, var(--teal) 16%, transparent); color:var(--teal); font-size:12px; font-weight:600; }
.tour-b-chap{ font-size:12px; color:var(--text-dim); }
.tour-quit{ margin-left:auto; display:inline-flex; align-items:center; gap:6px; padding:5px 9px; border-radius:8px; border:1px solid var(--border); background:transparent; color:var(--text-dim); font:inherit; font-size:12px; cursor:pointer; }
.tour-quit:hover, .tour-quit:focus-visible{ color:var(--text); border-color:var(--text-faint); outline:none; }
.tour-b-title{ font-family:var(--font-display); font-size:18px; font-weight:700; }
.tour-b-text{ font-size:13.5px; line-height:1.55; }
.tour-b-img{ margin:0; border-radius:10px; overflow:hidden; border:1px solid var(--border); background:#0b0e13; }
.tour-b-img img{ display:block; width:100%; height:auto; max-height:240px; object-fit:contain; }
.tour-b-foot{ display:flex; align-items:center; gap:8px; }
.tour-progress{ flex:1 1 auto; height:4px; border-radius:2px; background:var(--surface-3); overflow:hidden; }
.tour-progress i{ display:block; height:100%; background:var(--teal); }
.tour-btn{ height:34px; padding:0 13px; border-radius:9px; border:1px solid var(--border); background:var(--surface-2); color:var(--text); font:inherit; font-size:13px; cursor:pointer; }
.tour-btn:hover, .tour-btn:focus-visible{ border-color:var(--text-faint); outline:none; }
.tour-btn.primary{ background:var(--teal); border-color:var(--teal); color:var(--on-accent); font-weight:700; }
.tour-b-keys{ font-size:11px; color:var(--text-faint); }
.tour-bubble.sheet .tour-b-keys{ display:none; }
.tour-bubble.sheet .tour-btn{ height:44px; }
.tour-toc{ position:fixed; z-index:5100; top:0; right:0; bottom:0; width:min(420px, 100vw); box-sizing:border-box; background:var(--surface); color:var(--text); border-left:1px solid var(--border); box-shadow:-20px 0 50px rgba(0,0,0,0.45); display:flex; flex-direction:column; font-family:var(--font-body); }
.tour-toc-head{ display:flex; align-items:center; gap:10px; padding:16px 16px 10px; }
.tour-toc-head > div{ display:flex; flex-direction:column; gap:2px; }
.tour-toc-head small{ font-size:11px; letter-spacing:0.08em; text-transform:uppercase; color:var(--text-dim); }
.tour-toc-head b{ font-family:var(--font-display); font-size:19px; }
.tour-x{ margin-left:auto; width:32px; height:32px; border-radius:8px; border:1px solid var(--border); background:transparent; color:var(--text-dim); font:inherit; cursor:pointer; }
.tour-toc-tools{ display:flex; flex-direction:column; gap:8px; padding:0 16px 12px; }
.tour-toc-search{ height:36px; box-sizing:border-box; padding:0 11px; border-radius:8px; border:1px solid var(--border); background:var(--bg); color:var(--text); font:inherit; font-size:13px; }
.tour-toc-list{ flex:1 1 auto; overflow:auto; padding:6px 8px 16px; border-top:1px solid var(--border); }
.tour-toc-chap-title{ display:flex; align-items:center; gap:8px; padding:10px 8px 4px; font-size:13.5px; font-weight:600; }
.tour-toc-chap-title small{ margin-left:auto; font-size:12px; font-weight:400; color:var(--text-dim); }
.tour-toc-item{ display:flex; align-items:center; gap:10px; width:100%; padding:7px 10px 7px 16px; border:0; border-radius:7px; background:transparent; color:var(--text); font:inherit; font-size:13px; text-align:left; cursor:pointer; }
.tour-toc-item:hover, .tour-toc-item:focus-visible{ background:var(--surface-2); outline:none; }
.tour-toc-mark{ width:14px; color:var(--text-faint); }
.tour-toc-item.seen .tour-toc-mark{ color:var(--teal); }
