/* style.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: #FFF;
  width: 100%;
  height: 100vh;
}

h2 {
  font-size: 1.17em;
}

/* background => fixe, centré */
.background {
  position: fixed;
  top: 0;
  left: 220px;
  width: calc(100% - 220px);
  height: 100vh;
  background: url("assets/bg.png") center center / cover no-repeat;
  z-index: 0;
}

/* input => style global */
input {
  padding: 12px;
  border: none;
  border-radius: 100px;
  outline: none;
  color: #fff;
  background: rgba(0,0,0,.17);
}

.sidebar-left {
  position: fixed;
  top: 0; 
  left: 0;
  width: 220px;
  height: 100vh;
  overflow-y: auto;
  background: #180E20;
  border-right: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  z-index: 10;
}
.app-logo {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

.mode-selector {
  margin-bottom: 20px;
  padding: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
}

.mode-selector label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

.mode-selector select {
  width: 100%;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 0.85rem;
}
.sidebar-left label {
  display: block;
  margin-top: 10px;
}
.sidebar-left button {
  margin-bottom: 10px;
}

.main-content {
  position: absolute;
  top: 0; 
  left: 220px;
  width: calc(100% - 220px);
  height: 100vh;
  overflow-y: auto;
  padding: 20px 40px;
  background: rgba(30, 10, 50, 0.2);
}

.btn {
  position: relative;
  display: inline-block;
  padding: 12px 20px;
  border: none;
  border-radius: 100px;
  background-color: rgba(120,50,150,0.4);
  color: #FFF;
  cursor: pointer;
  transition: background 0.3s;
}
.btn:hover {
  background-color: rgba(120,50,150,0.6);
}

/* analytics-section */
.analytics-section {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  margin-bottom: 20px;
}
.stats-cards {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.card {
  background: rgba(0,0,0,0.1);
  flex: 1;
  min-width: 160px;
  display: flex; 
  flex-direction: column;
  justify-content: center; 
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: background 0.3s;
}
.card h3 {
  margin-bottom: 8px;
  font-weight: 600;
}
.card p {
  font-size: 1.4rem;
  font-weight: bold;
}
.row-2columns {
  display: flex;
  gap: 20px;
}

/* add-lot-section */
.add-lot-section {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  margin-bottom: 20px;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.calc-latent-section {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 10px;
  backdrop-filter: blur(8px);
  flex: 1;
  display: flex;
  flex-direction: column; 
}
.calc-latent-section .stats-cards {
  display: flex;
  flex: 1; 
  gap: 20px;
  width: 100%;
  margin: 20px 0;
  height: 100%;
  align-items: stretch; 
}

.field-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.field-group label {
  width: 130px;
  text-align: right;
}

section {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}
#lotsContainer,
#historyContainer {
  padding: 15px;
  border-radius: 8px;
  min-height: 80px;
  margin-top: 10px;
}
.lot-line,
.history-line {
  background-color: rgba(0,0,0,0.1);
  margin-bottom: 10px;
  padding: 20px;
  border-radius: 10px;
}
.lot-line-inputs {
  display: flex;
  gap: 10px;
  margin-top: 5px;
}
.latent-value {
  font-size: 1.4rem;
  font-weight: bold;
  color: #FFF;
}
.gain-positive {
  color: #7fdd7f !important;
}
.gain-negative {
  color: #f55a5a !important;
}

/* forecast-card */
.forecast-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  padding: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.forecast-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
}
.forecast-inputs label {
  width: 180px;
  text-align: right;
}
.forecast-inputs input {
  width: 140px;
}

@media (max-width: 900px) {
  .sidebar-left {
    display: none;
  }
  .main-content {
    position: static;
    width: 100%;
    margin: 0;
    height: auto;
    overflow-y: auto;
    padding: 20px;
  }
  .calc-latent-section .stats-cards {
    flex-direction: column;
  }
}