* {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}
label,
input[type="text"],
input[type="checkbox"],
input[type="password"],
input[type="number"],
span,
span[role="textbox"] {
  height: calc(1.2rem + 2px);
  vertical-align: middle;
  padding-top: 0;
  padding-bottom: 0;
}
textarea[type="text"] {
  height: calc(2rem + 2px);
  vertical-align: middle;
  padding-top: 0;
  padding-bottom: 0;
}
pre {
  padding-bottom: 0;
  margin-bottom: 0;
}
.rowthin {
  height: calc(1.4rem + 2px);
}
.col-form-label {
  padding-top: 0;
  padding-bottom: 0;
}
.form-control.is-invalid,
.was-validated .form-control:invalid {
  border-color: #dc3545;
  padding-right: 0;
  background-image: none;
}
.btn-light.tbethin,
.btn-info.tbethin,
.btn-warning.tbethin,
.btn-success.tbethin,
.btn-dark.tbethin,
.btn-primary.tbethin,
.btn-secondary.tbethin,
.btn-link.tbethin,
.btn-danger.tbethin {
  padding: 0rem 0.1rem;
  line-height: 1.2;
}
.tbedisabled {
  background-color: #eee;
}
.tbeinactive {
  background-color: grey;
}
.inputpicker-multiple ul {
  height: calc(1.2rem + 2px);
}
.inputpicker-multiple ul > li.inputpicker-element {
  margin: 0;
  padding: 0;
}
.column2_1 {
  float: left;
  width: 33%;
  padding: 10px;
}
.column2_2 {
  float: left;
  width: 67%;
  padding: 10px;
}
.column2_12 {
  float: left;
  width: 25%;
  padding: 10px;
}
.column2_22 {
  float: left;
  width: 75%;
  padding: 10px;
}
.column4_1 {
  float: left;
  width: 24%;
  padding: 10px;
}
.column4_2 {
  float: left;
  width: 24%;
  padding: 10px;
}
.column4_3 {
  float: left;
  width: 24%;
  padding: 10px;
}
.column4_4 {
  float: left;
  width: 28%;
  padding: 10px;
}
.row:after {
  content: "";
  display: table;
  clear: both;
}
.el_after:after {
  content: "";
  display: table;
  clear: both;
}
.el_input {
  position: absolute;
  left: 100px;
  top: 0;
  width: auto;
}
.el_div {
  position: relative;
  left: 100px;
  top: 0;
  height: 20px;
}
.el_col1 {
  position: absolute;
  left: 0;
  top: 0;
  float: left;
  width: 300px;
}
.el_col2 {
  position: absolute;
  left: 310px;
  top: 0;
  float: left;
  width: 290px;
}
.el_col3 {
  position: absolute;
  left: 600px;
  top: 0;
  float: left;
  width: 290px;
}
.el_col4 {
  position: absolute;
  left: 900px;
  top: 0;
  float: left;
  width: 290px;
}
.padding0 {
  padding: 0;
  margin-bottom: 0;
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
  height: calc(1.2rem + 2px);
}
.inputpicker-wrapped-list .table {
  overflow-y: scroll;
  flex-grow: 1;
}
.inputpicker-wrapped-list .table > thead > tr > td,
.inputpicker-wrapped-list .table > thead > tr > th {
  position: sticky;
  top: 0;
  padding: 3px 5px 3px 5px;
  text-align: center;
}
.inputpicker-wrapped-list .table {
  border-collapse: collapse;
  width: 100%;
}
.inputpicker-wrapped-list .table > thead > tr > th {
  background: var(--primary);
  color: #fff;
}
.inputpicker-wrapped-list {
  background-color: #dfe9f4;
}
.tbe-sent-frame {
  background-color: #d4edda;
}
.tbe-error-frame {
  background-color: #f8d7da;
}
.tbe-light-green {
  color: #fff;
  background-color: #6ed356;
  border-color: #6ed356;
}

/* Styles pour améliorer l'ajustement de la modale */
.modal-xl-custom {
  max-width: 95vw;
  width: 95vw;
}

.modal-content-custom {
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header-custom {
  flex-shrink: 0;
  border-bottom: 1px solid #dee2e6;
  padding: 1rem;
}

.modal-body-custom {
  flex: 1;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.nav-tabs-custom {
  flex-shrink: 0;
  margin: 0;
  padding: 0 1rem;
  border-bottom: 1px solid #dee2e6;
}

.tab-content-custom {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.tab-pane-custom {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.tab-pane-custom.active {
  display: flex !important;
}

.controle-options-container {
  flex: 1;
  overflow-y: auto;
  max-height: calc(90vh - 250px);
}

.tab-navigation {
  flex-shrink: 0;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

.modal-footer-custom {
  flex-shrink: 0;
  border-top: 1px solid #dee2e6;
  padding: 1rem;
}

/* Amélioration des tableaux */
.table-container {
  margin-bottom: 2rem;
}

.table-sm td {
  padding: 0.5rem;
  vertical-align: middle;
}

.form-check-input {
  position: static;
  margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-xl-custom {
    max-width: 98vw;
    width: 98vw;
  }

  .modal-content-custom {
    height: 95vh;
    max-height: 95vh;
  }

  .controle-options-container {
    max-height: calc(95vh - 300px);
  }
}

/* Scrollbar personnalisée */
.controle-options-container::-webkit-scrollbar,
.tab-content-custom::-webkit-scrollbar {
  width: 8px;
}

.controle-options-container::-webkit-scrollbar-track,
.tab-content-custom::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.controle-options-container::-webkit-scrollbar-thumb,
.tab-content-custom::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.controle-options-container::-webkit-scrollbar-thumb:hover,
.tab-content-custom::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Signature sections */
.signature-section {
  margin-bottom: 2rem;
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background-color: #f8f9fa;
}

/* Spinner pour glyphicon */
.glyphicon-spin {
  animation: glyphicon-spin-anim 1s linear infinite;
}
@keyframes glyphicon-spin-anim {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===================== */
/* Modal Peppol - Styles */
/* ===================== */

/* Labels section */
.peppol-section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  font-weight: 600;
  margin-bottom: 10px;
}
.peppol-separator {
  margin: 18px 0 15px;
  border-color: #dee2e6;
}

/* Bouton copier endpoint */
.peppol-btn-copy {
  padding: 1px 5px;
  font-size: 10px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Bouton refresh */
.peppol-btn-refresh {
  padding: 2px 6px;
  font-size: 11px;
}

/* Bouton envoyer */
.peppol-btn-send {
  background: #00A1DE;
  border-color: #00A1DE;
  color: #fff;
  font-weight: 500;
}
.peppol-btn-send:hover {
  background: #0090c7;
  border-color: #0090c7;
  color: #fff;
}
.peppol-btn-send:disabled {
  background: #6c757d;
  border-color: #6c757d;
  opacity: 0.65;
}

/* Layout colonnes */
.peppol-row-stretch {
  display: flex;
  align-items: stretch;
  min-height: 200px;
}
.peppol-col-left {
  border-right: 1px solid #dee2e6;
  padding-right: 20px;
}
.peppol-col-right {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
}

/* Table infos destinataire */
.peppol-info-table {
  font-size: 13px;
  margin-bottom: 0;
  width: 100%;
}
.peppol-info-table td {
  padding: 4px 0;
  vertical-align: top;
}
.peppol-info-table td:first-child {
  color: #6c757d;
  width: 70px;
  padding-right: 8px;
}
.peppol-info-table td:last-child {
  color: #212529;
  font-weight: 500;
}
.peppol-info-table code {
  font-size: 12px;
  background: #f1f3f4;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Status box */
#peppol-check-spinner {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.peppol-status-box {
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}
.peppol-status-box.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
}
.peppol-status-box.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
}
.peppol-status-box.warning {
  background: #fff3cd;
  border: 1px solid #ffeeba;
}
.peppol-status-box .status-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: #fff;
}
.peppol-status-box.success .status-icon { background: #28a745; }
.peppol-status-box.error .status-icon { background: #dc3545; }
.peppol-status-box.warning .status-icon { background: #ffc107; }
.peppol-status-box .text {
  font-size: 13px;
  font-weight: 600;
}
.peppol-status-box.success .text { color: #155724; }
.peppol-status-box.error .text { color: #721c24; }
.peppol-status-box.warning .text { color: #856404; }
.peppol-status-box .detail {
  font-size: 11px;
  font-weight: normal;
  opacity: 0.85;
  margin-top: 2px;
}

/* Historique */
.peppol-history-list {
  flex: 1;
  overflow-y: auto;
}
.peppol-history-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f3f4;
  font-size: 12px;
}
.peppol-history-item:last-child {
  border-bottom: none;
}
.peppol-history-item .status-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  color: #fff;
}
.peppol-history-item .status-icon.success { background: #28a745; }
.peppol-history-item .status-icon.error { background: #dc3545; }
.peppol-history-item .content {
  flex: 1;
}
.peppol-history-item .date {
  color: #6c757d;
  font-size: 11px;
  margin-top: 3px;
}
.peppol-history-item .label {
  color: #212529;
  font-weight: 500;
}
.peppol-history-item .user {
  color: #6c757d;
  font-size: 11px;
  vertical-align: baseline;
}
.peppol-history-item .error-msg {
  color: #dc3545;
  font-size: 11px;
  margin-top: 2px;
}
.peppol-history-empty {
  color: #6c757d;
  font-size: 12px;
  font-style: italic;
  padding: 10px 0;
}
