/**
 * BrightCushion - Workflow Styles
 * VERSION CORRIGÃƒâ€°E MOBILE : Hauteur augmentÃƒÂ©e + Liens plus visibles
 */

/* ==================== WORKFLOW DEMO ==================== */
.workflow-demo {
  margin-top: 60px;
  background: rgba(10, 26, 42, 0.5);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--radius);
  padding: 40px;
}

.workflow-header {
  text-align: center;
  margin-bottom: 40px;
}

.workflow-header h3 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 12px;
}

.workflow-subtitle {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ==================== TOGGLE ==================== */
.workflow-toggle {
  display: inline-flex;
  gap: 12px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.1);
}

.toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.toggle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.toggle-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-600));
  color: #0b0b0b;
  box-shadow: 0 4px 15px var(--gold-glow);
}

.toggle-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

.toggle-btn.active .toggle-icon {
  background: #0b0b0b;
}

/* ==================== VIEWS ==================== */
.workflow-view {
  display: none;
}

.workflow-view.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== STATS ==================== */
.workflow-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: rgba(0, 0, 0, 0.3);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  transition: all 0.2s ease;
}

.stat-card:hover {
  border-color: rgba(212, 175, 55, 0.3);
  transform: translateY(-4px);
}

.stat-card.improved {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 600;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
}

.stat-value.warning-stat {
  color: #f59e0b;
}

.stat-improvement {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
}

/* ==================== CANVAS ==================== */
.canvas {
  position: relative;
  min-height: 600px;
  padding: 40px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  background: 
    linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

@media (hover: none) and (pointer: coarse) {
  .canvas {
    cursor: grab;
  }
  
  .canvas:active {
    cursor: grabbing;
  }
}

.canvas::-webkit-scrollbar {
  height: 8px;
}

.canvas::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.canvas::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.canvas::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

@supports (scrollbar-width: thin) {
  .canvas {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 768px) {
  .workflow-toggle::-webkit-scrollbar {
    height: 8px;
  }
  .workflow-toggle::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
  }
  .workflow-toggle::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    transition: background 0.3s ease;
  }
  .workflow-toggle::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
  }
  @supports (scrollbar-width: thin) {
    .workflow-toggle {
      scrollbar-width: thin;
      scrollbar-color: rgba(212, 175, 55, 0.3) rgba(0, 0, 0, 0.2);
    }
  }

  .canvas::after {
    content: 'Ã°Å¸â€˜â€° Faites glisser pour explorer';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(212, 175, 55, 0.95);
    color: #0b0b0b;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  }

  .canvas.show-scroll-hint::after {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  :root[lang="en"] .canvas::after {
    content: 'Ã°Å¸â€˜â€° Swipe to explore';
  }
}

.canvas svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

/* ==================== NODES ==================== */
.node {
  position: absolute !important;
  background: rgba(10, 26, 42, 0.95);
  border: 1.5px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10;
  overflow: visible;
  transform: translateY(-50%) !important;
  transition: 
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    border-width 0.2s ease,
    filter 0.2s ease,
    transform 0.2s ease-out;
}

#workflow-traditional .node:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-50%) !important;
  border-color: rgba(212, 175, 55, 0.2);
  z-index: 10;
}

#workflow-ai .node:hover {
  transform: translateY(-50%) scale(1.05) !important;
  box-shadow: 0 12px 30px var(--gold-glow);
  border-color: var(--gold);
  border-width: 2px;
  z-index: 50;
  filter: brightness(1.1);
}

#workflow-ai .node[data-clickable="true"] {
  cursor: pointer;
  position: relative;
}

#workflow-ai .node[data-clickable="true"]::before {
  content: 'i';
  position: absolute;
  top: -8px;
  left: -8px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-600));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  font-style: italic;
  color: #0b0b0b;
  box-shadow: 0 2px 8px var(--gold-glow);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
  z-index: 100;
  border: 2px solid rgba(10, 26, 42, 0.95);
}

#workflow-ai .node[data-clickable="true"]:hover::before {
  opacity: 1;
  transform: scale(1);
}

@keyframes pulse-click-indicator {
  0%, 100% {
    box-shadow: 0 2px 8px var(--gold-glow);
  }
  50% {
    box-shadow: 0 2px 16px var(--gold-glow), 0 0 20px var(--gold-glow);
  }
}

#workflow-ai .node[data-clickable="true"]::before {
  animation: pulse-click-indicator 2s ease-in-out infinite;
}

.node.start, .node.end {
  border-radius: 50px;
  min-width: 160px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node.end {
  border-width: 2px;
  border-color: var(--gold);
}

/* ==================== HEXAGONE (Decision Node) ==================== */
.node.decision {
  width: 180px;
  height: 100px;
  min-width: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(15% 0%, 85% 0%, 100% 50%, 85% 100%, 15% 100%, 0% 50%);
  border-radius: 0;
  background: rgba(10, 26, 42, 0.95);
  border: 1.5px solid rgba(212, 175, 55, 0.3);
}

.node.decision:hover {
  transform: translateY(-50%) scale(1.05) !important;
}

.node.decision .node-content {
  text-align: center;
  padding: 10px;
  width: 100%;
}

/* ==================== NODE PARTS ==================== */
.node-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  flex-wrap: wrap;
  position: relative;
}

.node.start .node-header,
.node.end .node-header {
  border-bottom: none;
  justify-content: center;
  padding: 16px;
  width: 100%;
}

.node-info { flex: 1; }

.node-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
}

.node-type {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.node-body {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
  font-size: 11px;
  color: var(--muted);
  border-radius: 0 0 12px 12px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.metric-row:last-child { margin-bottom: 0; }

.metric-value {
  font-weight: 700;
  color: var(--gold);
}

.warning-text {
  color: #f59e0b !important;
  font-weight: 600;
  font-size: 10px;
}

.success-text {
  color: #10b981 !important;
  font-weight: 600;
  font-size: 10px;
}

/* ==================== BADGES ==================== */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

.status-dot.warning {
  background: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.status-dot.error {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
}

.ai-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  background: linear-gradient(135deg, var(--gold), var(--gold-600));
  color: #0b0b0b;
  font-size: 8px;
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px var(--gold-glow);
  z-index: 20;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.ai-badge.rpa {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.ai-badge.manual {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.node.decision .ai-badge {
  top: -6px;
  right: 10px;
}

/* ==================== CONNECTION POINTS ==================== */
.connection-point {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--bg);
  border: 3px solid var(--gold);
  border-radius: 50%;
  z-index: 20;
  box-shadow: 0 0 10px var(--gold-glow);
}

.connection-point.input { left: -7px; top: 50%; transform: translateY(-50%); }
.connection-point.output { right: -7px; top: 50%; transform: translateY(-50%); }
.connection-point.top { left: 50%; top: -7px; transform: translateX(-50%); }
.connection-point.bottom { left: 50%; bottom: -7px; transform: translateX(-50%); }

.node.decision .connection-point.input {
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.node.decision .connection-point.output {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.node.decision .connection-point.top {
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.node.decision .connection-point.bottom {
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}

/* ==================== LABELS ==================== */
.decision-label {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  background: rgba(10, 26, 42, 0.95);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

.bottleneck-indicator {
  position: absolute;
  background: rgba(254, 243, 199, 0.95);
  border: 2px solid #f59e0b;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 10px;
  font-weight: 700;
  color: #92400e;
  z-index: 15;
  line-height: 1.4;
}

/* ==================== FLOW ANIMATIONS ==================== */
@media (prefers-reduced-motion: no-preference) {
  .flow-line {
    stroke-dasharray: 8, 4;
    animation: flow 1.5s linear infinite;
  }

  .flow-line-manual {
    stroke-dasharray: 10, 5;
    animation: flow 2s linear infinite;
    opacity: 0.6;
  }

  .flow-line-realtime {
    stroke-dasharray: 2, 2;
    animation: flow 0.5s linear infinite;
  }

  .flow-line-intelligent {
    stroke-dasharray: 4, 2;
    animation: flow 0.8s linear infinite;
  }

  @keyframes flow {
    0% { stroke-dashoffset: 20; }
    100% { stroke-dashoffset: 0; }
  }
}

/* ==================== METADATA PANEL ==================== */
.metadata-panel {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 420px;
  background: rgba(10, 26, 42, 0.98);
  border-right: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.metadata-panel.active {
  transform: translateX(0);
}

.metadata-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.metadata-overlay.active {
  opacity: 1;
  visibility: visible;
}

.metadata-header {
  padding: 24px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  background: rgba(10, 26, 42, 0.98);
  z-index: 10;
}

.metadata-title-group {
  flex: 1;
  min-width: 0;
}

.metadata-header h4 {
  color: var(--gold);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px 0;
  letter-spacing: 0.3px;
}

.metadata-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.metadata-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.metadata-close:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
  color: var(--gold);
}

.metadata-close svg {
  width: 20px;
  height: 20px;
}

.metadata-body { padding: 24px; }

.metadata-node-info {
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.metadata-node-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.metadata-node-type {
  font-size: 13px;
  color: var(--muted);
}

.metadata-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meta-section {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  overflow: hidden;
}

.meta-section-header {
  padding: 12px 16px;
  background: rgba(212, 175, 55, 0.05);
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-section-icon {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.meta-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #f0d060;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.meta-section-body { padding: 14px 16px; }

.metadata-panel::-webkit-scrollbar {
  width: 6px;
}

.metadata-panel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.metadata-panel::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 3px;
}

.metadata-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

/* ==================== POSITIONS WORKFLOW TRADITIONNEL ==================== */
#t1 { left: 60px; top: 250px; }
#t2 { left: 340px; top: 250px; }
#t3 { left: 620px; top: 250px; }
#t4 { left: 900px; top: 250px; }
#t5 { left: 1180px; top: 250px; }
#t7 { left: 1740px; top: 250px; }
#t8 { left: 2020px; top: 250px; }
#t6a { left: 1460px; top: 100px; }
#t6b { left: 1460px; top: 400px; }

.label-trad-yes {
  left: 1320px;
  top: 150px;
}

.label-trad-no {
  left: 1320px;
  top: 350px;
}

.bottleneck-excel {
  left: 680px;
  top: 380px;
}

.bottleneck-email {
  left: 1520px;
  top: 480px;
}

/* ==================== POSITIONS WORKFLOW AI ==================== */
#a1 { left: 60px; top: 250px; }
#a2 { left: 340px; top: 250px; }
#a3 { left: 620px; top: 250px; }
#a4 { left: 900px; top: 250px; }
#a6 { left: 1460px; top: 250px; }
#a7 { left: 1740px; top: 250px; }
#a5a { left: 1180px; top: 100px; }
#a5b { left: 1180px; top: 400px; }

.label-ai-ok {
  left: 1040px;
  top: 150px;
}

.label-ai-review {
  left: 1040px;
  top: 350px;
}

/* ==================== RESPONSIVE OPTIMISÃƒâ€° MOBILE ==================== */
@media (max-width: 768px) {
  .workflow-demo { 
    padding: 24px 16px;
    margin-top: 40px;
  }
  
  .workflow-header h3 {
    font-size: 1.5rem;
  }
  
  .workflow-subtitle {
    font-size: 14px;
    padding: 0 10px;
  }
  
  .workflow-toggle {
    width: 100%;
    justify-content: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .toggle-btn {
    padding: 10px 20px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  /* Stats condensées en ligne horizontale */
  .workflow-stats {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  
  .workflow-stats::-webkit-scrollbar {
    height: 4px;
  }
  
  .workflow-stats::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
  }
  
  .workflow-stats::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
  }
  
  .stat-card {
    flex: 0 0 auto;
    min-width: 90px;
    padding: 10px 12px;
    border-radius: 8px;
  }
  
  .stat-card:hover {
    transform: none;
  }
  
  .stat-label {
    font-size: 9px;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
    white-space: nowrap;
  }
  
  .stat-value {
    font-size: 16px;
    white-space: nowrap;
  }
  
  .stat-improvement {
    font-size: 9px;
    padding: 2px 6px;
    margin-top: 4px;
  }
  
  /* Canvas mobile */
  .canvas {
    min-height: 500px;
    padding: 30px 10px;
    position: relative;
    border-radius: 8px;
  }

  .canvas svg {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 1200px;
    min-height: 500px;
    overflow: visible;
  }
  
  .node {
    min-width: 120px;
    transform: translateY(-50%) !important;
  }
  
  .node:hover {
    transform: translateY(-50%) !important;
  }
  
  .node-header {
    padding: 10px 12px;
  }
  
  .node-title {
    font-size: 11px;
    line-height: 1.2;
  }
  
  .node-type {
    font-size: 9px;
  }
  
  .node-body {
    padding: 8px 10px;
    font-size: 9px;
  }
  
  .node.decision {
    width: 130px;
    height: 75px;
    min-width: 130px;
  }
  
  .node.start, .node.end {
    min-width: 100px;
    min-height: 70px;
  }
  
  .ai-badge {
    font-size: 7px;
    padding: 4px 7px;
  }
  
  .status-dot {
    width: 6px;
    height: 6px;
  }
  
  .decision-label {
    font-size: 9px;
    padding: 4px 8px;
  }
  
  .bottleneck-indicator {
    font-size: 8px;
    padding: 6px 10px;
    max-width: 120px;
  }
  
  /* Positions ajustees pour mobile */
  #t1, #a1 { left: 30px; top: 250px; }
  #t2, #a2 { left: 180px; top: 250px; }
  #t3, #a3 { left: 330px; top: 250px; }
  #t4, #a4 { left: 480px; top: 250px; }
  #t5 { left: 630px; top: 250px; }
  #t6a { left: 780px; top: 100px; }
  #t6b { left: 780px; top: 400px; }
  #t7 { left: 930px; top: 250px; }
  #t8 { left: 1060px; top: 250px; }
  
  #a5a { left: 630px; top: 100px; }
  #a5b { left: 630px; top: 400px; }
  #a6 { left: 780px; top: 250px; }
  #a7 { left: 910px; top: 250px; }
  
  .label-trad-yes { left: 700px; top: 140px; }
  .label-trad-no { left: 700px; top: 360px; }
  .label-ai-ok { left: 550px; top: 140px; }
  .label-ai-review { left: 550px; top: 360px; }
  
  .bottleneck-excel { left: 370px; top: 360px; }
  .bottleneck-email { left: 820px; top: 440px; }
  
  .metadata-panel {
    width: 100%;
    max-width: 100%;
    height: calc(100vh - var(--header-height, 80px));
  }
  
  .metadata-header {
    padding: 16px;
  }
  
  .metadata-header h4 {
    font-size: 16px;
  }
  
  .metadata-body {
    padding: 16px;
  }
  
  .metadata-badge {
    font-size: 10px;
    padding: 3px 8px;
  }
  
  .meta-section {
    margin-bottom: 12px;
  }
  
  .meta-section-header {
    padding: 10px 12px;
  }
  
  .meta-section-title {
    font-size: 11px;
  }
  
  .meta-section-body {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .workflow-header h3 {
    font-size: 1.3rem;
  }
  
  .workflow-subtitle {
    font-size: 13px;
  }
  
  .workflow-stats { 
    gap: 6px;
  }
  
  .stat-card {
    min-width: 80px;
    padding: 8px 10px;
  }
  
  .stat-label {
    font-size: 8px;
  }
  
  .stat-value {
    font-size: 14px;
  }
  
  .stat-improvement {
    font-size: 8px;
    padding: 2px 5px;
  }
  
  /* Ã¢Å“â€¦ CORRECTION : Hauteur encore augmentÃƒÂ©e sur trÃƒÂ¨s petits ÃƒÂ©crans */
  .canvas {
    min-height: 500px;  /* AugmentÃƒÂ© de 350px ÃƒÂ  500px */
    padding: 25px 8px;
  }
  
  .canvas svg {
    min-height: 500px;
  }
  
  .node {
    min-width: 95px;
    transform: translateY(-50%) scale(0.65) !important;
  }
  
  .node:hover {
    transform: translateY(-50%) scale(0.7) !important;
  }
  
  .node.decision {
    width: 110px;
    height: 65px;
    min-width: 110px;
  }
  
  .node-title {
    font-size: 10px;
  }
  
  .node-type {
    font-size: 8px;
  }
  
  .node-body {
    font-size: 8px;
    padding: 6px 8px;
  }
  
  #t1, #a1 { left: 25px; }
  #t2, #a2 { left: 150px; }
  #t3, #a3 { left: 275px; }
  #t4, #a4 { left: 400px; }
  #t5 { left: 525px; }
  #t6a { left: 650px; top: 120px; }
  #t6b { left: 650px; top: 380px; }
  #t7 { left: 775px; }
  #t8 { left: 900px; }
  
  #a4 { left: 400px; }
  #a5a { left: 525px; top: 120px; }
  #a5b { left: 525px; top: 380px; }
  #a6 { left: 650px; }
  #a7 { left: 775px; }
  
  .label-trad-yes { left: 590px; top: 160px; }
  .label-trad-no { left: 590px; top: 340px; }
  .label-ai-ok { left: 465px; top: 160px; }
  .label-ai-review { left: 465px; top: 340px; }
  
  .bottleneck-excel { 
    left: 300px; 
    top: 360px;
    font-size: 7px;
    padding: 5px 8px;
  }
  
  .bottleneck-email { 
    left: 680px; 
    top: 440px;
    font-size: 7px;
    padding: 5px 8px;
  }
  
  .metadata-panel {
    height: calc(100vh - var(--header-height, 80px));
  }
  
  .metadata-header {
    padding: 12px;
  }
  
  .metadata-header h4 {
    font-size: 14px;
  }
  
  .metadata-body {
    padding: 12px;
  }
}

/* ==================== PERFORMANCE ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ==================== PRINT ==================== */
@media print {
  .workflow-demo {
    page-break-inside: avoid;
  }
  
  .workflow-toggle,
  .metadata-panel,
  .metadata-overlay {
    display: none;
  }
}
