html,
body {
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #f2f2f2;
  color: #381a0a;
}



.logo-header {
    width: 100%;
    margin: 0;
    padding: 0 0 0 5px; /* uniquement un léger retrait à gauche */
    line-height: 0;      /* supprime l'espace sous l'image */
}

.logo-header img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 90px;
    object-fit: contain;
    margin-top: 0px;    
    margin-bottom: 15px;
}

/* Conteneur du label */
.tooltip-label {
    position: relative;
    display: inline-block;
    cursor: help;
}

/* Infobulle */
.tooltip-label::after {
    content: attr(data-tooltip);

    position: absolute;

    left: calc(100% + 12px);   /* ✅ à droite du libellé */
    top: 50%;
    transform: translateY(-50%);

    width: 260px;

    background: #FFD4AC;
    color: #424242;

    padding: 10px 12px;

    border-radius: 6px;
    border: 1px solid #e3b17f;

    font-size: 12px;
    font-weight: normal;
    line-height: 1.4;

    white-space: normal;

    opacity: 0;
    visibility: hidden;
    transition: all 0.15s ease;

    z-index: 9999;

    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* Apparition au survol */
.tooltip-label:hover::after {
    opacity: 1;
    visibility: visible;
}
.container {
  display: flex;
  align-items: flex-start;
}

/* Colonne gauche */
.champ input,
.champ select {
  width: 100%;
  max-width: 120px; /* ✅ limite la largeur */
}

.ligne-double {
  display: flex;
  gap: 10px;
  margin-top: 3px;
}

.champ {
  flex: 1;
}

.champ label {
  display: block;
  margin-bottom: 0px;
  font-size: 11px;
}


.sidebar {
  width: 22%;
  padding: 20px;
  background-color: #424242;
  color: white;
  box-sizing: border-box;

  position: sticky;
  top: 0;

  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden; /* ✅ */
}


.sidebar h2 {
  margin-top: 0;
}

.sidebar h3 {
  margin-top: 10px;
  margin-bottom: 10px;
}

.sidebar label {
  display: block;
  margin-top: 5px;
  
}

.sidebar input,
.sidebar select {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border: none;
  border-radius: 5px;
}

.sidebar small {
  display: block;
  font-size: 11px;
  margin-top: 5px;
}

#revenu {
  background-color: #FFD4AC;
  font-weight: bold;
}
.btn-pdf {
    display: block;
    width: fit-content;

    margin: 12px auto 0 auto;

    padding: 5px 10px;

    background: #ff7a1a;
    color: white;

    border: none;
    border-radius: 5px;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.btn-pdf:hover {
    background: #e5670f;
    transform: translateY(-1px);
}

.btn-pdf:active {
    transform: translateY(0);
}

/* Colonne droite */
.main {
  width: 80%;
  padding: 20px;
  padding-top: 5px;
  box-sizing: border-box;
}

.main h1 {
  color: #424242;
}

.ligne-synthese {
    display: flex;
    gap: 35px;
    margin: 10px 0 15px 0px;
    align-items: center;
}

.kpi {
    text-align: center;
}

.kpi-label {
    font-size: 11px;
    font-weight: bold;
    color: #666;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.kpi-value {
    background: #fe7d19;
    color: 381a0a;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: bold;
    min-width: 120px;
}












#kpiTOTAL {
    font-size: 1.2em;
    font-weight: 700;
        min-width: 140px;
}


.kpi-zero{
    background:#f0f0f0;
    color:#666;
}

.operateur {
    font-size: 28px;
    font-weight: bold;
    color: #777;
    margin-top: 18px;
}

/* Blocs */
.bloc {
  background-color: white;
  font-size: 11px;
  padding: 10px;
  border-radius: 2px;
  margin-bottom: 5px;
  color: #424242;
  
  border-bottom: 1px solid #eee;

}



.bloc h3 {
  font-size: 13px;
  font-weight: 600;
  padding-left: 8px;
  border-left: 3px solid #ff7a1a;
  margin-bottom: 6px;
}



/* Graph placeholder */
#graph {
  background-color: white;
  border-radius: 8px;
  padding: 10px;
}

#revenu {
  text-align: right;
  font-weight: bold;
  letter-spacing: 1px;
}
.impot-line {
    display: flex;
    align-items: center; /* Aligne le label et la valeur verticalement au centre de la ligne */
    
    gap: 15px; /* Espace entre le label et la box de valeur */
    margin-bottom: 10px; /* Espacement entre chaque ligne de résultat */
    font-size: 1.1em;
    color: #333;
}

.impot-line .impot-label {
    /* flex-grow: 1; -> Supprimé : Le label ne s'étire plus pour prendre tout l'espace */
    text-align: right; /* Le texte du label est aligné à droite à l'intérieur de son propre espace */
    /* padding-right: 15px; -> Plus nécessaire avec 'gap' sur le parent */
    font-weight: bold;
}

.impot-label {
  font-size: 13px;
  font-weight: bold;
  color: #381a0a;
}

.impot-box {
    flex-shrink: 0;
    min-width: 60px;
    text-align: right;
    background-color: #FE7D19;
    border: 1px solid white;
    padding: 5px 10px;
    border-radius: 5px;
    color: #424242;
    font-weight: bold;
}

.mini-box {
  background-color: #f2f2f2;
  color: #424242;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: bold;
  display: inline-block;
  margin-left: 5px;
}

.mini-bloc {
  background-color: #f2f2f2;
  padding: 6px 10px;
  border-radius: 5px;
  margin-right: 10px;
  display: inline-block;

}

.ligne-resultat-double {
  display: flex;
  font-size: 11px;
  gap: 20px;
  margin-bottom: 5px;
}

.ligne-resultat-double > div {
  flex: 1;
}

.ligne-boutons {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
}

.ligne-boutons button {
  width: 48%;
  white-space: nowrap;
  font-size: 13px;
}

.plafond-info {
  margin-top: 10px;
}

.plafond-titre {
  font-weight: bold;
  font-size: 11px;
  margin-bottom: 10px;
  color: #424242;
}

.plafond-ligne {
  margin-bottom: 5px;
}

.plafond-label {
  margin-right: 10px;
}

.ligne-resultat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5px 0;
}

.ligne-resultat span:first-child {
  max-width: 70%;
}

.ligne-resultat.important {
  margin-top: 10px;
  font-weight: bold;
}

hr {
  border: none;
  height: 1px;
  background-color: #ddd;
  margin: 10px 0;
}



.simulation-toolbar input[type="text"],
.simulation-toolbar input[type="number"] {
    width: 110px;
}

.simulation-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-simulation {
    margin-left: 20px;
}

.simulation-info {
    margin-left: 15px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}
