:root {
  --panel-width: 810px;
  --footer-height: 91px;
}

html {
  height: 100vh;
  margin: 0;
  text-align: center;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 50%, var(--primary-main), rgba(6, 18, 27, 1));
}

.background {
  height: calc(100vh - var(--footer-height));
  opacity: 0.37;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

main {
  position: absolute;
  top: 0;
  left: 0;
  height: calc(100vh - var(--footer-height));
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

main > .panel {
  box-shadow: var(--shadow-24);
  background-color: var(--background-default);
  width: var(--panel-width);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  z-index: 1; /* pour que le panel passe au-dessus du footer quand la fenêtre n’est pas assez haute */
  border-radius: 6px;
  overflow: hidden; /* pour que le border-radius s’applique bien en empêchant le contenu de dépasser */
  text-align: left;
}

main > .panel > .logo {
  flex: 1;
  background: var(--background-paper);
  min-width: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
}

main > .panel > .logo > img {
  flex: 0 0 auto;
  max-width: 100%;
  height: auto;
}

main > .panel > .container {
  padding: 40px 50px;
}

footer a {
  margin: 0 70px;
  color: var(--primary-contrast);
}

footer a:hover {
  color: var(--primary-contrast);
}

h1 {
	color: crimson;
}

/* Affichage simplifié pour les mobiles et autres petits écrans */
@media all and (max-width: 640px) {
  main {
    align-items: flex-start;
    height: 100vh;
  }

  main > .panel {
    flex-direction: column;
    width: 100%;
    border-radius: 0;
    height: 100vh;
    overflow-y: auto;
  }

  main > .panel > .logo {
    width: 100%;
    flex: 0 0 auto;
  }

  main > .panel > .logo img {
    margin: 24px;
  }

  footer {
    display: none;
  }
}

#forgot-password {
  display: block;
  width: fit-content;
  margin: 0 auto;
  color: #ffffff;
  background-color: #4b5563;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}

#forgot-password:hover {
  background-color: #374151;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#forgot-password:active {
  background-color: #1f2937;
}

/* Supprime le logo si pas assez de hauteur */
@media all and (max-width: 640px) and (max-height: 600px) {
  main > .panel > .logo {
    display: none;
  }
}

/* Supprime le message d’accueil si toujours pas assez de hauteur (modale de reauthn) */
@media all and (max-width: 640px) and (max-height: 500px) {
  main > .panel > .container > h1 {
    display: none;
  }
}
