@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');

:root {
  --dark-blue: #0e1635;
  --blue: #6374e3;
  --gray: #949ab0;
  --light: #f0f6f8;
  --good-green: #65d6ac;
  --bad-red: #f1879f;
  --main-font-size: 18px;
  --number-font-size: 22px;
  --smaller-font-size: 16px;
}



/* Style pour le bouton bascule  */
.switch {
    position: relative;
    display: inline-block;
    width: 60px; /* Largeur du switch */
    height: 34px; /* Hauteur du switch */
    top : 5px;
    right : 15px;
  }
  
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc; /* Couleur de fond du slider */
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 26px; /* Hauteur du cercle à l'intérieur du slider */
    width: 26px; /* Largeur du cercle à l'intérieur du slider */
    left: 4px;
    bottom: 4px;
    background-color: white; /* Couleur de fond du cercle */
    transition: .2s;
  }
  
  input:checked + .slider {
    background-color: #2196F3; /* Couleur de fond du slider lorsqu'il est activé */
  }
  
  input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
  }
  
  input:checked + .slider:before {
    transform: translateX(26px); /* Déplace le cercle vers la droite lorsqu'il est activé */
  }
  
  .slider.round {
    border-radius: 34px; /* Rend les bords du slider arrondis */
  }
  
  .slider.round:before {
    border-radius: 50%; /* Rend le cercle à l'intérieur du slider parfaitement rond */
  }
  
  #icon {
      width: 30px;
      cursor: pointer;
      color: #f1879f;
  }
      

#icon{
  width: 30px;
  cursor: pointer;
  color: #f1879f;
}


body.dark-mode {
  background-color: #2B2F42; /* Dark background for the body */
  color: #ffffff; /* Light text for the body */
}

.dark-mode .menu,
.dark-mode .main,
.dark-mode .stat-box,
.dark-mode .device-box,
.dark-mode .reference,
.dark-mode .row-1,
.dark-mode .row-2,
.dark-mode .row-4,
.dark-mode .box,
.dark-mode .tab-select,
.dark-mode .select-month,
.dark-mode .page-views{
  background-color: #353A50; /* Dark background for components */
  color: #ffffff; /* Light text for components */
}

.dark-mode .nav-bar {
  background-color: #2B2F42; /* Specific color for the nav-bar in dark mode */
  color: #ffffff;
}

.dark-mode .menu-link,
.dark-mode .menu-link:hover,
.dark-mode .reference:hover {
  background-color: #6374e3; /* Adjusted background for hover states in dark mode */
}

dark-mode .card-header, .dark-mode .nav-bar {
  background-color: #353A50;}

  .dark-mode .month-info-box,
.dark-mode .month-info-box span {
  color: #ffffff; /* Set the text color to white in dark mode */
}

.dark-mode .month-bar {
  background-color: #4f4f4f; /* A lighter shade for the bar in dark mode */
}


*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #f0f6f8;
  font-family: 'Roboto Mono', monospace;
}

/* Menu */
.menu {
  z-index: 10;
  position: fixed;
  top: 0;
  left: -300px;
  height: 100vh;
  width: 300px;
  max-width: 90%;
  background-color: var(--dark-blue);
  transition: 0.3s;
}

.menu-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  padding: 10px 20px;
  color: var(--gray);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray);
}

.menu-links {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
}

.menu-link {
  text-decoration: none;
  color: white;
  padding: 12px 0px;
}

.menu-link:hover {
  background-color: var(--blue);
}

.menu-link span {
  padding: 10px;
}

.close-menu {
  cursor: pointer;
  background: none;
  border: none;
}

.menu-opener {
  cursor: pointer;
  margin-left: 15px;
  display: block;
}
.close-menu img {
  padding: 5px;
}


/* Nav */
.nav-bar {
  position: relative;
  width: 100%;
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--dark-blue);
}


.nav-content {
  display: flex;
  flex-direction: row;
  margin-right: 15px;
}

.nav-content img {
  margin-right: 20px;
  cursor: pointer;
}

.main-nav-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
}

/* Tab selector */
nav.tab-selector {
  margin: 30px;
  display: none;
  flex-direction: row;
  justify-content: space-between;
}

.tab-select {
  text-decoration: none;
  color: var(--dark-blue);
  margin-right: 20px;
  border-bottom: 2px solid transparent;
}

.tab-select:hover {
  border-color: var(--dark-blue);
}

/* Main layout */
.main-layout {
  position: relative;
  margin: 30px;
  display: grid;
  gap: 20px;
  justify-content: center;
  transition: opacity 0.55s;
}

/* Main Area */
.main {
  grid-area: main;
}

/* Row 1 */
.row-1 {
  margin-right: 10px;
  display: grid;
  gap: 15px;
}

.active-users {
  height: 220px;
  border-radius: 10px;
  color: var(--light);
  background-color: var(--dark-blue);
  box-shadow: 0px 5px 14px 0px var(--dark-blue);
}

.active-users a {
  margin-top: 30px;
}

.page-views {
  border-radius: 10px;
  background-color: white;
  width: 100%;
  height: 220px;
  padding: 10px;
  color: var(--dark-blue);
}

.graph {
  height: 40%;
  display: flex;
  align-items: flex-end;
}

.graph div {
  background-color: var(--dark-blue);
  margin-right: 5px;
  width: 100%;
  height: 100%;
}

.graph div:hover::before{
  display: block;
}

.graph div:before {
  content: attr(aria-label);
  display:none;
  position: absolute;
  top: 30px;
  font-weight: 600;
  font-size: 15px;
  color: var(--dark-blue);
  width: 150px;
  padding: 10px;
  background-color: #f0f6f8;
  border-radius: 5px;
  pointer-events: none;  
}


/* Row 2 */
.row-2 {
  margin-top: 20px;
  margin-right: 10px;
  display: grid;
  gap: 15px;
}

.stat-box {
  padding: 5px;
  width: 100%;
  color: var(--dark-blue);
  background-color: white;
  border-radius: 10px;
  max-height: 100%;
  padding: 20px;
}

.stat-title {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 20px;
}

.stat-percentage {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.stat-percentage img {
  margin-right: 2px;
}

.stat-percentage.green {
  color: var(--good-green);
}

.stat-percentage.red {
  color: var(--bad-red);
}


/* Row of Devices */
.row-4{
  margin-top: 20px;
  margin-right: 10px;
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(1, 1fr);
}

.device-box {
  border-radius: 10px;
  background: white;
  border: 2px solid #f5f5f5;
}

.select-months {
  padding: 10px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  background-color: var(--light);
}

.select-month {
  cursor: pointer;
  color: var(--dark-blue);
  border-radius: 5px;
  padding: 10px;
  text-align: center;
  width: 100%;
  margin-right: 5px;
  background-color: var(--light);
  font-weight: 700;
  transition: box-shadow 0.3s;
}

.select-month:hover {
  box-shadow: 2px 2px 5px 0px rgba(138, 133, 133, 0.75);
}

.select-month.active {
  box-shadow: 2px 2px 5px 0px rgba(138, 133, 133, 0.75);
}

.month-info {
  margin-top: 10px;
  padding: 5px;
}

.month-info-box {
  color: var(--dark-blue);
  font-weight: 600;
  padding: 10px;
}

.month-bar {
  margin-top: 3px;
  height: 10px;
  background-color: var(--dark-blue);
}

.reference-details {
  margin-top: 10px;
}

.reference {
  padding: 10px;
  color: var(--dark-blue);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  transition: background 0.2s;
  border-radius: 10px;
}

.reference:hover {
  cursor: pointer;
  background-color: var(--light);
}

/* Util Classes */
.box {
  width: 100%;
  padding: 20px;
  position: relative;
}

.box-title {
  font-size: var(--main-font-size);
  font-weight: normal;
  padding-bottom: 10px;

}


.selected-tab {
  font-weight: 700;
  border-bottom: 2px solid var(--dark-blue);
}

.float-right {
  float: right;
}

.number-fs {
  font-size: var(--number-font-size);
}

.main-layout.active {
  pointer-events: none;
  opacity: 0.4;
}

#pieChartContainer{
  padding-left: 20%;
}



@media screen and (min-width: 950px) {
  :root {
    --main-font-size: 25px;
    --number-font-size: 36px;
  }
  .menu-opener img {
    display: none;
  }
  nav.tab-selector {
    display: flex;
  }

  .row-1 {
    grid-template-columns: 40% 60%;
  }
  .row-2 {
    grid-template-columns: repeat(4, 1fr);
  }
  .row-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}



