/* ---- Styles généraux ---- */
body {
  background: #faebd7;
  color: #000;
  font-family: 'Inter', Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  max-width: 1440px;
  margin: auto;
}

.page-container {
  padding: 2.5em;
}

.page-container > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5em;
}

.page-container > header > h1 {
  font-size: 2em;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.04em;
}

.page-container > main {
  position: relative;
}


/* ---- Input & button ---- */
button {
  background-color: #999;
  color: #fff;
  border: none;
  padding: 0.75em 1.5em;
  border-radius: 1.5em;
  font-weight: 600;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
button:hover {
  background-color: #777;
  box-shadow: 0 3px 15px rgba(0,0,0,0.2);
}
button.button-green {
  background: rgb(25,128,25);
}
button.button-primary,
button[active] {
  background: rgb(255,51,51);
}
button.button-primary:hover,
button[active]:hover {
  background: #b22222;
}
button.button-green:hover {
  background: rgb(0,96,0);
}
button:active {
  background: #b22222;
}
button > * {
  vertical-align: middle;
  margin-left: 0.5em;
}
button > *:first-child {
  margin-left: 0;
}
button .material-icons {
  font-size: 1.25em;
}
/* Group */
.button-group {
  background-color: #999;
  padding: 0;
  display: flex;
  border-radius: 1.5em;
  overflow: hidden;
  color: #fff;
  font-size: 1em;
}
.button-group > button {
  align-items:center;
  justify-content: center;
  cursor: pointer;
  border-radius: 0;
  font-weight: normal;
  border-left: 1px solid rgba(0, 0, 0, 0.2);
}
.button-group > button:first-child {
  /* padding: 0.5em 1.25em; */
  border-left: none;
}
.button-group > button:last-child {
  padding: 0.5em 1em;
}
.button-group > button.material-icons {
  font-size: 0.9em;
}
.chips {
  font-weight: normal;
}

input[type="date"], input[type="text"] {
  padding: 0.75em 1.5em;
  border: 1px solid #e6cdb6;
  border-radius: 1.5em;
  font-size: 1em;
  background: #fff;
  outline: #b22222;
  font-family: Arial, Helvetica, sans-serif;
}
input[type="date"]:focus,
input[type="date"]:active,
input[type="text"]:focus,
input[type="text"]:active
{
  border: 2px solid #b22222;
  margin: -1px;
  outline: none;
}

/* SELECT */
select {
  padding: 0.75em 1.5em;
  border: 1px solid #e6cdb6;
  border-radius: 1.5em;
  font-size: 1em;
  background: #fff;
  outline: #b22222;
}
select, ::picker(select) {
  appearance: base-select;
}
select::picker-icon {
  color: #999999;
  transition: 0.4s rotate;
}
select:open {
  border: 2px solid #b22222;
}
select:open::picker-icon {
  rotate: 180deg;
}
::picker(select) {
  border: none;
  border-radius: 0.5em;
}
select option {
  padding: 0.5em 1em;
}
select option:hover {
  background-color: #999;
  color: white;
}
select option:checked {
  background-color: rgb(255,51,51);
  color: white;
}
select option::checkmark {
  content: "";
}

.material-icons {
  font-size: 1.5em;
}

.loading::after {
  content: 'chargement...';
  text-align: center;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  vertical-align: text-bottom;
  color: #FFF;
  border-radius: 1.5em;
  position: absolute;
  top:0;
  left:0;
  background: rgba(0,0,0,0.2);
  display: inline-block;
  width: 100%;
  height: 100%;
  cursor: progress;
}

.error {
  color: red;
  background-color: #ffcccc;
  padding: 1.5em;
  border-radius: 1.5em;
}
.error > i,span {
  vertical-align: middle;
  display: inline;
}

/* ---- Grid & Card ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-gap: 2em 1.5em;
}
.grid-fluid {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
}
.grid > * {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
/* .grid > .line-card, .bar-card {
  grid-column: auto / span 2;
} */

.card {
  background: #fff;
  border-radius: 1.5em;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 1.5em;
}

.card > .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75em;
}
.card > .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75em;
}
.card .card-title {
  font-size: 1.1em;
  color: #b22222;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}
.card > .card-actions {
  display: flex;
  justify-content: end;
  gap: 1em;
}

.overlay {
  background: rgba(0,0,0,0.2);
  position: fixed;
  left: 0;
  top: 0;
  width: calc(100% - 3em);
  height: calc(100% - 3em);
  padding: 1.5em;
  display: grid;
}

.overlay > .card {
  margin: auto;
  width: 640px;
  min-height: 480px;
}

/* Popup */
.filter-popup-list {
  overflow: scroll;
  max-height: 450px;
  min-height: 300px;
  list-style-type: none;
  padding: 0.5em
}
.filter-popup-list li label {
  display: block;
  padding: 0.5em;
}
.filter-popup-list > li:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.filter-popup-search {
  width: calc(100% - 3em);
}

.xs-visible {
  display: none;
}
.m-visible {
  display: block;
}

/* ---- Responsive ---- */
@media (max-width: 1240px) {
  .grid {
    grid-gap: 1.5em 1em;
  }
  .grid > .line-card, .bar-card {
    grid-column: auto;
  }
}
@media (max-width: 1100px) {
  .card {
    padding: 1.5em;
  }
  .card > .card-title {
    margin-bottom: 0.66em;
  }
}
@media (max-width: 900px) {
  body {
    font-size: 14px;
  }
  .grid {
    grid-gap: 1em 0.75em;
  }
  .m-visible {
    display: none;
  }
  .xs-visible {
    display: block;
  }
  button > span {
    display: none;
  }
}
@media (max-width: 650px) {
  body {
    font-size: 12px;
  }
  .grid {
    grid-gap: 0.75em;
  }
  .card {
    padding: 1em;
  }
  .card > .card-title {
    margin-bottom: 0.5em;
  }
  
}