/* WALK PRO — Design Système Minimaliste & Professionnel
   Focus : Lisibilité, calme visuel et clarté institutionnelle */

:root {
  /* Palette de base plus douce */
  --ink: #111110;
  --ink-soft: #44423F;
  --muted: #71716A;
  --muted-light: #A1A19A;
  
  --line: #EBEBE6;
  --line-light: #F2F2ED;
  
  --paper: #F9F9F7;    /* Fond légèrement cassé pour moins de fatigue */
  --paper-2: #F2F2ED;
  --surface: #FFFFFF;  /* Cartes blanches pour le contraste */

  /* Couleurs d'accent Gallery-style */
  --burgundy: #8B2635;
  --accent: var(--burgundy);
  --accent-soft: rgba(139, 38, 53, 0.06);

  /* Typographie */
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --serif: 'Instrument Serif', serif;

  /* Structure */
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-flat: 0 1px 3px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.03);
}

/* --- THÈMES --- */

[data-aesthetic="brutalist"] {
  --paper: #F3F4F6;
  --surface: #FFFFFF;
  --line: #E5E7EB;
  --ink: #111827;
  --accent: #E11D48;
}

[data-aesthetic="dark"] {
  --paper: #0B0B0A;
  --surface: #141413;
  --ink: #E5E5E0;
  --muted: #888880;
  --line: #222220;
  --accent: #D97706;
  --accent-soft: rgba(217, 119, 6, 0.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

/* --- LAYOUT --- */

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* BARRE LATÉRALE */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}

.brand {
  display: flex; align-items: center; gap: 14px;
}
.brand-mark {
  width: 34px; height: 34px;
  background: var(--ink); color: var(--surface);
  border-radius: 6px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 18px;
}
.brand-name .t1 {
  font-family: var(--serif); font-weight: 500;
  font-size: 19px; letter-spacing: -0.01em;
}
.brand-name .t2 {
  font-family: var(--mono); font-size: 9px;
  color: var(--muted); text-transform: uppercase; margin-top: 2px;
}

.nav-section {
  font-family: var(--mono); font-size: 10px;
  color: var(--muted-light); text-transform: uppercase;
  margin: 12px 0 8px 12px;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 14px;
  background: transparent; border: none;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font: 500 14px var(--sans);
  cursor: pointer; transition: 0.2s;
  text-align: left;
}

.nav-item:hover { color: var(--ink); background: var(--paper); }
.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar-foot {
  margin-top: auto; padding-top: 20px;
  border-top: 1px solid var(--line-light);
}
.avatar-row { display: flex; align-items: center; gap: 12px; }
.avatar-row .av {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: white;
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}

/* MAIN CONTENT */
.topbar {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 40;
}

.content {
  padding: 40px 60px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.view { display: none; }
.view.active { display: block; animation: slideUp 0.4s ease; }

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

/* HERO */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
  padding: 20px 0 60px;
  border-bottom: 1px solid var(--line);
}

.hero-text h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: 52px; line-height: 1.1; margin: 0;
}
.hero-text h1 em { font-style: italic; color: var(--accent); }
.hero-text .lede {
  font-size: 18px; color: var(--ink-soft);
  margin-top: 24px; max-width: 480px;
}

.hero-feature {
  border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 4/5;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-flat);
  max-height: 500px;
}
.hero-feature img { width: 100%; height: 100%; object-fit: cover; }

.hero-actions { margin-top: 32px; display: flex; gap: 12px; }

/* INSIGHTS */
.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.insight {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: 0.2s;
  cursor: pointer;
}
.insight:hover { border-color: var(--muted-light); transform: translateY(-2px); box-shadow: var(--shadow-flat); }

.insight .label {
  font-family: var(--mono); font-size: 10px;
  color: var(--muted-light); text-transform: uppercase;
  margin-bottom: 20px;
}
.insight .headline {
  font-family: var(--serif); font-size: 32px; margin-bottom: 12px;
}

/* CHARTS & TABLES */
.chart-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 40px;
  height: 350px;
  display: flex;
  flex-direction: column;
}

.roi-table {
  margin-top: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--paper-2);
  padding: 14px 24px; text-align: left;
  font-family: var(--mono); font-size: 10px;
  color: var(--muted); border-bottom: 1px solid var(--line);
  text-transform: uppercase;
}
td { padding: 16px 24px; border-bottom: 1px solid var(--line-light); font-size: 13.5px; }

/* UI ELEMENTS */
.btn {
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font: 500 14px var(--sans);
  cursor: pointer; transition: 0.2s;
  border: 1px solid var(--line);
  background: var(--surface);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { background: var(--paper-2); }
.btn.primary {
  background: var(--ink); color: white; border-color: var(--ink);
}
.btn-text {
  background: transparent; border: none;
  text-decoration: underline; text-underline-offset: 4px;
  cursor: pointer; color: var(--muted); padding: 8px 0;
}

.mini-pill {
  padding: 4px 10px; background: var(--accent-soft);
  color: var(--accent); border-radius: 20px;
  font-family: var(--mono); font-size: 10px;
  font-weight: 600;
}

/* MODALES & DRAWERS */
.modal-bg, .drawer-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.05);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; transition: 0.3s;
}
.modal-bg.open, .drawer-bg.open { display: flex; opacity: 1; }

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 480px; padding: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  transform: translateY(10px); transition: 0.3s;
}
.modal-bg.open .modal { transform: translateY(0); }

.drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 400px;
  background: var(--surface); border-left: 1px solid var(--line);
  z-index: 1100; transform: translateX(100%); transition: 0.4s;
}
.drawer.open { transform: translateX(0); }

/* TIROIR DESIGN */
.tweak {
  position: fixed; bottom: 20px; left: 20px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; width: 280px; z-index: 900;
  box-shadow: var(--shadow-flat); padding: 20px;
}
.tweak.hidden { display: none; }
.seg {
  display: flex; background: var(--paper-2);
  padding: 4px; border-radius: 10px; margin: 10px 0 20px;
}
.seg button {
  flex: 1; border: none; background: transparent;
  padding: 8px; font: 500 10px var(--mono);
  cursor: pointer; border-radius: 8px;
}
.seg button.active {
  background: var(--surface); color: var(--ink);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.swatches { display: flex; gap: 8px; margin-top: 10px; }
.sw {
  width: 28px; height: 28px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent;
}
.sw.sel { border-color: var(--ink); transform: scale(1.1); }

/* TOASTS */
.toast-stack { position: fixed; bottom: 32px; right: 32px; z-index: 1200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast {
  background: var(--ink); color: white;
  padding: 12px 24px; border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  font-size: 13px; animation: slideIn 0.3s forwards;
  pointer-events: auto;
}
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* FORMULAIRES */
.field { margin-bottom: 20px; }
.field label {
  display: block; font-family: var(--mono); font-size: 10px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--paper);
  font: 14px var(--sans); outline: none;
}
.field input:focus { border-color: var(--accent); }
.radio-grid { display: flex; gap: 8px; }
.radio-chip {
  padding: 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); cursor: pointer;
  flex: 1; text-align: center; font-size: 13px;
}
.radio-chip.sel { background: var(--ink); color: white; }