/* === Layout général === */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f5f5;
}

.layout {
  display: flex;
  min-height: 100vh;
}

/* === Barre latérale === */
.sidebar {
  width: 30px; /* 👈 largeur réduite par défaut */
  transition: width 0.3s ease;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  background-color: #006633;
  /* Vert BNP Paribas */
  color: white;
  padding: 10px;
  font-size: 0.7rem;
  /* ⬅️ Réduction globale de la police */

  font-family: 'Inter', sans-serif;


}

.sidebar:hover {
  width: 180px; /* 👈 largeur étendue au survol */
}

.sidebar h2 {
  font-size: 18px;
  margin-bottom: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar:hover h2 {
  opacity: 1;
}

.sidebar ul li a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: white;
  text-decoration: none;
  padding: 8px 0;
  transition: opacity 0.3s ease;
}


.sidebar-label {
  display: inline-block;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.3s ease, opacity 0.3s ease;
}

.sidebar:hover .sidebar-label {
  max-width: 120px;
  opacity: 1;
}



.sidebar ul {
  list-style: none;
  padding: 0;
}


.sidebar .icon {
  margin-right: 12px;
  vertical-align: middle;
}

.sidebar li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;

}

.select-custom {
  appearance: none;
  padding: 6px 12px;
  padding-right: 36px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  color: #333;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);

  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='10'%20height='7'%20viewBox='0%200%2010%207'%3E%3Cpath%20d='M1%201L5%205L9%201'%20stroke='%23006633'%20stroke-width='2'%20fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 7px;
}

::placeholder {
  color: #999;
  font-style: italic;
}

.select-custom::-ms-expand {
  display: none;
  /* ⬅️ Cache la flèche par défaut sur IE */
}

.select-custom:hover {
  border-color: #006633;
}

#recap-container {
  margin-top: 30px;
}
#charges-container {
  margin-top: 30px;
}

.btn-secondaire {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 500;
  background-color: #e0e0e0;
  color: #333;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-secondaire:hover {
  background-color: #ccc;
  transform: translateY(-1px);
}

.btn-secondaire:active {
  transform: scale(0.98);
}

.popup-content input,
.popup-content select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: #fff;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  height: 42px; /* ✅ force une hauteur uniforme */
}


.popup-content input:focus,
.popup-content select:focus {
  border-color: #006633;
  box-shadow: 0 0 0 2px rgba(0, 102, 51, 0.2);
  outline: none;
}


#btn-ajouter-operation {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 500;
  background-color: #006633; /* ✅ Vert BNP */
  color: white;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#btn-ajouter-operation i {
  font-size: 18px;
  float: left;
}

#btn-ajouter-operation:hover {
  background-color: #004d26; /* ✅ Vert BNP foncé au survol */
  transform: translateY(-1px);
}

#btn-ajouter-operation:active {
  transform: scale(0.98);
}

.champ-erreur {
  border: 2px solid #d9534f;
  background-color: #fbeaea;
}


.resultat-positif {
  color: green;
  font-weight: bold;
}

.resultat-negatif {
  color: rgb(160, 31, 31);
  font-weight: bold;
}


.btn-ajout-wrapper {
  text-align: right;
  margin-bottom: 20px;
  margin-right: 330px;
}

.select-custom:focus {
  outline: none;
  border-color: #006633;
  box-shadow: 0 0 0 2px rgba(0, 102, 51, 0.2);
}

.sidebar a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.sidebar a:hover {
  text-decoration: underline;
}

body {
  font-family: 'Inter', sans-serif;
}

.ligne-header input.select-custom {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.btn-principal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 500;
  background-color: #006633;
  color: white;
  border: none;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-principal:hover {
  background-color: #004d26;
  transform: translateY(-1px);
}

.btn-principal:active {
  transform: scale(0.98);
}

/* === Contenu principal === */
.content {
  flex: 1;
  padding: 30px;
  background-color: #f9f9f9;
}

/* === Encadrés === */
#encadre {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 30px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.bloc-patrimoine {
  display: inline-block;
  margin-bottom: 1px;
}

.patrimoine-table {
  width: auto;
  min-width: 170px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 15px;
  overflow: hidden;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  background-color: #006633;
  /* Vert BNP */
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  color: white;
  text-align: center;
  border: 2px solid #004d26;
  /* ✅ Contour net vert foncé */
  border-radius: 15x;
  /* ✅ Coins arrondis (optionnel) */
}

.patrimoine-table th {
  font-weight: bold;
  color: white;
  background-color: #006633;
  padding: 10px 16px;
  border: none;
}

.patrimoine-table td {
  font-weight: bold;
  color: black;
  /* 👈 couleur du montant */
  background-color: #ffffff;
  padding: 10px 16px;
  border: none;
  text-align: center;
}

.variation-text {
  font-size: 0.6rem;
  font-style: italic;
  font-weight: bold;
  text-align: center;
  margin-top: 4px;
  font-family: 'Inter', sans-serif;
}

/* === Filtres === */
#filtre {
  margin-bottom: 30px;
}

#filtre label {
  margin-right: 10px;
  font-weight: bold;
}

#filtre select {
  margin-right: 20px;
}

.filtre-bien {
  margin-top: 20px; /* ou 30px si tu veux plus d'espace */
}

/* === Graphiques côte à côte === */
.graph-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  justify-content: flex-start;
}
.cards-row {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.cards-row .encadre-bien {
  flex: 1 1 20px;
  text-align: center;
}

.ligne-biens-recap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 30px;
}

.ligne-biens-recap .encadre-bien {
  flex: 1 1 250px;
  min-width: 250px;
  text-align: center;
}

.card-rentabilite {
  width: 200px;
  min-width: 200px;
  max-width: 220px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}


.chart-canvas {
  max-height: 100%;
}

.graph-container {
  flex: 1 1 250px;
  max-width: 270px;
  background-color: white;
  padding: 5px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
}


/* === Couleurs personnalisées pour Chart.js === */
/* Line chart fonds et dividendes → bleu pâle */
.chart-line-color {
  border-color: #DAE3F3;
  background-color: rgba(218, 227, 243, 0.6);
}

/* Donut chart → palette personnalisée */
.chart-donut-colors {
  background-color: #FF6600, #FF99CC, #00B0F0, #BFBFBF, #FFD966;
}

.icon {
  font-size: 28px;
  color: white;
  margin-bottom: 20px;
  vertical-align: middle;
}

.icon:hover {
  color: white;
  transform: scale(1.1);
  transition: all 0.2s ease-in-out;
}

.logo-inline {
  width: 40px; /* ⬅️ Réduit la taille du logo */
  height: auto;
}


@media (max-width: 768px) {
  body {
    justify-content: center;
    background-position: center;
  }
  .card {
    margin-right: 0;
    width: 90%;
  }
}



#resultats-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.encadre-bien .ligne-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.encadre-bien .ligne-header span {
  flex: 1;
  font-weight: 500;
  font-size: 0.85rem;
}

.encadre-bien .ligne-header input.select-custom {
  flex: 1;
  max-width: 100px; /* ✅ ajuste ici selon la largeur souhaitée */
  padding: 6px 10px;
  font-size: 0.85rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.encadre-bien {
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  padding: 20px;
  width: 250px;
}
.encadre-bien.recap {
  background-color: #f0fdf6;
}

.encadre-bien h2 {
  margin-top: 0;
  color: #006633;
}



.ligne-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0;
  gap: 12px;
}


.edit-icon {
  cursor: pointer;
  color: #006633;
  font-size: 0.9rem;
}

.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 300px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.popup-content h3 {
  margin-top: 0;
  color: #006633;
}

.popup-content label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  color: #333;
}



.popup-content input,
.popup-content select {
  width: 100%;
  padding: 6px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.popup-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.graph-container {
  margin-top: 30px;
  padding: 20px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  width: 300px;
  text-align: center;
}

.graph-container h3 {
  margin-bottom: 20px;
  color: #006633;
  font-size: 1rem;
}

