@font-face {
  font-family: Poppins;
  src: url(../font/Poppins-Light.ttf);
  font-weight: 300;
  font-display: swap;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
}

:root {
  --coop-primary: #6b6b6b;
  --coop-primary-hover: #7a7a7a;
  --coop-secondary: #383838;
  --coop-tertiary: #002060;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

#image-gauche {
  background: var(--coop-background);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-sizing: border-box;
}

#coop-logo-left {
  max-width: min(70%, 360px);
  max-height: 140px;
  width: auto;
  height: auto;
  opacity: 1;
  filter: none;
}

#motPasseOublie {
  color: var(--coop-secondary);
  margin-left: 5px;
}

#retourConnexion {
  color: #8ea0d2;
  text-decoration: none;
}

#textInfoInput {
  color: var(--coop-secondary);
  font-weight: 500;
}

#textInfoPwd {
  color: #8495cc;
}

#input-error,
#input-error-username {
  color: red;
}

#boutonConnexion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  color: #ffffff;
  padding: 18px 12px;
  margin-top: 10px;
  border: 1px solid #f7f5f5;
  border-radius: 6px;
  background: var(--coop-primary);
  box-shadow: 0 0 15px #0000000d;
  font-weight: 500;
  font-size: medium;
  cursor: pointer;
}

#boutonConnexion:hover {
  background: var(--coop-primary-hover);
}

#boutonConnexion img {
  width: 16px;
}

#boutonConnexion:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-card .login-field {
  margin: 15px 0;
  width: 100%;
}

.login-card .login-field input,
.login-card .login-field button {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #f7f5f5;
  border-radius: 8px;
  padding: 22px 26px;
  background: #ffffff;
  box-shadow: 0px 0px 15px 0px #0000000d;
  font-family: inherit;
}

.login-card .login-field input:focus {
  outline: none;
  border-color: var(--coop-primary);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.password-wrapper {
  position: relative;
}

.password-wrapper img {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 20px;
  transform: translateY(-50%);
  cursor: pointer;
}

.login-card .login-action {
  display: flex;
  justify-content: space-between;
  flex-direction: row-reverse;
}

.login-card .login-action span {
  order: 2;
}

.alert {
  display: block;
  margin-top: 10px;
}

.alert-error {
  color: #dd640d;
}

.alert-success {
  color: #388e3c;
}

.field-error {
  display: block;
  margin-top: 6px;
  color: #c0392b;
  font-size: 0.95em;
}

.password-policy {
  margin: 8px 0 4px;
  padding: 12px 14px;
  border: 1px solid #dfe5ff;
  border-radius: 8px;
  background: #f4f7ff;
  color: #c0392b;
  box-shadow: 0 0 10px 0 #0000000a;
}

.password-policy ul {
  margin: 0;
  padding-left: 18px;
}

.password-policy li {
  margin: 4px 0;
  color: #c0392b;
}

#username,
#id_password,
.login-card input {
  padding-right: 5px;
}

@media screen and (max-width: 1023px) {
  #image-gauche {
    position: absolute;
    overflow: hidden;
    width: 100vw;
    height: 25vh;
    left: 0px;
    top: 0px;
  }

  #image-gauche {
    background-size: cover;
  }

  #container-droite {
    position: absolute;
    overflow: hidden;
    width: 100vw;
    height: calc(100vh - 25vh);
    left: 0;
    right: 0;
    bottom: 0;
    padding-left: clamp(16px, 6vw, 64px);
    padding-right: clamp(16px, 6vw, 64px);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #textInfoInput {
    font-size: 4vw;
  }

  #motPasseOublie,
  #retourConnexion {
    font-size: 3vw;
  }

  #boutonConnexion {
    font-size: 3vw;
    margin-top: 3vh;
    margin-bottom: 3vh;
  }

  #username,
  #id_password,
  #id_password_confirm {
    font-size: 3vw;
  }

  #boutonConnexion img {
    width: 26px;
    margin-left: 1vw;
  }

  .password-wrapper img {
    width: 26px;
  }

  #textInfoInput p {
    margin-block-end: 0px;
  }

  #kc-form {
    width: 100%;
  }

  .login-card .login-field input,
  .login-card .login-field button {
    padding: 2.2vh 3vw;
  }
}

@media screen and (min-width: 1024px) {
  #image-gauche {
    position: absolute;
    overflow: hidden;
    width: 50vw;
    height: 100vh;
    left: 0px;
    top: 0px;
  }

  #image-gauche {
    background-size: cover;
  }

  #container-droite {
    position: absolute;
    overflow: hidden;
    width: 50vw;
    height: 100vh;
    right: 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 4vw;
    box-sizing: border-box;
  }

  #kc-form {
    margin: 0;
    width: 100%;
    max-width: 640px;
  }

  #logo {
    height: 10vh;
    z-index: 1;
  }
}
