html {
	height: 100%;
	overflow:auto;
}
body {
    min-height: 100vh;
	background: color(rgb(255, 255, 255));
	font-family: Arial, Helvetica, sans-serif;
	margin: 0;
	padding: 0;
	background-size: cover;
	background-position: center;
    display: flex;
    flex-direction: column;
}
@media screen and (min-width: 600px) {
	#flexMain {
		display: flex;
		flex-direction: row;
	}
	#pictTop {
		flex: 0 0 20%;
	}
	#liveTime {
		flex: 1;
		text-align: center;
	}
	#pictTop img {
		width: 100%;
		padding-top: 0px;
		margin: 10px 0 20px 20px;
	}
}
@media screen and (max-width: 600px) {
	#flexMain {
		display: flex;
		flex-direction: column;
	}
	#pictTop {
		flex: 0 0 20%;
	}
	#managProj {
		flex: 1;
	}
	#pictTop img {
		width: 50%;
		padding-top: 0px;
		margin: 10px 0 20px 20px;
	}
}

#liveTime {
	margin: 20px;
	color: rgb(0, 17, 68);
	font-size: calc(24px + 6 * ((100vw - 700px) / 680));

}
#listProjects {
	padding-top: 30px;
}
.listProjectsUser {
	flex: 0 0 20%; /* Colonne de gauche avec une largeur fixe de 20% */
}
.nav {
	margin-top: -10px !important;
}
.nav li {
	margin: 0 2px;
	color: rgb(0, 17, 68) !important;
	z-index: 10 !important;
}
.nav-tabs>li>a {
	border-radius: 15px !important;
	margin-bottom: 10px !important;
}
.nav-tabs>li>a:hover{
	border-color:#eee #eee rgb(34, 64, 131) #ddd !important;
	background-color:rgb(34, 64, 131) !important;
	color: white;
}
.nav-tabs>li>a.active,  .nav-tabs>li>a.active:focus,  .nav-tabs>li>a.active:hover {
	color:#ffffff !important;
	cursor:default;
	background-color:rgb(10, 0, 68) !important;
	border:1px solid rgb(10, 0, 68) !important;
	-webkit-box-shadow: 2px -1px 4px rgb(10, 0, 68);
	-moz-box-shadow: 2px -1px 4px rgb(10, 0, 68);
	box-shadow: 2px -1px 4px rgb(10, 0, 68);
	z-index: -10;
}
.detailsProjectsUser {
	width: 50%; /* Colonne de droite qui utilise le reste de l'espace disponible */
	margin-bottom: 50px;
}


footer {
    margin-top: auto;
	width: 100%;
	bottom: 0;
	background-color: rgba(34, 64, 131, 0.85);
	text-align: center;
	color: white;
	overflow: hidden;
}
footer p {
	margin: 0px;
}

  
.tblActualValues {
	border-collapse: collapse;
	margin: 5px;
	line-height: 20px;
	white-space: nowrap;
}
.tblActualValues td, .tblActualValues th {
	min-width: 22%;
	padding: 2px 10px;
	vertical-align: top;
	text-align: center !important;
}
.tblActualValues th {
	height: 50px;
}
#btnCam1 {
	height: 45px;
}
.tblActualValues th img, .tblActualValues th button{
	height: 100%;
}
.camera-btn {
	background-color: white;
	border-radius: 5px;
}
.tblActualValues th .camera-btn img{
	height: 35px;
}

.modalCam {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
}

.modal-contentCam {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 70vw;          /* ?? 70% largeur �cran */
  height: 70vh;         /* ?? 70% hauteur �cran */
  background: #111;
  border-radius: 12px;
  padding: 10px;
  display: flex;        /* ?? centrage */
  align-items: center;
  justify-content: center;
}

#cameraImage {
  width: 95%;
  height: auto;
  max-height: 95%;
  object-fit: contain;  /* ?? garde ratio */
}

.closeCam {
  position: absolute;
  top: 8px;
  right: 12px;
  cursor: pointer;
  font-size: 22px;
}

.line {
	width: 100%;
	height: 2px;
	background: rgb(0, 17, 68);
	margin: 10px 0;
}
.fa-size1 {
	font-size: 30px;
}
.fa-size2 {
	font-size: 25px;
}
.row {
	display: flex;
	align-items: center;
}
#WSTempData, #WSHumidData, #WSPressureData, #RGPluvioData, #PZPiezoData, #WaterTempData, #SM01SoilMoistData, #SM02SoilMoistData {
	width: 75%;
	margin: 20px auto 20px 5px;
	height: 250px;
}
.imgIcons{
	margin-right: 5px;
	margin-left: 10%;
	max-width: 50px;
	max-height: 70px;
}
.zoom-btn {
	background: rgb(34, 91, 255);
	color: #fff;
	border: none;
	border-radius: 5px;
	padding: 6px 12px;
	margin: 3px;
	cursor: pointer;
	transition: background 0.2s;
}
.zoom-btn:hover {
	background: rgb(0, 17, 68);
	box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.7);
}
#zoomButtons {
	position: fixed;        /* reste toujours � la m�me place � l'�cran */
	left: 20px;             /* distance du bord gauche */
	top: 80%;               /* position au milieu verticalement */
	transform: translateY(-50%);  /* centre verticalement */
	display: flex;          /* disposition flexible */
	flex-direction: column; /* empile les boutons verticalement */
	align-items: center;    /* aligne les boutons horizontalement */
	gap: 8px;               /* espace entre les boutons */
	z-index: 1000;          /* reste au-dessus du graphique */
}

#zoomButtons button {
	background: rgb(34, 91, 255);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 4px 2px;
	width: 80px;
	text-align: center;
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
}

#zoomButtons button:hover {
	background: rgb(0, 17, 68);
	box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.7);
	transform: scale(1.05);
}

/* (optionnel) bouton actif color� */
#zoomButtons button.active {
	background: #000000;
	color: #fff;
	font-weight: bold;
}

.actualValues {
	display: block;
	width: fit-content;
	padding: 5px;
	margin: 0 auto;
	text-align: center;
	font-size: calc(20px + 6 * ((30vw - 300px) / 150));
  	color: rgb(0, 17, 68);
	border: 3px solid rgb(0, 17, 68);
	border-radius: 5px;
}
.actualValues img {
	height: 35px;
	margin: 2px 2px 15px 2px;
}
.actualValues table {
	margin: 0 auto;
}

/* Bouton principal */
#openModal {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: rgb(34, 91, 255);
  border: none;
  color: white;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.3s;
  z-index: 20;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
#openModal:hover {
  background-color: rgb(0, 17, 68);
}

/* Fenetre modale (fond) */
.modal {
  display: none; /* cachee par defaut */
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
}

/* Contenu de la fenetre */
.modal-content {
  background-color: #1e1e1e;
  margin: 10% auto;
  padding: 20px 30px;
  border-radius: 15px;
  width: 50%;
  max-width: 600px;
  text-align: left;
  color: #000000;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  position: relative;
  animation: slideInFromTopRight 0.4s ease;
}

@keyframes slideInFromTopRight {
  from { transform: translate(200px, -100px); opacity: 0; }
  to { transform: translate(0, 0); opacity: 1; }
}

/* Bouton de fermeture */
.close {
  color: #aaa;
  font-size: 26px;
  position:absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.2s;
}
.close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* Barre de niveau batterie */
.battery {
  background: #333;
  border-radius: 10px;
  height: 20px;
  width: 100%;
  margin-bottom: 15px;
  position: relative;
}
.level {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  width: 0%; /* mis a jour dynamiquement */
  transition: width 0.5s;
}