:root {
    --main-color: orangered;
    --secondary-color :burlywood;
    --third-color: #fdf8ef;
  }
*{
    margin:0;
    padding: 0;
}
.header{
    width:calc(100vw - 20px);
    height: 50px;
    display: flex;
    padding: 10px;
    background-color: var(--main-color);
    justify-content: space-between;
    position: fixed;
    

}
.logo{
    width: 400px;
    display: flex;
    align-items: center;
}
.logo img{
    width: 70px;
    height: 100%;
    border-radius: 50%;
    margin-right: 15px;
    cursor: pointer;
}
.logo span{
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;

}

#temps{
  font-weight: bold;
	top:70px;
	position:fixed;
	left: 12%;
	color: white;

}

#heure{
  font-weight: bold;
	position: fixed;
	left: 20%;
	top: 70px;
	color: white;

}


@media (max-width: 1080px) {
	#temps{
		top:50px;
		position:fixed;
		left: 160px;
		color: white;

	}

	#heure{
		position: fixed;
		left: 260px;
		top: 50px;
		color: white;

	}




}
@media (min-width: 1401px) {
	#temps{
		top:50px;
		position:fixed;
		left: 160px;
		color: white;

	}

	#heure{
		position: fixed;
		left: 260px;
		top: 50px;
		color: white;

	}

}

@media (max-width: 900px) {
    #temps{
      top:45px !important;
      position:fixed;
      left: 75px;
      color: white;
      font-size: 10px;
  
  }
  
  #heure{
      position: fixed;
      left: 140px;
      top: 45px !important;
      color: white;
      font-size: 10px;
     
  
  
  }
  
  }

    
.right-header{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 200px;
    text-align: right;
    padding-right: 15px;
    
}
.right-header-mobile{
    display: none ;
}
.right-header a{
    text-decoration: none;
    color:white;
    font-size: 20px;
    padding: 10px;
    font-weight: bold;
    margin-left: px !important;
    float: right;
}
.right-header a:hover{
    color:var(--main-color);
    padding: 10px;
    background-color: wheat;
    border-radius: 15px;
}
.right-header i{
    color:white;
    font-size: 20px;
    margin-right: 10px;
    cursor: pointer;
}
#search{
    position: absolute;
    z-index: 999;
    top:30px;
    left:calc(50vw - 125px);
    display: none;
}
input[type="text"],input[type="password"],input[type="date"],  input[type="number"], select{
    border: solid 1px var(--main-color);
    padding: 8px;
    border-radius: 10px;
    width: 80%;
    text-align: center;
    margin-top: 10px;
    background-color: rgb(255, 249, 230);
    color:black;
    font-size: 16px;
    
}
input[type="submit"]:hover{
 background-color: var(--secondary-color);
 scale: 1.01;
}
 .bouton{
      padding: 8px;
    background-color: var(--main-color);
    margin-top: 20px;
    border-radius: 10px;
    color: white;
    border: none;
    margin-bottom: 10px;
    text-transform: uppercase;
    cursor: pointer;
    }
    .bouton:hover{
      scale: 1.01;
      background-color: var(--secondary-color);
    }
#search button{
    background-color: transparent;
    font-size: 20px;
    color: white;
    border: none;
    
}
#search button i{
    padding: 5px;
}
#search-mobile{
    display: none;
}
.wrapper{
    margin-top: 95px;
    width: 100%;
    height: calc(100vh - 90px);

}
#theme{
    position: absolute;
    width: 400px;
    height: 120px;
    background-color: var(--secondary-color);
    top:200px;
    border-radius: 15px;
    padding: 20px;
    display: none;
    z-index: 99999;
    left: calc(50vw - 210px);

}
#theme form{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#theme select {
    margin-top: 10px;
    width: 80%;
    padding: 5px;
    color:var(--main-color);
    border-radius: 15px;
    text-align: center;

}
#theme label{
    font-size:25px;
    color: var(--main-color);
}

input[type="submit"]{
    padding: 8px;
    background-color: var(--main-color);
    margin-top: 20px;
    border-radius: 10px;
    color: white;
    border: none;
    margin-bottom: 10px;
    text-transform: uppercase;

}
#formContent {
    -webkit-border-radius: 10px 10px 10px 10px;
    border-radius: 10px 10px 10px 10px;
    background: rgb(252, 249, 239) !important;
    padding: 30px;
    width: 90%;
    max-width: 450px;
    position: relative;
    margin: 0 auto; /* centrer horizontalement */
    padding: 0px;
    -webkit-box-shadow: 0 30px 60px 0 rgba(0,0,0,0.3);
    box-shadow: 0 10px 10px 0 rgba(0,0,0,0.3);
    text-align: center;
    
  }
  
  form{
    display:flex;
    flex-direction:column;
    justify-content: space-around;
    align-content:center;
    align-items:center;
    
  }
  .toggle-password{
    margin-top: -28px;
    margin-left: 75%;
    color:var(--main-color) !important;
  }
  
  #formFooter {
    background-color: var(--main-grey);
    border-top: 1px solid wheat;
    padding: 20px;
    text-align: center;
    -webkit-border-radius: 0 0 10px 10px;
    border-radius: 0 0 10px 10px;
    /* margin-bottom: 150px; */
  }
  h2.active{
    color: var(--main-color);
      border-bottom: 2px solid wheat;
      padding: 10px;
      margin-bottom: 19px;
  }
  .error-message{
    color: var(--main-color) !important;
    font-weight: bold;
  }
  .nav{
    background-image: linear-gradient(to bottom, rgb(252, 249, 239), white);
  }
  .nav-tabs>li>a {
    color: var(--main-color) !important;
  }
  .nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover {
    color: var(--main-color) !important;
    background-color: wheat !important;
    }

   /* Sidebar */
   #sidebar {
    position: fixed;
    left: 0;
    top: 115px;
    width: 210px;
    height: calc(100vh - 181px);
    background-color: var(--third-color) !important;
    color: black;
    padding: 20px;
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  #sidebar.hidden {
    transform: translateX(-100%);
  }

  /* Conteneur principal */
  .container {
    margin-left: 250px;
    min-height: calc(100vh - 140px);
    padding: 20px;
    transition: margin-left 0.3s ease, width 0.3s ease;
    z-index: -1;
    padding-bottom: 60px !important;
  }

  .full-width {
    margin-left: 0;
    width: calc(100vw - 55px);
  }

  /* Boutons dans la sidebar */
  .sidebar-buttons {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  .sidebar-buttons button {
    background-color: transparent !important;
    color: black;
    border: none;
    padding: 10px;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    cursor: pointer;
    margin-left: 10px;
    font-size: 16px;
    position: relative;
  }

  .sidebar-buttons button:hover::after {
    content: attr(title);
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: black;
    color: white;
    height: 40px;
    width: 40px;
    padding: 5px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
  }

  /* Bouton d'affichage */
  #show-btn {
    position: fixed;
    top: 120px;
    left: 10px;
    background-color: transparent !important;
    color: var(--main-color) !important;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999999;
    display: none;
    font-size: 16px;
  }

  #show-btn:hover::after {
    content: "Afficher la barre";
    position: absolute;
    left: 50px;
    background-color: black;
    color: white;
    padding: 5px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
  }

  #sidebar h2{
    text-align: center;
    margin-top: 10px;
  }

  #sidebar .active {
      background-color: var(--secondary-color);
      color: var(--main-color);
    }

  
  #sidebar ul{
    margin-top: 20px;
    border-top: 1px solid wheat;
  }
  #sidebar li{
    list-style: none;
    padding: 10px;
    border-bottom: solid 1px wheat;
    font-weight: bold;
  }
  
  #sidebar li:hover{
    color: var(--main-color);
    background-color: wheat;
    cursor: pointer;
    scale: 1.01;
  }

  /* Responsive : cacher sidebar sur mobile */
  @media (max-width: 768px) {
    #sidebar {
      transform: translateX(-100%);
    }

    .container {
      margin-left: 0;
      margin-top: -55px;
    }

    #show-btn {
      display: none;
    }
  }
     /* FOOTER FIXE EN BAS */
     .footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: #313a3a;
        padding: 5px;
        height: auto; /* ajustée automatiquement selon le contenu */
        color: #ffffff;
        font-size: 14px;
        z-index: 1000; /* pour rester au-dessus d'autres éléments */
      }
      
      /* CONTENU INTERNE */
      .footer-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        max-width: 1200px;
        margin: 0 auto;
      }
      
      /* COPYRIGHT */
      .footer .copyright {
        margin: 0;
      }
      
      /* LIENS */
      .footer-links {
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
      }
      
      .footer-links a {
        color: var(--text-color);
        text-decoration: none;
        transition: color 0.3s ease;
      }
      
    .footer .copyright {
    color: var(--text-color);
    }
      
      .footer-links a:hover {
        color: var(--main-color);
      }
      
      /* RESPONSIVE POUR MOBILE */
      @media screen and (max-width: 768px) {
        .footer-content {
          flex-direction: column;
          align-items: center;
          
        }
      
        .footer-links {
          flex-direction: row;
          gap: 5px;
        }
      }
      
/* Section dashboard */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Grille des cartes */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

/* Cartes */
.card {
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #333;
}

.card p, .card ul {
  margin: 0;
  font-size: 16px;
  color: #555;
}

/* ChartJS */
.chart-container {
  background-color: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  width: calc(100% - 40px);
}
.card:nth-child(odd) {
  background-color: rgb(252, 249, 239);
}
.card:nth-child(even) {
  background-color: rgb(252, 249, 239);
}


   .container h1{
        margin-top: -20px;
        text-align: center;
    }
     /* Style de base pour la table */
 table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  text-align: center;
}
/* Style des cellules de la table */
th, td {
  border: 1px solid #ddd;
  padding: 3px;
  text-align: left;
  text-align: center;
}

/* Style de l'en-tête de la table */
th {
  color: white;
  font-weight: bold;
  background-color: var(--main-color);
}

tr:nth-child(odd) {
  background-color: var(--third-color) !important;
}
tr:hover{
  background-color: wheat !important;
}
table select{
  margin: 0 !important;
  padding: 2px;
}

 #loader {
    position: fixed;
    top: 116px;
    right: 0;
    width: calc(100vw - 265px);
    height: calc(100vh - 142px);
    bottom: 178px;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: width 0.3s ease;
}

/* Animation du spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top-color: var(--main-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: -5rem;
}
#loader p{
  color: var(--main-color);
  font-weight: bold;
}

/* Animation de rotation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#formContent{
        animation: fadeInDown 0.5s ease;
    }
    @keyframes fadeInDown {
        0%{
            transform: translateY(-80px);
        }
        100%{
            transform:translateY(0px);
        }
        
    }
        /* Arrière-plan flou semi-transparent */
#overlayModifierCategorie {
    display: none; /* visible dynamiquement en JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(5px); /* flou */
    background-color: rgba(0, 0, 0, 0.4); /* assombrissement */
    z-index: 9998;
    align-items: center;
    justify-content: center;
}
#overlayModifierCategorie h3{
    color : var(--main-color);
}

/* Boîte centrale de modification */
#divModifierCategorie {
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
    z-index: 9999;
    width: 300px;
    text-align: center;
    position: relative;
}

/* Champ texte */
#champNomCategorie {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
}

/* Boutons */
#divModifierCategorie button {
    margin: 10px 5px 0;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* Bouton Modifier */
.btn-modifier {
    background-color: #28a745;
    color: white;
}

.btn-modifier:hover {
    background-color: #218838;
}

/* Bouton Annuler */
.btn-annuler {
    background-color: #dc3545;
    color: white;
}

.btn-annuler:hover {
    background-color: #c82333;
}
 #divModifierCategorie label{
        display: block;
        margin-top: 5px;
        text-align: center;
        margin-bottom: -10px;
        color:rgb(60,60,60);
        
    }
    #divModifierCategorie p{
        color:var(--secondary-color);
    }
    #divModifierCategorie a{
        color:var(--main-color);
    }

    /* Conteneur centré et petit */
        .bottom-nav {
            position: fixed;
            bottom: 0px;
            left: 50%;
            transform: translateX(-50%);
            width: 100px;
            height: auto;
            background-color: #313a3a;
            padding: 6px;
            border-top-left-radius: 20px;
            border-top-right-radius: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 9999;
        }
         @media (max-width:700px) {
          .bottom-nav{
            display: none !important;
          }
          
        }

        /* Boutons réduits */
        .nav-btn {
            background-color: #444;
            color: white;
            border: none;
            padding: 6px;
            border-radius: 50%;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 30px;
            height: 30px;
            transition: background-color 0.3s;
        }

        .nav-btn:hover {
            background-color: #666;
        }

        .nav-btn i {
            font-size: 14px;
        }
    