/* ===========================
  Home CSS
=========================== */

:root {
  --color-1: #031927;
  --color-2: #1282A2;
  --color-3: #EF767A;
  --color-4: #DFF8EB;
  
  --backgrond-color: #DFF8EB;

  --filter-white: invert(1) brightness(2);
  --filter-grey: invert(1) brightness(0.5);
}

body {
  background-color: var(--backgrond-color);
}

/* ----------------------------
  Header
---------------------------- */

.home_header {
  background-color: var(--color-1);
  color: white;
  height: 100px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

.home_logo {
  width: 33%;
  height: 100%;
  display: flex;
  align-items: center;
}

.home_button {
  height: 100%;
  display: flex;
  align-items: center;
}

#home_master {
  border: none;
  background: url(../img/admin.svg);
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  filter: var(--filter-white);
  cursor: pointer;
  height: 60%;
  aspect-ratio: 1 / 1;
}

#home_master:hover {
  filter: var(--filter-grey);
  transition: filter 0.3s ease;
}

/* ----------------------------
  Main
---------------------------- */

#home_filter_type {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0 0 0;
}


#home_filter_type > button {
  width: 130px;
  height: 40px;
  border: 2px solid var(--color-2);
  border-radius: 20px;
  background-color: white;
  color: var(--color-2);
  font-weight: 600;
  cursor: pointer;
}

#home_filter_type > button:hover, #home_filter_type > button.active {
  background-color: var(--color-2);
  color: white;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.home_main {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}

.home_left_main {
  width: 60%;
  padding-right: 10%;
}

.home_right_main {
  width: 40%;
  padding: 30px 30px 0px 0;
}

/* Left part */

.home_quiz {
  display: flex;
  flex-direction: column;
}

.home_type {
  padding: 30px 20px;
  min-height: 150px;
  display: block;
}

.home_type > h3 {
  background-color: var(--color-3);
  border-bottom-right-radius: 24px;
  border-top-left-radius: 24px;
  width: 90%;
  color: var(--color-4);
  font-weight: 700;
  padding: 5px 30px;
  font-size: 22px;
}

.home_button_container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 colonnes */
  gap: 20px; /* espace entre les boutons */
}

.home_button_container > button.home_qcm_button {
  background-color: white;
  border: 3px solid var(--color-2);
  color: var(--color-2);
  border-radius: 20px;
  padding: 5px 15px;
  cursor: pointer;
  height: 100px;
  width: 13vw;
  height: 100px;
}

.home_qcm_button:hover {
  background-color: #f2f2f2 !important;
  transition: background-color 0.3s ease;
}

.home_button_container > button.home_qcm_button > p:first-child {
  margin-top: 10px;
  font-weight: 600;
  font-size: 16px;
}

.home_button_container > button.home_qcm_button > p:nth-child(2) {
  margin-bottom: 10px;
}

/* Right part */

.home_quiz_description_container {
  background-color: white;
  border: 3px solid black;
  padding: 20px;
  border-radius: 24px;
  position: fixed;
  width: 25%;
}

.home_quiz_description_container > h4 {
  margin: 20px 0;
  font-size: 20px;
  text-align: center;
  color: var(--color-2);
}

.home_quiz_description_container > p:nth-child(2) {
  font-size: 14px;
  text-align: end;
  color: var(--color-2);
}

.home_quiz_description_container > p:nth-child(3) {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-2);
}

.home_quiz_description_container > p {
  margin: 15px;
}

.home_quiz_question_selector {
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.home_quiz_question_selector > select {
  border: 2px solid var(--color-2);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 16px;
  cursor: pointer;
}

.home_quiz_description_button_container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
}

.home_quiz_description_button_container > button {
  border: none;
  width: 40%;
  height: 50px;
  font-weight: 600;
  font-size: 18px;
  border-radius: 32px;
  padding: 10px 20px;
  color: white;
  cursor: pointer;
}

.home_quiz_description_button_container > button:hover {
  filter: brightness(85%);
}

.home_cancel_quiz {
  background-color: var(--color-3);
}

.home_launcher_quiz {
  background-color: var(--color-2);
}

/* ---------------------------
  Responsive
--------------------------- */

@media screen and (max-width: 1250px) {
  .home_button_container > button.home_qcm_button > p:first-child {
    font-size: 13px;
    margin: 5px 0;
  }
  .home_button_container > button.home_qcm_button > p:nth-child(2) {
    font-size: 10px;
  }
}

@media screen and (max-width: 950px) {
  .home_logo {
    order: -1;
  }
  .home_logo > img {
    width: 120%;
  }
  .home_main {
    overflow: hidden;
  }
  .home_left_main {
    width: 100%;
  }
  .home_right_main {
    width: 60%;
    position: absolute;
  }
  .home_button_container > button.home_qcm_button {
    width: 150px;
    margin-right: 15px;
    margin-bottom: 5px;
  }
  .home_quiz_description_button_container > button {
    width: 30vw;
    font-size: 4vw;
  }
  .home_button_container {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .home_quiz_description_container {
    left: 11%;
    width: 66%;
  }

  .home_quiz_question_selector {
    font-size: 80%;
  }
}