:root {
  --height-bandeau: 102px;
  --height-footer: 125px;
}

html,
body {
  height: 100%;
  background-color: #f8f9fa;
}

main {
  background-color: #f8f9fa;
  overflow: auto;
  min-height: calc(100% - (var(--height-footer) + 1rem));
  position: relative;
}

/* Bandeau-Navbar */
.bandeau {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--height-bandeau);
  display: flex;
  flex-direction: row;
  background-color: #ffffff;
  padding: 0.5rem 0;
  box-shadow: 0 0 1px 1px #ebebeb;
  z-index: 17;
}

/* Bandeau-Navbar */
.bandeau img {
  height: 2rem;
  margin: 0 0.5rem;
}

/* Override bootstrap */
.bandeau label {
  font-size: 0.7rem !important;
}

/* Accueil */
.page_accueil {
  margin-left: 4rem;
  margin-right: 4rem;
}

.page_accueil button {
  font-size: 1.5rem;
  background-color: #63b337;
  border-color: #63b337;
}

.page_accueil button:hover {
  background-color: #009759;
  border-color: #009759;
}

.content, .container-result {
  margin-top: calc(1em + var(--height-bandeau))
}

.form-container-fields-buttons {
  display: flex;
  width: 100%;
}

.form-container-fields-buttons > div {
  display: flex;
  justify-content: space-around;
  width: 100%;
}

.form-container-fields-buttons > div > div > button {
  font-size: 0.7rem;
}

.resultat-container-fields-buttons {
  display: flex;
  flex: 1 auto;
  justify-content: center;
}

.resultat-container-fields-buttons > div {
  margin: auto 0;
}

.resultat-container-fields-buttons > div > button {
  margin: 0 2rem;
  background-color: #A99E9E;
  border-color: #A99E9E;
}

.resultat-container-fields-buttons > div > button:hover {
  background-color: #726565;
  border-color: #726565;
}

.resultat-container-fields-buttons > div > .btnPrint {
  background-color: #63b337;
  border-color: #63b337;
}

.resultat-container-fields-buttons > div > .btnPrint:hover {
  background-color: #009759;
  border-color: #009759;
}

.bandeau h1 {
  font-size: 0.8rem !important;
  width: 22%;
  text-overflow: ellipsis;
  overflow: hidden;
}

button[type=submit] {
  background-color: #63b337;
  border-color: #63b337;
}

button[type=submit]:hover {
  background-color: #009759;
  border-color: #009759;
}

button[type=reset] {
  background-color: #A99E9E;
  border-color: #A99E9E;
}

button[type=reset]:hover {
  background-color: #726565;
  border-color: #726565;
}

@media (min-width: 992px) {
  .bandeau img {
    height: 4rem;
    margin: 0 2rem;
  }

  .bandeau label {
    font-size: 0.8rem !important;
  }

  .bandeau h1 {
    font-size: 1.45rem !important;
  }

  .form-container-fields-buttons > div > div > button {
    font-size: 1rem;
  }

}

/* Onglet */
.nav-item > button {
  border: 1px solid #b2b2b2;
  border-radius: 0 5px 5px 5px;
  font-size: 1rem;
  width: 160px;
  min-width: auto;
  height: 64px;
  padding: 0.5rem;
  text-align: left;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #000000;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.41);
  background-color: #ffffff !important;
}

.nav-item > button.active {
  color: #ffffff !important;
  border-radius: 7px 7px 0 0;
  background-color: #63b337 !important;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.41) !important;
}

/* Tableau itinéraire */
table {
  background-color: #ffffff;
  margin-bottom: unset !important;
}

.table_itineraire > thead {
  background-color: #e2e8f0;
}

.row-type-agriculture {
  text-transform: uppercase;
  background-color: #f7fee7 !important;
}

.table_itineraire .row-type-agriculture:hover {
  background-color: #f7fee7 !important;
}

.table_itineraire tr:not(.row-type-agriculture):hover {
  background-color: #e6e7e7 !important;
}

.table_itineraire .bg_tps_tracteur_polyvalent {
  background-color: #c4dfec;
}

.table_itineraire .bg_tps_tracteur_tete {
  background-color: #caecc4;
}

/* Tableau somme pour les parcelles */
.parcelle {
  display: flex;
  justify-content: space-around;
  margin-top: 1rem;
}

.parcelle h4 {
  font-size: 1.25rem !important;
}

.parcelle > div {
  display: flex;
  flex-direction: column;
}

.parcelle > div > div {
  margin: 0.8rem 0;
}

.parcelle table {
  width: fit-content;
}

.parcelle .table_parcelle_favorable tbody > tr {
  background-color: #e1f2ea;
}

.parcelle .table_parcelle_defavorable tbody > tr {
  background-color: #eeddcf;
}

/* Tableau somme pour le repere carburant */
.repere_carburant table {
  width: fit-content;
}

.img-gas-pump {
  height: 3rem;
  margin: auto 1rem auto 0;
}

.table_repere_carburant tr td {
  display: flex;
  justify-content: flex-end;
}

.container-operation-culturale > span:first-of-type {
  font-size: 12px;
  width: fit-content;
}

/* Tableau somme pour le repere charge mécanisation */
.repere_charge_mecanisation tr > td > div {
  display: flex;
  justify-content: flex-end;
}

.repere_charge_mecanisation .info {
  font-size: 0.8rem;
  font-style: italic;
}

/* Pour les table qui utilise des données avec les données de parcelles favorable */
tr > td.bg_favorable {
  background-color: #e1f2ea;
}

/* Tableau de délégation */
.delegation {
  margin-top: 4rem;
}

.table_delegation > thead {
  background-color: #e2e8f0;
}

.table_delegation > tbody > tr:hover {
  background-color: #e6e7e7 !important;
}

.lien_externe {
  display: flex;
  justify-content: center;
  gap: 12rem;
}

.lien_externe > a {
  white-space: nowrap;
}

/* Mentions légales */
.mentions_legales {
  margin-left: 4rem;
  margin-right: 4rem;
}

.mentions_legales h3, .mentions_legales h4 {
  text-transform: uppercase;
}

/* Footer*/
footer {
  background-color: #ffffff;
  width: 100%;
  display: flex;
  flex-direction: row;
  padding: 0.5rem 6rem;
  box-shadow: 0 0 1px 1px #ebebeb;
  overflow-x: auto;
}

footer .mentions_legales {
  margin: auto 1rem;
  text-decoration: none;
  color: #63b337;
  height: 100px;
  align-items: center;
  display: flex;
}

footer .mentions_legales:hover {
  color: #009759;
}

footer .logo_cuma_ouest {
  height: 100px;
  width: 100px;
}

footer .logo_mecaflash_travail {
  height: 100px;
  width: 400px;
}

footer .logo_casdar {
  height: 100px;
  margin: 0.25rem;
}

footer .logo_regions {
  height: 80px;
  margin: 0.25rem;
}

footer > div {
  height: var(--height-footer);
  display: flex;
  margin: auto 0;
  align-items: baseline;
  justify-content: space-between;
}

footer .container_logo_regions {
  display: flex;
  flex-direction: column;
  max-width: 480px;
  align-self: auto;
}

footer .container_logo_regions > p {
  display: none;
}

@media print {

  body {
    background-color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-shadow: inset 0 0 0 1000px gold;
  }

  main {
    background-color: #ffffff !important;
  }

  .container-result {
    margin: unset !important;
  }

  .parcelle {
    height: auto;
    justify-content: normal;
    flex-direction: column;
  }

  .parcelle > div {
    flex-direction: column;
    justify-content: normal;
  }

  .parcelle > .container-table > div {
    page-break-inside: avoid;
    margin: 2rem 0;
  }

  #graphTpsTracteur {
    /*display: none;*/
    height: 500px !important;
    page-break-after: always;
    page-break-before: always;
    margin-top: 5rem;
  }

  .delegation {
    page-break-before: always;
    page-break-inside: avoid;
  }

  h1 {
    font-size: 1.4rem !important;
  }

  h4 {
    font-size: 1.2rem !important;
  }

  .bandeau {
    position: unset;
  }

  .bandeau > .resultat-container-fields-buttons > div {
    display: none;
  }

  .container-result {
    font-size: 0.85rem;
  }

  footer {
    display: none;
  }
}

@media (min-width: 768px) {
  footer .container_logo_regions > p {
    display: block;
    font-size: 12px;
    margin: 0;
  }

  footer .container_logo_regions {
    align-self: start;
  }
}
