/*=================================================================================================================
											                   O P E R V E N T   P R O J E C T 
			                                    Copyright (c) - NOVEMBER 2023 
===================================================================================================================
	CREATION
		17/11/2023 - AS - Style page. 
	MODIFICATION
		21/12/2023 - AS - Cleaning and optimization. 
    01/03/2024 - AS - Modification to have input and output on the same page 
===================================================================================================================	

/* ----------------------------------------------------
	 GLOBAL  STYLES 
------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css?family=Roboto:400,100,300,700');
:root {
--swp-text-color: #01516F;

--swp-result-alt-background-color: #f2f2f2;
}


body {
  font-family: "Roboto", Arial, serif;
  background: transparent;
  -webkit-font-smoothing: antialiased;
  margin: 0; 
  padding: 0; 
}

/*PAGE SECTION USER INPUTS */

.input {
  position: fixed; /*?*/
  width: 30%;
  height: 100vh;
  background: rgb(225, 229, 242);
  font-size: 0.9em;
  color: #0074A0;  
  overflow-y: auto;  
}

.input .header {
  font-size: 1.2em;
  font-weight: bold;
  color : #0074A0;
  margin-top: 2em;
  margin-bottom: 1em;
}

.input label {
  display: block;
  margin-top: 3em;
  margin-bottom: 0;
}

.input form {
  color:black;
}

.input input[] {
  border-radius: 12px;
}

.input select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
}

.input input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
  margin-bottom: 15px;
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
  
}

.input input[type="range"]:hover {
  opacity: 1;
}

/* Removes default focus */
input[type="range"]:focus {
  outline: none;
}

/******** Chrome, Safari, Opera and Edge Chromium styles ********/
/* Track */
input[type="range"]::-webkit-slider-runnable-track {
  background-color: rgb(125, 133, 140);
  border-radius: 1rem;
  height: 0.5rem;
}

/* Thumb */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; /* Override default look */
  appearance: none;
  /*background-color: rgb(2, 43, 58);*/
  background-color: #0074A0; 
  border-radius: 0.5rem;
  height: 1.5rem;
  width: 1rem;
  margin-top: -0.5rem; /* To vertically align the thumb on the track */
}

input[type="range"]:focus::-webkit-slider-thumb {
  outline: 3px solid rgb(2, 43, 58);
  outline-offset: 0.125rem;
}

/*********** Firefox styles ***********/
/* Track */
input[type="range"]::-moz-range-track {
  background-color: rgb(125, 133, 140);
  border-radius: 1rem;
  height: 0.5rem;
}

/* Thumb */
input[type="range"]::-moz-range-thumb {
  background-color: #0074A0;
  border: none; /*Removes extra border that FF applies*/
  border-radius: 0.5rem;
  height: 1.5rem;
  width: 1rem;
  margin-top: -0.5rem; /* To vertically align the thumb on the track */

}

input[type="range"]:focus::-moz-range-thumb{
  outline: 3px solid rgb(2, 43, 58);
  outline-offset: 0.125rem;
}

.input h1 {
  font-size: 1.2em;
  font-weight:bold;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.3em;
  display: block;
  transition: all ease-out 300ms;
}

.input hr {
  height: 0.2em;
  margin-bottom:4em;
  opacity:1.0;
  background-image: linear-gradient(to right, #0074A0, rgb(255, 255, 255));
}

.input .navl {
  position: relative;
  margin: 0 8%;
  text-align: right;
  top: 7%;
  font-weight: bold;
}

.input .navl ul {
  list-style: none;
}

.input .navl ul li {
  position: relative;
  margin: 3.2em 0;
}

.input .navl a {
  line-height: 5em;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.3em;
  color: #0074A0;
  display: block;
  transition: all ease-out 300ms;
}

.input .navl a.active {
    color: #0074A0;
}

.input .navl a:hover a {
  color: rgba(#669999, 0.75);
}

.input input[type="submit"] {
  width: 100%; 
  padding: 10px; /* Inner spacing */
  margin-top: 15px;
  background-color: #0074A0;
  color: white; 
  border: none;
  border-radius: 4px; 
  cursor: pointer; 
  font-size: 16px;
  transition: background-color 0.3s; 
}

.input input[type="submit"]:hover {
  background-color: rgb(4, 63, 85); 
}

.input input[type="reset"] {
  margin-top: 1em; 
  margin-bottom: 1em;
  background-color: rgb(225, 229, 242); 
  color: #0074A0;
  border: none; 
  border-radius: 4px; 
  cursor: pointer; 
  font-size: 1em; 
  transition: background-color 0.3s;
}

.input input[type="reset"]:hover {
  color: rgb(2, 35, 48); 
}

/* For WebKit-based browsers */
.input::-webkit-scrollbar,
.output::-webkit-scrollbar {
  width: 5px; 
}

.input::-webkit-scrollbar-thumb,
.output::-webkit-scrollbar-thumb {
  background-color: #666; 
  border-radius: 6px; 
}

.input::-webkit-scrollbar-thumb:hover,
.output::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

.popup {
  display: none;
  position: absolute; /*?*/
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #ffffff;
  padding: 20px;
  border: 2px solid #333333;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.input .popup {
  width: 90%; 
}

.popup-content {
  font-size: small;
  text-align: justify;
  font-weight: normal;
  color : black;
}

.popup-content h2 {
  font-size: 1.3em;
  text-align: center;
  font-weight: bold;
}


.close-button {
  position: absolute; /*?*/
  top: 5px;
  right: 10px;
  cursor: pointer;
  font-size: 20px;
  color: #333333;
}

.help-button {
  position: relative; 
  top: -0.5em; 
  color: #0074A0;
  background-color: transparent;
  border : none; 
  cursor: pointer;
  font-size: small;
  width: 2em;
  height: 2em;
  line-height: 1em; 
}


.help-button:hover + .popup {
  display: block;
}

/* hover : affiche le popup quand la souris est au-dessus. Comment est-ce que cela fonctionne pour les tablettes ???
 * focus : affiche le popup quand on clique sur le bouton. Comportement préférentiel, MAIS, valide le formulaire dans la
 * zone de saisie. 
/*

.output .help-button:focus + .popup {
  display: block;
}
*/

/* Tentative pour mettre de l'ordre dans les styles */
.simwaps .h1 {

}

/*PAGE SECTION OUTPUT / RESULTS */

.output {
  position: relative;
  width: 70%;
  float: right;
  background: #ffffff;
  height: 100vh;
  display: grid;
  padding: 2vw;
  overflow-x: auto;
  overflow-y: auto;
}

/* Tablets and Phones */
@media (max-width: 767px){
	.output {
    grid-template-columns: 1fr;
    grid-gap:1vw; 
  }
  .one,
  .two,
  .three,
  .four,
  .five {
    grid-gap: 1vh;
    text-align: center;
    justify-content: center; 
  }
}

/* Laptops */
@media(min-width: 768px) and (max-width: 1599px){
  .output {
    grid-template-columns: 1fr;
    grid-gap:1vw; 
  }
  .one,
  .two,
  .three,
  .four,
  .five {
    grid-gap: 5vh;
    text-align: center;
    justify-content: center; 
  }
}

/* PC */
@media (min-width: 1600px) {
	.output {
    /*
		grid-template-columns: 1fr 1fr;
  	grid-template-rows: 45% 55%;
  	grid-gap: 2vh;*/
    display:grid;
    grid-template: 
            'a a' auto
            'b c' auto / 1fr 2fr;
    overflow: auto;
  	align-items: center;
  	justify-content: center;
  	padding: 1vw;
    grid-gap:1vw; 
	}

	.one{
    grid-area: a;
  	overflow: auto;
    justify-content: center;
  	text-align: center;
    overflow: visible;
	}
	.four{
    grid-area: b;    
  	padding: 30px; 
  	justify-self: start; 
    /* overflow: auto; */
	}
	.five{
    grid-area: c;
  	overflow: auto;    
	}
}

.output .h1 {
  font-size: 2em;
  font-weight: bold;
  /*color: rgb(2, 43, 58);*/
  color: #0074A0;
  margin-bottom: 15px;
  display: flex;
  align-items: center; 
  justify-content: center; 
  overflow: hidden;
}

.output .h2 {
  font-size: 1.5em;
  font-weight: bold;
  /*color: rgb(2, 43, 58);*/
  color: #0074A0;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center; 
  overflow: hidden; 
}

.output .txt {
  font-size: 1.1em;
  color: #01516F;
  margin-bottom: 15px;
  /* display: flex; */
  /* align-items: center;  */
  /* justify-content: center; */
}

.output .header {
  font-size: 1.1em;
  color: #01516F;
  margin-bottom: 15px;
  display: inline; 
}

.output h1.header {
  font-size: 2.0em;
  margin: 30px;
  margin-top : 50px;
  margin-bottom : 50px;
  font-weight : bold;
}

.output .header a {
  font-weight : bold;
}

.full{
  grid-column-start: 1;
  grid-column-end: 3;
  grid-row-start: 1;
  grid-row-end: 4;
  padding: 20px; 
  max-height: 100vh; /* Hauteur maximale de 80% de la hauteur de la vue */
  overflow-y: auto; 
  word-wrap: break-word;
}

img {
  width : 100%;  
}

.output li {
  margin-left: 20px;
	line-height: 1.5em;
}

.checksum {
	font-size: small;
	color: #a6c8d5;
}

.output #formResults {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.output #formResults p {
  font-size: 1.2em; 
  color: #0074A0;
  font-weight: bold; 
  margin-top: 20px; 
}

.output canvas {
  width: 70%; 
  height: 100%; 
  z-index: 50;
} 

.results {
  margin-top: 3em;
  border: solid;
  border-radius: 2em;
  border-color: var(--swp-text-color);
  background-color: var(--swp-result-alt-background-color);
}

/* MENU BUTTON STYLE - LINKED TO THE HEADER OF THE INDEX PAGE */

.dropbtn {
  background-color: rgb(225, 229, 242) ;
  color: #0074A0;
  padding: 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.dropdown {
  position: absolute; /*?*/
  top: 20px; /* vertical position  */
  left: 20px; /* horizontal position  */
  z-index: 999; /* z-position: ensures that the menu is always above the content */
}

.dropdown-content {
  display: none;
  position: absolute; /*?*/
  min-width: 160px;
  box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: #0074A0;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .dropbtn {
  background-color: #BFDBF7;
}

/* MODAL CONTENT */

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fefefe;
  margin: 10% auto 0% auto;
  padding: 0%;
  border: 1px solid #888;
  width: 80%;
  height: 70%;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  position: relative;
  display: flex;
  justify-content: space-between; /* Aligne les éléments sur les bords */
  overflow-y: auto; /* Affiche une barre de défilement verticale si nécessaire */
  overflow-x: hidden;
  word-wrap: break-word;
}

.close {
  color: #8d8d8d;
  font-size: 35px;
  font-weight: bold;
  position: absolute;
  top: 25px; /* Ajustez ces valeurs selon vos besoins */
  right: 25px;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/*INFO PAGE*/ 

.info-page h1 {
  font-size: 3em;
  font-weight: bold;
  color: #0074A0;
  margin-bottom: 15px;
}

.info-page h2{
  font-size: 1.5em;
  font-weight: bold;
  color: #0074A0;
  margin-bottom: 15px;
}
.info-page h3 {
  font-size: 1em;
  font-style: italic;
  color: #0074A0;
  margin-bottom: 15px;
}

.info-page p {
  color: #444;
  line-height: 1.6;
  margin-bottom: 20px;
}

/*Logo*/

.logo-container {
  display: flex;
}

.logo {
  margin-right: 20px; /* Espacement entre les logos */
}

.img {
  width : 90%;  
}

/* Retrieve Page */
.retrieve-page {
  padding: 20px;
}

.retrieve-page h1 {
  font-size: 3em;
  font-weight: bold;
  /*color: rgb(2, 43, 58);*/
  color: #0074A0;
  margin-bottom: 15px;
}

.retrieve-page h2 {
  font-size: 1.5em;
  font-weight: bold;
  /*color: rgb(2, 43, 58);*/
  color: #0074A0;
  margin-bottom: 15px;
}

.retrieve-page h3 {
  font-size: 1em;
  font-style: italic;
  /*color: rgb(2, 43, 58);*/
  color: #0074A0;
  margin-bottom: 15px;
}

.retrieve-page label {
  font-size: 1em;
  font-weight: bold ;
  /*color: rgb(2, 43, 58); /* Couleur du texte */
  color: #0074A0;
  margin-bottom: 5px; /* Marge inférieure */
  display: block; /* Afficher en tant que bloc pour chaque ligne */
}

.retrieve-page p {
  color: #444;
  line-height: 1.6;
  margin-bottom: 20px;
}

.retrieve-page input[type="text"] {
  width: 100%; /* Largeur de 100% pour occuper toute la largeur disponible */
  padding: 10px; /* Espacement intérieur */
  margin-bottom: 15px; /* Marge inférieure */
  border: 1px solid #ccc; /* Bordure de 1px solide */
  border-radius: 4px; /* Coins arrondis */
  box-sizing: border-box; /* Inclure le padding et la bordure dans la largeur totale */
  font-size: 16px; /* Taille de police */
}

/* Style pour les balises <input> de type texte lorsqu'ils sont en focus */
.retrieve-page input[type="text"]:focus {
  outline: none; /* Supprimer l'effet de focus par défaut */
  border-color: #66afe9; /* Changer la couleur de la bordure lorsqu'en focus */
  box-shadow: 0 0 5px #66afe9; /* Ajouter une ombre lorsqu'en focus */
}

.retrieve-page button {
  /*background-color: rgb(2, 43, 58); */
  background-color: #0074A0;
  color: white; 
  padding: 10px 20px; 
  border: none; 
  border-radius: 4px; 
  cursor: pointer;
  font-size: 16px; 
  transition: background-color 0.3s;
}

.retrieve-page button:hover {
  background-color: rgb(1, 29, 39);
}

/* LOGIN PAGE */
.login-page {
  padding: 20px;
}

.login-page h1 {
  font-size: 3em;
  font-weight: bold;
  /*color: rgb(2, 43, 58);*/
  color: #0074A0;
  margin-bottom: 15px;
}

.login-page h2 {
  font-size: 1.5em;
  font-weight: bold;
  /*color: rgb(2, 43, 58);*/
  color: #0074A0;
  margin-bottom: 15px;
}

.login-page h3 {
  font-size: 1em;
  font-style: italic;
  /*color: rgb(2, 43, 58);*/
  color: #0074A0;
  margin-bottom: 15px;
}

.login-page label {
  font-size: 1em;
  font-weight: bold ;
  /*color: rgb(2, 43, 58); */
  color: #0074A0;
  margin-bottom: 5px; 
  display: block; 
}

.login-page p {
  color: #444;
  line-height: 1.6;
  margin-bottom: 20px;
}

.login-page input[type="text"] {
  width: 100%; 
  padding: 10px; /* Inner margin */
  margin-bottom: 15px; 
  border: 1px solid #ccc; 
  border-radius: 4px; 
  box-sizing: border-box; 
  font-size: 16px; 
}

.login-page input[type="text"]:focus {
  outline: none; 
  border-color: #66afe9; 
  box-shadow: 0 0 5px #66afe9; /* Shadow */
}

.login-page button {
  /*background-color: rgb(2, 43, 58); 
  background-color: #0074A0;
  color: white; 
  padding: 10px 20px; /* Inner margin */
  border: none; 
  border-radius: 4px; 
  cursor: pointer; 
  font-size: 16px; 
  transition: background-color 0.3s; 
}

.login-page button:hover {
  background-color: rgb(1, 29, 39); 
}

.export-pdf-button {
  width: 85%;
  max-width:300px;
  padding: 10px;
  margin-top: 15px;
  /*background-color: rgb(2, 43, 58);*/
  background-color: #0074A0;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

table {
  border-collapse: collapse; /* Merge table borders */
  margin:auto;
  font-size:smaller;
}

th, td {
  border-right: 1px solid #000; /* Add a right border to each cell */
  padding: 4px; /* Inner margin */
  text-align: left; /* Text align in cells */
  font-weight: normal;
}

th:first-child {
  border-left: none; /* Remove left border from first column */
}

th:last-child,
td:last-child {
  border-right: none; /* Remove right border from last column */
}

th {
  /*background-color: rgb(2, 43, 58); */
  background-color: #0074A0;
  color : white; 
}

.disclaimer {
  font-size : xx-small;
  color: var(--swp-text-color);
  text-align: left;
}
