/* Page Dessin : mêmes formes que l'atelier (classes .pe de patronage.css : barre de menus, zone à entête, colonne
   d'outils, Calques et Propriétés à droite, barre d'état), en plein écran comme l'atelier ouvert */
#page-dessin { position: relative; }
body:has(#page-dessin.active) #taskbar { display: none; }
#page-dessin .pe.pe-ds { display: flex; inset: 0; padding: 0; gap: 0; animation: none; }
.pe-ds .pe-body { display: flex; flex: 1; min-height: 0; }
.pe-ds .pe-area { flex: 1; min-width: 0; }
.pe-ds .pe-side { flex: 0 0 300px; width: 300px; margin-left: 4px; }
.pe-ds .pe-left { flex: 0 0 auto; max-height: 45%; }
.pe-ds .pe-right { flex: 1; }
.pe-ds .pe-canvas-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
/* plan de travail : la feuille A4 centrée, défilement au-delà du zoom */
.ds-desk { position: absolute; inset: 0; overflow: auto; display: grid; place-items: start; padding: 24px 24px 24px 72px; }
.ds-desk.ds-panning, .ds-desk.ds-panning .ds-sheet { cursor: grabbing; }
.pe-ds .pe-canvas-wrap canvas.ds-sheet { position: static; inset: auto; }
.ds-sheet { display: block; margin: auto; background: #ffffff; box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.2); touch-action: none; }
.pe-ds .pe-tbox { left: 12px; top: 12px; }
/* barre du haut : description pour l'IA et actions en bleu (comme « Fiche technique ») */
.pe-ds input[type="text"].ds-desc { width: auto; flex: 0 1 280px; min-width: 120px; height: 22px; margin-right: 6px; padding: 0 8px; border: 1px solid var(--bl-line-2); border-radius: 4px; background: var(--bl-field); color: var(--bl-text); font: inherit; }
.pe-ds .ds-cta { margin-left: 4px; }
.pe-ds .ds-cta svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pe-ds .ds-cta:disabled { opacity: 0.5; }
/* Calques */
.ds-layers { display: flex; flex-direction: column; min-height: 0; }
.ds-llist { padding: 4px; overflow-y: auto; }
.pe-ds .ds-layer { display: flex; align-items: center; gap: 7px; padding: 3px 6px; cursor: pointer; }
.ds-thumb { flex: none; width: 22px; height: auto; border: 1px solid var(--bl-line-2); border-radius: 2px; background: #fff; }
.ds-lbtn { flex: none; display: grid; place-items: center; width: 24px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--bl-dim); cursor: pointer; }
.ds-lbtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ds-lbtn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.ds-lbtn.off { color: var(--bl-muted); opacity: 0.6; }
.ds-lfoot { display: flex; gap: 2px; padding: 4px 6px 6px; border-top: 1px solid var(--bl-line); }
/* Propriétés */
.ds-range { flex: 1; min-width: 60px; accent-color: #267ab2; }
.ds-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.ds-chip { height: 20px; padding: 0 7px; border: 1px solid var(--bl-line-2); border-radius: 4px; background: var(--bl-widget); color: var(--bl-dim); font: inherit; font-size: 11px; cursor: pointer; }
.ds-chip:hover { color: #fff; background: var(--bl-widget-hi); }
.ds-chip.on { background: var(--bl-sel); border-color: var(--bl-ring); color: #fff; }
.ds-colors { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; padding: 4px 2px; }
.ds-sw { aspect-ratio: 1; padding: 0; border: 1px solid rgba(0, 0, 0, 0.3); border-radius: 4px; cursor: pointer; }
.ds-sw.on { outline: 2px solid #6db4e3; outline-offset: 1px; }
.ds-color-in { width: 100%; height: auto; aspect-ratio: 1; padding: 0; border: 1px dashed var(--bl-line-2); border-radius: 4px; background: transparent; cursor: pointer; }
.pe-ds .ds-note { margin: 8px 10px; }
/* message passager */
.ds-msg { position: absolute; left: 50%; bottom: 16px; z-index: 5; transform: translate(-50%, 8px); padding: 8px 13px; border-radius: 8px; background: rgba(16, 16, 18, 0.94); border: 1px solid rgba(255, 255, 255, 0.12); color: #fff; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.ds-msg.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1000px) { .pe-ds .pe-side { flex-basis: 240px; width: 240px; } .pe-ds .ds-desc { display: none; } }
/* Enregistrer dans un projet */
.pe-ds .ds-proj { width: min(460px, 92vw); }
.ds-proj-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.ds-radio { display: inline-flex; align-items: center; gap: 6px; min-width: 130px; cursor: pointer; }
.pe-ds .ds-proj-row input[type="text"], .pe-ds .ds-proj-row select { flex: 1; width: auto; min-width: 0; }
