
/* CSS Standard pour toutes pages */
/*--------------------------------*/
/* Reset général */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}


/* Appliquer Poppins à tout le site */
body {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

/* Pour alléger les titres */
h1, h2, h3 {
    font-weight: 600;
}

/* Pour les textes plus fins */
p, a, span {
    font-weight: 300;
}

/* Barre de titre */
.navbar {
    height: 50px;
    width: 100%;
    background: #2F855A; /* Vert Kyberis */
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 18px;
    font-weight: bold;	 
	    overflow: hidden;
    z-index: 10000; /* Toujours au-dessus des autres éléments */
}
/* Conteneur principal */
.wrapper {
    display: flex;
    height: 100vh;
    background: #f5f5f5;
}

/* MENU LATÉRAL */
.sidebar {
    width: 250px;
    background: white;
    color: #333;
    position: fixed;
    left: 0;
    top: 40px;
    bottom: 0;
    transition: width 0.5s ease-in-out;
    box-shadow: 2px 0px 5px rgba(0, 0, 0, 0.1);
    padding-top: 5px;
    overflow: hidden;
	overflow-y: auto;  /* Active le scroll automatique */
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: 0.6s;
	font-family: 'Poppins', sans-serif;
}

.sidebar.collapsed a {
    justify-content: center;
    font-size: 0;
}

.sidebar a i {
    margin-right: 10px;
    font-size: 16px;
    color: #666;
}

.sidebar.collapsed a i {
    margin-right: 0;
}

.sidebar a:hover, .sidebar a.active {
    background: #e8e8e8;
}

/* Modules dynamiques */
.dynamic-modules {
    list-style: none;
    padding: 0;
}

.dynamic-modules li {
    padding: 5px 10px;
    border-bottom: 0px solid #e8e8e8;
}

.dynamic-modules li a {
    text-decoration: none;
    color: #333;
}

.dynamic-modules li a:hover {
    color: #c33d2e;
}


.sidebar.collapsed ~ .content {
    margin-left: 70px;
    width: calc(100% - 70px);
}


.content {
	 font-family: 'Poppins', sans-serif;
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
    margin-top: 70px; /* Laisse de la place pour la navbar */
    height: calc(100vh - 70px);
    overflow-y: auto;
    transition: margin-left 0.3s ease-in-out;
}
		
/* Standard Page container */
.container {
    font-family: 'Poppins', sans-serif;
    margin-left: 250px;
    padding: 20px;
    width: calc(100% - 250px);
    margin-top: 70px; /* Laisse de la place pour la navbar */
    height: calc(100vh - 70px);
    overflow-y: auto;
    transition: margin-left 0.3s ease-in-out;
}

/* Pour les écrans plus larges (PC ou tablettes en paysage) */
@media (min-width: 768px) {
.container {
    max-width: calc(100% - 40px); /* La largeur maximale prend en compte 20px de marge à gauche et à droite */
    margin: 20px auto;            /* 20px de marge en haut et en bas, et auto pour centrer horizontalement */
}
}

/* UserInfoBox right top */
#userInfoBox {
    position: fixed;
    top: 5px;
    right: 10px;
    padding: 5px 10px;
    /*background-color: rgba(0, 0, 0, 0.8);*/
    color: white;
    border-radius: 8px;
    /*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);*/
    font-family: Arial, sans-serif;
    font-size: 12px;
    z-index: 1000;
    max-width: 200px;
	display: none; /* Par défaut caché jusqu'à ce que les données soient chargées */
    text-align: center; /* Centrer le contenu */
    font-family: Arial, sans-serif;
}

/* Footer Copyright info */
#footerInfoBar {
    position: fixed;
    bottom: 20px; /* Distance depuis le bas */
    right: 20px; /* Distance depuis la droite */
    padding: 5px 10px; /* Réduction des marges pour un look discret */
    background-color: rgba(255, 255, 255, 0.7); /* Fond semi-transparent */
    color: #333; /* Texte gris foncé */
    border-radius: 5px; /* Coins légèrement arrondis */
    font-family: Arial, sans-serif;
    font-size: 12px; /* Police plus petite */
    text-align: right; /* Alignement du texte à droite */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Ombre légère */
    z-index: 1000;
    max-width: 300px; /* Limite la largeur pour éviter de déborder */
    display: none; /* Masqué par défaut */
}

/* icon sound */
.audio-icon {
    font-size: 18px;
    cursor: pointer;
    color: #4CAF50;
    transition: transform 0.3s;
	opacity: 0.3;
}

.audio-icon:hover {
    transform: scale(1.1);
}

/* Performance Lantency Indicator */
#performanceBarContainer {
    width: 100%;
    height: 5px;
    background: #ddd;
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

#performanceBar {
    height: 100%;
    width: 100%; /* Par défaut */
    background: green;
    transition: width 0.5s ease-in-out, background 0.5s ease-in-out;
}

#latencyText {
    font-size: 12px;
    text-align: center;
    color: #555;
    margin-top: 5px;
}

/* Text color definition, rules etc.. */
/*------------------------------------*/
a {
    text-decoration: none; /* Supprime le soulignement */
    color: inherit; /* Utilise la couleur du texte environnant */
}

/* Optionnel : changer la couleur au survol */
a:hover {
    color: inherit; /* Pas de changement de couleur au survol */
	font-weight: bold;
}

h2 {
    color: #5a5a5a;
}
input[type="email"] {
    width: 90%;
    padding: 12px;
    margin: 10px 0;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #d1d5db;
    background-color: #f2f7fb;
}

input[type="text"] {
    width: 90%;
    padding: 12px;
    margin: 10px 0;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #d1d5db;
    background-color: #f2f7fb;
}


/* Boutons standard */
.btn {
   background-color: #007bff;
   color: white;
   border-radius: 10px;
   box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
   cursor: pointer;
   justify-content: space-between;
   width: 30%;
   display: center;
   opacity: 0.7;
 }
 
 .btn-danger {
   color: white;
   border-radius: 10px;
   box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
   cursor: pointer;
   justify-content: space-between;
   width: 30%;
   display: center;
   opacity: 0.7;
   background-color: #dc3545;
}
 
.btn-orange {
   color: white;
   border-radius: 10px;
   box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
   cursor: pointer;
   justify-content: space-between;
   width: 30%;
   display: center;
   opacity: 0.7;
   background-color: #FF7F50 ;
}

.btn-save {
   color: white;
   border-radius: 10px;
   box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
   cursor: pointer;
   justify-content: space-between;
   width: 30%;
   display: center;
   opacity: 0.7;	
   background-color: #007bff;    
}

.btn-close {
   color: white;
   border-radius: 10px;
   box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
   cursor: pointer;
   justify-content: space-between;
   width: 30%;
   display: center;
   opacity: 0.7;
   background-color: #dc3545;    
}

 
.btn:hover {
      opacity: 1;
 }
 
.btn-danger:hover {
      opacity: 1;
 }
 
 .btn-orange:hover {
      opacity: 1;
 }
 
 .btn-close:hover {
      opacity: 1;
 }
 
 .btn-save:hover {
      opacity: 1;
 }
 
 /* Media queries pour les écrans de moins de 768px */
@media (max-width: 768px) {
    .btn,
    .btn-danger,
	.btn-close,
	.btn-save,
    .btn-orange {
        width: 90%; /* Les boutons occupent toute la largeur */
        padding: 15px; /* Plus d'espace pour les smartphones */
        font-size: 16px; /* Agrandir la police pour plus de lisibilité */
        border-radius: 5px; /* Ajustement des bords pour un rendu plus net */
    }
}
 
 /* Please wait loading screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s ease-in-out;
}

.loading-screen.visible {
  visibility: visible;
  opacity: 1;
}

.loading-content {
  text-align: center;
  color: white;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 6px solid #ccc;
  border-top: 6px solid #007BFF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Menu "hamburger" */	
/* Positionne le bouton hamburger en haut à gauche */
 #hamburgerButton {
   position: fixed;
   top: 30px;
   left: 20px;
   z-index: 1000; /* S'assurer qu'il soit au-dessus de l'offcanvas */
   background: transparent;
   border: none;
   padding: 0.5rem;
  color:#333;
 }
 /* Optionnel : retirer le contour lors du focus */
 #hamburgerButton:focus {
   outline: none;
   box-shadow: none;
 }
 #hamburgerTitle {
   position: fixed;
   top: 30px;
   left: 50px;
   z-index: 1000; /* S'assurer qu'il soit au-dessus de l'offcanvas */
   background: transparent;
   border: none;
   padding: 0.5rem;
  color:#333;
 }
 


/* définition standard */
.hidden {
    display: none;
}    


.visible {
    display: block;
}

/* Jquery filter definition */
		/* Style pour les cellules cliquables (facultatif) */
		.clickable {
			cursor: pointer;
			text-decoration: none; /* Supprime le soulignement */
			color: inherit; /* Utilise la couleur de texte par défaut (héritée) */
		}
		
		.clickable:hover {
			color: inherit; /* Garde la couleur inchangée au survol */
		}
		
		 @media (max-width: 768px) {
            .hide-on-mobile {
                display: none;
            }
        }
		 .sortable {
            cursor: pointer;
            text-decoration: none;
            color: inherit;
            display: inline-flex;
            align-items: center;
        }
        .sortable .sort-icon {
            margin-left: 5px;
            font-size: 0.9em;
            display: none;
        }
        .sortable.sorted-asc .sort-icon.asc,
        .sortable.sorted-desc .sort-icon.desc {
            display: inline;
        }

/* Conteneur de formulaire */
        .form-group {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
        }

        /* Style des labels */
        .form-group label {
            flex: 0 0 100px; /* Largeur fixe pour les labels */
            font-weight: bold;
            color: #333;
            text-align: right; /* Alignement des labels à droite */
            margin-right: 10px;
        }

        /* Style des champs d'entrée */
        .form-group input {
            flex: 1; /* S'étend pour prendre tout l'espace restant */
            padding: 8px;
            font-size: 14px;
            border: 1px solid #ccc;
            border-radius: 5px;
            background-color: #f9f9f9;
            outline: none;
            transition: border-color 0.3s ease;
        }

        /* Effet de focus */
        .form-group input:focus {
            border-color: #007BFF;
            background-color: #fff;
        }

        /* Conteneur général */
        .form-container {
            max-width: 600px;
            margin: 20px auto;
            background: #ffffff;
            padding: 20px;
            border: 1px solid #ddd;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
		







/* Login Page Specific Layout */
/*----------------------------*/
.containerlogin {
    max-width: 380px;
    width: 100%;
    text-align: center;
    padding: 20px;
	top: 5px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: 0 auto; /* Centre le conteneur horizontalement */
}

.pin-display {
	display: center;
	width: 50%;
    font-size: 2rem;
    letter-spacing: 0.5rem;
    margin: 15px 0;
    color: #333;
	border-radius: 5px;
    border: 1px solid #d1d5db;
    background-color: #f2f7fb;
}
.pin-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.pin-buttons button {
    font-size: 1.5rem;
    padding: 15px;
    border-radius: 5px;
    background-color: #b3d1ff;
    color: #3a3a3a;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pin-buttons button:hover {
    background-color: #92b4f3;
}		


.pin-buttons button:active {
    background-color: #3e8e41; /* Encore un peu plus foncé */
}



/* Page des modules */
/*------------------*/
.modules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}


		
.module {
    background: #f8f9fa; /* Fond clair pour les modules */
    border: 1px solid #e0e0e0; /* Bordure subtile */
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
}

.module:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre douce au survol */
    transform: scale(1.05);
}

.module a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.module a:hover {
    color: #4facfe; /* Couleur d'accentuation au survol */
}

.admin-full {
    border-left: 5px solid #dc3545;
}

.admin-limited {
    border-left: 5px solid #ffc107;
}

.admin-view-only {
    border-left: 5px solid #28a745;
}