/* THEME AG GRID */
@import url("ag-grid.css");
/* VARIABLES */
@import url("variables.css");
/* FONTS */
@import url("https://fonts.googleapis.com/css2?family=Anton&family=Dancing+Script:wght@400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:wght@300;400;700&display=swap");
/* POP-UP */
@import url("modal.css");
/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--inter);
}

/* BLOCKAGE MOVE */
.body {
  overflow: hidden;
}

/* ============ HEADER ==========*/

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  padding: 0 20px;
  height: 4.5rem;
  border-bottom: 1px solid var(--color-separator);
}

.logo img {
  display: flex;
  height: 2rem;
}

header .avatar {
  display: flex;
  width: 2.8rem;
  height: 2.8rem;
}

nav ul {
  display: flex;
  height: 4.375rem;
  align-items: center;
  align-content: center;
  list-style: none;
  gap: 1rem;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  font-size: var(--nav-font-size);
  border: none;
  border-radius: 0.5rem;
  padding: 0.4rem 0.7rem;
  color: rgb(var(--black-color));
  cursor: pointer;
  background-color: transparent;
}

nav a.active {
  background-color: var(--color-light-green);
  pointer-events: none;
}

nav a.active:hover {
  background-color: var(--color-light-green);
}

nav a:hover {
  background-color: var(--color-light-green);
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* ============== BODY ============= */

main {
  width: 100%;
  height: calc(100vh - 4.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.main-container {
  width: 90%;
  height: 100%;
}
/* ========== BARRE D'OUTILS =========== */

main #toolbar {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: start;
  align-items: start;
  gap: 1rem;
  flex-shrink: 0;
}

.btn {
  font-weight: 400;
  font-size: 1rem;
  display: inline-flex;
  padding: 0.2rem 0.5rem;
  align-items: center;
  gap: 8px;
  border: 0.14rem solid var(--color-soft-black);
  border-radius: 0.5rem;
}

.btn i {
  width: 1rem;
  height: 1rem;
}

.btn:hover {
  background-color: var(--color-medplus-grey);
}

.btn.positive:hover {
  background-color: #e1f0e1;
}

.btn.danger:hover {
  background-color: #ebdede;
}

.main .barre-actions span:hover {
  background-color: rgb(var(--light-green-color));
}

/* ============ TABLE ============= */

.main-container #grid-container {
  width: 100%;
  height: calc(
    100% - 5rem
  ); /* Soustrait la hauteur approximative de la barre d'outils */
  margin-bottom: 1rem;
}

#products_grid {
  height: 100%;
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0px 2px 1rem 0px var(--color-separator);
}

#clients_grid {
  height: 100%;
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0px 2px 1rem 0px var(--color-separator);
}

/* ============ AUTH-PAGE ============= */

#login-container {
  max-width: 300px;
  margin: 8rem auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--color-grey-light);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0px 2px 1rem 0px var(--color-separator);
}

main #logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 15rem;
}
/* ============ MENU MOBILE ============= */

.open-menu-btn {
  display: none;
}

.mobile-menu {
  display: none; /* Masqué par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: white;
  z-index: 9999;
  box-sizing: border-box;
  flex-direction: column;
}

.mobile-menu.active {
  display: flex;
}

/* HEADER MOBILE  */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-content: center;
  padding: 0 20px;
  height: 4.5rem;
  border-bottom: 1px solid var(--color-separator);
}

.mobile-menu-logo {
  height: 2rem;
}

.close-menu-btn {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* Nav Mobile */
.mobile-menu-nav {
  margin-top: 2rem;
}

.mobile-menu-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 1rem;
}

.mobile-menu-nav li {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 85%;
  height: 3rem;
  border-radius: 8px;
  background-color: var(--color-light-grey);
}

.mobile-menu-nav li a {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background-color: var(--color-light-grey);
  color: var(--color-soft-black);
  font-weight: 500;
}

.mobile-menu-nav li a.active {
  background-color: var(--color-dark-grey);
  pointer-events: none;
  color: white;
}
/* Footer Mobile */
.mobile-menu-footer {
  margin-top: auto; /* pousse le footer en bas */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.settings-btn,
.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-weight: 600;
}

.settings-btn {
  background-color: #f0f0f0;
  color: #333;
}

.logout-btn {
  background-color: #333;
  color: #fff;
}

/* Icones Footer*/
.settings-btn i,
.logout-btn i {
  width: 1.2rem;
  height: 1.2rem;
}

/* ============== Formulaire de connexion =============== */
#inscription {
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

#login-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#signup-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.password-container {
  position: relative;
  width: 100%;
}

.password-container input {
  width: 100%;
  /* font-size: 1rem; */
  box-sizing: border-box;
}

.toggle-password {
  position: absolute;
  right: 0.1rem;
  top: 51%;
  transform: translateY(-50%);
  cursor: pointer;
  width: 20px;
  height: 20px;
}

.toggle-password img {
  width: 100%;
  height: 100%;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toggle-password img:hover {
  opacity: 1;
}

.error {
  color: red;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* MEDIA QUERY MOBILE */
@media only screen and (max-width: 850px) {
  nav ul {
    display: none;
  }

  /* Menu Mobile */
  .open-menu-btn {
    display: block;
    border: none;
    border-radius: 50%;
    background-color: transparent;
  }

  header .avatar {
    display: none !important;
  }

  main #toolbar {
    justify-content: center;
    padding: 0 12px;
  }
  .btn {
    padding: 0.8rem;
  }
  .btn span {
    display: none;
  }
  .btn i {
    width: 2rem;
    height: 2rem;
  }
  .main-container {
    width: 98%;
    height: 100%;
    margin-bottom: 1rem;
  }
}
