/* Styles de l'application, chargés après le socle de Sonata (build/sonata.css) */

.table tbody > tr > td.vert-align {
  vertical-align: middle !important;
}

.breadcrumb > .active {
  color: #fff !important;
}

.invoice-wrapper .content-header {
  margin: 10px;
}

.invoice-wrapper .invoice-notice {
  padding: 10px;
  margin: 15px;
}

tr:hover {
  background: #f5fafe;
}

.panel-heading {
  font-size: 16px;
}

.panel-heading a {
  color: black;
}

.panel-title {
  display: inline;
  cursor: pointer;
}

/* Tableaux (A10) : sur tablette et mobile, défilement horizontal dans leur bloc plutôt que colonnes écrasées
   (Bootstrap 3 ne l'applique que sous 768 px). Sur ordinateur (1200 px et plus), le tableau tient en entier dans
   l'écran, colonnes resserrées s'il le faut : aucune colonne cachée hors de la vue */
@media (max-width: 1199px) {
  .table-responsive > .table > thead > tr > th,
  .table-responsive > .table > tbody > tr > th,
  .table-responsive > .table > tbody > tr > td {
    white-space: nowrap;
  }

  /* Champs de texte long des listes Sonata : retour à la ligne gardé, sur une largeur lisible */
  .table-responsive > .table > tbody > tr > td.sonata-ba-list-field-text {
    white-space: normal;
    min-width: 15em;
  }
}

/* Sur ordinateur, tableau plus large que son bloc resserré par paliers jusqu'à tenir en entier (table-fit.js) :
   cellules moins espacées, puis police plus petite, puis mots coupés en dernier recours */
@media (min-width: 1200px) {
  .table-fit-1 > .table > thead > tr > th,
  .table-fit-1 > .table > tbody > tr > th,
  .table-fit-1 > .table > tbody > tr > td {
    padding-left: 4px;
    padding-right: 4px;
  }

  .table-fit-2 > .table {
    font-size: 12px;
  }

  .table-fit-3 > .table > thead > tr > th,
  .table-fit-3 > .table > tbody > tr > th,
  .table-fit-3 > .table > tbody > tr > td {
    overflow-wrap: anywhere;
  }
}

/* Explorateur des sauvegardes (backup.js) */
.backup-folder-link {
  cursor: pointer;
  margin-left: 10px;
}

.backup-file-icon {
  margin-right: 10px;
}

.backup-download {
  margin-left: 10px;
  cursor: pointer;
}

.backup-crumb-separator {
  margin-left: 5px;
}

/* Tableau triable, filtrable et paginé (smart-table.js) */
.smart-table td,
.smart-table th {
  box-sizing: content-box;
}

.smart-table.table-bordered {
  border-right-width: 0;
}

.smart-table.table-bordered th,
.smart-table.table-bordered td {
  border-left-width: 0;
}

.smart-table.table-bordered th:last-child,
.smart-table.table-bordered td:last-child {
  border-right-width: 1px;
}

.smart-table.table-bordered tbody th,
.smart-table.table-bordered tbody td {
  border-bottom-width: 0;
}

.smart-table-empty {
  text-align: center;
}

.table-responsive > .smart-table-wrapper > .row {
  margin: 0;
}

.table-responsive > .smart-table-wrapper > .row > [class^='col-']:first-child {
  padding-left: 0;
}

.table-responsive > .smart-table-wrapper > .row > [class^='col-']:last-child {
  padding-right: 0;
}

/* Bloc sans marge (box-body no-padding de la Supervision) : contrôles écartés du bord comme le reste du bloc, tableau
   toujours sur toute la largeur */
.no-padding > .smart-table-wrapper > .row:not(.smart-table-main) > [class^='col-'] {
  padding: 8px 10px;
}

.smart-table-length label,
.smart-table-filter label {
  font-weight: normal;
  white-space: nowrap;
  text-align: left;
}

/* Sélecteur à trois classes : plus fort que .form-inline .form-control de Bootstrap */
.smart-table-wrapper .smart-table-length select {
  width: 75px;
  display: inline-block;
}

.smart-table-filter {
  text-align: right;
}

.smart-table-filter input {
  margin-left: 0.5em;
  display: inline-block;
  width: auto;
}

.smart-table-info {
  padding-top: 8px;
  white-space: nowrap;
}

.smart-table-pages {
  margin: 0;
  white-space: nowrap;
  text-align: right;
}

.smart-table-pages .pagination {
  margin: 2px 0;
  white-space: nowrap;
}

@media screen and (max-width: 767px) {
  .smart-table-length,
  .smart-table-filter,
  .smart-table-info,
  .smart-table-pages {
    text-align: center;
  }
}

.smart-table thead .is-sortable {
  cursor: pointer;
  position: relative;
  padding-right: 30px;
}

.smart-table thead .is-sortable:active {
  outline: none;
}

.smart-table thead .is-sortable::after {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: block;
  font-family: 'Glyphicons Halflings';
  opacity: 0.2;
  content: '\e150';
}

.smart-table thead .is-asc::after {
  opacity: 0.5;
  content: '\e155';
}

.smart-table thead .is-desc::after {
  opacity: 0.5;
  content: '\e156';
}

/* Page « Supervision » réservée aux SuperAdmin (A3) */
.supervision-tabs {
  margin-bottom: 15px;
}

.supervision-filters {
  border-bottom: 1px solid #f4f4f4;
}

.supervision-filters .btn {
  margin: 2px 4px 2px 0;
}

/* Chiffres de synthèse : informatifs, pas cliquables */
.sv-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.sv-stat {
  flex: 1 1 170px;
  background: #fff;
  border-top: 3px solid #d2d6de;
  padding: 10px 14px;
}

.sv-stat .sv-value {
  display: block;
  font-size: 24px;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
}

.sv-stat .sv-label {
  display: block;
  color: #555;
}

.sv-stat .sv-detail {
  display: block;
  color: #888;
  font-size: 12px;
}

/* Barres horizontales : une seule série, valeur au bout */
.sv-bars {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sv-bars li {
  display: flex;
  align-items: center;
  margin: 6px 0;
}

.sv-bars .sv-name {
  flex: 0 0 190px;
  font-size: 13px;
}

.sv-bars .sv-track {
  flex: 1;
  height: 14px;
}

.sv-bars .sv-bar {
  display: block;
  height: 14px;
  min-width: 2px;
  background: #3c8dbc;
  border-radius: 0 4px 4px 0;
}

.sv-bars .sv-num {
  flex: 0 0 48px;
  text-align: right;
  font-size: 13px;
  color: #333;
}

/* Colonnes verticales : évolution mensuelle */
.sv-columns {
  display: flex;
  align-items: flex-end;
  height: 160px;
  gap: 2px;
  border-bottom: 1px solid #d2d6de;
}

.sv-columns .sv-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}

.sv-columns .sv-colbar {
  width: 60%;
  min-height: 2px;
  background: #3c8dbc;
  border-radius: 4px 4px 0 0;
}

.sv-columns .sv-colnum {
  font-size: 11px;
  color: #333;
}

.sv-colaxis {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}

.sv-colaxis span {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: #777;
}

/* Taux de réussite dans un tableau */
.sv-rate {
  display: inline-block;
  width: 60px;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  vertical-align: middle;
}

.sv-rate span {
  display: block;
  height: 8px;
  background: #3c8dbc;
  border-radius: 4px;
}

/* Colonnes d'étiquettes : retour à la ligne gardé même dans les tableaux qui défilent (A10) */
.table-responsive > .table > tbody > tr > td.sv-wrap {
  white-space: normal;
}

/* Entrée de menu qui envoie un formulaire (send-infos, en POST) : même aspect que les liens du menu */
.dropdown-menu > li > form > .btn-link {
  display: block;
  width: 100%;
  padding: 3px 20px;
  border: 0;
  color: #777;
  line-height: 1.4286;
  text-align: left;
  white-space: nowrap;
}

.dropdown-menu > li > form > .btn-link:hover,
.dropdown-menu > li > form > .btn-link:focus {
  background-color: #e1e3e9;
  color: #333;
  text-decoration: none;
}

/* A35 : bouton « Revenir à mon compte » du bandeau d'incarnation, lisible malgré la couleur blanche des liens d'un callout */
#impersonation-banner .btn {
  margin-left: 10px;
  color: #333;
  text-decoration: none;
}

