/* Consigne : le formulaire sera adapté pour un support mobile */

:root { 
  --mainColorLight: #DE830B;
  --light: #ddd;
  --secondColorDark: #333;
  --secondColorLight: #DBA258;
}
*{
  box-sizing: border-box;
}


body {
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  
  
}

main {
  margin: 0 1em;
}

#progression, #statistiques {
  border-top: 0.25em solid var(--secondColorLight);
  margin-top: 2em;
  text-align: center;
}

/*----------------------------------------------
                     H E A D E R
-----------------------------------------------*/

.banniere {
  position: relative;
  width: 100%;
  height: auto; 
  overflow: hidden;
}

.banniere::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(222, 131, 11, 0.3);
  z-index: 0; 
}

.banniere img {
  max-width: 100%; 
  height: auto; 
  display: block; 
  margin: 45px 0 auto; 
  position: relative; 
  z-index: 1; 
}
#titres {
  color: var(--secondColorDark);
  margin: 0 auto;
  padding-top: 1em;
  text-align: center;
  font-size: smaller;
  background-color: var(--light);
  border-bottom: 0.2em solid var(--mainColorLight);
  background-image: url(BackgroundSP.png);
  opacity: 1;
  z-index: 1;
  background-size: cover;
}

.titre2 {
  text-align: center;
}

nav {
  width: 100vw;
  padding: 15px;
  background-color: var(--secondColorDark);
  position: fixed;
  top: 0;
  overflow: hidden;
  z-index: 2; 
}

nav ul {
  list-style: none;  
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;  
}

nav li a {
  display: block;
  text-decoration: none;
  color: white;
  font-weight: bold;
  text-align: center;
  padding: 0.25em 0.1em;  
}

nav li:hover {
  padding: 7px;
  background-color: var(--mainColorLight);
  border-radius: 10px;
}

/*----------------------------------------------
       F O R M U L A I R E
-----------------------------------------------*/

fieldset {
  border: 0.2em solid var(--secondColorDark);
  border-radius: 5px;
  margin: 1em auto;
  padding: 1em;
 
}

legend {
  color: var(--secondColorDark);
  font-weight: bolder;
  font-size: 18px;
}

label {
  display: block;
  margin-bottom: 0.5em;
}

input, select, button {
  display: block;
  padding: 0.5em;
  width: 90%;
  border-radius: 5px;
  font-family: sans-serif;
  font-size: 1em;
}

button {
  background-color: var(--secondColorDark);
  color: white;
  margin: 0 auto;
  margin-top: 5px;
  padding: 13px;
  border: none;
  font-weight: bold;
  cursor: pointer;
  
}

button:hover {
  background-color: var(--mainColorLight);
}

#bouton-reset {
background-color: #c24e5a;
}
#message {
  display: flex;
  justify-content: center;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
  margin-top: 10px;
  margin: 4px;
  font-weight: bold;
}

.error {
  color: #db2739;
  text-align: center;
}

.success {
  background-color: #b4d8bc;
  color: #155724;
  border: 1px solid #c3e6cb;
  margin: 40px;
}
.error-message {
  background-color: white;
  color: red;
  font-weight: bold;
  text-align: center;
}



/* Appliquer un style selon si les données sont valides ou invalides */

input:invalid, select:invalid {
  border: 2px solid indianred;
  background-color: mistyrose;
}

input:valid, select:valid {
  border: 2px solid limegreen;        
}

.alerte {
  font-style: italic;
  color: indianred;
}

/*----------------------------------------------
             TABLEAU PROGRESSION
-----------------------------------------------*/

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 8px;
  text-align: left;
  border: 1px solid var(--mainColorLight); 
}

th {
  background-color: #DBA258;
  color: white;
  font-weight: bold;
}

th:last-child, td:last-child, th:first-child, td:first-child {
  
    border-right: none;
    border-left: none; 
}

/*----------------------------------------------
                  TABLEAU BILAN
-----------------------------------------------*/

#tableau-bilan th {
  background-color:rgb(93, 150, 177);
  border: 1px solid grey;
}
.bg-grey {
  background-color: #a19494; 
}
#progress {
  width: 80%; 
  height: 20px;
  background-color: #f0f0f0; 
  border-radius: 20px; 
  position: relative;
}

#progress span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

#progress::-webkit-progress-value {
  background-color: #4caf50; 
  border-radius: 40px; 
}

#progress::-moz-progress-bar {
  background-color: #4caf50; 
  border-radius: 10px; 
}


#tableau-bilan table {
  width: 50%;
  border-collapse: collapse;
}
#tableau-bilan th, td {
  border: 1px solid black;
  padding: 8px;
  text-align: left;
}
#tableau-bilan {
  border-collapse: collapse;
  width: 100%;
}

#tableau-bilan td,
#tableau-bilan th {
  border: 1px solid #554343c4;
  padding: 8px;
  text-align: left;
}


#tableau-bilan .variable-detail {

  font-weight: normal; 
}
.col-nombre {
  width: 50px; 
}

/*----------------------------------------------
                    B A N N I E R E 
-----------------------------------------------*/

#banner {
    position: relative; 
    width: 100%; 
    height: 400px; 
    overflow: hidden; 
}

#banner::before {
    content: ""; 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(222, 131, 11, 0.3); 
    z-index: 1;
}

#banner img {
    width: 100%; 
    height: auto; 
    display: block; 
    z-index: 2; 
}
 
/*----------------------------------------------
               F O O T E R 
-----------------------------------------------*/

footer {
  background-color: var(--secondColorDark);
  color: white;
  padding: 1em;
  text-align: center;
  font-size: smaller;
}

footer a {
  color: var(--mainColorLight);
}