* {
  margin: 0;
  padding: 0;
  border: none;
  font-family: Arial, Verdana, Trebuchet;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  width: 100%;
  height: 100%;
}

body {
  width: 100%;
  height: 100%;
  background: white;
  color: black;
  font-size: 1em;
  display: flex;
  flex-direction: row;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  margin: 0;
  width: 10%;
  background: white;
  color: #505050;
  box-sizing: border-box;
  min-height: 100vh;
}

#logo {
  width: 100%;
  height: auto;
  margin: 0;
}

main {
  position: absolute;
  top: 0;
  right: 0;
  width: 90%;
  box-sizing: border-box;
  margin: 0;
  padding: 1%;
  background: white;
  color: black;
  border: 1px solid black;
  min-height: 100vh;
  padding-bottom: 2em;
}

footer {
  margin: 0;
  padding: 1%;
  width: 90%;
  box-sizing: border-box;
  background: white;
  color: black;
  border: 1px solid black;
  border-radius: 20px 0 20px 0;
}

a {
  color: #004890;
}

h1 {
  text-align: center;
  font-size: 4em;
  margin-bottom: 0.1em;
  text-shadow: 0 0 .2em white, 0 0 .5em white;
  color: blue;
}

@font-face {
  font-family: "VAG Rounded";
  src: url(../fonts/VAG_Rounded.ttf);
}

h2 {
  font-family: Arial;
  text-align: center;
  font-size: 2.2em;
  margin-bottom: 0.5em;
  color: #9dab56;
}

h2 select {
  font-size: 0.8em;
}

h3 {
  text-align: left;
  font-size: 1.44em;
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: orange;
  text-decoration: underline;
}

nav ul {
  list-style-type: none;
  list-style-image: none;
  margin-bottom: 2em;
}

nav ul li {
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 3em;
  color: #505050;
  line-height: 3em;
  text-align: left;
  background: inherit;
  border-top: 2px groove #505050;
  transition: background .5s;
  padding-left: 1em;
}

nav img {
  width: 1em;
  height: 1em;
  margin-right: 0.5em;
}

nav ul li:last-child {
  border-bottom: 2px groove #505050;
}

nav ul li:hover, nav ul li.hovered {
  background: #505050;
}

nav ul li:hover a, nav ul li.hovered a {
  color: white;
}

nav ul li a:hover {
  text-decoration: none;
  cursor: pointer;
}

ul {
  list-style-position: inside;
}

nav ul li a {
  display: block;
  width: 100%;
  text-decoration: none;
  color: #505050;
  font-size: 1.3em;
  font-weight: bold;
  padding-left: 1.5em;
  background-size: 1em;
  background-repeat: no-repeat;
  background-position: center left;
}

#affaires a {
  background-image: url('../images/nav/affaires.png');
}

#affaires a:hover, #affaires a.hovered {
  background-image: url('../images/nav/affaireshover.png');
}

#dashboard a {
  background-image: url('../images/nav/dashboard_b.png');
}

#dashboard a:hover, #dashboard a.hovered {
  background-image: url('../images/nav/dashboard_w.png');
}

#graph a {
  background-image: url('../images/nav/graph.png');
}

#graph a:hover, #graph a.hovered {
  background-image: url('../images/nav/graphhover.png');
}

#energie a {
  background-image: url('../images/nav/energie1.png');
}

#energie a:hover, #energie a.hovered {
  background-image: url('../images/nav/energie1hover.png');
}

#devis a {
  background-image: url('../images/nav/devis1.png');
}

#devis a:hover, #devis a.hovered {
  background-image: url('../images/nav/devis1hover.png');
}

#facture a {
  background-image: url('../images/nav/facture1.png');
}

#facture a:hover, #facture a.hovered {
  background-image: url('../images/nav/facture1hover.png');
}

#banque a {
  background-image: url('../images/nav/banque1.png');
}

#banque a:hover, #banque a.hovered {
  background-image: url('../images/nav/banque1hover.png');
}

#login a {
  background-image: url('../images/nav/login.png');
}

#login a:hover, #login a.hovered {
  background-image: url('../images/nav/loginhover.png');
}


form {
  margin: 1%;
}

fieldset {
  padding: 1em;
  line-height: 2em;
  background: #606660;
  border-radius: 5px;
}

legend {
  margin: 0 1em 0 1em;
  padding: 2em .5em 0 .5em;
  font-size: 1.5em;
  font-weight: bold;
  color: #004890;
}

label {
  font-weight: bold;
  font-style: italic;
  color: #F1FFF1;
}

label.fixedWidth {
  display: inline-block;
  width: 12%;
}

label.fixedLargeWidth {
  display: inline-block;
  width: 20%;
}

input[type="text"], input[type="password"], input[type="email"], input[type="number"] {
  color: black;
  border: 2px ridge white;
  border-radius: 5px;
  padding: 2px 5px 2px 5px;
}

button {
  font-size: 1em;
  line-height: 1em;
  padding: 0.5em;
  border: 2px ridge white;
  border-radius: 5px;
  color: black;
  background: linear-gradient(to bottom, white, #dddddd);
  outline: none;
  cursor: pointer;
}

button:focus {
  border-style: groove;
  background: linear-gradient(to top, white, #dddddd);
}

input:focus {
  border: 2px ridge white;
  outline: none;
}

input:valid {
  border: 2px ridge white;
}

input:invalid {
  border-color: red;
}

input[type="submit"] {
  color: #505050;
  /*border: 1px ridge #505050;*/
  border: 0;
  border-radius: 5px;
  padding: 2px 5px 2px 5px;
  font-weight: bold;
  font-size: 1.1em;
  background: linear-gradient(#F1FFF1, #828282);
  cursor: pointer;
}

input[type="submit"]:focus {
  /*border: 2px groove black;*/
  background: linear-gradient(45deg, #828282, #F1FFF1);
}

select {
  color: black;
  border: 2px ridge #F1FFF1;
  border-radius: 5px;
  padding: 2px 5px 2px 5px;
  outline: none;
  cursor: pointer;
}

summary {
  cursor: pointer;
}

table {
  width: 100%;
  border-spacing: 0;
  text-align: center;
  border-collapse: collapse;
  color: #505050;
}

caption {
  font-size: 1.5em;
  font-weight: bold;
  line-height: 2em;
  text-align: left;
  font-style: italic;
}

caption::first-letter, h2::first-letter {
  text-transform: uppercase;
}

th, td {
  padding: 3px 2px 3px 2px;
  vertical-align: middle;
  border: 2px solid #004890;
}

th {
  font-weight: bold;
  font-size: 1.1em;
  border-top: 0;
}

table tr:last-child td {
  border-bottom: 0;
}
table tr td:first-child, table tr th:first-child {
  border-left: 0;
}

table tr td:last-child, table tr th:last-child {
  border-right: 0;
}

form td, form th {
  border-color: black;
}

form table {
  margin-top: 2em;
  margin-bottom: 2em;
}

form caption, form th {
  color: #004890;
}

form#account {
  width: 30%;
}

.greyed {
  background: #323532;
}

.units {
  font-size: 0.7em;
}

#debugBox {
  border: thick double black;
  padding: 1em;
  margin: 1em 0 1em 0;
}


#errorBox {
  width: 95%;
  margin: 1em auto 1em auto;
  padding: 10px;
  border: 2px dashed #ed1c2f;
  font-weight: bold;
  text-align: center;
}

#execTime {
  position: fixed;
  width: 10%;
  bottom: 0;
  left: 0;
  font-size: 0.6em;
  
}

abbr {
  cursor: help;
}

#sectionBottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2em;
  text-align: center;
}

section > table tbody tr:hover {
  background: #323532;
}

table input {
  width: 90%;
  min-width: 90%;
}

.orderUp, .orderDown {
  display: inline-block;
  width: 20px;
  height: auto;
}

object {
  display: block;
}

th object {
  margin: 0 2px 0 2px;
}

form.noStyle fieldset {
  float: left;
  border-radius: 0;
}

form.noStyle fieldset:first-child {
  border-radius: 5px 0 0 5px;
}

form.noStyle fieldset:last-child {
  border-radius: 0 5px 5px 0;
}

form.noStyle a {
  text-decoration: none;
  color: #004890;
  font-weight: bold;
}

.bright {
  color: green;
  white-space: nowrap;
}

.sumUp {
  text-align: right;
  font-weight: bold;
}

#constants {
  width: 35em;
}

math {
  font-size: 14px;
  margin: 0.5em 0 1em 0;
}

.unit {
  font-weight: bold;
  color: blue;
}

.colorMath {
  font-size: 1.6em;
}

.mathResult, .mathResult mi {
  color: blue;
}

.colorMath mo {
  color: brown;
}

select.status, select.link {
  border: none;
  outline: none;
  background-color: transparent;
  width: 100%;
  height: 100%;
  font-size: 1.2em;
}

select.status option {
  font-size: 1.2em;
}

.status0 {
  background-color: rgba(0, 138, 255, 0.7);
}

.status1 {
  background-color: rgba(217, 217, 217, 0.7);
}

.status2 {
  background-color: rgba(255, 0, 0, 0.7);
}

.status3 {
  background-color: rgba(255, 233, 0, 0.7);
}

.status4 {
  background-color: rgba(5, 170, 0, 0.7);
}

#search {
  font-size: 1em;
}

#factures td {
  text-align: left;
  padding: 0.5em;
}

#factures tr td:nth-child(2), #factures tr td:nth-child(3), #factures tr td:nth-child(7) {
  text-align: right;
}

.devis tr td:nth-child(2), .devis tr td:nth-child(6) {
  text-align: right !important;
}

.devis tr td:nth-child(3), .devis tr td:nth-child(7) {
  text-align: left !important;
}

#factures tfoot tr td {
  text-align: right;
}

.thresholdSoon {
  background-color: rgba(255,213,0, 0.8);
}

.thresholdReached {
  background-color: rgba(255,0,0, 0.8);
}

#banqueList td {
  text-align: left;
  padding: 0.5em;
}

#banqueList tr td:first-child, #banqueList tr td:nth-child(3) {
  text-align: right;
}

#banqueList tfoot tr td:nth-child(2){
  text-align: right;
}

#banqueList th:nth-child(5){
  width: 30%;
}

.hide {
  display: none;
}

.recette {
  color: green;
}

.charge {
  color: red;
}

.link0 {
  background-color: rgba(255, 255, 255, 1);
}

.link1 {
  background-color: rgba(255, 0, 0, 0.7);
}

.link2 {
  background-color: rgba(250, 180, 167, 0.7);
}

.link3 {
  background-color: rgba(78, 173, 243, 0.7);
}

.link4 {
  background-color: rgba(145, 154, 202, 0.7);
}

.link5 {
  background-color: rgba(255, 179, 121, 0.7);
}

.link6 {
  background-color: rgba(217, 92, 0, 0.7);
}

.link7 {
  background-color: rgba(0, 176, 80, 0.7);
}

.link8 {
  background-color: rgba(255, 165, 0, 0.7);
}

.link9 {
  background-color: rgba(36, 148, 222, 0.7);
}

.link10 {
  background-color: rgba(32, 80, 61, 0.7);
}


dl {
  
}

dt {
  cursor: pointer;
}

dd {
  font-size: 0.7em;
  display: none;
}

.editable input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  font-size: 1em;
}


.flex {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
}

.comment {
  text-align: center;
  font-style: italic;
}

.price {
  color: red;
  font-weight: bold;
}

.centered {
  text-align: center;
}

.veryImportant {
  font-size: 1.1em;
  color: red;
  font-weight: bold;
}


.inputSmall {
  width: 3em;
  min-width: auto;
}

table caption input {
  font-size: 1em;
}

/* Annuaire EGA profil */
#ega_photo {
  width: 10%;
  display:  block;
  margin: 1em auto  1em auto;
}

#ega_flex {
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
}

.ega_profil {
  width: 35%;
  margin: 4em;
}

.ega_profil caption {
  color: #9cab56;
}

.ega_profil td {
  width: 45%;
  color:  black;
}

.ega_profil th, .ega_profil td {
  border: 2px solid #746a5e!important;
}

.equal th, .equal td {
  width: 23%;
}

.equal tr th:first-child {
  width: 8%;
}

.equal td:not(:empty) {
  background-color: #9cab56;
}

#tableaux {
  display: flex;
  flex-direction: row;
}

#tableaux table {
  flex: 1;
  width: auto;
  margin: 2em;
  padding: 0;
  padding-top: 0;
  border-spacing: 2px;
  text-align: left;
  border-collapse: separate;
  color: #505050;
  border: 2px solid black;
  border-radius: 10px;
}

#tableaux table tr {
  background-color: rgba(33,33,33, 0.1);
}

#tableaux table tr:hover {
  background-color: rgba(33,33,33, 0.2);
}

table#attenteDevis {
  box-shadow: 12px 12px 2px 1px rgba(0, 0, 255, .25);
  border-color: rgba(0, 0, 255, .6);
}

#attenteDevis caption {
  color: rgba(0, 0, 255, .6);
}

table#attenteFacture {
  box-shadow: 12px 12px 2px 1px rgba(255, 0, 0, .25);
  border-color: rgba(255, 0, 0, .6);
}

#attenteFacture caption {
  color: rgba(255, 0, 0, .6);
}

table#encours {
  box-shadow: 12px 12px 2px 1px rgba(0, 255, 0, .25);
  border-color: rgba(0, 255, 0, .6);
}

#encours caption {
  color: rgba(0, 255, 0, .6);
}

#tableaux th, #tableaux td {
  padding: 6px;
  vertical-align: middle;
  border: none;
  border-radius: 4px;
}

#tableaux th {
  text-align: center;
  background-color: rgba(33,33,33, .2);
}

#tableaux .montant {
  text-align: right;
  white-space: nowrap;
}

#tableaux .sum {
  font-weight: bold;
}

#tableaux td[colspan="2"]{
  border: none;
}

#listAffaires {
  width: 100%;
}

#listAffaires caption form {
  display: inline-block;
  width: 6em;
  text-align: center;
}

#listAffaires caption form input {
  text-align: center;
}

#listAffaires th{
  border: 1px solid black;
  padding: 0.3em;
}

#listAffaires td {
  border: 1px solid black;
  padding: 0.5em;
}

#listAffaires td:nth-child(2), #listAffaires td:nth-child(3){
  text-align: left;
  padding-left: 1em;
}

#listAffaires td:nth-child(4), #listAffaires td:nth-child(5), #listAffaires td:nth-child(6), #listAffaires td:nth-child(7){
  text-align: right;
  width: 7em;
}

#listAffaires td:nth-child(5){
  background-color: rgba(0,255,0,0.2);
}

#listAffaires td:nth-child(6){
  background-color: rgba(255,0,0,0.2);
}

#listAffaires td:nth-child(7){
  background-color: rgba(0,0,255,0.2);
}

#solde {
  float: right;
  right: 0;
  width: 20%;
  border: thin solid black;
  padding: 0.5em 1em;
  text-align: left;
}

#headerAffaire {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 2fr;
  grid-template-areas:
    "topLeft side"
    "bottomLeft side";
  gap: 0;
  justify-items: center;
  align-items: center;
}

#headerAffaire > p {
  grid-area: topLeft;
}

#affaireAttached {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto;
  gap: 10px;
}

#echeanceLiv {
  grid-area: bottomLeft;
  margin: 0.5em auto;
  padding: 1em;
  font-size: 1.5em;
  border: 2px solid black;
}

#infoClient {
  grid-area: side;
}

#infoClient td, #infoClient th {
  border: 1px solid black;
}

.affaireStatus0 {
  background: #ea6a4f;
}

.affaireStatus1 {
  background: lightblue;
}

#affaireFinance {
  width: 60%;
  margin: 1em auto;
}

#affaireFinance td, #affaireFinance th {
  padding: 0.8em 0;
  border: 1px solid black;
}

#affaireFinance th {
  font-size: 1em;
  font-weight: normal;
}

#affaireFinance td {
  font-size: 1.1em;
}

#affaireFinance td:nth-child(2n), #affaireFinance td:nth-child(3n){
  width: 30%;
}

.pricePos {
  background-color: lightgreen;
  font-weight: bold;
}

.priceNeg {
  background-color: #ea6a4f;
  font-weight: bold;
}

.affaireViewForm {
  width: 100%;
}

.spaced {
  margin-top: 3em;
}

#pieChart1 {
  width: 60%;
}

@media screen and (max-width: 1500px){
  body, html {
    width: 100%;
    height: unset;
    display: unset;
  }
  
  #logo {
    width: 30%;
  }
  
  header, main, footer, #execTime, #sectionBottom {
    position: static;
    width: 100%;
    height: unset;
    min-height: unset;
  }

  #execTime {
    display: none;
  }

  header {

  }

  nav ul {
    margin-bottom: 0;
    display: flex;
    flex-direction: row;
  }

  nav ul li {
    display: list-item;
    width: auto;
    padding-right: 1em;
    border-bottom: 2px groove #505050;
    /*height: 3em;
    color: #505050;
    line-height: 3em;
    text-align: left;
    background: inherit;
    border-top: 2px groove #505050;
    transition: background .5s;
    padding-left: 1em;*/
  }

  main {
    border: none;
  }

  #factures select, #banqueList select {
    max-width: 10em;
  }

}

/* @import 'mobile.css'; */
