/* ═══════════════════════════════════════════════════
   LAYOUT — ALTHEA MAP v4
═══════════════════════════════════════════════════ */

/* ── ACCUEIL ── */
#sHome {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── LISTE MAPs ── */
#sList {
  min-height: 100vh;
  padding: 28px 40px;
}

/* ── DASHBOARD ── */
#sDash {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#appHeader {
  height: 58px;
  flex-shrink: 0;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(100,116,139,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(100,116,139,.08), 0 4px 16px rgba(15,23,42,.04);
}

.d-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ── NAV LATÉRALE ── */
#dNav {
  width: 300px;
  flex-shrink: 0;
  background: #0F172A;
  border-right: 1px solid #0F172A;
  overflow-y: auto;
  padding: 12px 10px 20px;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── CONTENU PRINCIPAL ── */
#dMain {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
}

/* ── SYNTHÈSE LATÉRALE ── */
#dSynth {
  width: 330px;
  flex-shrink: 0;
  background: var(--paper2);
  border-left: 1px solid rgba(100,116,139,.1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: width .2s ease;
}
#dSynth:empty {
  width: 0;
  border: none;
}

.sy-hdr {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
  flex-shrink: 0;
}
.sy-t {
  font-family: 'DM Mono', ui-monospace, Consolas, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .05em;
  color: #64748B;
  margin-bottom: 3px;
}
.sy-client {
  font-size: 13px;
  color: #0F172A;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sy-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sy-stat {
  background: var(--paper);
  padding: 10px 14px;
  text-align: center;
}
.sy-val {
  font-family: 'DM Mono', ui-monospace, Consolas, monospace;
  font-size: 20px;
  font-weight: 500;
  color: #0F172A;
  line-height: 1;
  margin-bottom: 2px;
}
.sy-val.am { color: var(--amber); }
.sy-lbl {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink4);
  letter-spacing: .06em;
}
.sy-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px 24px;
}
.sy-grp { margin-bottom: 16px; }
.sy-gtitle {
  font-size: 11px;
  font-weight: 600;
  color: #0F172A;
  padding: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sy-badge-c {
  font-family: 'DM Mono', ui-monospace, Consolas, monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .05em;
  background: #FFF4E0;
  color: #BA7517;
  padding: 2px 7px;
  flex-shrink: 0;
}
.sy-item {
  display: flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 4px;
  margin: 0 -4px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color .12s ease;
}
.sy-item:hover { background: #F2F2F7; }
.sy-item.pv .sy-ilbl::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--amber);
  margin-right: 5px;
  vertical-align: 1px;
}
.sy-ilbl {
  font-size: 11px;
  color: #475569;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
  flex-shrink: 0;
}
.sy-dots {
  flex: 1;
  border-bottom: 1px dotted #CBD5E1;
  min-width: 12px;
}
.sy-ival {
  font-family: 'DM Mono', ui-monospace, Consolas, monospace;
  font-size: 10.5px;
  color: #0F172A;
  white-space: normal;
  text-align: right;
  word-break: break-word;
}
.sy-oui { color: #1D9E75; }

/* Ligne riche : label + pastilles qui s'enroulent (valeurs multi-parties) */
.sy-item.sy-rich {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}
.sy-rl {
  max-width: 100%;
  white-space: normal;
  font-weight: 600;
  color: #334155;
}
.sy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.sy-chip {
  font-family: 'DM Mono', ui-monospace, Consolas, monospace;
  font-size: 10px;
  color: #0F172A;
  background: #EEF2F6;
  padding: 2px 7px;
  border-radius: 5px;
  line-height: 1.5;
}
.sy-chip.pv { background: #FFF4E0; color: #BA7517; }

/* ── Onglets Paramètres ── */
.prm-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.prm-tab {
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}
.prm-tab:hover { color: var(--ink2); }
.prm-tab.act { color: #185FA5; border-bottom-color: #185FA5; }

.sy-empty-msg {
  padding: 24px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--ink4);
  line-height: 1.5;
}

/* ── TOAST CONTAINER ── */
#toastContainer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
