: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);
}

/* Affichage simplifié pour les mobiles et autres petits écrans (modale de reauthn) */
@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;
  }
}
