* {
  transition: background-color 0.1s, color 0.1s;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  /* Prevent body scrolling */
}

body {
  font-size: 0.875rem;
}

.d-flex {
  display: flex;
  height: 100%;
}

.feather {
  width: 16px;
  height: 16px;
  vertical-align: text-bottom;
}

/*
   * Sidebar
   */

.sidebar {
  height: 100vh;
  /* Full viewport height */
  position: sticky;

  /*position: fixed;*/
  top: 0;
  /* rtl:raw:
	right: 0;
	*/
  bottom: 0;
  /* rtl:remove */
  left: 0;
  z-index: 100;
  /* Behind the navbar */
  padding: 48px 0 0;
  /* Height of navbar */
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
}

main {
  height: 100vh;
  border: 1px solid #ddd;
  padding: 10px;
  background-color: #f9f9f9;
}

@media (max-width: 767.98px) {
  .sidebar {
    top: 5rem;
  }
}

.card-mh-90vh {
  height: 90vh;
}

.card-body {
  overflow-x: auto;
  overflow-y: auto;
}

/* For tablets (≤ 768px) */
@media (max-width: 768px) {
  .card-mh-90vh {
    height: 90vh; /* Adjust height as needed for tablets */
    overflow-y: auto;
    overflow-x: hidden;
  }
}

/* For small mobile devices (≤ 480px) */
@media (max-width: 480px) {
  .card-mh-90vh {
    height: auto; /* Let content dictate height */
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

/* For tablets (≤ 768px) */
@media (max-height: 400px) {
  .card-mh-90vh {
    height: 90vh; /* Adjust height as needed for tablets */
    overflow-y: auto;
    overflow-x: hidden;
  }
}

/*
.sidebar-sticky {
	position: relative;
	top: 0;
	height: calc(100vh - 48px);
	padding-top: .5rem;
	overflow-x: hidden;
	overflow-y: auto;
}


.sidebar .nav-link {
	font-weight: 500;
	color: #333;
}

.sidebar .nav-link .feather {
	margin-right: 4px;
	color: #727272;
}

.sidebar .nav-link.active {
	color: #2470dc;
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
	color: inherit;
}

.sidebar-heading {
	font-size: .75rem;
	text-transform: uppercase;
}


/*
   * Navbar
   */

.nav-link {
  color: #333;
  transition: all 0.3s ease;
  margin: 5px;
  padding: 10px 15px;
}

.nav-link.active {
  background-color: #1b90d4;
  color: #000000;
  font-weight: bold;
  border-radius: 12px;
  padding: 10px 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(255, 5, 5, 0.1);
}

.nav-link.active:hover {
  background-color: #ffffffe7;
  text-decoration: none;
  color: #000000;
}

.nav-link:hover {
  background-color: #000000;
  /*font-weight: bold;*/
  border-radius: 12px;
  color: #ffffff;
  text-decoration: none;
}

.navbar .navbar-toggler {
  top: 0.25rem;
  right: 1rem;
}

.navbar .form-control {
  padding: 0.75rem 1rem;
  border-width: 0;
  border-radius: 0;
}

.form-control-dark {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.form-control-dark:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.error {
  color: red;
  font-size: 0.9rem;
}

.is-invalid {
  border-color: red;
}

.capitalize {
  text-transform: uppercase;
}

.uncapitalize {
  text-transform: lowercase;
}

/* Result Container Above Input */
.result-list {
  border: 1px solid #e0e0e0;
  /* Light gray border */
  width: 93.5%;
  /* Make the width the same as the input field */
  margin-bottom: 8px;
  /* Add spacing below */
  display: none;
  background-color: #ffffff;
  /* Pure white background */
  border-radius: 8px;
  /* Smooth corners */
  overflow: hidden;
  /* Ensures content stays within rounded edges */
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
  /* Softer shadow */
  position: absolute;
  /* Ensure it appears above other elements */
  z-index: 10;
  /* Bring above text field */
}

/* Individual Result Items */
.result-item {
  padding: 12px 16px;
  /* Add spacing */
  cursor: pointer;
  border-bottom: 1px solid #dcdcdc;
  /* Subtle gray line between items */
  transition: all 0.3s ease-in-out;
  /* Smooth hover effect */
  font-size: 14px;
  /* Slightly smaller text */
  color: #333;
  /* Dark gray text */
  font-family: Arial, sans-serif;
  /* Modern font */
}

/* Remove Bottom Border for the Last Item */
.result-item:last-child {
  border-bottom: none;
}

/* Hover Effect for Items */
.result-item:hover {
  background-color: #f9f9f9;
  /* Light background highlight */
  color: #0078d4;
  /* Highlight text in blue */
  transform: translateX(5px);
  /* Slight movement to the right */
}

/* Highlight Container While User is Active */
[id^="resultContainer"]:focus-within {
  border-color: #0078d4;
  /* Blue border when active */
  box-shadow: 0px 8px 15px rgba(0, 120, 212, 0.2);
  /* Adjusted shadow */
}

[id^="resultContainer"] {
  max-height: 300px;
  /* Limit the height to 300px */
  overflow-y: auto;
  /* Add vertical scrollbar when content overflows */
  border: 1px solid #ddd;
  /* Optional: Adds a border to the result container */
  border-radius: 5px;
  /* Optional: Rounded corners for better visual */
  padding: 5px;
  /* Optional: Add padding inside the container */
  background-color: #fff;
  /* Optional: Background color */
}

/* Add a simple hover effect for list items */
[id^="resultContainer"] .result-item:hover {
  background-color: #f0f0f0;
}

.d-flex {
  display: flex;
}

.me-2 {
  margin-right: 1rem;
  /* Adjust spacing between date and time */
}

.form-label {
  display: block;
}

.mb-3 {
  margin-bottom: 0.3rem !important;
}

.form-label {
  margin-bottom: 0.3rem;
  font-weight: bold;
}

tfoot input {
  width: 100%;
  padding: 3px;
  box-sizing: border-box;
}

.sidebar {
  height: 100vh;
  /* Full viewport height */
  position: sticky;
  top: 0;
  /* Sticks the sidebar during scrolling */
}

.content-wrapper {
  flex-grow: 1;
  /* Ensures main content takes available space */
}

.row {
  margin-right: 0px !important;
  margin-left: 0px !important;
}

#sidebarMenu {
  transition: width 0.3s;
}

#sidebarMenu.collapsed {
  width: 40px !important;
}

#sidebarMenu.collapsed .link-text {
  display: none;
}

#sidebarMenu .nav-link {
  display: flex;
  align-items: center;
}

#sidebarMenu .nav-link svg {
  margin-right: 10px;
}

#sidebarMenu.collapsed .nav-link svg {
  margin: 0 auto;
}

#toggleSidebarButton {
  background: #f8f9fa;
  border: none;
  cursor: pointer;
}

#toggleSidebarButton .icon {
  display: inline-block;
  transition: transform 0.3s;
}

#toggleSidebarButton.rotate .icon {
  transform: rotate(180deg);
}

.badge {
  font-size: 0.75rem;
  /* Smaller text */
  padding: 0.25rem 0.5rem;
  /* Adjust padding */
  border-radius: 0.25rem;
  /* Rounded corners */
}

.badge-danger {
  background-color: #dc3545;
  /* Red */
  color: white;
}

.badge-success {
  background-color: #28a745;
  /* Green */
  color: white;
}

.msg-success {
  font-weight: bold;
  color: green;
}

.msg-normal {
  font-weight: normal;
  color: rgb(0, 0, 0);
}

.result-item.highlighted {
  background-color: #007bff;
  color: white;
}

.disabled-color {
  background-color: #e9ecef;
  opacity: 1;
}

/* Ensure full height and center alignment */
.full-height-logon {
  height: 100vh;
  min-height: 100vh;
  overflow-y: auto;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Add space for the logo */
}

.company-logo2 {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
}

.company-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
}

.company-logo img {
  height: 40px;
  margin-right: 10px;
}

/* Ensure card width control */
.card-logon {
  width: 100%;
  max-width: 500px;
}

.header-logo {
  position: absolute;
  width: 100%;
  padding: 2rem 2rem;
}

.header-logo img {
  max-height: 25px;
}

/* Center the footer */
.footer-logo {
  text-align: center;
  margin-top: 20px;
}

.footer-logo img {
  height: 50px;
  margin-top: 10px;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  .full-height-logon {
    padding-top: 20px;
    /* Reduce top padding for smaller screens */
  }

  .company-logo {
    flex-direction: column;
    text-align: center;
    position: relative;
    margin: 40px;
  }

  .company-logo img {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .footer-logo {
    margin-bottom: 20px;
  }
}

/*New CSS for the new header*/

nav.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: #333;
  height: auto;
}

.container-fluid {
  margin-top: 0px;
}

.navbar-brand {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: 1rem;
  background-color: rgba(0, 0, 0, 0.25);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25);
}

nav.navbar a.navbar-brand {
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
}

nav.navbar a.navbar-brand img {
  margin-right: 10px;
}

nav .navbar-nav {
  display: flex;
  gap: 15px;
  align-items: center;
}

nav .navbar-nav .nav-link {
  color: white;
  padding: 8px 15px;
  font-size: 1rem;
}

nav .navbar-nav .nav-link:hover {
  color: #f8f9fa;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
}

nav .navbar-nav .dropdown-menu {
  background-color: #333;
  border: none;
}

nav .navbar-nav .dropdown-menu .dropdown-item {
  color: white;
}

.dropdown-item.active {
  background-color: #1b90d4;
}

nav .navbar-nav .dropdown-menu .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.navbar-toggler {
  border-color: white;
}

.navbar-toggler-icon {
  filter: brightness(0) invert(1);
}

.navbar-brand,
.nav-links {
  /*background-color: #333;*/
  flex-shrink: 0;
}

.navbar a,
.navbar button {
  margin: 0;
  padding: 5px 10px;
}

.navbar-brand.abs {
  color: #ffffff;
  position: absolute;
  width: auto;
  left: 50%;
  text-align: center;
}

.navbar-collapse {
  /*AREMETTRE margin-left: 94px;*/
  text-align: center;
}

.select {
  appearance: none;
  /* Removes default arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: white;
  padding: 8px 30px 8px 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
  background-image: url("data:image/svg+xml,<svg viewBox='0 0 24 24' width='24' height='24' fill='black' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5H7z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  cursor: pointer;
  width: 100%;
  /* Ensure full width */
}

.maintenance-container {
  max-width: 600px;
  padding: 20px;
  border-radius: 10px;
  background: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.maintenance-container h1 {
  font-size: 2rem;
  color: #dc3545;
}

.maintenance-container p {
  font-size: 1.2rem;
}

button.btn-space {
  margin-left: 1em;
}

#gridAnnonceClient55 {
  width: 100%;
  table-layout: fixed;
}

.icon-circle {
  width: 50px;
  height: 50px;
  background-color: #007bff;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%; /* Makes it round */
  font-size: 24px;
}

#loadingContainer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

#loadingSpinner {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 5px solid green;
  border-top: 5px solid green;
  animation: spin 2s linear infinite;
}

.spinner-line {
  position: absolute;
  width: 12px;
  height: 80px;
  transform-origin: 50% 50%;
}

#line1 {
  background-color: #ff5733; /* Red line */
  transform: rotate(0deg) translateY(-60px); /* Rotate and move it */
  animation: rotateLines 1s infinite linear;
}

#line2 {
  background-color: #fac105; /* Green line */
  transform: rotate(120deg) translateY(-60px); /* Rotate and move it */
  animation: rotateLines 1.5s infinite linear;
}

#line3 {
  background-color: #000000; /* Blue line */
  transform: rotate(240deg) translateY(-60px); /* Rotate and move it */
  animation: rotateLines 2s infinite linear;
}

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

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

#loadingText {
  margin-top: 30px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

/* Media query for tablets and smaller screens */
@media (max-width: 768px) {
  #loadingSpinner {
    width: 90px; /* Smaller size for tablets and mobile */
    height: 120px;
  }

  .spinner-line {
    width: 10px; /* Smaller lines */
    height: 60px;
  }

  #loadingText {
    font-size: 16px;
  }

  #line1,
  #line2,
  #line3 {
    transform: rotate(0deg) translateY(-50px); /* Adjust line positions */
  }
}

/* Media query for mobile devices */
@media (max-width: 480px) {
  #loadingSpinner {
    width: 100px; /* Even smaller size for mobile */
    height: 100px;
  }

  .spinner-line {
    width: 8px; /* Even smaller lines */
    height: 60px;
  }

  #line1,
  #line2,
  #line3 {
    transform: rotate(0deg) translateY(-40px); /* Adjust line positions */
  }

  #loadingText {
    font-size: 14px;
  }
}

.hide-text span {
  display: none;
  margin-left: 5px;
  transition: all 0.3s ease;
}

.hide-text:hover span {
  display: inline;
}
.site-name {
  display: none;
}

.form-check-input:checked {
  background-color: #28a745;
  border-color: #28a745;
}



@media (max-width: 1294px) {
  .hide-text span {
    display: none;
  }
}

@media (min-width: 1024px) {
  .site-name {
    display: inline;
  }
  .header-logo {
    text-align: left;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .hide-text span {
    display: inline;
  }
  .site-name {
    display: inline;
  }
  .header-logo {
    text-align: left;
  }
}
@media (min-width: 380px) and (max-width: 768px) {
  .site-name {
    display: inline;
  }
  .hide-text span {
    display: inline;
  }
  .header-logo {
    text-align: center;
  }
}
@media (min-width: 180px) and (max-width: 380px) {
  .site-name {
    display: inline;
  }
  .hide-text span {
    display: inline;
  }
  .header-logo {
    text-align: center;
  }
}

.invert {
  filter: invert(1);
}

/* Container fluid personnalisé pour Taghilt */
.container-fluid-taghilt {
  width: 100%;
  padding-right: 0;
  padding-left: 0;
  margin-right: 0;
  margin-left: 0;
  margin-top: 56px; /* Hauteur navbar optimisée */
}

/* Adjustement pour quand la sidebar est présente */
.container-fluid-taghilt.with-sidebar {
  margin-left: 0; /* Bootstrap gère déjà avec ms-sm-auto */
}

/* Responsive pour tablettes et mobiles */
@media (max-width: 767.98px) {
  .container-fluid-taghilt {
    margin-top: 88px; /* Hauteur navbar mobile (5rem = 80px) + espace (8px) */
  }
}