:root {
  --bg: linear-gradient(135deg, #05071a 0%, #071229 100%);
  --panel: rgba(10,12,22,0.82);
  --panel-light: rgba(18,22,36,0.75);
  --accent: #0b2140; /* deep blue */
  --accent-hover: #6b2233; /* dark bordeaux */
  --muted: #8892a6;
  --edge-glow: rgba(0,0,0,0);
  --shadow-subtle: 0 6px 18px rgba(0,0,0,0.45);
}
html,body {
  height:100%; margin:0;
  background: var(--bg);
  color:#fff;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.5;
}
#sigma-container { position: absolute; inset:0; backdrop-filter: blur(1px); }

.panel {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  box-shadow: var(--shadow-subtle);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.5);
}

h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
  color: #cfe4ff;
}

.muted { color: var(--muted); font-size:13px; margin-top:6px; }
.controls { display:flex; gap:8px; margin-top:12px; flex-wrap: wrap; }
button.btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  color: #e6eef8;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: none;
  font-weight: 600;
  font-size: 13px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  position: relative;
  overflow: hidden;
}
button.btn:hover {
  border-color: rgba(107,34,51,0.9);
  color: #fff;
  transform: translateY(-2px);
}
button.btn:active { transform: translateY(-1px); }

/* Recenter button emphasis */
#recenter-btn {
  background: linear-gradient(180deg, #8a0f4e 0%, #6b2233 100%);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 30px rgba(139,15,78,0.22);
  font-weight: 800;
  letter-spacing: 0.3px;
  text-align: center;
  padding: 10px 12px;
}
#recenter-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(139,15,78,0.32);
  border-color: rgba(255,255,255,0.18);
}

input#search-box { outline:none; box-shadow: none; border:1px solid rgba(255,255,255,0.06); color:#e6eef8; background: rgba(0,0,0,0.28); border-radius:8px; padding:10px 12px; font-size:14px; }
input#search-box:focus { box-shadow: 0 6px 14px rgba(0,0,0,0.45); border-color: rgba(255,255,255,0.12); }

#selected-panel .col-item { cursor:pointer; padding:3px 0; color:#cfe4ff; transition: all 120ms ease; }
#selected-panel .col-item:hover { color: var(--accent-hover); transform: translateX(2px); }

/* Amélioration des transitions globales */
#sigma-container {
  transition: filter 200ms ease;
}

.panel {
  transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1), transform 150ms ease;
}

/* Subtle focus treatment */
button.btn:focus { outline: 2px solid rgba(255,255,255,0.04); }

/* Info modal overlay */
#info-overlay {
  position: fixed;
  inset: 0;
  display: none; /* flex when open */
  align-items: center;
  justify-content: center;
  background: rgba(3,6,12,0.6);
  backdrop-filter: blur(6px);
  z-index: 1000;
}
#info-modal {
  /* Image de fond fournie (placer info-bg.jpg dans le dossier du projet) */
  background:
  url('/public/assets/images/hero_background.png') center/cover no-repeat;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.65);
  color: #e6eef8;
  width: 55%;
  max-height: 80vh;
  overflow: auto;
  padding: 0;
  text-align: center;
}
#info-modal h3 {
  margin: 0;
  padding: 28px 24px 20px 24px;
  font-size: 22px;
  font-weight: 700;
  color: #eef6ff;
  background: linear-gradient(180deg, rgba(0,0,0,0.28), rgba(0,0,0,0.14));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px 16px 0 0;
}
#info-modal .desc {
  color: #d7e6fb;
  font-size: 16px;
  margin: 0;
  padding: 24px 28px 28px 28px;
  line-height: 1.7;
  font-weight: 400;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.00));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
#info-modal .sections-container {
  padding: 0 28px 24px 28px;
  text-align: left;
}
#info-modal .section {
  margin: 20px 0;
  margin-left: 10px;
  margin-right: 10px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.38);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
#info-modal .section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.15) inset;
}
#info-modal .section-title {
  color: #eef6ff;
  font-weight: 700;
  margin: 0 0 12px 0;
  font-size: 16px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  letter-spacing: 0.3px;
}
#info-modal p {
  margin: 0;
  color: #e0e8f5;
  line-height: 1.6;
  font-size: 15px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  font-weight: 400;
}
#info-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 28px 28px 28px;
  background: linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.2));
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 0 0 16px 16px;
}
#info-close {
  background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.08));
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 14px 28px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.2) inset;
  font-weight: 700;
  font-size: 15px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  transition: all 200ms ease;
  min-width: 140px;
}
#info-close:hover {
  background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.12));
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 1px 0 rgba(255,255,255,0.3) inset;
}

/* Bouton flottant en bas à droite (sobre) */
#floating-info-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1100;
  background: linear-gradient(135deg, #0a0f3b 0%, #1b0d3a 50%, #8a0f4e 100%);
  color: #f3f7ff;
  border: 1px solid rgba(255,255,255,0.06);
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,0.45);
  font-weight: 600;
  transition: transform 160ms ease;
}
#floating-info-btn:hover { transform: translateY(-2px); }

/* Labels styling - leave color to Sigma so we can hide/show dynamically */
#sigma-container text {
  font-weight: bold;
}
/* sigma-label styling left to renderer */

/* Panel specific tweaks */
#params-panel {
  transition: transform 200ms ease, opacity 200ms ease;
  transform-origin: left top;
  /* subtle panel background using intro image */
  background: linear-gradient(180deg, rgba(6,8,14,0.7), rgba(6,8,14,0.6)), url('/public/assets/images/hero_background.png') center/cover no-repeat;
  border: 1px solid rgba(107,34,51,0.14); /* soft bordeaux accent */
  backdrop-filter: blur(6px) saturate(110%);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.6);
  color: #e6f4ff;
}

/* Side panel should match params panel visually */
#side-panel {
  transition: transform 200ms ease, opacity 200ms ease;
  transform-origin: right top;
  background: linear-gradient(180deg, rgba(6,8,14,0.7), rgba(6,8,14,0.6)), url('/public/assets/images/hero_background.png') center/cover no-repeat;
  border: 1px solid rgba(107,34,51,0.14);
  backdrop-filter: blur(6px) saturate(110%);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.6);
  color: #e6f4ff;
}

/* Make the params panel scrollable while keeping header visible */
#params-panel {
  max-height: 85vh;
  overflow: hidden;
}
#params-panel #params-body {
  overflow-y: auto;
  max-height: calc(85vh - 64px); /* leave room for header */
  padding-right: 6px; /* avoid scrollbar overlap */
}

#side-panel .muted { color: #cfe9ff }

/* Selected info panel inside side-panel should look like a card */
#selected-panel {
  margin-top:10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  padding:10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 18px rgba(0,0,0,0.45);
  color: #e6eef8;
}

/* Search box and results tweaks to match params style */
#side-panel input#search-box {
  outline:none;
  box-shadow: none;
  border:1px solid rgba(255,255,255,0.06);
  color:#e6eef8;
  background: rgba(0,0,0,0.28);
  border-radius:8px;
  padding:10px 12px;
  font-size:14px;
  width:100%;
}

#side-panel input#search-box:focus { box-shadow: 0 6px 14px rgba(0,0,0,0.45); border-color: rgba(255,255,255,0.12); }

#search-results {
  margin-top:8px;
  max-height:220px;
  overflow:auto;
  padding:8px;
  border-top:1px solid rgba(255,255,255,0.02);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
  border-radius:8px;
}


