#zoomLabel { min-width:52px; text-align:center; }

.toolbar { position: static; display:flex; gap:8px; align-items:center; background: rgba(20,24,32,0.8); padding:6px 10px;
  border:1px solid #2a3344; border-radius: 12px; backdrop-filter: blur(6px); z-index: 1; align-self:center; flex-wrap: wrap; }
.measbar{ align-self:center; }
.pagebar{ align-self:center; }
.elbar{ align-self:center; }
.toolbars{ display:flex; gap:10px; align-self:center; }

h1 { font-size: 20px; margin: 0 0 8px; letter-spacing:.3px }
h2 { font-size: 14px; margin: 14px 0 6px; color: var(--muted); font-weight:600; }
.sub { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.card { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.row { display:flex; gap: var(--gap); }
.col { display:flex; flex-direction:column; gap: 8px; }

.input, select { background:#0f131a; color:#e6e9ef; border:1px solid #222b3a; border-radius: 12px; padding:10px 12px; font-size:14px; outline:none; }
.input.short { width: 68px; min-width: 56px; max-width: 76px; }
.input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(91,157,255,.2); }

.btn { cursor:pointer; border:1px solid #3b4a66; background: linear-gradient(180deg,#2a3a58,#1b2742);
  color:#ffffff; font-weight:600; letter-spacing:.2px; transition:.15s ease-in-out; border-radius:12px; padding:10px 12px; }
.btn:hover{ filter:brightness(1.08); box-shadow:0 0 0 2px rgba(91,157,255,.25) inset; }
.btn:active{ transform: translateY(1px); }
.btn.primary{ background: linear-gradient(180deg,#4d88ff,#2b62c8); border-color:#2657b3; color:#fff; }
.btn.success{ background: linear-gradient(180deg,#25c18a,#1aa06f); border-color:#169b68; color:#fff; }
.btn.warn{ background: linear-gradient(180deg,#ffbf69,#ff9f1a); color:#111; border-color:#bf7f0a; }
.btn.ghost{ background: rgba(255,255,255,0.06); border-color:#3b4a66; color:#e6e9ef; }
.btn.danger{ background: linear-gradient(180deg,#ff6b6b,#e05656); border-color:#b04545; color:#fff; }
.btn.icon{ padding:8px; display:inline-flex; align-items:center; justify-content:center; }

.btn.toggle{ width:100%; padding:12px 14px; font-size:14px; display:flex; align-items:center; justify-content:center; gap:8px; }

.grid { display:grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi { display:flex; align-items:center; justify-content:space-between; padding:10px 12px; background:#0f131a; border:1px solid #222b3a; border-radius:12px; }
.muted { color:var(--muted); }

.measure-overlay{ position:absolute; left:0; top:0; pointer-events:none; }
.topbar-sep { width:1px; height:22px; background:#2a3344; margin: 0 6px; }
.license-note{ color: var(--muted); font-size: 12px; }

/* Onglets gauche */
.left-tabs {
  display: flex;
  border-bottom: 1px solid #2a3344;
  margin-bottom: 15px;
}

.left-tab-btn {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
  font-size: 13px;
}

.left-tab-btn.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: rgba(91, 157, 255, 0.1);
}

.left-tab-btn:hover {
  color: #e6e9ef;
  background: rgba(255, 255, 255, 0.05);
}

.left-tab-content {
  display: none;
}

.left-tab-content.active {
  display: block;
}

/* Arborescence */
.tree-header h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #e6e9ef;
}

.tree-container {
  max-height: 500px;
  overflow-y: auto;
  border: 1px solid #2a3344;
  border-radius: 8px;
  background: #0f131a;
}

.tree {
  padding: 4px;
  display: flex;
  flex-direction: column;
}

.tree-item {
  display: flex;
  align-items: center;
  padding: 4px 6px;
  margin: 1px 0;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
  min-height: 24px;
}

.tree-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.tree-item.selected {
  background: rgba(91, 157, 255, 0.2);
  border: 1px solid var(--brand);
}

.tree-item.dragging {
  opacity: 0.5;
}

.tree-item-icon {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.tree-item-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tree-item-name {
  font-size: 12px;
  color: #e6e9ef;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tree-item-badge {
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 8px;
  background: #2a3344;
  color: var(--muted);
  flex-shrink: 0;
}

.tree-item-children {
  margin-left: 16px;
  border-left: 1px solid #2a3344;
  padding-left: 6px;
  display: flex;
  flex-direction: column;
}

.tree-item-expand {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
  flex-shrink: 0;
}

.tree-item-expand:hover {
  color: #e6e9ef;
}

.tree-item-spacer {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 10px;
  flex-shrink: 0;
  opacity: 0.3;
  cursor: default;
}

/* Zones de drop */
.tree-item.drop-above {
  border-top: 2px solid var(--brand);
  background: rgba(91, 157, 255, 0.1);
}

.tree-item.drop-below {
  border-bottom: 2px solid var(--brand);
  background: rgba(91, 157, 255, 0.1);
}

.tree-item.drop-inside {
  background: rgba(91, 157, 255, 0.2);
  border: 2px dashed var(--brand);
}

/* Propriétés */
.no-selection {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.properties-panel {
  padding: 15px;
  height: auto;
  overflow: visible;
}

.property-group {
  margin-bottom: 20px;
}

.property-group h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #e6e9ef;
  border-bottom: 1px solid #2a3344;
  padding-bottom: 5px;
}

.property-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.property-label {
  min-width: 80px;
  font-size: 12px;
  color: var(--muted);
}

.property-input {
  flex: 1;
}

.property-buttons {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.property-btn {
  padding: 6px 10px;
  font-size: 11px;
  min-width: 40px;
}

.rotation-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.rotation-btn {
  padding: 8px;
  font-size: 12px;
  font-weight: bold;
}

.image-preview {
  width: 100%;
  max-width: 150px;
  height: 100px;
  object-fit: contain;
  border: 1px solid #2a3344;
  border-radius: 4px;
  background: #0f131a;
  margin: 5px 0;
}

.zoom-slider {
  width: 100%;
  margin: 5px 0;
}

/* Améliorations pour les icônes SVG */
.shape-icon svg {
  width: 16px;
  height: 16px;
  color: currentColor;
  transition: all 0.2s ease;
}

/* Icônes dans l'arborescence */
.tree-item-icon svg {
  width: 16px;
  height: 16px;
  color: currentColor;
  transition: all 0.2s ease;
}

.tree-item:hover .tree-item-icon svg {
  color: #e6e9ef;
}

.tree-item.selected .tree-item-icon svg {
  color: var(--brand);
}

.shape-icon svg:hover {
  transform: scale(1.1);
}

/* Styles pour les boutons de forme avec SVG */
.btn svg {
  width: 16px;
  height: 16px;
  color: currentColor;
  transition: all 0.2s ease;
}

.btn:hover svg {
  transform: scale(1.05);
}

.btn.active svg {
  color: var(--brand);
}

/* Améliorations pour les polices et le texte */
.font-select {
  font-family: inherit;
}

.font-select optgroup {
  font-weight: bold;
  color: var(--brand);
}

.font-select option {
  padding: 4px 8px;
}

/* Interface d'import de polices */
.font-import-section {
  border: 1px solid #2a3344;
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  background: rgba(15, 19, 26, 0.5);
}

.font-import-section h5 {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Améliorations pour les textarea */
.property-input[type="textarea"] {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}

/* Boutons d'action améliorés */
.property-btn {
  transition: all 0.2s ease;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 6px;
}

.property-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Indicateur de police chargée */
.font-loaded {
  position: relative;
}

.font-loaded::after {
  content: "✓";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #25c18a;
  font-size: 12px;
  font-weight: bold;
}

/* Améliorations pour les couleurs */
.color-preview {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid #2a3344;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

/* Animation pour les changements de police */
@keyframes fontLoad {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

.font-loading {
  animation: fontLoad 0.3s ease-in-out;
}

/* Améliorations pour les tooltips */
[title] {
  position: relative;
}

/* Styles pour les raccourcis clavier */
kbd {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-family: 'Courier New', monospace;
  background: #2a3344;
  border: 1px solid #3b4a66;
  border-radius: 4px;
  color: #e6e9ef;
  margin-right: 6px;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Améliorations pour les tooltips */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #1a1f2e;
  color: #e6e9ef;
  text-align: center;
  border-radius: 6px;
  padding: 8px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 11px;
  border: 1px solid #2a3344;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Indicateur de statut */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-indicator.success {
  background-color: #25c18a;
}

.status-indicator.warning {
  background-color: #ffbf69;
}

.status-indicator.error {
  background-color: #ff6b6b;
}

/* Améliorations pour les notifications */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1a1f2e;
  color: #e6e9ef;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #2a3344;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification.success {
  border-left: 4px solid #25c18a;
}

.notification.error {
  border-left: 4px solid #ff6b6b;
}

.notification.warning {
  border-left: 4px solid #ffbf69;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .property-row {
    flex-direction: column;
    gap: 4px;
  }
  
  .property-label {
    min-width: auto;
    font-size: 11px;
  }
  
  .property-buttons {
    flex-direction: column;
  }
  
  .property-btn {
    width: 100%;
  }
  
  .notification {
    right: 10px;
    left: 10px;
    transform: translateY(-100%);
  }
  
  .notification.show {
    transform: translateY(0);
  }
}

