:root {
  /* default colors */
  --white: #fafafa;
  --black: #0f0f0f;

  --color-body-background: #eeeeee; /* texte en noir */

  --color-hsl-base: 193;

  --color-main-regular: #2e5b66; /* texte en blanc */
  --color-main-dark: #123943; /* texte en blanc */
  --color-main-light: #bad5dc; /* texte en noir */
  --color-main-extralight: #ebf4f7; /* texte en noir */

  --color-highlight: #f3b94a; /* texte en noir */

  --color-red: #a62a18; /* texte en blanc */
  --color-error-red: #941e1e; /* texte en blanc */
  --color-success-green: #0f6f3a; /* texte en blanc */
  --color-warning-yellow: #debc5d; /* texte en noir */

  --color-table-line-hover: #cbd5da; /* texte en blanc */

  --color-input-background: #fcfdfd; /* texte en noir */
  --color-input-border: var(--color-main-regular);

  --color-disabled-background: #5c6568;

  /* font-sizes */
  --fontsize-xsm: calc(var(--fontsize-reg) * 0.708); /* 12.75px */
  --fontsize-sm: calc(var(--fontsize-reg) * 0.8125); /* 14.625px */
  --fontsize-reg: 1.125rem; /* 18px */
  --fontsize-md: calc(var(--fontsize-reg) * 1.125); /* 20.25px */
  --fontsize-lg: calc(var(--fontsize-reg) * 1.27); /* 22.85px */
  --fontsize-xl: calc(var(--fontsize-reg) * 1.6); /* 28.8px */
  --fontsize-xxl: calc(var(--fontsize-reg) * 2.25); /* 40.5px */
  --fontsize-giant: calc(var(--fontsize-reg) * 4); /* 72px */

  /* font family */
  --fontfamily-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  --fontfamily-serif: "Noto Serif", "Free Serif", "Liberation Serif",
    "Times New Roman", Times, Serif;
  --fontfamily-sans-serif: "Noto Sans", "Segoe UI", Oxygen, Ubuntu, Cantarell,
    system-ui, "Avenir Next", Avenir, "Nimbus Sans L", Roboto, Arial, Helvetica,
    "Helvetica Neue", sans-serif;
  --fontfamily-monospace: "Noto Sans Mono", Liberation Mono, ui-monospace,
    SFMono-Regular, SF Mono, Menlo, Consolas, Monaco, "Andale Mono",
    "Ubuntu Mono", monospace;

  /* font weight */
  --fontweight-bold: bold;

  /* box shadows */
  --box-shadow-1: 0px 0px 6px 0px rgb(0, 0, 0, 0.2);
  --box-shadow-2: 0px 0px 6px 0px rgba(0, 0, 0, 0.6);
  --box-shadow-3: 0px 0px 8px 0px rgba(0, 0, 0, 0.3);

  /* border radius */
  --radius-light: 0.25em;
  --radius-medium: 8px;

  /* spacings */
  --body-padding-inline: 0.8rem;
  --body-padding-block: 0.6rem;
}

h1,
h2,
h3,
h4,
h5 {
  margin-block: 0.6em 0.4em;
  text-wrap: balance;
}

h1 {
  --current-font-size: var(--fontsize-xxl);
  font-size: var(--current-font-size);
}

h2 {
  --current-font-size: var(--fontsize-xl);
  font-size: var(--current-font-size);
}

h3 {
  --current-font-size: var(--fontsize-lg);
  font-size: var(--current-font-size);
}

h4 {
  --current-font-size: var(--fontsize-md);
  font-size: var(--current-font-size);
}

h5 {
  --current-font-size: var(--fontsize-reg);
  font-size: var(--current-font-size);
}

.serif {
  /* font-size: calc(var(--current-font-size, var(--fontsize-reg)) * 1.12); */
  font-family: var(--fontfamily-serif);
}

.monospace {
  /* font-size: calc(var(--current-font-size, var(--fontsize-reg)) * 0.95); */
  font-family: var(--fontfamily-monospace);
}

body {
  --global-fontfamily: var(--fontfamily-sans-serif);

  background-color: #ffffff;
  color: #34495e;

  display: flex;
  flex-direction: column;
  font-size: var(--fontsize-reg);
  font-family: var(--global-fontfamily);
  margin: 0;
  min-height: 100vh;
  overflow-y: scroll;
  padding: 0;
}

body > header {
  background-color: #15616d;
  color: white;
  display: flex;
  height: 3em;
  justify-content: space-between;
  padding: 10px 20px 10px 20px;
}

body > header .main-header a {
  outline-color: white;
}

body > header .header-left {
  align-content: center;
  align-items: center;
  display: grid;
  grid-template-columns: auto 80%;
  text-align: center;
}

body > header .header-title {
  align-content: center;
  text-align: left;
}

body > header .header-title a {
  color: #ffffff;
}

body > header .header-flash {
  align-content: center;
  background-color: #ffffff;
  border-radius: 2em;
  color: #34495e;
  font-weight: bold;
  padding: 10px;
  text-align: center;
  width: fit-content;
}

body > header .logout-button {
  background-color: transparent;
  border: 0;
  cursor: pointer;
}

body > header .header-right {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 25px;
  justify-content: flex-end;
  text-align: center;
}

body > header svg {
  display: block;
  margin: auto;
}

body > main {
  display: flex;
  flex: 1 1 auto;
  -webkit-user-select: none; /* webkit (safari, chrome) browsers */
  -moz-user-select: none; /* mozilla browsers */
  -khtml-user-select: none; /* webkit (konqueror) browsers */
  -ms-user-select: none; /* IE10+ */
}

/*
  Barre latérale
*/

body > main > nav {
  background-color: #ffecd1;
  flex: 0 0 20vw;
  min-width: 150px;
  max-width: 15%;
  order: -1;
}

body > main > nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

body > main > nav a {
  display: block;
  color: black;
  padding: 10px 20px 10px 20px;
  text-align: center;
  text-decoration: none;
}

body > main > nav li div.active {
  background-color: #ffd08d;
}

body > main > nav li div:hover:not(.active) {
  background-color: #ffe3bb;
}

body > main > article {
  flex: 1;
}

.classrooms {
  display: flex;
  justify-content: flex-start;
}

.classrooms a {
  text-align: left;
}

input[type="checkbox"] {
  /* Add if not using autoprefixer */
  -webkit-appearance: none;
  appearance: none;
  /* For iOS < 15 to remove gradient background */
  background-color: #fff;
  /* Not removed via appearance */
  margin: 0;
  font: inherit;
  color: currentColor;
  width: 1.15em;
  height: 1.15em;
  border: 0.15em solid currentColor;
  border-radius: 0.15em;
  transform: translateY(-0.075em);
  display: grid;
  place-content: center;
}

input[type="checkbox"]::before {
  content: "";
  width: 0.65em;
  height: 0.65em;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--form-control-color);
  background-color: CanvasText;
  transform-origin: bottom left;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type="checkbox"]:checked::before {
  transform: scale(1);
}

input[type="checkbox"]:focus {
  outline: max(2px, 0.15em) solid currentColor;
  outline-offset: max(2px, 0.15em);
}

:root {
  --form-control-disabled: #959495;
}

input[type="checkbox"]:disabled {
  --form-control-color: var(--form-control-disabled);

  color: var(--form-control-disabled);
  cursor: not-allowed;
}

/*
  Formulaires
*/

.error-message {
  color: var(--color-error-red);
  font-size: var(--fontsize-sm);
  font-weight: var(--fontweight-bold);
  margin-block: 0;
  padding-bottom: 5px;
}

.error-message svg {
  position: relative;
  top: 0.2em;
}

label {
  color: var(--black);
}

label + p:not(.error-message) {
  font-size: var(--fontsize-sm);
  font-style: italic;
}

input,
select {
  display: block;
  width: 100%;
  max-width: 650px;
  margin-block: 0.4em;
  padding: 0.3em;
  font-family: var(--global-fontfamily);
  font-size: var(--fontsize-reg);
  background-color: var(--color-input-background);
  border-style: solid;
  border-width: 1px;
  border-color: var(--color-input-border);
  border-radius: var(--radius-light);
}

/************/
/* Boutons */
/**********/
.button,
button,
input[type="submit"],
a.btn {
  border: none;
  font-size: var(--fontsize-reg);
}

.button,
button,
input[type="submit"],
a.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: max-content;
  min-width: 150px;
  margin-block: 0.4em;
  margin-inline: 0.6em;
  padding-block: 0.6em;
  padding-inline: 0.8em;
  background-color: var(--color-main-regular);
  color: var(--white);
  border: none;
  border-radius: 0.2em;
  box-shadow: var(--box-shadow-1);
}

button.highlight,
input[type="submit"].highlight,
a.btn.highlight {
  background-color: var(--color-highlight);
  color: var(--black);
}

input[type="submit"] {
  margin-inline: 0;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
a.btn:hover {
  background-color: var(--color-main-dark);
  box-shadow: var(--box-shadow-2);
  cursor: pointer;
}

button.highlight:hover,
input[type="submit"].highlight:hover,
a.btn.highlight:hover {
  background-color: var(--color-highlight);
  color: var(--black);
}

button:disabled,
input[type="submit"]:disabled,
a.btn:disabled {
  cursor: not-allowed;
  background-color: var(--color-disabled-background);
  color: var(--white);
  box-shadow: none;
}

a.btn:hover {
  text-decoration: none;
}

a.btn.main-add {
  position: relative;
  top: 2px;
  margin-left: 1em;
  background-color: var(--color-highlight);
  font-size: var(--fontsize-reg);
  color: var(--black);
}

.warning-message {
  color: red;
  font-size: var(--fontsize-sm);
  padding-bottom: 10px;
}

.form-input {
  padding-bottom: 10px;
}

/*
  Homepage
*/
.home {
  padding: 10px;
  text-align: left;
}

.home h2 {
  padding-bottom: 20px;
}

/* 
  Forumlaire de login
*/
.login-form {
  display: grid;
}

.classroom-add {
  padding: 10px;
  text-align: left;
}

.classroom-edit {
  padding: 10px;
  text-align: left;
}

.classroom-criterias {
  display: flex;
  flex-direction: column;
}
.classroom-criterias div {
  display: flex;
  gap: 5px;
  justify-content: flex-start;
}
.classroom-criterias input {
  flex-basis: 0;
}

.teacher-edit {
  padding: 10px;
  text-align: left;
}

.teacher-edit .criterias-title {
  display: flex;
  flex-direction: row;
  gap: 5px;
}

.teacher-edit .criterias-list {
  padding: 10px;
}

.teacher-edit .criteria-header {
  display: grid;
  grid-template-columns: 50px 450px 100px 50px;
  gap: 5px;
}

.teacher-edit .criteria {
  display: grid;
  grid-template-columns: 50px 450px 100px 50px;
  gap: 5px;
}

.teacher-edit .criteria input {
  width: 95%;
}

.teacher-edit .criteria .icons {
  margin-block: 0.4em;
  padding: 0.3em;
  text-align: center;
}

.teacher-edit .criteria-item {
  display: flex;
  flex-direction: column;
}

.teacher-edit .criteria-new-error {
  color: red;
  display: none;
  font-size: var(--fontsize-sm);
  padding-left: 60px;
}
