/* ================================================================
   Calculateur BFR — manager-go.com
   ================================================================ */

.mg-bfr-tool {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  background-color: #ece5ff !important;
  font-size: 1rem;
  color: #2c3e50;
}

.mg-bfr-tool__body {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .mg-bfr-tool__body {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.mg-bfr-field {
  margin-bottom: 1.1rem;
}

.mg-bfr-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.mg-bfr-hint {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 1px;
}

.mg-bfr-input-wrap {
  position: relative;
  display: flex;
  align-items: center;

}

.mg-bfr-input-wrap input[type="text"],
.mg-bfr-input-wrap input[type="number"] {
  width: 100%;
  padding: 0.45rem 2.5rem 0.45rem 0.75rem;
  /*border: 1px solid #ced4da;*/
	border: 3px solid var(--mgo-channel-primary, #ced4da) !important;
  border-radius: 0.75rem;
  font-size: 1rem;
  color: #2c3e50;
  background-color: #fff;
  transition: border-color 0.15s ease-in-out;
  -moz-appearance: textfield;
}

.mg-bfr-input-wrap input[type="number"]::-webkit-inner-spin-button,
.mg-bfr-input-wrap input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.mg-bfr-input-wrap input[type="text"]:focus,
.mg-bfr-input-wrap input[type="number"]:focus {
  outline: none;
  border-color: #96c134;
}

.mg-bfr-unit {
  position: absolute;
  right: 0.75rem;
  color: #6c757d;
  font-size: 0.9rem;
  pointer-events: none;
}

.mg-bfr-tool__results {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Garde les résultats visibles pendant le scroll, sur desktop. */
@media (min-width: 992px) {
  .mg-bfr-tool__results {
    position: sticky;
    top: 1rem;
  }
}

.mg-bfr-result-main {
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: 0.5rem;
  border: 3px solid #dee2e6;
  background-color: #f8f9fa;
  transition: border-color 0.2s, background-color 0.2s;
}

.mg-bfr-result-main--neutral {
  border-color: #dee2e6;
  background-color: #f8f9fa;
}

.mg-bfr-result-main--good {
  border-color: #96c134;
  background-color: #f4faeb;
}

.mg-bfr-result-main--positive {
  border-color: #47cd78;
  background-color: #e5f4ed;
}

.mg-bfr-result-main--warning {
  border-color: #ffc107;
  background-color: #fff8e1;
}

.mg-bfr-result-main--danger {
  border-color: #da4d5a;
  background-color: #fde8ea;
}

.mg-bfr-result-label {
  font-size: 0.85rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.mg-bfr-result-amount {
  font-size: 2.2rem;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.1;
}

.mg-bfr-result-days {
  font-size: 0.9rem;
  color: #6c757d;
  margin-top: 0.3rem;
}

.mg-bfr-badge {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.25rem 0.75rem;
  border-radius: 50rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.mg-bfr-badge--neutral {
  background-color: #e9ecef;
  color: #495057;
}

.mg-bfr-badge--good {
  background-color: #96c134;
  color: #fff;
}

.mg-bfr-badge--positive {
  background-color: #198754;
  color: #fff;
}

.mg-bfr-badge--warning {
  background-color: #ffc107;
  color: #664d03;
}

.mg-bfr-badge--danger {
  background-color: #dc3545;
  color: #fff;
}

.mg-bfr-formula {
  /*background-color: #f0f2f5;*/
background-color: #fff;
border-radius: 0.375rem;
padding: 1rem;
}

.mg-bfr-formula__title {
font-size: 0.8rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #6f7275;
margin-bottom: 0.6rem;
}

.mg-bfr-formula__items {
display: flex;
flex-direction: column;
gap: 0.3rem;
}

.mg-bfr-formula__item {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.92rem;
padding: 0.25rem 0;
}

.mg-bfr-formula__item--total {
border-top: 1px solid #ced4da;
margin-top: 0.2rem;
padding-top: 0.5rem;
font-weight: 700;
}

.mg-bfr-formula__op {
width: 1.1rem;
text-align: center;
font-weight: 700;
color: #6c757d;
flex-shrink: 0;
}

.mg-bfr-formula__item--sub .mg-bfr-formula__op {
color: #dc3545;
}

.mg-bfr-formula__name {
flex: 1;
}

.mg-bfr-formula__val {
font-weight: 600;
font-variant-numeric: tabular-nums;
text-align: right;
}

.mg-bfr-bars {
display: flex;
flex-direction: column;
gap: 0.6rem;
}

.mg-bfr-bar-row {
display: flex;
align-items: center;
gap: 0.6rem;
font-size: 0.85rem;
}

.mg-bfr-bar-label {
width: 5.5rem;
flex-shrink: 0;
color: #6c757d;
}

.mg-bfr-bar-track {
flex: 1;
height: 10px;
background-color: #e9ecef;
border-radius: 5px;
overflow: hidden;
}

.mg-bfr-bar {
height: 100%;
border-radius: 5px;
transition: width 0.4s ease;
width: 0;
}

.mg-bfr-bar--stocks { background-color: #4d6d8d; }
.mg-bfr-bar--creances { background-color: #96c134; }
.mg-bfr-bar--dettes { background-color: #e19940; }

.mg-bfr-bar-pct {
width: 2.5rem;
text-align: right;
flex-shrink: 0;
color: #6c757d;
}

.mg-bfr-interpretation {
font-size: 0.9rem;
color: #495057;
line-height: 1.55;
padding: 0.75rem 1rem;
/*background-color: #f8f9fa;*/
	background-color: #fff;
/*border-left: 3px solid #96c134;*/
/*border-radius: 0 0.375rem 0.375rem 0;*/
}

.mg-bfr-tool__footer {
margin-top: 1.25rem;
padding-top: 0.75rem;
border-top: 1px solid #dee2e6;
font-size: 0.8rem;
color: #6f7275;
text-align: center;
}

.mg-bfr-tool__footer p {
margin: 0;
}

.mg-bfr-tool__formula {
margin-bottom: 0.45rem;
}

.mg-bfr-tool__disclaimer {
max-width: 58rem;
margin: 0.55rem auto 0 !important;
font-size: 0.72rem;
line-height: 1.45;
color: #8a96a3;
}
