/* Synthèse des codes production — styles isolés du reste de l'application. */
#synthese_code{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:hidden;
  box-sizing:border-box;
}

#synthese_code .scp-filter-card,
#synthese_code .scp-result-card{
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  background:#fff;
  border:1px solid #d8e0e7;
  border-radius:10px;
  padding:14px;
  margin-bottom:14px;
  box-shadow:0 2px 8px rgba(0,0,0,.05);
  overflow:hidden;
}

/* Les six filtres restent dans la largeur disponible, sans imposer de largeur minimale. */
#synthese_code .scp-filter-grid{
  display:grid;
  grid-template-columns:.82fr 1fr 1fr 1fr 1.08fr 1.28fr;
  gap:12px;
  align-items:end;
  width:100%;
  min-width:0;
}
#synthese_code .scp-field{
  min-width:0;
  max-width:100%;
}
#synthese_code .scp-field label{
  display:block;
  min-height:22px;
  margin:0 0 6px;
  font-weight:800;
  color:#17394a;
  line-height:1.15;
  overflow-wrap:anywhere;
}
#synthese_code .scp-field input,
#synthese_code .scp-field select{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  height:40px;
  padding:7px 10px;
  border:1px solid #b8c8d5;
  border-radius:7px;
  background:#fff;
  box-sizing:border-box;
  font-size:14px;
  text-overflow:ellipsis;
}

#synthese_code .scp-actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  justify-content:flex-end;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid #e5eaee;
  min-width:0;
}
#synthese_code .scp-actions button{
  min-height:38px;
  padding:8px 17px;
  border:1px solid #9fb3c1;
  border-radius:7px;
  background:#fff;
  color:#12384a;
  font-weight:800;
  cursor:pointer;
  white-space:nowrap;
}
#synthese_code .scp-actions button.scp-primary{
  background:#2d7889;
  border-color:#2d7889;
  color:#fff;
}
#synthese_code .scp-actions button:disabled{
  opacity:.55;
  cursor:not-allowed;
}

/* Boutons de la saisie des codes : même présentation que les autres modules. */
#code_production .code-production-action-bar{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  gap:10px !important;
  min-height:42px;
}
#code_production .code-production-action-btn{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:126px !important;
  min-height:40px !important;
  margin:0 !important;
  padding:9px 18px !important;
  border:1px solid #9fb3c1 !important;
  border-radius:7px !important;
  box-sizing:border-box !important;
  font-size:15px !important;
  line-height:1.2 !important;
  font-weight:800 !important;
  cursor:pointer !important;
  white-space:nowrap !important;
  box-shadow:none !important;
}
#code_production .code-production-save-btn{
  background:#fff !important;
  color:#12384a !important;
}
#code_production .scp-open-btn{
  background:#fff !important;
  border-color:#9fb3c1 !important;
  color:#12384a !important;
}
#code_production .code-production-action-btn:hover{
  filter:brightness(.97);
}

/* La zone KPI demandée est supprimée. Le statut n'apparaît qu'en cas d'erreur. */
#synthese_code .scp-status{
  display:none;
}
#synthese_code .scp-status.scp-error{
  display:block;
  margin:0 0 10px;
  padding:9px 11px;
  border-left:4px solid #b42318;
  border-radius:6px;
  background:#fff1f0;
  color:#9d1717;
  font-weight:800;
}
#synthese_code .scp-result-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  width:100%;
  min-height:26px;
  margin:0 0 7px;
}
#synthese_code .scp-range{
  display:block;
  max-width:100%;
  font-size:13px;
  font-weight:800;
  color:#365365;
  text-align:right;
  overflow-wrap:anywhere;
}

#synthese_code .scp-table-scroll{
  position:relative;
  width:100%;
  max-width:100%;
  min-width:0;
  max-height:58vh;
  overflow:auto;
  border:1px solid #aebdca;
  border-radius:8px;
  background:#fff;
  box-sizing:border-box;
}
#synthese_code table{
  width:100%;
  min-width:940px;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
}
#synthese_code th,
#synthese_code td{
  border-right:1px solid #8e9da8;
  border-bottom:1px solid #8e9da8;
  padding:9px 8px;
  text-align:center;
  vertical-align:middle;
  overflow-wrap:anywhere;
}
#synthese_code th:last-child,
#synthese_code td:last-child{
  border-right:0;
}
#synthese_code thead th{
  position:sticky;
  top:0;
  z-index:3;
  background:#d8e4ef;
  color:#0b2634;
  font-weight:900;
}
#synthese_code tbody tr:nth-child(even) td{
  background:#f8fafb;
}
#synthese_code td.scp-code{
  font-weight:900;
  color:#125267;
  text-align:left;
}
#synthese_code td.scp-provenance{
  text-align:left;
}
#synthese_code .scp-type{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  background:#e9f4f7;
  border:1px solid #b6dbe3;
  color:#15586a;
  font-weight:900;
  font-size:12px;
}
#synthese_code .scp-empty{
  padding:24px;
  color:#667782;
  font-weight:800;
}

@media(max-width:1350px){
  #synthese_code .scp-filter-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media(max-width:850px){
  #synthese_code .scp-filter-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #synthese_code .scp-actions{
    justify-content:stretch;
  }
  #synthese_code .scp-actions button{
    flex:1 1 150px;
  }
}
@media(max-width:600px){
  #synthese_code .scp-filter-grid{
    grid-template-columns:1fr;
  }
  #code_production .code-production-action-bar{
    flex-wrap:wrap;
  }
  #code_production .code-production-action-btn{
    flex:1 1 140px;
  }
}
