/* --------------------------- */
/*            FONTS            */
/* --------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* --------------------------- */
/*          VARIABLES          */
/* --------------------------- */
:root {
  /* ===== Colors ===== */
  --first-color: #764c24;
  --first-bg-color: #fffaf1;
  --container-color: #e8d29c;
  --text-color: #535865;

  /* ===== Size ===== */
  --form-size: clamp(16px, 2.7vw, 22px);
  --admin-size: clamp(16px, 2.5vw, 20px);
  --admin-nav-size: clamp(16px, 3.5vh, 20px);

  /* ===== Transitions, animations ===== */
  --transition-links: all 0.3s ease-in-out;

  /* ====== Alerts ====== */
  /* Success */
  --success-1: #5a7052;
  --success-bg-1: #def2d6;
  --success-bg-hover-1: #adc5a5;

  /* Info */
  --info-1: #4480ae;
  --info-bg-1: #cde8f5;
  --info-bg-hover-1: #a5c7d8;

  /* Warning */
  --warning-1: #967132;
  --warning-bg-1: #f8f3d6;
  --warning-bg-hover-1: #dcd4a2;

  /* Error */
  --error-1: #b32f2d;
  --error-bg-1: #ecc8c5;
  --error-bg-hover-1: #c79995;

  /* ===== Box-shadows ===== */
  --shadow-navbar: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
  --shadow-navbar-color: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  --shadow-screen: 0 200vh 0 200vh rgba(0, 0, 0, 0.3);
  --shadow-simple: 0.7rem 0.5rem 1.3rem -0.6rem #000;
  --shadow-smooth: 0.5rem 0rem 2rem 0rem rgba(0, 0, 0, 0.15);
  --shadow-full-sides: 0rem 0rem 1rem 0rem #000;
}

/* --------------------------- */
/*    GLOBAL CONFIGURATIONS    */
/* --------------------------- */
/* Reset */
*,
::before,
::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background-color: var(--first-color);
  color: var(--first-bg-color);
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
}
body {
  font-size: 1.6rem;
  background-color: var(--first-bg-color);
  font-family: Montserrat, sans-serif;
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
li {
  list-style-type: none;
}
a {
  text-decoration: none;
  color: var(--first-color);
}
i {
  font-size: 2.5rem;
  color: var(--first-color);
}
h1 {
  text-align: center;
  color: var(--first-color);
}
img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --------------------------- */
/*          COMPONENTS         */
/* --------------------------- */
.container {
  width: clamp(200px, 95%, 1200px);
  margin: 0 auto;
}

/* ===== Logo ===== */
.logo {
  width: 7rem;
  height: 5rem;
}
/* .logo-form {
  width: 20rem;
  height: 20rem;
} */

/* ===== Burger ===== */
.burger {
  padding: 0.3rem;
  width: clamp(30px, 6vh, 40px);
  height: clamp(30px, 6vh, 40px);
  background-color: transparent;
  border: 0.3rem solid var(--first-color);
  border-radius: 50%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  display: none;
}
.burger .line {
  width: 80%;
  height: 0.45rem;
  background-color: var(--first-color);
  border-radius: 55rem;
}

/* ===== Title Container ===== */
.title-container {
  border: 0.3rem solid var(--first-color);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.title-container h1 {
  margin: 0 auto;
}
.title-container .dropdown ul {
  top: calc(100% + 1rem);
  right: 0;
}

/* ===== JS Handle ===== */
.js-handle {
  cursor: pointer;
}

/* ===== Buttons ===== */
.btn {
  width: fit-content;
  background: none;
  outline: none;
  border: none;
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
}
.btn.btn-primary,
.btn.btn-secondary,
.btn.btn-danger {
  padding: 1rem 1.5rem;
}

.btn i {
  color: var(--first-bg-color);
}

.btn.btn-primary {
  background-color: var(--first-color);
  color: var(--first-bg-color);
}

.btn.btn-secondary {
  color: var(--first-color);
}

.btn-danger {
  color: #f73b5a;
  color: var(--error-1);
  background-color: var(--error-bg-1);
}
.btn-danger i {
  color: var(--error-1);
}

/* ===== icons ===== */
.fa-arrow-turn-up {
  transform: rotate(90deg);
}

.icons {
  color: var(--first-color);
  font-size: clamp(18px, 2.5vw, 27px);
}
.icons button {
  background: none;
  color: var(--first-color);
  outline: none;
  border: none;
  font-size: clamp(18px, 2.5vw, 27px);
}

.fa-circle.online {
  color: var(--success-1);
}
.fa-circle.offline {
  color: #535865;
}

.message {
  margin: 5rem auto 0;
  font-weight: 500;
  font-size: 2.7rem;
  text-align: center;
}

/* ====== Social Media ======= */
.social {
  display: flex;
  gap: 1.5rem;
}

/* ===== dropdown ===== */
.dropdown {
  position: relative;
}
.dropdown > i {
  cursor: pointer;
  font-size: 3rem;
}
.dropdown ul {
  background-color: var(--container-color);
  border-radius: 1rem;
  padding: 1rem;
  position: absolute;
  top: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  visibility: hidden;
  opacity: 0;
  transition: all 0.2s ease-in-out;
}
.dropdown ul {
  white-space: nowrap;
}
.dropdown ul.active {
  visibility: visible;
  opacity: 1;
}
.dropdown ul li a {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ===== Avatar ===== */
.avatar img {
  border-radius: 50%;
  width: 5.5rem;
  height: 5.5rem;
}

/* ===== Avatar ===== */
.member {
  font-weight: 600;
  font-size: 2rem;
}

/* ===== Tags ===== */
.tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.tag {
  padding: 0.7rem 1rem;
  color: var(--first-color);
  background-color: var(--container-color);
  border-radius: 1rem;
  font-weight: 600;
}
/* Select2 */
.select2-selection__choice {
  color: var(--first-color);
}
.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: var(--first-color) !important;
}
.select2-container--default .select2-selection--multiple {
  background-color: var(--first-bg-color) !important;
  border-radius: 1rem !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: var(--container-color) !important;
  color: var(--first-color) !important;
  border: none !important;
  font-weight: 500;
  padding: 1rem 1rem 1rem 3rem !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  height: 100%;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  border-right: 0.2rem solid var(--first-color) !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: var(--first-color) !important;
}

/* ===== Accordion ===== */
.accordion {
  cursor: pointer;
}
.accordion-content {
  display: none;
  visibility: hidden;
  transition: all 0.2s ease;
}
.accordion.active + .accordion-content {
  display: flex;
  visibility: visible;
}

/* --------------------------- */
/*            RECIPES          */
/* --------------------------- */
.recipes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
/* ===== Recipe Card ===== */
.recipe-cards {
  display: flex;
  flex-wrap: wrap;
  /* align-items: center; */
  justify-content: center;
  gap: 3.5rem;
}
.recipe-card {
  background-color: var(--first-bg-color);
  /* width: clamp(230px, 100%, 330px); */
  flex-basis: 100%;
  max-width: 330px;
  box-shadow: var(--shadow-smooth);
  border-radius: 2rem;
  display: flex;
  flex-direction: column;
}

/* recipe-card-header */
.recipe-card-header .image {
  height: 200px;
}
.recipe-card-header .image img {
  border-top-right-radius: 2rem;
  border-top-left-radius: 2rem;
}
.recipe-card-header h3 {
  text-transform: capitalize;
  text-align: center;
  padding: 1rem;
  background-color: var(--container-color);
}

/* recipe-card-body */
.recipe-card-body {
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
}
.recipe-card-content {
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}
.recipe-card-content:last-of-type {
  justify-content: space-between;
  border-top: 0.2rem solid var(--text-color);
  border-bottom: 0.2rem solid var(--text-color);
}
.recipe-card-content .member {
  font-size: 1.7rem;
}
.recipe-card .stars {
  display: flex;
  gap: 0.3rem;
}

/* recipe-card-item */
.recipe-card-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.recipe-card-footer {
  padding: 2rem 0;
  display: flex;
  justify-content: center;
}
.recipe-card-footer a {
  text-transform: capitalize;
  text-align: center;
}

/* --------------------------- */
/*             FORMS           */
/* --------------------------- */
.container-form {
  max-width: 700px;
}
.styled-form {
  margin: 0 auto;
  width: 100%;
  max-width: 800px;
  font-size: var(--form-size);
  background-color: var(--container-color);
  padding: 3rem;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.styled-form .form-group {
  width: 100%;
  border-left: 0.5rem solid var(--first-color);
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* .styled-form .form-group div {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
} */

/* Title */
.form-title {
  padding: 1rem;
}

/* Images */
.styled-form .vich-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.styled-form .vich-image a {
  flex-basis: 100%;
}
.styled-form img {
  max-width: 600px;
  max-height: 600px;
}

/* Errors fiels */
.form-errors,
#registration_plainPassword li,
#change_password_plainPassword li {
  color: var(--error-1);
}
.form-errors li::before,
#registration_plainPassword li::before,
#change_password_plainPassword li::before {
  content: "Erreur : ";
  font-weight: 600;
}

.styled-form label {
  font-weight: 600;
}

.styled-form .styled-field {
  font-size: 0.7em;
  width: 100%;
  padding: 1rem;
  background-color: var(--first-bg-color);
  outline: none;
  border: 0.1rem solid var(--first-color);
  border-radius: 1rem;
}

.styled-form input, 
.styled-form select, 
.styled-form textarea,
.styled-form .select2-selection {
  display: flex;
  align-items: center;
  font-size: 0.9em;
  width: 100%;
  padding: 1rem;
  background-color: var(--first-bg-color);
  outline: none;
  border: 0.1rem solid var(--first-color);
  border-radius: 1rem;
}

/* Buttons */
.form-buttons {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}
/* .styled-form button {
  font-size: var(--form-size);
  margin-top: 2rem;
  padding: 1rem 3rem;
} */
.styled-form button[type="submit"] {
  font-weight: 600;
}

/* ===== Switch ===== */
.form-switch button {
  background: none;
  outline: none;
  border: none;
}
/* input[type="checkbox"].styled-field { */
input[type="checkbox"] {
  cursor: pointer;
  position: relative;
  width: 3.5rem;
  height: 2rem;
  background-color: #c6c6c6;
  outline: none;
  appearance: none;
  border-radius: 5rem;
  box-shadow: inset 0 0 0.2rem rgba(0, 0, 0, 0.2);
  transition: all 0.5s ease;
}
input[type="checkbox"]:checked {
  background-color: var(--first-color);
}
input[type="checkbox"]::before {
  content: "";
  width: 2rem;
  height: 2rem;
  background-color: var(--first-bg-color);
  border-radius: 50%;
  box-shadow: 0 0 0.2rem rgba(0, 0, 0, 0.2);
  position: absolute;
  top: 0;
  left: 0;
  transition: all 0.3s ease;
}
input[type="checkbox"]:checked::before {
  left: 1.5rem;
}

/* Collection */
.form-collection-container > label {
  font-size: var(--form-size);
}
.form-collection-container .btn-new {
  width: fit-content;
  padding: 0.5rem;
  font-size: 1.7rem;
}
.form-collection-container .btn-remove {
  margin: 0;
  background: none;
  border: none;
  outline: none;
}
.form-collection-container .btn-remove i {
  color: var(--error-1);
}
.form-collection-container .btn-new i {
  color: var(--first-bg-color);
}

.form-collection-item {
  margin-bottom: 2rem;
  border: 0.2rem solid var(--first-color);
  border-radius: 2rem;
  padding: 0.5rem 1.5rem;
}

.form-collection-item .accordion {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.form-collection-item .accordion-content {
  flex-direction: column;
  gap: 2rem;
}

/* Password */
#registration_plainPassword,
#change_password_plainPassword {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
#registration_plainPassword div,
#change_password_plainPassword div {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --------------------------- */
/*          SEARCH FORM        */
/* --------------------------- */
/* .search-form-container .styled-form {
  font-size: 1.7rem;
  flex-direction: row;
  flex-wrap: wrap;
} */
/* .search-form-container .styled-form .form-group {
  flex-basis: 30%;
} */
.search-form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
.search-form-container .accordion {
  padding: 1rem;
  background-color: var(--container-color);
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.search-form-container .accordion.active + .accordion-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.styled-search-form {
  /* padding: 1rem; */
  font-size: 1.6rem;
  min-width: 250px;
  max-width: 900px;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-evenly;
}

.styled-search-form .form-group {
  /* width: clamp(150px, 100%, 400px); */
  flex-basis: 100%;
  min-width: 250px;
  max-width: 400px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* --------------------------- */
/*            RECIPE           */
/* --------------------------- */
.recipe {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}
.recipe .image {
  height: 450px;
}
.recipe a {
  font-weight: 600;
}

.recipe h1 {
  text-transform: capitalize;
}
.recipe h2 {
  text-align: center;
  color: var(--first-color);
}

.recipe-info {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.recipe-info-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* ===== Features ===== */
.recipe-features {
  font-size: 1.8rem;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}
.recipe-ingredients {
  flex-basis: 40%;
  padding: 2rem;
  background-color: var(--container-color);
  box-shadow: var(--shadow-smooth);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.recipe-ingredients-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.recipe-ingredients-item {
  padding-left: 2rem;
  border-left: 0.3rem solid var(--first-color);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.recipe-ingredients-item > p:first-child {
  flex-grow: 1;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.recipe-ingredients .ingredient {
  text-transform: capitalize;
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.recipe-ingredients .unit {
  font-weight: 600;
  text-align: right;
  flex-grow: 1;
}

/* ===== Details ===== */
.recipe-details {
  flex-basis: 60%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.recipe-details-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.recipe-details-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.recipe-details-item span {
  font-weight: 600;
}

@media screen and (max-width: 900px) {
  .recipe-features {
    flex-wrap: wrap-reverse;
    justify-content: center;
  }
  .recipe-ingredients {
    flex-basis: 80%;
  }
  .recipe-details {
    flex-basis: 80%;
  }
}

@media screen and (max-width: 650px) {
  .recipe-ingredients {
    flex-basis: 100%;
  }
  .recipe-details {
    flex-basis: 100%;
  }
}

/* ===== Steps ===== */
.recipe-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.recipe-steps > div {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: space-around;
    flex-wrap: wrap;
    /* align-items: start; */
}
.recipe-steps .step {
  flex-basis: 100%;
  max-width: 370px;
  min-width: 250px;
  /* border: 0.2rem solid var(--first-color); */
  box-shadow: var(--shadow-smooth);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.recipe-steps .step .image {
  height: 200px;
}
.recipe-steps .step header {
  background-color: var(--container-color);
}
.recipe-steps .step h3 {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.recipe-steps .step p {
  padding: 1rem 2rem;
}

@media screen and (max-width: 800px) {
  .recipe-steps > div {
    flex-wrap: wrap;
  }
}

/* --------------------------- */
/*            ALERTS           */
/* --------------------------- */
.flash {
  margin: 2rem auto;
  padding: 1.5rem;
  border: 0.2rem solid;
  font-weight: 700;
  text-align: center;
}

.flash-success {
  color: var(--success-1);
  background-color: var(--success-bg-1);
  border-color: var(--success-1);
}

/* --------------------------- */
/*         RESTRICTIONS        */
/* --------------------------- */
.restricted-box {
  padding: 2rem;
  border: 0.2rem solid var(--error-1);
  background-color: var(--error-bg-1);
  color: var(--error-1);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.restricted-box h2 {
  text-align: center;
}
.restricted-box h2, 
.restricted-box a {
  color: var(--error-1);
}
.restricted-box a {
  text-decoration: underline;
}

.restricted-box .accordion {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
}
.restricted-box i {
  color: var(--error-1);
}
.restricted-box .accordion-content li {
  list-style-type: disc;
  margin: 1rem 1rem 0 2rem;
  /* margin-left: 2rem; */
}

.censored {
  padding: 1rem;
  background-color: var(--error-bg-1);
  color: var(--error-1);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  font-weight: 500;
}

/* --------------------------- */
/*           EXCEPTION         */
/* --------------------------- */
.error-container h1 {
  margin-bottom: 2rem;
}
.error-container p {
  text-align: center;
  font-size: 2rem;
  font-weight: 500;
}