body {
  height: 95vh;
  width: 100%;
  margin: 0;
  font-family: 'Roboto', Arial, sans-serif;
  background-color: #f8f9fa;
}

.d-none {
  display: none;
}

.card {
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card {
  background-color: white;
}

.form-login input,
.form-login button {
  border-radius: 0px;
  padding: 12px;
  margin: 8px 0;
  font-size: 14px;
}

.form-login input {
  width: 100%;
  height: 30px;
  border: 1px solid #ced4da;
}

.form-login button {
  width: 100%;
  background-color: #809DB1;
  color: white;
  font-weight: bold;
  border: none;
}

.form-login button:hover {
  background-color: #2C4266;
    color: white;
}

.container-fluid {
  height: 100vh;
}

#search-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 5%;
  margin-bottom: 25px;
}

.data-container {
  height: 80%;
}

.left-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.right-container {
  height: 100%;
}

#pdf-viewer-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

#pdfViewer {
  flex-grow: 1;
  height: 100%;
}

iframe {
  border: none;
  height: 100%;
  width: 100%;
}

#results-container h2,
#indicators-container h2,
#pdf-viewer-container h2 {
  font-size: 1.25rem;
  color: #212529;
}

#results-container,
#indicators-container,
#pdf-viewer-container {
  padding: 10px;
}

#indicators-container {
  padding: 10px;
}

#priceDensityChart {
  width: 100%;
  max-height: 200px;
  pointer-events: auto;
}

#priceInfo {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  padding-left: 5px;
  width: 100%;
}

#priceInfo p {
  font-size: 12px;
  margin: 0px;
  width: 50%;
  color: #2b2d30;
}

#priceInfo p.prices {
  font-size: 13px;
  color: #000000;
}

#priceInfo p.priceInfoHead {
  font-size: 13px;
  color: #000000;
  font-weight: bold;
  width: 100%;
}

#results-container {
  height: 70%;
  overflow-y: auto;
}

.results {
  max-height: 100%;
}

.col {
  display: flex;
  justify-content: center;
  align-items: center;
}

.tokens {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.token-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 5px;
  padding: 8px 6px;
  background-color: #809DB1 !important;
}

.btn-close {
  margin-left: 5px;
  font-size: 10px;
  color: white;
  opacity: 0.8;
}

.token-badge .btn-close:hover {
  opacity: 1;
}

.results li {
  cursor: pointer;
  padding: 0px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
}

.list-group-item {
  margin-bottom: 10px;
}

.list-group-item.active {
  border: none;
}

.results li:hover .item-name {
  background-color: #cfe2f3;
  border-left: 5px solid #2C4266;
  color: #2b2d30;
}

.results li.active .item-name {
  background-color: #cfe2f3;
  border-left: 5px solid #2C4266;
  color: #2b2d30;
}

.results li.active .item-details {
  color: #2b2d30;
}

.result-content {
  font-size: 14px;
  display: flex;
  justify-content: start;
  flex-direction: column;
}

.result-content i {
  font-size: 20px;
  cursor: pointer;
  color: #2b2d30;
  transition: color 0.3s ease;
}

.item-name {
  flex: 1;
  padding: 3px;  
  background-color: #809DB1;
  color:white;
  font-size: 12px;
  font-weight: bold;
}


.item-name i{
  font-size: 10px; 
  color: #2C4266;
}


.item-details {
  display: grid;
  grid-template-rows: auto auto;
  grid-template-columns: 1fr 40px;
  width: 100%;
  padding: 3px;
  border-top: 1px solid #ddd;
  background-color: #f1f1f1;
}

.item-details-line1 {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 2fr)) minmax(0, 1fr);
  align-items: center;
}

.item-details-line2 {
  grid-column: 1;
  display: flex;
  justify-content: start;
  align-items: start;
  padding-top: 5px;
}

.item-details span {
  font-size: 11px;
  padding-left: 10px;
  white-space: nowrap;
}

.item-details ul li {
  list-style: none;
  margin: 0;
}

.item-link {
  grid-column: 2;
  grid-row: 1/3;
  display: flex;
  justify-content: center;
  align-items: center;
}

.item-link i {
  font-size: 25px;
}

#sticky-bookmark {
  position: absolute;
  top: 0px; /* Ajuste la distance depuis le haut de l'écran */
  right: 10px; /* Ajuste la distance depuis la droite de l'écran */
  background-color: #f8f9fa; /* Couleur de fond */
  border: 1px solid #ddd; /* Bordure */
  border-radius: 0 0 10px 10px; /* Coins arrondis */
  padding: 10px 20px;
  z-index: 1030; /* Pour s'assurer qu'il reste au-dessus */
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Ombre légère */
  text-align: center;
  font-size: 0.9em;
}

#sticky-bookmark p {
  margin: 0;
  font-weight: bold;
}

#sticky-bookmark button {
  margin-top: 5px;
}

h2 {
  color: #333;
}

#sticky-bookmark {
  gap: 0.5rem;
}

.btn-silver {
  background-color: #809DB1;
  color: white;
  border: none;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.5rem;
  margin: 0px 0px !important;
  text-decoration: none;
}

.btn-silver:hover {
  background-color: #2C4266;
}

.btn-outline-secondary{
  background-color: #FFF;
  color:#2C4266;
}

.btn-outline-secondary:hover {
  background-color: #809DB1;
}

p {
  margin: 0;
}

.alert {
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  color: #000;
}

.alert.success {
  background-color: green;
}

.alert.error {
  background-color: red;
}

.form-discountFactor {
  margin-top: 0px;
}

.editable-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px auto 10px auto;
}

.editable-table th,
.editable-table td {
  padding: 5px;
  border: 1px solid #ddd;
  text-align: center;
}

.editable-table td {
  width: 100px;
  cursor: pointer;
  height: 40px;
  vertical-align: middle;
  position: relative;
}

.editable-cell {
  position: relative;
}

.editable-cell input {
  font-size: 13px;
  background-color: #f0f8ff;
  text-align: center;
  border: none;
  color: #333;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.editable-cell span {
  display: inline-block;
  width: 100%;
  padding: 5px;
  font-size: 14px;
  text-align: center;
  line-height: 40px;
}

.editable-cell:hover {
  background-color: #e6f7ff;
}

.form-switch input {
  height: 20px;
}

/* Styles pour les filtres */
#filter-section {
  margin-bottom: 3px;
}

.filter-bar {
  background: #2C4266;
  box-shadow: 0 2px 8px rgba(44, 66, 102, 0.3);
}

.filter-bar .form-select-sm {
  font-size: 0.75rem;
  border-radius: 4px;
  border: 1px solid #ced4da;
  background-color: white;
  min-width: 120px;
  height: 32px;
  padding: 4px 8px;
}

.filter-bar .form-select-sm:focus {
  border-color: #809DB1;
  box-shadow: 0 0 0 0.15rem rgba(128, 157, 177, 0.25);
}

.filter-bar .input-group-sm .form-control {
  font-size: 0.75rem;
  border-radius: 4px;
  background-color: white;
  min-width: 80px;
  height: 32px;
  padding: 4px 8px;
}

.filter-bar .input-group-sm .form-control:focus {
  border-color: #809DB1;
  box-shadow: 0 0 0 0.15rem rgba(128, 157, 177, 0.25);
}

.filter-bar .input-group-sm .input-group-text {
  font-size: 0.75rem;
  background-color: #f8f9fa;
  border-color: #ced4da;
  padding: 4px 8px;
  height: 32px;
}

.filter-bar .btn-outline-light {
  border-color: #ffffff;
  color: #ffffff;
  border-radius: 4px;
  font-weight: 500;
  height: 32px;
  width: 32px;
  min-width: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-bar .btn-outline-light:hover {
  background-color: #ffffff;
  border-color: #ffffff;
  color: #2C4266;
}

.filter-bar .form-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px !important;
}

/* Alignement spécifique pour le bouton reset */
.filter-bar .align-items-end {
  align-items: flex-end !important;
  justify-content: space-around;
  padding:0px 20px;
}

.filter-bar .btn-outline-light {
  margin-bottom: 0;
}

/* Espacement des filtres */
.filter-bar .row.g-2 {
  gap: 0.5rem;
}

/* Styles pour les switches */
.filter-bar .form-check-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  padding-top:7px;
}

.filter-bar .form-check-input {
  margin-right: 0.2rem;
}

.filter-bar .d-flex.justify-content-center {
  padding: 1px 0;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive pour tablette et mobile */
@media (max-width: 991.98px) {
  .filter-bar .form-select-sm {
    min-width: 140px;
    height: 36px;
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  
  .filter-bar .input-group-sm .form-control {
    min-width: 100px;
    height: 36px;
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  
  .filter-bar .input-group-sm .input-group-text {
    padding: 6px 10px;
    font-size: 0.8rem;
    height: 36px;
  }
  
  .filter-bar .btn-outline-light {
    height: 36px;
    width: 36px;
    min-width: 36px;
  }
  
  .filter-bar .form-label {
    font-size: 0.75rem;
    margin-bottom: 3px !important;
  }
  
  .filter-bar .p-2 {
    padding: 0.75rem !important;
  }
  
  .filter-bar .row.g-2 {
    gap: 0.6rem;
  }
}

@media (max-width: 767.98px) {
  .filter-bar .row.mb-2 {
    margin-bottom: 8px !important;
  }
  
  .filter-bar .row.align-items-end {
    row-gap: 8px;
    justify-content: space-around;
  }
}

@media (max-width: 575.98px) {
  .filter-bar .form-select-sm {
    min-width: 160px;
    height: 38px;
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  
  .filter-bar .input-group-sm .form-control {
    min-width: 120px;
    height: 38px;
    font-size: 0.85rem;
    padding: 8px 12px;
  }
  
  .filter-bar .input-group-sm .input-group-text {
    padding: 8px 12px;
    font-size: 0.85rem;
    height: 38px;
  }
  
  .filter-bar .btn-outline-light {
    height: 38px;
    width: 38px;
    min-width: 38px;
  }
  
  .filter-bar .form-label {
    font-size: 0.8rem;
    margin-bottom: 4px !important;
  }
  
  .filter-bar .p-2 {
    padding: 1rem !important;
  }
  
  .filter-bar .row.g-2 {
    gap: 0.75rem;
  }
}

/* Styles pour les switches */

#filter_single_quote, #filter_discount_factor {
  margin-right: 0.75rem;
}

.form-check-input:checked {
  background-color: #809DB1;
  border-color: #809DB1;
}

.form-check-input:focus {
  border-color: #809DB1;
  box-shadow: 0 0 0 0.2rem rgba(128, 157, 177, 0.25);
}

.form-check-input {
  width: 1.2em;
  height: 1.2em;
  background-color: #e9ecef;
  border-color: #ced4da;
}

.form-check-label {
  font-size: 0.75rem;
  font-weight: 500;
  padding-left: 0.25rem;
}

.archives-container,
.settings-container {
  padding: 40px 100px 0px 100px;
}

#devisTable_filter {
  margin-bottom: 1rem;
  margin-top: 1rem;
}

#devisTable_filter input {
  width: 300px;
  margin-left: 0.5rem;
}

.dataTables_length {
  margin: 1rem 0;
}

.dataTables_filter {
  margin: 1rem 0;
}


#devistable table {
  table-layout: fixed;
  width: 100%;
}

#devistable table th,
#devistable table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

#devistable table td:nth-child(1),
#devistable table th:nth-child(1) {
  width: 250px;
}

#devisTable thead tr:first-child th {
  background-color: #2C4266 !important;
  color: white;
  font-weight: bold;
  text-align: center;
  border-radius: 0; /* Les <th> n'ont pas de border-radius par défaut */
}
#devisTable thead tr:first-child th:first-child{
  border-top-left-radius: 8px;
}
#devisTable thead tr:first-child th:last-child{
  border-top-right-radius: 8px;
}

#projectTable thead tr:first-child th {
  background-color: #2C4266 !important;
  color: white;
  font-weight: bold;
  text-align: center;
  border-radius: 0; /* Les <th> n'ont pas de border-radius par défaut */
}
#projectTable thead tr:first-child th:first-child{
  border-top-left-radius: 8px;
}
#projectTable thead tr:first-child th:last-child{
  border-top-right-radius: 8px;
}

/* Corrige : ne colorer que la première colonne, pas la première ligne entière */
.editable-table th:first-child, .editable-table td:first-child {
  background-color: #809DB1;
  color: white;
  font-weight: bold;
}

/* Corrige : ne colorer que la première ligne d'en-tête, pas la première ligne du tbody */
.editable-table thead tr:first-child th {
  background-color: #2C4266;
  color: white;
  font-weight: bold;
}

/* Styles pour les liens de détails de calculs */
.calculation-link {
  color: #2C4266 !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.calculation-link:hover {
  color: #809DB1 !important;
  text-decoration: underline !important;
}

.calculation-link:focus {
  outline: 2px solid #809DB1;
  outline-offset: 2px;
}

/* Amélioration de l'affichage dans la modal */
.modal-lg {
  max-width: 900px;
}

#calculationDetails .badge {
  margin: 2px;
  font-size: 0.85em;
}

#calculationDetails .small {
  background-color: #f8f9fa;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
}

.period-filter{
  flex-wrap: nowrap;
}

/* Styles centralisés pour remplacer les styles inline */

/* Styles pour les éléments cachés */
.hidden-element {
  display: none;
}

/* Style pour le logo */
.logo-style {
  height: 30px;
  margin: 10px 10px 0px 10px;
}

/* Styles pour les messages */
.message-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message-text {
  flex-grow: 1;
}

.message-close-btn {
  background: none;
  border: none;
  font-size: 2rem;
}

/* Styles pour les filtres de période */
.period-filter-width {
  max-width: 200px;
}

/* Styles pour les projets */
.project-margin-top {
  padding-top: 30px;
}

.project-container {
  margin-top: 30px;
}

.project-filter-section {
  display: flex;
  justify-content: flex-end;
}

/* Styles pour les boutons d'édition */
.edit-btn-color {
  color: lightseagreen;
}

/* Styles pour les icônes */
.warning-icon-hidden {
  opacity: 0;
}

/* Styles pour les tableaux */
.status-column-width {
  width: 120px;
}

.truncate-text {
  max-width: 400px;
}

.icon-container {
  min-width: 36px;
  justify-content: center;
}

/* Styles généraux pour toutes les tables */
table th {
  text-transform: uppercase;
  font-weight: bold !important;
  font-size: 0.8rem !important;
}

.table td {
  font-size: 0.9rem !important;
  vertical-align: middle;
}