/*
• Champ recherche et outil peuvent être alignés via alignerRechercheEtOutils.
  Une fois écran trop étroit, il s passent l'un sous l'autre via @media (max-width: 575px)
  Veiller au bon comportement même si on utilise pas alignerRechercheEtOutils (attention au marges/padding dans toutes les directions)
• Le bouton pour effacer contenu champ de recherche à décaler poru rempalcer la petite croix auto dans le champ via clearSearchDecaler
• Centrer les boutons des n° de pages (!!!si affichage en plus : info nb de page ou choix nb page à afficher) via paginationAuCentre
*/

/* .alignerRechercheEtOutils : aligner champ de recherche et outil rafraichir, recherche avancé,… via flex*/
  .tab-content.alignerRechercheEtOutils .bootstrap-table .fixed-table-toolbar {
    display: flex;
    justify-content: space-between ;
  }
  /*le 1er div qui (logiquement les outils)*/
  .tab-content.alignerRechercheEtOutils .bootstrap-table .fixed-table-toolbar > div.columns-right:first-child {
    order: 2 ; /*placer en 2e position (donc champ recherche sera en 1er automatiquement)*/
  }
  /*le div de recherche*/
  .tab-content.alignerRechercheEtOutils .bootstrap-table .fixed-table-toolbar > div.btn-group.search {
    width: 50% ; /*puisque c'est en flex, ça se réduira quand ça rencontrera les outils (pour passer sur autre ligne, adapter selon largeur écran)*/
  }
/*il faut bien penser à ajouter clearSearchDecaler dans tab-content (car pour certain site, j'ai aussi le bouton search (loupe) avant clearSearch. ex: EV)*/
.tab-content.clearSearchDecaler .tab-pane .search.btn-group .input-group > input.search-input {
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}
.tab-content.clearSearchDecaler .tab-pane .search.btn-group .input-group input.search-input + button[name="clearSearch"] {
  /*avec + pour ne le décaler que si le btn clearSearch est jsute après l'input search-input (pas pu faire de même pour les arrondis de search-input) */
  margin-left: -36px!important;
  z-index: 3;
}

/*pagination (n° page tableau) centré*/
  .tab-content.paginationAuCentre .bootstrap-table .fixed-table-pagination > div.pagination {
    float: none;
    justify-content: center;
  }
/*pagination (n° page tableau) pleine largeur*/
  .tab-content.paginationLargeurMax .bootstrap-table .fixed-table-pagination > div.pagination {
    /*width:100%;*/
    float: none;
  }
  .tab-content.paginationLargeurMax .bootstrap-table .fixed-table-pagination > div.pagination > ul.pagination {
    width:100%;
    max-width:840px;/*besoin de ≈780px+ pour 732 pages*/
    justify-content: space-between;
  }
  .tab-content.paginationLargeurMax .bootstrap-table .fixed-table-pagination .page-item {
    flex:1; /*pour occuper tout l'espace possible*/
    text-align: center;
  }
  .tab-content.paginationLargeurMax .bootstrap-table .fixed-table-pagination .page-item.page-pre /*1er bloc : page précédente*/
, .tab-content.paginationLargeurMax .bootstrap-table .fixed-table-pagination .page-item.page-next /*dernier bloc : page suivante*/
  {
    flex:2; /*pour occuper 2x plus d'espace que les autres bloc*/
  }

/*tableau : si pas de marge (px-0 = padding axe X à 0) pour que l'ensemble colle aux bord*/
/*mais un peu de marge pour barre d'outils et info n° page en haut et en bas*/
  .tab-content.px-0 .bootstrap-table .fixed-table-toolbar
, .tab-content.px-0 .bootstrap-table .fixed-table-pagination
  {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

/*tableau : titre centré verticalement (ex: utile si sur 2 lignes)*/
  .bootstrap-table .fixed-table-container .table thead th {
    vertical-align: middle;
  }
/*tableau : espace entre celulles de titre*/
  .bootstrap-table .fixed-table-container .table thead th .th-inner {
    padding: .375rem;
    white-space: initial; /*va à la ligne si titre trop long en plusieurs mots*/
  }
/*tableau : espace entre cellule un peu réduit*/
  .table>:not(caption)>*>* {
    padding: .5rem 0.3rem;
  }

/*tableau : survol titre triable*/
  .bootstrap-table .fixed-table-container .table thead th .both:hover {
    color: #038bd0;
  }

/*tableau : picto de tri à gauche + titre décalé d'autant à droite*/
  .bootstrap-table .fixed-table-container .table thead th .sortable {
    background-position: left;
    padding-right: 13px!important;
  }
  .bootstrap-table .fixed-table-container .table thead th .sortable.both {
    padding-left: 17px;
  }

/*Pour éviter cellule trop haute/grande - 19/09/2023*/
.bootstrap-table tbody td .limitH {
  max-height: 17em;
  /*background-color: red;*/
  display: inline-block;
  overflow: hidden;
  /*overflow-y: scroll;*//*envisageable pour pouvoir faire défiler le texte de la cellule*/
}


/*quand menu devient menu hamburger*/
@media (max-width: 767px) { /* bootstrap utilise  min-width: 768px  mais là je veux dans l'autre sens */

/*n° page réduit si écran trop étroit (limite dépassement largeur Smartphone)*/
  .paginationReduiteSiEtroit .bootstrap-table .pagination .page-item:not(.active):not(.page-first-separator):not(.page-last-separator):not(.page-next):nth-child(n+4):nth-last-child(n+4) {
    /*conserve toujours n° page active, 1er "…", dernier "…", suivant MAIS ignore donc les enfant 4 à 4 depuis la fin
    Pb : si pas de "…" possible (car toutes s'affichent, soit car peu de page, soit après recherche limitée), alors fera un truc du genre : 1, 2, 7, 8 => ajout de .paginationReduiteSiEtroit pour utiliser sur demande pour certains tableaux (mais à gérer le cas où après recherche, il y a trop peu de résultats : vérifier si .page-first-separator existe au moment de faire une recherche ou même au moment de rafraîchir un tableau)
    */
    display: none;
  }

}


/*équivaut à "Extra small" de bootstrap*/
@media (max-width: 575px) { /* bootstrap utilise  min-width: 576px  mais là je veux dans l'autre sens */

/* outil et recherche sur 2 lignes */
  .tab-content.alignerRechercheEtOutils .bootstrap-table .fixed-table-toolbar { /*que si alignerRechercheEtOutils (pour enlever flex mis)*/
    display: initial;
    justify-content: initial;
    padding: 0; /*évite écart en haut et en bas quand trop étroit*/
  }
  .tab-content .bootstrap-table .fixed-table-toolbar > div.columns-right:first-child
, .tab-content .bootstrap-table .fixed-table-toolbar > div.btn-group.search {
    float: none;
    display: flex;
    width: initial!important;/*pour recherche (mais ne gêne pas outil)*/
    margin-left: 0;/*pour outil (mais ne gêne pas recherche)*/
  }
   /*que si alignerRechercheEtOutils (pour enlever flex mis)*/
  .tab-content.alignerRechercheEtOutils .bootstrap-table .fixed-table-toolbar > div.columns-right:first-child
, .tab-content.alignerRechercheEtOutils .bootstrap-table .fixed-table-toolbar > div.btn-group.search {
    margin-left: 0.5rem; margin-right: 0.5rem;
  }

}

