/* ==========================================================================
   layout.css - Structure globale & Gabarits d'écran (projetWebPhoto)
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* --------------------------------------------------------------------------
   En-tête universel persistant
   -------------------------------------------------------------------------- */
.app-header {
  height: 56px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-direction: row-reverse;
}

.app-title-group {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.app-title {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.app-pole-badge {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* --------------------------------------------------------------------------
   Gabarit Universel 3 Zones (Bureau & Tablettes Paysage)
   -------------------------------------------------------------------------- */
.workspace-grid {
  display: grid;
  grid-template-columns: 340px 1fr 340px;
  gap: var(--space-4);
  padding: var(--space-4);
  flex: 1;
  max-width: 1920px;
  margin: 0 auto;
  width: 100%;
}

.panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  overflow-y: auto;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-2);
}

.panel-title {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Zone centrale d'affichage Canvas / Schémas */
.visualizer-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--canvas-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

.visualizer-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   Adaptation Mobile (Flux vertical compact sous le pouce)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    padding: var(--space-2);
    gap: var(--space-3);
  }

  .visualizer-zone {
    min-height: 300px;
  }
}